diff --git a/packages/uni-api/src/helpers/api/callback.ts b/packages/uni-api/src/helpers/api/callback.ts index 12fc9a42462476fed1574f364ccba6f333a058cb..2aabe0f8147168aaa8cf1d093830b81f923bc100 100644 --- a/packages/uni-api/src/helpers/api/callback.ts +++ b/packages/uni-api/src/helpers/api/callback.ts @@ -90,7 +90,7 @@ type ApiCallbacks = { [key in CALLBACK_TYPES]?: Function } -function getApiCallbacks(args: Record) { +export function getApiCallbacks(args: Record) { const apiCallbacks: ApiCallbacks = {} for (const name in args) { const fn = args[name] @@ -133,11 +133,11 @@ export function createAsyncApiCallback( isFunction(beforeAll) && beforeAll(res) if (res.errMsg === name + ':ok') { isFunction(beforeSuccess) && beforeSuccess(res, args) - hasSuccess && success!(res) + hasSuccess && success(res) } else { - hasFail && fail!(res) + hasFail && fail(res) } - hasComplete && complete!(res) + hasComplete && complete(res) }) return callbackId } diff --git a/packages/uni-api/src/index.ts b/packages/uni-api/src/index.ts index d689cec714f542752f40286cc0b406303783a1b7..438dd1296eea06df6df1f33e81409bc4a03a9dac 100644 --- a/packages/uni-api/src/index.ts +++ b/packages/uni-api/src/index.ts @@ -21,6 +21,8 @@ export * from './service/keyboard/getSelectedTextRange' export * from './service/lifecycle/app' +export * from './service/plugin/push' + // protocols export * from './protocols/base/canIUse' diff --git a/packages/uni-api/src/service/plugin/push.ts b/packages/uni-api/src/service/plugin/push.ts new file mode 100644 index 0000000000000000000000000000000000000000..c675abce98b4cddbbcd1817fad56f88720190787 --- /dev/null +++ b/packages/uni-api/src/service/plugin/push.ts @@ -0,0 +1,96 @@ +import { isFunction, isPlainObject } from '@vue/shared' +import { getApiCallbacks } from '../../helpers/api/callback' + +interface OnPushCidCallback { + type: 'clientId' + cid: string +} + +interface OnPushLineStateCallback { + type: 'lineState' + online: boolean +} + +interface OnPushMsgCallback { + type: 'pushMsg' + message: unknown +} + +let cid: string = '' +/** + * @private + * @param args + */ +export function invokePushCallback( + args: OnPushCidCallback | OnPushLineStateCallback | OnPushMsgCallback +) { + if (args.type === 'clientId') { + cid = args.cid + invokeGetPushCidCallbacks(cid) + } else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }) + }) + } +} + +interface GetPushCidOptions { + success?: OnPushMessageSuccess +} + +const getPushCidCallbacks: ((cid?: string) => void)[] = [] + +function invokeGetPushCidCallbacks(cid?: string) { + getPushCidCallbacks.forEach((callback) => { + callback(cid) + }) + getPushCidCallbacks.length = 0 +} + +export function getPushCid(args: GetPushCidOptions) { + if (!isPlainObject(args)) { + args = {} + } + const { success, fail, complete } = getApiCallbacks(args) + const hasSuccess = isFunction(success) + const hasFail = isFunction(fail) + const hasComplete = isFunction(complete) + getPushCidCallbacks.push((cid?: string) => { + let res: Record + if (cid) { + res = { errMsg: 'getPushCid:ok', cid } + hasSuccess && success(res) + } else { + res = { errMsg: 'getPushCid:fail' } + hasFail && fail(res) + } + hasComplete && complete(res) + }) + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)) + } +} + +interface OnPushMessageSuccess { + data: unknown +} + +type OnPushMessageCallback = (result: OnPushMessageSuccess) => void +const onPushMessageCallbacks: OnPushMessageCallback[] = [] +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +export const onPushMessage: (fn: OnPushMessageCallback) => void = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn) + } +} + +export const offPushMessage: (fn?: OnPushMessageCallback) => void = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0 + } else { + const index = onPushMessageCallbacks.indexOf(fn) + if (index > -1) { + onPushMessageCallbacks.splice(index, 1) + } + } +} diff --git a/packages/uni-app-plus/dist/uni-app-service.es.js b/packages/uni-app-plus/dist/uni-app-service.es.js index 4283b6778be619a0c5a85206ba3c3466c312fe31..59ecb53b9638473f4b773a3107cede60047a9109 100644 --- a/packages/uni-app-plus/dist/uni-app-service.es.js +++ b/packages/uni-app-plus/dist/uni-app-service.es.js @@ -11521,6 +11521,72 @@ var serviceContext = (function (vue) { return getLaunchOptions(); }); + let cid = ''; + /** + * @private + * @param args + */ + function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } + } + const getPushCidCallbacks = []; + function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; + } + function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } + } + const onPushMessageCallbacks = []; + // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 + const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } + }; + const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } + }; + const API_GET_BACKGROUND_AUDIO_MANAGER = 'getBackgroundAudioManager'; const API_MAKE_PHONE_CALL = 'makePhoneCall'; @@ -19889,6 +19955,10 @@ var serviceContext = (function (vue) { setPageMeta: setPageMeta, getEnterOptionsSync: getEnterOptionsSync, getLaunchOptionsSync: getLaunchOptionsSync, + getPushCid: getPushCid, + onPushMessage: onPushMessage, + offPushMessage: offPushMessage, + invokePushCallback: invokePushCallback, setStorageSync: setStorageSync, setStorage: setStorage, getStorageSync: getStorageSync, diff --git a/packages/uni-app-plus/dist/uni-app-view.umd.js b/packages/uni-app-plus/dist/uni-app-view.umd.js index af2bbc7971e109266304f879420e491f759039c1..c70cd3b75c501aa4e2927ec34d2557d759684c03 100644 --- a/packages/uni-app-plus/dist/uni-app-view.umd.js +++ b/packages/uni-app-plus/dist/uni-app-view.umd.js @@ -1,3 +1,3 @@ -(function(Kn){typeof define=="function"&&define.amd?define(Kn):Kn()})(function(){"use strict";var Kn="",HT="",WT="",Nr={exports:{}},va={exports:{}},da={exports:{}},Bh=da.exports={version:"2.6.12"};typeof __e=="number"&&(__e=Bh);var Ut={exports:{}},ha=Ut.exports=typeof ha!="undefined"&&ha.Math==Math?ha:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=ha);var $h=da.exports,Nl=Ut.exports,Dl="__core-js_shared__",Bl=Nl[Dl]||(Nl[Dl]={});(va.exports=function(e,t){return Bl[e]||(Bl[e]=t!==void 0?t:{})})("versions",[]).push({version:$h.version,mode:"window",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"});var Fh=0,zh=Math.random(),Gn=function(e){return"Symbol(".concat(e===void 0?"":e,")_",(++Fh+zh).toString(36))},Jn=va.exports("wks"),Uh=Gn,Qn=Ut.exports.Symbol,$l=typeof Qn=="function",Hh=Nr.exports=function(e){return Jn[e]||(Jn[e]=$l&&Qn[e]||($l?Qn:Uh)("Symbol."+e))};Hh.store=Jn;var ga={},eo=function(e){return typeof e=="object"?e!==null:typeof e=="function"},Wh=eo,to=function(e){if(!Wh(e))throw TypeError(e+" is not an object!");return e},pa=function(e){try{return!!e()}catch(t){return!0}},ci=!pa(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),Fl=eo,ro=Ut.exports.document,Vh=Fl(ro)&&Fl(ro.createElement),zl=function(e){return Vh?ro.createElement(e):{}},jh=!ci&&!pa(function(){return Object.defineProperty(zl("div"),"a",{get:function(){return 7}}).a!=7}),ma=eo,Yh=function(e,t){if(!ma(e))return e;var r,i;if(t&&typeof(r=e.toString)=="function"&&!ma(i=r.call(e))||typeof(r=e.valueOf)=="function"&&!ma(i=r.call(e))||!t&&typeof(r=e.toString)=="function"&&!ma(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")},Ul=to,qh=jh,Xh=Yh,Zh=Object.defineProperty;ga.f=ci?Object.defineProperty:function(t,r,i){if(Ul(t),r=Xh(r,!0),Ul(i),qh)try{return Zh(t,r,i)}catch(a){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[r]=i.value),t};var Hl=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Kh=ga,Gh=Hl,Dr=ci?function(e,t,r){return Kh.f(e,t,Gh(1,r))}:function(e,t,r){return e[t]=r,e},io=Nr.exports("unscopables"),ao=Array.prototype;ao[io]==null&&Dr(ao,io,{});var Jh=function(e){ao[io][e]=!0},Qh=function(e,t){return{value:t,done:!!e}},no={},eg={}.toString,tg=function(e){return eg.call(e).slice(8,-1)},rg=tg,ig=Object("z").propertyIsEnumerable(0)?Object:function(e){return rg(e)=="String"?e.split(""):Object(e)},Wl=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},ag=ig,ng=Wl,_a=function(e){return ag(ng(e))},ba={exports:{}},og={}.hasOwnProperty,wa=function(e,t){return og.call(e,t)},sg=va.exports("native-function-to-string",Function.toString),lg=Ut.exports,xa=Dr,Vl=wa,oo=Gn("src"),so=sg,jl="toString",ug=(""+so).split(jl);da.exports.inspectSource=function(e){return so.call(e)},(ba.exports=function(e,t,r,i){var a=typeof r=="function";a&&(Vl(r,"name")||xa(r,"name",t)),e[t]!==r&&(a&&(Vl(r,oo)||xa(r,oo,e[t]?""+e[t]:ug.join(String(t)))),e===lg?e[t]=r:i?e[t]?e[t]=r:xa(e,t,r):(delete e[t],xa(e,t,r)))})(Function.prototype,jl,function(){return typeof this=="function"&&this[oo]||so.call(this)});var Yl=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e},fg=Yl,cg=function(e,t,r){if(fg(e),t===void 0)return e;switch(r){case 1:return function(i){return e.call(t,i)};case 2:return function(i,a){return e.call(t,i,a)};case 3:return function(i,a,n){return e.call(t,i,a,n)}}return function(){return e.apply(t,arguments)}},Br=Ut.exports,ya=da.exports,vg=Dr,dg=ba.exports,ql=cg,lo="prototype",Ve=function(e,t,r){var i=e&Ve.F,a=e&Ve.G,n=e&Ve.S,o=e&Ve.P,s=e&Ve.B,u=a?Br:n?Br[t]||(Br[t]={}):(Br[t]||{})[lo],l=a?ya:ya[t]||(ya[t]={}),f=l[lo]||(l[lo]={}),v,m,d,_;a&&(r=t);for(v in r)m=!i&&u&&u[v]!==void 0,d=(m?u:r)[v],_=s&&m?ql(d,Br):o&&typeof d=="function"?ql(Function.call,d):d,u&&dg(u,v,d,e&Ve.U),l[v]!=d&&vg(l,v,_),o&&f[v]!=d&&(f[v]=d)};Br.core=ya,Ve.F=1,Ve.G=2,Ve.S=4,Ve.P=8,Ve.B=16,Ve.W=32,Ve.U=64,Ve.R=128;var uo=Ve,hg=Math.ceil,gg=Math.floor,Xl=function(e){return isNaN(e=+e)?0:(e>0?gg:hg)(e)},pg=Xl,mg=Math.min,_g=function(e){return e>0?mg(pg(e),9007199254740991):0},bg=Xl,wg=Math.max,xg=Math.min,yg=function(e,t){return e=bg(e),e<0?wg(e+t,0):xg(e,t)},Sg=_a,Eg=_g,Tg=yg,Cg=function(e){return function(t,r,i){var a=Sg(t),n=Eg(a.length),o=Tg(i,n),s;if(e&&r!=r){for(;n>o;)if(s=a[o++],s!=s)return!0}else for(;n>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},Zl=va.exports("keys"),Og=Gn,fo=function(e){return Zl[e]||(Zl[e]=Og(e))},Kl=wa,Ag=_a,Ig=Cg(!1),kg=fo("IE_PROTO"),Mg=function(e,t){var r=Ag(e),i=0,a=[],n;for(n in r)n!=kg&&Kl(r,n)&&a.push(n);for(;t.length>i;)Kl(r,n=t[i++])&&(~Ig(a,n)||a.push(n));return a},Gl="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Rg=Mg,Lg=Gl,co=Object.keys||function(t){return Rg(t,Lg)},Pg=ga,Ng=to,Dg=co,Bg=ci?Object.defineProperties:function(t,r){Ng(t);for(var i=Dg(r),a=i.length,n=0,o;a>n;)Pg.f(t,o=i[n++],r[o]);return t},Jl=Ut.exports.document,$g=Jl&&Jl.documentElement,Fg=to,zg=Bg,Ql=Gl,Ug=fo("IE_PROTO"),vo=function(){},ho="prototype",Sa=function(){var e=zl("iframe"),t=Ql.length,r="<",i=">",a;for(e.style.display="none",$g.appendChild(e),e.src="javascript:",a=e.contentWindow.document,a.open(),a.write(r+"script"+i+"document.F=Object"+r+"/script"+i),a.close(),Sa=a.F;t--;)delete Sa[ho][Ql[t]];return Sa()},Hg=Object.create||function(t,r){var i;return t!==null?(vo[ho]=Fg(t),i=new vo,vo[ho]=null,i[Ug]=t):i=Sa(),r===void 0?i:zg(i,r)},Wg=ga.f,Vg=wa,eu=Nr.exports("toStringTag"),tu=function(e,t,r){e&&!Vg(e=r?e:e.prototype,eu)&&Wg(e,eu,{configurable:!0,value:t})},jg=Hg,Yg=Hl,qg=tu,ru={};Dr(ru,Nr.exports("iterator"),function(){return this});var Xg=function(e,t,r){e.prototype=jg(ru,{next:Yg(1,r)}),qg(e,t+" Iterator")},Zg=Wl,iu=function(e){return Object(Zg(e))},Kg=wa,Gg=iu,au=fo("IE_PROTO"),Jg=Object.prototype,Qg=Object.getPrototypeOf||function(e){return e=Gg(e),Kg(e,au)?e[au]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Jg:null},go=uo,ep=ba.exports,nu=Dr,ou=no,tp=Xg,rp=tu,ip=Qg,vi=Nr.exports("iterator"),po=!([].keys&&"next"in[].keys()),ap="@@iterator",su="keys",Ea="values",lu=function(){return this},np=function(e,t,r,i,a,n,o){tp(r,t,i);var s=function(c){if(!po&&c in v)return v[c];switch(c){case su:return function(){return new r(this,c)};case Ea:return function(){return new r(this,c)}}return function(){return new r(this,c)}},u=t+" Iterator",l=a==Ea,f=!1,v=e.prototype,m=v[vi]||v[ap]||a&&v[a],d=m||s(a),_=a?l?s("entries"):d:void 0,b=t=="Array"&&v.entries||m,x,p,g;if(b&&(g=ip(b.call(new e)),g!==Object.prototype&&g.next&&(rp(g,u,!0),typeof g[vi]!="function"&&nu(g,vi,lu))),l&&m&&m.name!==Ea&&(f=!0,d=function(){return m.call(this)}),(po||f||!v[vi])&&nu(v,vi,d),ou[t]=d,ou[u]=lu,a)if(x={values:l?d:s(Ea),keys:n?d:s(su),entries:_},o)for(p in x)p in v||ep(v,p,x[p]);else go(go.P+go.F*(po||f),t,x);return x},mo=Jh,Ta=Qh,uu=no,op=_a,sp=np(Array,"Array",function(e,t){this._t=op(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,Ta(1)):t=="keys"?Ta(0,r):t=="values"?Ta(0,e[r]):Ta(0,[r,e[r]])},"values");uu.Arguments=uu.Array,mo("keys"),mo("values"),mo("entries");for(var fu=sp,lp=co,up=ba.exports,fp=Ut.exports,cu=Dr,vu=no,du=Nr.exports,hu=du("iterator"),gu=du("toStringTag"),pu=vu.Array,mu={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_u=lp(mu),_o=0;_o<_u.length;_o++){var Ca=_u[_o],cp=mu[Ca],bu=fp[Ca],fr=bu&&bu.prototype,Oa;if(fr&&(fr[hu]||cu(fr,hu,pu),fr[gu]||cu(fr,gu,Ca),vu[Ca]=pu,cp))for(Oa in fu)fr[Oa]||up(fr,Oa,fu[Oa],!0)}function Aa(e,t){for(var r=Object.create(null),i=e.split(","),a=0;a!!r[n.toLowerCase()]:n=>!!r[n]}var vp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",dp=Aa(vp);function wu(e){return!!e||e===""}var hp=Aa("animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width");function bo(e){if(ne(e)){for(var t={},r=0;r{if(r){var i=r.split(pp);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function mp(e){var t="";if(!e||ye(e))return t;for(var r in e){var i=e[r],a=r.startsWith("--")?r:Ke(r);(ye(i)||typeof i=="number"&&hp(a))&&(t+="".concat(a,":").concat(i,";"))}return t}function wo(e){var t="";if(ye(e))t=e;else if(ne(e))for(var r=0;r{},_p=()=>!1,bp=/^on[^a-z]/,Ia=e=>bp.test(e),xo=e=>e.startsWith("onUpdate:"),ve=Object.assign,yo=(e,t)=>{var r=e.indexOf(t);r>-1&&e.splice(r,1)},wp=Object.prototype.hasOwnProperty,re=(e,t)=>wp.call(e,t),ne=Array.isArray,hi=e=>gi(e)==="[object Map]",xp=e=>gi(e)==="[object Set]",oe=e=>typeof e=="function",ye=e=>typeof e=="string",So=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",yu=e=>We(e)&&oe(e.then)&&oe(e.catch),yp=Object.prototype.toString,gi=e=>yp.call(e),Eo=e=>gi(e).slice(8,-1),mt=e=>gi(e)==="[object Object]",To=e=>ye(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ka=Aa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ma=e=>{var t=Object.create(null);return r=>{var i=t[r];return i||(t[r]=e(r))}},Sp=/-(\w)/g,Ht=Ma(e=>e.replace(Sp,(t,r)=>r?r.toUpperCase():"")),Ep=/\B([A-Z])/g,Ke=Ma(e=>e.replace(Ep,"-$1").toLowerCase()),Ra=Ma(e=>e.charAt(0).toUpperCase()+e.slice(1)),Co=Ma(e=>e?"on".concat(Ra(e)):""),pi=(e,t)=>!Object.is(e,t),Oo=(e,t)=>{for(var r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},Tp=e=>{var t=parseFloat(e);return isNaN(t)?e:t},Su,Cp=()=>Su||(Su=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"||typeof window!="undefined"?window:{}),mi=` -`,Eu=44,Pa="#007aff",Op=/^([a-z-]+:)?\/\//i,Ap=/^data:.*,.*/,Tu="wxs://",Cu="json://",Ip="wxsModules",kp="renderjsModules",Mp="onPageScroll",Rp="onReachBottom",Lp="onWxsInvokeCallMethod",Ao=0;function Io(e){var t=Date.now(),r=Ao?t-Ao:0;Ao=t;for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;nJSON.stringify(o)).join(" "))}function ko(e){return ve({},e.dataset,e.__uniDataset)}function _i(e){return{passive:e}}function Mo(e){var{id:t,offsetTop:r,offsetLeft:i}=e;return{id:t,dataset:ko(e),offsetTop:r,offsetLeft:i}}function Pp(e,t,r){var i=document.fonts;if(i){var a=new FontFace(e,t,r);return a.load().then(()=>{i.add&&i.add(a)})}return new Promise(n=>{var o=document.createElement("style"),s=[];if(r){var{style:u,weight:l,stretch:f,unicodeRange:v,variant:m,featureSettings:d}=r;u&&s.push("font-style:".concat(u)),l&&s.push("font-weight:".concat(l)),f&&s.push("font-stretch:".concat(f)),v&&s.push("unicode-range:".concat(v)),m&&s.push("font-variant:".concat(m)),d&&s.push("font-feature-settings:".concat(d))}o.innerText='@font-face{font-family:"'.concat(e,'";src:').concat(t,";").concat(s.join(";"),"}"),document.head.appendChild(o),n()})}function Np(e,t){if(ye(e)){var r=document.querySelector(e);r&&(e=r.getBoundingClientRect().top+window.pageYOffset)}e<0&&(e=0);var i=document.documentElement,{clientHeight:a,scrollHeight:n}=i;if(e=Math.min(e,n-a),t===0){i.scrollTop=document.body.scrollTop=e;return}if(window.scrollY!==e){var o=s=>{if(s<=0){window.scrollTo(0,e);return}var u=e-window.scrollY;requestAnimationFrame(function(){window.scrollTo(0,window.scrollY+u/s*10),o(s-10)})};o(t)}}function Dp(){return typeof __channelId__=="string"&&__channelId__}function Bp(e,t){switch(Eo(t)){case"Function":return"function() { [native code] }";default:return t}}function $p(e,t,r){if(Dp())return r.push(t.replace("at ","uni-app:///")),console[e].apply(console,r);var i=r.map(function(a){var n=gi(a).toLowerCase();if(n==="[object object]"||n==="[object array]")try{a="---BEGIN:JSON---"+JSON.stringify(a,Bp)+"---END:JSON---"}catch(s){a=n}else if(a===null)a="---NULL---";else if(a===void 0)a="---UNDEFINED---";else{var o=Eo(a).toUpperCase();o==="NUMBER"||o==="BOOLEAN"?a="---BEGIN:"+o+"---"+a+"---END:"+o+"---":a=String(a)}return a});return i.join("---COMMA---")+" "+t}function Fp(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a{var i=t[r];return i||(t[r]=e(r))}}function tm(e){return em(e)}function rm(e){return e.indexOf("/")===0}function Do(e){return rm(e)?e:"/"+e}function Da(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r;return function(){if(e){for(var i=arguments.length,a=new Array(i),n=0;ne.apply(this,arguments);r=setTimeout(a,t)};return i.cancel=function(){clearTimeout(r)},i}var am=Array.isArray,nm=e=>e!==null&&typeof e=="object",om=["{","}"];class sm{constructor(){this._caches=Object.create(null)}interpolate(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:om;if(!r)return[t];var a=this._caches[t];return a||(a=fm(t,i),this._caches[t]=a),cm(a,r)}}var lm=/^(?:\d)+/,um=/^(?:\w)+/;function fm(e,t){for(var[r,i]=t,a=[],n=0,o="";nvm.call(e,t),dm=new sm;function hm(e,t){return!!t.find(r=>e.indexOf(r)!==-1)}function gm(e,t){return t.find(r=>e.indexOf(r)===0)}function Pu(e,t){if(!!e){if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if(e=e.toLowerCase(),e==="chinese")return bi;if(e.indexOf("zh")===0)return e.indexOf("-hans")>-1?bi:e.indexOf("-hant")>-1||hm(e,["-tw","-hk","-mo","-cht"])?Ba:bi;var r=gm(e,[Wt,Bo,$o]);if(r)return r}}class pm{constructor(t){var{locale:r,fallbackLocale:i,messages:a,watcher:n,formater:o}=t;this.locale=Wt,this.fallbackLocale=Wt,this.message={},this.messages={},this.watchers=[],i&&(this.fallbackLocale=i),this.formater=o||dm,this.messages=a||{},this.setLocale(r||Wt),n&&this.watchLocale(n)}setLocale(t){var r=this.locale;this.locale=Pu(t,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],r!==this.locale&&this.watchers.forEach(i=>{i(this.locale,r)})}getLocale(){return this.locale}watchLocale(t){var r=this.watchers.push(t)-1;return()=>{this.watchers.splice(r,1)}}add(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=this.messages[t];a?i?Object.assign(a,r):Object.keys(r).forEach(n=>{Lu(a,n)||(a[n]=r[n])}):this.messages[t]=r}f(t,r,i){return this.formater.interpolate(t,r,i).join("")}t(t,r,i){var a=this.message;return typeof r=="string"?(r=Pu(r,this.messages),r&&(a=this.messages[r])):i=r,Lu(a,t)?this.formater.interpolate(a[t],i).join(""):(console.warn("Cannot translate the value of keypath ".concat(t,". Use the value of keypath as default.")),t)}}function mm(e,t){e.$watchLocale?e.$watchLocale(r=>{t.setLocale(r)}):e.$watch(()=>e.$locale,r=>{t.setLocale(r)})}function _m(){return typeof uni!="undefined"&&uni.getLocale?uni.getLocale():typeof window!="undefined"&&window.getLocale?window.getLocale():Wt}function bm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;typeof e!="string"&&([e,t]=[t,e]),typeof e!="string"&&(e=_m()),typeof r!="string"&&(r=typeof __uniConfig!="undefined"&&__uniConfig.fallbackLocale||Wt);var a=new pm({locale:e,fallbackLocale:r,messages:t,watcher:i}),n=(o,s)=>{if(typeof getApp!="function")n=function(l,f){return a.t(l,f)};else{var u=!1;n=function(l,f){var v=getApp().$vm;return v&&(v.$locale,u||(u=!0,mm(v,a))),a.t(l,f)}}return n(o,s)};return{i18n:a,f(o,s,u){return a.f(o,s,u)},t(o,s){return n(o,s)},add(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return a.add(o,s,u)},watch(o){return a.watchLocale(o)},getLocale(){return a.getLocale()},setLocale(o){return a.setLocale(o)}}}var wm=Da(()=>typeof __uniConfig!="undefined"&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length),wi;function Ge(){if(!wi){var e;if(typeof getApp=="function"?e=weex.requireModule("plus").getLanguage():e=plus.webview.currentWebview().getStyle().locale,wi=bm(e),wm()){var t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach(r=>wi.add(r,__uniConfig.locales[r])),wi.setLocale(e)}}return wi}function _t(e,t,r){return t.reduce((i,a,n)=>(i[e+a]=r[n],i),{})}var xm=Da(()=>{var e="uni.picker.",t=["done","cancel"];Ge().add(Wt,_t(e,t,["Done","Cancel"]),!1),Ge().add($o,_t(e,t,["OK","Cancelar"]),!1),Ge().add(Bo,_t(e,t,["OK","Annuler"]),!1),Ge().add(bi,_t(e,t,["\u5B8C\u6210","\u53D6\u6D88"]),!1),Ge().add(Ba,_t(e,t,["\u5B8C\u6210","\u53D6\u6D88"]),!1)}),ym=Da(()=>{var e="uni.button.",t=["feedback.title","feedback.send"];Ge().add(Wt,_t(e,t,["feedback","send"]),!1),Ge().add($o,_t(e,t,["realimentaci\xF3n","enviar"]),!1),Ge().add(Bo,_t(e,t,["retour d'information","envoyer"]),!1),Ge().add(bi,_t(e,t,["\u95EE\u9898\u53CD\u9988","\u53D1\u9001"]),!1),Ge().add(Ba,_t(e,t,["\u554F\u984C\u53CD\u994B","\u767C\u9001"]),!1)}),Nu=function(){};Nu.prototype={on:function(e,t,r){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var i=this;function a(){i.off(e,a),t.apply(r,arguments)}return a._=t,this.on(e,a,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),i=0,a=r.length;for(i;i1?i-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:!1;t[a?"once":"on"]("".concat(e,".").concat(r),i)},unsubscribe(r,i){t.off("".concat(e,".").concat(r),i)},subscribeHandler(r,i,a){t.emit("".concat(e,".").concat(r),i,a)}}}var Du="invokeViewApi",Bu="invokeServiceApi",Em=1,Tm=(e,t,r)=>{var{subscribe:i,publishHandler:a}=UniViewJSBridge,n=r?Em++:0;r&&i(Bu+"."+n,r,!0),a(Bu,{id:n,name:e,args:t})},$a=Object.create(null);function Fa(e,t){return e+"."+t}function Cm(e,t){UniViewJSBridge.subscribe(Fa(e,Du),t?t($u):$u)}function bt(e,t,r){t=Fa(e,t),$a[t]||($a[t]=r)}function Om(e,t){t=Fa(e,t),delete $a[t]}function $u(e,t){var{id:r,name:i,args:a}=e;i=Fa(t,i);var n=s=>{r&&UniViewJSBridge.publishHandler(Du+"."+r,s)},o=$a[i];o?o(a,n):n({})}var Am=ve(Sm("service"),{invokeServiceMethod:Tm}),Im=350,Fu=10,za=_i(!0),xi;function yi(){xi&&(clearTimeout(xi),xi=null)}var zu=0,Uu=0;function km(e){if(yi(),e.touches.length===1){var{pageX:t,pageY:r}=e.touches[0];zu=t,Uu=r,xi=setTimeout(function(){var i=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});i.touches=e.touches,i.changedTouches=e.changedTouches,e.target.dispatchEvent(i)},Im)}}function Mm(e){if(!!xi){if(e.touches.length!==1)return yi();var{pageX:t,pageY:r}=e.touches[0];if(Math.abs(t-zu)>Fu||Math.abs(r-Uu)>Fu)return yi()}}function Rm(){window.addEventListener("touchstart",km,za),window.addEventListener("touchmove",Mm,za),window.addEventListener("touchend",yi,za),window.addEventListener("touchcancel",yi,za)}function Hu(e,t){var r=Number(e);return isNaN(r)?t:r}function Lm(){var e=/^Apple/.test(navigator.vendor)&&typeof window.orientation=="number",t=e&&Math.abs(window.orientation)===90,r=e?Math[t?"max":"min"](screen.width,screen.height):screen.width,i=Math.min(window.innerWidth,document.documentElement.clientWidth,r)||r;return i}function Pm(){function e(){var t=__uniConfig.globalStyle||{},r=Hu(t.rpxCalcMaxDeviceWidth,960),i=Hu(t.rpxCalcBaseDeviceWidth,375),a=Lm();a=a<=r?a:i,document.documentElement.style.fontSize=a/23.4375+"px"}e(),document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e),window.addEventListener("resize",e)}function Nm(){Pm(),Rm()}var Dm=pa,Bm=function(e,t){return!!e&&Dm(function(){t?e.call(null,function(){},1):e.call(null)})},Fo=uo,$m=Yl,Wu=iu,Vu=pa,zo=[].sort,ju=[1,2,3];Fo(Fo.P+Fo.F*(Vu(function(){ju.sort(void 0)})||!Vu(function(){ju.sort(null)})||!Bm(zo)),"Array",{sort:function(t){return t===void 0?zo.call(Wu(this)):zo.call(Wu(this),$m(t))}});var Rt;class Fm{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.active=!0,this.effects=[],this.cleanups=[],!t&&Rt&&(this.parent=Rt,this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}run(t){if(this.active)try{return Rt=this,t()}finally{Rt=this.parent}}on(){Rt=this}off(){Rt=this.parent}stop(t){if(this.active){var r,i;for(r=0,i=this.effects.length;r1&&arguments[1]!==void 0?arguments[1]:Rt;t&&t.active&&t.effects.push(e)}var Uo=e=>{var t=new Set(e);return t.w=0,t.n=0,t},Yu=e=>(e.w&Vt)>0,qu=e=>(e.n&Vt)>0,Um=e=>{var{deps:t}=e;if(t.length)for(var r=0;r{var{deps:t}=e;if(t.length){for(var r=0,i=0;i1&&arguments[1]!==void 0?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;this.fn=t,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,zm(this,i)}run(){if(!this.active)return this.fn();for(var t=wt,r=jt;t;){if(t===this)return;t=t.parent}try{return this.parent=wt,wt=this,jt=!0,Vt=1<<++Si,Si<=Wo?Um(this):Xu(this),this.fn()}finally{Si<=Wo&&Hm(this),Vt=1<<--Si,wt=this.parent,jt=r,this.parent=void 0}}stop(){this.active&&(Xu(this),this.onStop&&this.onStop(),this.active=!1)}}function Xu(e){var{deps:t}=e;if(t.length){for(var r=0;r{(v==="length"||v>=i)&&s.push(f)});else switch(r!==void 0&&s.push(o.get(r)),t){case"add":ne(e)?To(r)&&s.push(o.get("length")):(s.push(o.get(cr)),hi(e)&&s.push(o.get(Vo)));break;case"delete":ne(e)||(s.push(o.get(cr)),hi(e)&&s.push(o.get(Vo)));break;case"set":hi(e)&&s.push(o.get(cr));break}if(s.length===1)s[0]&&Yo(s[0]);else{var u=[];for(var l of s)l&&u.push(...l);Yo(Uo(u))}}}function Yo(e,t){for(var r of ne(e)?e:[...e])(r!==wt||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}var Wm=Aa("__proto__,__v_isRef,__isVue"),Gu=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(So)),Vm=qo(),jm=qo(!1,!0),Ym=qo(!0),Ju=qm();function qm(){var e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(){for(var r=me(this),i=0,a=this.length;i{e[t]=function(){Fr();for(var r=arguments.length,i=new Array(r),a=0;a0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return function(i,a,n){if(a==="__v_isReactive")return!e;if(a==="__v_isReadonly")return e;if(a==="__v_isShallow")return t;if(a==="__v_raw"&&n===(e?t?u0:lf:t?sf:of).get(i))return i;var o=ne(i);if(!e&&o&&re(Ju,a))return Reflect.get(Ju,a,n);var s=Reflect.get(i,a,n);if((So(a)?Gu.has(a):Wm(a))||(e||Je(i,"get",a),t))return s;if(Fe(s)){var u=!o||!To(a);return u?s.value:s}return We(s)?e?uf(s):Ae(s):s}}var Xm=Qu(),Zm=Qu(!0);function Qu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return function(r,i,a,n){var o=r[i];if(Ei(o)&&Fe(o)&&!Fe(a))return!1;if(!e&&!Ei(a)&&(ff(a)||(a=me(a),o=me(o)),!ne(r)&&Fe(o)&&!Fe(a)))return o.value=a,!0;var s=ne(r)&&To(i)?Number(i)e,Ua=e=>Reflect.getPrototypeOf(e);function Ha(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e=e.__v_raw;var a=me(e),n=me(t);t!==n&&!r&&Je(a,"get",t),!r&&Je(a,"get",n);var{has:o}=Ua(a),s=i?Xo:r?Go:Ti;if(o.call(a,t))return s(e.get(t));if(o.call(a,n))return s(e.get(n));e!==a&&e.get(t)}function Wa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.__v_raw,i=me(r),a=me(e);return e!==a&&!t&&Je(i,"has",e),!t&&Je(i,"has",a),e===a?r.has(e):r.has(e)||r.has(a)}function Va(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e=e.__v_raw,!t&&Je(me(e),"iterate",cr),Reflect.get(e,"size",e)}function tf(e){e=me(e);var t=me(this),r=Ua(t),i=r.has.call(t,e);return i||(t.add(e),Lt(t,"add",e,e)),this}function rf(e,t){t=me(t);var r=me(this),{has:i,get:a}=Ua(r),n=i.call(r,e);n||(e=me(e),n=i.call(r,e));var o=a.call(r,e);return r.set(e,t),n?pi(t,o)&&Lt(r,"set",e,t):Lt(r,"add",e,t),this}function af(e){var t=me(this),{has:r,get:i}=Ua(t),a=r.call(t,e);a||(e=me(e),a=r.call(t,e)),i&&i.call(t,e);var n=t.delete(e);return a&&Lt(t,"delete",e,void 0),n}function nf(){var e=me(this),t=e.size!==0,r=e.clear();return t&&Lt(e,"clear",void 0,void 0),r}function ja(e,t){return function(i,a){var n=this,o=n.__v_raw,s=me(o),u=t?Xo:e?Go:Ti;return!e&&Je(s,"iterate",cr),o.forEach((l,f)=>i.call(a,u(l),u(f),n))}}function Ya(e,t,r){return function(){var i=this.__v_raw,a=me(i),n=hi(a),o=e==="entries"||e===Symbol.iterator&&n,s=e==="keys"&&n,u=i[e](...arguments),l=r?Xo:t?Go:Ti;return!t&&Je(a,"iterate",s?Vo:cr),{next(){var{value:f,done:v}=u.next();return v?{value:f,done:v}:{value:o?[l(f[0]),l(f[1])]:l(f),done:v}},[Symbol.iterator](){return this}}}}function Yt(e){return function(){return e==="delete"?!1:this}}function t0(){var e={get(n){return Ha(this,n)},get size(){return Va(this)},has:Wa,add:tf,set:rf,delete:af,clear:nf,forEach:ja(!1,!1)},t={get(n){return Ha(this,n,!1,!0)},get size(){return Va(this)},has:Wa,add:tf,set:rf,delete:af,clear:nf,forEach:ja(!1,!0)},r={get(n){return Ha(this,n,!0)},get size(){return Va(this,!0)},has(n){return Wa.call(this,n,!0)},add:Yt("add"),set:Yt("set"),delete:Yt("delete"),clear:Yt("clear"),forEach:ja(!0,!1)},i={get(n){return Ha(this,n,!0,!0)},get size(){return Va(this,!0)},has(n){return Wa.call(this,n,!0)},add:Yt("add"),set:Yt("set"),delete:Yt("delete"),clear:Yt("clear"),forEach:ja(!0,!0)},a=["keys","values","entries",Symbol.iterator];return a.forEach(n=>{e[n]=Ya(n,!1,!1),r[n]=Ya(n,!0,!1),t[n]=Ya(n,!1,!0),i[n]=Ya(n,!0,!0)}),[e,r,t,i]}var[r0,i0,a0,n0]=t0();function Zo(e,t){var r=t?e?n0:a0:e?i0:r0;return(i,a,n)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(re(r,a)&&a in i?r:i,a,n)}var o0={get:Zo(!1,!1)},s0={get:Zo(!1,!0)},l0={get:Zo(!0,!1)},of=new WeakMap,sf=new WeakMap,lf=new WeakMap,u0=new WeakMap;function f0(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function c0(e){return e.__v_skip||!Object.isExtensible(e)?0:f0(Eo(e))}function Ae(e){return Ei(e)?e:Ko(e,!1,ef,o0,of)}function v0(e){return Ko(e,!1,e0,s0,sf)}function uf(e){return Ko(e,!0,Qm,l0,lf)}function Ko(e,t,r,i,a){if(!We(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;var n=a.get(e);if(n)return n;var o=c0(e);if(o===0)return e;var s=new Proxy(e,o===2?i:r);return a.set(e,s),s}function Ur(e){return Ei(e)?Ur(e.__v_raw):!!(e&&e.__v_isReactive)}function Ei(e){return!!(e&&e.__v_isReadonly)}function ff(e){return!!(e&&e.__v_isShallow)}function cf(e){return Ur(e)||Ei(e)}function me(e){var t=e&&e.__v_raw;return t?me(t):e}function qa(e){return La(e,"__v_skip",!0),e}var Ti=e=>We(e)?Ae(e):e,Go=e=>We(e)?uf(e):e;function vf(e){jt&&wt&&(e=me(e),Ku(e.dep||(e.dep=Uo())))}function df(e,t){e=me(e),e.dep&&Yo(e.dep)}function Fe(e){return!!(e&&e.__v_isRef===!0)}function U(e){return hf(e,!1)}function Jo(e){return hf(e,!0)}function hf(e,t){return Fe(e)?e:new d0(e,t)}class d0{constructor(t,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?t:me(t),this._value=r?t:Ti(t)}get value(){return vf(this),this._value}set value(t){t=this.__v_isShallow?t:me(t),pi(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Ti(t),df(this))}}function h0(e){return Fe(e)?e.value:e}var g0={get:(e,t,r)=>h0(Reflect.get(e,t,r)),set:(e,t,r,i)=>{var a=e[t];return Fe(a)&&!Fe(r)?(a.value=r,!0):Reflect.set(e,t,r,i)}};function gf(e){return Ur(e)?e:new Proxy(e,g0)}class p0{constructor(t,r,i,a){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new jo(t,()=>{this._dirty||(this._dirty=!0,df(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=i}get value(){var t=me(this);return vf(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function m0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i,a,n=oe(e);n?(i=e,a=pt):(i=e.get,a=e.set);var o=new p0(i,a,n||!a,r);return o}function qt(e,t,r,i){var a;try{a=i?e(...i):e()}catch(n){Xa(n,t,r)}return a}function ft(e,t,r,i){if(oe(e)){var a=qt(e,t,r,i);return a&&yu(a)&&a.catch(s=>{Xa(s,t,r)}),a}for(var n=[],o=0;o>>1,a=Ii(Qe[i]);aPt&&Qe.splice(t,1)}function bf(e,t,r,i){ne(e)?r.push(...e):(!t||!t.includes(e,e.allowRecurse?i+1:i))&&r.push(e),_f()}function x0(e){bf(e,Oi,Ci,Hr)}function y0(e){bf(e,Xt,Ai,Wr)}function rs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Ci.length){for(ts=t,Oi=[...new Set(Ci)],Ci.length=0,Hr=0;HrIi(r)-Ii(i)),Wr=0;Wre.id==null?1/0:e.id;function xf(e){Qo=!1,Za=!0,rs(e),Qe.sort((i,a)=>Ii(i)-Ii(a));var t=pt;try{for(Pt=0;Pt2?i-2:0),n=2;nb.trim()):f&&(o=a.map(Tp))}var m,d=r[m=Co(t)]||r[m=Co(Ht(t))];!d&&s&&(d=r[m=Co(Ke(t))]),d&&ft(d,e,6,o);var _=r[m+"Once"];if(_){if(!e.emitted)e.emitted={};else if(e.emitted[m])return;e.emitted[m]=!0,ft(_,e,6,o)}}function yf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=t.emitsCache,a=i.get(e);if(a!==void 0)return a;var n=e.emits,o={},s=!1;if(!oe(e)){var u=l=>{var f=yf(l,t,!0);f&&(s=!0,ve(o,f))};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!n&&!s?(i.set(e,null),null):(ne(n)?n.forEach(l=>o[l]=null):ve(o,n),i.set(e,o),o)}function is(e,t){return!e||!Ia(t)?!1:(t=t.slice(2).replace(/Once$/,""),re(e,t[0].toLowerCase()+t.slice(1))||re(e,Ke(t))||re(e,t))}var ct=null,Sf=null;function Ka(e){var t=ct;return ct=e,Sf=e&&e.type.__scopeId||null,t}function E0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ct;if(!t||e._n)return e;var r=function(){r._d&&qf(-1);var i=Ka(t),a=e(...arguments);return Ka(i),r._d&&qf(1),a};return r._n=!0,r._c=!0,r._d=!0,r}function VT(){}function as(e){var{type:t,vnode:r,proxy:i,withProxy:a,props:n,propsOptions:[o],slots:s,attrs:u,emit:l,render:f,renderCache:v,data:m,setupState:d,ctx:_,inheritAttrs:b}=e,x,p,g=Ka(e);try{if(r.shapeFlag&4){var c=a||i;x=yt(f.call(c,c,v,n,d,m,_)),p=u}else{var h=t;x=yt(h.length>1?h(n,{attrs:u,slots:s,emit:l}):h(n,null)),p=t.props?u:T0(u)}}catch(E){Xa(E,e,1),x=I(jr)}var w=x;if(p&&b!==!1){var y=Object.keys(p),{shapeFlag:T}=w;y.length&&T&(1|6)&&(o&&y.some(xo)&&(p=C0(p,o)),w=Ri(w,p))}return r.dirs&&(w.dirs=w.dirs?w.dirs.concat(r.dirs):r.dirs),r.transition&&(w.transition=r.transition),x=w,Ka(g),x}var T0=e=>{var t;for(var r in e)(r==="class"||r==="style"||Ia(r))&&((t||(t={}))[r]=e[r]);return t},C0=(e,t)=>{var r={};for(var i in e)(!xo(i)||!(i.slice(9)in t))&&(r[i]=e[i]);return r};function O0(e,t,r){var{props:i,children:a,component:n}=e,{props:o,children:s,patchFlag:u}=t,l=n.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&u>=0){if(u&1024)return!0;if(u&16)return i?Ef(i,o,l):!!o;if(u&8)for(var f=t.dynamicProps,v=0;ve.__isSuspense;function k0(e,t){t&&t.pendingBranch?ne(e)?t.effects.push(...e):t.effects.push(e):y0(e)}function ze(e,t){if(Ue){var r=Ue.provides,i=Ue.parent&&Ue.parent.provides;i===r&&(r=Ue.provides=Object.create(i)),r[e]=t}}function _e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=Ue||ct;if(i){var a=i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides;if(a&&e in a)return a[e];if(arguments.length>1)return r&&oe(t)?t.call(i.proxy):t}}function M0(e,t){return ns(e,null,t)}var Tf={};function H(e,t,r){return ns(e,t,r)}function ns(e,t){var{immediate:r,deep:i,flush:a,onTrack:n,onTrigger:o}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xe,s=Ue,u,l=!1,f=!1;if(Fe(e)?(u=()=>e.value,l=ff(e)):Ur(e)?(u=()=>e,i=!0):ne(e)?(f=!0,l=e.some(Ur),u=()=>e.map(g=>{if(Fe(g))return g.value;if(Ur(g))return vr(g);if(oe(g))return qt(g,s,2)})):oe(e)?t?u=()=>qt(e,s,2):u=()=>{if(!(s&&s.isUnmounted))return m&&m(),ft(e,s,3,[d])}:u=pt,t&&i){var v=u;u=()=>vr(v())}var m,d=g=>{m=p.onStop=()=>{qt(g,s,4)}};if(Li)return d=pt,t?r&&ft(t,s,3,[u(),f?[]:void 0,d]):u(),pt;var _=f?[]:Tf,b=()=>{if(!!p.active)if(t){var g=p.run();(i||l||(f?g.some((c,h)=>pi(c,_[h])):pi(g,_)))&&(m&&m(),ft(t,s,3,[g,_===Tf?void 0:_,d]),_=g)}else p.run()};b.allowRecurse=!!t;var x;a==="sync"?x=b:a==="post"?x=()=>qe(b,s&&s.suspense):x=()=>{!s||s.isMounted?x0(b):b()};var p=new jo(u,x);return t?r?b():_=p.run():a==="post"?qe(p.run.bind(p),s&&s.suspense):p.run(),()=>{p.stop(),s&&s.scope&&yo(s.scope.effects,p)}}function R0(e,t,r){var i=this.proxy,a=ye(e)?e.includes(".")?Cf(i,e):()=>i[e]:e.bind(i,i),n;oe(t)?n=t:(n=t.handler,r=t);var o=Ue;Yr(this);var s=ns(a,n.bind(i),r);return o?Yr(o):pr(),s}function Cf(e,t){var r=t.split(".");return()=>{for(var i=e,a=0;a{vr(a,t)});else if(mt(e))for(var i in e)vr(e[i],t);return e}function L0(e){return oe(e)?{setup:e,name:e.name}:e}var os=e=>!!e.type.__asyncLoader,Of=e=>e.type.__isKeepAlive;function ss(e,t){Af(e,"a",t)}function P0(e,t){Af(e,"da",t)}function Af(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ue,i=e.__wdc||(e.__wdc=()=>{for(var n=r;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Ga(t,i,r),r)for(var a=r.parent;a&&a.parent;)Of(a.parent.vnode)&&N0(i,t,r,a),a=a.parent}function N0(e,t,r,i){var a=Ga(t,e,i,!0);Zt(()=>{yo(i[t],a)},r)}function Ga(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ue,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r){var a=r[e]||(r[e]=[]),n=t.__weh||(t.__weh=function(){if(!r.isUnmounted){Fr(),Yr(r);for(var o=arguments.length,s=new Array(o),u=0;ufunction(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;return(!Li||e==="sp")&&Ga(e,t,r)},If=Nt("bm"),Re=Nt("m"),D0=Nt("bu"),B0=Nt("u"),Ce=Nt("bum"),Zt=Nt("um"),$0=Nt("sp"),F0=Nt("rtg"),z0=Nt("rtc");function U0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;Ga("ec",e,t)}var ls=!0;function H0(e){var t=Rf(e),r=e.proxy,i=e.ctx;ls=!1,t.beforeCreate&&kf(t.beforeCreate,e,"bc");var{data:a,computed:n,methods:o,watch:s,provide:u,inject:l,created:f,beforeMount:v,mounted:m,beforeUpdate:d,updated:_,activated:b,deactivated:x,beforeDestroy:p,beforeUnmount:g,destroyed:c,unmounted:h,render:w,renderTracked:y,renderTriggered:T,errorCaptured:E,serverPrefetch:O,expose:N,inheritAttrs:R,components:V,directives:ue,filters:M}=t,B=null;if(l&&W0(l,i,B,e.appContext.config.unwrapInjectedRef),o)for(var Q in o){var te=o[Q];oe(te)&&(i[Q]=te.bind(r))}if(a&&function(){var ie=a.call(r,r);We(ie)&&(e.data=Ae(ie))}(),ls=!0,n){var W=function(ie){var le=n[ie],Ie=oe(le)?le.bind(r,r):oe(le.get)?le.get.bind(r,r):pt,ke=!oe(le)&&oe(le.set)?le.set.bind(r):pt,nt=ee({get:Ie,set:ke});Object.defineProperty(i,ie,{enumerable:!0,configurable:!0,get:()=>nt.value,set:lr=>nt.value=lr})};for(var G in n)W(G)}if(s)for(var ae in s)Mf(s[ae],i,r,ae);if(u){var Se=oe(u)?u.call(r):u;Reflect.ownKeys(Se).forEach(ie=>{ze(ie,Se[ie])})}f&&kf(f,e,"c");function se(ie,le){ne(le)?le.forEach(Ie=>ie(Ie.bind(r))):le&&ie(le.bind(r))}if(se(If,v),se(Re,m),se(D0,d),se(B0,_),se(ss,b),se(P0,x),se(U0,E),se(z0,y),se(F0,T),se(Ce,g),se(Zt,h),se($0,O),ne(N))if(N.length){var K=e.exposed||(e.exposed={});N.forEach(ie=>{Object.defineProperty(K,ie,{get:()=>r[ie],set:le=>r[ie]=le})})}else e.exposed||(e.exposed={});w&&e.render===pt&&(e.render=w),R!=null&&(e.inheritAttrs=R),V&&(e.components=V),ue&&(e.directives=ue)}function W0(e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;ne(e)&&(e=us(e));var i=function(n){var o=e[n],s=void 0;We(o)?"default"in o?s=_e(o.from||n,o.default,!0):s=_e(o.from||n):s=_e(o),Fe(s)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:u=>s.value=u}):t[n]=s};for(var a in e)i(a)}function kf(e,t,r){ft(ne(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,r)}function Mf(e,t,r,i){var a=i.includes(".")?Cf(r,i):()=>r[i];if(ye(e)){var n=t[e];oe(n)&&H(a,n)}else if(oe(e))H(a,e.bind(r));else if(We(e))if(ne(e))e.forEach(s=>Mf(s,t,r,i));else{var o=oe(e.handler)?e.handler.bind(r):t[e.handler];oe(o)&&H(a,o,e)}}function Rf(e){var t=e.type,{mixins:r,extends:i}=t,{mixins:a,optionsCache:n,config:{optionMergeStrategies:o}}=e.appContext,s=n.get(t),u;return s?u=s:!a.length&&!r&&!i?u=t:(u={},a.length&&a.forEach(l=>Ja(u,l,o,!0)),Ja(u,t,o)),n.set(t,u),u}function Ja(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,{mixins:a,extends:n}=t;n&&Ja(e,n,r,!0),a&&a.forEach(u=>Ja(e,u,r,!0));for(var o in t)if(!(i&&o==="expose")){var s=V0[o]||r&&r[o];e[o]=s?s(e[o],t[o]):t[o]}return e}var V0={data:Lf,props:dr,emits:dr,methods:dr,computed:dr,beforeCreate:je,created:je,beforeMount:je,mounted:je,beforeUpdate:je,updated:je,beforeDestroy:je,beforeUnmount:je,destroyed:je,unmounted:je,activated:je,deactivated:je,errorCaptured:je,serverPrefetch:je,components:dr,directives:dr,watch:Y0,provide:Lf,inject:j0};function Lf(e,t){return t?e?function(){return ve(oe(e)?e.call(this,this):e,oe(t)?t.call(this,this):t)}:t:e}function j0(e,t){return dr(us(e),us(t))}function us(e){if(ne(e)){for(var t={},r=0;r3&&arguments[3]!==void 0?arguments[3]:!1,a={},n={};La(n,en,1),e.propsDefaults=Object.create(null),Pf(e,t,a,n);for(var o in e.propsOptions[0])o in a||(a[o]=void 0);r?e.props=i?a:v0(a):e.type.props?e.props=a:e.props=n,e.attrs=n}function X0(e,t,r,i){var{props:a,attrs:n,vnode:{patchFlag:o}}=e,s=me(a),[u]=e.propsOptions,l=!1;if((i||o>0)&&!(o&16)){if(o&8)for(var f=e.vnode.dynamicProps,v=0;v2&&arguments[2]!==void 0?arguments[2]:!1,i=t.propsCache,a=i.get(e);if(a)return a;var n=e.props,o={},s=[],u=!1;if(!oe(e)){var l=c=>{u=!0;var[h,w]=Nf(c,t,!0);ve(o,h),w&&s.push(...w)};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}if(!n&&!u)return i.set(e,di),di;if(ne(n))for(var f=0;f-1,b[1]=p<0||x-1||re(b,"default"))&&s.push(d)}}}var g=[o,s];return i.set(e,g),g}function Df(e){return e[0]!=="$"}function Bf(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function $f(e,t){return Bf(e)===Bf(t)}function Ff(e,t){return ne(t)?t.findIndex(r=>$f(r,e)):oe(t)&&$f(t,e)?0:-1}var zf=e=>e[0]==="_"||e==="$stable",cs=e=>ne(e)?e.map(yt):[yt(e)],Z0=(e,t,r)=>{var i=E0(function(){return cs(t(...arguments))},r);return i._c=!1,i},Uf=(e,t,r)=>{var i=e._ctx;for(var a in e)if(!zf(a)){var n=e[a];oe(n)?t[a]=Z0(a,n,i):n!=null&&function(){var o=cs(n);t[a]=()=>o}()}},Hf=(e,t)=>{var r=cs(t);e.slots.default=()=>r},K0=(e,t)=>{if(e.vnode.shapeFlag&32){var r=t._;r?(e.slots=me(t),La(t,"_",r)):Uf(t,e.slots={})}else e.slots={},t&&Hf(e,t);La(e.slots,en,1)},G0=(e,t,r)=>{var{vnode:i,slots:a}=e,n=!0,o=xe;if(i.shapeFlag&32){var s=t._;s?r&&s===1?n=!1:(ve(a,t),!r&&s===1&&delete a._):(n=!t.$stable,Uf(t,a)),o=t}else t&&(Hf(e,t),o={default:1});if(n)for(var u in a)!zf(u)&&!(u in o)&&delete a[u]};function ki(e,t){var r=ct;if(r===null)return e;for(var i=r.proxy,a=e.dirs||(e.dirs=[]),n=0;n1&&arguments[1]!==void 0?arguments[1]:null;a!=null&&!We(a)&&(a=null);var n=Wf(),o=new Set,s=!1,u=n.app={_uid:J0++,_component:i,_props:a,_container:null,_context:n,_instance:null,version:b_,get config(){return n.config},set config(l){},use(l){for(var f=arguments.length,v=new Array(f>1?f-1:0),m=1;m4&&arguments[4]!==void 0?arguments[4]:!1;if(ne(e)){e.forEach((b,x)=>vs(b,t&&(ne(t)?t[x]:t),r,i,a));return}if(!(os(i)&&!a)){var n=i.shapeFlag&4?ms(i.component)||i.component.proxy:i.el,o=a?null:n,{i:s,r:u}=e,l=t&&t.r,f=s.refs===xe?s.refs={}:s.refs,v=s.setupState;if(l!=null&&l!==u&&(ye(l)?(f[l]=null,re(v,l)&&(v[l]=null)):Fe(l)&&(l.value=null)),oe(u))qt(u,s,12,[o,f]);else{var m=ye(u),d=Fe(u);if(m||d){var _=()=>{if(e.f){var b=m?f[u]:u.value;a?ne(b)&&yo(b,n):ne(b)?b.includes(n)||b.push(n):m?f[u]=[n]:(u.value=[n],e.k&&(f[e.k]=u.value))}else m?(f[u]=o,re(v,u)&&(v[u]=o)):Fe(u)&&(u.value=o,e.k&&(f[e.k]=o))};o?(_.id=-1,qe(_,r)):_()}}}}var qe=k0;function e_(e){return t_(e)}function t_(e,t){var r=Cp();r.__VUE__=!0;var{insert:i,remove:a,patchProp:n,createElement:o,createText:s,createComment:u,setText:l,setElementText:f,parentNode:v,nextSibling:m,setScopeId:d=pt,cloneNode:_,insertStaticContent:b}=e,x=function(S,C,k){var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,j=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,$=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,z=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!!C.dynamicChildren;if(S!==C){S&&!Mi(S,C)&&(L=nt(S),K(S,P,F,!0),S=null),C.patchFlag===-2&&(z=!1,C.dynamicChildren=null);var{type:D,ref:J,shapeFlag:Z}=C;switch(D){case ds:p(S,C,k,L);break;case jr:g(S,C,k,L);break;case hs:S==null&&c(C,k,L,j);break;case xt:ue(S,C,k,L,P,F,j,$,z);break;default:Z&1?y(S,C,k,L,P,F,j,$,z):Z&6?M(S,C,k,L,P,F,j,$,z):(Z&64||Z&128)&&D.process(S,C,k,L,P,F,j,$,z,Ne)}J!=null&&P&&vs(J,S&&S.ref,F,C||S,!C)}},p=(S,C,k,L)=>{if(S==null)i(C.el=s(C.children),k,L);else{var P=C.el=S.el;C.children!==S.children&&l(P,C.children)}},g=(S,C,k,L)=>{S==null?i(C.el=u(C.children||""),k,L):C.el=S.el},c=(S,C,k,L)=>{[S.el,S.anchor]=b(S.children,C,k,L,S.el,S.anchor)},h=(S,C,k)=>{for(var{el:L,anchor:P}=S,F;L&&L!==P;)F=m(L),i(L,C,k),L=F;i(P,C,k)},w=S=>{for(var{el:C,anchor:k}=S,L;C&&C!==k;)L=m(C),a(C),C=L;a(k)},y=(S,C,k,L,P,F,j,$,z)=>{j=j||C.type==="svg",S==null?T(C,k,L,P,F,j,$,z):N(S,C,P,F,j,$,z)},T=(S,C,k,L,P,F,j,$)=>{var z,D,{type:J,props:Z,shapeFlag:X,transition:ce,patchFlag:Be,dirs:Te}=S;if(S.el&&_!==void 0&&Be===-1)z=S.el=_(S.el);else{if(z=S.el=o(S.type,F,Z&&Z.is,Z),X&8?f(z,S.children):X&16&&O(S.children,z,null,L,P,F&&J!=="foreignObject",j,$),Te&&hr(S,null,L,"created"),Z){for(var A in Z)A!=="value"&&!ka(A)&&n(z,A,null,Z[A],F,S.children,L,P,ke);"value"in Z&&n(z,"value",null,Z.value),(D=Z.onVnodeBeforeMount)&&St(D,L,S)}E(z,S,S.scopeId,j,L)}Object.defineProperty(z,"__vueParentComponent",{value:L,enumerable:!1}),Te&&hr(S,null,L,"beforeMount");var Y=(!P||P&&!P.pendingBranch)&&ce&&!ce.persisted;Y&&ce.beforeEnter(z),i(z,C,k),((D=Z&&Z.onVnodeMounted)||Y||Te)&&qe(()=>{D&&St(D,L,S),Y&&ce.enter(z),Te&&hr(S,null,L,"mounted")},P)},E=(S,C,k,L,P)=>{if(k&&d(S,k),L)for(var F=0;F8&&arguments[8]!==void 0?arguments[8]:0,D=z;D{var $=C.el=S.el,{patchFlag:z,dynamicChildren:D,dirs:J}=C;z|=S.patchFlag&16;var Z=S.props||xe,X=C.props||xe,ce;k&&gr(k,!1),(ce=X.onVnodeBeforeUpdate)&&St(ce,k,C,S),J&&hr(C,S,k,"beforeUpdate"),k&&gr(k,!0);var Be=P&&C.type!=="foreignObject";if(D?R(S.dynamicChildren,D,$,k,L,Be,F):j||G(S,C,$,null,k,L,Be,F,!1),z>0){if(z&16)V($,C,Z,X,k,L,P);else if(z&2&&Z.class!==X.class&&n($,"class",null,X.class,P),z&4&&n($,"style",Z.style,X.style,P),z&8)for(var Te=C.dynamicProps,A=0;A{ce&&St(ce,k,C,S),J&&hr(C,S,k,"updated")},L)},R=(S,C,k,L,P,F,j)=>{for(var $=0;${if(k!==L){for(var $ in L)if(!ka($)){var z=L[$],D=k[$];z!==D&&$!=="value"&&n(S,$,D,z,j,C.children,P,F,ke)}if(k!==xe)for(var J in k)!ka(J)&&!(J in L)&&n(S,J,k[J],null,j,C.children,P,F,ke);"value"in L&&n(S,"value",k.value,L.value)}},ue=(S,C,k,L,P,F,j,$,z)=>{var D=C.el=S?S.el:s(""),J=C.anchor=S?S.anchor:s(""),{patchFlag:Z,dynamicChildren:X,slotScopeIds:ce}=C;ce&&($=$?$.concat(ce):ce),S==null?(i(D,k,L),i(J,k,L),O(C.children,k,J,P,F,j,$,z)):Z>0&&Z&64&&X&&S.dynamicChildren?(R(S.dynamicChildren,X,k,P,F,j,$),(C.key!=null||P&&C===P.subTree)&&Vf(S,C,!0)):G(S,C,k,J,P,F,j,$,z)},M=(S,C,k,L,P,F,j,$,z)=>{C.slotScopeIds=$,S==null?C.shapeFlag&512?P.ctx.activate(C,k,L,j,z):B(C,k,L,P,F,j,z):Q(S,C,z)},B=(S,C,k,L,P,F,j)=>{var $=S.component=v_(S,L,P);if(Of(S)&&($.ctx.renderer=Ne),d_($),$.asyncDep){if(P&&P.registerDep($,te),!S.el){var z=$.subTree=I(jr);g(null,z,C,k)}return}te($,S,C,k,P,F,j)},Q=(S,C,k)=>{var L=C.component=S.component;if(O0(S,C,k))if(L.asyncDep&&!L.asyncResolved){W(L,C,k);return}else L.next=C,w0(L.update),L.update();else C.component=S.component,C.el=S.el,L.vnode=C},te=(S,C,k,L,P,F,j)=>{var $=()=>{if(S.isMounted){var{next:fe,bu:$e,u:Ze,parent:De,vnode:gt}=S,ur=fe,Mt;gr(S,!1),fe?(fe.el=gt.el,W(S,fe,j)):fe=gt,$e&&Oo($e),(Mt=fe.props&&fe.props.onVnodeBeforeUpdate)&&St(Mt,De,fe,gt),gr(S,!0);var Lr=as(S),zt=S.subTree;S.subTree=Lr,x(zt,Lr,v(zt.el),nt(zt),S,P,F),fe.el=Lr.el,ur===null&&A0(S,Lr.el),Ze&&qe(Ze,P),(Mt=fe.props&&fe.props.onVnodeUpdated)&&qe(()=>St(Mt,De,fe,gt),P)}else{var J,{el:Z,props:X}=C,{bm:ce,m:Be,parent:Te}=S,A=os(C);if(gr(S,!1),ce&&Oo(ce),!A&&(J=X&&X.onVnodeBeforeMount)&&St(J,Te,C),gr(S,!0),Z&&ca){var Y=()=>{S.subTree=as(S),ca(Z,S.subTree,S,P,null)};A?C.type.__asyncLoader().then(()=>!S.isUnmounted&&Y()):Y()}else{var q=S.subTree=as(S);x(null,q,k,L,S,P,F),C.el=q.el}if(Be&&qe(Be,P),!A&&(J=X&&X.onVnodeMounted)){var he=C;qe(()=>St(J,Te,he),P)}C.shapeFlag&256&&S.a&&qe(S.a,P),S.isMounted=!0,C=k=L=null}},z=S.effect=new jo($,()=>mf(S.update),S.scope),D=S.update=z.run.bind(z);D.id=S.uid,gr(S,!0),D()},W=(S,C,k)=>{C.component=S;var L=S.vnode.props;S.vnode=C,S.next=null,X0(S,C.props,L,k),G0(S,C.children,k),Fr(),rs(void 0,S.update),zr()},G=function(S,C,k,L,P,F,j,$){var z=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1,D=S&&S.children,J=S?S.shapeFlag:0,Z=C.children,{patchFlag:X,shapeFlag:ce}=C;if(X>0){if(X&128){Se(D,Z,k,L,P,F,j,$,z);return}else if(X&256){ae(D,Z,k,L,P,F,j,$,z);return}}ce&8?(J&16&&ke(D,P,F),Z!==D&&f(k,Z)):J&16?ce&16?Se(D,Z,k,L,P,F,j,$,z):ke(D,P,F,!0):(J&8&&f(k,""),ce&16&&O(Z,k,L,P,F,j,$,z))},ae=(S,C,k,L,P,F,j,$,z)=>{S=S||di,C=C||di;var D=S.length,J=C.length,Z=Math.min(D,J),X;for(X=0;XJ?ke(S,P,F,!0,!1,Z):O(C,k,L,P,F,j,$,z,Z)},Se=(S,C,k,L,P,F,j,$,z)=>{for(var D=0,J=C.length,Z=S.length-1,X=J-1;D<=Z&&D<=X;){var ce=S[D],Be=C[D]=z?Kt(C[D]):yt(C[D]);if(Mi(ce,Be))x(ce,Be,k,null,P,F,j,$,z);else break;D++}for(;D<=Z&&D<=X;){var Te=S[Z],A=C[X]=z?Kt(C[X]):yt(C[X]);if(Mi(Te,A))x(Te,A,k,null,P,F,j,$,z);else break;Z--,X--}if(D>Z){if(D<=X)for(var Y=X+1,q=YX)for(;D<=Z;)K(S[D],P,F,!0),D++;else{var he=D,fe=D,$e=new Map;for(D=fe;D<=X;D++){var Ze=C[D]=z?Kt(C[D]):yt(C[D]);Ze.key!=null&&$e.set(Ze.key,D)}var De,gt=0,ur=X-fe+1,Mt=!1,Lr=0,zt=new Array(ur);for(D=0;D=ur){K(fi,P,F,!0);continue}var Pr=void 0;if(fi.key!=null)Pr=$e.get(fi.key);else for(De=fe;De<=X;De++)if(zt[De-fe]===0&&Mi(fi,C[De])){Pr=De;break}Pr===void 0?K(fi,P,F,!0):(zt[Pr-fe]=D+1,Pr>=Lr?Lr=Pr:Mt=!0,x(fi,C[Pr],k,null,P,F,j,$,z),gt++)}var Ph=Mt?r_(zt):di;for(De=Ph.length-1,D=ur-1;D>=0;D--){var Pl=fe+D,Nh=C[Pl],Dh=Pl+14&&arguments[4]!==void 0?arguments[4]:null,{el:F,type:j,transition:$,children:z,shapeFlag:D}=S;if(D&6){se(S.component.subTree,C,k,L);return}if(D&128){S.suspense.move(C,k,L);return}if(D&64){j.move(S,C,k,Ne);return}if(j===xt){i(F,C,k);for(var J=0;J$.enter(F),P);else{var{leave:X,delayLeave:ce,afterLeave:Be}=$,Te=()=>i(F,C,k),A=()=>{X(F,()=>{Te(),Be&&Be()})};ce?ce(F,Te,A):A()}else i(F,C,k)},K=function(S,C,k){var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,{type:F,props:j,ref:$,children:z,dynamicChildren:D,shapeFlag:J,patchFlag:Z,dirs:X}=S;if($!=null&&vs($,null,k,S,!0),J&256){C.ctx.deactivate(S);return}var ce=J&1&&X,Be=!os(S),Te;if(Be&&(Te=j&&j.onVnodeBeforeUnmount)&&St(Te,C,S),J&6)Ie(S.component,k,L);else{if(J&128){S.suspense.unmount(k,L);return}ce&&hr(S,null,C,"beforeUnmount"),J&64?S.type.remove(S,C,k,P,Ne,L):D&&(F!==xt||Z>0&&Z&64)?ke(D,C,k,!1,!0):(F===xt&&Z&(128|256)||!P&&J&16)&&ke(z,C,k),L&&ie(S)}(Be&&(Te=j&&j.onVnodeUnmounted)||ce)&&qe(()=>{Te&&St(Te,C,S),ce&&hr(S,null,C,"unmounted")},k)},ie=S=>{var{type:C,el:k,anchor:L,transition:P}=S;if(C===xt){le(k,L);return}if(C===hs){w(S);return}var F=()=>{a(k),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(S.shapeFlag&1&&P&&!P.persisted){var{leave:j,delayLeave:$}=P,z=()=>j(k,F);$?$(S.el,F,z):z()}else F()},le=(S,C)=>{for(var k;S!==C;)k=m(S),a(S),S=k;a(C)},Ie=(S,C,k)=>{var{bum:L,scope:P,update:F,subTree:j,um:$}=S;L&&Oo(L),P.stop(),F&&(F.active=!1,K(j,S,C,k)),$&&qe($,C),qe(()=>{S.isUnmounted=!0},C),C&&C.pendingBranch&&!C.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===C.pendingId&&(C.deps--,C.deps===0&&C.resolve())},ke=function(S,C,k){for(var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,j=F;jS.shapeFlag&6?nt(S.component.subTree):S.shapeFlag&128?S.suspense.next():m(S.anchor||S.el),lr=(S,C,k)=>{if(S==null)C._vnode&&K(C._vnode,null,null,!0);else{var L=C.__vueParent;x(C._vnode||null,S,C,null,L,null,k)}C._vnode=S},Ne={p:x,um:K,m:se,r:ie,mt:B,mc:O,pc:G,pbc:R,n:nt,o:e},fa,ca;return t&&([fa,ca]=t(Ne)),{render:lr,hydrate:fa,createApp:Q0(lr,fa)}}function gr(e,t){var{effect:r,update:i}=e;r.allowRecurse=i.allowRecurse=t}function Vf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.children,a=t.children;if(ne(i)&&ne(a))for(var n=0;n>1,e[r[s]]0&&(t[i]=r[n-1]),r[n]=i)}}for(n=r.length,o=r[n-1];n-- >0;)r[n]=o,o=t[o];return r}var i_=e=>e.__isTeleport,a_=Symbol(),xt=Symbol(void 0),ds=Symbol(void 0),jr=Symbol(void 0),hs=Symbol(void 0),jf=null,Yf=1;function qf(e){Yf+=e}function Qa(e){return e?e.__v_isVNode===!0:!1}function Mi(e,t){return e.type===t.type&&e.key===t.key}var en="__vInternal",Xf=e=>{var{key:t}=e;return t!=null?t:null},tn=e=>{var{ref:t,ref_key:r,ref_for:i}=e;return t!=null?ye(t)||Fe(t)||oe(t)?{i:ct,r:t,k:r,f:!!i}:t:null};function n_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e===xt?0:1,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xf(t),ref:t&&tn(t),scopeId:Sf,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null};return s?(gs(u,r),n&128&&e.normalize(u)):r&&(u.shapeFlag|=ye(r)?8:16),Yf>0&&!o&&jf&&(u.patchFlag>0||n&6)&&u.patchFlag!==32&&jf.push(u),u}var I=o_;function o_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if((!e||e===a_)&&(e=jr),Qa(e)){var o=Ri(e,t,!0);return r&&gs(o,r),o}if(m_(e)&&(e=e.__vccOpts),t){t=s_(t);var{class:s,style:u}=t;s&&!ye(s)&&(t.class=wo(s)),We(u)&&(cf(u)&&!ne(u)&&(u=ve({},u)),t.style=bo(u))}var l=ye(e)?1:I0(e)?128:i_(e)?64:We(e)?4:oe(e)?2:0;return n_(e,t,r,i,a,l,n,!0)}function s_(e){return e?cf(e)||en in e?ve({},e):e:null}function Ri(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{props:i,ref:a,patchFlag:n,children:o}=e,s=t?et(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&Xf(s),ref:t&&t.ref?r&&a?ne(a)?a.concat(tn(t)):[a,tn(t)]:tn(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xt?n===-1?16:n|16:n,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ri(e.ssContent),ssFallback:e.ssFallback&&Ri(e.ssFallback),el:e.el,anchor:e.anchor};return u}function l_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return I(ds,null,e,t)}function yt(e){return e==null||typeof e=="boolean"?I(jr):ne(e)?I(xt,null,e.slice()):typeof e=="object"?Kt(e):I(ds,null,String(e))}function Kt(e){return e.el===null||e.memo?e:Ri(e)}function gs(e,t){var r=0,{shapeFlag:i}=e;if(t==null)t=null;else if(ne(t))r=16;else if(typeof t=="object")if(i&(1|64)){var a=t.default;a&&(a._c&&(a._d=!1),gs(e,a()),a._c&&(a._d=!0));return}else{r=32;var n=t._;!n&&!(en in t)?t._ctx=ct:n===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else oe(t)?(t={default:t,_ctx:ct},r=32):(t=String(t),i&64?(r=16,t=[l_(t)]):r=8);e.children=t,e.shapeFlag|=r}function et(){for(var e={},t=0;t3&&arguments[3]!==void 0?arguments[3]:null;ft(e,t,7,[r,i])}var ps=e=>e?Zf(e)?ms(e)||e.proxy:ps(e.parent):null,rn=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ps(e.parent),$root:e=>ps(e.root),$emit:e=>e.emit,$options:e=>Rf(e),$forceUpdate:e=>()=>mf(e.update),$nextTick:e=>Vr.bind(e.proxy),$watch:e=>R0.bind(e)}),u_={get(e,t){var{_:r}=e,{ctx:i,setupState:a,data:n,props:o,accessCache:s,type:u,appContext:l}=r,f;if(t[0]!=="$"){var v=s[t];if(v!==void 0)switch(v){case 1:return a[t];case 2:return n[t];case 4:return i[t];case 3:return o[t]}else{if(a!==xe&&re(a,t))return s[t]=1,a[t];if(n!==xe&&re(n,t))return s[t]=2,n[t];if((f=r.propsOptions[0])&&re(f,t))return s[t]=3,o[t];if(i!==xe&&re(i,t))return s[t]=4,i[t];ls&&(s[t]=0)}}var m=rn[t],d,_;if(m)return t==="$attrs"&&Je(r,"get",t),m(r);if((d=u.__cssModules)&&(d=d[t]))return d;if(i!==xe&&re(i,t))return s[t]=4,i[t];if(_=l.config.globalProperties,re(_,t))return _[t]},set(e,t,r){var{_:i}=e,{data:a,setupState:n,ctx:o}=i;if(n!==xe&&re(n,t))n[t]=r;else if(a!==xe&&re(a,t))a[t]=r;else if(re(i.props,t))return!1;return t[0]==="$"&&t.slice(1)in i?!1:(o[t]=r,!0)},has(e,t){var{_:{data:r,setupState:i,accessCache:a,ctx:n,appContext:o,propsOptions:s}}=e,u;return!!a[t]||r!==xe&&re(r,t)||i!==xe&&re(i,t)||(u=s[0])&&re(u,t)||re(n,t)||re(rn,t)||re(o.config.globalProperties,t)}},f_=Wf(),c_=0;function v_(e,t,r){var i=e.type,a=(t?t.appContext:e.appContext)||f_,n={uid:c_++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new Fm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Nf(i,a),emitsOptions:yf(i,a),emit:null,emitted:null,propsDefaults:xe,inheritAttrs:i.inheritAttrs,ctx:xe,data:xe,props:xe,attrs:xe,slots:xe,refs:xe,setupState:xe,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return n.ctx={_:n},n.root=t?t.root:n,n.emit=S0.bind(null,n),e.ce&&e.ce(n),n}var Ue=null,Dt=()=>Ue||ct,Yr=e=>{Ue=e,e.scope.on()},pr=()=>{Ue&&Ue.scope.off(),Ue=null};function Zf(e){return e.vnode.shapeFlag&4}var Li=!1;function d_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Li=t;var{props:r,children:i}=e.vnode,a=Zf(e);q0(e,r,a,t),K0(e,i);var n=a?h_(e,t):void 0;return Li=!1,n}function h_(e,t){var r=e.type;e.accessCache=Object.create(null),e.proxy=qa(new Proxy(e.ctx,u_));var{setup:i}=r;if(i){var a=e.setupContext=i.length>1?p_(e):null;Yr(e),Fr();var n=qt(i,e,0,[e.props,a]);if(zr(),pr(),yu(n)){if(n.then(pr,pr),t)return n.then(o=>{Kf(e,o,t)}).catch(o=>{Xa(o,e,0)});e.asyncDep=n}else Kf(e,n,t)}else Jf(e,t)}function Kf(e,t,r){oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:We(t)&&(e.setupState=gf(t)),Jf(e,r)}var Gf;function Jf(e,t,r){var i=e.type;if(!e.render){if(!t&&Gf&&!i.render){var a=i.template;if(a){var{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:u}=i,l=ve(ve({isCustomElement:n,delimiters:s},o),u);i.render=Gf(a,l)}}e.render=i.render||pt}Yr(e),Fr(),H0(e),zr(),pr()}function g_(e){return new Proxy(e.attrs,{get(t,r){return Je(e,"get","$attrs"),t[r]}})}function p_(e){var t=i=>{e.exposed=i||{}},r;return{get attrs(){return r||(r=g_(e))},slots:e.slots,emit:e.emit,expose:t}}function ms(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(gf(qa(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in rn)return rn[r](e)}}))}function m_(e){return oe(e)&&"__vccOpts"in e}var ee=(e,t)=>m0(e,t,Li);function __(e,t,r){var i=arguments.length;return i===2?We(t)&&!ne(t)?Qa(t)?I(e,null,[t]):I(e,t):I(e,null,t):(i>3?r=Array.prototype.slice.call(arguments,2):i===3&&Qa(r)&&(r=[r]),I(e,t,r))}var b_="3.2.30",w_="http://www.w3.org/2000/svg",mr=typeof document!="undefined"?document:null,Qf=mr&&mr.createElement("template"),x_={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{var t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,i)=>{var a=t?mr.createElementNS(w_,e):mr.createElement(e,r?{is:r}:void 0);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>mr.createTextNode(e),createComment:e=>mr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){var t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,r,i,a,n){var o=r?r.previousSibling:t.lastChild;if(a&&(a===n||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===n||!(a=a.nextSibling)););else{Qf.innerHTML=i?"".concat(e,""):e;var s=Qf.content;if(i){for(var u=s.firstChild;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function y_(e,t,r){var i=e._vtc;i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function S_(e,t,r){var i=e.style,a=ye(r);if(r&&!a){for(var n in r)_s(i,n,r[n]);if(t&&!ye(t))for(var o in t)r[o]==null&&_s(i,o,"")}else{var s=i.display;a?t!==r&&(i.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(i.display=s)}}var ec=/\s*!important$/;function _s(e,t,r){if(ne(r))r.forEach(a=>_s(e,t,a));else if(r=C_(r),t.startsWith("--"))e.setProperty(t,r);else{var i=E_(e,t);ec.test(r)?e.setProperty(Ke(i),r.replace(ec,""),"important"):e[i]=r}}var tc=["Webkit","Moz","ms"],bs={};function E_(e,t){var r=bs[t];if(r)return r;var i=Ht(t);if(i!=="filter"&&i in e)return bs[t]=i;i=Ra(i);for(var a=0;atypeof rpx2px!="function"?e:ye(e)?e.replace(T_,(t,r)=>rpx2px(r)+"px"):e,rc="http://www.w3.org/1999/xlink";function O_(e,t,r,i,a){if(i&&t.startsWith("xlink:"))r==null?e.removeAttributeNS(rc,t.slice(6,t.length)):e.setAttributeNS(rc,t,r);else{var n=dp(t);r==null||n&&!wu(r)?e.removeAttribute(t):e.setAttribute(t,n?"":r)}}function A_(e,t,r,i,a,n,o){if(t==="innerHTML"||t==="textContent"){i&&o(i,a,n),e[t]=r==null?"":r;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=r;var s=r==null?"":r;(e.value!==s||e.tagName==="OPTION")&&(e.value=s),r==null&&e.removeAttribute(t);return}if(r===""||r==null){var u=typeof e[t];if(u==="boolean"){e[t]=wu(r);return}else if(r==null&&u==="string"){e[t]="",e.removeAttribute(t);return}else if(u==="number"){try{e[t]=0}catch(l){}e.removeAttribute(t);return}}try{e[t]=r}catch(l){}}var an=Date.now,ic=!1;if(typeof window!="undefined"){an()>document.createEvent("Event").timeStamp&&(an=()=>performance.now());var ac=navigator.userAgent.match(/firefox\/(\d+)/i);ic=!!(ac&&Number(ac[1])<=53)}var ws=0,I_=Promise.resolve(),k_=()=>{ws=0},M_=()=>ws||(I_.then(k_),ws=an());function R_(e,t,r,i){e.addEventListener(t,r,i)}function L_(e,t,r,i){e.removeEventListener(t,r,i)}function P_(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=e._vei||(e._vei={}),o=n[t];if(i&&o)o.value=i;else{var[s,u]=N_(t);if(i){var l=n[t]=D_(i,a);R_(e,s,l,u)}else o&&(L_(e,s,o,u),n[t]=void 0)}}var nc=/(?:Once|Passive|Capture)$/;function N_(e){var t;if(nc.test(e)){t={};for(var r;r=e.match(nc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[Ke(e.slice(2)),t]}function D_(e,t){var r=i=>{var a=i.timeStamp||an();(ic||a>=r.attached-1)&&ft(B_(i,r.value),t,5,[i])};return r.value=e,r.attached=M_(),r}function B_(e,t){if(ne(t)){var r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(i=>a=>!a._stopped&&i&&i(a))}else return t}var oc=/^on[a-z]/,$_=function(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,n=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0;t==="class"?y_(e,i,a):t==="style"?S_(e,r,i):Ia(t)?xo(t)||P_(e,t,r,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):F_(e,t,i,a))?A_(e,t,i,n,o,s,u):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),O_(e,t,i,a))};function F_(e,t,r,i){return i?!!(t==="innerHTML"||t==="textContent"||t in e&&oc.test(t)&&oe(r)):t==="spellcheck"||t==="draggable"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||oc.test(t)&&ye(r)?!1:t in e}var z_=["ctrl","shift","alt","meta"],U_={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>z_.some(r=>e["".concat(r,"Key")]&&!t.includes(r))},xs=(e,t)=>function(r){for(var i=0;i1?n-1:0),s=1;s{Ni(e,!1)}):Ni(e,i))},beforeUnmount(e,t){var{value:r}=t;Ni(e,r)}};function Ni(e,t){e.style.display=t?e._vod:"none"}var H_=ve({patchProp:$_},x_),sc;function W_(){return sc||(sc=e_(H_))}var lc=function(){var e=W_().createApp(...arguments),{mount:t}=e;return e.mount=r=>{var i=V_(r);if(!!i){var a=e._component;!oe(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";var n=t(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),n}},e};function V_(e){if(ye(e)){var t=document.querySelector(e);return t}return e}var uc=["top","left","right","bottom"],ys,nn={},ot;function Ss(){return!("CSS"in window)||typeof CSS.supports!="function"?ot="":CSS.supports("top: env(safe-area-inset-top)")?ot="env":CSS.supports("top: constant(safe-area-inset-top)")?ot="constant":ot="",ot}function fc(){if(ot=typeof ot=="string"?ot:Ss(),!ot){uc.forEach(function(s){nn[s]=0});return}function e(s,u){var l=s.style;Object.keys(u).forEach(function(f){var v=u[f];l[f]=v})}var t=[];function r(s){s?t.push(s):t.forEach(function(u){u()})}var i=!1;try{var a=Object.defineProperty({},"passive",{get:function(){i={passive:!0}}});window.addEventListener("test",null,a)}catch(s){}function n(s,u){var l=document.createElement("div"),f=document.createElement("div"),v=document.createElement("div"),m=document.createElement("div"),d=100,_=1e4,b={position:"absolute",width:d+"px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:ot+"(safe-area-inset-"+u+")"};e(l,b),e(f,b),e(v,{transition:"0s",animation:"none",width:"400px",height:"400px"}),e(m,{transition:"0s",animation:"none",width:"250%",height:"250%"}),l.appendChild(v),f.appendChild(m),s.appendChild(l),s.appendChild(f),r(function(){l.scrollTop=f.scrollTop=_;var p=l.scrollTop,g=f.scrollTop;function c(){this.scrollTop!==(this===l?p:g)&&(l.scrollTop=f.scrollTop=_,p=l.scrollTop,g=f.scrollTop,j_(u))}l.addEventListener("scroll",c,i),f.addEventListener("scroll",c,i)});var x=getComputedStyle(l);Object.defineProperty(nn,u,{configurable:!0,get:function(){return parseFloat(x.paddingBottom)}})}var o=document.createElement("div");e(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),uc.forEach(function(s){n(o,s)}),document.body.appendChild(o),r(),ys=!0}function on(e){return ys||fc(),nn[e]}var sn=[];function j_(e){sn.length||setTimeout(function(){var t={};sn.forEach(function(r){t[r]=nn[r]}),sn.length=0,ln.forEach(function(r){r(t)})},0),sn.push(e)}var ln=[];function Y_(e){!Ss()||(ys||fc(),typeof e=="function"&&ln.push(e))}function q_(e){var t=ln.indexOf(e);t>=0&&ln.splice(t,1)}var X_={get support(){return(typeof ot=="string"?ot:Ss()).length!=0},get top(){return on("top")},get left(){return on("left")},get right(){return on("right")},get bottom(){return on("bottom")},onChange:Y_,offChange:q_},un=X_,cc=xs(()=>{},["prevent"]);function fn(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function Es(){var e=document.documentElement.style,t=fn(e,"--window-top");return t?t+un.top:0}function Z_(){var e=document.documentElement.style,t=Es(),r=fn(e,"--window-bottom"),i=fn(e,"--window-left"),a=fn(e,"--window-right");return{top:t,bottom:r?r+un.bottom:0,left:i?i+un.left:0,right:a?a+un.right:0}}function K_(e){var t=document.documentElement.style;Object.keys(e).forEach(r=>{t.setProperty(r,e[r])})}function cn(e){return Symbol(e)}function vc(e){return e=e+"",e.indexOf("rpx")!==-1||e.indexOf("upx")!==-1}function _r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t)return G_(e);if(typeof e=="string"){var r=parseInt(e)||0;return vc(e)?uni.upx2px(r):r}return e}function G_(e){return vc(e)?e.replace(/(\d+(\.\d+)?)[ru]px/g,(t,r)=>uni.upx2px(parseFloat(r))+"px"):e}var J_="M20.928 10.176l-4.928 4.928-4.928-4.928-0.896 0.896 4.928 4.928-4.928 4.928 0.896 0.896 4.928-4.928 4.928 4.928 0.896-0.896-4.928-4.928 4.928-4.928-0.896-0.896zM16 2.080q-3.776 0-7.040 1.888-3.136 1.856-4.992 4.992-1.888 3.264-1.888 7.040t1.888 7.040q1.856 3.136 4.992 4.992 3.264 1.888 7.040 1.888t7.040-1.888q3.136-1.856 4.992-4.992 1.888-3.264 1.888-7.040t-1.888-7.040q-1.856-3.136-4.992-4.992-3.264-1.888-7.040-1.888zM16 28.64q-3.424 0-6.4-1.728-2.848-1.664-4.512-4.512-1.728-2.976-1.728-6.4t1.728-6.4q1.664-2.848 4.512-4.512 2.976-1.728 6.4-1.728t6.4 1.728q2.848 1.664 4.512 4.512 1.728 2.976 1.728 6.4t-1.728 6.4q-1.664 2.848-4.512 4.512-2.976 1.728-6.4 1.728z",Q_="M16 0q-4.352 0-8.064 2.176-3.616 2.144-5.76 5.76-2.176 3.712-2.176 8.064t2.176 8.064q2.144 3.616 5.76 5.76 3.712 2.176 8.064 2.176t8.064-2.176q3.616-2.144 5.76-5.76 2.176-3.712 2.176-8.064t-2.176-8.064q-2.144-3.616-5.76-5.76-3.712-2.176-8.064-2.176zM22.688 21.408q0.32 0.32 0.304 0.752t-0.336 0.736-0.752 0.304-0.752-0.32l-5.184-5.376-5.376 5.184q-0.32 0.32-0.752 0.304t-0.736-0.336-0.304-0.752 0.32-0.752l5.376-5.184-5.184-5.376q-0.32-0.32-0.304-0.752t0.336-0.752 0.752-0.304 0.752 0.336l5.184 5.376 5.376-5.184q0.32-0.32 0.752-0.304t0.752 0.336 0.304 0.752-0.336 0.752l-5.376 5.184 5.184 5.376z",eb="M15.808 1.696q-3.776 0-7.072 1.984-3.2 1.888-5.088 5.152-1.952 3.392-1.952 7.36 0 3.776 1.952 7.072 1.888 3.2 5.088 5.088 3.296 1.952 7.072 1.952 3.968 0 7.36-1.952 3.264-1.888 5.152-5.088 1.984-3.296 1.984-7.072 0-4-1.984-7.36-1.888-3.264-5.152-5.152-3.36-1.984-7.36-1.984zM20.864 18.592l-3.776 4.928q-0.448 0.576-1.088 0.576t-1.088-0.576l-3.776-4.928q-0.448-0.576-0.24-0.992t0.944-0.416h2.976v-8.928q0-0.256 0.176-0.432t0.4-0.176h1.216q0.224 0 0.4 0.176t0.176 0.432v8.928h2.976q0.736 0 0.944 0.416t-0.24 0.992z",tb="M15.808 0.128q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.176 3.776-2.176 8.16 0 4.224 2.176 7.872 2.080 3.552 5.632 5.632 3.648 2.176 7.872 2.176 4.384 0 8.16-2.176 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.416-2.176-8.16-2.112-3.616-5.728-5.728-3.744-2.176-8.16-2.176zM16.864 23.776q0 0.064-0.064 0.064h-1.568q-0.096 0-0.096-0.064l-0.256-11.328q0-0.064 0.064-0.064h2.112q0.096 0 0.064 0.064l-0.256 11.328zM16 10.88q-0.576 0-0.976-0.4t-0.4-0.96 0.4-0.96 0.976-0.4 0.976 0.4 0.4 0.96-0.4 0.96-0.976 0.4z",rb="M20.928 22.688q-1.696 1.376-3.744 2.112-2.112 0.768-4.384 0.768-3.488 0-6.464-1.728-2.88-1.696-4.576-4.608-1.76-2.976-1.76-6.464t1.76-6.464q1.696-2.88 4.576-4.576 2.976-1.76 6.464-1.76t6.464 1.76q2.912 1.696 4.608 4.576 1.728 2.976 1.728 6.464 0 2.272-0.768 4.384-0.736 2.048-2.112 3.744l9.312 9.28-1.824 1.824-9.28-9.312zM12.8 23.008q2.784 0 5.184-1.376 2.304-1.376 3.68-3.68 1.376-2.4 1.376-5.184t-1.376-5.152q-1.376-2.336-3.68-3.68-2.4-1.408-5.184-1.408t-5.152 1.408q-2.336 1.344-3.68 3.68-1.408 2.368-1.408 5.152t1.408 5.184q1.344 2.304 3.68 3.68 2.368 1.376 5.152 1.376zM12.8 23.008v0z",vn="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",ib="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM24.832 11.328l-11.264 11.104q-0.032 0.032-0.112 0.032t-0.112-0.032l-5.216-5.376q-0.096-0.128 0-0.288l0.704-0.96q0.032-0.064 0.112-0.064t0.112 0.032l4.256 3.264q0.064 0.032 0.144 0.032t0.112-0.032l10.336-8.608q0.064-0.064 0.144-0.064t0.112 0.064l0.672 0.672q0.128 0.128 0 0.224z",ab="M15.84 0.096q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM23.008 21.92l-0.512 0.896q-0.096 0.128-0.224 0.064l-8-3.808q-0.096-0.064-0.16-0.128-0.128-0.096-0.128-0.288l0.512-12.096q0-0.064 0.048-0.112t0.112-0.048h1.376q0.064 0 0.112 0.048t0.048 0.112l0.448 10.848 6.304 4.256q0.064 0.064 0.080 0.128t-0.016 0.128z",nb="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z";function dn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#000",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:27;return I("svg",{width:r,height:r,viewBox:"0 0 32 32"},[I("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function hn(){return Gt()}function ob(){return window.__PAGE_INFO__}function Gt(){return window.__id__||(window.__id__=plus.webview.currentWebview().id),parseInt(window.__id__)}function sb(e){e.preventDefault()}var dc,hc=0;function lb(e){var{onPageScroll:t,onReachBottom:r,onReachBottomDistance:i}=e,a=!1,n=!1,o=!0,s=()=>{var{scrollHeight:l}=document.documentElement,f=window.innerHeight,v=window.scrollY,m=v>0&&l>f&&v+f+i>=l,d=Math.abs(l-hc)>i;return m&&(!n||d)?(hc=l,n=!0,!0):(!m&&n&&(n=!1),!1)},u=()=>{t&&t(window.pageYOffset);function l(){if(s())return r&&r(),o=!1,setTimeout(function(){o=!0},350),!0}r&&o&&(l()||(dc=setTimeout(l,300))),a=!1};return function(){clearTimeout(dc),a||requestAnimationFrame(u),a=!0}}function Ts(e,t){if(t.indexOf("/")===0)return t;if(t.indexOf("./")===0)return Ts(e,t.substr(2));for(var r=t.split("/"),i=r.length,a=0;a0?e.split("/"):[];return n.splice(n.length-a-1,a+1),Do(n.concat(r).join("/"))}class ub{constructor(t){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=t,this.$el=t.$el,this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(t){if(!(!this.$el||!t)){var r=gc(this.$el.querySelector(t));if(!!r)return Cs(r)}}selectAllComponents(t){if(!this.$el||!t)return[];for(var r=[],i=this.$el.querySelectorAll(t),a=0;a-1&&r.splice(i,1)}var a=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return a.indexOf(t)===-1&&(a.push(t),this.forceUpdate("class")),this}hasClass(t){return this.$el&&this.$el.classList.contains(t)}getDataset(){return this.$el&&this.$el.dataset}callMethod(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.$vm[t];oe(i)?i(JSON.parse(JSON.stringify(r))):this.$vm.ownerId&&UniViewJSBridge.publishHandler(Lp,{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:t,args:r})}requestAnimationFrame(t){return window.requestAnimationFrame(t)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$vm.$emit(t,r),this}getComputedStyle(t){if(this.$el){var r=window.getComputedStyle(this.$el);return t&&t.length?t.reduce((i,a)=>(i[a]=r[a],i),{}):r}return{}}setTimeout(t,r){return window.setTimeout(t,r)}clearTimeout(t){return window.clearTimeout(t)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function Cs(e){if(e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new ub(e)),e.$el.__wxsComponentDescriptor}function Di(e,t){return Cs(e)}function gc(e){if(!!e)return qr(e)}function qr(e){return e.__wxsVm||(e.__wxsVm={ownerId:e.__ownerId,$el:e,$emit(){},$forceUpdate(){var{__wxsStyle:t,__wxsAddClass:r,__wxsRemoveClass:i,__wxsStyleChanged:a,__wxsClassChanged:n}=e,o,s;a&&(e.__wxsStyleChanged=!1,t&&(s=()=>{Object.keys(t).forEach(u=>{e.style[u]=t[u]})})),n&&(e.__wxsClassChanged=!1,o=()=>{i&&i.forEach(u=>{e.classList.remove(u)}),r&&r.forEach(u=>{e.classList.add(u)})}),requestAnimationFrame(()=>{o&&o(),s&&s()})}})}var fb=e=>e.type==="click";function pc(e,t,r){var{currentTarget:i}=e;if(!(e instanceof Event)||!(i instanceof HTMLElement))return[e];var a=i.tagName.indexOf("UNI-")!==0,n=mc(e,a);if(fb(e))vb(n,e);else if(e instanceof TouchEvent){var o=Es();n.touches=_c(e.touches,o),n.changedTouches=_c(e.changedTouches,o)}return[n]}function cb(e){for(;e&&e.tagName.indexOf("UNI-")!==0;)e=e.parentElement;return e}function mc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,{type:r,timeStamp:i,target:a,currentTarget:n}=e,o={type:r,timeStamp:i,target:Mo(t?a:cb(a)),detail:{},currentTarget:Mo(n)};return e._stopped&&(o._stopped=!0),e.type.startsWith("touch")&&(o.touches=e.touches,o.changedTouches=e.changedTouches),o}function vb(e,t){var{x:r,y:i}=t,a=Es();e.detail={x:r,y:i-a},e.touches=e.changedTouches=[db(t,a)]}function db(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function _c(e,t){for(var r=[],i=0;i1&&arguments[1]!==void 0?arguments[1]:{},r=Gt()+"";plus.webview.postMessageToUniNView({type:"subscribeHandler",args:{type:e,data:t,pageId:r}},hb)}function xb(e,t){var r=e[0];if(!(!t||!mt(t.formatArgs)&&mt(r)))for(var i=t.formatArgs,a=Object.keys(i),n=0;nplus.io.convertLocalFileSystemURL(e).replace(/^\/?apps\//,"/android_asset/apps/").replace(/\/$/,""));function Tb(e){return e.indexOf("_www")===0||e.indexOf("_doc")===0||e.indexOf("_documents")===0||e.indexOf("_downloads")===0}var Cb=0;function Ob(e,t,r){var i="".concat(Date.now()).concat(Cb++),a=new plus.nativeObj.Bitmap("bitmap".concat(i));a.loadBase64Data(e,function(){var o=e.match(/data:image\/(\S+?);/)||[null,"png"],s;o[1]&&(s=o[1].replace("jpeg","jpg"));var u="".concat(t,"/").concat(i,".").concat(s);a.save(u,{overwrite:!0,quality:100,format:s},function(){n(),r(null,u)},function(l){n(),r(l)})},function(o){n(),r(o)});function n(){a.clear()}}var Bt={};(function(e){var t=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function r(n,o){return Object.prototype.hasOwnProperty.call(n,o)}e.assign=function(n){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(!!s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var u in s)r(s,u)&&(n[u]=s[u])}}return n},e.shrinkBuf=function(n,o){return n.length===o?n:n.subarray?n.subarray(0,o):(n.length=o,n)};var i={arraySet:function(n,o,s,u,l){if(o.subarray&&n.subarray){n.set(o.subarray(s,s+u),l);return}for(var f=0;f=0;)e[t]=0}var Mb=0,Cc=1,Rb=2,Lb=3,Pb=258,Os=29,$i=256,Fi=$i+1+Os,Kr=30,As=19,Oc=2*Fi+1,br=15,Is=16,Nb=7,ks=256,Ac=16,Ic=17,kc=18,Ms=[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],gn=[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],Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Mc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bb=512,$t=new Array((Fi+2)*2);Zr($t);var zi=new Array(Kr*2);Zr(zi);var Ui=new Array(Bb);Zr(Ui);var Hi=new Array(Pb-Lb+1);Zr(Hi);var Rs=new Array(Os);Zr(Rs);var pn=new Array(Kr);Zr(pn);function Ls(e,t,r,i,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}var Rc,Lc,Pc;function Ps(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Nc(e){return e<256?Ui[e]:Ui[256+(e>>>7)]}function Wi(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Xe(e,t,r){e.bi_valid>Is-r?(e.bi_buf|=t<>Is-e.bi_valid,e.bi_valid+=r-Is):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function $b(e){e.bi_valid===16?(Wi(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Fb(e,t){var r=t.dyn_tree,i=t.max_code,a=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,f,v,m,d,_,b=0;for(m=0;m<=br;m++)e.bl_count[m]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lu&&(m=u,b++),r[f*2+1]=m,!(f>i)&&(e.bl_count[m]++,d=0,f>=s&&(d=o[f-s]),_=r[f*2],e.opt_len+=_*(m+d),n&&(e.static_len+=_*(a[f*2+1]+d)));if(b!==0){do{for(m=u-1;e.bl_count[m]===0;)m--;e.bl_count[m]--,e.bl_count[m+1]+=2,e.bl_count[u]--,b-=2}while(b>0);for(m=u;m!==0;m--)for(f=e.bl_count[m];f!==0;)v=e.heap[--l],!(v>i)&&(r[v*2+1]!==m&&(e.opt_len+=(m-r[v*2+1])*r[v*2],r[v*2+1]=m),f--)}}function Bc(e,t,r){var i=new Array(br+1),a=0,n,o;for(n=1;n<=br;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=Dc(i[s]++,s))}}function zb(){var e,t,r,i,a,n=new Array(br+1);for(r=0,i=0;i>=7;i8?Wi(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ub(e,t,r,i){Fc(e),i&&(Wi(e,r),Wi(e,~r)),Ab.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function zc(e,t,r,i){var a=t*2,n=r*2;return e[a]>1;o>=1;o--)Ns(e,r,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ns(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,Ns(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Fb(e,t),Bc(r,u,e.bl_count)}function Hc(e,t,r){var i,a=-1,n,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)n=o,o=t[(i+1)*2+1],!(++s=3&&e.bl_tree[Mc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Wb(e,t,r,i){var a;for(Xe(e,t-257,5),Xe(e,r-1,5),Xe(e,i-4,4),a=0;a>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Ec;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Tc;for(r=32;r<$i;r++)if(e.dyn_ltree[r*2]!==0)return Tc;return Ec}var Vc=!1;function jb(e){Vc||(zb(),Vc=!0),e.l_desc=new Ps(e.dyn_ltree,Rc),e.d_desc=new Ps(e.dyn_dtree,Lc),e.bl_desc=new Ps(e.bl_tree,Pc),e.bi_buf=0,e.bi_valid=0,$c(e)}function jc(e,t,r,i){Xe(e,(Mb<<1)+(i?1:0),3),Ub(e,t,r,!0)}function Yb(e){Xe(e,Cc<<1,3),Tt(e,ks,$t),$b(e)}function qb(e,t,r,i){var a,n,o=0;e.level>0?(e.strm.data_type===kb&&(e.strm.data_type=Vb(e)),Ds(e,e.l_desc),Ds(e,e.d_desc),o=Hb(e),a=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=a&&(a=n)):a=n=r+5,r+4<=a&&t!==-1?jc(e,t,r,i):e.strategy===Ib||n===a?(Xe(e,(Cc<<1)+(i?1:0),3),Uc(e,$t,zi)):(Xe(e,(Rb<<1)+(i?1:0),3),Wb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Uc(e,e.dyn_ltree,e.dyn_dtree)),$c(e),i&&Fc(e)}function Xb(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Hi[r]+$i+1)*2]++,e.dyn_dtree[Nc(t)*2]++),e.last_lit===e.lit_bufsize-1}Xr._tr_init=jb,Xr._tr_stored_block=jc,Xr._tr_flush_block=qb,Xr._tr_tally=Xb,Xr._tr_align=Yb;function Zb(e,t,r,i){for(var a=e&65535|0,n=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do a=a+t[i++]|0,n=n+a|0;while(--o);a%=65521,n%=65521}return a|n<<16|0}var Yc=Zb;function Kb(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Gb=Kb();function Jb(e,t,r,i){var a=Gb,n=i+r;e^=-1;for(var o=i;o>>8^a[(e^t[o])&255];return e^-1}var qc=Jb,Bs={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"},Ye=Bt,st=Xr,Xc=Yc,Jt=qc,Qb=Bs,wr=0,ew=1,tw=3,Qt=4,Zc=5,Ct=0,Kc=1,lt=-2,rw=-3,$s=-5,iw=-1,aw=1,mn=2,nw=3,ow=4,sw=0,lw=2,_n=8,uw=9,fw=15,cw=8,vw=29,dw=256,Fs=dw+1+vw,hw=30,gw=19,pw=2*Fs+1,mw=15,de=3,er=258,dt=er+de+1,_w=32,bn=42,zs=69,wn=73,xn=91,yn=103,xr=113,Vi=666,Le=1,ji=2,yr=3,Gr=4,bw=3;function tr(e,t){return e.msg=Qb[t],t}function Gc(e){return(e<<1)-(e>4?9:0)}function rr(e){for(var t=e.length;--t>=0;)e[t]=0}function ir(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Ye.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function He(e,t){st._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ir(e.strm)}function pe(e,t){e.pending_buf[e.pending++]=t}function Yi(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function ww(e,t,r,i){var a=e.avail_in;return a>i&&(a=i),a===0?0:(e.avail_in-=a,Ye.arraySet(t,e.input,e.next_in,a,r),e.state.wrap===1?e.adler=Xc(e.adler,t,a,r):e.state.wrap===2&&(e.adler=Jt(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function Jc(e,t){var r=e.max_chain_length,i=e.strstart,a,n,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-dt?e.strstart-(e.w_size-dt):0,l=e.window,f=e.w_mask,v=e.prev,m=e.strstart+er,d=l[i+o-1],_=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(a=t,!(l[a+o]!==_||l[a+o-1]!==d||l[a]!==l[i]||l[++a]!==l[i+1])){i+=2,a++;do;while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&io){if(e.match_start=t,o=n,n>=s)break;d=l[i+o-1],_=l[i+o]}}while((t=v[t&f])>u&&--r!=0);return o<=e.lookahead?o:e.lookahead}function Sr(e){var t=e.w_size,r,i,a,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-dt)){Ye.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do a=e.head[--r],e.head[r]=a>=t?a-t:0;while(--i);i=t,r=i;do a=e.prev[--r],e.prev[r]=a>=t?a-t:0;while(--i);n+=t}if(e.strm.avail_in===0)break;if(i=ww(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=de)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Sr(e),e.lookahead===0&&t===wr)return Le;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,He(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-dt&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):(e.strstart>e.block_start&&(He(e,!1),e.strm.avail_out===0),Le)}function Us(e,t){for(var r,i;;){if(e.lookahead=de&&(e.ins_h=(e.ins_h<=de)if(i=st._tr_tally(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=de&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-de,i=st._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-de),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<=de&&e.strstart>0&&(a=e.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){n=e.strstart+er;do;while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=st._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=st._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):e.last_lit&&(He(e,!1),e.strm.avail_out===0)?Le:ji}function Sw(e,t){for(var r;;){if(e.lookahead===0&&(Sr(e),e.lookahead===0)){if(t===wr)return Le;break}if(e.match_length=0,r=st._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):e.last_lit&&(He(e,!1),e.strm.avail_out===0)?Le:ji}function Ot(e,t,r,i,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=a}var Qr;Qr=[new Ot(0,0,0,0,xw),new Ot(4,4,8,4,Us),new Ot(4,5,16,8,Us),new Ot(4,6,32,32,Us),new Ot(4,4,16,16,Jr),new Ot(8,16,32,32,Jr),new Ot(8,16,128,128,Jr),new Ot(8,32,128,256,Jr),new Ot(32,128,258,1024,Jr),new Ot(32,258,258,4096,Jr)];function Ew(e){e.window_size=2*e.w_size,rr(e.head),e.max_lazy_match=Qr[e.level].max_lazy,e.good_match=Qr[e.level].good_length,e.nice_match=Qr[e.level].nice_length,e.max_chain_length=Qr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0}function Tw(){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=_n,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 Ye.Buf16(pw*2),this.dyn_dtree=new Ye.Buf16((2*hw+1)*2),this.bl_tree=new Ye.Buf16((2*gw+1)*2),rr(this.dyn_ltree),rr(this.dyn_dtree),rr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ye.Buf16(mw+1),this.heap=new Ye.Buf16(2*Fs+1),rr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ye.Buf16(2*Fs+1),rr(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 Qc(e){var t;return!e||!e.state?tr(e,lt):(e.total_in=e.total_out=0,e.data_type=lw,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?bn:xr,e.adler=t.wrap===2?0:1,t.last_flush=wr,st._tr_init(t),Ct)}function ev(e){var t=Qc(e);return t===Ct&&Ew(e.state),t}function Cw(e,t){return!e||!e.state||e.state.wrap!==2?lt:(e.state.gzhead=t,Ct)}function tv(e,t,r,i,a,n){if(!e)return lt;var o=1;if(t===iw&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),a<1||a>uw||r!==_n||i<8||i>15||t<0||t>9||n<0||n>ow)return tr(e,lt);i===8&&(i=9);var s=new Tw;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<Zc||t<0)return e?tr(e,lt):lt;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Vi&&t!==Qt)return tr(e,e.avail_out===0?$s:lt);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===bn)if(i.wrap===2)e.adler=0,pe(i,31),pe(i,139),pe(i,8),i.gzhead?(pe(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)),pe(i,i.gzhead.time&255),pe(i,i.gzhead.time>>8&255),pe(i,i.gzhead.time>>16&255),pe(i,i.gzhead.time>>24&255),pe(i,i.level===9?2:i.strategy>=mn||i.level<2?4:0),pe(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(pe(i,i.gzhead.extra.length&255),pe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Jt(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=zs):(pe(i,0),pe(i,0),pe(i,0),pe(i,0),pe(i,0),pe(i,i.level===9?2:i.strategy>=mn||i.level<2?4:0),pe(i,bw),i.status=xr);else{var o=_n+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=mn||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=_w),o+=31-o%31,i.status=xr,Yi(i,o),i.strstart!==0&&(Yi(i,e.adler>>>16),Yi(i,e.adler&65535)),e.adler=1}if(i.status===zs)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size));)pe(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=wn)}else i.status=wn;if(i.status===wn)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexa&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),n===0&&(i.gzindex=0,i.status=xn)}else i.status=xn;if(i.status===xn)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexa&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),n===0&&(i.status=yn)}else i.status=yn;if(i.status===yn&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ir(e),i.pending+2<=i.pending_buf_size&&(pe(i,e.adler&255),pe(i,e.adler>>8&255),e.adler=0,i.status=xr)):i.status=xr),i.pending!==0){if(ir(e),e.avail_out===0)return i.last_flush=-1,Ct}else if(e.avail_in===0&&Gc(t)<=Gc(r)&&t!==Qt)return tr(e,$s);if(i.status===Vi&&e.avail_in!==0)return tr(e,$s);if(e.avail_in!==0||i.lookahead!==0||t!==wr&&i.status!==Vi){var u=i.strategy===mn?Sw(i,t):i.strategy===nw?yw(i,t):Qr[i.level].func(i,t);if((u===yr||u===Gr)&&(i.status=Vi),u===Le||u===yr)return e.avail_out===0&&(i.last_flush=-1),Ct;if(u===ji&&(t===ew?st._tr_align(i):t!==Zc&&(st._tr_stored_block(i,0,0,!1),t===tw&&(rr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ir(e),e.avail_out===0))return i.last_flush=-1,Ct}return t!==Qt?Ct:i.wrap<=0?Kc:(i.wrap===2?(pe(i,e.adler&255),pe(i,e.adler>>8&255),pe(i,e.adler>>16&255),pe(i,e.adler>>24&255),pe(i,e.total_in&255),pe(i,e.total_in>>8&255),pe(i,e.total_in>>16&255),pe(i,e.total_in>>24&255)):(Yi(i,e.adler>>>16),Yi(i,e.adler&65535)),ir(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Ct:Kc)}function Iw(e){var t;return!e||!e.state?lt:(t=e.state.status,t!==bn&&t!==zs&&t!==wn&&t!==xn&&t!==yn&&t!==xr&&t!==Vi?tr(e,lt):(e.state=null,t===xr?tr(e,rw):Ct))}function kw(e,t){var r=t.length,i,a,n,o,s,u,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==bn||i.lookahead))return lt;for(o===1&&(e.adler=Xc(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(rr(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new Ye.Buf8(i.w_size),Ye.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,Sr(i);i.lookahead>=de;){a=i.strstart,n=i.lookahead-(de-1);do i.ins_h=(i.ins_h<=252?6:ar>=248?5:ar>=240?4:ar>=224?3:ar>=192?2:1;qi[254]=qi[254]=1,Er.string2buf=function(e){var t,r,i,a,n,o=e.length,s=0;for(a=0;a>>6,t[n++]=128|r&63):r<65536?(t[n++]=224|r>>>12,t[n++]=128|r>>>6&63,t[n++]=128|r&63):(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63,t[n++]=128|r>>>6&63,t[n++]=128|r&63);return t};function av(e,t){if(t<65534&&(e.subarray&&iv||!e.subarray&&rv))return String.fromCharCode.apply(null,Sn.shrinkBuf(e,t));for(var r="",i=0;i4){s[i++]=65533,r+=n-1;continue}for(a&=n===2?31:n===3?15:7;n>1&&r1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return av(s,i)},Er.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)==128;)r--;return r<0||r===0?t:r+qi[e[r]]>t?r:t};function Mw(){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}var nv=Mw,Xi=Et,Zi=Bt,Hs=Er,Ws=Bs,Rw=nv,ov=Object.prototype.toString,Lw=0,Vs=4,ei=0,sv=1,lv=2,Pw=-1,Nw=0,Dw=8;function Tr(e){if(!(this instanceof Tr))return new Tr(e);this.options=Zi.assign({level:Pw,method:Dw,chunkSize:16384,windowBits:15,memLevel:8,strategy:Nw,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Rw,this.strm.avail_out=0;var r=Xi.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ei)throw new Error(Ws[r]);if(t.header&&Xi.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Hs.string2buf(t.dictionary):ov.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=Xi.deflateSetDictionary(this.strm,i),r!==ei)throw new Error(Ws[r]);this._dict_set=!0}}Tr.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,a,n;if(this.ended)return!1;n=t===~~t?t:t===!0?Vs:Lw,typeof e=="string"?r.input=Hs.string2buf(e):ov.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Zi.Buf8(i),r.next_out=0,r.avail_out=i),a=Xi.deflate(r,n),a!==sv&&a!==ei)return this.onEnd(a),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(n===Vs||n===lv))&&(this.options.to==="string"?this.onData(Hs.buf2binstring(Zi.shrinkBuf(r.output,r.next_out))):this.onData(Zi.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&a!==sv);return n===Vs?(a=Xi.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ei):(n===lv&&(this.onEnd(ei),r.avail_out=0),!0)},Tr.prototype.onData=function(e){this.chunks.push(e)},Tr.prototype.onEnd=function(e){e===ei&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function js(e,t){var r=new Tr(t);if(r.push(e,!0),r.err)throw r.msg||Ws[r.err];return r.result}function Bw(e,t){return t=t||{},t.raw=!0,js(e,t)}function $w(e,t){return t=t||{},t.gzip=!0,js(e,t)}Bi.Deflate=Tr,Bi.deflate=js,Bi.deflateRaw=Bw,Bi.gzip=$w;var Ki={},ht={},En=30,Fw=12,zw=function(t,r){var i,a,n,o,s,u,l,f,v,m,d,_,b,x,p,g,c,h,w,y,T,E,O,N,R;i=t.state,a=t.next_in,N=t.input,n=a+(t.avail_in-5),o=t.next_out,R=t.output,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,v=i.whave,m=i.wnext,d=i.window,_=i.hold,b=i.bits,x=i.lencode,p=i.distcode,g=(1<>>24,_>>>=w,b-=w,w=h>>>16&255,w===0)R[o++]=h&65535;else if(w&16){y=h&65535,w&=15,w&&(b>>=w,b-=w),b<15&&(_+=N[a++]<>>24,_>>>=w,b-=w,w=h>>>16&255,w&16){if(T=h&65535,w&=15,bl){t.msg="invalid distance too far back",i.mode=En;break e}if(_>>>=w,b-=w,w=o-s,T>w){if(w=T-w,w>v&&i.sane){t.msg="invalid distance too far back",i.mode=En;break e}if(E=0,O=d,m===0){if(E+=f-w,w2;)R[o++]=O[E++],R[o++]=O[E++],R[o++]=O[E++],y-=3;y&&(R[o++]=O[E++],y>1&&(R[o++]=O[E++]))}else{E=o-T;do R[o++]=R[E++],R[o++]=R[E++],R[o++]=R[E++],y-=3;while(y>2);y&&(R[o++]=R[E++],y>1&&(R[o++]=R[E++]))}}else if((w&64)==0){h=p[(h&65535)+(_&(1<>3,a-=y,b-=y<<3,_&=(1<=1&&V[d]===0;d--);if(_>d&&(_=d),d===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,u.bits=1,0;for(m=1;m0&&(t===vv||d!==1))return-1;for(ue[1]=0,f=1;ffv||t===dv&&g>cv)return 1;for(;;){Q=f-x,s[v]R?(te=M[B+s[v]],W=O[N+s[v]]):(te=32+64,W=0),h=1<>x)+w]=Q<<24|te<<16|W|0;while(w!==0);for(h=1<>=1;if(h!==0?(c&=h-1,c+=h):c=0,v++,--V[f]==0){if(f===d)break;f=r[i+s[v]]}if(f>_&&(c&T)!==y){for(x===0&&(x=_),E+=m,b=f-x,p=1<fv||t===dv&&g>cv)return 1;y=c&T,n[y]=_<<24|b<<16|E-o|0}}return c!==0&&(n[E+c]=f-x<<24|64<<16|0),u.bits=_,0},tt=Bt,qs=Yc,At=qc,Yw=zw,Gi=jw,qw=0,hv=1,gv=2,pv=4,Xw=5,Tn=6,Cr=0,Zw=1,Kw=2,ut=-2,mv=-3,_v=-4,Gw=-5,bv=8,wv=1,xv=2,yv=3,Sv=4,Ev=5,Tv=6,Cv=7,Ov=8,Av=9,Iv=10,Cn=11,Ft=12,Xs=13,kv=14,Zs=15,Mv=16,Rv=17,Lv=18,Pv=19,On=20,An=21,Nv=22,Dv=23,Bv=24,$v=25,Fv=26,Ks=27,zv=28,Uv=29,Ee=30,Hv=31,Jw=32,Qw=852,e1=592,t1=15,r1=t1;function Wv(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function i1(){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 tt.Buf16(320),this.work=new tt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Vv(e){var t;return!e||!e.state?ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=wv,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new tt.Buf32(Qw),t.distcode=t.distdyn=new tt.Buf32(e1),t.sane=1,t.back=-1,Cr)}function jv(e){var t;return!e||!e.state?ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Vv(e))}function Yv(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ut:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,jv(e))}function qv(e,t){var r,i;return e?(i=new i1,e.state=i,i.window=null,r=Yv(e,t),r!==Cr&&(e.state=null),r):ut}function a1(e){return qv(e,r1)}var Xv=!0,Gs,Js;function n1(e){if(Xv){var t;for(Gs=new tt.Buf32(512),Js=new tt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Gi(hv,e.lens,0,288,Gs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Gi(gv,e.lens,0,32,Js,0,e.work,{bits:5}),Xv=!1}e.lencode=Gs,e.lenbits=9,e.distcode=Js,e.distbits=5}function Zv(e,t,r,i){var a,n=e.state;return n.window===null&&(n.wsize=1<=n.wsize?(tt.arraySet(n.window,t,r-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(a=n.wsize-n.wnext,a>i&&(a=i),tt.arraySet(n.window,t,r-i,a,n.wnext),i-=a,i?(tt.arraySet(n.window,t,r-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=a,n.wnext===n.wsize&&(n.wnext=0),n.whave>>8&255,r.check=At(r.check,O,2,0),l=0,f=0,r.mode=xv;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=Ee;break}if((l&15)!==bv){e.msg="unknown compression method",r.mode=Ee;break}if(l>>>=4,f-=4,T=(l&15)+8,r.wbits===0)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=Ee;break}r.dmax=1<>8&1),r.flags&512&&(O[0]=l&255,O[1]=l>>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0,r.mode=yv;case yv:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<>>8&255,O[2]=l>>>16&255,O[3]=l>>>24&255,r.check=At(r.check,O,4,0)),l=0,f=0,r.mode=Sv;case Sv:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<>8),r.flags&512&&(O[0]=l&255,O[1]=l>>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0,r.mode=Ev;case Ev:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0}else r.head&&(r.head.extra=null);r.mode=Tv;case Tv:if(r.flags&1024&&(d=r.length,d>s&&(d=s),d&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),tt.arraySet(r.head.extra,i,n,d,T)),r.flags&512&&(r.check=At(r.check,i,d,n)),s-=d,n+=d,r.length-=d),r.length))break e;r.length=0,r.mode=Cv;case Cv:if(r.flags&2048){if(s===0)break e;d=0;do T=i[n+d++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Ft;break;case Iv:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<>>=f&7,f-=f&7,r.mode=Ks;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<>>=1,f-=1,l&3){case 0:r.mode=kv;break;case 1:if(n1(r),r.mode=On,t===Tn){l>>>=2,f-=2;break e}break;case 2:r.mode=Rv;break;case 3:e.msg="invalid block type",r.mode=Ee}l>>>=2,f-=2;break;case kv:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Ee;break}if(r.length=l&65535,l=0,f=0,r.mode=Zs,t===Tn)break e;case Zs:r.mode=Mv;case Mv:if(d=r.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;tt.arraySet(a,i,n,d,o),s-=d,n+=d,u-=d,o+=d,r.length-=d;break}r.mode=Ft;break;case Rv:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<>>=5,f-=5,r.ndist=(l&31)+1,l>>>=5,f-=5,r.ncode=(l&15)+4,l>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Ee;break}r.have=0,r.mode=Lv;case Lv:for(;r.have>>=3,f-=3}for(;r.have<19;)r.lens[V[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},E=Gi(qw,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,E){e.msg="invalid code lengths set",r.mode=Ee;break}r.have=0,r.mode=Pv;case Pv:for(;r.have>>24,g=x>>>16&255,c=x&65535,!(p<=f);){if(s===0)break e;s--,l+=i[n++]<>>=p,f-=p,r.lens[r.have++]=c;else{if(c===16){for(R=p+2;f>>=p,f-=p,r.have===0){e.msg="invalid bit length repeat",r.mode=Ee;break}T=r.lens[r.have-1],d=3+(l&3),l>>>=2,f-=2}else if(c===17){for(R=p+3;f>>=p,f-=p,T=0,d=3+(l&7),l>>>=3,f-=3}else{for(R=p+7;f>>=p,f-=p,T=0,d=11+(l&127),l>>>=7,f-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Ee;break}for(;d--;)r.lens[r.have++]=T}}if(r.mode===Ee)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Ee;break}if(r.lenbits=9,N={bits:r.lenbits},E=Gi(hv,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,E){e.msg="invalid literal/lengths set",r.mode=Ee;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},E=Gi(gv,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,E){e.msg="invalid distances set",r.mode=Ee;break}if(r.mode=On,t===Tn)break e;case On:r.mode=An;case An:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=n,e.avail_in=s,r.hold=l,r.bits=f,Yw(e,m),o=e.next_out,a=e.output,u=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,r.mode===Ft&&(r.back=-1);break}for(r.back=0;x=r.lencode[l&(1<>>24,g=x>>>16&255,c=x&65535,!(p<=f);){if(s===0)break e;s--,l+=i[n++]<>h)],p=x>>>24,g=x>>>16&255,c=x&65535,!(h+p<=f);){if(s===0)break e;s--,l+=i[n++]<>>=h,f-=h,r.back+=h}if(l>>>=p,f-=p,r.back+=p,r.length=c,g===0){r.mode=Fv;break}if(g&32){r.back=-1,r.mode=Ft;break}if(g&64){e.msg="invalid literal/length code",r.mode=Ee;break}r.extra=g&15,r.mode=Nv;case Nv:if(r.extra){for(R=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Dv;case Dv:for(;x=r.distcode[l&(1<>>24,g=x>>>16&255,c=x&65535,!(p<=f);){if(s===0)break e;s--,l+=i[n++]<>h)],p=x>>>24,g=x>>>16&255,c=x&65535,!(h+p<=f);){if(s===0)break e;s--,l+=i[n++]<>>=h,f-=h,r.back+=h}if(l>>>=p,f-=p,r.back+=p,g&64){e.msg="invalid distance code",r.mode=Ee;break}r.offset=c,r.extra=g&15,r.mode=Bv;case Bv:if(r.extra){for(R=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Ee;break}r.mode=$v;case $v:if(u===0)break e;if(d=m-u,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Ee;break}d>r.wnext?(d-=r.wnext,_=r.wsize-d):_=r.wnext-d,d>r.length&&(d=r.length),b=r.window}else b=a,_=o-r.offset,d=r.length;d>u&&(d=u),u-=d,r.length-=d;do a[o++]=b[_++];while(--d);r.length===0&&(r.mode=An);break;case Fv:if(u===0)break e;a[o++]=r.length,u--,r.mode=An;break;case Ks:if(r.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v1,this.strm.avail_out=0;var r=ri.inflateInit2(this.strm,t.windowBits);if(r!==Me.Z_OK)throw new Error(Qs[r]);if(this.header=new d1,ri.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=In.string2buf(t.dictionary):Gv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ri.inflateSetDictionary(this.strm,t.dictionary),r!==Me.Z_OK)))throw new Error(Qs[r])}Or.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,a=this.options.dictionary,n,o,s,u,l,f=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?Me.Z_FINISH:Me.Z_NO_FLUSH,typeof e=="string"?r.input=In.binstring2buf(e):Gv.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ji.Buf8(i),r.next_out=0,r.avail_out=i),n=ri.inflate(r,Me.Z_NO_FLUSH),n===Me.Z_NEED_DICT&&a&&(n=ri.inflateSetDictionary(this.strm,a)),n===Me.Z_BUF_ERROR&&f===!0&&(n=Me.Z_OK,f=!1),n!==Me.Z_STREAM_END&&n!==Me.Z_OK)return this.onEnd(n),this.ended=!0,!1;r.next_out&&(r.avail_out===0||n===Me.Z_STREAM_END||r.avail_in===0&&(o===Me.Z_FINISH||o===Me.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=In.utf8border(r.output,r.next_out),u=r.next_out-s,l=In.buf2string(r.output,s),r.next_out=u,r.avail_out=i-u,u&&Ji.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(Ji.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=!0)}while((r.avail_in>0||r.avail_out===0)&&n!==Me.Z_STREAM_END);return n===Me.Z_STREAM_END&&(o=Me.Z_FINISH),o===Me.Z_FINISH?(n=ri.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Me.Z_OK):(o===Me.Z_SYNC_FLUSH&&(this.onEnd(Me.Z_OK),r.avail_out=0),!0)},Or.prototype.onData=function(e){this.chunks.push(e)},Or.prototype.onEnd=function(e){e===Me.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ji.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function el(e,t){var r=new Or(t);if(r.push(e,!0),r.err)throw r.msg||Qs[r.err];return r.result}function h1(e,t){return t=t||{},t.raw=!0,el(e,t)}Ki.Inflate=Or,Ki.inflate=el,Ki.inflateRaw=h1,Ki.ungzip=el;var g1=Bt.assign,p1=Bi,m1=Ki,_1=Kv,Jv={};g1(Jv,p1,m1,_1);var Qv=Jv;function b1(e){return Promise.resolve(e)}var w1="upx2px",x1=1e-4,y1=750,ed=!1,tl=0,td=0;function S1(){var{platform:e,pixelRatio:t,windowWidth:r}=yc();tl=r,td=t,ed=e==="ios"}function rd(e,t){var r=Number(e);return isNaN(r)?t:r}var id=Eb(w1,(e,t)=>{if(tl===0&&S1(),e=Number(e),e===0)return 0;var r=t||tl;{var i=__uniConfig.globalStyle||{},a=rd(i.rpxCalcMaxDeviceWidth,960),n=rd(i.rpxCalcBaseDeviceWidth,375);r=r<=a?r:n}var o=e/y1*r;return o<0&&(o=-o),o=Math.floor(o+x1),o===0&&(td===1||!ed?o=1:o=.5),e<0?-o:o}),E1=[{name:"id",type:String,required:!0}];E1.concat({name:"componentInstance",type:Object});var ad={};ad.f={}.propertyIsEnumerable;var T1=ci,C1=co,O1=_a,A1=ad.f,I1=function(e){return function(t){for(var r=O1(t),i=C1(r),a=i.length,n=0,o=[],s;a>n;)s=i[n++],(!T1||A1.call(r,s))&&o.push(e?[s,r[s]]:r[s]);return o}},nd=uo,k1=I1(!1);nd(nd.S,"Object",{values:function(t){return k1(t)}});var M1="setPageMeta",R1="loadFontFace",L1="pageScrollTo",P1=function(){if(typeof window!="object")return;if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}function e(c){try{return c.defaultView&&c.defaultView.frameElement||null}catch(h){return null}}var t=function(c){for(var h=c,w=e(h);w;)h=w.ownerDocument,w=e(h);return h}(window.document),r=[],i=null,a=null;function n(c){this.time=c.time,this.target=c.target,this.rootBounds=_(c.rootBounds),this.boundingClientRect=_(c.boundingClientRect),this.intersectionRect=_(c.intersectionRect||d()),this.isIntersecting=!!c.intersectionRect;var h=this.boundingClientRect,w=h.width*h.height,y=this.intersectionRect,T=y.width*y.height;w?this.intersectionRatio=Number((T/w).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function o(c,h){var w=h||{};if(typeof c!="function")throw new Error("callback must be a function");if(w.root&&w.root.nodeType!=1&&w.root.nodeType!=9)throw new Error("root must be a Document or Element");this._checkForIntersections=u(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=c,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(w.rootMargin),this.thresholds=this._initThresholds(w.threshold),this.root=w.root||null,this.rootMargin=this._rootMarginValues.map(function(y){return y.value+y.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return i||(i=function(c,h){!c||!h?a=d():a=b(c,h),r.forEach(function(w){w._checkForIntersections()})}),i},o._resetCrossOriginUpdater=function(){i=null,a=null},o.prototype.observe=function(c){var h=this._observationTargets.some(function(w){return w.element==c});if(!h){if(!(c&&c.nodeType==1))throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:c,entry:null}),this._monitorIntersections(c.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(c){this._observationTargets=this._observationTargets.filter(function(h){return h.element!=c}),this._unmonitorIntersections(c.ownerDocument),this._observationTargets.length==0&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var c=this._queuedEntries.slice();return this._queuedEntries=[],c},o.prototype._initThresholds=function(c){var h=c||[0];return Array.isArray(h)||(h=[h]),h.sort().filter(function(w,y,T){if(typeof w!="number"||isNaN(w)||w<0||w>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return w!==T[y-1]})},o.prototype._parseRootMargin=function(c){var h=c||"0px",w=h.split(/\s+/).map(function(y){var T=/^(-?\d*\.?\d+)(px|%)$/.exec(y);if(!T)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(T[1]),unit:T[2]}});return w[1]=w[1]||w[0],w[2]=w[2]||w[0],w[3]=w[3]||w[1],w},o.prototype._monitorIntersections=function(c){var h=c.defaultView;if(!!h&&this._monitoringDocuments.indexOf(c)==-1){var w=this._checkForIntersections,y=null,T=null;this.POLL_INTERVAL?y=h.setInterval(w,this.POLL_INTERVAL):(l(h,"resize",w,!0),l(c,"scroll",w,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in h&&(T=new h.MutationObserver(w),T.observe(c,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))),this._monitoringDocuments.push(c),this._monitoringUnsubscribes.push(function(){var N=c.defaultView;N&&(y&&N.clearInterval(y),f(N,"resize",w,!0)),f(c,"scroll",w,!0),T&&T.disconnect()});var E=this.root&&(this.root.ownerDocument||this.root)||t;if(c!=E){var O=e(c);O&&this._monitorIntersections(O.ownerDocument)}}},o.prototype._unmonitorIntersections=function(c){var h=this._monitoringDocuments.indexOf(c);if(h!=-1){var w=this.root&&(this.root.ownerDocument||this.root)||t,y=this._observationTargets.some(function(O){var N=O.element.ownerDocument;if(N==c)return!0;for(;N&&N!=w;){var R=e(N);if(N=R&&R.ownerDocument,N==c)return!0}return!1});if(!y){var T=this._monitoringUnsubscribes[h];if(this._monitoringDocuments.splice(h,1),this._monitoringUnsubscribes.splice(h,1),T(),c!=w){var E=e(c);E&&this._unmonitorIntersections(E.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var c=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var h=0;h=0&&N>=0&&{top:w,bottom:y,left:T,right:E,width:O,height:N}||null}function m(c){var h;try{h=c.getBoundingClientRect()}catch(w){}return h?(h.width&&h.height||(h={top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.right-h.left,height:h.bottom-h.top}),h):d()}function d(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function _(c){return!c||"x"in c?c:{top:c.top,y:c.top,bottom:c.bottom,left:c.left,x:c.left,right:c.right,width:c.width,height:c.height}}function b(c,h){var w=h.top-c.top,y=h.left-c.left;return{top:w,left:y,height:h.height,width:h.width,bottom:w+h.height,right:y+h.width}}function x(c,h){for(var w=h;w;){if(w==c)return!0;w=p(w)}return!1}function p(c){var h=c.parentNode;return c.nodeType==9&&c!=t?e(c):(h&&h.assignedSlot&&(h=h.assignedSlot.parentNode),h&&h.nodeType==11&&h.host?h.host:h)}function g(c){return c&&c.nodeType===9}window.IntersectionObserver=o,window.IntersectionObserverEntry=n};function rl(e){var{bottom:t,height:r,left:i,right:a,top:n,width:o}=e||{};return{bottom:t,height:r,left:i,right:a,top:n,width:o}}function N1(e){var{intersectionRatio:t,boundingClientRect:{height:r,width:i},intersectionRect:{height:a,width:n}}=e;return t!==0?t:a===r?n/i:a/r}function D1(e,t,r){P1();var i=t.relativeToSelector?e.querySelector(t.relativeToSelector):null,a=new IntersectionObserver(u=>{u.forEach(l=>{r({intersectionRatio:N1(l),intersectionRect:rl(l.intersectionRect),boundingClientRect:rl(l.boundingClientRect),relativeRect:rl(l.rootBounds),time:Date.now(),dataset:ko(l.target),id:l.target.id})})},{root:i,rootMargin:t.rootMargin,threshold:t.thresholds});if(t.observeAll){a.USE_MUTATION_OBSERVER=!0;for(var n=e.querySelectorAll(t.selector),o=0;o{var i=450,a=44;clearTimeout(t),e&&Math.abs(r.pageX-e.pageX)<=a&&Math.abs(r.pageY-e.pageY)<=a&&r.timeStamp-e.timeStamp<=i&&r.preventDefault(),e=r,t=setTimeout(()=>{e=null},i)})}}function V1(e){if(!e.length)return r=>r;var t=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(typeof r=="number")return e[r];var a={};return r.forEach(n=>{var[o,s]=n;i?a[t(o)]=t(s):a[t(o)]=s}),a};return t}function j1(e,t){if(!!t)return t.a&&(t.a=e(t.a)),t.e&&(t.e=e(t.e,!1)),t.w&&(t.w=Y1(t.w,e)),t.s&&(t.s=e(t.s)),t.t&&(t.t=e(t.t)),t}function Y1(e,t){var r={};return e.forEach(i=>{var[a,[n,o]]=i;r[t(a)]=[t(n),o]}),r}function q1(e,t){return e.priority=t,e}var il=new Set,X1=1,al=2,od=3,sd=4;function nr(e,t){il.add(q1(e,t))}function Z1(){try{[...il].sort((e,t)=>e.priority-t.priority).forEach(e=>e())}finally{il.clear()}}function ld(e,t){var r=window["__"+Ip],i=r&&r[e];if(i)return i;if(t&&t.__renderjsInstances)return t.__renderjsInstances[e]}var K1=Tu.length;function G1(e,t,r){var[i,a,n,o]=ol(t),s=nl(e,i);if(ne(r)||ne(o)){var[u,l]=n.split(".");return sl(s,a,u,l,r||o)}return ex(s,a,n)}function J1(e,t,r){var[i,a,n]=ol(t),[o,s]=n.split("."),u=nl(e,i);return sl(u,a,o,s,[rx(r,e),Di(qr(u))])}function nl(e,t){if(e.__ownerId===t)return e;for(var r=e.parentElement;r;){if(r.__ownerId===t)return r;r=r.parentElement}return e}function ol(e){return JSON.parse(e.substr(K1))}function Q1(e,t,r,i){var[a,n,o]=ol(e),s=nl(t,a),[u,l]=o.split(".");return sl(s,n,u,l,[r,i,Di(qr(s)),Di(qr(t))])}function sl(e,t,r,i,a){var n=ld(t,e);if(!n)return console.error(Io("wxs","module "+r+" not found"));var o=n[i];return oe(o)?o.apply(n,a):console.error(r+"."+i+" is not a function")}function ex(e,t,r){var i=ld(t,e);return i?Ru(i,r.substr(r.indexOf(".")+1)):console.error(Io("wxs","module "+r+" not found"))}function tx(e,t,r){var i=r;return a=>{try{Q1(t,e.$,a,i)}catch(n){console.error(n)}i=a}}function rx(e,t){var r=qr(t);return Object.defineProperty(e,"instance",{get(){return Di(r)}}),e}function ud(e,t){Object.keys(t).forEach(r=>{ax(e,t[r])})}function ix(e){var{__renderjsInstances:t}=e.$;!t||Object.keys(t).forEach(r=>{t[r].$.appContext.app.unmount()})}function ax(e,t){var r=nx(t);if(!!r){var i=e.$;(i.__renderjsInstances||(i.__renderjsInstances={}))[t]=ox(i,r)}}function nx(e){var t=window["__"+kp],r=t&&t[e];return r||console.error(Io("renderjs",e+" not found"))}function ox(e,t){return t=t.default||t,t.render=()=>{},lc(t).mixin({mounted(){this.$ownerInstance=Di(qr(e))}}).mount(document.createElement("div"))}class ii{constructor(t,r,i,a){this.isMounted=!1,this.isUnmounted=!1,this.$hasWxsProps=!1,this.$children=[],this.id=t,this.tag=r,this.pid=i,a&&(this.$=a),this.$wxsProps=new Map;var n=this.$parent=gT(i);n&&n.appendUniChild(this)}init(t){re(t,"t")&&(this.$.textContent=t.t)}setText(t){this.$.textContent=t}insert(t,r){var i=this.$,a=at(t);r===-1?a.appendChild(i):a.insertBefore(i,at(r).$),this.isMounted=!0}remove(){this.removeUniParent();var{$:t}=this;t.parentNode.removeChild(t),this.isUnmounted=!0,Eh(this.id),ix(this),this.removeUniChildren()}appendChild(t){return this.$.appendChild(t)}insertBefore(t,r){return this.$.insertBefore(t,r)}appendUniChild(t){this.$children.push(t)}removeUniChild(t){var r=this.$children.indexOf(t);r>=0&&this.$children.splice(r,1)}removeUniParent(){var{$parent:t}=this;t&&(t.removeUniChild(this),this.$parent=void 0)}removeUniChildren(){this.$children.forEach(t=>t.remove()),this.$children.length=0}setWxsProps(t){Object.keys(t).forEach(r=>{if(r.indexOf(No)===0){var i=r.replace(No,""),a=t[i],n=tx(this,t[r],a);nr(()=>n(a),sd),this.$wxsProps.set(r,n),delete t[r],delete t[i],this.$hasWxsProps=!0}})}addWxsEvents(t){Object.keys(t).forEach(r=>{var[i,a]=t[r];this.addWxsEvent(r,i,a)})}addWxsEvent(t,r,i){}wxsPropsInvoke(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.$hasWxsProps&&this.$wxsProps.get(No+t);if(a)return nr(()=>i?Vr(()=>a(r)):a(r),sd),!0}}function fd(e,t){var{__wxsAddClass:r,__wxsRemoveClass:i}=e;i&&i.length&&(t=t.split(/\s+/).filter(a=>i.indexOf(a)===-1).join(" "),i.length=0),r&&r.length&&(t=t+" "+r.join(" ")),e.className=t}function cd(e,t){var r=e.style;if(ye(t))t===""?e.removeAttribute("style"):r.cssText=_r(t,!0);else for(var i in t)ll(r,i,t[i]);var{__wxsStyle:a}=e;if(a)for(var n in a)ll(r,n,a[n])}var vd=/\s*!important$/;function ll(e,t,r){if(ne(r))r.forEach(a=>ll(e,t,a));else if(r=_r(r,!0),t.startsWith("--"))e.setProperty(t,r);else{var i=sx(e,t);vd.test(r)?e.setProperty(Ke(i),r.replace(vd,""),"important"):e[i]=r}}var dd=["Webkit"],ul={};function sx(e,t){var r=ul[t];if(r)return r;var i=Ht(t);if(i!=="filter"&&i in e)return ul[t]=i;i=Ra(i);for(var a=0;a{var[n]=pc(a);n.type=zp(a.type,r),UniViewJSBridge.publishHandler(bc,[[Qp,e,n]])};return t?xs(i,_d(t)):i}function _d(e){var t=[];return e&Lo.prevent&&t.push("prevent"),e&Lo.self&&t.push("self"),e&Lo.stop&&t.push("stop"),t}function lx(e,t,r,i){var[a,n]=Ro(t);i===-1?hd(e,a):gd(e,a)||e.addEventListener(a,e.__listeners[a]=bd(e,r,i),n)}function bd(e,t,r){var i=a=>{J1(e,t,pc(a)[0])};return r?xs(i,_d(r)):i}var ux=Cu.length;function fl(e,t){return ye(t)&&(t.indexOf(Cu)===0?t=JSON.parse(t.substr(ux)):t.indexOf(Tu)===0&&(t=G1(e,t))),t}function kn(e){return e.indexOf("--")===0}function cl(e,t){e._vod=e.style.display==="none"?"":e.style.display,e.style.display=t?e._vod:"none"}class wd extends ii{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r.tagName,i,r);this.$props=Ae({}),this.$.__id=t,this.$.__listeners=Object.create(null),this.$propNames=o,this._update=this.update.bind(this),this.init(n),this.insert(i,a)}init(t){re(t,"a")&&this.setAttrs(t.a),re(t,"s")&&this.setAttr("style",t.s),re(t,"e")&&this.addEvents(t.e),re(t,"w")&&this.addWxsEvents(t.w),super.init(t),H(this.$props,()=>{nr(this._update,X1)},{flush:"sync"}),this.update(!0)}setAttrs(t){this.setWxsProps(t),Object.keys(t).forEach(r=>{this.setAttr(r,t[r])})}addEvents(t){Object.keys(t).forEach(r=>{this.addEvent(r,t[r])})}addWxsEvent(t,r,i){lx(this.$,t,r,i)}addEvent(t,r){pd(this.$,t,r)}removeEvent(t){pd(this.$,t,-1)}setAttr(t,r){t===Au?fd(this.$,r):t===Po?cd(this.$,r):t===Na?cl(this.$,r):t===Iu?this.$.__ownerId=r:t===ku?nr(()=>ud(this,r),od):t===Up?this.$.innerHTML=r:t===Hp?this.setText(r):this.setAttribute(t,r)}removeAttr(t){t===Au?fd(this.$,""):t===Po?cd(this.$,""):this.removeAttribute(t)}setAttribute(t,r){r=fl(this.$,r),this.$propNames.indexOf(t)!==-1?this.$props[t]=r:kn(t)?this.$.style.setProperty(t,r):this.wxsPropsInvoke(t,r)||this.$.setAttribute(t,r)}removeAttribute(t){this.$propNames.indexOf(t)!==-1?delete this.$props[t]:kn(t)?this.$.style.removeProperty(t):this.$.removeAttribute(t)}update(){}}class fx extends ii{constructor(t,r,i){super(t,"#comment",r,document.createComment(""));this.insert(r,i)}}var jT="";function xd(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,(t,r)=>"".concat(uni.upx2px(parseFloat(r)),"px")):/^-?[\d\.]+$/.test(e)?"".concat(e,"px"):e||""}function cx(e){return e.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())).replace("webkit","-webkit")}function vx(e){var t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],r=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],i=["opacity","background-color"],a=["width","height","left","right","top","bottom"],n=e.animates,o=e.option,s=o.transition,u={},l=[];return n.forEach(f=>{var v=f.type,m=[...f.args];if(t.concat(r).includes(v))v.startsWith("rotate")||v.startsWith("skew")?m=m.map(_=>parseFloat(_)+"deg"):v.startsWith("translate")&&(m=m.map(xd)),r.indexOf(v)>=0&&(m.length=1),l.push("".concat(v,"(").concat(m.join(","),")"));else if(i.concat(a).includes(m[0])){v=m[0];var d=m[1];u[v]=a.includes(v)?xd(d):d}}),u.transform=u.webkitTransform=l.join(" "),u.transition=u.webkitTransition=Object.keys(u).map(f=>"".concat(cx(f)," ").concat(s.duration,"ms ").concat(s.timingFunction," ").concat(s.delay,"ms")).join(","),u.transformOrigin=u.webkitTransformOrigin=o.transformOrigin,u}function yd(e){var t=e.animation;if(!t||!t.actions||!t.actions.length)return;var r=0,i=t.actions,a=t.actions.length;function n(){var o=i[r],s=o.option.transition,u=vx(o);Object.keys(u).forEach(l=>{e.$el.style[l]=u[l]}),r+=1,r{n()},0)}var Mn={props:["animation"],watch:{animation:{deep:!0,handler(){yd(this)}}},mounted(){yd(this)}},ge=e=>{e.__reserved=!0;var{props:t,mixins:r}=e;return(!t||!t.animation)&&(r||(e.mixins=[])).push(Mn),dx(e)},dx=e=>(e.__reserved=!0,e.compatConfig={MODE:3},L0(e)),hx={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function vl(e){var t=U(!1),r=!1,i,a;function n(){requestAnimationFrame(()=>{clearTimeout(a),a=setTimeout(()=>{t.value=!1},parseInt(e.hoverStayTime))})}function o(l){l._hoverPropagationStopped||!e.hoverClass||e.hoverClass==="none"||e.disabled||l.touches.length>1||(e.hoverStopPropagation&&(l._hoverPropagationStopped=!0),r=!0,i=setTimeout(()=>{t.value=!0,r||n()},parseInt(e.hoverStartTime)))}function s(){r=!1,t.value&&n()}function u(){r=!1,t.value=!1,clearTimeout(i)}return{hovering:t,binding:{onTouchstartPassive:o,onTouchend:s,onTouchcancel:u}}}function ai(e,t){return ye(t)&&(t=[t]),t.reduce((r,i)=>(e[i]&&(r[i]=!0),r),Object.create(null))}function Ar(e){return e.__wwe=!0,e}function Pe(e,t){return(r,i,a)=>{e.value&&t(r,px(r,i,e.value,a||{}))}}function gx(e){return(t,r)=>{e(t,mc(r))}}function px(e,t,r,i){var a=Mo(r);return{type:i.type||e,timeStamp:t.timeStamp||0,target:a,currentTarget:a,detail:i}}var It=cn("uf"),mx=ge({name:"Form",emits:["submit","reset"],setup(e,t){var{slots:r,emit:i}=t,a=U(null);return _x(Pe(a,i)),()=>I("uni-form",{ref:a},[I("span",null,[r.default&&r.default()])],512)}});function _x(e){var t=[];return ze(It,{addField(r){t.push(r)},removeField(r){t.splice(t.indexOf(r),1)},submit(r){e("submit",r,{value:t.reduce((i,a)=>{if(a.submit){var[n,o]=a.submit();n&&(i[n]=o)}return i},Object.create(null))})},reset(r){t.forEach(i=>i.reset&&i.reset()),e("reset",r)}}),t}var Qi=cn("ul"),bx={for:{type:String,default:""}},wx=ge({name:"Label",props:bx,setup(e,t){var{slots:r}=t,i=hn(),a=xx(),n=ee(()=>e.for||r.default&&r.default.length),o=Ar(s=>{var u=s.target,l=/^uni-(checkbox|radio|switch)-/.test(u.className);l||(l=/^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(u.tagName)),!l&&(e.for?UniViewJSBridge.emit("uni-label-click-"+i+"-"+e.for,s,!0):a.length&&a[0](s,!0))});return()=>I("uni-label",{class:{"uni-label-pointer":n},onClick:o},[r.default&&r.default()],10,["onClick"])}});function xx(){var e=[];return ze(Qi,{addHandler(t){e.push(t)},removeHandler(t){e.splice(e.indexOf(t),1)}}),e}function Rn(e,t){Sd(e.id,t),H(()=>e.id,(r,i)=>{Ed(i,t,!0),Sd(r,t,!0)}),Zt(()=>{Ed(e.id,t)})}function Sd(e,t,r){var i=hn();r&&!e||!mt(t)||Object.keys(t).forEach(a=>{r?a.indexOf("@")!==0&&a.indexOf("uni-")!==0&&UniViewJSBridge.on("uni-".concat(a,"-").concat(i,"-").concat(e),t[a]):a.indexOf("uni-")===0?UniViewJSBridge.on(a,t[a]):e&&UniViewJSBridge.on("uni-".concat(a,"-").concat(i,"-").concat(e),t[a])})}function Ed(e,t,r){var i=hn();r&&!e||!mt(t)||Object.keys(t).forEach(a=>{r?a.indexOf("@")!==0&&a.indexOf("uni-")!==0&&UniViewJSBridge.off("uni-".concat(a,"-").concat(i,"-").concat(e),t[a]):a.indexOf("uni-")===0?UniViewJSBridge.off(a,t[a]):e&&UniViewJSBridge.off("uni-".concat(a,"-").concat(i,"-").concat(e),t[a])})}var yx={id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},Sx=ge({name:"Button",props:yx,setup(e,t){var{slots:r}=t,i=U(null);ym();var a=_e(It,!1),{hovering:n,binding:o}=vl(e),{t:s}=Ge(),u=Ar((f,v)=>{if(e.disabled)return f.stopImmediatePropagation();v&&i.value.click();var m=e.formType;if(m){if(!a)return;m==="submit"?a.submit(f):m==="reset"&&a.reset(f);return}e.openType==="feedback"&&Ex(s("uni.button.feedback.title"),s("uni.button.feedback.send"))}),l=_e(Qi,!1);return l&&(l.addHandler(u),Ce(()=>{l.removeHandler(u)})),Rn(e,{"label-click":u}),()=>{var f=e.hoverClass,v=ai(e,"disabled"),m=ai(e,"loading"),d=ai(e,"plain"),_=f&&f!=="none";return I("uni-button",et({ref:i,onClick:u,class:_&&n.value?f:""},_&&o,v,m,d),[r.default&&r.default()],16,["onClick"])}}});function Ex(e,t){var r=plus.webview.create("https://service.dcloud.net.cn/uniapp/feedback.html","feedback",{titleNView:{titleText:e,autoBackButton:!0,backgroundColor:"#F7F7F7",titleColor:"#007aff",buttons:[{text:t,color:"#007aff",fontSize:"16px",fontWeight:"bold",onclick:function(){r.evalJS('typeof mui !== "undefined" && mui.trigger(document.getElementById("submit"),"tap")')}}]}});r.show("slide-in-right")}var Ir=ge({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,t){var{emit:r}=t,i=U(null),a=Cx(i),n=Tx(i,r,a);return Ox(i,e,n,a),()=>I("uni-resize-sensor",{ref:i,onAnimationstartOnce:n},[I("div",{onScroll:n},[I("div",null,null)],40,["onScroll"]),I("div",{onScroll:n},[I("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});function Tx(e,t,r){var i=Ae({width:-1,height:-1});return H(()=>ve({},i),a=>t("resize",a)),()=>{var a=e.value;i.width=a.offsetWidth,i.height=a.offsetHeight,r()}}function Cx(e){return()=>{var{firstElementChild:t,lastElementChild:r}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,r.scrollLeft=1e5,r.scrollTop=1e5}}function Ox(e,t,r,i){ss(i),Re(()=>{t.initial&&Vr(r);var a=e.value;a.offsetParent!==a.parentElement&&(a.parentElement.style.position="relative"),"AnimationEvent"in window||i()})}var be=function(){var e=document.createElement("canvas");e.height=e.width=0;var t=e.getContext("2d"),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/r}();function Td(e){e.width=e.offsetWidth*be,e.height=e.offsetHeight*be,e.getContext("2d").__hidpi__=!0}var Cd=!1;function Ax(){if(!Cd){Cd=!0;var e=function(i,a){for(var n in i)re(i,n)&&a(i[n],n)},t={fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all",setTransform:[4,5]},r=CanvasRenderingContext2D.prototype;r.drawImageByCanvas=function(i){return function(a,n,o,s,u,l,f,v,m,d){if(!this.__hidpi__)return i.apply(this,arguments);n*=be,o*=be,s*=be,u*=be,l*=be,f*=be,v=d?v*be:v,m=d?m*be:m,i.call(this,a,n,o,s,u,l,f,v,m)}}(r.drawImage),be!==1&&(e(t,function(i,a){r[a]=function(n){return function(){if(!this.__hidpi__)return n.apply(this,arguments);var o=Array.prototype.slice.call(arguments);if(i==="all")o=o.map(function(u){return u*be});else if(Array.isArray(i))for(var s=0;sAx());function Od(e){return e&&vt(e)}function Ln(e){return e=e.slice(0),e[3]=e[3]/255,"rgba("+e.join(",")+")"}function Ad(e,t){var r=e;return Array.from(t).map(i=>{var a=r.getBoundingClientRect();return{identifier:i.identifier,x:i.clientX-a.left,y:i.clientY-a.top}})}var ea;function Id(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ea||(ea=document.createElement("canvas")),ea.width=e,ea.height=t,ea}var kx={canvasId:{type:String,default:""},disableScroll:{type:[Boolean,String],default:!1}},Mx=ge({inheritAttrs:!1,name:"Canvas",compatConfig:{MODE:3},props:kx,computed:{id(){return this.canvasId}},setup(e,t){var{emit:r,slots:i}=t;Ix();var a=U(null),n=U(null),o=U(!1),s=gx(r),{$attrs:u,$excludeAttrs:l,$listeners:f}=Xd({excludeListeners:!0}),{_listeners:v}=Rx(e,f,s),{_handleSubscribe:m,_resize:d}=Lx(a,o);return Vn(m,jn(e.canvasId),!0),Re(()=>{d()}),()=>{var{canvasId:_,disableScroll:b}=e;return I("uni-canvas",et({"canvas-id":_,"disable-scroll":b},u.value,l.value,v.value),[I("canvas",{ref:a,class:"uni-canvas-canvas",width:"300",height:"150"},null,512),I("div",{style:"position: absolute;top: 0;left: 0;width: 100%;height: 100%;overflow: hidden;"},[i.default&&i.default()]),I(Ir,{ref:n,onResize:d},null,8,["onResize"])],16,["canvas-id","disable-scroll"])}}});function Rx(e,t,r){var i=ee(()=>{var a=["onTouchstart","onTouchmove","onTouchend"],n=t.value,o=ve({},(()=>{var s={};for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)){var l=n[u];s[u]=l}return s})());return a.forEach(s=>{var u=o[s],l=[];u&&l.push(Ar(f=>{r(s.replace("on","").toLocaleLowerCase(),ve({},(()=>{var v={};for(var m in f)v[m]=f[m];return v})(),{touches:Ad(f.currentTarget,f.touches),changedTouches:Ad(f.currentTarget,f.changedTouches)}))})),e.disableScroll&&s==="onTouchmove"&&l.push(cc),o[s]=l}),o});return{_listeners:i}}function Lx(e,t){var r=[],i={};function a(d){var _=e.value,b=!d||_.width!==Math.floor(d.width*be)||_.height!==Math.floor(d.height*be);if(!!b)if(_.width>0&&_.height>0){var x=_.getContext("2d"),p=x.getImageData(0,0,_.width,_.height);Td(_),x.putImageData(p,0,0)}else Td(_)}function n(d,_){var{actions:b,reserve:x}=d;if(!!b){if(t.value){r.push([b,x]);return}var p=e.value,g=p.getContext("2d");x||(g.fillStyle="#000000",g.strokeStyle="#000000",g.shadowColor="#000000",g.shadowBlur=0,g.shadowOffsetX=0,g.shadowOffsetY=0,g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,p.width,p.height)),o(b);for(var c=function(y){var T=b[y],E=T.method,O=T.data,N=O[0];if(/^set/.test(E)&&E!=="setTransform"){var R=E[3].toLowerCase()+E.slice(4),V;if(R==="fillStyle"||R==="strokeStyle"){if(N==="normal")V=Ln(O[1]);else if(N==="linear"){var ue=g.createLinearGradient(...O[1]);O[2].forEach(function(K){var ie=K[0],le=Ln(K[1]);ue.addColorStop(ie,le)}),V=ue}else if(N==="radial"){var M=O[1],B=M[0],Q=M[1],te=M[2],W=g.createRadialGradient(B,Q,0,B,Q,te);O[2].forEach(function(K){var ie=K[0],le=Ln(K[1]);W.addColorStop(ie,le)}),V=W}else if(N==="pattern"){var G=s(O[1],b.slice(y+1),_,function(K){K&&(g[R]=g.createPattern(K,O[2]))});return G?"continue":"break"}g[R]=V}else if(R==="globalAlpha")g[R]=Number(N)/255;else if(R==="shadow"){var ae=["shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor"];O.forEach(function(K,ie){g[ae[ie]]=ae[ie]==="shadowColor"?Ln(K):K})}else if(R==="fontSize"){var Se=g.__font__||g.font;g.__font__=g.font=Se.replace(/\d+\.?\d*px/,N+"px")}else R==="lineDash"?(g.setLineDash(N),g.lineDashOffset=O[1]||0):R==="textBaseline"?(N==="normal"&&(O[0]="alphabetic"),g[R]=N):R==="font"?g.__font__=g.font=N:g[R]=N}else if(E==="fillPath"||E==="strokePath")E=E.replace(/Path/,""),g.beginPath(),O.forEach(function(K){g[K.method].apply(g,K.data)}),g[E]();else if(E==="fillText")g.fillText.apply(g,O);else if(E==="drawImage"){var se=function(){var K=[...O],ie=K[0],le=K.slice(1);if(i=i||{},s(ie,b.slice(y+1),_,function(Ie){Ie&&g.drawImage.apply(g,[Ie].concat([...le.slice(4,8)],[...le.slice(0,4)]))}))return"break"}();if(se==="break")return"break"}else E==="clip"?(O.forEach(function(K){g[K.method].apply(g,K.data)}),g.clip()):g[E].apply(g,O)},h=0;h{c.src=h}).catch(()=>{c.src=p})}})}function s(d,_,b,x){var p=i[d];return p.ready?(x(p),!0):(r.unshift([_,!0]),t.value=!0,p.onload=function(){p.ready=!0,x(p),t.value=!1;var g=r.slice(0);r=[];for(var c=g.shift();c;)n({actions:c[0],reserve:c[1]},b),c=g.shift()},!1)}function u(d,_){var{x:b=0,y:x=0,width:p,height:g,destWidth:c,destHeight:h,hidpi:w=!0,dataType:y,quality:T=1,type:E="png"}=d,O=e.value,N,R=O.offsetWidth-b;p=p?Math.min(p,R):R;var V=O.offsetHeight-x;g=g?Math.min(g,V):V,w?(c=p,h=g):!c&&!h?(c=Math.round(p*be),h=Math.round(g*be)):c?h||(h=Math.round(g/p*c)):c=Math.round(p/g*h);var ue=Id(c,h),M=ue.getContext("2d");(E==="jpeg"||E==="jpg")&&(E="jpeg",M.fillStyle="#fff",M.fillRect(0,0,c,h)),M.__hidpi__=!0,M.drawImageByCanvas(O,b,x,p,g,0,0,c,h,!1);var B;try{var Q;if(y==="base64")N=ue.toDataURL("image/".concat(E),T);else{var te=M.getImageData(0,0,c,h);N=Qv.deflateRaw(te.data,{to:"string"}),Q=!0}B={data:N,compressed:Q,width:c,height:h}}catch(W){B={errMsg:"canvasGetImageData:fail ".concat(W)}}if(ue.height=ue.width=0,M.__hidpi__=!1,_)_(B);else return B}function l(d,_){var{data:b,x,y:p,width:g,height:c,compressed:h}=d;try{h&&(b=Qv.inflateRaw(b)),c||(c=Math.round(b.length/4/g));var w=Id(g,c),y=w.getContext("2d");y.putImageData(new ImageData(new Uint8ClampedArray(b),g,c),0,0),e.value.getContext("2d").drawImage(w,x,p,g,c),w.height=w.width=0}catch(T){_({errMsg:"canvasPutImageData:fail"});return}_({errMsg:"canvasPutImageData:ok"})}function f(d,_){var{x:b=0,y:x=0,width:p,height:g,destWidth:c,destHeight:h,fileType:w,quality:y,dirname:T}=d,E=u({x:b,y:x,width:p,height:g,destWidth:c,destHeight:h,hidpi:!1,dataType:"base64",type:w,quality:y});if(!E.data||!E.data.length){_({errMsg:E.errMsg.replace("canvasPutImageData","toTempFilePath")});return}Ob(E.data,T,(O,N)=>{var R="toTempFilePath:".concat(O?"fail":"ok");O&&(R+=" ".concat(O.message)),_({errMsg:R,tempFilePath:N})})}var v={actionsChanged:n,getImageData:u,putImageData:l,toTempFilePath:f};function m(d,_,b){var x=v[d];d.indexOf("_")!==0&&typeof x=="function"&&x(_,b)}return ve(v,{_resize:a,_handleSubscribe:m})}var kd=cn("ucg"),Px={name:{type:String,default:""}},Nx=ge({name:"CheckboxGroup",props:Px,emits:["change"],setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=Pe(a,r);return Dx(e,n),()=>I("uni-checkbox-group",{ref:a},[i.default&&i.default()],512)}});function Dx(e,t){var r=[],i=()=>r.reduce((n,o)=>(o.value.checkboxChecked&&n.push(o.value.value),n),new Array);ze(kd,{addField(n){r.push(n)},removeField(n){r.splice(r.indexOf(n),1)},checkboxChange(n){t("change",n,{value:i()})}});var a=_e(It,!1);return a&&a.addField({submit:()=>{var n=["",null];return e.name!==""&&(n[0]=e.name,n[1]=i()),n}}),i}var Bx={checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},$x=ge({name:"Checkbox",props:Bx,setup(e,t){var{slots:r}=t,i=U(e.checked),a=U(e.value);H([()=>e.checked,()=>e.value],l=>{var[f,v]=l;i.value=f,a.value=v});var n=()=>{i.value=!1},{uniCheckGroup:o,uniLabel:s}=Fx(i,a,n),u=l=>{e.disabled||(i.value=!i.value,o&&o.checkboxChange(l))};return s&&(s.addHandler(u),Ce(()=>{s.removeHandler(u)})),Rn(e,{"label-click":u}),()=>{var l=ai(e,"disabled");return I("uni-checkbox",et(l,{onClick:u}),[I("div",{class:"uni-checkbox-wrapper"},[I("div",{class:["uni-checkbox-input",{"uni-checkbox-input-disabled":e.disabled}]},[i.value?dn(vn,e.color,22):""],2),r.default&&r.default()])],16,["onClick"])}}});function Fx(e,t,r){var i=ee(()=>({checkboxChecked:Boolean(e.value),value:t.value})),a={reset:r},n=_e(kd,!1);n&&n.addField(i);var o=_e(It,!1);o&&o.addField(a);var s=_e(Qi,!1);return Ce(()=>{n&&n.removeField(i),o&&o.removeField(a)}),{uniCheckGroup:n,uniForm:o,uniLabel:s}}var Md,ta,Pn,or,Nn,dl;$r(()=>{ta=plus.os.name==="Android",Pn=plus.os.version||""}),document.addEventListener("keyboardchange",function(e){or=e.height,Nn&&Nn()},!1);function Rd(){}function ra(e,t,r){$r(()=>{var i="adjustResize",a="adjustPan",n="nothing",o=plus.webview.currentWebview(),s=dl||o.getStyle()||{},u={mode:r||s.softinputMode===i?i:e.adjustPosition?a:n,position:{top:0,height:0}};if(u.mode===a){var l=t.getBoundingClientRect();u.position.top=l.top,u.position.height=l.height+(Number(e.cursorSpacing)||0)}o.setSoftinputTemporary(u)})}function zx(e,t){if(e.showConfirmBar==="auto"){delete t.softinputNavBar;return}$r(()=>{var r=plus.webview.currentWebview(),{softinputNavBar:i}=r.getStyle()||{},a=i!=="none";a!==e.showConfirmBar?(t.softinputNavBar=i||"auto",r.setStyle({softinputNavBar:e.showConfirmBar?"auto":"none"})):delete t.softinputNavBar})}function Ux(e){var t=e.softinputNavBar;t&&$r(()=>{var r=plus.webview.currentWebview();r.setStyle({softinputNavBar:t})})}var Ld={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}},Pd=["keyboardheightchange"];function Nd(e,t,r){var i={};function a(n){var o,s=()=>{r("keyboardheightchange",{},{height:or,duration:.25}),o&&or===0&&ra(e,n),e.autoBlur&&o&&or===0&&(ta||parseInt(Pn)>=13)&&document.activeElement.blur()};n.addEventListener("focus",()=>{o=!0,clearTimeout(Md),document.addEventListener("click",Rd,!1),Nn=s,or&&r("keyboardheightchange",{},{height:or,duration:0}),zx(e,i),ra(e,n)}),ta&&n.addEventListener("click",()=>{!e.disabled&&!e.readOnly&&o&&or===0&&ra(e,n)}),ta||(parseInt(Pn)<12&&n.addEventListener("touchstart",()=>{!e.disabled&&!e.readOnly&&!o&&ra(e,n)}),parseFloat(Pn)>=14.6&&!dl&&$r(()=>{var l=plus.webview.currentWebview();dl=l.getStyle()||{}}));var u=()=>{document.removeEventListener("click",Rd,!1),Nn=null,or&&r("keyboardheightchange",{},{height:0,duration:0}),Ux(i),ta&&(Md=setTimeout(()=>{ra(e,n,!0)},300)),String(navigator.vendor).indexOf("Apple")===0&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)};n.addEventListener("blur",()=>{n.blur(),o=!1,u()})}H(()=>t.value,n=>a(n))}var Dd=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,Bd=/^<\/([-A-Za-z0-9_]+)[^>]*>/,Hx=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,Wx=ni("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),Vx=ni("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),jx=ni("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),Yx=ni("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),qx=ni("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),Xx=ni("script,style");function $d(e,t){var r,i,a,n=[],o=e;for(n.last=function(){return this[this.length-1]};e;){if(i=!0,!n.last()||!Xx[n.last()]){if(e.indexOf(""),r>=0&&(t.comment&&t.comment(e.substring(4,r)),e=e.substring(r+3),i=!1)):e.indexOf("]*>"),function(f,v){return v=v.replace(/|/g,"$1$2"),t.chars&&t.chars(v),""}),l("",n.last());if(e==o)throw"Parse Error: "+e;o=e}l();function u(f,v,m,d){if(v=v.toLowerCase(),Vx[v])for(;n.last()&&jx[n.last()];)l("",n.last());if(Yx[v]&&n.last()==v&&l("",v),d=Wx[v]||!!d,d||n.push(v),t.start){var _=[];m.replace(Hx,function(b,x){var p=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:qx[x]?x:"";_.push({name:x,value:p,escaped:p.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(v,_,d)}}function l(f,v){if(v)for(var m=n.length-1;m>=0&&n[m]!=v;m--);else var m=0;if(m>=0){for(var d=n.length-1;d>=m;d--)t.end&&t.end(n[d]);n.length=m}}}function ni(e){for(var t={},r=e.split(","),i=0;io()),delete hl[t]}}a.push(r)}function Zx(e){var t=e.import("blots/block/embed");class r extends t{}return r.blotName="divider",r.tagName="HR",{"formats/divider":r}}function Kx(e){var t=e.import("blots/inline");class r extends t{}return r.blotName="ins",r.tagName="INS",{"formats/ins":r}}function Gx(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK,whitelist:["left","right","center","justify"]},a=new r.Style("align","text-align",i);return{"formats/align":a}}function Jx(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK,whitelist:["rtl"]},a=new r.Style("direction","direction",i);return{"formats/direction":a}}function Qx(e){var t=e.import("parchment"),r=e.import("blots/container"),i=e.import("formats/list/item");class a extends r{static create(o){var s=o==="ordered"?"OL":"UL",u=super.create(s);return(o==="checked"||o==="unchecked")&&u.setAttribute("data-checked",o==="checked"),u}static formats(o){if(o.tagName==="OL")return"ordered";if(o.tagName==="UL")return o.hasAttribute("data-checked")?o.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}constructor(o){super(o);var s=u=>{if(u.target.parentNode===o){var l=this.statics.formats(o),f=t.find(u.target);l==="checked"?f.format("list","unchecked"):l==="unchecked"&&f.format("list","checked")}};o.addEventListener("click",s)}format(o,s){this.children.length>0&&this.children.tail.format(o,s)}formats(){return{[this.statics.blotName]:this.statics.formats(this.domNode)}}insertBefore(o,s){if(o instanceof i)super.insertBefore(o,s);else{var u=s==null?this.length():s.offset(this),l=this.split(u);l.parent.insertBefore(o,l)}}optimize(o){super.optimize(o);var s=this.next;s!=null&&s.prev===this&&s.statics.blotName===this.statics.blotName&&s.domNode.tagName===this.domNode.tagName&&s.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(s.moveChildren(this),s.remove())}replace(o){if(o.statics.blotName!==this.statics.blotName){var s=t.create(this.statics.defaultChild);o.moveChildren(s),this.appendChild(s)}super.replace(o)}}return a.blotName="list",a.scope=t.Scope.BLOCK_BLOT,a.tagName=["OL","UL"],a.defaultChild="list-item",a.allowedChildren=[i],{"formats/list":a}}function ey(e){var{Scope:t}=e.import("parchment"),r=e.import("formats/background"),i=new r.constructor("backgroundColor","background-color",{scope:t.INLINE});return{"formats/backgroundColor":i}}function ty(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK},a=["margin","marginTop","marginBottom","marginLeft","marginRight"],n=["padding","paddingTop","paddingBottom","paddingLeft","paddingRight"],o={};return a.concat(n).forEach(s=>{o["formats/".concat(s)]=new r.Style(s,Ke(s),i)}),o}function ry(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.INLINE},a=["font","fontSize","fontStyle","fontVariant","fontWeight","fontFamily"],n={};return a.forEach(o=>{n["formats/".concat(o)]=new r.Style(o,Ke(o),i)}),n}function iy(e){var{Scope:t,Attributor:r}=e.import("parchment"),i=[{name:"lineHeight",scope:t.BLOCK},{name:"letterSpacing",scope:t.INLINE},{name:"textDecoration",scope:t.INLINE},{name:"textIndent",scope:t.BLOCK}],a={};return i.forEach(n=>{var{name:o,scope:s}=n;a["formats/".concat(o)]=new r.Style(o,Ke(o),{scope:s})}),a}function ay(e){var t=e.import("formats/image"),r=["alt","height","width","data-custom","class","data-local"];t.sanitize=a=>a&&vt(a),t.formats=function(n){return r.reduce(function(o,s){return n.hasAttribute(s)&&(o[s]=n.getAttribute(s)),o},{})};var i=t.prototype.format;t.prototype.format=function(a,n){r.indexOf(a)>-1?n?this.domNode.setAttribute(a,n):this.domNode.removeAttribute(a):i.call(this,a,n)}}function ny(e){var t=e.import("formats/link");t.sanitize=r=>{var i=document.createElement("a");i.href=r;var a=i.href.slice(0,i.href.indexOf(":"));return t.PROTOCOL_WHITELIST.concat("file").indexOf(a)>-1?r:t.SANITIZED_URL}}function oy(e){var t={divider:Zx,ins:Kx,align:Gx,direction:Jx,list:Qx,background:ey,box:ty,font:ry,text:iy,image:ay,link:ny},r={};Object.values(t).forEach(i=>ve(r,i(e))),e.register(r,!0)}function sy(e,t,r){var i,a,n,o=!1;H(()=>e.readOnly,_=>{i&&(n.enable(!_),_||n.blur())}),H(()=>e.placeholder,_=>{i&&l(_)});function s(_){var b=["span","strong","b","ins","em","i","u","a","del","s","sub","sup","img","div","p","h1","h2","h3","h4","h5","h6","hr","ol","ul","li","br"],x="",p;$d(_,{start:function(c,h,w){if(!b.includes(c)){p=!w;return}p=!1;var y=h.map(E=>{var{name:O,value:N}=E;return"".concat(O,'="').concat(N,'"')}).join(" "),T="<".concat(c," ").concat(y," ").concat(w?"/":"",">");x+=T},end:function(c){p||(x+=""))},chars:function(c){p||(x+=c)}}),a=!0;var g=n.clipboard.convert(x);return a=!1,g}function u(){var _=n.root.innerHTML,b=n.getText(),x=n.getContents();return{html:_,text:b,delta:x}}function l(_){var b="data-placeholder",x=n.root;x.getAttribute(b)!==_&&x.setAttribute(b,_)}var f={};function v(_){var b=_?n.getFormat(_):{},x=Object.keys(b);(x.length!==Object.keys(f).length||x.find(p=>b[p]!==f[p]))&&(f=b,r("statuschange",{},b))}function m(_){var b=window.Quill;oy(b);var x={toolbar:!1,readOnly:e.readOnly,placeholder:e.placeholder};_.length&&(b.register("modules/ImageResize",window.ImageResize.default),x.modules={ImageResize:{modules:_}});var p=t.value;n=new b(p,x);var g=n.root,c=["focus","blur","input"];c.forEach(h=>{g.addEventListener(h,w=>{var y=u();if(h==="input"){if(yc().platform==="ios"){var T=(y.html.match(/([\s\S]*)<\/span>/)||[])[1],E=T&&T.replace(/\s/g,"")?"":e.placeholder;l(E)}w.stopPropagation()}else r(h,w,y)})}),n.on("text-change",()=>{o||r("input",{},u())}),n.on("selection-change",v),n.on("scroll-optimize",()=>{var h=n.selection.getRange()[0];v(h)}),n.clipboard.addMatcher(Node.ELEMENT_NODE,(h,w)=>(a||w.ops&&(w.ops=w.ops.filter(y=>{var{insert:T}=y;return typeof T=="string"}).map(y=>{var{insert:T}=y;return{insert:T}})),w)),i=!0,r("ready",{},{})}Re(()=>{var _=[];e.showImgSize&&_.push("DisplaySize"),e.showImgToolbar&&_.push("Toolbar"),e.showImgResize&&_.push("Resize");var b="./__uniappquill.js";Fd(window.Quill,b,()=>{if(_.length){var x="./__uniappquillimageresize.js";Fd(window.ImageResize,x,()=>{m(_)})}else m(_)})});var d=jn();Vn((_,b,x)=>{var{options:p,callbackId:g}=b,c,h,w;if(i){var y=window.Quill;switch(_){case"format":{var{name:T="",value:E=!1}=p;h=n.getSelection(!0);var O=n.getFormat(h)[T]||!1;if(["bold","italic","underline","strike","ins"].includes(T))E=!O;else if(T==="direction"){E=E==="rtl"&&O?!1:E;var N=n.getFormat(h).align;E==="rtl"&&!N?n.format("align","right","user"):!E&&N==="right"&&n.format("align",!1,"user")}else if(T==="indent"){var R=n.getFormat(h).direction==="rtl";E=E==="+1",R&&(E=!E),E=E?"+1":"-1"}else T==="list"&&(E=E==="check"?"unchecked":E,O=O==="checked"?"unchecked":O),E=O&&O!==(E||!1)||!O&&E?E:!O;n.format(T,E,"user")}break;case"insertDivider":h=n.getSelection(!0),n.insertText(h.index,mi,"user"),n.insertEmbed(h.index+1,"divider",!0,"user"),n.setSelection(h.index+2,0,"silent");break;case"insertImage":{h=n.getSelection(!0);var{src:V="",alt:ue="",width:M="",height:B="",extClass:Q="",data:te={}}=p,W=vt(V);n.insertEmbed(h.index,"image",W,"user");var G=/^(file|blob):/.test(W)?W:!1;o=!0,n.formatText(h.index,1,"data-local",G),n.formatText(h.index,1,"alt",ue),n.formatText(h.index,1,"width",M),n.formatText(h.index,1,"height",B),n.formatText(h.index,1,"class",Q),o=!1,n.formatText(h.index,1,"data-custom",Object.keys(te).map(ie=>"".concat(ie,"=").concat(te[ie])).join("&")),n.setSelection(h.index+1,0,"silent")}break;case"insertText":{h=n.getSelection(!0);var{text:ae=""}=p;n.insertText(h.index,ae,"user"),n.setSelection(h.index+ae.length,0,"silent")}break;case"setContents":{var{delta:Se,html:se}=p;typeof Se=="object"?n.setContents(Se,"silent"):typeof se=="string"?n.setContents(s(se),"silent"):w="contents is missing"}break;case"getContents":c=u();break;case"clear":n.setText("");break;case"removeFormat":{h=n.getSelection(!0);var K=y.import("parchment");h.length?n.removeFormat(h.index,h.length,"user"):Object.keys(n.getFormat(h)).forEach(ie=>{K.query(ie,K.Scope.INLINE)&&n.format(ie,!1)})}break;case"undo":n.history.undo();break;case"redo":n.history.redo();break;case"blur":n.blur();break;case"getSelectionText":h=n.selection.savedRange,c={text:""},h&&h.length!==0&&(c.text=n.getText(h.index,h.length));break;case"scrollIntoView":n.scrollIntoView();break}v(h)}else w="not ready";g&&x({callbackId:g,data:ve({},c,{errMsg:"".concat(_,":").concat(w?"fail "+w:"ok")})})},d,!0)}var ly=ve({},Ld,{id:{type:String,default:""},readOnly:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},showImgSize:{type:[Boolean,String],default:!1},showImgToolbar:{type:[Boolean,String],default:!1},showImgResize:{type:[Boolean,String],default:!1}}),uy=ge({name:"Editor",props:ly,emit:["ready","focus","blur","input","statuschange",...Pd],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r);return sy(e,i,a),Nd(e,i,a),()=>I("uni-editor",{ref:i,id:e.id,class:"ql-container"},null,8,["id"])}}),zd="#10aeff",fy="#f76260",Ud="#b2b2b2",cy="#f43530",vy={success:{d:ib,c:Pa},success_no_circle:{d:vn,c:Pa},info:{d:tb,c:zd},warn:{d:nb,c:fy},waiting:{d:ab,c:zd},cancel:{d:J_,c:cy},download:{d:eb,c:Pa},search:{d:rb,c:Ud},clear:{d:Q_,c:Ud}},dy=ge({name:"Icon",props:{type:{type:String,required:!0,default:""},size:{type:[String,Number],default:23},color:{type:String,default:""}},setup(e){var t=ee(()=>vy[e.type]);return()=>{var{value:r}=t;return I("uni-icon",null,[r&&r.d&&dn(r.d,e.color||r.c,_r(e.size))])}}}),hy={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},Dn={widthFix:["offsetWidth","height"],heightFix:["offsetHeight","width"]},gy={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},py=ge({name:"Image",props:hy,setup(e,t){var{emit:r}=t,i=U(null),a=my(i,e),n=Pe(i,r),{fixSize:o}=xy(i,e,a);return _y(a,o,n),()=>{var{mode:s}=e,{imgSrc:u,modeStyle:l,src:f}=a,v;return v=u?I("img",{src:u,draggable:e.draggable},null,8,["src","draggable"]):I("img",null,null),I("uni-image",{ref:i},[I("div",{style:l},null,4),v,Dn[s]?I(Ir,{onResize:o},null,8,["onResize"]):I("span",null,null)],512)}}});function my(e,t){var r=U(""),i=ee(()=>{var n="auto",o="",s=gy[t.mode];return s?(s[0]&&(o=s[0]),s[1]&&(n=s[1])):(o="0% 0%",n="100% 100%"),"background-image:".concat(r.value?'url("'+r.value+'")':"none",";background-position:").concat(o,";background-size:").concat(n,";")}),a=Ae({rootEl:e,src:ee(()=>t.src?vt(t.src):""),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:i,imgSrc:r});return Re(()=>{var n=e.value,o=n.style;a.origWidth=Number(o.width)||0,a.origHeight=Number(o.height)||0}),a}function _y(e,t,r){var i,a=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";e.origWidth=s,e.origHeight=u,e.imgSrc=l},n=s=>{if(!s){o(),a();return}i=i||new Image,i.onload=u=>{var{width:l,height:f}=i;a(l,f,s),t(),o(),r("load",u,{width:l,height:f})},i.onerror=u=>{a(),o(),r("error",u,{errMsg:"GET ".concat(e.src," 404 (Not Found)")})},i.src=s},o=()=>{i&&(i.onload=null,i.onerror=null,i=null)};H(()=>e.src,s=>n(s)),Re(()=>n(e.src)),Ce(()=>o())}var by=navigator.vendor==="Google Inc.";function wy(e){return by&&e>10&&(e=Math.round(e/2)*2),e}function xy(e,t,r){var i=()=>{var{mode:n}=t,o=Dn[n];if(!!o){var{origWidth:s,origHeight:u}=r,l=s&&u?s/u:0;if(!!l){var f=e.value,v=f[o[0]];v&&(f.style[o[1]]=wy(v/l)+"px"),window.dispatchEvent(new CustomEvent("updateview"))}}},a=()=>{var{style:n}=e.value,{origStyle:{width:o,height:s}}=r;n.width=o,n.height=s};return H(()=>t.mode,(n,o)=>{Dn[o]&&a(),Dn[n]&&i()}),{fixSize:i,resetSize:a}}function yy(e,t){var r=0,i,a,n=function(){for(var o=arguments.length,s=new Array(o),u=0;u{a=null,r=l,e.apply(this,s)},l-rBn.forEach(t=>t.userAction=e);function Ey(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{userAction:!1};if(!Hd){var t=["touchstart","touchmove","touchend","mousedown","mouseup"];t.forEach(r=>{document.addEventListener(r,function(){!gl&&Wd(!0),gl++,setTimeout(()=>{!--gl&&Wd(!1)},0)},Sy)}),Hd=!0}Bn.push(e)}function Ty(e){var t=Bn.indexOf(e);t>=0&&Bn.splice(t,1)}function Cy(){var e=Ae({userAction:!1});return Re(()=>{Ey(e)}),Ce(()=>{Ty(e)}),{state:e}}function Vd(){var e=Ae({attrs:{}});return Re(()=>{for(var t=Dt();t;){var r=t.type.__scopeId;r&&(e.attrs[r]=""),t=t.proxy&&t.proxy.$mpType==="page"?null:t.parent}}),{state:e}}function Oy(e,t){var r=_e(It,!1);if(!!r){var i=Dt(),a={submit(){var n=i.proxy;return[n[e],typeof t=="string"?n[t]:t.value]},reset(){typeof t=="string"?i.proxy[t]="":t.value=""}};r.addField(a),Ce(()=>{r.removeField(a)})}}function Ay(e,t){var r=document.activeElement;if(!r)return t({});var i={};["input","textarea"].includes(r.tagName.toLowerCase())&&(i.start=r.selectionStart,i.end=r.selectionEnd),t(i)}var Iy=function(){bt(Gt(),"getSelectedTextRange",Ay)},ky=200,pl;function ml(e){return e===null?"":String(e)}var jd=ve({},{name:{type:String,default:""},modelValue:{type:[String,Number],default:""},value:{type:[String,Number],default:""},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1}},Ld),Yd=["input","focus","blur","update:value","update:modelValue","update:focus",...Pd];function My(e,t,r){var i=U(null),a=Pe(t,r),n=ee(()=>{var v=Number(e.selectionStart);return isNaN(v)?-1:v}),o=ee(()=>{var v=Number(e.selectionEnd);return isNaN(v)?-1:v}),s=ee(()=>{var v=Number(e.cursor);return isNaN(v)?-1:v}),u=ee(()=>{var v=Number(e.maxlength);return isNaN(v)?140:v}),l=ml(e.modelValue)||ml(e.value),f=Ae({value:l,valueOrigin:l,maxlength:u,focus:e.focus,composing:!1,selectionStart:n,selectionEnd:o,cursor:s});return H(()=>f.focus,v=>r("update:focus",v)),H(()=>f.maxlength,v=>f.value=f.value.slice(0,v)),{fieldRef:i,state:f,trigger:a}}function Ry(e,t,r,i){var a=im(s=>{t.value=ml(s)},100);H(()=>e.modelValue,a),H(()=>e.value,a);var n=yy((s,u)=>{a.cancel(),r("update:modelValue",u.value),r("update:value",u.value),i("input",s,u)},100),o=(s,u,l)=>{a.cancel(),n(s,u),l&&n.flush()};return If(()=>{a.cancel(),n.cancel()}),{trigger:i,triggerInput:o}}function Ly(e,t){var{state:r}=Cy(),i=ee(()=>e.autoFocus||e.focus);function a(){if(!!i.value){var o=t.value;if(!o||!("plus"in window)){setTimeout(a,100);return}{var s=ky-(Date.now()-pl);if(s>0){setTimeout(a,s);return}o.focus(),r.userAction||plus.key.showSoftKeybord()}}}function n(){var o=t.value;o&&o.blur()}H(()=>e.focus,o=>{o?a():n()}),Re(()=>{pl=pl||Date.now(),i.value&&Vr(a)})}function Py(e,t,r,i,a){function n(){var l=e.value;l&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&l.type!=="number"&&(l.selectionStart=t.selectionStart,l.selectionEnd=t.selectionEnd)}function o(){var l=e.value;l&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&l.type!=="number"&&(l.selectionEnd=l.selectionStart=t.cursor)}function s(l){return l.type==="number"?null:l.selectionEnd}function u(){var l=e.value,f=function(d){t.focus=!0,r("focus",d,{value:t.value}),n(),o()},v=function(d,_){d.stopPropagation(),!(typeof a=="function"&&a(d,t)===!1)&&(t.value=l.value,t.composing||i(d,{value:l.value,cursor:s(l)},_))},m=function(d){t.composing&&(t.composing=!1,v(d,!0)),t.focus=!1,r("blur",d,{value:t.value,cursor:s(d.target)})};l.addEventListener("change",d=>d.stopPropagation()),l.addEventListener("focus",f),l.addEventListener("blur",m),l.addEventListener("input",v),l.addEventListener("compositionstart",d=>{d.stopPropagation(),t.composing=!0}),l.addEventListener("compositionend",d=>{d.stopPropagation(),t.composing&&(t.composing=!1,v(d))})}H([()=>t.selectionStart,()=>t.selectionEnd],n),H(()=>t.cursor,o),H(()=>e.value,u)}function qd(e,t,r,i){Iy();var{fieldRef:a,state:n,trigger:o}=My(e,t,r),{triggerInput:s}=Ry(e,n,r,o);Ly(e,a),Nd(e,a,o);var{state:u}=Vd();Oy("name",n),Py(a,n,o,s,i);var l=String(navigator.vendor).indexOf("Apple")===0&&CSS.supports("image-orientation:from-image");return{fieldRef:a,state:n,scopedAttrsState:u,fixDisabledColor:l,trigger:o}}var Ny=ve({},jd,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),Dy=ge({name:"Input",props:Ny,emits:["confirm",...Yd],setup(e,t){var{emit:r}=t,i=["text","number","idcard","digit","password","tel"],a=["off","one-time-code"],n=ee(()=>{var g="";switch(e.type){case"text":e.confirmType==="search"&&(g="search");break;case"idcard":g="text";break;case"digit":g="number";break;default:g=~i.includes(e.type)?e.type:"text";break}return e.password?"password":g}),o=ee(()=>{var g=a.indexOf(e.textContentType),c=a.indexOf(Ke(e.textContentType)),h=g!==-1?g:c!==-1?c:0;return a[h]}),s=U(""),u,l=U(null),{fieldRef:f,state:v,scopedAttrsState:m,fixDisabledColor:d,trigger:_}=qd(e,l,r,(g,c)=>{var h=g.target;if(n.value==="number"){if(u&&(h.removeEventListener("blur",u),u=null),h.validity&&!h.validity.valid)return!s.value&&g.data==="-"||s.value[0]==="-"&&g.inputType==="deleteContentBackward"?(s.value="-",c.value="",u=()=>{s.value=h.value=""},h.addEventListener("blur",u),!1):(s.value=c.value=h.value=s.value==="-"?"":s.value,!1);s.value=h.value;var w=c.maxlength;if(w>0&&h.value.length>w)return h.value=h.value.slice(0,w),c.value=h.value,!1}}),b=["number","digit"],x=ee(()=>b.includes(e.type)?"0.000000000000000001":"");function p(g){if(g.key==="Enter"){var c=g.target;g.stopPropagation(),_("confirm",g,{value:c.value}),!e.confirmHold&&c.blur()}}return()=>{var g=e.disabled&&d?I("input",{ref:f,value:v.value,tabindex:"-1",readonly:!!e.disabled,type:n.value,maxlength:v.maxlength,step:x.value,class:"uni-input-input",onFocus:c=>c.target.blur()},null,40,["value","readonly","type","maxlength","step","onFocus"]):I("input",{ref:f,value:v.value,disabled:!!e.disabled,type:n.value,maxlength:v.maxlength,step:x.value,enterkeyhint:e.confirmType,pattern:e.type==="number"?"[0-9]*":void 0,class:"uni-input-input",autocomplete:o.value,onKeyup:p},null,40,["value","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup"]);return I("uni-input",{ref:l},[I("div",{class:"uni-input-wrapper"},[ki(I("div",et(m.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Pi,!(v.value.length||s.value==="-")]]),e.confirmType==="search"?I("form",{action:"",onSubmit:c=>c.preventDefault(),class:"uni-input-form"},[g],40,["onSubmit"]):g])],512)}}});function By(e){return Object.keys(e).map(t=>[t,e[t]])}var $y=["class","style"],Fy=/^on[A-Z]+/,Xd=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{excludeListeners:t=!1,excludeKeys:r=[]}=e,i=Dt(),a=Jo({}),n=Jo({}),o=Jo({}),s=r.concat($y);return i.attrs=Ae(i.attrs),M0(()=>{var u=By(i.attrs).reduce((l,f)=>{var[v,m]=f;return s.includes(v)?l.exclude[v]=m:Fy.test(v)?(t||(l.attrs[v]=m),l.listeners[v]=m):l.attrs[v]=m,l},{exclude:{},attrs:{},listeners:{}});a.value=u.attrs,n.value=u.listeners,o.value=u.exclude}),{$attrs:a,$listeners:n,$excludeAttrs:o}},$n,ia;function Fn(){$r(()=>{$n||($n=plus.webview.currentWebview()),ia||(ia=($n.getStyle()||{}).pullToRefresh||{})})}function sr(e){var{disable:t}=e;ia&&ia.support&&$n.setPullToRefresh(Object.assign({},ia,{support:!t}))}function _l(e){var t=[];return Array.isArray(e)&&e.forEach(r=>{Qa(r)?r.type===xt?t.push(..._l(r.children)):t.push(r):Array.isArray(r)&&t.push(..._l(r))}),t}function aa(e){var t=Dt();t.rebuild=e}var zy={scaleArea:{type:Boolean,default:!1}},Uy=ge({inheritAttrs:!1,name:"MovableArea",props:zy,setup(e,t){var{slots:r}=t,i=U(null),a=U(!1),{setContexts:n,events:o}=Hy(e,i),{$listeners:s,$attrs:u,$excludeAttrs:l}=Xd(),f=s.value,v=["onTouchstart","onTouchmove","onTouchend"];v.forEach(p=>{var g=f[p],c=o["_".concat(p)];f[p]=g?[].concat(g,c):c}),Re(()=>{o._resize(),Fn(),a.value=!0});var m=[],d=[];function _(){for(var p=[],g=function(h){var w=m[h];w instanceof Element||(w=w.el);var y=d.find(T=>w===T.rootRef.value);y&&p.push(qa(y))},c=0;c{m=i.value.children,_()});var b=p=>{d.push(p),_()},x=p=>{var g=d.indexOf(p);g>=0&&(d.splice(g,1),_())};return ze("_isMounted",a),ze("movableAreaRootRef",i),ze("addMovableViewContext",b),ze("removeMovableViewContext",x),()=>(r.default&&r.default(),I("uni-movable-area",et({ref:i},u.value,l.value,f),[I(Ir,{onReize:o._resize},null,8,["onReize"]),m],16))}});function Zd(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function Hy(e,t){var r=U(0),i=U(0),a=Ae({x:null,y:null}),n=U(null),o=null,s=[];function u(b){b&&b!==1&&(e.scaleArea?s.forEach(function(x){x._setScale(b)}):o&&o._setScale(b))}function l(b){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,p=t.value;function g(c){for(var h=0;h{sr({disable:!0});var x=b.touches;if(x&&x.length>1){var p={x:x[1].pageX-x[0].pageX,y:x[1].pageY-x[0].pageY};if(n.value=Zd(p),a.x=p.x,a.y=p.y,!e.scaleArea){var g=l(x[0].target),c=l(x[1].target);o=g&&g===c?g:null}}}),v=Ar(b=>{var x=b.touches;if(x&&x.length>1){b.preventDefault();var p={x:x[1].pageX-x[0].pageX,y:x[1].pageY-x[0].pageY};if(a.x!==null&&n.value&&n.value>0){var g=Zd(p)/n.value;u(g)}a.x=p.x,a.y=p.y}}),m=Ar(b=>{sr({disable:!1});var x=b.touches;x&&x.length||b.changedTouches&&(a.x=0,a.y=0,n.value=null,e.scaleArea?s.forEach(function(p){p._endScale()}):o&&o._endScale())});function d(){_(),s.forEach(function(b,x){b.setParent()})}function _(){var b=window.getComputedStyle(t.value),x=t.value.getBoundingClientRect();r.value=x.width-["Left","Right"].reduce(function(p,g){var c="border"+g+"Width",h="padding"+g;return p+parseFloat(b[c])+parseFloat(b[h])},0),i.value=x.height-["Top","Bottom"].reduce(function(p,g){var c="border"+g+"Width",h="padding"+g;return p+parseFloat(b[c])+parseFloat(b[h])},0)}return ze("movableAreaWidth",r),ze("movableAreaHeight",i),{setContexts(b){s=b},events:{_onTouchstart:f,_onTouchmove:v,_onTouchend:m,_resize:d}}}var na=function(e,t,r,i){e.addEventListener(t,a=>{typeof r=="function"&&r(a)===!1&&((typeof a.cancelable!="undefined"?a.cancelable:!0)&&a.preventDefault(),a.stopPropagation())},{passive:!1})},Kd,Gd;function zn(e,t,r){Ce(()=>{document.removeEventListener("mousemove",Kd),document.removeEventListener("mouseup",Gd)});var i=0,a=0,n=0,o=0,s=function(d,_,b,x){if(t({target:d.target,currentTarget:d.currentTarget,preventDefault:d.preventDefault.bind(d),stopPropagation:d.stopPropagation.bind(d),touches:d.touches,changedTouches:d.changedTouches,detail:{state:_,x:b,y:x,dx:b-i,dy:x-a,ddx:b-n,ddy:x-o,timeStamp:d.timeStamp}})===!1)return!1},u=null,l,f;na(e,"touchstart",function(d){if(l=!0,d.touches.length===1&&!u)return u=d,i=n=d.touches[0].pageX,a=o=d.touches[0].pageY,s(d,"start",i,a)}),na(e,"mousedown",function(d){if(f=!0,!l&&!u)return u=d,i=n=d.pageX,a=o=d.pageY,s(d,"start",i,a)}),na(e,"touchmove",function(d){if(d.touches.length===1&&u){var _=s(d,"move",d.touches[0].pageX,d.touches[0].pageY);return n=d.touches[0].pageX,o=d.touches[0].pageY,_}});var v=Kd=function(d){if(!l&&f&&u){var _=s(d,"move",d.pageX,d.pageY);return n=d.pageX,o=d.pageY,_}};document.addEventListener("mousemove",v),na(e,"touchend",function(d){if(d.touches.length===0&&u)return l=!1,u=null,s(d,"end",d.changedTouches[0].pageX,d.changedTouches[0].pageY)});var m=Gd=function(d){if(f=!1,!l&&u)return u=null,s(d,"end",d.pageX,d.pageY)};document.addEventListener("mouseup",m),na(e,"touchcancel",function(d){if(u){l=!1;var _=u;return u=null,s(d,r?"cancel":"end",_.touches[0].pageX,_.touches[0].pageY)}})}function Un(e,t,r){return e>t-r&&ethis._t&&(e=this._t,this._lastDt=e);var t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,r=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(this._x_a>0&&tthis._endPositionX)&&(t=this._endPositionX),(this._y_a>0&&rthis._endPositionY)&&(r=this._endPositionY),{x:t,y:r}},kt.prototype.ds=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},kt.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},kt.prototype.dt=function(){return-this._x_v/this._x_a},kt.prototype.done=function(){var e=Un(this.s().x,this._endPositionX)||Un(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,e},kt.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},kt.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t};function rt(e,t,r){this._m=e,this._k=t,this._c=r,this._solution=null,this._endPosition=0,this._startTime=0}rt.prototype._solve=function(e,t){var r=this._c,i=this._m,a=this._k,n=r*r-4*i*a;if(n===0){var o=-r/(2*i),s=e,u=t/(o*e);return{x:function(p){return(s+u*p)*Math.pow(Math.E,o*p)},dx:function(p){var g=Math.pow(Math.E,o*p);return o*(s+u*p)*g+u*g}}}if(n>0){var l=(-r-Math.sqrt(n))/(2*i),f=(-r+Math.sqrt(n))/(2*i),v=(t-l*e)/(f-l),m=e-v;return{x:function(p){var g,c;return p===this._t&&(g=this._powER1T,c=this._powER2T),this._t=p,g||(g=this._powER1T=Math.pow(Math.E,l*p)),c||(c=this._powER2T=Math.pow(Math.E,f*p)),m*g+v*c},dx:function(p){var g,c;return p===this._t&&(g=this._powER1T,c=this._powER2T),this._t=p,g||(g=this._powER1T=Math.pow(Math.E,l*p)),c||(c=this._powER2T=Math.pow(Math.E,f*p)),m*l*g+v*f*c}}}var d=Math.sqrt(4*i*a-r*r)/(2*i),_=-r/2*i,b=e,x=(t-_*e)/d;return{x:function(p){return Math.pow(Math.E,_*p)*(b*Math.cos(d*p)+x*Math.sin(d*p))},dx:function(p){var g=Math.pow(Math.E,_*p),c=Math.cos(d*p),h=Math.sin(d*p);return g*(x*d*c-b*d*h)+_*g*(x*h+b*c)}}},rt.prototype.x=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0},rt.prototype.dx=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0},rt.prototype.setEnd=function(e,t,r){if(r||(r=new Date().getTime()),e!==this._endPosition||!kr(t,.1)){t=t||0;var i=this._endPosition;this._solution&&(kr(t,.1)&&(t=this._solution.dx((r-this._startTime)/1e3)),i=this._solution.x((r-this._startTime)/1e3),kr(t,.1)&&(t=0),kr(i,.1)&&(i=0),i+=this._endPosition),this._solution&&kr(i-e,.1)&&kr(t,.1)||(this._endPosition=e,this._solution=this._solve(i-this._endPosition,t),this._startTime=r)}},rt.prototype.snap=function(e){this._startTime=new Date().getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}},rt.prototype.done=function(e){return e||(e=new Date().getTime()),Un(this.x(),this._endPosition,.1)&&kr(this.dx(),.1)},rt.prototype.reconfigure=function(e,t,r){this._m=e,this._k=t,this._c=r,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=new Date().getTime())},rt.prototype.springConstant=function(){return this._k},rt.prototype.damping=function(){return this._c},rt.prototype.configuration=function(){function e(r,i){r.reconfigure(1,i,r.damping())}function t(r,i){r.reconfigure(1,r.springConstant(),i)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:e.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:t.bind(this,this),min:1,max:500}]};function oa(e,t,r){this._springX=new rt(e,t,r),this._springY=new rt(e,t,r),this._springScale=new rt(e,t,r),this._startTime=0}oa.prototype.setEnd=function(e,t,r,i){var a=new Date().getTime();this._springX.setEnd(e,i,a),this._springY.setEnd(t,i,a),this._springScale.setEnd(r,i,a),this._startTime=a},oa.prototype.x=function(){var e=(new Date().getTime()-this._startTime)/1e3;return{x:this._springX.x(e),y:this._springY.x(e),scale:this._springScale.x(e)}},oa.prototype.done=function(){var e=new Date().getTime();return this._springX.done(e)&&this._springY.done(e)&&this._springScale.done(e)},oa.prototype.reconfigure=function(e,t,r){this._springX.reconfigure(e,t,r),this._springY.reconfigure(e,t,r),this._springScale.reconfigure(e,t,r)};var Wy={direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.5},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},Vy=ge({name:"MovableView",props:Wy,emits:["change","scale"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=Pe(a,i),{setParent:o}=jy(e,n,a);return()=>I("uni-movable-view",{ref:a},[I(Ir,{onResize:o},null,8,["onResize"]),r.default&&r.default()],512)}}),wl=!1;function Jd(e){wl||(wl=!0,requestAnimationFrame(function(){e(),wl=!1}))}function Qd(e,t){if(e===t)return 0;var r=e.offsetLeft;return e.offsetParent?r+=Qd(e.offsetParent,t):0}function eh(e,t){if(e===t)return 0;var r=e.offsetTop;return e.offsetParent?r+=eh(e.offsetParent,t):0}function th(e,t){return+((1e3*e-1e3*t)/1e3).toFixed(1)}function rh(e,t,r){var i={id:0,cancelled:!1},a=function(o){o&&o.id&&cancelAnimationFrame(o.id),o&&(o.cancelled=!0)};function n(o,s,u,l){if(!o||!o.cancelled){u(s);var f=s.done();f||o.cancelled||(o.id=requestAnimationFrame(n.bind(null,o,s,u,l))),f&&l&&l(s)}}return n(i,e,t,r),{cancel:a.bind(null,i),model:e}}function Hn(e){return/\d+[ur]px$/i.test(e)?uni.upx2px(parseFloat(e)):Number(e)||0}function jy(e,t,r){var i=_e("movableAreaWidth",U(0)),a=_e("movableAreaHeight",U(0)),n=_e("_isMounted",U(!1)),o=_e("movableAreaRootRef"),s=_e("addMovableViewContext",()=>{}),u=_e("removeMovableViewContext",()=>{}),l=U(Hn(e.x)),f=U(Hn(e.y)),v=U(Number(e.scaleValue)||1),m=U(0),d=U(0),_=U(0),b=U(0),x=U(0),p=U(0),g=null,c=null,h={x:0,y:0},w={x:0,y:0},y=1,T=1,E=0,O=0,N=!1,R=!1,V,ue,M=null,B=null,Q=new bl,te=new bl,W={historyX:[0,0],historyY:[0,0],historyT:[0,0]},G=ee(()=>{var A=Number(e.damping);return isNaN(A)?20:A}),ae=ee(()=>{var A=Number(e.friction);return isNaN(A)||A<=0?2:A}),Se=ee(()=>{var A=Number(e.scaleMin);return isNaN(A)?.5:A}),se=ee(()=>{var A=Number(e.scaleMax);return isNaN(A)?10:A}),K=ee(()=>e.direction==="all"||e.direction==="horizontal"),ie=ee(()=>e.direction==="all"||e.direction==="vertical"),le=new oa(1,9*Math.pow(G.value,2)/40,G.value),Ie=new kt(1,ae.value);H(()=>e.x,A=>{l.value=Hn(A)}),H(()=>e.y,A=>{f.value=Hn(A)}),H(l,A=>{nt(A)}),H(f,A=>{lr(A)}),H(()=>e.scaleValue,A=>{v.value=Number(A)||0}),H(v,A=>{fa(A)}),H(Se,()=>{Ne()}),H(se,()=>{Ne()});function ke(){c&&c.cancel(),g&&g.cancel()}function nt(A){if(K.value){if(A+w.x===E)return E;g&&g.cancel(),J(A+w.x,f.value+w.y,y)}return A}function lr(A){if(ie.value){if(A+w.y===O)return O;g&&g.cancel(),J(l.value+w.x,A+w.y,y)}return A}function Ne(){if(!e.scale)return!1;$(y,!0),z(y)}function fa(A){return e.scale?(A=D(A),$(A,!0),z(A),A):!1}function ca(){N||e.disabled||(sr({disable:!0}),ke(),W.historyX=[0,0],W.historyY=[0,0],W.historyT=[0,0],K.value&&(V=E),ie.value&&(ue=O),r.value.style.willChange="transform",M=null,B=null,R=!0)}function S(A){if(!N&&!e.disabled&&R){var Y=E,q=O;if(B===null&&(B=Math.abs(A.detail.dx/A.detail.dy)>1?"htouchmove":"vtouchmove"),K.value&&(Y=A.detail.dx+V,W.historyX.shift(),W.historyX.push(Y),!ie.value&&M===null&&(M=Math.abs(A.detail.dx/A.detail.dy)<1)),ie.value&&(q=A.detail.dy+ue,W.historyY.shift(),W.historyY.push(q),!K.value&&M===null&&(M=Math.abs(A.detail.dy/A.detail.dx)<1)),W.historyT.shift(),W.historyT.push(A.detail.timeStamp),!M){A.preventDefault();var he="touch";Y<_.value?e.outOfBounds?(he="touch-out-of-bounds",Y=_.value-Q.x(_.value-Y)):Y=_.value:Y>x.value&&(e.outOfBounds?(he="touch-out-of-bounds",Y=x.value+Q.x(Y-x.value)):Y=x.value),qp.value&&(e.outOfBounds?(he="touch-out-of-bounds",q=p.value+te.x(q-p.value)):q=p.value),Jd(function(){X(Y,q,y,he)})}}}function C(){if(!N&&!e.disabled&&R&&(sr({disable:!1}),r.value.style.willChange="auto",R=!1,!M&&!Z("out-of-bounds")&&e.inertia)){var A=1e3*(W.historyX[1]-W.historyX[0])/(W.historyT[1]-W.historyT[0]),Y=1e3*(W.historyY[1]-W.historyY[0])/(W.historyT[1]-W.historyT[0]);Ie.setV(A,Y),Ie.setS(E,O);var q=Ie.delta().x,he=Ie.delta().y,fe=q+E,$e=he+O;fe<_.value?(fe=_.value,$e=O+(_.value-E)*he/q):fe>x.value&&(fe=x.value,$e=O+(x.value-E)*he/q),$ep.value&&($e=p.value,fe=E+(p.value-O)*q/he),Ie.setEnd(fe,$e),c=rh(Ie,function(){var Ze=Ie.s(),De=Ze.x,gt=Ze.y;X(De,gt,y,"friction")},function(){c.cancel()})}!e.outOfBounds&&!e.inertia&&ke()}function k(A,Y){var q=!1;return A>x.value?(A=x.value,q=!0):A<_.value&&(A=_.value,q=!0),Y>p.value?(Y=p.value,q=!0):Y3&&arguments[3]!==void 0?arguments[3]:"",fe=arguments.length>4?arguments[4]:void 0,$e=arguments.length>5?arguments[5]:void 0;A!==null&&A.toString()!=="NaN"&&typeof A=="number"||(A=E||0),Y!==null&&Y.toString()!=="NaN"&&typeof Y=="number"||(Y=O||0),A=Number(A.toFixed(1)),Y=Number(Y.toFixed(1)),q=Number(q.toFixed(1)),E===A&&O===Y||fe||t("change",{},{x:th(A,w.x),y:th(Y,w.y),source:he}),e.scale||(q=y),q=D(q),q=+q.toFixed(3),$e&&q!==y&&t("scale",{},{x:A,y:Y,scale:q});var Ze="translateX("+A+"px) translateY("+Y+"px) translateZ(0px) scale("+q+")";r.value.style.transform=Ze,r.value.style.webkitTransform=Ze,E=A,O=Y,y=q}function ce(){if(!!n.value){ke();var A=e.scale?v.value:1;L(),P(A),F(),E=l.value+w.x,O=f.value+w.y;var Y=k(E,O),q=Y.x,he=Y.y;X(q,he,A,"",!0),z(A)}}function Be(){N=!1,z(y)}function Te(A){A&&(A=T*A,j(),$(A))}return Re(()=>{zn(r.value,Y=>{switch(Y.detail.state){case"start":ca();break;case"move":S(Y);break;case"end":C()}}),ce(),Ie.reconfigure(1,ae.value),le.reconfigure(1,9*Math.pow(G.value,2)/40,G.value),r.value.style.transformOrigin="center",Fn();var A={rootRef:r,setParent:ce,_endScale:Be,_setScale:Te};s(A),Zt(()=>{u(A)})}),Zt(()=>{ke()}),{setParent:ce}}var Yy=["navigate","redirect","switchTab","reLaunch","navigateBack"],qy={hoverClass:{type:String,default:"navigator-hover"},url:{type:String,default:""},openType:{type:String,default:"navigate",validator(e){return Boolean(~Yy.indexOf(e))}},delta:{type:Number,default:1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:600},exists:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1}};function Xy(e){return()=>{if(e.openType!=="navigateBack"&&!e.url){console.error(" should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab");return}switch(e.openType){case"navigate":uni.navigateTo({url:e.url});break;case"redirect":uni.redirectTo({url:e.url,exists:e.exists});break;case"switchTab":uni.switchTab({url:e.url});break;case"reLaunch":uni.reLaunch({url:e.url});break;case"navigateBack":uni.navigateBack({delta:e.delta});break}}}var Zy=ge({name:"Navigator",inheritAttrs:!1,compatConfig:{MODE:3},props:qy,setup(e,t){var{slots:r}=t,i=Dt(),a=i&&i.root.type.__scopeId||"",{hovering:n,binding:o}=vl(e),s=Xy(e);return()=>{var{hoverClass:u,url:l}=e,f=e.hoverClass&&e.hoverClass!=="none";return I("a",{class:"navigator-wrap",href:l,onClick:cc},[I("uni-navigator",et({class:f&&n.value?u:""},f&&o,i?i.attrs:{},{[a]:""},{onClick:s}),[r.default&&r.default()],16,["onClick"])],8,["href","onClick"])}}}),Ky={value:{type:Array,default(){return[]},validator:function(e){return Array.isArray(e)&&e.filter(t=>typeof t=="number").length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}};function Gy(e){var t=Ae([...e.value]),r=Ae({value:t,height:34});return H(()=>e.value,(i,a)=>{(i===a||i.length!==a.length||i.findIndex((n,o)=>n!==a[o])>=0)&&(r.value.length=i.length,i.forEach((n,o)=>{n!==r.value[o]&&r.value.splice(o,1,n)}))}),r}var Jy=ge({name:"PickerView",props:Ky,emits:["change","pickstart","pickend","update:value"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=U(null),o=Pe(a,i),s=Gy(e),u=U(null),l=()=>{var _=u.value;s.height=_.$el.offsetHeight},f=U([]),v=U([]);function m(_){var b=v.value;if(b instanceof HTMLCollection)return Array.prototype.indexOf.call(b,_.el);b=b.filter(p=>p.type!==jr);var x=b.indexOf(_);return x!==-1?x:f.value.indexOf(_)}var d=function(_){var b=ee({get(){var x=m(_.vnode);return s.value[x]||0},set(x){var p=m(_.vnode);if(!(p<0)){var g=s.value[p];if(g!==x){s.value[p]=x;var c=s.value.map(h=>h);i("update:value",c),o("change",{},{value:c})}}}});return b};return ze("getPickerViewColumn",d),ze("pickerViewProps",e),ze("pickerViewState",s),aa(()=>{l(),v.value=n.value.children}),()=>{var _=r.default&&r.default();return I("uni-picker-view",{ref:a},[I(Ir,{ref:u,onResize:b=>{var{height:x}=b;return s.height=x}},null,8,["onResize"]),I("div",{ref:n,class:"uni-picker-view-wrapper"},[_],512)],512)}}});class ih{constructor(t){this._drag=t,this._dragLog=Math.log(t),this._x=0,this._v=0,this._startTime=0}set(t,r){this._x=t,this._v=r,this._startTime=new Date().getTime()}setVelocityByEnd(t){this._v=(t-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(t){t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3);var r=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t);return this._dt=t,this._x+this._v*r/this._dragLog-this._v/this._dragLog}dx(t){t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3);var r=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t);return this._dt=t,this._v*r}done(){return Math.abs(this.dx())<3}reconfigure(t){var r=this.x(),i=this.dx();this._drag=t,this._dragLog=Math.log(t),this.set(r,i)}configuration(){var t=this;return[{label:"Friction",read:function(){return t._drag},write:function(r){t.reconfigure(r)},min:.001,max:.1,step:.001}]}}function ah(e,t,r){return e>t-r&&e0){var f=(-i-Math.sqrt(o))/(2*a),v=(-i+Math.sqrt(o))/(2*a),m=(r-f*t)/(v-f),d=t-m;return{x:function(g){var c,h;return g===this._t&&(c=this._powER1T,h=this._powER2T),this._t=g,c||(c=this._powER1T=Math.pow(Math.E,f*g)),h||(h=this._powER2T=Math.pow(Math.E,v*g)),d*c+m*h},dx:function(g){var c,h;return g===this._t&&(c=this._powER1T,h=this._powER2T),this._t=g,c||(c=this._powER1T=Math.pow(Math.E,f*g)),h||(h=this._powER2T=Math.pow(Math.E,v*g)),d*f*c+m*v*h}}}var _=Math.sqrt(4*a*n-i*i)/(2*a),b=-i/2*a,x=t,p=(r-b*t)/_;return{x:function(g){return Math.pow(Math.E,b*g)*(x*Math.cos(_*g)+p*Math.sin(_*g))},dx:function(g){var c=Math.pow(Math.E,b*g),h=Math.cos(_*g),w=Math.sin(_*g);return c*(p*_*h-x*_*w)+b*c*(p*w+x*h)}}}x(t){return t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0}dx(t){return t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0}setEnd(t,r,i){if(i||(i=new Date().getTime()),t!==this._endPosition||!Mr(r,.4)){r=r||0;var a=this._endPosition;this._solution&&(Mr(r,.4)&&(r=this._solution.dx((i-this._startTime)/1e3)),a=this._solution.x((i-this._startTime)/1e3),Mr(r,.4)&&(r=0),Mr(a,.4)&&(a=0),a+=this._endPosition),this._solution&&Mr(a-t,.4)&&Mr(r,.4)||(this._endPosition=t,this._solution=this._solve(a-this._endPosition,r),this._startTime=i)}}snap(t){this._startTime=new Date().getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}}done(t){return t||(t=new Date().getTime()),ah(this.x(),this._endPosition,.4)&&Mr(this.dx(),.4)}reconfigure(t,r,i){this._m=t,this._k=r,this._c=i,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=new Date().getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){function t(i,a){i.reconfigure(1,a,i.damping())}function r(i,a){i.reconfigure(1,i.springConstant(),a)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:r.bind(this,this),min:1,max:500}]}}class Qy{constructor(t,r,i){this._extent=t,this._friction=r||new ih(.01),this._spring=i||new nh(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(t,r){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(r)}set(t,r){this._friction.set(t,r),t>0&&r>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&r<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=new Date().getTime()}x(t){if(!this._startTime)return 0;if(t||(t=(new Date().getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var r=this._friction.x(t),i=this.dx(t);return(r>0&&i>=0||r<-this._extent&&i<=0)&&(this._springing=!0,this._spring.setEnd(0,i),r<-this._extent?this._springOffset=-this._extent:this._springOffset=0,r=this._spring.x()+this._springOffset),r}dx(t){var r;return this._lastTime===t?r=this._lastDx:r=this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=r,r}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(t){this._friction.setVelocityByEnd(t)}configuration(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t}}function eS(e,t,r){var i={id:0,cancelled:!1};function a(o,s,u,l){if(!o||!o.cancelled){u(s);var f=s.done();f||o.cancelled||(o.id=requestAnimationFrame(a.bind(null,o,s,u,l))),f&&l&&l(s)}}function n(o){o&&o.id&&cancelAnimationFrame(o.id),o&&(o.cancelled=!0)}return a(i,e,t,r),{cancel:n.bind(null,i),model:e}}class tS{constructor(t,r){r=r||{},this._element=t,this._options=r,this._enableSnap=r.enableSnap||!1,this._itemSize=r.itemSize||0,this._enableX=r.enableX||!1,this._enableY=r.enableY||!1,this._shouldDispatchScrollEvent=!!r.onScroll,this._enableX?(this._extent=(r.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=r.scrollWidth):(this._extent=(r.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=r.scrollHeight),this._position=0,this._scroll=new Qy(this._extent,r.friction,r.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(t,r){var i=this._startPosition;this._enableX?i+=t:this._enableY&&(i+=r),i>0?i*=.5:i<-this._extent&&(i=.5*(i+this._extent)-this._extent),this._position=i,this.updatePosition(),this.dispatchScroll()}onTouchEnd(t,r,i){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(r)this._itemSize/2?n-(this._itemSize-Math.abs(o)):n-o,a<=0&&a>=-this._extent&&this._scroll.setVelocityByEnd(a)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=eS(this._scroll,()=>{var s=Date.now(),u=(s-this._scroll._startTime)/1e3,l=this._scroll.x(u);this._position=l,this.updatePosition();var f=this._scroll.dx(u);this._shouldDispatchScrollEvent&&s-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/f),this._lastTime=s)},()=>{this._enableSnap&&(a<=0&&a>=-this._extent&&(this._position=a,this.updatePosition()),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1})}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){var t=this._itemSize,r=this._position%t,i=Math.abs(r)>this._itemSize/2?this._position-(t-Math.abs(r)):this._position-r;this._position!==i&&(this._snapping=!0,this.scrollTo(-i),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(t,r){this._animation&&(this._animation.cancel(),this._scrolling=!1),typeof t=="number"&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);var i="transform "+(r||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+i,this._element.style.transition=i,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(typeof this._options.onScroll=="function"&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}}update(t,r,i){var a=0,n=this._position;this._enableX?(a=this._element.childNodes.length?(r||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=r):(a=this._element.childNodes.length?(r||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=r),typeof t=="number"&&(this._position=-t),this._position<-a?this._position=-a:this._position>0&&(this._position=0),this._itemSize=i||this._itemSize,this.updatePosition(),n!==this._position&&(this.dispatchScroll(),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=a,this._scroll._extent=a}updatePosition(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t}isScrolling(){return this._scrolling||this._snapping}}function rS(e,t){var r={trackingID:-1,maxDy:0,maxDx:0},i=new tS(e,t);function a(u){var l=u,f=u;return l.detail.state==="move"||l.detail.state==="end"?{x:l.detail.dx,y:l.detail.dy}:{x:f.screenX-r.x,y:f.screenY-r.y}}function n(u){var l=u,f=u;l.detail.state==="start"?(r.trackingID="touch",r.x=l.detail.x,r.y=l.detail.y):(r.trackingID="mouse",r.x=f.screenX,r.y=f.screenY),r.maxDx=0,r.maxDy=0,r.historyX=[0],r.historyY=[0],r.historyTime=[l.detail.timeStamp||f.timeStamp],r.listener=i,i.onTouchStart&&i.onTouchStart(),u.preventDefault()}function o(u){var l=u,f=u;if(r.trackingID!==-1){u.preventDefault();var v=a(u);if(v){for(r.maxDy=Math.max(r.maxDy,Math.abs(v.y)),r.maxDx=Math.max(r.maxDx,Math.abs(v.x)),r.historyX.push(v.x),r.historyY.push(v.y),r.historyTime.push(l.detail.timeStamp||f.timeStamp);r.historyTime.length>10;)r.historyTime.shift(),r.historyX.shift(),r.historyY.shift();r.listener&&r.listener.onTouchMove&&r.listener.onTouchMove(v.x,v.y)}}}function s(u){if(r.trackingID!==-1){u.preventDefault();var l=a(u);if(l){var f=r.listener;r.trackingID=-1,r.listener=null;var v=r.historyTime.length,m={x:0,y:0};if(v>2)for(var d=r.historyTime.length-1,_=r.historyTime[d],b=r.historyX[d],x=r.historyY[d];d>0;){d--;var p=r.historyTime[d],g=_-p;if(g>30&&g<50){m.x=(b-r.historyX[d])/(g/1e3),m.y=(x-r.historyY[d])/(g/1e3);break}}r.historyTime=[],r.historyX=[],r.historyY=[],f&&f.onTouchEnd&&f.onTouchEnd(l.x,l.y,m)}}}return{scroller:i,handleTouchStart:n,handleTouchMove:o,handleTouchEnd:s}}var iS=0;function aS(e){var t="uni-picker-view-content-".concat(iS++);function r(){var i=document.createElement("style");i.innerText=".uni-picker-view-content.".concat(t,">*{height: ").concat(e.value,"px;overflow: hidden;}"),document.head.appendChild(i)}return H(()=>e.value,r),t}function nS(e){var t=20,r=0,i=0;e.addEventListener("touchstart",a=>{var n=a.changedTouches[0];r=n.clientX,i=n.clientY}),e.addEventListener("touchend",a=>{var n=a.changedTouches[0];if(Math.abs(n.clientX-r){s[l]=n[l]}),a.target.dispatchEvent(s)}})}var oS=ge({name:"PickerViewColumn",setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=U(null),o=_e("getPickerViewColumn"),s=Dt(),u=o?o(s):U(0),l=_e("pickerViewProps"),f=_e("pickerViewState"),v=U(34),m=U(null),d=()=>{var O=m.value;v.value=O.$el.offsetHeight},_=ee(()=>(f.height-v.value)/2),{state:b}=Vd(),x=aS(v),p,g=Ae({current:u.value,length:0}),c;function h(){p&&!c&&(c=!0,Vr(()=>{c=!1;var O=Math.min(g.current,g.length-1);O=Math.max(O,0),p.update(O*v.value,void 0,v.value)}))}H(()=>u.value,O=>{O!==g.current&&(g.current=O,h())}),H(()=>g.current,O=>u.value=O),H([()=>v.value,()=>g.length,()=>f.height],h);var w=0;function y(O){var N=w+O.deltaY;if(Math.abs(N)>10){w=0;var R=Math.min(g.current+(N<0?-1:1),g.length-1);g.current=R=Math.max(R,0),p.scrollTo(R*v.value)}else w=N;O.preventDefault()}function T(O){var{clientY:N}=O,R=a.value;if(!p.isScrolling()){var V=R.getBoundingClientRect(),ue=N-V.top-f.height/2,M=v.value/2;if(!(Math.abs(ue)<=M)){var B=Math.ceil((Math.abs(ue)-M)/v.value),Q=ue<0?-B:B,te=Math.min(g.current+Q,g.length-1);g.current=te=Math.max(te,0),p.scrollTo(te*v.value)}}}var E=()=>{var O=a.value,N=n.value,{scroller:R,handleTouchStart:V,handleTouchMove:ue,handleTouchEnd:M}=rS(N,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:v.value,friction:new ih(1e-4),spring:new nh(2,90,20),onSnap:B=>{!isNaN(B)&&B!==g.current&&(g.current=B)}});p=R,zn(O,B=>{switch(B.detail.state){case"start":V(B),sr({disable:!0});break;case"move":ue(B),B.stopPropagation();break;case"end":case"cancel":M(B),sr({disable:!1})}},!0),nS(O),Fn(),h()};return aa(()=>{g.length=n.value.children.length,d(),E()}),()=>{var O=r.default&&r.default(),N="".concat(_.value,"px 0");return I("uni-picker-view-column",{ref:a},[I("div",{onWheel:y,onClick:T,class:"uni-picker-view-group"},[I("div",et(b.attrs,{class:["uni-picker-view-mask",l.maskClass],style:"background-size: 100% ".concat(_.value,"px;").concat(l.maskStyle)}),null,16),I("div",et(b.attrs,{class:["uni-picker-view-indicator",l.indicatorClass],style:l.indicatorStyle}),[I(Ir,{ref:m,onResize:R=>{var{height:V}=R;return v.value=V}},null,8,["onResize"])],16),I("div",{ref:n,class:["uni-picker-view-content",x],style:{padding:N}},[O],6)],40,["onWheel","onClick"])],512)}}}),Rr={activeColor:Pa,backgroundColor:"#EBEBEB",activeMode:"backwards"},sS={percent:{type:[Number,String],default:0,validator(e){return!isNaN(parseFloat(e))}},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator(e){return!isNaN(parseFloat(e))}},color:{type:String,default:Rr.activeColor},activeColor:{type:String,default:Rr.activeColor},backgroundColor:{type:String,default:Rr.backgroundColor},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:Rr.activeMode},duration:{type:[Number,String],default:30,validator(e){return!isNaN(parseFloat(e))}}},lS=ge({name:"Progress",props:sS,setup(e){var t=uS(e);return oh(t,e),H(()=>t.realPercent,(r,i)=>{t.strokeTimer&&clearInterval(t.strokeTimer),t.lastPercent=i||0,oh(t,e)}),()=>{var{showInfo:r}=e,{outerBarStyle:i,innerBarStyle:a,currentPercent:n}=t;return I("uni-progress",{class:"uni-progress"},[I("div",{style:i,class:"uni-progress-bar"},[I("div",{style:a,class:"uni-progress-inner-bar"},null,4)],4),r?I("p",{class:"uni-progress-info"},[n+"%"]):""])}}});function uS(e){var t=U(0),r=ee(()=>"background-color: ".concat(e.backgroundColor,"; height: ").concat(e.strokeWidth,"px;")),i=ee(()=>{var o=e.color!==Rr.activeColor&&e.activeColor===Rr.activeColor?e.color:e.activeColor;return"width: ".concat(t.value,"%;background-color: ").concat(o)}),a=ee(()=>{var o=parseFloat(e.percent);return o<0&&(o=0),o>100&&(o=100),o}),n=Ae({outerBarStyle:r,innerBarStyle:i,realPercent:a,currentPercent:t,strokeTimer:0,lastPercent:0});return n}function oh(e,t){t.active?(e.currentPercent=t.activeMode===Rr.activeMode?0:e.lastPercent,e.strokeTimer=setInterval(()=>{e.currentPercent+1>e.realPercent?(e.currentPercent=e.realPercent,e.strokeTimer&&clearInterval(e.strokeTimer)):e.currentPercent+=1},parseFloat(t.duration))):e.currentPercent=e.realPercent}var sh=cn("ucg"),fS={name:{type:String,default:""}},cS=ge({name:"RadioGroup",props:fS,setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=Pe(a,r);return vS(e,n),()=>I("uni-radio-group",{ref:a},[i.default&&i.default()],512)}});function vS(e,t){var r=[];Re(()=>{s(r.length-1)});var i=()=>{var u;return(u=r.find(l=>l.value.radioChecked))===null||u===void 0?void 0:u.value.value};ze(sh,{addField(u){r.push(u)},removeField(u){r.splice(r.indexOf(u),1)},radioChange(u,l){var f=r.indexOf(l);s(f,!0),t("change",u,{value:i()})}});var a=_e(It,!1),n={submit:()=>{var u=["",null];return e.name!==""&&(u[0]=e.name,u[1]=i()),u}};a&&(a.addField(n),Ce(()=>{a.removeField(n)}));function o(u,l){u.value={radioChecked:l,value:u.value.value}}function s(u,l){r.forEach((f,v)=>{v!==u&&(l?o(r[v],!1):r.forEach((m,d)=>{v>=d||r[d].value.radioChecked&&o(r[v],!1)}))})}return r}var dS={checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},hS=ge({name:"Radio",props:dS,setup(e,t){var{slots:r}=t,i=U(e.checked),a=U(e.value),n=ee(()=>"background-color: ".concat(e.color,";border-color: ").concat(e.color,";"));H([()=>e.checked,()=>e.value],v=>{var[m,d]=v;i.value=m,a.value=d});var o=()=>{i.value=!1},{uniCheckGroup:s,uniLabel:u,field:l}=gS(i,a,o),f=v=>{e.disabled||(i.value=!0,s&&s.radioChange(v,l))};return u&&(u.addHandler(f),Ce(()=>{u.removeHandler(f)})),Rn(e,{"label-click":f}),()=>{var v=ai(e,"disabled");return I("uni-radio",et(v,{onClick:f}),[I("div",{class:"uni-radio-wrapper"},[I("div",{class:["uni-radio-input",{"uni-radio-input-disabled":e.disabled}],style:i.value?n.value:""},[i.value?dn(vn,"#fff",18):""],6),r.default&&r.default()])],16,["onClick"])}}});function gS(e,t,r){var i=ee({get:()=>({radioChecked:Boolean(e.value),value:t.value}),set:u=>{var{radioChecked:l}=u;e.value=l}}),a={reset:r},n=_e(sh,!1);n&&n.addField(i);var o=_e(It,!1);o&&o.addField(a);var s=_e(Qi,!1);return Ce(()=>{n&&n.removeField(i),o&&o.removeField(a)}),{uniCheckGroup:n,uniForm:o,uniLabel:s,field:i}}function pS(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/\n/,"").replace(/\n/,"")}function mS(e){return e.reduce(function(t,r){var i=r.value,a=r.name;return i.match(/ /)&&a!=="style"&&(i=i.split(" ")),t[a]?Array.isArray(t[a])?t[a].push(i):t[a]=[t[a],i]:t[a]=i,t},{})}function _S(e){e=pS(e);var t=[],r={node:"root",children:[]};return $d(e,{start:function(i,a,n){var o={name:i};if(a.length!==0&&(o.attrs=mS(a)),n){var s=t[0]||r;s.children||(s.children=[]),s.children.push(o)}else t.unshift(o)},end:function(i){var a=t.shift();if(a.name!==i&&console.error("invalid state: mismatch end tag"),t.length===0)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},chars:function(i){var a={type:"text",text:i};if(t.length===0)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},comment:function(i){var a={node:"comment",text:i},n=t[0];n.children||(n.children=[]),n.children.push(a)}}),r.children}var lh={a:"",abbr:"",address:"",article:"",aside:"",b:"",bdi:"",bdo:["dir"],big:"",blockquote:"",br:"",caption:"",center:"",cite:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",font:"",footer:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",header:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",mark:"",nav:"",ol:["start","type"],p:"",pre:"",q:"",rt:"",ruby:"",s:"",section:"",small:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","height","rowspan","width"],tfoot:"",th:["colspan","height","rowspan","width"],thead:"",tr:["colspan","height","rowspan","width"],tt:"",u:"",ul:""},xl={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'"};function bS(e){return e.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,function(t,r){if(re(xl,r)&&xl[r])return xl[r];if(/^#[0-9]{1,4}$/.test(r))return String.fromCharCode(r.slice(1));if(/^#x[0-9a-f]{1,4}$/i.test(r))return String.fromCharCode("0"+r.slice(1));var i=document.createElement("div");return i.innerHTML=t,i.innerText||i.textContent})}function wS(e,t,r){return e==="img"&&t==="src"?vt(r):r}function uh(e,t,r,i){return e.forEach(function(a){if(!!mt(a))if(!re(a,"type")||a.type==="node"){if(!(typeof a.name=="string"&&a.name))return;var n=a.name.toLowerCase();if(!re(lh,n))return;var o=document.createElement(n);if(!o)return;var s=a.attrs;if(mt(s)){var u=lh[n]||[];Object.keys(s).forEach(function(f){var v=s[f];switch(f){case"class":Array.isArray(v)&&(v=v.join(" "));case"style":o.setAttribute(f,v),r&&o.setAttribute(r,"");break;default:u.indexOf(f)!==-1&&o.setAttribute(f,wS(n,f,v))}})}xS(a,o,i);var l=a.children;Array.isArray(l)&&l.length&&uh(a.children,o,r,i),t.appendChild(o)}else a.type==="text"&&typeof a.text=="string"&&a.text!==""&&t.appendChild(document.createTextNode(bS(a.text)))}),t}function xS(e,t,r){["a","img"].includes(e.name)&&r&&(t.setAttribute("onClick","return false;"),t.addEventListener("click",i=>{r(i,{node:e}),i.stopPropagation()},!0))}var yS={nodes:{type:[Array,String],default:function(){return[]}}},SS=ge({name:"RichText",compatConfig:{MODE:3},props:yS,emits:["click","touchstart","touchmove","touchcancel","touchend","longpress"],setup(e,t){var{emit:r,attrs:i}=t,a=Dt(),n=U(null),o=Pe(n,r),s=!!i.onItemclick;function u(f){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o("itemclick",f,v)}function l(f){typeof f=="string"&&(f=_S(f));var v=uh(f,document.createDocumentFragment(),(a&&a.root.type).__scopeId||"",s&&u);n.value.firstElementChild.innerHTML="",n.value.firstElementChild.appendChild(v)}return H(()=>e.nodes,f=>{l(f)}),Re(()=>{l(e.nodes)}),()=>I("uni-rich-text",{ref:n},[I("div",null,null)],512)}}),fh=_i(!0),ES={scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"back"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},TS=ge({name:"ScrollView",compatConfig:{MODE:3},props:ES,emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=U(null),o=U(null),s=U(null),u=U(null),l=Pe(a,r),{state:f,scrollTopNumber:v,scrollLeftNumber:m}=CS(e);OS(e,f,v,m,l,a,n,s,r);var d=ee(()=>{var _="";return e.scrollX?_+="overflow-x:auto;":_+="overflow-x:hidden;",e.scrollY?_+="overflow-y:auto;":_+="overflow-y:hidden;",_});return()=>{var{refresherEnabled:_,refresherBackground:b,refresherDefaultStyle:x}=e,{refresherHeight:p,refreshState:g,refreshRotate:c}=f;return I("uni-scroll-view",{ref:a},[I("div",{ref:o,class:"uni-scroll-view"},[I("div",{ref:n,style:d.value,class:"uni-scroll-view"},[I("div",{ref:s,class:"uni-scroll-view-content"},[_?I("div",{ref:u,style:{backgroundColor:b,height:p+"px"},class:"uni-scroll-view-refresher"},[x!=="none"?I("div",{class:"uni-scroll-view-refresh"},[I("div",{class:"uni-scroll-view-refresh-inner"},[g=="pulling"?I("svg",{key:"refresh__icon",style:{transform:"rotate("+c+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[I("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),I("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,g=="refreshing"?I("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[I("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,x=="none"?i.refresher&&i.refresher():null],4):null,i.default&&i.default()],512)],4)],512)],512)}}});function CS(e){var t=ee(()=>Number(e.scrollTop)||0),r=ee(()=>Number(e.scrollLeft)||0),i=Ae({lastScrollTop:t.value,lastScrollLeft:r.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshRotate:0,refreshState:""});return{state:i,scrollTopNumber:t,scrollLeftNumber:r}}function OS(e,t,r,i,a,n,o,s,u){var l=!1,f=0,v=!1,m=()=>{},d=ee(()=>{var y=Number(e.upperThreshold);return isNaN(y)?50:y}),_=ee(()=>{var y=Number(e.lowerThreshold);return isNaN(y)?50:y});function b(y,T){var E=o.value,O=0,N="";if(y<0?y=0:T==="x"&&y>E.scrollWidth-E.offsetWidth?y=E.scrollWidth-E.offsetWidth:T==="y"&&y>E.scrollHeight-E.offsetHeight&&(y=E.scrollHeight-E.offsetHeight),T==="x"?O=E.scrollLeft-y:T==="y"&&(O=E.scrollTop-y),O!==0){var R=s.value;R.style.transition="transform .3s ease-out",R.style.webkitTransition="-webkit-transform .3s ease-out",T==="x"?N="translateX("+O+"px) translateZ(0)":T==="y"&&(N="translateY("+O+"px) translateZ(0)"),R.removeEventListener("transitionend",m),R.removeEventListener("webkitTransitionEnd",m),m=()=>h(y,T),R.addEventListener("transitionend",m),R.addEventListener("webkitTransitionEnd",m),T==="x"?E.style.overflowX="hidden":T==="y"&&(E.style.overflowY="hidden"),R.style.transform=N,R.style.webkitTransform=N}}function x(y){var T=y.target;a("scroll",y,{scrollLeft:T.scrollLeft,scrollTop:T.scrollTop,scrollHeight:T.scrollHeight,scrollWidth:T.scrollWidth,deltaX:t.lastScrollLeft-T.scrollLeft,deltaY:t.lastScrollTop-T.scrollTop}),e.scrollY&&(T.scrollTop<=d.value&&t.lastScrollTop-T.scrollTop>0&&y.timeStamp-t.lastScrollToUpperTime>200&&(a("scrolltoupper",y,{direction:"top"}),t.lastScrollToUpperTime=y.timeStamp),T.scrollTop+T.offsetHeight+_.value>=T.scrollHeight&&t.lastScrollTop-T.scrollTop<0&&y.timeStamp-t.lastScrollToLowerTime>200&&(a("scrolltolower",y,{direction:"bottom"}),t.lastScrollToLowerTime=y.timeStamp)),e.scrollX&&(T.scrollLeft<=d.value&&t.lastScrollLeft-T.scrollLeft>0&&y.timeStamp-t.lastScrollToUpperTime>200&&(a("scrolltoupper",y,{direction:"left"}),t.lastScrollToUpperTime=y.timeStamp),T.scrollLeft+T.offsetWidth+_.value>=T.scrollWidth&&t.lastScrollLeft-T.scrollLeft<0&&y.timeStamp-t.lastScrollToLowerTime>200&&(a("scrolltolower",y,{direction:"right"}),t.lastScrollToLowerTime=y.timeStamp)),t.lastScrollTop=T.scrollTop,t.lastScrollLeft=T.scrollLeft}function p(y){e.scrollY&&(e.scrollWithAnimation?b(y,"y"):o.value.scrollTop=y)}function g(y){e.scrollX&&(e.scrollWithAnimation?b(y,"x"):o.value.scrollLeft=y)}function c(y){if(y){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(y)){console.error("id error: scroll-into-view=".concat(y));return}var T=n.value.querySelector("#"+y);if(T){var E=o.value.getBoundingClientRect(),O=T.getBoundingClientRect();if(e.scrollX){var N=O.left-E.left,R=o.value.scrollLeft,V=R+N;e.scrollWithAnimation?b(V,"x"):o.value.scrollLeft=V}if(e.scrollY){var ue=O.top-E.top,M=o.value.scrollTop,B=M+ue;e.scrollWithAnimation?b(B,"y"):o.value.scrollTop=B}}}}function h(y,T){s.value.style.transition="",s.value.style.webkitTransition="",s.value.style.transform="",s.value.style.webkitTransform="";var E=o.value;T==="x"?(E.style.overflowX=e.scrollX?"auto":"hidden",E.scrollLeft=y):T==="y"&&(E.style.overflowY=e.scrollY?"auto":"hidden",E.scrollTop=y),s.value.removeEventListener("transitionend",m),s.value.removeEventListener("webkitTransitionEnd",m)}function w(y){switch(y){case"refreshing":t.refresherHeight=e.refresherThreshold,l||(l=!0,a("refresherrefresh",{},{}),u("update:refresherTriggered",!0));break;case"restore":case"refresherabort":l=!1,t.refresherHeight=f=0,y==="restore"&&(v=!1,a("refresherrestore",{},{})),y==="refresherabort"&&v&&(v=!1,a("refresherabort",{},{}));break}t.refreshState=y}Re(()=>{Vr(()=>{p(r.value),g(i.value)}),c(e.scrollIntoView);var y=function(V){V.preventDefault(),V.stopPropagation(),x(V)},T={x:0,y:0},E=null,O=function(V){if(T!==null){var ue=V.touches[0].pageX,M=V.touches[0].pageY,B=o.value;if(Math.abs(ue-T.x)>Math.abs(M-T.y))if(e.scrollX){if(B.scrollLeft===0&&ue>T.x){E=!1;return}else if(B.scrollWidth===B.offsetWidth+B.scrollLeft&&ueT.y)E=!1,e.refresherEnabled&&V.cancelable!==!1&&V.preventDefault();else if(B.scrollHeight===B.offsetHeight+B.scrollTop&&M0&&(v=!0,a("refresherpulling",V,{deltaY:Q})));var te=t.refresherHeight/e.refresherThreshold;t.refreshRotate=(te>1?1:te)*360}}},N=function(V){V.touches.length===1&&(sr({disable:!0}),T={x:V.touches[0].pageX,y:V.touches[0].pageY})},R=function(V){T=null,sr({disable:!1}),t.refresherHeight>=e.refresherThreshold?w("refreshing"):w("refresherabort")};o.value.addEventListener("touchstart",N,fh),o.value.addEventListener("touchmove",O,_i(!1)),o.value.addEventListener("scroll",y,_i(!1)),o.value.addEventListener("touchend",R,fh),Fn(),Ce(()=>{o.value.removeEventListener("touchstart",N),o.value.removeEventListener("touchmove",O),o.value.removeEventListener("scroll",y),o.value.removeEventListener("touchend",R)})}),ss(()=>{e.scrollY&&(o.value.scrollTop=t.lastScrollTop),e.scrollX&&(o.value.scrollLeft=t.lastScrollLeft)}),H(r,y=>{p(y)}),H(i,y=>{g(y)}),H(()=>e.scrollIntoView,y=>{c(y)}),H(()=>e.refresherTriggered,y=>{y===!0?w("refreshing"):y===!1&&w("restore")})}var AS={name:{type:String,default:""},min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0},step:{type:[Number,String],default:1},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#e9e9e9"},backgroundColor:{type:String,default:"#e9e9e9"},activeColor:{type:String,default:"#007aff"},selectedColor:{type:String,default:"#007aff"},blockColor:{type:String,default:"#ffffff"},blockSize:{type:[Number,String],default:28},showValue:{type:[Boolean,String],default:!1}},IS=ge({name:"Slider",props:AS,emits:["changing","change"],setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=U(null),o=U(Number(e.value));H(()=>e.value,v=>{o.value=Number(v)});var s=Pe(i,r),u=kS(e,o),{_onClick:l,_onTrack:f}=MS(e,o,i,a,s);return Re(()=>{zn(n.value,f)}),()=>{var{setBgColor:v,setBlockBg:m,setActiveColor:d,setBlockStyle:_}=u;return I("uni-slider",{ref:i,onClick:Ar(l)},[I("div",{class:"uni-slider-wrapper"},[I("div",{class:"uni-slider-tap-area"},[I("div",{style:v.value,class:"uni-slider-handle-wrapper"},[I("div",{ref:n,style:m.value,class:"uni-slider-handle"},null,4),I("div",{style:_.value,class:"uni-slider-thumb"},null,4),I("div",{style:d.value,class:"uni-slider-track"},null,4)],4)]),ki(I("span",{ref:a,class:"uni-slider-value"},[o.value],512),[[Pi,e.showValue]])]),I("slot",null,null)],8,["onClick"])}}});function kS(e,t){var r=()=>{var o=Number(e.max),s=Number(e.min);return 100*(t.value-s)/(o-s)+"%"},i=()=>e.backgroundColor!=="#e9e9e9"?e.backgroundColor:e.color!=="#007aff"?e.color:"#007aff",a=()=>e.activeColor!=="#007aff"?e.activeColor:e.selectedColor!=="#e9e9e9"?e.selectedColor:"#e9e9e9",n={setBgColor:ee(()=>({backgroundColor:i()})),setBlockBg:ee(()=>({left:r()})),setActiveColor:ee(()=>({backgroundColor:a(),width:r()})),setBlockStyle:ee(()=>({width:e.blockSize+"px",height:e.blockSize+"px",marginLeft:-e.blockSize/2+"px",marginTop:-e.blockSize/2+"px",left:r(),backgroundColor:e.blockColor}))};return n}function MS(e,t,r,i,a){var n=v=>{e.disabled||(s(v),a("change",v,{value:t.value}))},o=v=>{var m=Number(e.max),d=Number(e.min),_=Number(e.step);return vm?m:RS.mul.call(Math.round((v-d)/_),_)+d},s=v=>{var m=Number(e.max),d=Number(e.min),_=i.value,b=getComputedStyle(_,null).marginLeft,x=_.offsetWidth;x=x+parseInt(b);var p=r.value,g=p.offsetWidth-(e.showValue?x:0),c=p.getBoundingClientRect().left,h=(v.x-c)*(m-d)/g+d;t.value=o(h)},u=v=>{if(!e.disabled)return v.detail.state==="move"?(s({x:v.detail.x}),a("changing",v,{value:t.value}),!1):v.detail.state==="end"&&a("change",v,{value:t.value})},l=_e(It,!1);if(l){var f={reset:()=>t.value=Number(e.min),submit:()=>{var v=["",null];return e.name!==""&&(v[0]=e.name,v[1]=t.value),v}};l.addField(f),Ce(()=>{l.removeField(f)})}return{_onClick:n,_onTrack:u}}var RS={mul:function(e){var t=0,r=this.toString(),i=e.toString();try{t+=r.split(".")[1].length}catch(a){}try{t+=i.split(".")[1].length}catch(a){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,t)}},LS={indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1}};function PS(e){var t=ee(()=>{var n=Number(e.interval);return isNaN(n)?5e3:n}),r=ee(()=>{var n=Number(e.duration);return isNaN(n)?500:n}),i=ee(()=>{var n=Math.round(e.displayMultipleItems);return isNaN(n)?1:n}),a=Ae({interval:t,duration:r,displayMultipleItems:i,current:Math.round(e.current)||0,currentItemId:e.currentItemId,userTracking:!1});return a}function NS(e,t,r,i,a,n){function o(){s&&(clearTimeout(s),s=null)}var s=null,u=!0,l=0,f=1,v=null,m=!1,d=0,_,b="",x,p=ee(()=>e.circular&&r.value.length>t.displayMultipleItems);function g(M){if(!u)for(var B=r.value,Q=B.length,te=M+t.displayMultipleItems,W=0;W=G.length&&(M-=G.length),M=_%1>.5||_<0?M-1:M,n("transition",{},{dx:e.vertical?0:M*W.offsetWidth,dy:e.vertical?M*W.offsetHeight:0})}function h(){v&&(c(v.toPos),v=null)}function w(M){var B=r.value.length;if(!B)return-1;var Q=(Math.round(M)%B+B)%B;if(p.value){if(B<=t.displayMultipleItems)return 0}else if(Q>B-t.displayMultipleItems)return B-t.displayMultipleItems;return Q}function y(){v=null}function T(){if(!v){m=!1;return}var M=v,B=M.toPos,Q=M.acc,te=M.endTime,W=M.source,G=te-Date.now();if(G<=0){c(B),v=null,m=!1,_=null;var ae=r.value[t.current];if(ae){var Se=ae.getItemId();n("animationfinish",{},{current:t.current,currentItemId:Se,source:W})}return}var se=Q*G*G/2,K=B+se;c(K),x=requestAnimationFrame(T)}function E(M,B,Q){y();var te=t.duration,W=r.value.length,G=l;if(p.value)if(Q<0){for(;GM;)G-=W}else if(Q>0){for(;G>M;)G-=W;for(;G+WM;)G-=W;G+W-M0&&f<1||(f=1)}var G=l;l=-2;var ae=t.current;ae>=0?(u=!1,t.userTracking?(c(G+ae-d),d=ae):(c(ae),e.autoplay&&O())):(u=!0,c(-t.displayMultipleItems-1))}H([()=>e.current,()=>e.currentItemId,()=>[...r.value]],()=>{var M=-1;if(e.currentItemId)for(var B=0,Q=r.value;Be.vertical,()=>p.value,()=>t.displayMultipleItems,()=>[...r.value]],N),H(()=>t.interval,()=>{s&&(o(),O())});function R(M,B){var Q=b;b="";var te=r.value;if(!Q){var W=te.length;E(M,"",p.value&&B+(W-M)%W>W/2?1:0)}var G=te[M];if(G){var ae=t.currentItemId=G.getItemId();n("change",{},{current:t.current,currentItemId:ae,source:Q})}}H(()=>t.current,(M,B)=>{R(M,B),a("update:current",M)}),H(()=>t.currentItemId,M=>{a("update:currentItemId",M)});function V(M){M?O():o()}H(()=>e.autoplay&&!t.userTracking,V),V(e.autoplay&&!t.userTracking),Re(()=>{var M=!1,B=0,Q=0;function te(){o(),d=l,B=0,Q=Date.now(),y()}function W(ae){var Se=Q;Q=Date.now();var se=r.value.length,K=se-t.displayMultipleItems;function ie(nt){return .5-.25/(nt+.5)}function le(nt,lr){var Ne=d+nt;B=.6*B+.4*lr,p.value||(Ne<0||Ne>K)&&(Ne<0?Ne=-ie(-Ne):Ne>K&&(Ne=K+ie(Ne-K)),B=0),c(Ne)}var Ie=Q-Se||1,ke=i.value;e.vertical?le(-ae.dy/ke.offsetHeight,-ae.ddy/Ie):le(-ae.dx/ke.offsetWidth,-ae.ddx/Ie)}function G(ae){t.userTracking=!1;var Se=B/Math.abs(B),se=0;!ae&&Math.abs(B)>.2&&(se=.5*Se);var K=w(l+se);ae?c(d):(b="touch",t.current=K,E(K,"touch",se!==0?se:K===0&&p.value&&l>=1?1:0))}zn(i.value,ae=>{if(!e.disableTouch&&!u){if(ae.detail.state==="start")return t.userTracking=!0,M=!1,te();if(ae.detail.state==="end")return G(!1);if(ae.detail.state==="cancel")return G(!0);if(t.userTracking){if(!M){M=!0;var Se=Math.abs(ae.detail.dx),se=Math.abs(ae.detail.dy);if((Se>=se&&e.vertical||Se<=se&&!e.vertical)&&(t.userTracking=!1),!t.userTracking){e.autoplay&&O();return}}return W(ae.detail),!1}}})}),Zt(()=>{o(),cancelAnimationFrame(x)});function ue(M){E(t.current=M,b="click",p.value?1:0)}return{onSwiperDotClick:ue}}var DS=ge({name:"Swiper",props:LS,emits:["change","transition","animationfinish","update:current","update:currentItemId"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=Pe(a,i),o=U(null),s=U(null),u=PS(e),l=ee(()=>{var g={};return(e.nextMargin||e.previousMargin)&&(g=e.vertical?{left:0,right:0,top:_r(e.previousMargin,!0),bottom:_r(e.nextMargin,!0)}:{top:0,bottom:0,left:_r(e.previousMargin,!0),right:_r(e.nextMargin,!0)}),g}),f=ee(()=>{var g=Math.abs(100/u.displayMultipleItems)+"%";return{width:e.vertical?"100%":g,height:e.vertical?g:"100%"}}),v=[],m=[],d=U([]);function _(){for(var g=[],c=function(w){var y=v[w];y instanceof Element||(y=y.el);var T=m.find(E=>y===E.rootRef.value);T&&g.push(qa(T))},h=0;h{v=s.value.children,_()});var b=function(g){m.push(g),_()};ze("addSwiperContext",b);var x=function(g){var c=m.indexOf(g);c>=0&&(m.splice(c,1),_())};ze("removeSwiperContext",x);var{onSwiperDotClick:p}=NS(e,u,d,s,i,n);return()=>{var g=r.default&&r.default();return v=_l(g),I("uni-swiper",{ref:a},[I("div",{ref:o,class:"uni-swiper-wrapper"},[I("div",{class:"uni-swiper-slides",style:l.value},[I("div",{ref:s,class:"uni-swiper-slide-frame",style:f.value},[g],4)],4),e.indicatorDots&&I("div",{class:["uni-swiper-dots",e.vertical?"uni-swiper-dots-vertical":"uni-swiper-dots-horizontal"]},[d.value.map((c,h,w)=>I("div",{onClick:()=>p(h),class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":h=u.current||h{var n=_e("addSwiperContext");n&&n(a)}),Zt(()=>{var n=_e("removeSwiperContext");n&&n(a)}),()=>I("uni-swiper-item",{ref:i,style:{position:"absolute",width:"100%",height:"100%"}},[r.default&&r.default()],512)}}),FS={name:{type:String,default:""},checked:{type:[Boolean,String],default:!1},type:{type:String,default:"switch"},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"}},zS=ge({name:"Switch",props:FS,emits:["change"],setup(e,t){var{emit:r}=t,i=U(null),a=U(e.checked),n=US(e,a),o=Pe(i,r);H(()=>e.checked,u=>{a.value=u});var s=u=>{e.disabled||(a.value=!a.value,o("change",u,{value:a.value}))};return n&&(n.addHandler(s),Ce(()=>{n.removeHandler(s)})),Rn(e,{"label-click":s}),()=>{var{color:u,type:l}=e,f=ai(e,"disabled");return I("uni-switch",et({ref:i},f,{onClick:s}),[I("div",{class:"uni-switch-wrapper"},[ki(I("div",{class:["uni-switch-input",[a.value?"uni-switch-input-checked":""]],style:{backgroundColor:a.value?u:"#DFDFDF",borderColor:a.value?u:"#DFDFDF"}},null,6),[[Pi,l==="switch"]]),ki(I("div",{class:"uni-checkbox-input"},[a.value?dn(vn,e.color,22):""],512),[[Pi,l==="checkbox"]])])],16,["onClick"])}}});function US(e,t){var r=_e(It,!1),i=_e(Qi,!1),a={submit:()=>{var n=["",null];return e.name&&(n[0]=e.name,n[1]=t.value),n},reset:()=>{t.value=!1}};return r&&(r.addField(a),Zt(()=>{r.removeField(a)})),i}var sa={ensp:"\u2002",emsp:"\u2003",nbsp:"\xA0"};function HS(e,t){return e.replace(/\\n/g,mi).split(mi).map(r=>WS(r,t))}function WS(e,t){var{space:r,decode:i}=t;return!e||(r&&sa[r]&&(e=e.replace(/ /g,sa[r])),!i)?e:e.replace(/ /g,sa.nbsp).replace(/ /g,sa.ensp).replace(/ /g,sa.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")}var VS=ve({},jd,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:""}}),yl=!1;function jS(){var e="(prefers-color-scheme: dark)";yl=String(navigator.platform).indexOf("iP")===0&&String(navigator.vendor).indexOf("Apple")===0&&window.matchMedia(e).media!==e}var YS=ge({name:"Textarea",props:VS,emit:["confirm","linechange",...Yd],setup(e,t){var{emit:r}=t,i=U(null),{fieldRef:a,state:n,scopedAttrsState:o,fixDisabledColor:s,trigger:u}=qd(e,i,r),l=ee(()=>n.value.split(mi)),f=ee(()=>["done","go","next","search","send"].includes(e.confirmType)),v=U(0),m=U(null);H(()=>v.value,p=>{var g=i.value,c=m.value,h=parseFloat(getComputedStyle(g).lineHeight);isNaN(h)&&(h=c.offsetHeight);var w=Math.round(p/h);u("linechange",{},{height:p,heightRpx:750/window.innerWidth*p,lineCount:w}),e.autoHeight&&(g.style.height=p+"px")});function d(p){var{height:g}=p;v.value=g}function _(p){u("confirm",p,{value:n.value})}function b(p){p.key==="Enter"&&f.value&&p.preventDefault()}function x(p){if(p.key==="Enter"&&f.value){_(p);var g=p.target;!e.confirmHold&&g.blur()}}return jS(),()=>{var p=e.disabled&&s?I("textarea",{ref:a,value:n.value,tabindex:"-1",readonly:!!e.disabled,maxlength:n.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":yl},style:{overflowY:e.autoHeight?"hidden":"auto"},onFocus:g=>g.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):I("textarea",{ref:a,value:n.value,disabled:!!e.disabled,maxlength:n.maxlength,enterkeyhint:e.confirmType,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":yl},style:{overflowY:e.autoHeight?"hidden":"auto"},onKeydown:b,onKeyup:x},null,46,["value","disabled","maxlength","enterkeyhint","onKeydown","onKeyup"]);return I("uni-textarea",{ref:i},[I("div",{class:"uni-textarea-wrapper"},[ki(I("div",et(o.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Pi,!n.value.length]]),I("div",{ref:m,class:"uni-textarea-line"},[" "],512),I("div",{class:"uni-textarea-compute"},[l.value.map(g=>I("div",null,[g.trim()?g:"."])),I(Ir,{initial:!0,onResize:d},null,8,["initial","onResize"])]),e.confirmType==="search"?I("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[p],40,["onSubmit"]):p])],512)}}});ve({},hx);function Wn(e,t){if(t||(t=e.id),!!t)return e.$options.name.toLowerCase()+"."+t}function ch(e,t,r){!e||bt(r||Gt(),e,(i,a)=>{var{type:n,data:o}=i;t(n,o,a)})}function vh(e,t){!e||Om(t||Gt(),e)}function Vn(e,t,r,i){var a=Dt(),n=a.proxy;Re(()=>{ch(t||Wn(n),e,i),(r||!t)&&H(()=>n.id,(o,s)=>{ch(Wn(n,o),e,i),vh(s&&Wn(n,s))})}),Ce(()=>{vh(t||Wn(n),i)})}var qS=0;function jn(e){var t=hn(),r=Dt(),i=r.proxy,a=i.$options.name.toLowerCase(),n=e||i.id||"context".concat(qS++);return Re(()=>{var o=i.$el;o.__uniContextInfo={id:n,type:a,page:t}}),"".concat(a,".").concat(n)}function XS(e){return e.__uniContextInfo}class dh extends wd{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r,i,a,n,[...Mn.props,...o])}call(t){var r={animation:this.$props.animation,$el:this.$};t.call(r)}setAttribute(t,r){return t==="animation"&&(this.$animate=!0),super.setAttribute(t,r)}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!!this.$animate){if(t)return this.call(Mn.mounted);this.$animate&&(this.$animate=!1,this.call(Mn.watch.animation.handler))}}}var ZS=["space","decode"];class KS extends dh{constructor(t,r,i,a){super(t,document.createElement("uni-text"),r,i,a,ZS);this._text=""}init(t){this._text=t.t||"",super.init(t)}setText(t){this._text=t,this.update()}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{$props:{space:r,decode:i}}=this;this.$.textContent=HS(this._text,{space:r,decode:i}).join(mi),super.update(t)}}class GS extends ii{constructor(t,r,i,a){super(t,"#text",r,document.createTextNode(""));this.init(a),this.insert(r,i)}}var YT="",JS=["hover-class","hover-stop-propagation","hover-start-time","hover-stay-time"];class QS extends dh{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r,i,a,n,[...JS,...o])}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.$props["hover-class"];r&&r!=="none"?(this._hover||(this._hover=new eE(this.$,this.$props)),this._hover.addEvent()):this._hover&&this._hover.removeEvent(),super.update(t)}}class eE{constructor(t,r){this._listening=!1,this._hovering=!1,this._hoverTouch=!1,this.$=t,this.props=r,this.__hoverTouchStart=this._hoverTouchStart.bind(this),this.__hoverTouchEnd=this._hoverTouchEnd.bind(this),this.__hoverTouchCancel=this._hoverTouchCancel.bind(this)}get hovering(){return this._hovering}set hovering(t){this._hovering=t;var r=this.props["hover-class"];t?this.$.classList.add(r):this.$.classList.remove(r)}addEvent(){this._listening||(this._listening=!0,this.$.addEventListener("touchstart",this.__hoverTouchStart),this.$.addEventListener("touchend",this.__hoverTouchEnd),this.$.addEventListener("touchcancel",this.__hoverTouchCancel))}removeEvent(){!this._listening||(this._listening=!1,this.$.removeEventListener("touchstart",this.__hoverTouchStart),this.$.removeEventListener("touchend",this.__hoverTouchEnd),this.$.removeEventListener("touchcancel",this.__hoverTouchCancel))}_hoverTouchStart(t){if(!t._hoverPropagationStopped){var r=this.props["hover-class"];!r||r==="none"||this.$.disabled||t.touches.length>1||(this.props["hover-stop-propagation"]&&(t._hoverPropagationStopped=!0),this._hoverTouch=!0,this._hoverStartTimer=setTimeout(()=>{this.hovering=!0,this._hoverTouch||this._hoverReset()},this.props["hover-start-time"]))}}_hoverTouchEnd(){this._hoverTouch=!1,this.hovering&&this._hoverReset()}_hoverReset(){requestAnimationFrame(()=>{clearTimeout(this._hoverStayTimer),this._hoverStayTimer=setTimeout(()=>{this.hovering=!1},this.props["hover-stay-time"])})}_hoverTouchCancel(){this._hoverTouch=!1,this.hovering=!1,clearTimeout(this._hoverStartTimer)}}class tE extends QS{constructor(t,r,i,a){super(t,document.createElement("uni-view"),r,i,a)}}function hh(){return plus.navigator.isImmersedStatusbar()?Math.round(plus.os.name==="iOS"?plus.navigator.getSafeAreaInsets().top:plus.navigator.getStatusbarHeight()):0}function gh(){var e=plus.webview.currentWebview(),t=e.getStyle(),r=t&&t.titleNView;return r&&r.type==="default"?Eu+hh():0}var ph=Symbol("onDraw");function rE(e){for(var t;e;){var r=getComputedStyle(e),i=r.transform||r.webkitTransform;t=i&&i!=="none"?!1:t,t=r.position==="fixed"?!0:t,e=e.parentElement}return t}function Sl(e,t){return ee(()=>{var r={};return Object.keys(e).forEach(i=>{if(!(t&&t.includes(i))){var a=e[i];a=i==="src"?vt(a):a,r[i.replace(/[A-Z]/g,n=>"-"+n.toLowerCase())]=a}}),r})}function la(e){var t=Ae({top:"0px",left:"0px",width:"0px",height:"0px",position:"static"}),r=U(!1);function i(){var v=e.value,m=v.getBoundingClientRect(),d=["width","height"];r.value=m.width===0||m.height===0,r.value||(t.position=rE(v)?"absolute":"static",d.push("top","left")),d.forEach(_=>{var b=m[_];b=_==="top"?b+(t.position==="static"?document.documentElement.scrollTop||document.body.scrollTop||0:gh()):b,t[_]=b+"px"})}var a=null;function n(){a&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{a=null,i()})}window.addEventListener("updateview",n);var o=[],s=[];function u(v){s?s.push(v):v()}function l(v){var m=_e(ph),d=_=>{v(_),o.forEach(b=>b(t)),o=null};u(()=>{m?m(d):d({top:"0px",left:"0px",width:Number.MAX_SAFE_INTEGER+"px",height:Number.MAX_SAFE_INTEGER+"px",position:"static"})})}var f=function(v){o?o.push(v):v(t)};return ze(ph,f),Re(()=>{i(),s.forEach(v=>v()),s=null}),Ce(()=>{window.removeEventListener("updateview",n)}),{position:t,hidden:r,onParentReady:l}}var iE=ge({name:"Ad",props:{adpid:{type:[Number,String],default:""},data:{type:Object,default:null},dataCount:{type:Number,default:5},channel:{type:String,default:""}},setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=Pe(i,r),o=Sl(e,["id"]),{position:s,onParentReady:u}=la(a),l;return u(()=>{l=plus.ad.createAdView(Object.assign({},o.value,s)),plus.webview.currentWebview().append(l),l.setDislikeListener(v=>{a.value.style.height="0",window.dispatchEvent(new CustomEvent("updateview")),n("close",{},v)}),l.setRenderingListener(v=>{v.result===0?(a.value.style.height=v.height+"px",window.dispatchEvent(new CustomEvent("updateview"))):n("error",{},{errCode:v.result})}),l.setAdClickedListener(()=>{n("adclicked",{},{})}),H(()=>s,v=>l.setStyle(v),{deep:!0}),H(()=>e.adpid,v=>{v&&f()}),H(()=>e.data,v=>{v&&l.renderingBind(v)});function f(){var v={adpid:e.adpid,width:s.width,count:e.dataCount};e.channel!==void 0&&(v.ext={channel:e.channel}),UniViewJSBridge.invokeServiceMethod("getAdData",v,m=>{var{code:d,data:_,message:b}=m;d===0?l.renderingBind(_):n("error",{},{errMsg:b})})}e.adpid&&f()}),Ce(()=>{l&&l.close()}),()=>I("uni-ad",{ref:i},[I("div",{ref:a,class:"uni-ad-container"},null,512)],512)}});class we extends ii{constructor(t,r,i,a,n,o,s){super(t,r,a);var u=document.createElement("div");u.__vueParent=aE(this),this.$props=Ae({}),this.init(o),this.$app=lc(hT(i,this.$props)),this.$app.mount(u),this.$=u.firstElementChild,s&&(this.$holder=this.$.querySelector(s)),re(o,"t")&&this.setText(o.t||""),o.a&&re(o.a,Na)&&cl(this.$,o.a[Na]),this.insert(a,n),wf()}init(t){var{a:r,e:i,w:a}=t;r&&(this.setWxsProps(r),Object.keys(r).forEach(n=>{this.setAttr(n,r[n])})),re(t,"s")&&this.setAttr("style",t.s),i&&Object.keys(i).forEach(n=>{this.addEvent(n,i[n])}),a&&this.addWxsEvents(t.w)}setText(t){(this.$holder||this.$).textContent=t}addWxsEvent(t,r,i){this.$props[t]=bd(this.$,r,i)}addEvent(t,r){this.$props[t]=md(this.id,r,Ro(t)[1])}removeEvent(t){this.$props[t]=null}setAttr(t,r){if(t===Na)this.$&&cl(this.$,r);else if(t===Iu)this.$.__ownerId=r;else if(t===ku)nr(()=>ud(this,r),od);else if(t===Po){var i=fl(this.$||at(this.pid).$,r),a=this.$props.style;mt(i)&&mt(a)?Object.keys(i).forEach(n=>{a[n]=i[n]}):this.$props.style=i}else kn(t)?this.$.style.setProperty(t,r):(r=fl(this.$||at(this.pid).$,r),this.wxsPropsInvoke(t,r,!0)||(this.$props[t]=r))}removeAttr(t){kn(t)?this.$.style.removeProperty(t):this.$props[t]=null}remove(){this.removeUniParent(),this.isUnmounted=!0,this.$app.unmount(),Eh(this.id),this.removeUniChildren()}appendChild(t){return(this.$holder||this.$).appendChild(t)}insertBefore(t,r){return(this.$holder||this.$).insertBefore(t,r)}}class ua extends we{constructor(t,r,i,a,n,o,s){super(t,r,i,a,n,o,s)}getRebuildFn(){return this._rebuild||(this._rebuild=this.rebuild.bind(this)),this._rebuild}setText(t){return nr(this.getRebuildFn(),al),super.setText(t)}appendChild(t){return nr(this.getRebuildFn(),al),super.appendChild(t)}insertBefore(t,r){return nr(this.getRebuildFn(),al),super.insertBefore(t,r)}rebuild(){var t=this.$.__vueParentComponent;t.rebuild&&t.rebuild()}}function aE(e){for(;e&&e.pid>0;)if(e=at(e.pid),e){var{__vueParentComponent:t}=e.$;if(t)return t}return null}function El(e,t,r){e.childNodes.forEach(i=>{i instanceof Element?i.className.indexOf(t)===-1&&e.removeChild(i):e.removeChild(i)}),e.appendChild(document.createTextNode(r))}var nE=["value","modelValue"];function mh(e){nE.forEach(t=>{if(re(e,t)){var r="onUpdate:"+t;re(e,r)||(e[r]=i=>e[t]=i)}})}class oE extends we{constructor(t,r,i,a){super(t,"uni-ad",iE,r,i,a)}}var qT="";class sE extends we{constructor(t,r,i,a){super(t,"uni-button",Sx,r,i,a)}}class oi extends ii{constructor(t,r,i,a){super(t,r,i);this.insert(i,a)}}class lE extends oi{constructor(t,r,i){super(t,"uni-camera",r,i)}}var XT="";class uE extends we{constructor(t,r,i,a){super(t,"uni-canvas",Mx,r,i,a,"uni-canvas > div")}}var ZT="";class fE extends we{constructor(t,r,i,a){super(t,"uni-checkbox",$x,r,i,a,".uni-checkbox-wrapper")}setText(t){El(this.$holder,"uni-checkbox-input",t)}}var KT="";class cE extends we{constructor(t,r,i,a){super(t,"uni-checkbox-group",Nx,r,i,a)}}var GT="",vE=0;function _h(e,t,r){var{position:i,hidden:a,onParentReady:n}=la(e),o,s;n(u=>{var l=ee(()=>{var c={};for(var h in i){var w=i[h],y=parseFloat(w),T=parseFloat(u[h]);if(h==="top"||h==="left")w=Math.max(y,T)+"px";else if(h==="width"||h==="height"){var E=h==="width"?"left":"top",O=parseFloat(u[E]),N=parseFloat(i[E]),R=Math.max(O-N,0),V=Math.max(N+y-(O+T),0);w=Math.max(y-R-V,0)+"px"}c[h]=w}return c}),f=["borderRadius","borderColor","borderWidth","backgroundColor"],v=["paddingTop","paddingRight","paddingBottom","paddingLeft","color","textAlign","lineHeight","fontSize","fontWeight","textOverflow","whiteSpace"],m=[],d={start:"left",end:"right"};function _(c){var h=getComputedStyle(e.value);return f.concat(v,m).forEach(w=>{c[w]=h[w]}),c}var b=Ae(_({})),x=null;s=function(){x&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{x=null,_(b)})},window.addEventListener("updateview",s);function p(){var c={};for(var h in c){var w=c[h];(h==="top"||h==="left")&&(w=Math.min(parseFloat(w)-parseFloat(u[h]),0)+"px"),c[h]=w}return c}var g=ee(()=>{var c=p(),h=[{tag:"rect",position:c,rectStyles:{color:b.backgroundColor,radius:b.borderRadius,borderColor:b.borderColor,borderWidth:b.borderWidth}}];if("src"in r)r.src&&h.push({tag:"img",position:c,src:r.src});else{var w=parseFloat(b.lineHeight)-parseFloat(b.fontSize),y=parseFloat(c.width)-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight);y=y<0?0:y;var T=parseFloat(c.height)-parseFloat(b.paddingTop)-w/2-parseFloat(b.paddingBottom);T=T<0?0:T,h.push({tag:"font",position:{top:"".concat(parseFloat(c.top)+parseFloat(b.paddingTop)+w/2,"px"),left:"".concat(parseFloat(c.left)+parseFloat(b.paddingLeft),"px"),width:"".concat(y,"px"),height:"".concat(T,"px")},textStyles:{align:d[b.textAlign]||b.textAlign,color:b.color,decoration:"none",lineSpacing:"".concat(w,"px"),margin:"0px",overflow:b.textOverflow,size:b.fontSize,verticalAlign:"top",weight:b.fontWeight,whiteSpace:b.whiteSpace},text:r.text})}return h});o=new plus.nativeObj.View("cover-".concat(Date.now(),"-").concat(vE++),l.value,g.value),plus.webview.currentWebview().append(o),a.value&&o.hide(),o.addEventListener("click",()=>{t("click",{},{})}),H(()=>a.value,c=>{o[c?"hide":"show"]()}),H(()=>l.value,c=>{o.setStyle(c)},{deep:!0}),H(()=>g.value,()=>{o.reset(),o.draw(g.value)},{deep:!0})}),Ce(()=>{o&&o.close(),s&&window.removeEventListener("updateview",s)})}var dE="_doc/uniapp_temp/",hE={src:{type:String,default:""},autoSize:{type:[Boolean,String],default:!1}};function gE(e,t,r){var i=U(""),a;function n(){t.src="",i.value=e.autoSize?"width:0;height:0;":"";var s=e.src?vt(e.src):"";s.indexOf("http://")===0||s.indexOf("https://")===0?(a=plus.downloader.createDownload(s,{filename:dE+"/download/"},(u,l)=>{l===200?o(u.filename):r("error",{},{errMsg:"error"})}),a.start()):s&&o(s)}function o(s){t.src=s,plus.io.getImageInfo({src:s,success:u=>{var{width:l,height:f}=u;e.autoSize&&(i.value="width:".concat(l,"px;height:").concat(f,"px;"),window.dispatchEvent(new CustomEvent("updateview"))),r("load",{},{width:l,height:f})},fail:()=>{r("error",{},{errMsg:"error"})}})}return e.src&&n(),H(()=>e.src,n),Ce(()=>{a&&a.abort()}),i}var bh=ge({name:"CoverImage",props:hE,emits:["click","load","error"],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=Ae({src:""}),o=gE(e,n,a);return _h(i,a,n),()=>I("uni-cover-image",{ref:i,style:o.value},[I("div",{class:"uni-cover-image"},null)],4)}});class pE extends we{constructor(t,r,i,a){super(t,"uni-cover-image",bh,r,i,a)}}var JT="",mE=ge({name:"CoverView",emits:["click"],setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=Pe(i,r),o=Ae({text:""});return _h(i,n,o),aa(()=>{var s=a.value.childNodes[0];o.text=s&&s instanceof Text?s.textContent:"",window.dispatchEvent(new CustomEvent("updateview"))}),()=>I("uni-cover-view",{ref:i},[I("div",{ref:a,class:"uni-cover-view"},null,512)],512)}});class _E extends ua{constructor(t,r,i,a){super(t,"uni-cover-view",mE,r,i,a,".uni-cover-view")}}var QT="";class bE extends we{constructor(t,r,i,a){super(t,"uni-editor",uy,r,i,a)}}var e2="";class wE extends we{constructor(t,r,i,a){super(t,"uni-form",mx,r,i,a,"span")}}class xE extends oi{constructor(t,r,i){super(t,"uni-functional-page-navigator",r,i)}}var t2="";class yE extends we{constructor(t,r,i,a){super(t,"uni-icon",dy,r,i,a)}}var r2="";class SE extends we{constructor(t,r,i,a){super(t,"uni-image",py,r,i,a)}}var i2="";class EE extends we{constructor(t,r,i,a){super(t,"uni-input",Dy,r,i,a)}init(t){super.init(t),mh(this.$props)}}var a2="";class TE extends we{constructor(t,r,i,a){super(t,"uni-label",wx,r,i,a)}}class CE extends oi{constructor(t,r,i){super(t,"uni-live-player",r,i)}}class OE extends oi{constructor(t,r,i){super(t,"uni-live-pusher",r,i)}}var n2="",AE=(e,t,r)=>{r({coord:{latitude:t,longitude:e}})};function Tl(e){if(e.indexOf("#")!==0)return{color:e,opacity:1};var t=e.substr(7,2);return{color:e.substr(0,7),opacity:t?Number("0x"+t)/255:1}}var IE={id:{type:String,default:""},latitude:{type:[Number,String],default:""},longitude:{type:[Number,String],default:""},scale:{type:[String,Number],default:16},markers:{type:Array,default(){return[]}},polyline:{type:Array,default(){return[]}},circles:{type:Array,default(){return[]}},controls:{type:Array,default(){return[]}}},kE=ge({name:"Map",props:IE,emits:["click","regionchange","controltap","markertap","callouttap"],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=U(null),o=Sl(e,["id"]),{position:s,hidden:u,onParentReady:l}=la(n),f,{_addMarkers:v,_addMapLines:m,_addMapCircles:d,_setMap:_}=ME(e,a);l(()=>{f=ve(plus.maps.create(Gt()+"-map-"+(e.id||Date.now()),Object.assign({},o.value,s,(()=>{if(e.latitude&&e.longitude)return{center:new plus.maps.Point(Number(e.longitude),Number(e.latitude))}})())),{__markers__:[],__lines__:[],__circles__:[]}),f.setZoom(parseInt(String(e.scale))),plus.webview.currentWebview().append(f),u.value&&f.hide(),f.onclick=x=>{a("click",{},x)},f.onstatuschanged=x=>{a("regionchange",{},{})},_(f),v(e.markers),m(e.polyline),d(e.circles),H(()=>o.value,x=>f&&f.setStyles(x),{deep:!0}),H(()=>s,x=>f&&f.setStyles(x),{deep:!0}),H(u,x=>{f&&f[x?"hide":"show"]()}),H(()=>e.scale,x=>{f&&f.setZoom(parseInt(String(x)))}),H([()=>e.latitude,()=>e.longitude],x=>{var[p,g]=x;f&&f.setStyles({center:new plus.maps.Point(Number(p),Number(g))})}),H(()=>e.markers,x=>{v(x,!0)},{deep:!0}),H(()=>e.polyline,x=>{m(x)},{deep:!0}),H(()=>e.circles,x=>{d(x)},{deep:!0})});var b=ee(()=>e.controls.map(x=>{var p={position:"absolute"};return["top","left","width","height"].forEach(g=>{x.position[g]&&(p[g]=x.position[g]+"px")}),{id:x.id,iconPath:vt(x.iconPath),position:p,clickable:x.clickable}}));return Ce(()=>{f&&(f.close(),_(null))}),()=>I("uni-map",{ref:i,id:e.id},[I("div",{ref:n,class:"uni-map-container"},null,512),b.value.map((x,p)=>I(bh,{key:p,src:x.iconPath,style:x.position,"auto-size":!0,onClick:()=>x.clickable&&a("controltap",{},{controlId:x.id})},null,8,["src","style","auto-size","onClick"])),I("div",{class:"uni-map-slot"},null)],8,["id"])}});function ME(e,t){var r;function i(d){var{longitude:_,latitude:b}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};!r||(r.setCenter(new plus.maps.Point(Number(_||e.longitude),Number(b||e.latitude))),d({errMsg:"moveToLocation:ok"}))}function a(d){!r||r.getCurrentCenter((_,b)=>{d({longitude:b.getLng(),latitude:b.getLat(),errMsg:"getCenterLocation:ok"})})}function n(d){if(!!r){var _=r.getBounds();d({southwest:_.getSouthWest(),northeast:_.getNorthEast(),errMsg:"getRegion:ok"})}}function o(d){!r||d({scale:r.getZoom(),errMsg:"getScale:ok"})}function s(d){if(!!r){var{id:_,latitude:b,longitude:x,iconPath:p,callout:g,label:c}=d;AE(x,b,h=>{var w,{latitude:y,longitude:T}=h.coord,E=new plus.maps.Marker(new plus.maps.Point(T,y));p&&E.setIcon(vt(p)),c&&c.content&&E.setLabel(c.content);var O=void 0;g&&g.content&&(O=new plus.maps.Bubble(g.content)),O&&E.setBubble(O),(_||_===0)&&(E.onclick=N=>{t("markertap",{},{markerId:_})},O&&(O.onclick=()=>{t("callouttap",{},{markerId:_})})),(w=r)===null||w===void 0||w.addOverlay(E),r.__markers__.push(E)})}}function u(){if(!!r){var d=r.__markers__;d.forEach(_=>{var b;(b=r)===null||b===void 0||b.removeOverlay(_)}),r.__markers__=[]}}function l(d,_){_&&u(),d.forEach(b=>{s(b)})}function f(d){!r||(r.__lines__.length>0&&(r.__lines__.forEach(_=>{var b;(b=r)===null||b===void 0||b.removeOverlay(_)}),r.__lines__=[]),d.forEach(_=>{var b,{color:x,width:p}=_,g=_.points.map(w=>new plus.maps.Point(w.longitude,w.latitude)),c=new plus.maps.Polyline(g);if(x){var h=Tl(x);c.setStrokeColor(h.color),c.setStrokeOpacity(h.opacity)}p&&c.setLineWidth(p),(b=r)===null||b===void 0||b.addOverlay(c),r.__lines__.push(c)}))}function v(d){!r||(r.__circles__.length>0&&(r.__circles__.forEach(_=>{var b;(b=r)===null||b===void 0||b.removeOverlay(_)}),r.__circles__=[]),d.forEach(_=>{var b,{latitude:x,longitude:p,color:g,fillColor:c,radius:h,strokeWidth:w}=_,y=new plus.maps.Circle(new plus.maps.Point(p,x),h);if(g){var T=Tl(g);y.setStrokeColor(T.color),y.setStrokeOpacity(T.opacity)}if(c){var E=Tl(c);y.setFillColor(E.color),y.setFillOpacity(E.opacity)}w&&y.setLineWidth(w),(b=r)===null||b===void 0||b.addOverlay(y),r.__circles__.push(y)}))}var m={moveToLocation:i,getCenterLocation:a,getRegion:n,getScale:o};return Vn((d,_,b)=>{m[d]&&m[d](b,_)},jn(),!0),{_addMarkers:l,_addMapLines:f,_addMapCircles:v,_setMap(d){r=d}}}class RE extends we{constructor(t,r,i,a){super(t,"uni-map",kE,r,i,a,".uni-map-slot")}}var o2="";class LE extends ua{constructor(t,r,i,a){super(t,"uni-movable-area",Uy,r,i,a)}}var s2="";class PE extends we{constructor(t,r,i,a){super(t,"uni-movable-view",Vy,r,i,a)}}var l2="";class NE extends we{constructor(t,r,i,a){super(t,"uni-navigator",Zy,r,i,a,"uni-navigator")}}class DE extends oi{constructor(t,r,i){super(t,"uni-official-account",r,i)}}class BE extends oi{constructor(t,r,i){super(t,"uni-open-data",r,i)}}var si,wh,li;function xh(){return typeof window=="object"&&typeof navigator=="object"&&typeof document=="object"?"webview":"v8"}function yh(){return si.webview.currentWebview().id}var Yn,Cl,Ol={};function Al(e){var t=e.data&&e.data.__message;if(!(!t||!t.__page)){var r=t.__page,i=Ol[r];i&&i(t),t.keep||delete Ol[r]}}function $E(e,t){xh()==="v8"?li?(Yn&&Yn.close(),Yn=new li(yh()),Yn.onmessage=Al):Cl||(Cl=wh.requireModule("globalEvent"),Cl.addEventListener("plusMessage",Al)):window.__plusMessage=Al,Ol[e]=t}class FE{constructor(t){this.webview=t}sendMessage(t){var r=JSON.parse(JSON.stringify({__message:{data:t}})),i=this.webview.id;if(li){var a=new li(i);a.postMessage(r)}else si.webview.postMessageToUniNView&&si.webview.postMessageToUniNView(r,i)}close(){this.webview.close()}}function zE(e){var{context:t={},url:r,data:i={},style:a={},onMessage:n,onClose:o}=e;si=t.plus||plus,wh=t.weex||(typeof weex=="object"?weex:null),li=t.BroadcastChannel||(typeof BroadcastChannel=="object"?BroadcastChannel:null);var s={autoBackButton:!0,titleSize:"17px"},u="page".concat(Date.now());a=ve({},a),a.titleNView!==!1&&a.titleNView!=="none"&&(a.titleNView=ve(s,a.titleNView));var l={top:0,bottom:0,usingComponents:{},popGesture:"close",scrollIndicator:"none",animationType:"pop-in",animationDuration:200,uniNView:{path:"".concat(typeof process=="object"&&process.env&&{}.VUE_APP_TEMPLATE_PATH||"","/").concat(r,".js"),defaultFontSize:16,viewport:si.screen.resolutionWidth}};a=ve(l,a);var f=si.webview.create("",u,a,{extras:{from:yh(),runtime:xh(),data:i,useGlobalEvent:!li}});return f.addEventListener("close",o),$E(u,v=>{typeof n=="function"&&n(v.data),v.keep||f.close("auto")}),f.show(a.animationType,a.animationDuration),new FE(f)}var Oe={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},ui={YEAR:"year",MONTH:"month",DAY:"day"};function qn(e){return e>9?e:"0".concat(e)}function Xn(e,t){e=String(e||"");var r=new Date;if(t===Oe.TIME){var i=e.split(":");i.length===2&&r.setHours(parseInt(i[0]),parseInt(i[1]))}else{var a=e.split("-");a.length===3&&r.setFullYear(parseInt(a[0]),parseInt(String(parseFloat(a[1])-1)),parseInt(a[2]))}return r}function UE(e){if(e.mode===Oe.TIME)return"00:00";if(e.mode===Oe.DATE){var t=new Date().getFullYear()-100;switch(e.fields){case ui.YEAR:return t;case ui.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function HE(e){if(e.mode===Oe.TIME)return"23:59";if(e.mode===Oe.DATE){var t=new Date().getFullYear()+100;switch(e.fields){case ui.YEAR:return t;case ui.MONTH:return t+"-12";default:return t+"-12-31"}}return""}var WE={name:{type:String,default:""},range:{type:Array,default(){return[]}},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:Oe.SELECTOR,validator(e){return Object.values(Oe).indexOf(e)>=0}},fields:{type:String,default:""},start:{type:String,default:UE},end:{type:String,default:HE},disabled:{type:[Boolean,String],default:!1}},VE=ge({name:"Picker",props:WE,emits:["change","cancel","columnchange"],setup(e,t){var{emit:r}=t;xm();var{t:i,getLocale:a}=Ge(),n=U(null),o=Pe(n,r),s=U(null),u=U(null),l=()=>{var p=e.value;switch(e.mode){case Oe.MULTISELECTOR:{Array.isArray(p)||(p=[]),Array.isArray(s.value)||(s.value=[]);for(var g=s.value.length=Math.max(p.length,e.range.length),c=0;c{u.value&&u.value.sendMessage(p)},v=p=>{var g={event:"cancel"};u.value=zE({url:"__uniapppicker",data:p,style:{titleNView:!1,animationType:"none",animationDuration:0,background:"rgba(0,0,0,0)",popGesture:"none"},onMessage:c=>{var h=c.event;if(h==="created"){f(p);return}if(h==="columnchange"){delete c.event,o(h,{},c);return}g=c},onClose:()=>{u.value=null;var c=g.event;delete g.event,c&&o(c,{},g)}})},m=(p,g)=>{plus.nativeUI[e.mode===Oe.TIME?"pickTime":"pickDate"](c=>{var h=c.date;o("change",{},{value:e.mode===Oe.TIME?"".concat(qn(h.getHours()),":").concat(qn(h.getMinutes())):"".concat(h.getFullYear(),"-").concat(qn(h.getMonth()+1),"-").concat(qn(h.getDate()))})},()=>{o("cancel",{},{})},e.mode===Oe.TIME?{time:Xn(e.value,Oe.TIME),popover:g}:{date:Xn(e.value,Oe.DATE),minDate:Xn(e.start,Oe.DATE),maxDate:Xn(e.end,Oe.DATE),popover:g})},d=(p,g)=>{(p.mode===Oe.TIME||p.mode===Oe.DATE)&&!p.fields?m(p,g):(p.fields=Object.values(ui).includes(p.fields)?p.fields:ui.DAY,v(p))},_=p=>{if(!e.disabled){var g=p.currentTarget,c=g.getBoundingClientRect();d(Object.assign({},e,{value:s.value,locale:a(),messages:{done:i("uni.picker.done"),cancel:i("uni.picker.cancel")}}),{top:c.top+gh(),left:c.left,width:c.width,height:c.height})}},b=_e(It,!1),x={submit:()=>[e.name,s.value],reset:()=>{switch(e.mode){case Oe.SELECTOR:s.value=0;break;case Oe.MULTISELECTOR:Array.isArray(e.value)&&(s.value=e.value.map(p=>0));break;case Oe.DATE:case Oe.TIME:s.value="";break}}};return b&&(b.addField(x),Ce(()=>b.removeField(x))),Object.keys(e).forEach(p=>{p!=="name"&&H(()=>e[p],g=>{var c={};c[p]=g,f(c)},{deep:!0})}),H(()=>e.value,l,{deep:!0}),l(),()=>I("uni-picker",{ref:n,onClick:_},[I("slot",null,null)],8,["onClick"])}});class jE extends we{constructor(t,r,i,a){super(t,"uni-picker",VE,r,i,a)}}var u2="";class YE extends ua{constructor(t,r,i,a){super(t,"uni-picker-view",Jy,r,i,a,".uni-picker-view-wrapper")}}var f2="";class qE extends ua{constructor(t,r,i,a){super(t,"uni-picker-view-column",oS,r,i,a,".uni-picker-view-content")}}var c2="";class XE extends we{constructor(t,r,i,a){super(t,"uni-progress",lS,r,i,a)}}var v2="";class ZE extends we{constructor(t,r,i,a){super(t,"uni-radio",hS,r,i,a,".uni-radio-wrapper")}setText(t){El(this.$holder,"uni-radio-input",t)}}var d2="";class KE extends we{constructor(t,r,i,a){super(t,"uni-radio-group",cS,r,i,a)}}var h2="";class GE extends we{constructor(t,r,i,a){super(t,"uni-rich-text",SS,r,i,a)}}var g2="";class JE extends we{constructor(t,r,i,a){super(t,"uni-scroll-view",TS,r,i,a,".uni-scroll-view-content")}setText(t){El(this.$holder,"uni-scroll-view-refresher",t)}}var p2="";class QE extends we{constructor(t,r,i,a){super(t,"uni-slider",IS,r,i,a)}}var m2="";class eT extends ua{constructor(t,r,i,a){super(t,"uni-swiper",DS,r,i,a,".uni-swiper-slide-frame")}}var _2="";class tT extends we{constructor(t,r,i,a){super(t,"uni-swiper-item",$S,r,i,a)}}var b2="";class rT extends we{constructor(t,r,i,a){super(t,"uni-switch",zS,r,i,a)}}var w2="";class iT extends we{constructor(t,r,i,a){super(t,"uni-textarea",YS,r,i,a)}init(t){super.init(t),mh(this.$props)}}var x2="",aT={id:{type:String,default:""},src:{type:String,default:""},duration:{type:[Number,String],default:""},controls:{type:[Boolean,String],default:!0},danmuList:{type:Array,default(){return[]}},danmuBtn:{type:[Boolean,String],default:!1},enableDanmu:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},loop:{type:[Boolean,String],default:!1},muted:{type:[Boolean,String],default:!1},objectFit:{type:String,default:"contain"},poster:{type:String,default:""},direction:{type:[String,Number],default:""},showProgress:{type:Boolean,default:!0},initialTime:{type:[String,Number],default:0},showFullscreenBtn:{type:[Boolean,String],default:!0},pageGesture:{type:[Boolean,String],default:!1},enableProgressGesture:{type:[Boolean,String],default:!0},vslideGesture:{type:[Boolean,String],default:!1},vslideGestureInFullscreen:{type:[Boolean,String],default:!1},showPlayBtn:{type:[Boolean,String],default:!0},enablePlayGesture:{type:[Boolean,String],default:!0},showCenterPlayBtn:{type:[Boolean,String],default:!0},showLoading:{type:[Boolean,String],default:!0},codec:{type:String,default:"hardware"},httpCache:{type:[Boolean,String],default:!1},playStrategy:{type:[Number,String],default:0},header:{type:Object,default(){return{}}},advanced:{type:Array,default(){return[]}}},Sh=["play","pause","ended","timeupdate","fullscreenchange","fullscreenclick","waiting","error"],nT=["play","pause","stop","seek","sendDanmu","playbackRate","requestFullScreen","exitFullScreen"],oT=ge({name:"Video",props:aT,emits:Sh,setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=U(null),o=Sl(e,["id"]),{position:s,hidden:u,onParentReady:l}=la(n),f;l(()=>{f=plus.video.createVideoPlayer("video"+Date.now(),Object.assign({},o.value,s)),plus.webview.currentWebview().append(f),u.value&&f.hide(),Sh.forEach(m=>{f.addEventListener(m,d=>{a(m,{},d.detail)})}),H(()=>o.value,m=>f.setStyles(m),{deep:!0}),H(()=>s,m=>f.setStyles(m),{deep:!0}),H(()=>u.value,m=>{f[m?"hide":"show"](),m||f.setStyles(s)})});var v=jn();return Vn((m,d)=>{if(nT.includes(m)){var _;switch(m){case"seek":_=d.position;break;case"sendDanmu":_=d;break;case"playbackRate":_=d.rate;break;case"requestFullScreen":_=d.direction;break}f&&f[m](_)}},v,!0),Ce(()=>{f&&f.close()}),()=>I("uni-video",{ref:i,id:e.id},[I("div",{ref:n,class:"uni-video-container"},null,512),I("div",{class:"uni-video-slot"},null)],8,["id"])}});class sT extends we{constructor(t,r,i,a){super(t,"uni-video",oT,r,i,a,".uni-video-slot")}}var y2="",lT={src:{type:String,default:""},updateTitle:{type:Boolean,default:!0},webviewStyles:{type:Object,default(){return{}}}},it,uT=e=>{var{htmlId:t,src:r,webviewStyles:i,props:a}=e,n=plus.webview.currentWebview(),o=ve(i,{"uni-app":"none",isUniH5:!0}),s=n.getTitleNView();if(s){var u=Eu+parseFloat(o.top||"0");plus.navigator.isImmersedStatusbar()&&(u+=hh()),o.top=String(u),o.bottom=o.bottom||"0"}it=plus.webview.create(r,t,o),s&&it.addEventListener("titleUpdate",function(){var l;if(!!a.updateTitle){var f=(l=it)===null||l===void 0?void 0:l.getTitle();n.setStyle({titleNView:{titleText:!f||f==="null"?" ":f}})}}),plus.webview.currentWebview().append(it)},fT=()=>{var e;plus.webview.currentWebview().remove(it),(e=it)===null||e===void 0||e.close("none"),it=null},cT=ge({name:"WebView",props:lT,setup(e){var t=Gt(),r=U(null),{hidden:i,onParentReady:a}=la(r),n=ee(()=>e.webviewStyles);return a(()=>{var o,s=U(_b+t);uT({htmlId:s.value,src:vt(e.src),webviewStyles:n.value,props:e}),UniViewJSBridge.publishHandler(pb,{},t),i.value&&((o=it)===null||o===void 0||o.hide())}),Ce(()=>{fT(),UniViewJSBridge.publishHandler(mb,{},t)}),H(()=>e.src,o=>{var s,u=vt(o)||"";if(!!u){if(/^(http|https):\/\//.test(u)&&e.webviewStyles.progress){var l;(l=it)===null||l===void 0||l.setStyle({progress:{color:e.webviewStyles.progress.color}})}(s=it)===null||s===void 0||s.loadURL(u)}}),H(n,o=>{var s;(s=it)===null||s===void 0||s.setStyle(o)}),H(i,o=>{it&&it[o?"hide":"show"]()}),()=>I("uni-web-view",{ref:r},null,512)}});class vT extends we{constructor(t,r,i,a){super(t,"uni-web-view",cT,r,i,a)}}var dT={"#text":GS,"#comment":fx,VIEW:tE,IMAGE:SE,TEXT:KS,NAVIGATOR:NE,FORM:wE,BUTTON:sE,INPUT:EE,LABEL:TE,RADIO:ZE,CHECKBOX:fE,"CHECKBOX-GROUP":cE,AD:oE,CAMERA:lE,CANVAS:uE,"COVER-IMAGE":pE,"COVER-VIEW":_E,EDITOR:bE,"FUNCTIONAL-PAGE-NAVIGATOR":xE,ICON:yE,"RADIO-GROUP":KE,"LIVE-PLAYER":CE,"LIVE-PUSHER":OE,MAP:RE,"MOVABLE-AREA":LE,"MOVABLE-VIEW":PE,"OFFICIAL-ACCOUNT":DE,"OPEN-DATA":BE,PICKER:jE,"PICKER-VIEW":YE,"PICKER-VIEW-COLUMN":qE,PROGRESS:XE,"RICH-TEXT":GE,"SCROLL-VIEW":JE,SLIDER:QE,SWIPER:eT,"SWIPER-ITEM":tT,SWITCH:rT,TEXTAREA:iT,VIDEO:sT,"WEB-VIEW":vT};function hT(e,t){return()=>__(e,t)}var Zn=new Map;function at(e){return Zn.get(e)}function gT(e){return Zn.get(e)}function Eh(e){return Zn.delete(e)}function Th(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},n;if(e===0)n=new ii(e,t,r,document.createElement(t));else{var o=dT[t];o?n=new o(e,r,i,a):n=new wd(e,document.createElement(t),r,i,a)}return Zn.set(e,n),n}var Il=[],Ch=!1;function Oh(e){if(Ch)return e();Il.push(e)}function kl(){Ch=!0,Il.forEach(e=>e()),Il.length=0}function pT(){}function Ah(e){var{css:t,route:r,platform:i,pixelRatio:a,windowWidth:n,disableScroll:o,statusbarHeight:s,windowTop:u,windowBottom:l}=e;mT(r),_T(i,a,n),bT();var f=plus.webview.currentWebview().id;window.__id__=f,document.title="".concat(r,"[").concat(f,"]"),xT(s,u,l),o&&document.addEventListener("touchmove",sb),t?wT(r):kl()}function mT(e){window.__PAGE_INFO__={route:e}}function _T(e,t,r){window.__SYSTEM_INFO__={platform:e,pixelRatio:t,windowWidth:r}}function bT(){Th(0,"div",-1,-1).$=document.getElementById("app")}function wT(e){var t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e+".css",t.onload=kl,t.onerror=kl,document.head.appendChild(t)}function xT(e,t,r){var i={"--window-left":"0px","--window-right":"0px","--window-top":t+"px","--window-bottom":r+"px","--status-bar-height":e+"px"};K_(i)}var Ih=!1;function yT(e){if(!Ih){Ih=!0;var t={onReachBottomDistance:e,onPageScroll(r){UniViewJSBridge.publishHandler(Mp,{scrollTop:r})},onReachBottom(){UniViewJSBridge.publishHandler(Rp)}};requestAnimationFrame(()=>document.addEventListener("scroll",lb(t)))}}function ST(e,t){var{scrollTop:r,selector:i,duration:a}=e;Np(i||r||0,a),t()}function ET(e){var t=e[0];t[0]===Mu?TT(t):Oh(()=>CT(e))}function TT(e){return Ah(e[1])}function CT(e){var t=e[0],r=V1(t[0]===gb?t[1]:[]);e.forEach(i=>{switch(i[0]){case Mu:return Ah(i[1]);case Wp:return pT();case Vp:return Th(i[1],r(i[2]),i[3],i[4],j1(r,i[5]));case jp:return at(i[1]).remove();case Yp:return at(i[1]).setAttr(r(i[2]),r(i[3]));case qp:return at(i[1]).removeAttr(r(i[2]));case Xp:return at(i[1]).addEvent(r(i[2]),i[3]);case Gp:return at(i[1]).addWxsEvent(r(i[2]),r(i[3]),i[4]);case Zp:return at(i[1]).removeEvent(r(i[2]));case Kp:return at(i[1]).setText(r(i[2]));case Jp:return yT(i[1])}}),Z1()}function OT(){var{subscribe:e}=UniViewJSBridge;e(bc,ET),e(bb,t=>Ge().setLocale(t)),e(wc,AT)}function AT(){UniViewJSBridge.publishHandler("webviewReady")}function kh(e){return window.__$__(e).$}function IT(e){var t={};if(e.id&&(t.id=""),e.dataset&&(t.dataset={}),e.rect&&(t.left=0,t.right=0,t.top=0,t.bottom=0),e.size&&(t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight),e.scrollOffset){var r=document.documentElement,i=document.body;t.scrollLeft=r.scrollLeft||i.scrollLeft||0,t.scrollTop=r.scrollTop||i.scrollTop||0,t.scrollHeight=r.scrollHeight||i.scrollHeight||0,t.scrollWidth=r.scrollWidth||i.scrollWidth||0}return t}function Ml(e,t){var r={},{top:i}=Z_();if(t.id&&(r.id=e.id),t.dataset&&(r.dataset=ko(e)),t.rect||t.size){var a=e.getBoundingClientRect();t.rect&&(r.left=a.left,r.right=a.right,r.top=a.top-i,r.bottom=a.bottom-i),t.size&&(r.width=a.width,r.height=a.height)}if(Array.isArray(t.properties)&&t.properties.forEach(s=>{s=s.replace(/-([a-z])/g,function(u,l){return l.toUpperCase()})}),t.scrollOffset)if(e.tagName==="UNI-SCROLL-VIEW"){var n=e.children[0].children[0];r.scrollLeft=n.scrollLeft,r.scrollTop=n.scrollTop,r.scrollHeight=n.scrollHeight,r.scrollWidth=n.scrollWidth}else r.scrollLeft=0,r.scrollTop=0,r.scrollHeight=0,r.scrollWidth=0;if(Array.isArray(t.computedStyle)){var o=getComputedStyle(e);t.computedStyle.forEach(s=>{r[s]=o[s]})}return t.context&&(r.contextInfo=XS(e)),r}function kT(e,t){return e?window.__$__(e).$:t.$el}function Mh(e,t){var r=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(i){for(var a=this.parentElement.querySelectorAll(i),n=a.length;--n>=0&&a.item(n)!==this;);return n>-1};return r.call(e,t)}function MT(e,t,r,i,a){var n=kT(t,e),o=n.parentElement;if(!o)return i?null:[];var{nodeType:s}=n,u=s===3||s===8;if(i){var l=u?o.querySelector(r):Mh(n,r)?n:n.querySelector(r);return l?Ml(l,a):null}else{var f=[],v=(u?o:n).querySelectorAll(r);return v&&v.length&&[].forEach.call(v,m=>{f.push(Ml(m,a))}),!u&&Mh(n,r)&&f.unshift(Ml(n,a)),f}}function RT(e,t,r){var i=[];t.forEach(a=>{var{component:n,selector:o,single:s,fields:u}=a;n===null?i.push(IT(u)):i.push(MT(e,n,o,s,u))}),r(i)}function LT(e,t){var{pageStyle:r,rootFontSize:i}=t;if(r){var a=document.querySelector("uni-page-body")||document.body;a.setAttribute("style",r)}i&&document.documentElement.style.fontSize!==i&&(document.documentElement.style.fontSize=i)}function PT(e,t){var{reqId:r,component:i,options:a,callback:n}=e,o=kh(i);(o.__io||(o.__io={}))[r]=D1(o,a,n)}function NT(e,t){var{reqId:r,component:i}=e,a=kh(i),n=a.__io&&a.__io[r];n&&(n.disconnect(),delete a.__io[r])}var Rl={},Ll={};function DT(e){var t=[],r=["width","minWidth","maxWidth","height","minHeight","maxHeight","orientation"];for(var i of r)i!=="orientation"&&e[i]&&Number(e[i]>=0)&&t.push("(".concat(Rh(i),": ").concat(Number(e[i]),"px)")),i==="orientation"&&e[i]&&t.push("(".concat(Rh(i),": ").concat(e[i],")"));var a=t.join(" and ");return a}function Rh(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function BT(e,t){var{reqId:r,component:i,options:a,callback:n}=e,o=Rl[r]=window.matchMedia(DT(a)),s=Ll[r]=u=>n(u.matches);s(o),o.addListener(s)}function $T(e,t){var{reqId:r,component:i}=e,a=Ll[r],n=Rl[r];n&&(n.removeListener(a),delete Ll[r],delete Rl[r])}function FT(e,t){var{family:r,source:i,desc:a}=e;Pp(r,i,a).then(()=>{t()}).catch(n=>{t(n.toString())})}var zT={$el:document.body};function UT(){var e=Gt();Cm(e,t=>function(){for(var r=arguments.length,i=new Array(r),a=0;a{t.apply(null,i)})}),bt(e,"requestComponentInfo",(t,r)=>{RT(zT,t.reqs,r)}),bt(e,"addIntersectionObserver",t=>{PT(ve({},t,{callback(r){UniViewJSBridge.publishHandler(t.eventName,r)}}))}),bt(e,"removeIntersectionObserver",t=>{NT(t)}),bt(e,"addMediaQueryObserver",t=>{BT(ve({},t,{callback(r){UniViewJSBridge.publishHandler(t.eventName,r)}}))}),bt(e,"removeMediaQueryObserver",t=>{$T(t)}),bt(e,L1,ST),bt(e,R1,FT),bt(e,M1,t=>{LT(null,t)})}window.uni=H1,window.UniViewJSBridge=xc,window.rpx2px=id,window.__$__=at,window.__f__=Fp;function Lh(){Nm(),UT(),OT(),W1(),xc.publishHandler(wc)}typeof plus!="undefined"?Lh():document.addEventListener("plusready",Lh)}); +(function(Kn){typeof define=="function"&&define.amd?define(Kn):Kn()})(function(){"use strict";var Kn="",HT="",WT="",Nr={exports:{}},va={exports:{}},da={exports:{}},Bh=da.exports={version:"2.6.12"};typeof __e=="number"&&(__e=Bh);var Ut={exports:{}},ha=Ut.exports=typeof ha!="undefined"&&ha.Math==Math?ha:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=ha);var $h=da.exports,Nl=Ut.exports,Dl="__core-js_shared__",Bl=Nl[Dl]||(Nl[Dl]={});(va.exports=function(e,t){return Bl[e]||(Bl[e]=t!==void 0?t:{})})("versions",[]).push({version:$h.version,mode:"window",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"});var Fh=0,zh=Math.random(),Gn=function(e){return"Symbol(".concat(e===void 0?"":e,")_",(++Fh+zh).toString(36))},Jn=va.exports("wks"),Uh=Gn,Qn=Ut.exports.Symbol,$l=typeof Qn=="function",Hh=Nr.exports=function(e){return Jn[e]||(Jn[e]=$l&&Qn[e]||($l?Qn:Uh)("Symbol."+e))};Hh.store=Jn;var ga={},eo=function(e){return typeof e=="object"?e!==null:typeof e=="function"},Wh=eo,to=function(e){if(!Wh(e))throw TypeError(e+" is not an object!");return e},pa=function(e){try{return!!e()}catch(t){return!0}},ci=!pa(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),Fl=eo,ro=Ut.exports.document,Vh=Fl(ro)&&Fl(ro.createElement),zl=function(e){return Vh?ro.createElement(e):{}},jh=!ci&&!pa(function(){return Object.defineProperty(zl("div"),"a",{get:function(){return 7}}).a!=7}),ma=eo,Yh=function(e,t){if(!ma(e))return e;var r,i;if(t&&typeof(r=e.toString)=="function"&&!ma(i=r.call(e))||typeof(r=e.valueOf)=="function"&&!ma(i=r.call(e))||!t&&typeof(r=e.toString)=="function"&&!ma(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")},Ul=to,qh=jh,Xh=Yh,Zh=Object.defineProperty;ga.f=ci?Object.defineProperty:function(t,r,i){if(Ul(t),r=Xh(r,!0),Ul(i),qh)try{return Zh(t,r,i)}catch(a){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[r]=i.value),t};var Hl=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Kh=ga,Gh=Hl,Dr=ci?function(e,t,r){return Kh.f(e,t,Gh(1,r))}:function(e,t,r){return e[t]=r,e},io=Nr.exports("unscopables"),ao=Array.prototype;ao[io]==null&&Dr(ao,io,{});var Jh=function(e){ao[io][e]=!0},Qh=function(e,t){return{value:t,done:!!e}},no={},eg={}.toString,tg=function(e){return eg.call(e).slice(8,-1)},rg=tg,ig=Object("z").propertyIsEnumerable(0)?Object:function(e){return rg(e)=="String"?e.split(""):Object(e)},Wl=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},ag=ig,ng=Wl,_a=function(e){return ag(ng(e))},ba={exports:{}},og={}.hasOwnProperty,wa=function(e,t){return og.call(e,t)},sg=va.exports("native-function-to-string",Function.toString),lg=Ut.exports,xa=Dr,Vl=wa,oo=Gn("src"),so=sg,jl="toString",ug=(""+so).split(jl);da.exports.inspectSource=function(e){return so.call(e)},(ba.exports=function(e,t,r,i){var a=typeof r=="function";a&&(Vl(r,"name")||xa(r,"name",t)),e[t]!==r&&(a&&(Vl(r,oo)||xa(r,oo,e[t]?""+e[t]:ug.join(String(t)))),e===lg?e[t]=r:i?e[t]?e[t]=r:xa(e,t,r):(delete e[t],xa(e,t,r)))})(Function.prototype,jl,function(){return typeof this=="function"&&this[oo]||so.call(this)});var Yl=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e},fg=Yl,cg=function(e,t,r){if(fg(e),t===void 0)return e;switch(r){case 1:return function(i){return e.call(t,i)};case 2:return function(i,a){return e.call(t,i,a)};case 3:return function(i,a,n){return e.call(t,i,a,n)}}return function(){return e.apply(t,arguments)}},Br=Ut.exports,ya=da.exports,vg=Dr,dg=ba.exports,ql=cg,lo="prototype",je=function(e,t,r){var i=e&je.F,a=e&je.G,n=e&je.S,o=e&je.P,s=e&je.B,u=a?Br:n?Br[t]||(Br[t]={}):(Br[t]||{})[lo],l=a?ya:ya[t]||(ya[t]={}),f=l[lo]||(l[lo]={}),d,g,h,w;a&&(r=t);for(d in r)g=!i&&u&&u[d]!==void 0,h=(g?u:r)[d],w=s&&g?ql(h,Br):o&&typeof h=="function"?ql(Function.call,h):h,u&&dg(u,d,h,e&je.U),l[d]!=h&&vg(l,d,w),o&&f[d]!=h&&(f[d]=h)};Br.core=ya,je.F=1,je.G=2,je.S=4,je.P=8,je.B=16,je.W=32,je.U=64,je.R=128;var uo=je,hg=Math.ceil,gg=Math.floor,Xl=function(e){return isNaN(e=+e)?0:(e>0?gg:hg)(e)},pg=Xl,mg=Math.min,_g=function(e){return e>0?mg(pg(e),9007199254740991):0},bg=Xl,wg=Math.max,xg=Math.min,yg=function(e,t){return e=bg(e),e<0?wg(e+t,0):xg(e,t)},Sg=_a,Eg=_g,Tg=yg,Cg=function(e){return function(t,r,i){var a=Sg(t),n=Eg(a.length),o=Tg(i,n),s;if(e&&r!=r){for(;n>o;)if(s=a[o++],s!=s)return!0}else for(;n>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},Zl=va.exports("keys"),Og=Gn,fo=function(e){return Zl[e]||(Zl[e]=Og(e))},Kl=wa,Ag=_a,Ig=Cg(!1),kg=fo("IE_PROTO"),Mg=function(e,t){var r=Ag(e),i=0,a=[],n;for(n in r)n!=kg&&Kl(r,n)&&a.push(n);for(;t.length>i;)Kl(r,n=t[i++])&&(~Ig(a,n)||a.push(n));return a},Gl="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Rg=Mg,Lg=Gl,co=Object.keys||function(t){return Rg(t,Lg)},Pg=ga,Ng=to,Dg=co,Bg=ci?Object.defineProperties:function(t,r){Ng(t);for(var i=Dg(r),a=i.length,n=0,o;a>n;)Pg.f(t,o=i[n++],r[o]);return t},Jl=Ut.exports.document,$g=Jl&&Jl.documentElement,Fg=to,zg=Bg,Ql=Gl,Ug=fo("IE_PROTO"),vo=function(){},ho="prototype",Sa=function(){var e=zl("iframe"),t=Ql.length,r="<",i=">",a;for(e.style.display="none",$g.appendChild(e),e.src="javascript:",a=e.contentWindow.document,a.open(),a.write(r+"script"+i+"document.F=Object"+r+"/script"+i),a.close(),Sa=a.F;t--;)delete Sa[ho][Ql[t]];return Sa()},Hg=Object.create||function(t,r){var i;return t!==null?(vo[ho]=Fg(t),i=new vo,vo[ho]=null,i[Ug]=t):i=Sa(),r===void 0?i:zg(i,r)},Wg=ga.f,Vg=wa,eu=Nr.exports("toStringTag"),tu=function(e,t,r){e&&!Vg(e=r?e:e.prototype,eu)&&Wg(e,eu,{configurable:!0,value:t})},jg=Hg,Yg=Hl,qg=tu,ru={};Dr(ru,Nr.exports("iterator"),function(){return this});var Xg=function(e,t,r){e.prototype=jg(ru,{next:Yg(1,r)}),qg(e,t+" Iterator")},Zg=Wl,iu=function(e){return Object(Zg(e))},Kg=wa,Gg=iu,au=fo("IE_PROTO"),Jg=Object.prototype,Qg=Object.getPrototypeOf||function(e){return e=Gg(e),Kg(e,au)?e[au]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Jg:null},go=uo,ep=ba.exports,nu=Dr,ou=no,tp=Xg,rp=tu,ip=Qg,vi=Nr.exports("iterator"),po=!([].keys&&"next"in[].keys()),ap="@@iterator",su="keys",Ea="values",lu=function(){return this},np=function(e,t,r,i,a,n,o){tp(r,t,i);var s=function(c){if(!po&&c in d)return d[c];switch(c){case su:return function(){return new r(this,c)};case Ea:return function(){return new r(this,c)}}return function(){return new r(this,c)}},u=t+" Iterator",l=a==Ea,f=!1,d=e.prototype,g=d[vi]||d[ap]||a&&d[a],h=g||s(a),w=a?l?s("entries"):h:void 0,_=t=="Array"&&d.entries||g,x,m,b;if(_&&(b=ip(_.call(new e)),b!==Object.prototype&&b.next&&(rp(b,u,!0),typeof b[vi]!="function"&&nu(b,vi,lu))),l&&g&&g.name!==Ea&&(f=!0,h=function(){return g.call(this)}),(po||f||!d[vi])&&nu(d,vi,h),ou[t]=h,ou[u]=lu,a)if(x={values:l?h:s(Ea),keys:n?h:s(su),entries:w},o)for(m in x)m in d||ep(d,m,x[m]);else go(go.P+go.F*(po||f),t,x);return x},mo=Jh,Ta=Qh,uu=no,op=_a,sp=np(Array,"Array",function(e,t){this._t=op(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,Ta(1)):t=="keys"?Ta(0,r):t=="values"?Ta(0,e[r]):Ta(0,[r,e[r]])},"values");uu.Arguments=uu.Array,mo("keys"),mo("values"),mo("entries");for(var fu=sp,lp=co,up=ba.exports,fp=Ut.exports,cu=Dr,vu=no,du=Nr.exports,hu=du("iterator"),gu=du("toStringTag"),pu=vu.Array,mu={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},_u=lp(mu),_o=0;_o<_u.length;_o++){var Ca=_u[_o],cp=mu[Ca],bu=fp[Ca],fr=bu&&bu.prototype,Oa;if(fr&&(fr[hu]||cu(fr,hu,pu),fr[gu]||cu(fr,gu,Ca),vu[Ca]=pu,cp))for(Oa in fu)fr[Oa]||up(fr,Oa,fu[Oa],!0)}function Aa(e,t){for(var r=Object.create(null),i=e.split(","),a=0;a!!r[n.toLowerCase()]:n=>!!r[n]}var vp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",dp=Aa(vp);function wu(e){return!!e||e===""}var hp=Aa("animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width");function bo(e){if(ne(e)){for(var t={},r=0;r{if(r){var i=r.split(pp);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function mp(e){var t="";if(!e||Ee(e))return t;for(var r in e){var i=e[r],a=r.startsWith("--")?r:Ge(r);(Ee(i)||typeof i=="number"&&hp(a))&&(t+="".concat(a,":").concat(i,";"))}return t}function wo(e){var t="";if(Ee(e))t=e;else if(ne(e))for(var r=0;r{},_p=()=>!1,bp=/^on[^a-z]/,Ia=e=>bp.test(e),xo=e=>e.startsWith("onUpdate:"),ce=Object.assign,yo=(e,t)=>{var r=e.indexOf(t);r>-1&&e.splice(r,1)},wp=Object.prototype.hasOwnProperty,ie=(e,t)=>wp.call(e,t),ne=Array.isArray,hi=e=>gi(e)==="[object Map]",xp=e=>gi(e)==="[object Set]",se=e=>typeof e=="function",Ee=e=>typeof e=="string",So=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",yu=e=>We(e)&&se(e.then)&&se(e.catch),yp=Object.prototype.toString,gi=e=>yp.call(e),Eo=e=>gi(e).slice(8,-1),mt=e=>gi(e)==="[object Object]",To=e=>Ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ka=Aa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ma=e=>{var t=Object.create(null);return r=>{var i=t[r];return i||(t[r]=e(r))}},Sp=/-(\w)/g,Ht=Ma(e=>e.replace(Sp,(t,r)=>r?r.toUpperCase():"")),Ep=/\B([A-Z])/g,Ge=Ma(e=>e.replace(Ep,"-$1").toLowerCase()),Ra=Ma(e=>e.charAt(0).toUpperCase()+e.slice(1)),Co=Ma(e=>e?"on".concat(Ra(e)):""),pi=(e,t)=>!Object.is(e,t),Oo=(e,t)=>{for(var r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},Tp=e=>{var t=parseFloat(e);return isNaN(t)?e:t},Su,Cp=()=>Su||(Su=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"||typeof window!="undefined"?window:{}),mi=` +`,Eu=44,Pa="#007aff",Op=/^([a-z-]+:)?\/\//i,Ap=/^data:.*,.*/,Tu="wxs://",Cu="json://",Ip="wxsModules",kp="renderjsModules",Mp="onPageScroll",Rp="onReachBottom",Lp="onWxsInvokeCallMethod",Ao=0;function Io(e){var t=Date.now(),r=Ao?t-Ao:0;Ao=t;for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;nJSON.stringify(o)).join(" "))}function ko(e){return ce({},e.dataset,e.__uniDataset)}function _i(e){return{passive:e}}function Mo(e){var{id:t,offsetTop:r,offsetLeft:i}=e;return{id:t,dataset:ko(e),offsetTop:r,offsetLeft:i}}function Pp(e,t,r){var i=document.fonts;if(i){var a=new FontFace(e,t,r);return a.load().then(()=>{i.add&&i.add(a)})}return new Promise(n=>{var o=document.createElement("style"),s=[];if(r){var{style:u,weight:l,stretch:f,unicodeRange:d,variant:g,featureSettings:h}=r;u&&s.push("font-style:".concat(u)),l&&s.push("font-weight:".concat(l)),f&&s.push("font-stretch:".concat(f)),d&&s.push("unicode-range:".concat(d)),g&&s.push("font-variant:".concat(g)),h&&s.push("font-feature-settings:".concat(h))}o.innerText='@font-face{font-family:"'.concat(e,'";src:').concat(t,";").concat(s.join(";"),"}"),document.head.appendChild(o),n()})}function Np(e,t){if(Ee(e)){var r=document.querySelector(e);r&&(e=r.getBoundingClientRect().top+window.pageYOffset)}e<0&&(e=0);var i=document.documentElement,{clientHeight:a,scrollHeight:n}=i;if(e=Math.min(e,n-a),t===0){i.scrollTop=document.body.scrollTop=e;return}if(window.scrollY!==e){var o=s=>{if(s<=0){window.scrollTo(0,e);return}var u=e-window.scrollY;requestAnimationFrame(function(){window.scrollTo(0,window.scrollY+u/s*10),o(s-10)})};o(t)}}function Dp(){return typeof __channelId__=="string"&&__channelId__}function Bp(e,t){switch(Eo(t)){case"Function":return"function() { [native code] }";default:return t}}function $p(e,t,r){if(Dp())return r.push(t.replace("at ","uni-app:///")),console[e].apply(console,r);var i=r.map(function(a){var n=gi(a).toLowerCase();if(n==="[object object]"||n==="[object array]")try{a="---BEGIN:JSON---"+JSON.stringify(a,Bp)+"---END:JSON---"}catch(s){a=n}else if(a===null)a="---NULL---";else if(a===void 0)a="---UNDEFINED---";else{var o=Eo(a).toUpperCase();o==="NUMBER"||o==="BOOLEAN"?a="---BEGIN:"+o+"---"+a+"---END:"+o+"---":a=String(a)}return a});return i.join("---COMMA---")+" "+t}function Fp(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a{var i=t[r];return i||(t[r]=e(r))}}function tm(e){return em(e)}function rm(e){return e.indexOf("/")===0}function Do(e){return rm(e)?e:"/"+e}function Da(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r;return function(){if(e){for(var i=arguments.length,a=new Array(i),n=0;ne.apply(this,arguments);r=setTimeout(a,t)};return i.cancel=function(){clearTimeout(r)},i}var am=Array.isArray,nm=e=>e!==null&&typeof e=="object",om=["{","}"];class sm{constructor(){this._caches=Object.create(null)}interpolate(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:om;if(!r)return[t];var a=this._caches[t];return a||(a=fm(t,i),this._caches[t]=a),cm(a,r)}}var lm=/^(?:\d)+/,um=/^(?:\w)+/;function fm(e,t){for(var[r,i]=t,a=[],n=0,o="";nvm.call(e,t),dm=new sm;function hm(e,t){return!!t.find(r=>e.indexOf(r)!==-1)}function gm(e,t){return t.find(r=>e.indexOf(r)===0)}function Pu(e,t){if(!!e){if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if(e=e.toLowerCase(),e==="chinese")return bi;if(e.indexOf("zh")===0)return e.indexOf("-hans")>-1?bi:e.indexOf("-hant")>-1||hm(e,["-tw","-hk","-mo","-cht"])?Ba:bi;var r=gm(e,[Wt,Bo,$o]);if(r)return r}}class pm{constructor(t){var{locale:r,fallbackLocale:i,messages:a,watcher:n,formater:o}=t;this.locale=Wt,this.fallbackLocale=Wt,this.message={},this.messages={},this.watchers=[],i&&(this.fallbackLocale=i),this.formater=o||dm,this.messages=a||{},this.setLocale(r||Wt),n&&this.watchLocale(n)}setLocale(t){var r=this.locale;this.locale=Pu(t,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],r!==this.locale&&this.watchers.forEach(i=>{i(this.locale,r)})}getLocale(){return this.locale}watchLocale(t){var r=this.watchers.push(t)-1;return()=>{this.watchers.splice(r,1)}}add(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=this.messages[t];a?i?Object.assign(a,r):Object.keys(r).forEach(n=>{Lu(a,n)||(a[n]=r[n])}):this.messages[t]=r}f(t,r,i){return this.formater.interpolate(t,r,i).join("")}t(t,r,i){var a=this.message;return typeof r=="string"?(r=Pu(r,this.messages),r&&(a=this.messages[r])):i=r,Lu(a,t)?this.formater.interpolate(a[t],i).join(""):(console.warn("Cannot translate the value of keypath ".concat(t,". Use the value of keypath as default.")),t)}}function mm(e,t){e.$watchLocale?e.$watchLocale(r=>{t.setLocale(r)}):e.$watch(()=>e.$locale,r=>{t.setLocale(r)})}function _m(){return typeof uni!="undefined"&&uni.getLocale?uni.getLocale():typeof window!="undefined"&&window.getLocale?window.getLocale():Wt}function bm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;typeof e!="string"&&([e,t]=[t,e]),typeof e!="string"&&(e=_m()),typeof r!="string"&&(r=typeof __uniConfig!="undefined"&&__uniConfig.fallbackLocale||Wt);var a=new pm({locale:e,fallbackLocale:r,messages:t,watcher:i}),n=(o,s)=>{if(typeof getApp!="function")n=function(l,f){return a.t(l,f)};else{var u=!1;n=function(l,f){var d=getApp().$vm;return d&&(d.$locale,u||(u=!0,mm(d,a))),a.t(l,f)}}return n(o,s)};return{i18n:a,f(o,s,u){return a.f(o,s,u)},t(o,s){return n(o,s)},add(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return a.add(o,s,u)},watch(o){return a.watchLocale(o)},getLocale(){return a.getLocale()},setLocale(o){return a.setLocale(o)}}}var wm=Da(()=>typeof __uniConfig!="undefined"&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length),wi;function Je(){if(!wi){var e;if(typeof getApp=="function"?e=weex.requireModule("plus").getLanguage():e=plus.webview.currentWebview().getStyle().locale,wi=bm(e),wm()){var t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach(r=>wi.add(r,__uniConfig.locales[r])),wi.setLocale(e)}}return wi}function _t(e,t,r){return t.reduce((i,a,n)=>(i[e+a]=r[n],i),{})}var xm=Da(()=>{var e="uni.picker.",t=["done","cancel"];Je().add(Wt,_t(e,t,["Done","Cancel"]),!1),Je().add($o,_t(e,t,["OK","Cancelar"]),!1),Je().add(Bo,_t(e,t,["OK","Annuler"]),!1),Je().add(bi,_t(e,t,["\u5B8C\u6210","\u53D6\u6D88"]),!1),Je().add(Ba,_t(e,t,["\u5B8C\u6210","\u53D6\u6D88"]),!1)}),ym=Da(()=>{var e="uni.button.",t=["feedback.title","feedback.send"];Je().add(Wt,_t(e,t,["feedback","send"]),!1),Je().add($o,_t(e,t,["realimentaci\xF3n","enviar"]),!1),Je().add(Bo,_t(e,t,["retour d'information","envoyer"]),!1),Je().add(bi,_t(e,t,["\u95EE\u9898\u53CD\u9988","\u53D1\u9001"]),!1),Je().add(Ba,_t(e,t,["\u554F\u984C\u53CD\u994B","\u767C\u9001"]),!1)}),Nu=function(){};Nu.prototype={on:function(e,t,r){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var i=this;function a(){i.off(e,a),t.apply(r,arguments)}return a._=t,this.on(e,a,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),i=0,a=r.length;for(i;i1?i-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:!1;t[a?"once":"on"]("".concat(e,".").concat(r),i)},unsubscribe(r,i){t.off("".concat(e,".").concat(r),i)},subscribeHandler(r,i,a){t.emit("".concat(e,".").concat(r),i,a)}}}var Du="invokeViewApi",Bu="invokeServiceApi",Em=1,Tm=(e,t,r)=>{var{subscribe:i,publishHandler:a}=UniViewJSBridge,n=r?Em++:0;r&&i(Bu+"."+n,r,!0),a(Bu,{id:n,name:e,args:t})},$a=Object.create(null);function Fa(e,t){return e+"."+t}function Cm(e,t){UniViewJSBridge.subscribe(Fa(e,Du),t?t($u):$u)}function bt(e,t,r){t=Fa(e,t),$a[t]||($a[t]=r)}function Om(e,t){t=Fa(e,t),delete $a[t]}function $u(e,t){var{id:r,name:i,args:a}=e;i=Fa(t,i);var n=s=>{r&&UniViewJSBridge.publishHandler(Du+"."+r,s)},o=$a[i];o?o(a,n):n({})}var Am=ce(Sm("service"),{invokeServiceMethod:Tm}),Im=350,Fu=10,za=_i(!0),xi;function yi(){xi&&(clearTimeout(xi),xi=null)}var zu=0,Uu=0;function km(e){if(yi(),e.touches.length===1){var{pageX:t,pageY:r}=e.touches[0];zu=t,Uu=r,xi=setTimeout(function(){var i=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});i.touches=e.touches,i.changedTouches=e.changedTouches,e.target.dispatchEvent(i)},Im)}}function Mm(e){if(!!xi){if(e.touches.length!==1)return yi();var{pageX:t,pageY:r}=e.touches[0];if(Math.abs(t-zu)>Fu||Math.abs(r-Uu)>Fu)return yi()}}function Rm(){window.addEventListener("touchstart",km,za),window.addEventListener("touchmove",Mm,za),window.addEventListener("touchend",yi,za),window.addEventListener("touchcancel",yi,za)}function Hu(e,t){var r=Number(e);return isNaN(r)?t:r}function Lm(){var e=/^Apple/.test(navigator.vendor)&&typeof window.orientation=="number",t=e&&Math.abs(window.orientation)===90,r=e?Math[t?"max":"min"](screen.width,screen.height):screen.width,i=Math.min(window.innerWidth,document.documentElement.clientWidth,r)||r;return i}function Pm(){function e(){var t=__uniConfig.globalStyle||{},r=Hu(t.rpxCalcMaxDeviceWidth,960),i=Hu(t.rpxCalcBaseDeviceWidth,375),a=Lm();a=a<=r?a:i,document.documentElement.style.fontSize=a/23.4375+"px"}e(),document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e),window.addEventListener("resize",e)}function Nm(){Pm(),Rm()}var Dm=pa,Bm=function(e,t){return!!e&&Dm(function(){t?e.call(null,function(){},1):e.call(null)})},Fo=uo,$m=Yl,Wu=iu,Vu=pa,zo=[].sort,ju=[1,2,3];Fo(Fo.P+Fo.F*(Vu(function(){ju.sort(void 0)})||!Vu(function(){ju.sort(null)})||!Bm(zo)),"Array",{sort:function(t){return t===void 0?zo.call(Wu(this)):zo.call(Wu(this),$m(t))}});var Rt;class Fm{constructor(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.active=!0,this.effects=[],this.cleanups=[],!t&&Rt&&(this.parent=Rt,this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}run(t){if(this.active)try{return Rt=this,t()}finally{Rt=this.parent}}on(){Rt=this}off(){Rt=this.parent}stop(t){if(this.active){var r,i;for(r=0,i=this.effects.length;r1&&arguments[1]!==void 0?arguments[1]:Rt;t&&t.active&&t.effects.push(e)}var Uo=e=>{var t=new Set(e);return t.w=0,t.n=0,t},Yu=e=>(e.w&Vt)>0,qu=e=>(e.n&Vt)>0,Um=e=>{var{deps:t}=e;if(t.length)for(var r=0;r{var{deps:t}=e;if(t.length){for(var r=0,i=0;i1&&arguments[1]!==void 0?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;this.fn=t,this.scheduler=r,this.active=!0,this.deps=[],this.parent=void 0,zm(this,i)}run(){if(!this.active)return this.fn();for(var t=wt,r=jt;t;){if(t===this)return;t=t.parent}try{return this.parent=wt,wt=this,jt=!0,Vt=1<<++Si,Si<=Wo?Um(this):Xu(this),this.fn()}finally{Si<=Wo&&Hm(this),Vt=1<<--Si,wt=this.parent,jt=r,this.parent=void 0}}stop(){this.active&&(Xu(this),this.onStop&&this.onStop(),this.active=!1)}}function Xu(e){var{deps:t}=e;if(t.length){for(var r=0;r{(d==="length"||d>=i)&&s.push(f)});else switch(r!==void 0&&s.push(o.get(r)),t){case"add":ne(e)?To(r)&&s.push(o.get("length")):(s.push(o.get(cr)),hi(e)&&s.push(o.get(Vo)));break;case"delete":ne(e)||(s.push(o.get(cr)),hi(e)&&s.push(o.get(Vo)));break;case"set":hi(e)&&s.push(o.get(cr));break}if(s.length===1)s[0]&&Yo(s[0]);else{var u=[];for(var l of s)l&&u.push(...l);Yo(Uo(u))}}}function Yo(e,t){for(var r of ne(e)?e:[...e])(r!==wt||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}var Wm=Aa("__proto__,__v_isRef,__isVue"),Gu=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(So)),Vm=qo(),jm=qo(!1,!0),Ym=qo(!0),Ju=qm();function qm(){var e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(){for(var r=me(this),i=0,a=this.length;i{e[t]=function(){Fr();for(var r=arguments.length,i=new Array(r),a=0;a0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return function(i,a,n){if(a==="__v_isReactive")return!e;if(a==="__v_isReadonly")return e;if(a==="__v_isShallow")return t;if(a==="__v_raw"&&n===(e?t?u0:lf:t?sf:of).get(i))return i;var o=ne(i);if(!e&&o&&ie(Ju,a))return Reflect.get(Ju,a,n);var s=Reflect.get(i,a,n);if((So(a)?Gu.has(a):Wm(a))||(e||Qe(i,"get",a),t))return s;if(Fe(s)){var u=!o||!To(a);return u?s.value:s}return We(s)?e?uf(s):ke(s):s}}var Xm=Qu(),Zm=Qu(!0);function Qu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return function(r,i,a,n){var o=r[i];if(Ei(o)&&Fe(o)&&!Fe(a))return!1;if(!e&&!Ei(a)&&(ff(a)||(a=me(a),o=me(o)),!ne(r)&&Fe(o)&&!Fe(a)))return o.value=a,!0;var s=ne(r)&&To(i)?Number(i)e,Ua=e=>Reflect.getPrototypeOf(e);function Ha(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e=e.__v_raw;var a=me(e),n=me(t);t!==n&&!r&&Qe(a,"get",t),!r&&Qe(a,"get",n);var{has:o}=Ua(a),s=i?Xo:r?Go:Ti;if(o.call(a,t))return s(e.get(t));if(o.call(a,n))return s(e.get(n));e!==a&&e.get(t)}function Wa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.__v_raw,i=me(r),a=me(e);return e!==a&&!t&&Qe(i,"has",e),!t&&Qe(i,"has",a),e===a?r.has(e):r.has(e)||r.has(a)}function Va(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return e=e.__v_raw,!t&&Qe(me(e),"iterate",cr),Reflect.get(e,"size",e)}function tf(e){e=me(e);var t=me(this),r=Ua(t),i=r.has.call(t,e);return i||(t.add(e),Lt(t,"add",e,e)),this}function rf(e,t){t=me(t);var r=me(this),{has:i,get:a}=Ua(r),n=i.call(r,e);n||(e=me(e),n=i.call(r,e));var o=a.call(r,e);return r.set(e,t),n?pi(t,o)&&Lt(r,"set",e,t):Lt(r,"add",e,t),this}function af(e){var t=me(this),{has:r,get:i}=Ua(t),a=r.call(t,e);a||(e=me(e),a=r.call(t,e)),i&&i.call(t,e);var n=t.delete(e);return a&&Lt(t,"delete",e,void 0),n}function nf(){var e=me(this),t=e.size!==0,r=e.clear();return t&&Lt(e,"clear",void 0,void 0),r}function ja(e,t){return function(i,a){var n=this,o=n.__v_raw,s=me(o),u=t?Xo:e?Go:Ti;return!e&&Qe(s,"iterate",cr),o.forEach((l,f)=>i.call(a,u(l),u(f),n))}}function Ya(e,t,r){return function(){var i=this.__v_raw,a=me(i),n=hi(a),o=e==="entries"||e===Symbol.iterator&&n,s=e==="keys"&&n,u=i[e](...arguments),l=r?Xo:t?Go:Ti;return!t&&Qe(a,"iterate",s?Vo:cr),{next(){var{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:o?[l(f[0]),l(f[1])]:l(f),done:d}},[Symbol.iterator](){return this}}}}function Yt(e){return function(){return e==="delete"?!1:this}}function t0(){var e={get(n){return Ha(this,n)},get size(){return Va(this)},has:Wa,add:tf,set:rf,delete:af,clear:nf,forEach:ja(!1,!1)},t={get(n){return Ha(this,n,!1,!0)},get size(){return Va(this)},has:Wa,add:tf,set:rf,delete:af,clear:nf,forEach:ja(!1,!0)},r={get(n){return Ha(this,n,!0)},get size(){return Va(this,!0)},has(n){return Wa.call(this,n,!0)},add:Yt("add"),set:Yt("set"),delete:Yt("delete"),clear:Yt("clear"),forEach:ja(!0,!1)},i={get(n){return Ha(this,n,!0,!0)},get size(){return Va(this,!0)},has(n){return Wa.call(this,n,!0)},add:Yt("add"),set:Yt("set"),delete:Yt("delete"),clear:Yt("clear"),forEach:ja(!0,!0)},a=["keys","values","entries",Symbol.iterator];return a.forEach(n=>{e[n]=Ya(n,!1,!1),r[n]=Ya(n,!0,!1),t[n]=Ya(n,!1,!0),i[n]=Ya(n,!0,!0)}),[e,r,t,i]}var[r0,i0,a0,n0]=t0();function Zo(e,t){var r=t?e?n0:a0:e?i0:r0;return(i,a,n)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(ie(r,a)&&a in i?r:i,a,n)}var o0={get:Zo(!1,!1)},s0={get:Zo(!1,!0)},l0={get:Zo(!0,!1)},of=new WeakMap,sf=new WeakMap,lf=new WeakMap,u0=new WeakMap;function f0(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function c0(e){return e.__v_skip||!Object.isExtensible(e)?0:f0(Eo(e))}function ke(e){return Ei(e)?e:Ko(e,!1,ef,o0,of)}function v0(e){return Ko(e,!1,e0,s0,sf)}function uf(e){return Ko(e,!0,Qm,l0,lf)}function Ko(e,t,r,i,a){if(!We(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;var n=a.get(e);if(n)return n;var o=c0(e);if(o===0)return e;var s=new Proxy(e,o===2?i:r);return a.set(e,s),s}function Ur(e){return Ei(e)?Ur(e.__v_raw):!!(e&&e.__v_isReactive)}function Ei(e){return!!(e&&e.__v_isReadonly)}function ff(e){return!!(e&&e.__v_isShallow)}function cf(e){return Ur(e)||Ei(e)}function me(e){var t=e&&e.__v_raw;return t?me(t):e}function qa(e){return La(e,"__v_skip",!0),e}var Ti=e=>We(e)?ke(e):e,Go=e=>We(e)?uf(e):e;function vf(e){jt&&wt&&(e=me(e),Ku(e.dep||(e.dep=Uo())))}function df(e,t){e=me(e),e.dep&&Yo(e.dep)}function Fe(e){return!!(e&&e.__v_isRef===!0)}function U(e){return hf(e,!1)}function Jo(e){return hf(e,!0)}function hf(e,t){return Fe(e)?e:new d0(e,t)}class d0{constructor(t,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?t:me(t),this._value=r?t:Ti(t)}get value(){return vf(this),this._value}set value(t){t=this.__v_isShallow?t:me(t),pi(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Ti(t),df(this))}}function h0(e){return Fe(e)?e.value:e}var g0={get:(e,t,r)=>h0(Reflect.get(e,t,r)),set:(e,t,r,i)=>{var a=e[t];return Fe(a)&&!Fe(r)?(a.value=r,!0):Reflect.set(e,t,r,i)}};function gf(e){return Ur(e)?e:new Proxy(e,g0)}class p0{constructor(t,r,i,a){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new jo(t,()=>{this._dirty||(this._dirty=!0,df(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=i}get value(){var t=me(this);return vf(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function m0(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i,a,n=se(e);n?(i=e,a=pt):(i=e.get,a=e.set);var o=new p0(i,a,n||!a,r);return o}function qt(e,t,r,i){var a;try{a=i?e(...i):e()}catch(n){Xa(n,t,r)}return a}function ft(e,t,r,i){if(se(e)){var a=qt(e,t,r,i);return a&&yu(a)&&a.catch(s=>{Xa(s,t,r)}),a}for(var n=[],o=0;o>>1,a=Ii(et[i]);aPt&&et.splice(t,1)}function bf(e,t,r,i){ne(e)?r.push(...e):(!t||!t.includes(e,e.allowRecurse?i+1:i))&&r.push(e),_f()}function x0(e){bf(e,Oi,Ci,Hr)}function y0(e){bf(e,Xt,Ai,Wr)}function rs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(Ci.length){for(ts=t,Oi=[...new Set(Ci)],Ci.length=0,Hr=0;HrIi(r)-Ii(i)),Wr=0;Wre.id==null?1/0:e.id;function xf(e){Qo=!1,Za=!0,rs(e),et.sort((i,a)=>Ii(i)-Ii(a));var t=pt;try{for(Pt=0;Pt2?i-2:0),n=2;n_.trim()):f&&(o=a.map(Tp))}var g,h=r[g=Co(t)]||r[g=Co(Ht(t))];!h&&s&&(h=r[g=Co(Ge(t))]),h&&ft(h,e,6,o);var w=r[g+"Once"];if(w){if(!e.emitted)e.emitted={};else if(e.emitted[g])return;e.emitted[g]=!0,ft(w,e,6,o)}}function yf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=t.emitsCache,a=i.get(e);if(a!==void 0)return a;var n=e.emits,o={},s=!1;if(!se(e)){var u=l=>{var f=yf(l,t,!0);f&&(s=!0,ce(o,f))};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!n&&!s?(i.set(e,null),null):(ne(n)?n.forEach(l=>o[l]=null):ce(o,n),i.set(e,o),o)}function is(e,t){return!e||!Ia(t)?!1:(t=t.slice(2).replace(/Once$/,""),ie(e,t[0].toLowerCase()+t.slice(1))||ie(e,Ge(t))||ie(e,t))}var ct=null,Sf=null;function Ka(e){var t=ct;return ct=e,Sf=e&&e.type.__scopeId||null,t}function E0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ct;if(!t||e._n)return e;var r=function(){r._d&&qf(-1);var i=Ka(t),a=e(...arguments);return Ka(i),r._d&&qf(1),a};return r._n=!0,r._c=!0,r._d=!0,r}function VT(){}function as(e){var{type:t,vnode:r,proxy:i,withProxy:a,props:n,propsOptions:[o],slots:s,attrs:u,emit:l,render:f,renderCache:d,data:g,setupState:h,ctx:w,inheritAttrs:_}=e,x,m,b=Ka(e);try{if(r.shapeFlag&4){var c=a||i;x=yt(f.call(c,c,d,n,h,g,w)),m=u}else{var v=t;x=yt(v.length>1?v(n,{attrs:u,slots:s,emit:l}):v(n,null)),m=t.props?u:T0(u)}}catch(C){Xa(C,e,1),x=I(jr)}var p=x;if(m&&_!==!1){var y=Object.keys(m),{shapeFlag:E}=p;y.length&&E&(1|6)&&(o&&y.some(xo)&&(m=C0(m,o)),p=Ri(p,m))}return r.dirs&&(p.dirs=p.dirs?p.dirs.concat(r.dirs):r.dirs),r.transition&&(p.transition=r.transition),x=p,Ka(b),x}var T0=e=>{var t;for(var r in e)(r==="class"||r==="style"||Ia(r))&&((t||(t={}))[r]=e[r]);return t},C0=(e,t)=>{var r={};for(var i in e)(!xo(i)||!(i.slice(9)in t))&&(r[i]=e[i]);return r};function O0(e,t,r){var{props:i,children:a,component:n}=e,{props:o,children:s,patchFlag:u}=t,l=n.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&u>=0){if(u&1024)return!0;if(u&16)return i?Ef(i,o,l):!!o;if(u&8)for(var f=t.dynamicProps,d=0;de.__isSuspense;function k0(e,t){t&&t.pendingBranch?ne(e)?t.effects.push(...e):t.effects.push(e):y0(e)}function ze(e,t){if(Ue){var r=Ue.provides,i=Ue.parent&&Ue.parent.provides;i===r&&(r=Ue.provides=Object.create(i)),r[e]=t}}function _e(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=Ue||ct;if(i){var a=i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides;if(a&&e in a)return a[e];if(arguments.length>1)return r&&se(t)?t.call(i.proxy):t}}function M0(e,t){return ns(e,null,t)}var Tf={};function W(e,t,r){return ns(e,t,r)}function ns(e,t){var{immediate:r,deep:i,flush:a,onTrack:n,onTrigger:o}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Se,s=Ue,u,l=!1,f=!1;if(Fe(e)?(u=()=>e.value,l=ff(e)):Ur(e)?(u=()=>e,i=!0):ne(e)?(f=!0,l=e.some(Ur),u=()=>e.map(b=>{if(Fe(b))return b.value;if(Ur(b))return vr(b);if(se(b))return qt(b,s,2)})):se(e)?t?u=()=>qt(e,s,2):u=()=>{if(!(s&&s.isUnmounted))return g&&g(),ft(e,s,3,[h])}:u=pt,t&&i){var d=u;u=()=>vr(d())}var g,h=b=>{g=m.onStop=()=>{qt(b,s,4)}};if(Li)return h=pt,t?r&&ft(t,s,3,[u(),f?[]:void 0,h]):u(),pt;var w=f?[]:Tf,_=()=>{if(!!m.active)if(t){var b=m.run();(i||l||(f?b.some((c,v)=>pi(c,w[v])):pi(b,w)))&&(g&&g(),ft(t,s,3,[b,w===Tf?void 0:w,h]),w=b)}else m.run()};_.allowRecurse=!!t;var x;a==="sync"?x=_:a==="post"?x=()=>Xe(_,s&&s.suspense):x=()=>{!s||s.isMounted?x0(_):_()};var m=new jo(u,x);return t?r?_():w=m.run():a==="post"?Xe(m.run.bind(m),s&&s.suspense):m.run(),()=>{m.stop(),s&&s.scope&&yo(s.scope.effects,m)}}function R0(e,t,r){var i=this.proxy,a=Ee(e)?e.includes(".")?Cf(i,e):()=>i[e]:e.bind(i,i),n;se(t)?n=t:(n=t.handler,r=t);var o=Ue;Yr(this);var s=ns(a,n.bind(i),r);return o?Yr(o):pr(),s}function Cf(e,t){var r=t.split(".");return()=>{for(var i=e,a=0;a{vr(a,t)});else if(mt(e))for(var i in e)vr(e[i],t);return e}function L0(e){return se(e)?{setup:e,name:e.name}:e}var os=e=>!!e.type.__asyncLoader,Of=e=>e.type.__isKeepAlive;function ss(e,t){Af(e,"a",t)}function P0(e,t){Af(e,"da",t)}function Af(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ue,i=e.__wdc||(e.__wdc=()=>{for(var n=r;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Ga(t,i,r),r)for(var a=r.parent;a&&a.parent;)Of(a.parent.vnode)&&N0(i,t,r,a),a=a.parent}function N0(e,t,r,i){var a=Ga(t,e,i,!0);Zt(()=>{yo(i[t],a)},r)}function Ga(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ue,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r){var a=r[e]||(r[e]=[]),n=t.__weh||(t.__weh=function(){if(!r.isUnmounted){Fr(),Yr(r);for(var o=arguments.length,s=new Array(o),u=0;ufunction(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;return(!Li||e==="sp")&&Ga(e,t,r)},If=Nt("bm"),Re=Nt("m"),D0=Nt("bu"),B0=Nt("u"),Ae=Nt("bum"),Zt=Nt("um"),$0=Nt("sp"),F0=Nt("rtg"),z0=Nt("rtc");function U0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;Ga("ec",e,t)}var ls=!0;function H0(e){var t=Rf(e),r=e.proxy,i=e.ctx;ls=!1,t.beforeCreate&&kf(t.beforeCreate,e,"bc");var{data:a,computed:n,methods:o,watch:s,provide:u,inject:l,created:f,beforeMount:d,mounted:g,beforeUpdate:h,updated:w,activated:_,deactivated:x,beforeDestroy:m,beforeUnmount:b,destroyed:c,unmounted:v,render:p,renderTracked:y,renderTriggered:E,errorCaptured:C,serverPrefetch:O,expose:P,inheritAttrs:M,components:H,directives:re,filters:R}=t,B=null;if(l&&W0(l,i,B,e.appContext.config.unwrapInjectedRef),o)for(var X in o){var Q=o[X];se(Q)&&(i[X]=Q.bind(r))}if(a&&function(){var le=a.call(r,r);We(le)&&(e.data=ke(le))}(),ls=!0,n){var V=function(le){var J=n[le],ye=se(J)?J.bind(r,r):se(J.get)?J.get.bind(r,r):pt,be=!se(J)&&se(J.set)?J.set.bind(r):pt,Ve=te({get:ye,set:be});Object.defineProperty(i,le,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:lr=>Ve.value=lr})};for(var K in n)V(K)}if(s)for(var ae in s)Mf(s[ae],i,r,ae);if(u){var Te=se(u)?u.call(r):u;Reflect.ownKeys(Te).forEach(le=>{ze(le,Te[le])})}f&&kf(f,e,"c");function oe(le,J){ne(J)?J.forEach(ye=>le(ye.bind(r))):J&&le(J.bind(r))}if(oe(If,d),oe(Re,g),oe(D0,h),oe(B0,w),oe(ss,_),oe(P0,x),oe(U0,C),oe(z0,y),oe(F0,E),oe(Ae,b),oe(Zt,v),oe($0,O),ne(P))if(P.length){var de=e.exposed||(e.exposed={});P.forEach(le=>{Object.defineProperty(de,le,{get:()=>r[le],set:J=>r[le]=J})})}else e.exposed||(e.exposed={});p&&e.render===pt&&(e.render=p),M!=null&&(e.inheritAttrs=M),H&&(e.components=H),re&&(e.directives=re)}function W0(e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;ne(e)&&(e=us(e));var i=function(n){var o=e[n],s=void 0;We(o)?"default"in o?s=_e(o.from||n,o.default,!0):s=_e(o.from||n):s=_e(o),Fe(s)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:u=>s.value=u}):t[n]=s};for(var a in e)i(a)}function kf(e,t,r){ft(ne(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,r)}function Mf(e,t,r,i){var a=i.includes(".")?Cf(r,i):()=>r[i];if(Ee(e)){var n=t[e];se(n)&&W(a,n)}else if(se(e))W(a,e.bind(r));else if(We(e))if(ne(e))e.forEach(s=>Mf(s,t,r,i));else{var o=se(e.handler)?e.handler.bind(r):t[e.handler];se(o)&&W(a,o,e)}}function Rf(e){var t=e.type,{mixins:r,extends:i}=t,{mixins:a,optionsCache:n,config:{optionMergeStrategies:o}}=e.appContext,s=n.get(t),u;return s?u=s:!a.length&&!r&&!i?u=t:(u={},a.length&&a.forEach(l=>Ja(u,l,o,!0)),Ja(u,t,o)),n.set(t,u),u}function Ja(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,{mixins:a,extends:n}=t;n&&Ja(e,n,r,!0),a&&a.forEach(u=>Ja(e,u,r,!0));for(var o in t)if(!(i&&o==="expose")){var s=V0[o]||r&&r[o];e[o]=s?s(e[o],t[o]):t[o]}return e}var V0={data:Lf,props:dr,emits:dr,methods:dr,computed:dr,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:dr,directives:dr,watch:Y0,provide:Lf,inject:j0};function Lf(e,t){return t?e?function(){return ce(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function j0(e,t){return dr(us(e),us(t))}function us(e){if(ne(e)){for(var t={},r=0;r3&&arguments[3]!==void 0?arguments[3]:!1,a={},n={};La(n,en,1),e.propsDefaults=Object.create(null),Pf(e,t,a,n);for(var o in e.propsOptions[0])o in a||(a[o]=void 0);r?e.props=i?a:v0(a):e.type.props?e.props=a:e.props=n,e.attrs=n}function X0(e,t,r,i){var{props:a,attrs:n,vnode:{patchFlag:o}}=e,s=me(a),[u]=e.propsOptions,l=!1;if((i||o>0)&&!(o&16)){if(o&8)for(var f=e.vnode.dynamicProps,d=0;d2&&arguments[2]!==void 0?arguments[2]:!1,i=t.propsCache,a=i.get(e);if(a)return a;var n=e.props,o={},s=[],u=!1;if(!se(e)){var l=c=>{u=!0;var[v,p]=Nf(c,t,!0);ce(o,v),p&&s.push(...p)};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}if(!n&&!u)return i.set(e,di),di;if(ne(n))for(var f=0;f-1,_[1]=m<0||x-1||ie(_,"default"))&&s.push(h)}}}var b=[o,s];return i.set(e,b),b}function Df(e){return e[0]!=="$"}function Bf(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function $f(e,t){return Bf(e)===Bf(t)}function Ff(e,t){return ne(t)?t.findIndex(r=>$f(r,e)):se(t)&&$f(t,e)?0:-1}var zf=e=>e[0]==="_"||e==="$stable",cs=e=>ne(e)?e.map(yt):[yt(e)],Z0=(e,t,r)=>{var i=E0(function(){return cs(t(...arguments))},r);return i._c=!1,i},Uf=(e,t,r)=>{var i=e._ctx;for(var a in e)if(!zf(a)){var n=e[a];se(n)?t[a]=Z0(a,n,i):n!=null&&function(){var o=cs(n);t[a]=()=>o}()}},Hf=(e,t)=>{var r=cs(t);e.slots.default=()=>r},K0=(e,t)=>{if(e.vnode.shapeFlag&32){var r=t._;r?(e.slots=me(t),La(t,"_",r)):Uf(t,e.slots={})}else e.slots={},t&&Hf(e,t);La(e.slots,en,1)},G0=(e,t,r)=>{var{vnode:i,slots:a}=e,n=!0,o=Se;if(i.shapeFlag&32){var s=t._;s?r&&s===1?n=!1:(ce(a,t),!r&&s===1&&delete a._):(n=!t.$stable,Uf(t,a)),o=t}else t&&(Hf(e,t),o={default:1});if(n)for(var u in a)!zf(u)&&!(u in o)&&delete a[u]};function ki(e,t){var r=ct;if(r===null)return e;for(var i=r.proxy,a=e.dirs||(e.dirs=[]),n=0;n1&&arguments[1]!==void 0?arguments[1]:null;a!=null&&!We(a)&&(a=null);var n=Wf(),o=new Set,s=!1,u=n.app={_uid:J0++,_component:i,_props:a,_container:null,_context:n,_instance:null,version:b_,get config(){return n.config},set config(l){},use(l){for(var f=arguments.length,d=new Array(f>1?f-1:0),g=1;g4&&arguments[4]!==void 0?arguments[4]:!1;if(ne(e)){e.forEach((_,x)=>vs(_,t&&(ne(t)?t[x]:t),r,i,a));return}if(!(os(i)&&!a)){var n=i.shapeFlag&4?ms(i.component)||i.component.proxy:i.el,o=a?null:n,{i:s,r:u}=e,l=t&&t.r,f=s.refs===Se?s.refs={}:s.refs,d=s.setupState;if(l!=null&&l!==u&&(Ee(l)?(f[l]=null,ie(d,l)&&(d[l]=null)):Fe(l)&&(l.value=null)),se(u))qt(u,s,12,[o,f]);else{var g=Ee(u),h=Fe(u);if(g||h){var w=()=>{if(e.f){var _=g?f[u]:u.value;a?ne(_)&&yo(_,n):ne(_)?_.includes(n)||_.push(n):g?f[u]=[n]:(u.value=[n],e.k&&(f[e.k]=u.value))}else g?(f[u]=o,ie(d,u)&&(d[u]=o)):Fe(u)&&(u.value=o,e.k&&(f[e.k]=o))};o?(w.id=-1,Xe(w,r)):w()}}}}var Xe=k0;function e_(e){return t_(e)}function t_(e,t){var r=Cp();r.__VUE__=!0;var{insert:i,remove:a,patchProp:n,createElement:o,createText:s,createComment:u,setText:l,setElementText:f,parentNode:d,nextSibling:g,setScopeId:h=pt,cloneNode:w,insertStaticContent:_}=e,x=function(S,T,k){var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,j=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,$=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,z=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!!T.dynamicChildren;if(S!==T){S&&!Mi(S,T)&&(L=Ve(S),de(S,N,F,!0),S=null),T.patchFlag===-2&&(z=!1,T.dynamicChildren=null);var{type:D,ref:ee,shapeFlag:G}=T;switch(D){case ds:m(S,T,k,L);break;case jr:b(S,T,k,L);break;case hs:S==null&&c(T,k,L,j);break;case xt:re(S,T,k,L,N,F,j,$,z);break;default:G&1?y(S,T,k,L,N,F,j,$,z):G&6?R(S,T,k,L,N,F,j,$,z):(G&64||G&128)&&D.process(S,T,k,L,N,F,j,$,z,Ne)}ee!=null&&N&&vs(ee,S&&S.ref,F,T||S,!T)}},m=(S,T,k,L)=>{if(S==null)i(T.el=s(T.children),k,L);else{var N=T.el=S.el;T.children!==S.children&&l(N,T.children)}},b=(S,T,k,L)=>{S==null?i(T.el=u(T.children||""),k,L):T.el=S.el},c=(S,T,k,L)=>{[S.el,S.anchor]=_(S.children,T,k,L,S.el,S.anchor)},v=(S,T,k)=>{for(var{el:L,anchor:N}=S,F;L&&L!==N;)F=g(L),i(L,T,k),L=F;i(N,T,k)},p=S=>{for(var{el:T,anchor:k}=S,L;T&&T!==k;)L=g(T),a(T),T=L;a(k)},y=(S,T,k,L,N,F,j,$,z)=>{j=j||T.type==="svg",S==null?E(T,k,L,N,F,j,$,z):P(S,T,N,F,j,$,z)},E=(S,T,k,L,N,F,j,$)=>{var z,D,{type:ee,props:G,shapeFlag:Z,transition:fe,patchFlag:Be,dirs:Oe}=S;if(S.el&&w!==void 0&&Be===-1)z=S.el=w(S.el);else{if(z=S.el=o(S.type,F,G&&G.is,G),Z&8?f(z,S.children):Z&16&&O(S.children,z,null,L,N,F&&ee!=="foreignObject",j,$),Oe&&hr(S,null,L,"created"),G){for(var A in G)A!=="value"&&!ka(A)&&n(z,A,null,G[A],F,S.children,L,N,be);"value"in G&&n(z,"value",null,G.value),(D=G.onVnodeBeforeMount)&&St(D,L,S)}C(z,S,S.scopeId,j,L)}Object.defineProperty(z,"__vueParentComponent",{value:L,enumerable:!1}),Oe&&hr(S,null,L,"beforeMount");var Y=(!N||N&&!N.pendingBranch)&&fe&&!fe.persisted;Y&&fe.beforeEnter(z),i(z,T,k),((D=G&&G.onVnodeMounted)||Y||Oe)&&Xe(()=>{D&&St(D,L,S),Y&&fe.enter(z),Oe&&hr(S,null,L,"mounted")},N)},C=(S,T,k,L,N)=>{if(k&&h(S,k),L)for(var F=0;F8&&arguments[8]!==void 0?arguments[8]:0,D=z;D{var $=T.el=S.el,{patchFlag:z,dynamicChildren:D,dirs:ee}=T;z|=S.patchFlag&16;var G=S.props||Se,Z=T.props||Se,fe;k&&gr(k,!1),(fe=Z.onVnodeBeforeUpdate)&&St(fe,k,T,S),ee&&hr(T,S,k,"beforeUpdate"),k&&gr(k,!0);var Be=N&&T.type!=="foreignObject";if(D?M(S.dynamicChildren,D,$,k,L,Be,F):j||K(S,T,$,null,k,L,Be,F,!1),z>0){if(z&16)H($,T,G,Z,k,L,N);else if(z&2&&G.class!==Z.class&&n($,"class",null,Z.class,N),z&4&&n($,"style",G.style,Z.style,N),z&8)for(var Oe=T.dynamicProps,A=0;A{fe&&St(fe,k,T,S),ee&&hr(T,S,k,"updated")},L)},M=(S,T,k,L,N,F,j)=>{for(var $=0;${if(k!==L){for(var $ in L)if(!ka($)){var z=L[$],D=k[$];z!==D&&$!=="value"&&n(S,$,D,z,j,T.children,N,F,be)}if(k!==Se)for(var ee in k)!ka(ee)&&!(ee in L)&&n(S,ee,k[ee],null,j,T.children,N,F,be);"value"in L&&n(S,"value",k.value,L.value)}},re=(S,T,k,L,N,F,j,$,z)=>{var D=T.el=S?S.el:s(""),ee=T.anchor=S?S.anchor:s(""),{patchFlag:G,dynamicChildren:Z,slotScopeIds:fe}=T;fe&&($=$?$.concat(fe):fe),S==null?(i(D,k,L),i(ee,k,L),O(T.children,k,ee,N,F,j,$,z)):G>0&&G&64&&Z&&S.dynamicChildren?(M(S.dynamicChildren,Z,k,N,F,j,$),(T.key!=null||N&&T===N.subTree)&&Vf(S,T,!0)):K(S,T,k,ee,N,F,j,$,z)},R=(S,T,k,L,N,F,j,$,z)=>{T.slotScopeIds=$,S==null?T.shapeFlag&512?N.ctx.activate(T,k,L,j,z):B(T,k,L,N,F,j,z):X(S,T,z)},B=(S,T,k,L,N,F,j)=>{var $=S.component=v_(S,L,N);if(Of(S)&&($.ctx.renderer=Ne),d_($),$.asyncDep){if(N&&N.registerDep($,Q),!S.el){var z=$.subTree=I(jr);b(null,z,T,k)}return}Q($,S,T,k,N,F,j)},X=(S,T,k)=>{var L=T.component=S.component;if(O0(S,T,k))if(L.asyncDep&&!L.asyncResolved){V(L,T,k);return}else L.next=T,w0(L.update),L.update();else T.component=S.component,T.el=S.el,L.vnode=T},Q=(S,T,k,L,N,F,j)=>{var $=()=>{if(S.isMounted){var{next:ue,bu:$e,u:Ke,parent:De,vnode:gt}=S,ur=ue,Mt;gr(S,!1),ue?(ue.el=gt.el,V(S,ue,j)):ue=gt,$e&&Oo($e),(Mt=ue.props&&ue.props.onVnodeBeforeUpdate)&&St(Mt,De,ue,gt),gr(S,!0);var Lr=as(S),zt=S.subTree;S.subTree=Lr,x(zt,Lr,d(zt.el),Ve(zt),S,N,F),ue.el=Lr.el,ur===null&&A0(S,Lr.el),Ke&&Xe(Ke,N),(Mt=ue.props&&ue.props.onVnodeUpdated)&&Xe(()=>St(Mt,De,ue,gt),N)}else{var ee,{el:G,props:Z}=T,{bm:fe,m:Be,parent:Oe}=S,A=os(T);if(gr(S,!1),fe&&Oo(fe),!A&&(ee=Z&&Z.onVnodeBeforeMount)&&St(ee,Oe,T),gr(S,!0),G&&ca){var Y=()=>{S.subTree=as(S),ca(G,S.subTree,S,N,null)};A?T.type.__asyncLoader().then(()=>!S.isUnmounted&&Y()):Y()}else{var q=S.subTree=as(S);x(null,q,k,L,S,N,F),T.el=q.el}if(Be&&Xe(Be,N),!A&&(ee=Z&&Z.onVnodeMounted)){var he=T;Xe(()=>St(ee,Oe,he),N)}T.shapeFlag&256&&S.a&&Xe(S.a,N),S.isMounted=!0,T=k=L=null}},z=S.effect=new jo($,()=>mf(S.update),S.scope),D=S.update=z.run.bind(z);D.id=S.uid,gr(S,!0),D()},V=(S,T,k)=>{T.component=S;var L=S.vnode.props;S.vnode=T,S.next=null,X0(S,T.props,L,k),G0(S,T.children,k),Fr(),rs(void 0,S.update),zr()},K=function(S,T,k,L,N,F,j,$){var z=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1,D=S&&S.children,ee=S?S.shapeFlag:0,G=T.children,{patchFlag:Z,shapeFlag:fe}=T;if(Z>0){if(Z&128){Te(D,G,k,L,N,F,j,$,z);return}else if(Z&256){ae(D,G,k,L,N,F,j,$,z);return}}fe&8?(ee&16&&be(D,N,F),G!==D&&f(k,G)):ee&16?fe&16?Te(D,G,k,L,N,F,j,$,z):be(D,N,F,!0):(ee&8&&f(k,""),fe&16&&O(G,k,L,N,F,j,$,z))},ae=(S,T,k,L,N,F,j,$,z)=>{S=S||di,T=T||di;var D=S.length,ee=T.length,G=Math.min(D,ee),Z;for(Z=0;Zee?be(S,N,F,!0,!1,G):O(T,k,L,N,F,j,$,z,G)},Te=(S,T,k,L,N,F,j,$,z)=>{for(var D=0,ee=T.length,G=S.length-1,Z=ee-1;D<=G&&D<=Z;){var fe=S[D],Be=T[D]=z?Kt(T[D]):yt(T[D]);if(Mi(fe,Be))x(fe,Be,k,null,N,F,j,$,z);else break;D++}for(;D<=G&&D<=Z;){var Oe=S[G],A=T[Z]=z?Kt(T[Z]):yt(T[Z]);if(Mi(Oe,A))x(Oe,A,k,null,N,F,j,$,z);else break;G--,Z--}if(D>G){if(D<=Z)for(var Y=Z+1,q=YZ)for(;D<=G;)de(S[D],N,F,!0),D++;else{var he=D,ue=D,$e=new Map;for(D=ue;D<=Z;D++){var Ke=T[D]=z?Kt(T[D]):yt(T[D]);Ke.key!=null&&$e.set(Ke.key,D)}var De,gt=0,ur=Z-ue+1,Mt=!1,Lr=0,zt=new Array(ur);for(D=0;D=ur){de(fi,N,F,!0);continue}var Pr=void 0;if(fi.key!=null)Pr=$e.get(fi.key);else for(De=ue;De<=Z;De++)if(zt[De-ue]===0&&Mi(fi,T[De])){Pr=De;break}Pr===void 0?de(fi,N,F,!0):(zt[Pr-ue]=D+1,Pr>=Lr?Lr=Pr:Mt=!0,x(fi,T[Pr],k,null,N,F,j,$,z),gt++)}var Ph=Mt?r_(zt):di;for(De=Ph.length-1,D=ur-1;D>=0;D--){var Pl=ue+D,Nh=T[Pl],Dh=Pl+14&&arguments[4]!==void 0?arguments[4]:null,{el:F,type:j,transition:$,children:z,shapeFlag:D}=S;if(D&6){oe(S.component.subTree,T,k,L);return}if(D&128){S.suspense.move(T,k,L);return}if(D&64){j.move(S,T,k,Ne);return}if(j===xt){i(F,T,k);for(var ee=0;ee$.enter(F),N);else{var{leave:Z,delayLeave:fe,afterLeave:Be}=$,Oe=()=>i(F,T,k),A=()=>{Z(F,()=>{Oe(),Be&&Be()})};fe?fe(F,Oe,A):A()}else i(F,T,k)},de=function(S,T,k){var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,{type:F,props:j,ref:$,children:z,dynamicChildren:D,shapeFlag:ee,patchFlag:G,dirs:Z}=S;if($!=null&&vs($,null,k,S,!0),ee&256){T.ctx.deactivate(S);return}var fe=ee&1&&Z,Be=!os(S),Oe;if(Be&&(Oe=j&&j.onVnodeBeforeUnmount)&&St(Oe,T,S),ee&6)ye(S.component,k,L);else{if(ee&128){S.suspense.unmount(k,L);return}fe&&hr(S,null,T,"beforeUnmount"),ee&64?S.type.remove(S,T,k,N,Ne,L):D&&(F!==xt||G>0&&G&64)?be(D,T,k,!1,!0):(F===xt&&G&(128|256)||!N&&ee&16)&&be(z,T,k),L&&le(S)}(Be&&(Oe=j&&j.onVnodeUnmounted)||fe)&&Xe(()=>{Oe&&St(Oe,T,S),fe&&hr(S,null,T,"unmounted")},k)},le=S=>{var{type:T,el:k,anchor:L,transition:N}=S;if(T===xt){J(k,L);return}if(T===hs){p(S);return}var F=()=>{a(k),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(S.shapeFlag&1&&N&&!N.persisted){var{leave:j,delayLeave:$}=N,z=()=>j(k,F);$?$(S.el,F,z):z()}else F()},J=(S,T)=>{for(var k;S!==T;)k=g(S),a(S),S=k;a(T)},ye=(S,T,k)=>{var{bum:L,scope:N,update:F,subTree:j,um:$}=S;L&&Oo(L),N.stop(),F&&(F.active=!1,de(j,S,T,k)),$&&Xe($,T),Xe(()=>{S.isUnmounted=!0},T),T&&T.pendingBranch&&!T.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===T.pendingId&&(T.deps--,T.deps===0&&T.resolve())},be=function(S,T,k){for(var L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,N=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,j=F;jS.shapeFlag&6?Ve(S.component.subTree):S.shapeFlag&128?S.suspense.next():g(S.anchor||S.el),lr=(S,T,k)=>{if(S==null)T._vnode&&de(T._vnode,null,null,!0);else{var L=T.__vueParent;x(T._vnode||null,S,T,null,L,null,k)}T._vnode=S},Ne={p:x,um:de,m:oe,r:le,mt:B,mc:O,pc:K,pbc:M,n:Ve,o:e},fa,ca;return t&&([fa,ca]=t(Ne)),{render:lr,hydrate:fa,createApp:Q0(lr,fa)}}function gr(e,t){var{effect:r,update:i}=e;r.allowRecurse=i.allowRecurse=t}function Vf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.children,a=t.children;if(ne(i)&&ne(a))for(var n=0;n>1,e[r[s]]0&&(t[i]=r[n-1]),r[n]=i)}}for(n=r.length,o=r[n-1];n-- >0;)r[n]=o,o=t[o];return r}var i_=e=>e.__isTeleport,a_=Symbol(),xt=Symbol(void 0),ds=Symbol(void 0),jr=Symbol(void 0),hs=Symbol(void 0),jf=null,Yf=1;function qf(e){Yf+=e}function Qa(e){return e?e.__v_isVNode===!0:!1}function Mi(e,t){return e.type===t.type&&e.key===t.key}var en="__vInternal",Xf=e=>{var{key:t}=e;return t!=null?t:null},tn=e=>{var{ref:t,ref_key:r,ref_for:i}=e;return t!=null?Ee(t)||Fe(t)||se(t)?{i:ct,r:t,k:r,f:!!i}:t:null};function n_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e===xt?0:1,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xf(t),ref:t&&tn(t),scopeId:Sf,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:n,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null};return s?(gs(u,r),n&128&&e.normalize(u)):r&&(u.shapeFlag|=Ee(r)?8:16),Yf>0&&!o&&jf&&(u.patchFlag>0||n&6)&&u.patchFlag!==32&&jf.push(u),u}var I=o_;function o_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if((!e||e===a_)&&(e=jr),Qa(e)){var o=Ri(e,t,!0);return r&&gs(o,r),o}if(m_(e)&&(e=e.__vccOpts),t){t=s_(t);var{class:s,style:u}=t;s&&!Ee(s)&&(t.class=wo(s)),We(u)&&(cf(u)&&!ne(u)&&(u=ce({},u)),t.style=bo(u))}var l=Ee(e)?1:I0(e)?128:i_(e)?64:We(e)?4:se(e)?2:0;return n_(e,t,r,i,a,l,n,!0)}function s_(e){return e?cf(e)||en in e?ce({},e):e:null}function Ri(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{props:i,ref:a,patchFlag:n,children:o}=e,s=t?tt(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&Xf(s),ref:t&&t.ref?r&&a?ne(a)?a.concat(tn(t)):[a,tn(t)]:tn(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xt?n===-1?16:n|16:n,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ri(e.ssContent),ssFallback:e.ssFallback&&Ri(e.ssFallback),el:e.el,anchor:e.anchor};return u}function l_(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return I(ds,null,e,t)}function yt(e){return e==null||typeof e=="boolean"?I(jr):ne(e)?I(xt,null,e.slice()):typeof e=="object"?Kt(e):I(ds,null,String(e))}function Kt(e){return e.el===null||e.memo?e:Ri(e)}function gs(e,t){var r=0,{shapeFlag:i}=e;if(t==null)t=null;else if(ne(t))r=16;else if(typeof t=="object")if(i&(1|64)){var a=t.default;a&&(a._c&&(a._d=!1),gs(e,a()),a._c&&(a._d=!0));return}else{r=32;var n=t._;!n&&!(en in t)?t._ctx=ct:n===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else se(t)?(t={default:t,_ctx:ct},r=32):(t=String(t),i&64?(r=16,t=[l_(t)]):r=8);e.children=t,e.shapeFlag|=r}function tt(){for(var e={},t=0;t3&&arguments[3]!==void 0?arguments[3]:null;ft(e,t,7,[r,i])}var ps=e=>e?Zf(e)?ms(e)||e.proxy:ps(e.parent):null,rn=ce(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ps(e.parent),$root:e=>ps(e.root),$emit:e=>e.emit,$options:e=>Rf(e),$forceUpdate:e=>()=>mf(e.update),$nextTick:e=>Vr.bind(e.proxy),$watch:e=>R0.bind(e)}),u_={get(e,t){var{_:r}=e,{ctx:i,setupState:a,data:n,props:o,accessCache:s,type:u,appContext:l}=r,f;if(t[0]!=="$"){var d=s[t];if(d!==void 0)switch(d){case 1:return a[t];case 2:return n[t];case 4:return i[t];case 3:return o[t]}else{if(a!==Se&&ie(a,t))return s[t]=1,a[t];if(n!==Se&&ie(n,t))return s[t]=2,n[t];if((f=r.propsOptions[0])&&ie(f,t))return s[t]=3,o[t];if(i!==Se&&ie(i,t))return s[t]=4,i[t];ls&&(s[t]=0)}}var g=rn[t],h,w;if(g)return t==="$attrs"&&Qe(r,"get",t),g(r);if((h=u.__cssModules)&&(h=h[t]))return h;if(i!==Se&&ie(i,t))return s[t]=4,i[t];if(w=l.config.globalProperties,ie(w,t))return w[t]},set(e,t,r){var{_:i}=e,{data:a,setupState:n,ctx:o}=i;if(n!==Se&&ie(n,t))n[t]=r;else if(a!==Se&&ie(a,t))a[t]=r;else if(ie(i.props,t))return!1;return t[0]==="$"&&t.slice(1)in i?!1:(o[t]=r,!0)},has(e,t){var{_:{data:r,setupState:i,accessCache:a,ctx:n,appContext:o,propsOptions:s}}=e,u;return!!a[t]||r!==Se&&ie(r,t)||i!==Se&&ie(i,t)||(u=s[0])&&ie(u,t)||ie(n,t)||ie(rn,t)||ie(o.config.globalProperties,t)}},f_=Wf(),c_=0;function v_(e,t,r){var i=e.type,a=(t?t.appContext:e.appContext)||f_,n={uid:c_++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new Fm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Nf(i,a),emitsOptions:yf(i,a),emit:null,emitted:null,propsDefaults:Se,inheritAttrs:i.inheritAttrs,ctx:Se,data:Se,props:Se,attrs:Se,slots:Se,refs:Se,setupState:Se,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return n.ctx={_:n},n.root=t?t.root:n,n.emit=S0.bind(null,n),e.ce&&e.ce(n),n}var Ue=null,Dt=()=>Ue||ct,Yr=e=>{Ue=e,e.scope.on()},pr=()=>{Ue&&Ue.scope.off(),Ue=null};function Zf(e){return e.vnode.shapeFlag&4}var Li=!1;function d_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Li=t;var{props:r,children:i}=e.vnode,a=Zf(e);q0(e,r,a,t),K0(e,i);var n=a?h_(e,t):void 0;return Li=!1,n}function h_(e,t){var r=e.type;e.accessCache=Object.create(null),e.proxy=qa(new Proxy(e.ctx,u_));var{setup:i}=r;if(i){var a=e.setupContext=i.length>1?p_(e):null;Yr(e),Fr();var n=qt(i,e,0,[e.props,a]);if(zr(),pr(),yu(n)){if(n.then(pr,pr),t)return n.then(o=>{Kf(e,o,t)}).catch(o=>{Xa(o,e,0)});e.asyncDep=n}else Kf(e,n,t)}else Jf(e,t)}function Kf(e,t,r){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:We(t)&&(e.setupState=gf(t)),Jf(e,r)}var Gf;function Jf(e,t,r){var i=e.type;if(!e.render){if(!t&&Gf&&!i.render){var a=i.template;if(a){var{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:u}=i,l=ce(ce({isCustomElement:n,delimiters:s},o),u);i.render=Gf(a,l)}}e.render=i.render||pt}Yr(e),Fr(),H0(e),zr(),pr()}function g_(e){return new Proxy(e.attrs,{get(t,r){return Qe(e,"get","$attrs"),t[r]}})}function p_(e){var t=i=>{e.exposed=i||{}},r;return{get attrs(){return r||(r=g_(e))},slots:e.slots,emit:e.emit,expose:t}}function ms(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(gf(qa(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in rn)return rn[r](e)}}))}function m_(e){return se(e)&&"__vccOpts"in e}var te=(e,t)=>m0(e,t,Li);function __(e,t,r){var i=arguments.length;return i===2?We(t)&&!ne(t)?Qa(t)?I(e,null,[t]):I(e,t):I(e,null,t):(i>3?r=Array.prototype.slice.call(arguments,2):i===3&&Qa(r)&&(r=[r]),I(e,t,r))}var b_="3.2.30",w_="http://www.w3.org/2000/svg",mr=typeof document!="undefined"?document:null,Qf=mr&&mr.createElement("template"),x_={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{var t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,i)=>{var a=t?mr.createElementNS(w_,e):mr.createElement(e,r?{is:r}:void 0);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>mr.createTextNode(e),createComment:e=>mr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){var t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,r,i,a,n){var o=r?r.previousSibling:t.lastChild;if(a&&(a===n||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),r),!(a===n||!(a=a.nextSibling)););else{Qf.innerHTML=i?"".concat(e,""):e;var s=Qf.content;if(i){for(var u=s.firstChild;u.firstChild;)s.appendChild(u.firstChild);s.removeChild(u)}t.insertBefore(s,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}};function y_(e,t,r){var i=e._vtc;i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}function S_(e,t,r){var i=e.style,a=Ee(r);if(r&&!a){for(var n in r)_s(i,n,r[n]);if(t&&!Ee(t))for(var o in t)r[o]==null&&_s(i,o,"")}else{var s=i.display;a?t!==r&&(i.cssText=r):t&&e.removeAttribute("style"),"_vod"in e&&(i.display=s)}}var ec=/\s*!important$/;function _s(e,t,r){if(ne(r))r.forEach(a=>_s(e,t,a));else if(r=C_(r),t.startsWith("--"))e.setProperty(t,r);else{var i=E_(e,t);ec.test(r)?e.setProperty(Ge(i),r.replace(ec,""),"important"):e[i]=r}}var tc=["Webkit","Moz","ms"],bs={};function E_(e,t){var r=bs[t];if(r)return r;var i=Ht(t);if(i!=="filter"&&i in e)return bs[t]=i;i=Ra(i);for(var a=0;atypeof rpx2px!="function"?e:Ee(e)?e.replace(T_,(t,r)=>rpx2px(r)+"px"):e,rc="http://www.w3.org/1999/xlink";function O_(e,t,r,i,a){if(i&&t.startsWith("xlink:"))r==null?e.removeAttributeNS(rc,t.slice(6,t.length)):e.setAttributeNS(rc,t,r);else{var n=dp(t);r==null||n&&!wu(r)?e.removeAttribute(t):e.setAttribute(t,n?"":r)}}function A_(e,t,r,i,a,n,o){if(t==="innerHTML"||t==="textContent"){i&&o(i,a,n),e[t]=r==null?"":r;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=r;var s=r==null?"":r;(e.value!==s||e.tagName==="OPTION")&&(e.value=s),r==null&&e.removeAttribute(t);return}if(r===""||r==null){var u=typeof e[t];if(u==="boolean"){e[t]=wu(r);return}else if(r==null&&u==="string"){e[t]="",e.removeAttribute(t);return}else if(u==="number"){try{e[t]=0}catch(l){}e.removeAttribute(t);return}}try{e[t]=r}catch(l){}}var an=Date.now,ic=!1;if(typeof window!="undefined"){an()>document.createEvent("Event").timeStamp&&(an=()=>performance.now());var ac=navigator.userAgent.match(/firefox\/(\d+)/i);ic=!!(ac&&Number(ac[1])<=53)}var ws=0,I_=Promise.resolve(),k_=()=>{ws=0},M_=()=>ws||(I_.then(k_),ws=an());function R_(e,t,r,i){e.addEventListener(t,r,i)}function L_(e,t,r,i){e.removeEventListener(t,r,i)}function P_(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,n=e._vei||(e._vei={}),o=n[t];if(i&&o)o.value=i;else{var[s,u]=N_(t);if(i){var l=n[t]=D_(i,a);R_(e,s,l,u)}else o&&(L_(e,s,o,u),n[t]=void 0)}}var nc=/(?:Once|Passive|Capture)$/;function N_(e){var t;if(nc.test(e)){t={};for(var r;r=e.match(nc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[Ge(e.slice(2)),t]}function D_(e,t){var r=i=>{var a=i.timeStamp||an();(ic||a>=r.attached-1)&&ft(B_(i,r.value),t,5,[i])};return r.value=e,r.attached=M_(),r}function B_(e,t){if(ne(t)){var r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(i=>a=>!a._stopped&&i&&i(a))}else return t}var oc=/^on[a-z]/,$_=function(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,n=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0;t==="class"?y_(e,i,a):t==="style"?S_(e,r,i):Ia(t)?xo(t)||P_(e,t,r,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):F_(e,t,i,a))?A_(e,t,i,n,o,s,u):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),O_(e,t,i,a))};function F_(e,t,r,i){return i?!!(t==="innerHTML"||t==="textContent"||t in e&&oc.test(t)&&se(r)):t==="spellcheck"||t==="draggable"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||oc.test(t)&&Ee(r)?!1:t in e}var z_=["ctrl","shift","alt","meta"],U_={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>z_.some(r=>e["".concat(r,"Key")]&&!t.includes(r))},xs=(e,t)=>function(r){for(var i=0;i1?n-1:0),s=1;s{Ni(e,!1)}):Ni(e,i))},beforeUnmount(e,t){var{value:r}=t;Ni(e,r)}};function Ni(e,t){e.style.display=t?e._vod:"none"}var H_=ce({patchProp:$_},x_),sc;function W_(){return sc||(sc=e_(H_))}var lc=function(){var e=W_().createApp(...arguments),{mount:t}=e;return e.mount=r=>{var i=V_(r);if(!!i){var a=e._component;!se(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";var n=t(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),n}},e};function V_(e){if(Ee(e)){var t=document.querySelector(e);return t}return e}var uc=["top","left","right","bottom"],ys,nn={},ot;function Ss(){return!("CSS"in window)||typeof CSS.supports!="function"?ot="":CSS.supports("top: env(safe-area-inset-top)")?ot="env":CSS.supports("top: constant(safe-area-inset-top)")?ot="constant":ot="",ot}function fc(){if(ot=typeof ot=="string"?ot:Ss(),!ot){uc.forEach(function(s){nn[s]=0});return}function e(s,u){var l=s.style;Object.keys(u).forEach(function(f){var d=u[f];l[f]=d})}var t=[];function r(s){s?t.push(s):t.forEach(function(u){u()})}var i=!1;try{var a=Object.defineProperty({},"passive",{get:function(){i={passive:!0}}});window.addEventListener("test",null,a)}catch(s){}function n(s,u){var l=document.createElement("div"),f=document.createElement("div"),d=document.createElement("div"),g=document.createElement("div"),h=100,w=1e4,_={position:"absolute",width:h+"px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:ot+"(safe-area-inset-"+u+")"};e(l,_),e(f,_),e(d,{transition:"0s",animation:"none",width:"400px",height:"400px"}),e(g,{transition:"0s",animation:"none",width:"250%",height:"250%"}),l.appendChild(d),f.appendChild(g),s.appendChild(l),s.appendChild(f),r(function(){l.scrollTop=f.scrollTop=w;var m=l.scrollTop,b=f.scrollTop;function c(){this.scrollTop!==(this===l?m:b)&&(l.scrollTop=f.scrollTop=w,m=l.scrollTop,b=f.scrollTop,j_(u))}l.addEventListener("scroll",c,i),f.addEventListener("scroll",c,i)});var x=getComputedStyle(l);Object.defineProperty(nn,u,{configurable:!0,get:function(){return parseFloat(x.paddingBottom)}})}var o=document.createElement("div");e(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),uc.forEach(function(s){n(o,s)}),document.body.appendChild(o),r(),ys=!0}function on(e){return ys||fc(),nn[e]}var sn=[];function j_(e){sn.length||setTimeout(function(){var t={};sn.forEach(function(r){t[r]=nn[r]}),sn.length=0,ln.forEach(function(r){r(t)})},0),sn.push(e)}var ln=[];function Y_(e){!Ss()||(ys||fc(),typeof e=="function"&&ln.push(e))}function q_(e){var t=ln.indexOf(e);t>=0&&ln.splice(t,1)}var X_={get support(){return(typeof ot=="string"?ot:Ss()).length!=0},get top(){return on("top")},get left(){return on("left")},get right(){return on("right")},get bottom(){return on("bottom")},onChange:Y_,offChange:q_},un=X_,cc=xs(()=>{},["prevent"]);function fn(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function Es(){var e=document.documentElement.style,t=fn(e,"--window-top");return t?t+un.top:0}function Z_(){var e=document.documentElement.style,t=Es(),r=fn(e,"--window-bottom"),i=fn(e,"--window-left"),a=fn(e,"--window-right");return{top:t,bottom:r?r+un.bottom:0,left:i?i+un.left:0,right:a?a+un.right:0}}function K_(e){var t=document.documentElement.style;Object.keys(e).forEach(r=>{t.setProperty(r,e[r])})}function cn(e){return Symbol(e)}function vc(e){return e=e+"",e.indexOf("rpx")!==-1||e.indexOf("upx")!==-1}function _r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t)return G_(e);if(typeof e=="string"){var r=parseInt(e)||0;return vc(e)?uni.upx2px(r):r}return e}function G_(e){return vc(e)?e.replace(/(\d+(\.\d+)?)[ru]px/g,(t,r)=>uni.upx2px(parseFloat(r))+"px"):e}var J_="M20.928 10.176l-4.928 4.928-4.928-4.928-0.896 0.896 4.928 4.928-4.928 4.928 0.896 0.896 4.928-4.928 4.928 4.928 0.896-0.896-4.928-4.928 4.928-4.928-0.896-0.896zM16 2.080q-3.776 0-7.040 1.888-3.136 1.856-4.992 4.992-1.888 3.264-1.888 7.040t1.888 7.040q1.856 3.136 4.992 4.992 3.264 1.888 7.040 1.888t7.040-1.888q3.136-1.856 4.992-4.992 1.888-3.264 1.888-7.040t-1.888-7.040q-1.856-3.136-4.992-4.992-3.264-1.888-7.040-1.888zM16 28.64q-3.424 0-6.4-1.728-2.848-1.664-4.512-4.512-1.728-2.976-1.728-6.4t1.728-6.4q1.664-2.848 4.512-4.512 2.976-1.728 6.4-1.728t6.4 1.728q2.848 1.664 4.512 4.512 1.728 2.976 1.728 6.4t-1.728 6.4q-1.664 2.848-4.512 4.512-2.976 1.728-6.4 1.728z",Q_="M16 0q-4.352 0-8.064 2.176-3.616 2.144-5.76 5.76-2.176 3.712-2.176 8.064t2.176 8.064q2.144 3.616 5.76 5.76 3.712 2.176 8.064 2.176t8.064-2.176q3.616-2.144 5.76-5.76 2.176-3.712 2.176-8.064t-2.176-8.064q-2.144-3.616-5.76-5.76-3.712-2.176-8.064-2.176zM22.688 21.408q0.32 0.32 0.304 0.752t-0.336 0.736-0.752 0.304-0.752-0.32l-5.184-5.376-5.376 5.184q-0.32 0.32-0.752 0.304t-0.736-0.336-0.304-0.752 0.32-0.752l5.376-5.184-5.184-5.376q-0.32-0.32-0.304-0.752t0.336-0.752 0.752-0.304 0.752 0.336l5.184 5.376 5.376-5.184q0.32-0.32 0.752-0.304t0.752 0.336 0.304 0.752-0.336 0.752l-5.376 5.184 5.184 5.376z",eb="M15.808 1.696q-3.776 0-7.072 1.984-3.2 1.888-5.088 5.152-1.952 3.392-1.952 7.36 0 3.776 1.952 7.072 1.888 3.2 5.088 5.088 3.296 1.952 7.072 1.952 3.968 0 7.36-1.952 3.264-1.888 5.152-5.088 1.984-3.296 1.984-7.072 0-4-1.984-7.36-1.888-3.264-5.152-5.152-3.36-1.984-7.36-1.984zM20.864 18.592l-3.776 4.928q-0.448 0.576-1.088 0.576t-1.088-0.576l-3.776-4.928q-0.448-0.576-0.24-0.992t0.944-0.416h2.976v-8.928q0-0.256 0.176-0.432t0.4-0.176h1.216q0.224 0 0.4 0.176t0.176 0.432v8.928h2.976q0.736 0 0.944 0.416t-0.24 0.992z",tb="M15.808 0.128q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.176 3.776-2.176 8.16 0 4.224 2.176 7.872 2.080 3.552 5.632 5.632 3.648 2.176 7.872 2.176 4.384 0 8.16-2.176 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.416-2.176-8.16-2.112-3.616-5.728-5.728-3.744-2.176-8.16-2.176zM16.864 23.776q0 0.064-0.064 0.064h-1.568q-0.096 0-0.096-0.064l-0.256-11.328q0-0.064 0.064-0.064h2.112q0.096 0 0.064 0.064l-0.256 11.328zM16 10.88q-0.576 0-0.976-0.4t-0.4-0.96 0.4-0.96 0.976-0.4 0.976 0.4 0.4 0.96-0.4 0.96-0.976 0.4z",rb="M20.928 22.688q-1.696 1.376-3.744 2.112-2.112 0.768-4.384 0.768-3.488 0-6.464-1.728-2.88-1.696-4.576-4.608-1.76-2.976-1.76-6.464t1.76-6.464q1.696-2.88 4.576-4.576 2.976-1.76 6.464-1.76t6.464 1.76q2.912 1.696 4.608 4.576 1.728 2.976 1.728 6.464 0 2.272-0.768 4.384-0.736 2.048-2.112 3.744l9.312 9.28-1.824 1.824-9.28-9.312zM12.8 23.008q2.784 0 5.184-1.376 2.304-1.376 3.68-3.68 1.376-2.4 1.376-5.184t-1.376-5.152q-1.376-2.336-3.68-3.68-2.4-1.408-5.184-1.408t-5.152 1.408q-2.336 1.344-3.68 3.68-1.408 2.368-1.408 5.152t1.408 5.184q1.344 2.304 3.68 3.68 2.368 1.376 5.152 1.376zM12.8 23.008v0z",vn="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",ib="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM24.832 11.328l-11.264 11.104q-0.032 0.032-0.112 0.032t-0.112-0.032l-5.216-5.376q-0.096-0.128 0-0.288l0.704-0.96q0.032-0.064 0.112-0.064t0.112 0.032l4.256 3.264q0.064 0.032 0.144 0.032t0.112-0.032l10.336-8.608q0.064-0.064 0.144-0.064t0.112 0.064l0.672 0.672q0.128 0.128 0 0.224z",ab="M15.84 0.096q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM23.008 21.92l-0.512 0.896q-0.096 0.128-0.224 0.064l-8-3.808q-0.096-0.064-0.16-0.128-0.128-0.096-0.128-0.288l0.512-12.096q0-0.064 0.048-0.112t0.112-0.048h1.376q0.064 0 0.112 0.048t0.048 0.112l0.448 10.848 6.304 4.256q0.064 0.064 0.080 0.128t-0.016 0.128z",nb="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z";function dn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#000",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:27;return I("svg",{width:r,height:r,viewBox:"0 0 32 32"},[I("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function hn(){return Gt()}function ob(){return window.__PAGE_INFO__}function Gt(){return window.__id__||(window.__id__=plus.webview.currentWebview().id),parseInt(window.__id__)}function sb(e){e.preventDefault()}var dc,hc=0;function lb(e){var{onPageScroll:t,onReachBottom:r,onReachBottomDistance:i}=e,a=!1,n=!1,o=!0,s=()=>{var{scrollHeight:l}=document.documentElement,f=window.innerHeight,d=window.scrollY,g=d>0&&l>f&&d+f+i>=l,h=Math.abs(l-hc)>i;return g&&(!n||h)?(hc=l,n=!0,!0):(!g&&n&&(n=!1),!1)},u=()=>{t&&t(window.pageYOffset);function l(){if(s())return r&&r(),o=!1,setTimeout(function(){o=!0},350),!0}r&&o&&(l()||(dc=setTimeout(l,300))),a=!1};return function(){clearTimeout(dc),a||requestAnimationFrame(u),a=!0}}function Ts(e,t){if(t.indexOf("/")===0)return t;if(t.indexOf("./")===0)return Ts(e,t.substr(2));for(var r=t.split("/"),i=r.length,a=0;a0?e.split("/"):[];return n.splice(n.length-a-1,a+1),Do(n.concat(r).join("/"))}class ub{constructor(t){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=t,this.$el=t.$el,this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(t){if(!(!this.$el||!t)){var r=gc(this.$el.querySelector(t));if(!!r)return Cs(r)}}selectAllComponents(t){if(!this.$el||!t)return[];for(var r=[],i=this.$el.querySelectorAll(t),a=0;a-1&&r.splice(i,1)}var a=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return a.indexOf(t)===-1&&(a.push(t),this.forceUpdate("class")),this}hasClass(t){return this.$el&&this.$el.classList.contains(t)}getDataset(){return this.$el&&this.$el.dataset}callMethod(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.$vm[t];se(i)?i(JSON.parse(JSON.stringify(r))):this.$vm.ownerId&&UniViewJSBridge.publishHandler(Lp,{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:t,args:r})}requestAnimationFrame(t){return window.requestAnimationFrame(t)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$vm.$emit(t,r),this}getComputedStyle(t){if(this.$el){var r=window.getComputedStyle(this.$el);return t&&t.length?t.reduce((i,a)=>(i[a]=r[a],i),{}):r}return{}}setTimeout(t,r){return window.setTimeout(t,r)}clearTimeout(t){return window.clearTimeout(t)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function Cs(e){if(e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new ub(e)),e.$el.__wxsComponentDescriptor}function Di(e,t){return Cs(e)}function gc(e){if(!!e)return qr(e)}function qr(e){return e.__wxsVm||(e.__wxsVm={ownerId:e.__ownerId,$el:e,$emit(){},$forceUpdate(){var{__wxsStyle:t,__wxsAddClass:r,__wxsRemoveClass:i,__wxsStyleChanged:a,__wxsClassChanged:n}=e,o,s;a&&(e.__wxsStyleChanged=!1,t&&(s=()=>{Object.keys(t).forEach(u=>{e.style[u]=t[u]})})),n&&(e.__wxsClassChanged=!1,o=()=>{i&&i.forEach(u=>{e.classList.remove(u)}),r&&r.forEach(u=>{e.classList.add(u)})}),requestAnimationFrame(()=>{o&&o(),s&&s()})}})}var fb=e=>e.type==="click";function pc(e,t,r){var{currentTarget:i}=e;if(!(e instanceof Event)||!(i instanceof HTMLElement))return[e];var a=i.tagName.indexOf("UNI-")!==0,n=mc(e,a);if(fb(e))vb(n,e);else if(e instanceof TouchEvent){var o=Es();n.touches=_c(e.touches,o),n.changedTouches=_c(e.changedTouches,o)}return[n]}function cb(e){for(;e&&e.tagName.indexOf("UNI-")!==0;)e=e.parentElement;return e}function mc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,{type:r,timeStamp:i,target:a,currentTarget:n}=e,o={type:r,timeStamp:i,target:Mo(t?a:cb(a)),detail:{},currentTarget:Mo(n)};return e._stopped&&(o._stopped=!0),e.type.startsWith("touch")&&(o.touches=e.touches,o.changedTouches=e.changedTouches),o}function vb(e,t){var{x:r,y:i}=t,a=Es();e.detail={x:r,y:i-a},e.touches=e.changedTouches=[db(t,a)]}function db(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function _c(e,t){for(var r=[],i=0;i1&&arguments[1]!==void 0?arguments[1]:{},r=Gt()+"";plus.webview.postMessageToUniNView({type:"subscribeHandler",args:{type:e,data:t,pageId:r}},hb)}function xb(e,t){var r=e[0];if(!(!t||!mt(t.formatArgs)&&mt(r)))for(var i=t.formatArgs,a=Object.keys(i),n=0;nplus.io.convertLocalFileSystemURL(e).replace(/^\/?apps\//,"/android_asset/apps/").replace(/\/$/,""));function Tb(e){return e.indexOf("_www")===0||e.indexOf("_doc")===0||e.indexOf("_documents")===0||e.indexOf("_downloads")===0}var Cb=0;function Ob(e,t,r){var i="".concat(Date.now()).concat(Cb++),a=new plus.nativeObj.Bitmap("bitmap".concat(i));a.loadBase64Data(e,function(){var o=e.match(/data:image\/(\S+?);/)||[null,"png"],s;o[1]&&(s=o[1].replace("jpeg","jpg"));var u="".concat(t,"/").concat(i,".").concat(s);a.save(u,{overwrite:!0,quality:100,format:s},function(){n(),r(null,u)},function(l){n(),r(l)})},function(o){n(),r(o)});function n(){a.clear()}}var Bt={};(function(e){var t=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function r(n,o){return Object.prototype.hasOwnProperty.call(n,o)}e.assign=function(n){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var s=o.shift();if(!!s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var u in s)r(s,u)&&(n[u]=s[u])}}return n},e.shrinkBuf=function(n,o){return n.length===o?n:n.subarray?n.subarray(0,o):(n.length=o,n)};var i={arraySet:function(n,o,s,u,l){if(o.subarray&&n.subarray){n.set(o.subarray(s,s+u),l);return}for(var f=0;f=0;)e[t]=0}var Mb=0,Cc=1,Rb=2,Lb=3,Pb=258,Os=29,$i=256,Fi=$i+1+Os,Kr=30,As=19,Oc=2*Fi+1,br=15,Is=16,Nb=7,ks=256,Ac=16,Ic=17,kc=18,Ms=[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],gn=[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],Db=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Mc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bb=512,$t=new Array((Fi+2)*2);Zr($t);var zi=new Array(Kr*2);Zr(zi);var Ui=new Array(Bb);Zr(Ui);var Hi=new Array(Pb-Lb+1);Zr(Hi);var Rs=new Array(Os);Zr(Rs);var pn=new Array(Kr);Zr(pn);function Ls(e,t,r,i,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=a,this.has_stree=e&&e.length}var Rc,Lc,Pc;function Ps(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Nc(e){return e<256?Ui[e]:Ui[256+(e>>>7)]}function Wi(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Ze(e,t,r){e.bi_valid>Is-r?(e.bi_buf|=t<>Is-e.bi_valid,e.bi_valid+=r-Is):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function $b(e){e.bi_valid===16?(Wi(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Fb(e,t){var r=t.dyn_tree,i=t.max_code,a=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,f,d,g,h,w,_=0;for(g=0;g<=br;g++)e.bl_count[g]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lu&&(g=u,_++),r[f*2+1]=g,!(f>i)&&(e.bl_count[g]++,h=0,f>=s&&(h=o[f-s]),w=r[f*2],e.opt_len+=w*(g+h),n&&(e.static_len+=w*(a[f*2+1]+h)));if(_!==0){do{for(g=u-1;e.bl_count[g]===0;)g--;e.bl_count[g]--,e.bl_count[g+1]+=2,e.bl_count[u]--,_-=2}while(_>0);for(g=u;g!==0;g--)for(f=e.bl_count[g];f!==0;)d=e.heap[--l],!(d>i)&&(r[d*2+1]!==g&&(e.opt_len+=(g-r[d*2+1])*r[d*2],r[d*2+1]=g),f--)}}function Bc(e,t,r){var i=new Array(br+1),a=0,n,o;for(n=1;n<=br;n++)i[n]=a=a+r[n-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=Dc(i[s]++,s))}}function zb(){var e,t,r,i,a,n=new Array(br+1);for(r=0,i=0;i>=7;i8?Wi(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ub(e,t,r,i){Fc(e),i&&(Wi(e,r),Wi(e,~r)),Ab.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function zc(e,t,r,i){var a=t*2,n=r*2;return e[a]>1;o>=1;o--)Ns(e,r,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ns(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,Ns(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Fb(e,t),Bc(r,u,e.bl_count)}function Hc(e,t,r){var i,a=-1,n,o=t[0*2+1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)n=o,o=t[(i+1)*2+1],!(++s=3&&e.bl_tree[Mc[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Wb(e,t,r,i){var a;for(Ze(e,t-257,5),Ze(e,r-1,5),Ze(e,i-4,4),a=0;a>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Ec;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Tc;for(r=32;r<$i;r++)if(e.dyn_ltree[r*2]!==0)return Tc;return Ec}var Vc=!1;function jb(e){Vc||(zb(),Vc=!0),e.l_desc=new Ps(e.dyn_ltree,Rc),e.d_desc=new Ps(e.dyn_dtree,Lc),e.bl_desc=new Ps(e.bl_tree,Pc),e.bi_buf=0,e.bi_valid=0,$c(e)}function jc(e,t,r,i){Ze(e,(Mb<<1)+(i?1:0),3),Ub(e,t,r,!0)}function Yb(e){Ze(e,Cc<<1,3),Tt(e,ks,$t),$b(e)}function qb(e,t,r,i){var a,n,o=0;e.level>0?(e.strm.data_type===kb&&(e.strm.data_type=Vb(e)),Ds(e,e.l_desc),Ds(e,e.d_desc),o=Hb(e),a=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=a&&(a=n)):a=n=r+5,r+4<=a&&t!==-1?jc(e,t,r,i):e.strategy===Ib||n===a?(Ze(e,(Cc<<1)+(i?1:0),3),Uc(e,$t,zi)):(Ze(e,(Rb<<1)+(i?1:0),3),Wb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Uc(e,e.dyn_ltree,e.dyn_dtree)),$c(e),i&&Fc(e)}function Xb(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Hi[r]+$i+1)*2]++,e.dyn_dtree[Nc(t)*2]++),e.last_lit===e.lit_bufsize-1}Xr._tr_init=jb,Xr._tr_stored_block=jc,Xr._tr_flush_block=qb,Xr._tr_tally=Xb,Xr._tr_align=Yb;function Zb(e,t,r,i){for(var a=e&65535|0,n=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do a=a+t[i++]|0,n=n+a|0;while(--o);a%=65521,n%=65521}return a|n<<16|0}var Yc=Zb;function Kb(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var Gb=Kb();function Jb(e,t,r,i){var a=Gb,n=i+r;e^=-1;for(var o=i;o>>8^a[(e^t[o])&255];return e^-1}var qc=Jb,Bs={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"},qe=Bt,st=Xr,Xc=Yc,Jt=qc,Qb=Bs,wr=0,ew=1,tw=3,Qt=4,Zc=5,Ct=0,Kc=1,lt=-2,rw=-3,$s=-5,iw=-1,aw=1,mn=2,nw=3,ow=4,sw=0,lw=2,_n=8,uw=9,fw=15,cw=8,vw=29,dw=256,Fs=dw+1+vw,hw=30,gw=19,pw=2*Fs+1,mw=15,ve=3,er=258,dt=er+ve+1,_w=32,bn=42,zs=69,wn=73,xn=91,yn=103,xr=113,Vi=666,Le=1,ji=2,yr=3,Gr=4,bw=3;function tr(e,t){return e.msg=Qb[t],t}function Gc(e){return(e<<1)-(e>4?9:0)}function rr(e){for(var t=e.length;--t>=0;)e[t]=0}function ir(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(qe.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function He(e,t){st._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ir(e.strm)}function pe(e,t){e.pending_buf[e.pending++]=t}function Yi(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function ww(e,t,r,i){var a=e.avail_in;return a>i&&(a=i),a===0?0:(e.avail_in-=a,qe.arraySet(t,e.input,e.next_in,a,r),e.state.wrap===1?e.adler=Xc(e.adler,t,a,r):e.state.wrap===2&&(e.adler=Jt(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function Jc(e,t){var r=e.max_chain_length,i=e.strstart,a,n,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-dt?e.strstart-(e.w_size-dt):0,l=e.window,f=e.w_mask,d=e.prev,g=e.strstart+er,h=l[i+o-1],w=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(a=t,!(l[a+o]!==w||l[a+o-1]!==h||l[a]!==l[i]||l[++a]!==l[i+1])){i+=2,a++;do;while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&io){if(e.match_start=t,o=n,n>=s)break;h=l[i+o-1],w=l[i+o]}}while((t=d[t&f])>u&&--r!=0);return o<=e.lookahead?o:e.lookahead}function Sr(e){var t=e.w_size,r,i,a,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-dt)){qe.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do a=e.head[--r],e.head[r]=a>=t?a-t:0;while(--i);i=t,r=i;do a=e.prev[--r],e.prev[r]=a>=t?a-t:0;while(--i);n+=t}if(e.strm.avail_in===0)break;if(i=ww(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=ve)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Sr(e),e.lookahead===0&&t===wr)return Le;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,He(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-dt&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):(e.strstart>e.block_start&&(He(e,!1),e.strm.avail_out===0),Le)}function Us(e,t){for(var r,i;;){if(e.lookahead=ve&&(e.ins_h=(e.ins_h<=ve)if(i=st._tr_tally(e,e.strstart-e.match_start,e.match_length-ve),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ve){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ve&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ve-1)),e.prev_length>=ve&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-ve,i=st._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ve),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<=ve&&e.strstart>0&&(a=e.strstart-1,i=o[a],i===o[++a]&&i===o[++a]&&i===o[++a])){n=e.strstart+er;do;while(i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&i===o[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ve?(r=st._tr_tally(e,1,e.match_length-ve),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=st._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):e.last_lit&&(He(e,!1),e.strm.avail_out===0)?Le:ji}function Sw(e,t){for(var r;;){if(e.lookahead===0&&(Sr(e),e.lookahead===0)){if(t===wr)return Le;break}if(e.match_length=0,r=st._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(He(e,!1),e.strm.avail_out===0))return Le}return e.insert=0,t===Qt?(He(e,!0),e.strm.avail_out===0?yr:Gr):e.last_lit&&(He(e,!1),e.strm.avail_out===0)?Le:ji}function Ot(e,t,r,i,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=a}var Qr;Qr=[new Ot(0,0,0,0,xw),new Ot(4,4,8,4,Us),new Ot(4,5,16,8,Us),new Ot(4,6,32,32,Us),new Ot(4,4,16,16,Jr),new Ot(8,16,32,32,Jr),new Ot(8,16,128,128,Jr),new Ot(8,32,128,256,Jr),new Ot(32,128,258,1024,Jr),new Ot(32,258,258,4096,Jr)];function Ew(e){e.window_size=2*e.w_size,rr(e.head),e.max_lazy_match=Qr[e.level].max_lazy,e.good_match=Qr[e.level].good_length,e.nice_match=Qr[e.level].nice_length,e.max_chain_length=Qr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ve-1,e.match_available=0,e.ins_h=0}function Tw(){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=_n,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 qe.Buf16(pw*2),this.dyn_dtree=new qe.Buf16((2*hw+1)*2),this.bl_tree=new qe.Buf16((2*gw+1)*2),rr(this.dyn_ltree),rr(this.dyn_dtree),rr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new qe.Buf16(mw+1),this.heap=new qe.Buf16(2*Fs+1),rr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new qe.Buf16(2*Fs+1),rr(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 Qc(e){var t;return!e||!e.state?tr(e,lt):(e.total_in=e.total_out=0,e.data_type=lw,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?bn:xr,e.adler=t.wrap===2?0:1,t.last_flush=wr,st._tr_init(t),Ct)}function ev(e){var t=Qc(e);return t===Ct&&Ew(e.state),t}function Cw(e,t){return!e||!e.state||e.state.wrap!==2?lt:(e.state.gzhead=t,Ct)}function tv(e,t,r,i,a,n){if(!e)return lt;var o=1;if(t===iw&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),a<1||a>uw||r!==_n||i<8||i>15||t<0||t>9||n<0||n>ow)return tr(e,lt);i===8&&(i=9);var s=new Tw;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<Zc||t<0)return e?tr(e,lt):lt;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Vi&&t!==Qt)return tr(e,e.avail_out===0?$s:lt);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===bn)if(i.wrap===2)e.adler=0,pe(i,31),pe(i,139),pe(i,8),i.gzhead?(pe(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)),pe(i,i.gzhead.time&255),pe(i,i.gzhead.time>>8&255),pe(i,i.gzhead.time>>16&255),pe(i,i.gzhead.time>>24&255),pe(i,i.level===9?2:i.strategy>=mn||i.level<2?4:0),pe(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(pe(i,i.gzhead.extra.length&255),pe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Jt(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=zs):(pe(i,0),pe(i,0),pe(i,0),pe(i,0),pe(i,0),pe(i,i.level===9?2:i.strategy>=mn||i.level<2?4:0),pe(i,bw),i.status=xr);else{var o=_n+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=mn||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=_w),o+=31-o%31,i.status=xr,Yi(i,o),i.strstart!==0&&(Yi(i,e.adler>>>16),Yi(i,e.adler&65535)),e.adler=1}if(i.status===zs)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size));)pe(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=wn)}else i.status=wn;if(i.status===wn)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexa&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),n===0&&(i.gzindex=0,i.status=xn)}else i.status=xn;if(i.status===xn)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),ir(e),a=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindexa&&(e.adler=Jt(e.adler,i.pending_buf,i.pending-a,a)),n===0&&(i.status=yn)}else i.status=yn;if(i.status===yn&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ir(e),i.pending+2<=i.pending_buf_size&&(pe(i,e.adler&255),pe(i,e.adler>>8&255),e.adler=0,i.status=xr)):i.status=xr),i.pending!==0){if(ir(e),e.avail_out===0)return i.last_flush=-1,Ct}else if(e.avail_in===0&&Gc(t)<=Gc(r)&&t!==Qt)return tr(e,$s);if(i.status===Vi&&e.avail_in!==0)return tr(e,$s);if(e.avail_in!==0||i.lookahead!==0||t!==wr&&i.status!==Vi){var u=i.strategy===mn?Sw(i,t):i.strategy===nw?yw(i,t):Qr[i.level].func(i,t);if((u===yr||u===Gr)&&(i.status=Vi),u===Le||u===yr)return e.avail_out===0&&(i.last_flush=-1),Ct;if(u===ji&&(t===ew?st._tr_align(i):t!==Zc&&(st._tr_stored_block(i,0,0,!1),t===tw&&(rr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),ir(e),e.avail_out===0))return i.last_flush=-1,Ct}return t!==Qt?Ct:i.wrap<=0?Kc:(i.wrap===2?(pe(i,e.adler&255),pe(i,e.adler>>8&255),pe(i,e.adler>>16&255),pe(i,e.adler>>24&255),pe(i,e.total_in&255),pe(i,e.total_in>>8&255),pe(i,e.total_in>>16&255),pe(i,e.total_in>>24&255)):(Yi(i,e.adler>>>16),Yi(i,e.adler&65535)),ir(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Ct:Kc)}function Iw(e){var t;return!e||!e.state?lt:(t=e.state.status,t!==bn&&t!==zs&&t!==wn&&t!==xn&&t!==yn&&t!==xr&&t!==Vi?tr(e,lt):(e.state=null,t===xr?tr(e,rw):Ct))}function kw(e,t){var r=t.length,i,a,n,o,s,u,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==bn||i.lookahead))return lt;for(o===1&&(e.adler=Xc(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(rr(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new qe.Buf8(i.w_size),qe.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,Sr(i);i.lookahead>=ve;){a=i.strstart,n=i.lookahead-(ve-1);do i.ins_h=(i.ins_h<=252?6:ar>=248?5:ar>=240?4:ar>=224?3:ar>=192?2:1;qi[254]=qi[254]=1,Er.string2buf=function(e){var t,r,i,a,n,o=e.length,s=0;for(a=0;a>>6,t[n++]=128|r&63):r<65536?(t[n++]=224|r>>>12,t[n++]=128|r>>>6&63,t[n++]=128|r&63):(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63,t[n++]=128|r>>>6&63,t[n++]=128|r&63);return t};function av(e,t){if(t<65534&&(e.subarray&&iv||!e.subarray&&rv))return String.fromCharCode.apply(null,Sn.shrinkBuf(e,t));for(var r="",i=0;i4){s[i++]=65533,r+=n-1;continue}for(a&=n===2?31:n===3?15:7;n>1&&r1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return av(s,i)},Er.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)==128;)r--;return r<0||r===0?t:r+qi[e[r]]>t?r:t};function Mw(){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}var nv=Mw,Xi=Et,Zi=Bt,Hs=Er,Ws=Bs,Rw=nv,ov=Object.prototype.toString,Lw=0,Vs=4,ei=0,sv=1,lv=2,Pw=-1,Nw=0,Dw=8;function Tr(e){if(!(this instanceof Tr))return new Tr(e);this.options=Zi.assign({level:Pw,method:Dw,chunkSize:16384,windowBits:15,memLevel:8,strategy:Nw,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Rw,this.strm.avail_out=0;var r=Xi.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ei)throw new Error(Ws[r]);if(t.header&&Xi.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Hs.string2buf(t.dictionary):ov.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=Xi.deflateSetDictionary(this.strm,i),r!==ei)throw new Error(Ws[r]);this._dict_set=!0}}Tr.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,a,n;if(this.ended)return!1;n=t===~~t?t:t===!0?Vs:Lw,typeof e=="string"?r.input=Hs.string2buf(e):ov.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Zi.Buf8(i),r.next_out=0,r.avail_out=i),a=Xi.deflate(r,n),a!==sv&&a!==ei)return this.onEnd(a),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(n===Vs||n===lv))&&(this.options.to==="string"?this.onData(Hs.buf2binstring(Zi.shrinkBuf(r.output,r.next_out))):this.onData(Zi.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&a!==sv);return n===Vs?(a=Xi.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ei):(n===lv&&(this.onEnd(ei),r.avail_out=0),!0)},Tr.prototype.onData=function(e){this.chunks.push(e)},Tr.prototype.onEnd=function(e){e===ei&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zi.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function js(e,t){var r=new Tr(t);if(r.push(e,!0),r.err)throw r.msg||Ws[r.err];return r.result}function Bw(e,t){return t=t||{},t.raw=!0,js(e,t)}function $w(e,t){return t=t||{},t.gzip=!0,js(e,t)}Bi.Deflate=Tr,Bi.deflate=js,Bi.deflateRaw=Bw,Bi.gzip=$w;var Ki={},ht={},En=30,Fw=12,zw=function(t,r){var i,a,n,o,s,u,l,f,d,g,h,w,_,x,m,b,c,v,p,y,E,C,O,P,M;i=t.state,a=t.next_in,P=t.input,n=a+(t.avail_in-5),o=t.next_out,M=t.output,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,d=i.whave,g=i.wnext,h=i.window,w=i.hold,_=i.bits,x=i.lencode,m=i.distcode,b=(1<>>24,w>>>=p,_-=p,p=v>>>16&255,p===0)M[o++]=v&65535;else if(p&16){y=v&65535,p&=15,p&&(_>>=p,_-=p),_<15&&(w+=P[a++]<<_,_+=8,w+=P[a++]<<_,_+=8),v=m[w&c];r:for(;;){if(p=v>>>24,w>>>=p,_-=p,p=v>>>16&255,p&16){if(E=v&65535,p&=15,_l){t.msg="invalid distance too far back",i.mode=En;break e}if(w>>>=p,_-=p,p=o-s,E>p){if(p=E-p,p>d&&i.sane){t.msg="invalid distance too far back",i.mode=En;break e}if(C=0,O=h,g===0){if(C+=f-p,p2;)M[o++]=O[C++],M[o++]=O[C++],M[o++]=O[C++],y-=3;y&&(M[o++]=O[C++],y>1&&(M[o++]=O[C++]))}else{C=o-E;do M[o++]=M[C++],M[o++]=M[C++],M[o++]=M[C++],y-=3;while(y>2);y&&(M[o++]=M[C++],y>1&&(M[o++]=M[C++]))}}else if((p&64)==0){v=m[(v&65535)+(w&(1<>3,a-=y,_-=y<<3,w&=(1<<_)-1,t.next_in=a,t.next_out=o,t.avail_in=a=1&&H[h]===0;h--);if(w>h&&(w=h),h===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,u.bits=1,0;for(g=1;g0&&(t===vv||h!==1))return-1;for(re[1]=0,f=1;ffv||t===dv&&b>cv)return 1;for(;;){X=f-x,s[d]M?(Q=R[B+s[d]],V=O[P+s[d]]):(Q=32+64,V=0),v=1<>x)+p]=X<<24|Q<<16|V|0;while(p!==0);for(v=1<>=1;if(v!==0?(c&=v-1,c+=v):c=0,d++,--H[f]==0){if(f===h)break;f=r[i+s[d]]}if(f>w&&(c&E)!==y){for(x===0&&(x=w),C+=g,_=f-x,m=1<<_;_+xfv||t===dv&&b>cv)return 1;y=c&E,n[y]=w<<24|_<<16|C-o|0}}return c!==0&&(n[C+c]=f-x<<24|64<<16|0),u.bits=w,0},rt=Bt,qs=Yc,At=qc,Yw=zw,Gi=jw,qw=0,hv=1,gv=2,pv=4,Xw=5,Tn=6,Cr=0,Zw=1,Kw=2,ut=-2,mv=-3,_v=-4,Gw=-5,bv=8,wv=1,xv=2,yv=3,Sv=4,Ev=5,Tv=6,Cv=7,Ov=8,Av=9,Iv=10,Cn=11,Ft=12,Xs=13,kv=14,Zs=15,Mv=16,Rv=17,Lv=18,Pv=19,On=20,An=21,Nv=22,Dv=23,Bv=24,$v=25,Fv=26,Ks=27,zv=28,Uv=29,Ce=30,Hv=31,Jw=32,Qw=852,e1=592,t1=15,r1=t1;function Wv(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function i1(){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 rt.Buf16(320),this.work=new rt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Vv(e){var t;return!e||!e.state?ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=wv,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new rt.Buf32(Qw),t.distcode=t.distdyn=new rt.Buf32(e1),t.sane=1,t.back=-1,Cr)}function jv(e){var t;return!e||!e.state?ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Vv(e))}function Yv(e,t){var r,i;return!e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ut:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,jv(e))}function qv(e,t){var r,i;return e?(i=new i1,e.state=i,i.window=null,r=Yv(e,t),r!==Cr&&(e.state=null),r):ut}function a1(e){return qv(e,r1)}var Xv=!0,Gs,Js;function n1(e){if(Xv){var t;for(Gs=new rt.Buf32(512),Js=new rt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Gi(hv,e.lens,0,288,Gs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Gi(gv,e.lens,0,32,Js,0,e.work,{bits:5}),Xv=!1}e.lencode=Gs,e.lenbits=9,e.distcode=Js,e.distbits=5}function Zv(e,t,r,i){var a,n=e.state;return n.window===null&&(n.wsize=1<=n.wsize?(rt.arraySet(n.window,t,r-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(a=n.wsize-n.wnext,a>i&&(a=i),rt.arraySet(n.window,t,r-i,a,n.wnext),i-=a,i?(rt.arraySet(n.window,t,r-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=a,n.wnext===n.wsize&&(n.wnext=0),n.whave>>8&255,r.check=At(r.check,O,2,0),l=0,f=0,r.mode=xv;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=Ce;break}if((l&15)!==bv){e.msg="unknown compression method",r.mode=Ce;break}if(l>>>=4,f-=4,E=(l&15)+8,r.wbits===0)r.wbits=E;else if(E>r.wbits){e.msg="invalid window size",r.mode=Ce;break}r.dmax=1<>8&1),r.flags&512&&(O[0]=l&255,O[1]=l>>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0,r.mode=yv;case yv:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<>>8&255,O[2]=l>>>16&255,O[3]=l>>>24&255,r.check=At(r.check,O,4,0)),l=0,f=0,r.mode=Sv;case Sv:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<>8),r.flags&512&&(O[0]=l&255,O[1]=l>>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0,r.mode=Ev;case Ev:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<>>8&255,r.check=At(r.check,O,2,0)),l=0,f=0}else r.head&&(r.head.extra=null);r.mode=Tv;case Tv:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),rt.arraySet(r.head.extra,i,n,h,E)),r.flags&512&&(r.check=At(r.check,i,h,n)),s-=h,n+=h,r.length-=h),r.length))break e;r.length=0,r.mode=Cv;case Cv:if(r.flags&2048){if(s===0)break e;h=0;do E=i[n+h++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E));while(E&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Ft;break;case Iv:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<>>=f&7,f-=f&7,r.mode=Ks;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<>>=1,f-=1,l&3){case 0:r.mode=kv;break;case 1:if(n1(r),r.mode=On,t===Tn){l>>>=2,f-=2;break e}break;case 2:r.mode=Rv;break;case 3:e.msg="invalid block type",r.mode=Ce}l>>>=2,f-=2;break;case kv:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Ce;break}if(r.length=l&65535,l=0,f=0,r.mode=Zs,t===Tn)break e;case Zs:r.mode=Mv;case Mv:if(h=r.length,h){if(h>s&&(h=s),h>u&&(h=u),h===0)break e;rt.arraySet(a,i,n,h,o),s-=h,n+=h,u-=h,o+=h,r.length-=h;break}r.mode=Ft;break;case Rv:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<>>=5,f-=5,r.ndist=(l&31)+1,l>>>=5,f-=5,r.ncode=(l&15)+4,l>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Ce;break}r.have=0,r.mode=Lv;case Lv:for(;r.have>>=3,f-=3}for(;r.have<19;)r.lens[H[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},C=Gi(qw,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,C){e.msg="invalid code lengths set",r.mode=Ce;break}r.have=0,r.mode=Pv;case Pv:for(;r.have>>24,b=x>>>16&255,c=x&65535,!(m<=f);){if(s===0)break e;s--,l+=i[n++]<>>=m,f-=m,r.lens[r.have++]=c;else{if(c===16){for(M=m+2;f>>=m,f-=m,r.have===0){e.msg="invalid bit length repeat",r.mode=Ce;break}E=r.lens[r.have-1],h=3+(l&3),l>>>=2,f-=2}else if(c===17){for(M=m+3;f>>=m,f-=m,E=0,h=3+(l&7),l>>>=3,f-=3}else{for(M=m+7;f>>=m,f-=m,E=0,h=11+(l&127),l>>>=7,f-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Ce;break}for(;h--;)r.lens[r.have++]=E}}if(r.mode===Ce)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Ce;break}if(r.lenbits=9,P={bits:r.lenbits},C=Gi(hv,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,C){e.msg="invalid literal/lengths set",r.mode=Ce;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},C=Gi(gv,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,C){e.msg="invalid distances set",r.mode=Ce;break}if(r.mode=On,t===Tn)break e;case On:r.mode=An;case An:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=n,e.avail_in=s,r.hold=l,r.bits=f,Yw(e,g),o=e.next_out,a=e.output,u=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,r.mode===Ft&&(r.back=-1);break}for(r.back=0;x=r.lencode[l&(1<>>24,b=x>>>16&255,c=x&65535,!(m<=f);){if(s===0)break e;s--,l+=i[n++]<>v)],m=x>>>24,b=x>>>16&255,c=x&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[n++]<>>=v,f-=v,r.back+=v}if(l>>>=m,f-=m,r.back+=m,r.length=c,b===0){r.mode=Fv;break}if(b&32){r.back=-1,r.mode=Ft;break}if(b&64){e.msg="invalid literal/length code",r.mode=Ce;break}r.extra=b&15,r.mode=Nv;case Nv:if(r.extra){for(M=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Dv;case Dv:for(;x=r.distcode[l&(1<>>24,b=x>>>16&255,c=x&65535,!(m<=f);){if(s===0)break e;s--,l+=i[n++]<>v)],m=x>>>24,b=x>>>16&255,c=x&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[n++]<>>=v,f-=v,r.back+=v}if(l>>>=m,f-=m,r.back+=m,b&64){e.msg="invalid distance code",r.mode=Ce;break}r.offset=c,r.extra=b&15,r.mode=Bv;case Bv:if(r.extra){for(M=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Ce;break}r.mode=$v;case $v:if(u===0)break e;if(h=g-u,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Ce;break}h>r.wnext?(h-=r.wnext,w=r.wsize-h):w=r.wnext-h,h>r.length&&(h=r.length),_=r.window}else _=a,w=o-r.offset,h=r.length;h>u&&(h=u),u-=h,r.length-=h;do a[o++]=_[w++];while(--h);r.length===0&&(r.mode=An);break;case Fv:if(u===0)break e;a[o++]=r.length,u--,r.mode=An;break;case Ks:if(r.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)==0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v1,this.strm.avail_out=0;var r=ri.inflateInit2(this.strm,t.windowBits);if(r!==Me.Z_OK)throw new Error(Qs[r]);if(this.header=new d1,ri.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=In.string2buf(t.dictionary):Gv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ri.inflateSetDictionary(this.strm,t.dictionary),r!==Me.Z_OK)))throw new Error(Qs[r])}Or.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,a=this.options.dictionary,n,o,s,u,l,f=!1;if(this.ended)return!1;o=t===~~t?t:t===!0?Me.Z_FINISH:Me.Z_NO_FLUSH,typeof e=="string"?r.input=In.binstring2buf(e):Gv.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ji.Buf8(i),r.next_out=0,r.avail_out=i),n=ri.inflate(r,Me.Z_NO_FLUSH),n===Me.Z_NEED_DICT&&a&&(n=ri.inflateSetDictionary(this.strm,a)),n===Me.Z_BUF_ERROR&&f===!0&&(n=Me.Z_OK,f=!1),n!==Me.Z_STREAM_END&&n!==Me.Z_OK)return this.onEnd(n),this.ended=!0,!1;r.next_out&&(r.avail_out===0||n===Me.Z_STREAM_END||r.avail_in===0&&(o===Me.Z_FINISH||o===Me.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=In.utf8border(r.output,r.next_out),u=r.next_out-s,l=In.buf2string(r.output,s),r.next_out=u,r.avail_out=i-u,u&&Ji.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(Ji.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=!0)}while((r.avail_in>0||r.avail_out===0)&&n!==Me.Z_STREAM_END);return n===Me.Z_STREAM_END&&(o=Me.Z_FINISH),o===Me.Z_FINISH?(n=ri.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Me.Z_OK):(o===Me.Z_SYNC_FLUSH&&(this.onEnd(Me.Z_OK),r.avail_out=0),!0)},Or.prototype.onData=function(e){this.chunks.push(e)},Or.prototype.onEnd=function(e){e===Me.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ji.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function el(e,t){var r=new Or(t);if(r.push(e,!0),r.err)throw r.msg||Qs[r.err];return r.result}function h1(e,t){return t=t||{},t.raw=!0,el(e,t)}Ki.Inflate=Or,Ki.inflate=el,Ki.inflateRaw=h1,Ki.ungzip=el;var g1=Bt.assign,p1=Bi,m1=Ki,_1=Kv,Jv={};g1(Jv,p1,m1,_1);var Qv=Jv;function b1(e){return Promise.resolve(e)}var w1="upx2px",x1=1e-4,y1=750,ed=!1,tl=0,td=0;function S1(){var{platform:e,pixelRatio:t,windowWidth:r}=yc();tl=r,td=t,ed=e==="ios"}function rd(e,t){var r=Number(e);return isNaN(r)?t:r}var id=Eb(w1,(e,t)=>{if(tl===0&&S1(),e=Number(e),e===0)return 0;var r=t||tl;{var i=__uniConfig.globalStyle||{},a=rd(i.rpxCalcMaxDeviceWidth,960),n=rd(i.rpxCalcBaseDeviceWidth,375);r=r<=a?r:n}var o=e/y1*r;return o<0&&(o=-o),o=Math.floor(o+x1),o===0&&(td===1||!ed?o=1:o=.5),e<0?-o:o}),E1=[{name:"id",type:String,required:!0}];E1.concat({name:"componentInstance",type:Object});var ad={};ad.f={}.propertyIsEnumerable;var T1=ci,C1=co,O1=_a,A1=ad.f,I1=function(e){return function(t){for(var r=O1(t),i=C1(r),a=i.length,n=0,o=[],s;a>n;)s=i[n++],(!T1||A1.call(r,s))&&o.push(e?[s,r[s]]:r[s]);return o}},nd=uo,k1=I1(!1);nd(nd.S,"Object",{values:function(t){return k1(t)}});var M1="setPageMeta",R1="loadFontFace",L1="pageScrollTo",P1=function(){if(typeof window!="object")return;if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}function e(c){try{return c.defaultView&&c.defaultView.frameElement||null}catch(v){return null}}var t=function(c){for(var v=c,p=e(v);p;)v=p.ownerDocument,p=e(v);return v}(window.document),r=[],i=null,a=null;function n(c){this.time=c.time,this.target=c.target,this.rootBounds=w(c.rootBounds),this.boundingClientRect=w(c.boundingClientRect),this.intersectionRect=w(c.intersectionRect||h()),this.isIntersecting=!!c.intersectionRect;var v=this.boundingClientRect,p=v.width*v.height,y=this.intersectionRect,E=y.width*y.height;p?this.intersectionRatio=Number((E/p).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function o(c,v){var p=v||{};if(typeof c!="function")throw new Error("callback must be a function");if(p.root&&p.root.nodeType!=1&&p.root.nodeType!=9)throw new Error("root must be a Document or Element");this._checkForIntersections=u(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=c,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(p.rootMargin),this.thresholds=this._initThresholds(p.threshold),this.root=p.root||null,this.rootMargin=this._rootMarginValues.map(function(y){return y.value+y.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return i||(i=function(c,v){!c||!v?a=h():a=_(c,v),r.forEach(function(p){p._checkForIntersections()})}),i},o._resetCrossOriginUpdater=function(){i=null,a=null},o.prototype.observe=function(c){var v=this._observationTargets.some(function(p){return p.element==c});if(!v){if(!(c&&c.nodeType==1))throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:c,entry:null}),this._monitorIntersections(c.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(c){this._observationTargets=this._observationTargets.filter(function(v){return v.element!=c}),this._unmonitorIntersections(c.ownerDocument),this._observationTargets.length==0&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var c=this._queuedEntries.slice();return this._queuedEntries=[],c},o.prototype._initThresholds=function(c){var v=c||[0];return Array.isArray(v)||(v=[v]),v.sort().filter(function(p,y,E){if(typeof p!="number"||isNaN(p)||p<0||p>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return p!==E[y-1]})},o.prototype._parseRootMargin=function(c){var v=c||"0px",p=v.split(/\s+/).map(function(y){var E=/^(-?\d*\.?\d+)(px|%)$/.exec(y);if(!E)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(E[1]),unit:E[2]}});return p[1]=p[1]||p[0],p[2]=p[2]||p[0],p[3]=p[3]||p[1],p},o.prototype._monitorIntersections=function(c){var v=c.defaultView;if(!!v&&this._monitoringDocuments.indexOf(c)==-1){var p=this._checkForIntersections,y=null,E=null;this.POLL_INTERVAL?y=v.setInterval(p,this.POLL_INTERVAL):(l(v,"resize",p,!0),l(c,"scroll",p,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in v&&(E=new v.MutationObserver(p),E.observe(c,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))),this._monitoringDocuments.push(c),this._monitoringUnsubscribes.push(function(){var P=c.defaultView;P&&(y&&P.clearInterval(y),f(P,"resize",p,!0)),f(c,"scroll",p,!0),E&&E.disconnect()});var C=this.root&&(this.root.ownerDocument||this.root)||t;if(c!=C){var O=e(c);O&&this._monitorIntersections(O.ownerDocument)}}},o.prototype._unmonitorIntersections=function(c){var v=this._monitoringDocuments.indexOf(c);if(v!=-1){var p=this.root&&(this.root.ownerDocument||this.root)||t,y=this._observationTargets.some(function(O){var P=O.element.ownerDocument;if(P==c)return!0;for(;P&&P!=p;){var M=e(P);if(P=M&&M.ownerDocument,P==c)return!0}return!1});if(!y){var E=this._monitoringUnsubscribes[v];if(this._monitoringDocuments.splice(v,1),this._monitoringUnsubscribes.splice(v,1),E(),c!=p){var C=e(c);C&&this._unmonitorIntersections(C.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var c=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var v=0;v=0&&P>=0&&{top:p,bottom:y,left:E,right:C,width:O,height:P}||null}function g(c){var v;try{v=c.getBoundingClientRect()}catch(p){}return v?(v.width&&v.height||(v={top:v.top,right:v.right,bottom:v.bottom,left:v.left,width:v.right-v.left,height:v.bottom-v.top}),v):h()}function h(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function w(c){return!c||"x"in c?c:{top:c.top,y:c.top,bottom:c.bottom,left:c.left,x:c.left,right:c.right,width:c.width,height:c.height}}function _(c,v){var p=v.top-c.top,y=v.left-c.left;return{top:p,left:y,height:v.height,width:v.width,bottom:p+v.height,right:y+v.width}}function x(c,v){for(var p=v;p;){if(p==c)return!0;p=m(p)}return!1}function m(c){var v=c.parentNode;return c.nodeType==9&&c!=t?e(c):(v&&v.assignedSlot&&(v=v.assignedSlot.parentNode),v&&v.nodeType==11&&v.host?v.host:v)}function b(c){return c&&c.nodeType===9}window.IntersectionObserver=o,window.IntersectionObserverEntry=n};function rl(e){var{bottom:t,height:r,left:i,right:a,top:n,width:o}=e||{};return{bottom:t,height:r,left:i,right:a,top:n,width:o}}function N1(e){var{intersectionRatio:t,boundingClientRect:{height:r,width:i},intersectionRect:{height:a,width:n}}=e;return t!==0?t:a===r?n/i:a/r}function D1(e,t,r){P1();var i=t.relativeToSelector?e.querySelector(t.relativeToSelector):null,a=new IntersectionObserver(u=>{u.forEach(l=>{r({intersectionRatio:N1(l),intersectionRect:rl(l.intersectionRect),boundingClientRect:rl(l.boundingClientRect),relativeRect:rl(l.rootBounds),time:Date.now(),dataset:ko(l.target),id:l.target.id})})},{root:i,rootMargin:t.rootMargin,threshold:t.thresholds});if(t.observeAll){a.USE_MUTATION_OBSERVER=!0;for(var n=e.querySelectorAll(t.selector),o=0;o{var i=450,a=44;clearTimeout(t),e&&Math.abs(r.pageX-e.pageX)<=a&&Math.abs(r.pageY-e.pageY)<=a&&r.timeStamp-e.timeStamp<=i&&r.preventDefault(),e=r,t=setTimeout(()=>{e=null},i)})}}function V1(e){if(!e.length)return r=>r;var t=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(typeof r=="number")return e[r];var a={};return r.forEach(n=>{var[o,s]=n;i?a[t(o)]=t(s):a[t(o)]=s}),a};return t}function j1(e,t){if(!!t)return t.a&&(t.a=e(t.a)),t.e&&(t.e=e(t.e,!1)),t.w&&(t.w=Y1(t.w,e)),t.s&&(t.s=e(t.s)),t.t&&(t.t=e(t.t)),t}function Y1(e,t){var r={};return e.forEach(i=>{var[a,[n,o]]=i;r[t(a)]=[t(n),o]}),r}function q1(e,t){return e.priority=t,e}var il=new Set,X1=1,al=2,od=3,sd=4;function nr(e,t){il.add(q1(e,t))}function Z1(){try{[...il].sort((e,t)=>e.priority-t.priority).forEach(e=>e())}finally{il.clear()}}function ld(e,t){var r=window["__"+Ip],i=r&&r[e];if(i)return i;if(t&&t.__renderjsInstances)return t.__renderjsInstances[e]}var K1=Tu.length;function G1(e,t,r){var[i,a,n,o]=ol(t),s=nl(e,i);if(ne(r)||ne(o)){var[u,l]=n.split(".");return sl(s,a,u,l,r||o)}return ex(s,a,n)}function J1(e,t,r){var[i,a,n]=ol(t),[o,s]=n.split("."),u=nl(e,i);return sl(u,a,o,s,[rx(r,e),Di(qr(u))])}function nl(e,t){if(e.__ownerId===t)return e;for(var r=e.parentElement;r;){if(r.__ownerId===t)return r;r=r.parentElement}return e}function ol(e){return JSON.parse(e.substr(K1))}function Q1(e,t,r,i){var[a,n,o]=ol(e),s=nl(t,a),[u,l]=o.split(".");return sl(s,n,u,l,[r,i,Di(qr(s)),Di(qr(t))])}function sl(e,t,r,i,a){var n=ld(t,e);if(!n)return console.error(Io("wxs","module "+r+" not found"));var o=n[i];return se(o)?o.apply(n,a):console.error(r+"."+i+" is not a function")}function ex(e,t,r){var i=ld(t,e);return i?Ru(i,r.substr(r.indexOf(".")+1)):console.error(Io("wxs","module "+r+" not found"))}function tx(e,t,r){var i=r;return a=>{try{Q1(t,e.$,a,i)}catch(n){console.error(n)}i=a}}function rx(e,t){var r=qr(t);return Object.defineProperty(e,"instance",{get(){return Di(r)}}),e}function ud(e,t){Object.keys(t).forEach(r=>{ax(e,t[r])})}function ix(e){var{__renderjsInstances:t}=e.$;!t||Object.keys(t).forEach(r=>{t[r].$.appContext.app.unmount()})}function ax(e,t){var r=nx(t);if(!!r){var i=e.$;(i.__renderjsInstances||(i.__renderjsInstances={}))[t]=ox(i,r)}}function nx(e){var t=window["__"+kp],r=t&&t[e];return r||console.error(Io("renderjs",e+" not found"))}function ox(e,t){return t=t.default||t,t.render=()=>{},lc(t).mixin({mounted(){this.$ownerInstance=Di(qr(e))}}).mount(document.createElement("div"))}class ii{constructor(t,r,i,a){this.isMounted=!1,this.isUnmounted=!1,this.$hasWxsProps=!1,this.$children=[],this.id=t,this.tag=r,this.pid=i,a&&(this.$=a),this.$wxsProps=new Map;var n=this.$parent=gT(i);n&&n.appendUniChild(this)}init(t){ie(t,"t")&&(this.$.textContent=t.t)}setText(t){this.$.textContent=t}insert(t,r){var i=this.$,a=nt(t);r===-1?a.appendChild(i):a.insertBefore(i,nt(r).$),this.isMounted=!0}remove(){this.removeUniParent();var{$:t}=this;t.parentNode.removeChild(t),this.isUnmounted=!0,Eh(this.id),ix(this),this.removeUniChildren()}appendChild(t){return this.$.appendChild(t)}insertBefore(t,r){return this.$.insertBefore(t,r)}appendUniChild(t){this.$children.push(t)}removeUniChild(t){var r=this.$children.indexOf(t);r>=0&&this.$children.splice(r,1)}removeUniParent(){var{$parent:t}=this;t&&(t.removeUniChild(this),this.$parent=void 0)}removeUniChildren(){this.$children.forEach(t=>t.remove()),this.$children.length=0}setWxsProps(t){Object.keys(t).forEach(r=>{if(r.indexOf(No)===0){var i=r.replace(No,""),a=t[i],n=tx(this,t[r],a);nr(()=>n(a),sd),this.$wxsProps.set(r,n),delete t[r],delete t[i],this.$hasWxsProps=!0}})}addWxsEvents(t){Object.keys(t).forEach(r=>{var[i,a]=t[r];this.addWxsEvent(r,i,a)})}addWxsEvent(t,r,i){}wxsPropsInvoke(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.$hasWxsProps&&this.$wxsProps.get(No+t);if(a)return nr(()=>i?Vr(()=>a(r)):a(r),sd),!0}}function fd(e,t){var{__wxsAddClass:r,__wxsRemoveClass:i}=e;i&&i.length&&(t=t.split(/\s+/).filter(a=>i.indexOf(a)===-1).join(" "),i.length=0),r&&r.length&&(t=t+" "+r.join(" ")),e.className=t}function cd(e,t){var r=e.style;if(Ee(t))t===""?e.removeAttribute("style"):r.cssText=_r(t,!0);else for(var i in t)ll(r,i,t[i]);var{__wxsStyle:a}=e;if(a)for(var n in a)ll(r,n,a[n])}var vd=/\s*!important$/;function ll(e,t,r){if(ne(r))r.forEach(a=>ll(e,t,a));else if(r=_r(r,!0),t.startsWith("--"))e.setProperty(t,r);else{var i=sx(e,t);vd.test(r)?e.setProperty(Ge(i),r.replace(vd,""),"important"):e[i]=r}}var dd=["Webkit"],ul={};function sx(e,t){var r=ul[t];if(r)return r;var i=Ht(t);if(i!=="filter"&&i in e)return ul[t]=i;i=Ra(i);for(var a=0;a{var[n]=pc(a);n.type=zp(a.type,r),UniViewJSBridge.publishHandler(bc,[[Qp,e,n]])};return t?xs(i,_d(t)):i}function _d(e){var t=[];return e&Lo.prevent&&t.push("prevent"),e&Lo.self&&t.push("self"),e&Lo.stop&&t.push("stop"),t}function lx(e,t,r,i){var[a,n]=Ro(t);i===-1?hd(e,a):gd(e,a)||e.addEventListener(a,e.__listeners[a]=bd(e,r,i),n)}function bd(e,t,r){var i=a=>{J1(e,t,pc(a)[0])};return r?xs(i,_d(r)):i}var ux=Cu.length;function fl(e,t){return Ee(t)&&(t.indexOf(Cu)===0?t=JSON.parse(t.substr(ux)):t.indexOf(Tu)===0&&(t=G1(e,t))),t}function kn(e){return e.indexOf("--")===0}function cl(e,t){e._vod=e.style.display==="none"?"":e.style.display,e.style.display=t?e._vod:"none"}class wd extends ii{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r.tagName,i,r);this.$props=ke({}),this.$.__id=t,this.$.__listeners=Object.create(null),this.$propNames=o,this._update=this.update.bind(this),this.init(n),this.insert(i,a)}init(t){ie(t,"a")&&this.setAttrs(t.a),ie(t,"s")&&this.setAttr("style",t.s),ie(t,"e")&&this.addEvents(t.e),ie(t,"w")&&this.addWxsEvents(t.w),super.init(t),W(this.$props,()=>{nr(this._update,X1)},{flush:"sync"}),this.update(!0)}setAttrs(t){this.setWxsProps(t),Object.keys(t).forEach(r=>{this.setAttr(r,t[r])})}addEvents(t){Object.keys(t).forEach(r=>{this.addEvent(r,t[r])})}addWxsEvent(t,r,i){lx(this.$,t,r,i)}addEvent(t,r){pd(this.$,t,r)}removeEvent(t){pd(this.$,t,-1)}setAttr(t,r){t===Au?fd(this.$,r):t===Po?cd(this.$,r):t===Na?cl(this.$,r):t===Iu?this.$.__ownerId=r:t===ku?nr(()=>ud(this,r),od):t===Up?this.$.innerHTML=r:t===Hp?this.setText(r):this.setAttribute(t,r)}removeAttr(t){t===Au?fd(this.$,""):t===Po?cd(this.$,""):this.removeAttribute(t)}setAttribute(t,r){r=fl(this.$,r),this.$propNames.indexOf(t)!==-1?this.$props[t]=r:kn(t)?this.$.style.setProperty(t,r):this.wxsPropsInvoke(t,r)||this.$.setAttribute(t,r)}removeAttribute(t){this.$propNames.indexOf(t)!==-1?delete this.$props[t]:kn(t)?this.$.style.removeProperty(t):this.$.removeAttribute(t)}update(){}}class fx extends ii{constructor(t,r,i){super(t,"#comment",r,document.createComment(""));this.insert(r,i)}}var jT="";function xd(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,(t,r)=>"".concat(uni.upx2px(parseFloat(r)),"px")):/^-?[\d\.]+$/.test(e)?"".concat(e,"px"):e||""}function cx(e){return e.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())).replace("webkit","-webkit")}function vx(e){var t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],r=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],i=["opacity","background-color"],a=["width","height","left","right","top","bottom"],n=e.animates,o=e.option,s=o.transition,u={},l=[];return n.forEach(f=>{var d=f.type,g=[...f.args];if(t.concat(r).includes(d))d.startsWith("rotate")||d.startsWith("skew")?g=g.map(w=>parseFloat(w)+"deg"):d.startsWith("translate")&&(g=g.map(xd)),r.indexOf(d)>=0&&(g.length=1),l.push("".concat(d,"(").concat(g.join(","),")"));else if(i.concat(a).includes(g[0])){d=g[0];var h=g[1];u[d]=a.includes(d)?xd(h):h}}),u.transform=u.webkitTransform=l.join(" "),u.transition=u.webkitTransition=Object.keys(u).map(f=>"".concat(cx(f)," ").concat(s.duration,"ms ").concat(s.timingFunction," ").concat(s.delay,"ms")).join(","),u.transformOrigin=u.webkitTransformOrigin=o.transformOrigin,u}function yd(e){var t=e.animation;if(!t||!t.actions||!t.actions.length)return;var r=0,i=t.actions,a=t.actions.length;function n(){var o=i[r],s=o.option.transition,u=vx(o);Object.keys(u).forEach(l=>{e.$el.style[l]=u[l]}),r+=1,r{n()},0)}var Mn={props:["animation"],watch:{animation:{deep:!0,handler(){yd(this)}}},mounted(){yd(this)}},ge=e=>{e.__reserved=!0;var{props:t,mixins:r}=e;return(!t||!t.animation)&&(r||(e.mixins=[])).push(Mn),dx(e)},dx=e=>(e.__reserved=!0,e.compatConfig={MODE:3},L0(e)),hx={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function vl(e){var t=U(!1),r=!1,i,a;function n(){requestAnimationFrame(()=>{clearTimeout(a),a=setTimeout(()=>{t.value=!1},parseInt(e.hoverStayTime))})}function o(l){l._hoverPropagationStopped||!e.hoverClass||e.hoverClass==="none"||e.disabled||l.touches.length>1||(e.hoverStopPropagation&&(l._hoverPropagationStopped=!0),r=!0,i=setTimeout(()=>{t.value=!0,r||n()},parseInt(e.hoverStartTime)))}function s(){r=!1,t.value&&n()}function u(){r=!1,t.value=!1,clearTimeout(i)}return{hovering:t,binding:{onTouchstartPassive:o,onTouchend:s,onTouchcancel:u}}}function ai(e,t){return Ee(t)&&(t=[t]),t.reduce((r,i)=>(e[i]&&(r[i]=!0),r),Object.create(null))}function Ar(e){return e.__wwe=!0,e}function Pe(e,t){return(r,i,a)=>{e.value&&t(r,px(r,i,e.value,a||{}))}}function gx(e){return(t,r)=>{e(t,mc(r))}}function px(e,t,r,i){var a=Mo(r);return{type:i.type||e,timeStamp:t.timeStamp||0,target:a,currentTarget:a,detail:i}}var It=cn("uf"),mx=ge({name:"Form",emits:["submit","reset"],setup(e,t){var{slots:r,emit:i}=t,a=U(null);return _x(Pe(a,i)),()=>I("uni-form",{ref:a},[I("span",null,[r.default&&r.default()])],512)}});function _x(e){var t=[];return ze(It,{addField(r){t.push(r)},removeField(r){t.splice(t.indexOf(r),1)},submit(r){e("submit",r,{value:t.reduce((i,a)=>{if(a.submit){var[n,o]=a.submit();n&&(i[n]=o)}return i},Object.create(null))})},reset(r){t.forEach(i=>i.reset&&i.reset()),e("reset",r)}}),t}var Qi=cn("ul"),bx={for:{type:String,default:""}},wx=ge({name:"Label",props:bx,setup(e,t){var{slots:r}=t,i=hn(),a=xx(),n=te(()=>e.for||r.default&&r.default.length),o=Ar(s=>{var u=s.target,l=/^uni-(checkbox|radio|switch)-/.test(u.className);l||(l=/^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(u.tagName)),!l&&(e.for?UniViewJSBridge.emit("uni-label-click-"+i+"-"+e.for,s,!0):a.length&&a[0](s,!0))});return()=>I("uni-label",{class:{"uni-label-pointer":n},onClick:o},[r.default&&r.default()],10,["onClick"])}});function xx(){var e=[];return ze(Qi,{addHandler(t){e.push(t)},removeHandler(t){e.splice(e.indexOf(t),1)}}),e}function Rn(e,t){Sd(e.id,t),W(()=>e.id,(r,i)=>{Ed(i,t,!0),Sd(r,t,!0)}),Zt(()=>{Ed(e.id,t)})}function Sd(e,t,r){var i=hn();r&&!e||!mt(t)||Object.keys(t).forEach(a=>{r?a.indexOf("@")!==0&&a.indexOf("uni-")!==0&&UniViewJSBridge.on("uni-".concat(a,"-").concat(i,"-").concat(e),t[a]):a.indexOf("uni-")===0?UniViewJSBridge.on(a,t[a]):e&&UniViewJSBridge.on("uni-".concat(a,"-").concat(i,"-").concat(e),t[a])})}function Ed(e,t,r){var i=hn();r&&!e||!mt(t)||Object.keys(t).forEach(a=>{r?a.indexOf("@")!==0&&a.indexOf("uni-")!==0&&UniViewJSBridge.off("uni-".concat(a,"-").concat(i,"-").concat(e),t[a]):a.indexOf("uni-")===0?UniViewJSBridge.off(a,t[a]):e&&UniViewJSBridge.off("uni-".concat(a,"-").concat(i,"-").concat(e),t[a])})}var yx={id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},Sx=ge({name:"Button",props:yx,setup(e,t){var{slots:r}=t,i=U(null);ym();var a=_e(It,!1),{hovering:n,binding:o}=vl(e),{t:s}=Je(),u=Ar((f,d)=>{if(e.disabled)return f.stopImmediatePropagation();d&&i.value.click();var g=e.formType;if(g){if(!a)return;g==="submit"?a.submit(f):g==="reset"&&a.reset(f);return}e.openType==="feedback"&&Ex(s("uni.button.feedback.title"),s("uni.button.feedback.send"))}),l=_e(Qi,!1);return l&&(l.addHandler(u),Ae(()=>{l.removeHandler(u)})),Rn(e,{"label-click":u}),()=>{var f=e.hoverClass,d=ai(e,"disabled"),g=ai(e,"loading"),h=ai(e,"plain"),w=f&&f!=="none";return I("uni-button",tt({ref:i,onClick:u,class:w&&n.value?f:""},w&&o,d,g,h),[r.default&&r.default()],16,["onClick"])}}});function Ex(e,t){var r=plus.webview.create("https://service.dcloud.net.cn/uniapp/feedback.html","feedback",{titleNView:{titleText:e,autoBackButton:!0,backgroundColor:"#F7F7F7",titleColor:"#007aff",buttons:[{text:t,color:"#007aff",fontSize:"16px",fontWeight:"bold",onclick:function(){r.evalJS('typeof mui !== "undefined" && mui.trigger(document.getElementById("submit"),"tap")')}}]}});r.show("slide-in-right")}var Ir=ge({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,t){var{emit:r}=t,i=U(null),a=Cx(i),n=Tx(i,r,a);return Ox(i,e,n,a),()=>I("uni-resize-sensor",{ref:i,onAnimationstartOnce:n},[I("div",{onScroll:n},[I("div",null,null)],40,["onScroll"]),I("div",{onScroll:n},[I("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});function Tx(e,t,r){var i=ke({width:-1,height:-1});return W(()=>ce({},i),a=>t("resize",a)),()=>{var a=e.value;i.width=a.offsetWidth,i.height=a.offsetHeight,r()}}function Cx(e){return()=>{var{firstElementChild:t,lastElementChild:r}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,r.scrollLeft=1e5,r.scrollTop=1e5}}function Ox(e,t,r,i){ss(i),Re(()=>{t.initial&&Vr(r);var a=e.value;a.offsetParent!==a.parentElement&&(a.parentElement.style.position="relative"),"AnimationEvent"in window||i()})}var we=function(){var e=document.createElement("canvas");e.height=e.width=0;var t=e.getContext("2d"),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/r}();function Td(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;e.width=e.offsetWidth*(t?we:1),e.height=e.offsetHeight*(t?we:1),e.getContext("2d").__hidpi__=t}var Cd=!1;function Ax(){if(!Cd){Cd=!0;var e=function(i,a){for(var n in i)ie(i,n)&&a(i[n],n)},t={fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all",setTransform:[4,5]},r=CanvasRenderingContext2D.prototype;r.drawImageByCanvas=function(i){return function(a,n,o,s,u,l,f,d,g,h){if(!this.__hidpi__)return i.apply(this,arguments);n*=we,o*=we,s*=we,u*=we,l*=we,f*=we,d=h?d*we:d,g=h?g*we:g,i.call(this,a,n,o,s,u,l,f,d,g)}}(r.drawImage),we!==1&&(e(t,function(i,a){r[a]=function(n){return function(){if(!this.__hidpi__)return n.apply(this,arguments);var o=Array.prototype.slice.call(arguments);if(i==="all")o=o.map(function(u){return u*we});else if(Array.isArray(i))for(var s=0;sAx());function Od(e){return e&&vt(e)}function Ln(e){return e=e.slice(0),e[3]=e[3]/255,"rgba("+e.join(",")+")"}function Ad(e,t){var r=e;return Array.from(t).map(i=>{var a=r.getBoundingClientRect();return{identifier:i.identifier,x:i.clientX-a.left,y:i.clientY-a.top}})}var ea;function Id(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ea||(ea=document.createElement("canvas")),ea.width=e,ea.height=t,ea}var kx={canvasId:{type:String,default:""},disableScroll:{type:[Boolean,String],default:!1},hidpi:{type:Boolean,default:!0}},Mx=ge({inheritAttrs:!1,name:"Canvas",compatConfig:{MODE:3},props:kx,computed:{id(){return this.canvasId}},setup(e,t){var{emit:r,slots:i}=t;Ix();var a=U(null),n=U(null),o=U(!1),s=gx(r),{$attrs:u,$excludeAttrs:l,$listeners:f}=Xd({excludeListeners:!0}),{_listeners:d}=Rx(e,f,s),{_handleSubscribe:g,_resize:h}=Lx(e,a,o);return Vn(g,jn(e.canvasId),!0),Re(()=>{h()}),()=>{var{canvasId:w,disableScroll:_}=e;return I("uni-canvas",tt({"canvas-id":w,"disable-scroll":_},u.value,l.value,d.value),[I("canvas",{ref:a,class:"uni-canvas-canvas",width:"300",height:"150"},null,512),I("div",{style:"position: absolute;top: 0;left: 0;width: 100%;height: 100%;overflow: hidden;"},[i.default&&i.default()]),I(Ir,{ref:n,onResize:h},null,8,["onResize"])],16,["canvas-id","disable-scroll"])}}});function Rx(e,t,r){var i=te(()=>{var a=["onTouchstart","onTouchmove","onTouchend"],n=t.value,o=ce({},(()=>{var s={};for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)){var l=n[u];s[u]=l}return s})());return a.forEach(s=>{var u=o[s],l=[];u&&l.push(Ar(f=>{r(s.replace("on","").toLocaleLowerCase(),ce({},(()=>{var d={};for(var g in f)d[g]=f[g];return d})(),{touches:Ad(f.currentTarget,f.touches),changedTouches:Ad(f.currentTarget,f.changedTouches)}))})),e.disableScroll&&s==="onTouchmove"&&l.push(cc),o[s]=l}),o});return{_listeners:i}}function Lx(e,t,r){var i=[],a={},n=te(()=>e.hidpi?we:1);function o(_){var x=t.value,m=!_||x.width!==Math.floor(_.width*n.value)||x.height!==Math.floor(_.height*n.value);if(!!m)if(x.width>0&&x.height>0){var b=x.getContext("2d"),c=b.getImageData(0,0,x.width,x.height);Td(x,e.hidpi),b.putImageData(c,0,0)}else Td(x,e.hidpi)}function s(_,x){var{actions:m,reserve:b}=_;if(!!m){if(r.value){i.push([m,b]);return}var c=t.value,v=c.getContext("2d");b||(v.fillStyle="#000000",v.strokeStyle="#000000",v.shadowColor="#000000",v.shadowBlur=0,v.shadowOffsetX=0,v.shadowOffsetY=0,v.setTransform(1,0,0,1,0,0),v.clearRect(0,0,c.width,c.height)),u(m);for(var p=function(C){var O=m[C],P=O.method,M=O.data,H=M[0];if(/^set/.test(P)&&P!=="setTransform"){var re=P[3].toLowerCase()+P.slice(4),R;if(re==="fillStyle"||re==="strokeStyle"){if(H==="normal")R=Ln(M[1]);else if(H==="linear"){var B=v.createLinearGradient(...M[1]);M[2].forEach(function(J){var ye=J[0],be=Ln(J[1]);B.addColorStop(ye,be)}),R=B}else if(H==="radial"){var X=M[1],Q=X[0],V=X[1],K=X[2],ae=v.createRadialGradient(Q,V,0,Q,V,K);M[2].forEach(function(J){var ye=J[0],be=Ln(J[1]);ae.addColorStop(ye,be)}),R=ae}else if(H==="pattern"){var Te=l(M[1],m.slice(C+1),x,function(J){J&&(v[re]=v.createPattern(J,M[2]))});return Te?"continue":"break"}v[re]=R}else if(re==="globalAlpha")v[re]=Number(H)/255;else if(re==="shadow"){var oe=["shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor"];M.forEach(function(J,ye){v[oe[ye]]=oe[ye]==="shadowColor"?Ln(J):J})}else if(re==="fontSize"){var de=v.__font__||v.font;v.__font__=v.font=de.replace(/\d+\.?\d*px/,H+"px")}else re==="lineDash"?(v.setLineDash(H),v.lineDashOffset=M[1]||0):re==="textBaseline"?(H==="normal"&&(M[0]="alphabetic"),v[re]=H):re==="font"?v.__font__=v.font=H:v[re]=H}else if(P==="fillPath"||P==="strokePath")P=P.replace(/Path/,""),v.beginPath(),M.forEach(function(J){v[J.method].apply(v,J.data)}),v[P]();else if(P==="fillText")v.fillText.apply(v,M);else if(P==="drawImage"){var le=function(){var J=[...M],ye=J[0],be=J.slice(1);if(a=a||{},l(ye,m.slice(C+1),x,function(Ve){Ve&&v.drawImage.apply(v,[Ve].concat([...be.slice(4,8)],[...be.slice(0,4)]))}))return"break"}();if(le==="break")return"break"}else P==="clip"?(M.forEach(function(J){v[J.method].apply(v,J.data)}),v.clip()):v[P].apply(v,M)},y=0;y{p.src=y}).catch(()=>{p.src=c})}})}function l(_,x,m,b){var c=a[_];return c.ready?(b(c),!0):(i.unshift([x,!0]),r.value=!0,c.onload=function(){c.ready=!0,b(c),r.value=!1;var v=i.slice(0);i=[];for(var p=v.shift();p;)s({actions:p[0],reserve:p[1]},m),p=v.shift()},!1)}function f(_,x){var{x:m=0,y:b=0,width:c,height:v,destWidth:p,destHeight:y,hidpi:E=!0,dataType:C,quality:O=1,type:P="png"}=_,M=t.value,H,re=M.offsetWidth-m;c=c?Math.min(c,re):re;var R=M.offsetHeight-b;v=v?Math.min(v,R):R,E?(p=c,y=v):!p&&!y?(p=Math.round(c*n.value),y=Math.round(v*n.value)):p?y||(y=Math.round(v/c*p)):p=Math.round(c/v*y);var B=Id(p,y),X=B.getContext("2d");(P==="jpeg"||P==="jpg")&&(P="jpeg",X.fillStyle="#fff",X.fillRect(0,0,p,y)),X.__hidpi__=!0,X.drawImageByCanvas(M,m,b,c,v,0,0,p,y,!1);var Q;try{var V;if(C==="base64")H=B.toDataURL("image/".concat(P),O);else{var K=X.getImageData(0,0,p,y);H=Qv.deflateRaw(K.data,{to:"string"}),V=!0}Q={data:H,compressed:V,width:p,height:y}}catch(ae){Q={errMsg:"canvasGetImageData:fail ".concat(ae)}}if(B.height=B.width=0,X.__hidpi__=!1,x)x(Q);else return Q}function d(_,x){var{data:m,x:b,y:c,width:v,height:p,compressed:y}=_;try{y&&(m=Qv.inflateRaw(m)),p||(p=Math.round(m.length/4/v));var E=Id(v,p),C=E.getContext("2d");C.putImageData(new ImageData(new Uint8ClampedArray(m),v,p),0,0),t.value.getContext("2d").drawImage(E,b,c,v,p),E.height=E.width=0}catch(O){x({errMsg:"canvasPutImageData:fail"});return}x({errMsg:"canvasPutImageData:ok"})}function g(_,x){var{x:m=0,y:b=0,width:c,height:v,destWidth:p,destHeight:y,fileType:E,quality:C,dirname:O}=_,P=f({x:m,y:b,width:c,height:v,destWidth:p,destHeight:y,hidpi:!1,dataType:"base64",type:E,quality:C});if(!P.data||!P.data.length){x({errMsg:P.errMsg.replace("canvasPutImageData","toTempFilePath")});return}Ob(P.data,O,(M,H)=>{var re="toTempFilePath:".concat(M?"fail":"ok");M&&(re+=" ".concat(M.message)),x({errMsg:re,tempFilePath:H})})}var h={actionsChanged:s,getImageData:f,putImageData:d,toTempFilePath:g};function w(_,x,m){var b=h[_];_.indexOf("_")!==0&&typeof b=="function"&&b(x,m)}return ce(h,{_resize:o,_handleSubscribe:w})}var kd=cn("ucg"),Px={name:{type:String,default:""}},Nx=ge({name:"CheckboxGroup",props:Px,emits:["change"],setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=Pe(a,r);return Dx(e,n),()=>I("uni-checkbox-group",{ref:a},[i.default&&i.default()],512)}});function Dx(e,t){var r=[],i=()=>r.reduce((n,o)=>(o.value.checkboxChecked&&n.push(o.value.value),n),new Array);ze(kd,{addField(n){r.push(n)},removeField(n){r.splice(r.indexOf(n),1)},checkboxChange(n){t("change",n,{value:i()})}});var a=_e(It,!1);return a&&a.addField({submit:()=>{var n=["",null];return e.name!==""&&(n[0]=e.name,n[1]=i()),n}}),i}var Bx={checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},$x=ge({name:"Checkbox",props:Bx,setup(e,t){var{slots:r}=t,i=U(e.checked),a=U(e.value);W([()=>e.checked,()=>e.value],l=>{var[f,d]=l;i.value=f,a.value=d});var n=()=>{i.value=!1},{uniCheckGroup:o,uniLabel:s}=Fx(i,a,n),u=l=>{e.disabled||(i.value=!i.value,o&&o.checkboxChange(l))};return s&&(s.addHandler(u),Ae(()=>{s.removeHandler(u)})),Rn(e,{"label-click":u}),()=>{var l=ai(e,"disabled");return I("uni-checkbox",tt(l,{onClick:u}),[I("div",{class:"uni-checkbox-wrapper"},[I("div",{class:["uni-checkbox-input",{"uni-checkbox-input-disabled":e.disabled}]},[i.value?dn(vn,e.color,22):""],2),r.default&&r.default()])],16,["onClick"])}}});function Fx(e,t,r){var i=te(()=>({checkboxChecked:Boolean(e.value),value:t.value})),a={reset:r},n=_e(kd,!1);n&&n.addField(i);var o=_e(It,!1);o&&o.addField(a);var s=_e(Qi,!1);return Ae(()=>{n&&n.removeField(i),o&&o.removeField(a)}),{uniCheckGroup:n,uniForm:o,uniLabel:s}}var Md,ta,Pn,or,Nn,dl;$r(()=>{ta=plus.os.name==="Android",Pn=plus.os.version||""}),document.addEventListener("keyboardchange",function(e){or=e.height,Nn&&Nn()},!1);function Rd(){}function ra(e,t,r){$r(()=>{var i="adjustResize",a="adjustPan",n="nothing",o=plus.webview.currentWebview(),s=dl||o.getStyle()||{},u={mode:r||s.softinputMode===i?i:e.adjustPosition?a:n,position:{top:0,height:0}};if(u.mode===a){var l=t.getBoundingClientRect();u.position.top=l.top,u.position.height=l.height+(Number(e.cursorSpacing)||0)}o.setSoftinputTemporary(u)})}function zx(e,t){if(e.showConfirmBar==="auto"){delete t.softinputNavBar;return}$r(()=>{var r=plus.webview.currentWebview(),{softinputNavBar:i}=r.getStyle()||{},a=i!=="none";a!==e.showConfirmBar?(t.softinputNavBar=i||"auto",r.setStyle({softinputNavBar:e.showConfirmBar?"auto":"none"})):delete t.softinputNavBar})}function Ux(e){var t=e.softinputNavBar;t&&$r(()=>{var r=plus.webview.currentWebview();r.setStyle({softinputNavBar:t})})}var Ld={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}},Pd=["keyboardheightchange"];function Nd(e,t,r){var i={};function a(n){var o,s=()=>{r("keyboardheightchange",{},{height:or,duration:.25}),o&&or===0&&ra(e,n),e.autoBlur&&o&&or===0&&(ta||parseInt(Pn)>=13)&&document.activeElement.blur()};n.addEventListener("focus",()=>{o=!0,clearTimeout(Md),document.addEventListener("click",Rd,!1),Nn=s,or&&r("keyboardheightchange",{},{height:or,duration:0}),zx(e,i),ra(e,n)}),ta&&n.addEventListener("click",()=>{!e.disabled&&!e.readOnly&&o&&or===0&&ra(e,n)}),ta||(parseInt(Pn)<12&&n.addEventListener("touchstart",()=>{!e.disabled&&!e.readOnly&&!o&&ra(e,n)}),parseFloat(Pn)>=14.6&&!dl&&$r(()=>{var l=plus.webview.currentWebview();dl=l.getStyle()||{}}));var u=()=>{document.removeEventListener("click",Rd,!1),Nn=null,or&&r("keyboardheightchange",{},{height:0,duration:0}),Ux(i),ta&&(Md=setTimeout(()=>{ra(e,n,!0)},300)),String(navigator.vendor).indexOf("Apple")===0&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)};n.addEventListener("blur",()=>{n.blur(),o=!1,u()})}W(()=>t.value,n=>a(n))}var Dd=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,Bd=/^<\/([-A-Za-z0-9_]+)[^>]*>/,Hx=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,Wx=ni("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),Vx=ni("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),jx=ni("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),Yx=ni("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),qx=ni("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),Xx=ni("script,style");function $d(e,t){var r,i,a,n=[],o=e;for(n.last=function(){return this[this.length-1]};e;){if(i=!0,!n.last()||!Xx[n.last()]){if(e.indexOf(""),r>=0&&(t.comment&&t.comment(e.substring(4,r)),e=e.substring(r+3),i=!1)):e.indexOf("]*>"),function(f,d){return d=d.replace(/|/g,"$1$2"),t.chars&&t.chars(d),""}),l("",n.last());if(e==o)throw"Parse Error: "+e;o=e}l();function u(f,d,g,h){if(d=d.toLowerCase(),Vx[d])for(;n.last()&&jx[n.last()];)l("",n.last());if(Yx[d]&&n.last()==d&&l("",d),h=Wx[d]||!!h,h||n.push(d),t.start){var w=[];g.replace(Hx,function(_,x){var m=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:qx[x]?x:"";w.push({name:x,value:m,escaped:m.replace(/(^|[^\\])"/g,'$1\\"')})}),t.start&&t.start(d,w,h)}}function l(f,d){if(d)for(var g=n.length-1;g>=0&&n[g]!=d;g--);else var g=0;if(g>=0){for(var h=n.length-1;h>=g;h--)t.end&&t.end(n[h]);n.length=g}}}function ni(e){for(var t={},r=e.split(","),i=0;io()),delete hl[t]}}a.push(r)}function Zx(e){var t=e.import("blots/block/embed");class r extends t{}return r.blotName="divider",r.tagName="HR",{"formats/divider":r}}function Kx(e){var t=e.import("blots/inline");class r extends t{}return r.blotName="ins",r.tagName="INS",{"formats/ins":r}}function Gx(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK,whitelist:["left","right","center","justify"]},a=new r.Style("align","text-align",i);return{"formats/align":a}}function Jx(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK,whitelist:["rtl"]},a=new r.Style("direction","direction",i);return{"formats/direction":a}}function Qx(e){var t=e.import("parchment"),r=e.import("blots/container"),i=e.import("formats/list/item");class a extends r{static create(o){var s=o==="ordered"?"OL":"UL",u=super.create(s);return(o==="checked"||o==="unchecked")&&u.setAttribute("data-checked",o==="checked"),u}static formats(o){if(o.tagName==="OL")return"ordered";if(o.tagName==="UL")return o.hasAttribute("data-checked")?o.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}constructor(o){super(o);var s=u=>{if(u.target.parentNode===o){var l=this.statics.formats(o),f=t.find(u.target);l==="checked"?f.format("list","unchecked"):l==="unchecked"&&f.format("list","checked")}};o.addEventListener("click",s)}format(o,s){this.children.length>0&&this.children.tail.format(o,s)}formats(){return{[this.statics.blotName]:this.statics.formats(this.domNode)}}insertBefore(o,s){if(o instanceof i)super.insertBefore(o,s);else{var u=s==null?this.length():s.offset(this),l=this.split(u);l.parent.insertBefore(o,l)}}optimize(o){super.optimize(o);var s=this.next;s!=null&&s.prev===this&&s.statics.blotName===this.statics.blotName&&s.domNode.tagName===this.domNode.tagName&&s.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(s.moveChildren(this),s.remove())}replace(o){if(o.statics.blotName!==this.statics.blotName){var s=t.create(this.statics.defaultChild);o.moveChildren(s),this.appendChild(s)}super.replace(o)}}return a.blotName="list",a.scope=t.Scope.BLOCK_BLOT,a.tagName=["OL","UL"],a.defaultChild="list-item",a.allowedChildren=[i],{"formats/list":a}}function ey(e){var{Scope:t}=e.import("parchment"),r=e.import("formats/background"),i=new r.constructor("backgroundColor","background-color",{scope:t.INLINE});return{"formats/backgroundColor":i}}function ty(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.BLOCK},a=["margin","marginTop","marginBottom","marginLeft","marginRight"],n=["padding","paddingTop","paddingBottom","paddingLeft","paddingRight"],o={};return a.concat(n).forEach(s=>{o["formats/".concat(s)]=new r.Style(s,Ge(s),i)}),o}function ry(e){var{Scope:t,Attributor:r}=e.import("parchment"),i={scope:t.INLINE},a=["font","fontSize","fontStyle","fontVariant","fontWeight","fontFamily"],n={};return a.forEach(o=>{n["formats/".concat(o)]=new r.Style(o,Ge(o),i)}),n}function iy(e){var{Scope:t,Attributor:r}=e.import("parchment"),i=[{name:"lineHeight",scope:t.BLOCK},{name:"letterSpacing",scope:t.INLINE},{name:"textDecoration",scope:t.INLINE},{name:"textIndent",scope:t.BLOCK}],a={};return i.forEach(n=>{var{name:o,scope:s}=n;a["formats/".concat(o)]=new r.Style(o,Ge(o),{scope:s})}),a}function ay(e){var t=e.import("formats/image"),r=["alt","height","width","data-custom","class","data-local"];t.sanitize=a=>a&&vt(a),t.formats=function(n){return r.reduce(function(o,s){return n.hasAttribute(s)&&(o[s]=n.getAttribute(s)),o},{})};var i=t.prototype.format;t.prototype.format=function(a,n){r.indexOf(a)>-1?n?this.domNode.setAttribute(a,n):this.domNode.removeAttribute(a):i.call(this,a,n)}}function ny(e){var t=e.import("formats/link");t.sanitize=r=>{var i=document.createElement("a");i.href=r;var a=i.href.slice(0,i.href.indexOf(":"));return t.PROTOCOL_WHITELIST.concat("file").indexOf(a)>-1?r:t.SANITIZED_URL}}function oy(e){var t={divider:Zx,ins:Kx,align:Gx,direction:Jx,list:Qx,background:ey,box:ty,font:ry,text:iy,image:ay,link:ny},r={};Object.values(t).forEach(i=>ce(r,i(e))),e.register(r,!0)}function sy(e,t,r){var i,a,n,o=!1;W(()=>e.readOnly,w=>{i&&(n.enable(!w),w||n.blur())}),W(()=>e.placeholder,w=>{i&&l(w)});function s(w){var _=["span","strong","b","ins","em","i","u","a","del","s","sub","sup","img","div","p","h1","h2","h3","h4","h5","h6","hr","ol","ul","li","br"],x="",m;$d(w,{start:function(c,v,p){if(!_.includes(c)){m=!p;return}m=!1;var y=v.map(C=>{var{name:O,value:P}=C;return"".concat(O,'="').concat(P,'"')}).join(" "),E="<".concat(c," ").concat(y," ").concat(p?"/":"",">");x+=E},end:function(c){m||(x+=""))},chars:function(c){m||(x+=c)}}),a=!0;var b=n.clipboard.convert(x);return a=!1,b}function u(){var w=n.root.innerHTML,_=n.getText(),x=n.getContents();return{html:w,text:_,delta:x}}function l(w){var _="data-placeholder",x=n.root;x.getAttribute(_)!==w&&x.setAttribute(_,w)}var f={};function d(w){var _=w?n.getFormat(w):{},x=Object.keys(_);(x.length!==Object.keys(f).length||x.find(m=>_[m]!==f[m]))&&(f=_,r("statuschange",{},_))}function g(w){var _=window.Quill;oy(_);var x={toolbar:!1,readOnly:e.readOnly,placeholder:e.placeholder};w.length&&(_.register("modules/ImageResize",window.ImageResize.default),x.modules={ImageResize:{modules:w}});var m=t.value;n=new _(m,x);var b=n.root,c=["focus","blur","input"];c.forEach(v=>{b.addEventListener(v,p=>{var y=u();if(v==="input"){if(yc().platform==="ios"){var E=(y.html.match(/([\s\S]*)<\/span>/)||[])[1],C=E&&E.replace(/\s/g,"")?"":e.placeholder;l(C)}p.stopPropagation()}else r(v,p,y)})}),n.on("text-change",()=>{o||r("input",{},u())}),n.on("selection-change",d),n.on("scroll-optimize",()=>{var v=n.selection.getRange()[0];d(v)}),n.clipboard.addMatcher(Node.ELEMENT_NODE,(v,p)=>(a||p.ops&&(p.ops=p.ops.filter(y=>{var{insert:E}=y;return typeof E=="string"}).map(y=>{var{insert:E}=y;return{insert:E}})),p)),i=!0,r("ready",{},{})}Re(()=>{var w=[];e.showImgSize&&w.push("DisplaySize"),e.showImgToolbar&&w.push("Toolbar"),e.showImgResize&&w.push("Resize");var _="./__uniappquill.js";Fd(window.Quill,_,()=>{if(w.length){var x="./__uniappquillimageresize.js";Fd(window.ImageResize,x,()=>{g(w)})}else g(w)})});var h=jn();Vn((w,_,x)=>{var{options:m,callbackId:b}=_,c,v,p;if(i){var y=window.Quill;switch(w){case"format":{var{name:E="",value:C=!1}=m;v=n.getSelection(!0);var O=n.getFormat(v)[E]||!1;if(["bold","italic","underline","strike","ins"].includes(E))C=!O;else if(E==="direction"){C=C==="rtl"&&O?!1:C;var P=n.getFormat(v).align;C==="rtl"&&!P?n.format("align","right","user"):!C&&P==="right"&&n.format("align",!1,"user")}else if(E==="indent"){var M=n.getFormat(v).direction==="rtl";C=C==="+1",M&&(C=!C),C=C?"+1":"-1"}else E==="list"&&(C=C==="check"?"unchecked":C,O=O==="checked"?"unchecked":O),C=O&&O!==(C||!1)||!O&&C?C:!O;n.format(E,C,"user")}break;case"insertDivider":v=n.getSelection(!0),n.insertText(v.index,mi,"user"),n.insertEmbed(v.index+1,"divider",!0,"user"),n.setSelection(v.index+2,0,"silent");break;case"insertImage":{v=n.getSelection(!0);var{src:H="",alt:re="",width:R="",height:B="",extClass:X="",data:Q={}}=m,V=vt(H);n.insertEmbed(v.index,"image",V,"user");var K=/^(file|blob):/.test(V)?V:!1;o=!0,n.formatText(v.index,1,"data-local",K),n.formatText(v.index,1,"alt",re),n.formatText(v.index,1,"width",R),n.formatText(v.index,1,"height",B),n.formatText(v.index,1,"class",X),o=!1,n.formatText(v.index,1,"data-custom",Object.keys(Q).map(le=>"".concat(le,"=").concat(Q[le])).join("&")),n.setSelection(v.index+1,0,"silent")}break;case"insertText":{v=n.getSelection(!0);var{text:ae=""}=m;n.insertText(v.index,ae,"user"),n.setSelection(v.index+ae.length,0,"silent")}break;case"setContents":{var{delta:Te,html:oe}=m;typeof Te=="object"?n.setContents(Te,"silent"):typeof oe=="string"?n.setContents(s(oe),"silent"):p="contents is missing"}break;case"getContents":c=u();break;case"clear":n.setText("");break;case"removeFormat":{v=n.getSelection(!0);var de=y.import("parchment");v.length?n.removeFormat(v.index,v.length,"user"):Object.keys(n.getFormat(v)).forEach(le=>{de.query(le,de.Scope.INLINE)&&n.format(le,!1)})}break;case"undo":n.history.undo();break;case"redo":n.history.redo();break;case"blur":n.blur();break;case"getSelectionText":v=n.selection.savedRange,c={text:""},v&&v.length!==0&&(c.text=n.getText(v.index,v.length));break;case"scrollIntoView":n.scrollIntoView();break}d(v)}else p="not ready";b&&x({callbackId:b,data:ce({},c,{errMsg:"".concat(w,":").concat(p?"fail "+p:"ok")})})},h,!0)}var ly=ce({},Ld,{id:{type:String,default:""},readOnly:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},showImgSize:{type:[Boolean,String],default:!1},showImgToolbar:{type:[Boolean,String],default:!1},showImgResize:{type:[Boolean,String],default:!1}}),uy=ge({name:"Editor",props:ly,emit:["ready","focus","blur","input","statuschange",...Pd],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r);return sy(e,i,a),Nd(e,i,a),()=>I("uni-editor",{ref:i,id:e.id,class:"ql-container"},null,8,["id"])}}),zd="#10aeff",fy="#f76260",Ud="#b2b2b2",cy="#f43530",vy={success:{d:ib,c:Pa},success_no_circle:{d:vn,c:Pa},info:{d:tb,c:zd},warn:{d:nb,c:fy},waiting:{d:ab,c:zd},cancel:{d:J_,c:cy},download:{d:eb,c:Pa},search:{d:rb,c:Ud},clear:{d:Q_,c:Ud}},dy=ge({name:"Icon",props:{type:{type:String,required:!0,default:""},size:{type:[String,Number],default:23},color:{type:String,default:""}},setup(e){var t=te(()=>vy[e.type]);return()=>{var{value:r}=t;return I("uni-icon",null,[r&&r.d&&dn(r.d,e.color||r.c,_r(e.size))])}}}),hy={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},Dn={widthFix:["offsetWidth","height"],heightFix:["offsetHeight","width"]},gy={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},py=ge({name:"Image",props:hy,setup(e,t){var{emit:r}=t,i=U(null),a=my(i,e),n=Pe(i,r),{fixSize:o}=xy(i,e,a);return _y(a,o,n),()=>{var{mode:s}=e,{imgSrc:u,modeStyle:l,src:f}=a,d;return d=u?I("img",{src:u,draggable:e.draggable},null,8,["src","draggable"]):I("img",null,null),I("uni-image",{ref:i},[I("div",{style:l},null,4),d,Dn[s]?I(Ir,{onResize:o},null,8,["onResize"]):I("span",null,null)],512)}}});function my(e,t){var r=U(""),i=te(()=>{var n="auto",o="",s=gy[t.mode];return s?(s[0]&&(o=s[0]),s[1]&&(n=s[1])):(o="0% 0%",n="100% 100%"),"background-image:".concat(r.value?'url("'+r.value+'")':"none",";background-position:").concat(o,";background-size:").concat(n,";")}),a=ke({rootEl:e,src:te(()=>t.src?vt(t.src):""),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:i,imgSrc:r});return Re(()=>{var n=e.value,o=n.style;a.origWidth=Number(o.width)||0,a.origHeight=Number(o.height)||0}),a}function _y(e,t,r){var i,a=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";e.origWidth=s,e.origHeight=u,e.imgSrc=l},n=s=>{if(!s){o(),a();return}i=i||new Image,i.onload=u=>{var{width:l,height:f}=i;a(l,f,s),t(),o(),r("load",u,{width:l,height:f})},i.onerror=u=>{a(),o(),r("error",u,{errMsg:"GET ".concat(e.src," 404 (Not Found)")})},i.src=s},o=()=>{i&&(i.onload=null,i.onerror=null,i=null)};W(()=>e.src,s=>n(s)),Re(()=>n(e.src)),Ae(()=>o())}var by=navigator.vendor==="Google Inc.";function wy(e){return by&&e>10&&(e=Math.round(e/2)*2),e}function xy(e,t,r){var i=()=>{var{mode:n}=t,o=Dn[n];if(!!o){var{origWidth:s,origHeight:u}=r,l=s&&u?s/u:0;if(!!l){var f=e.value,d=f[o[0]];d&&(f.style[o[1]]=wy(d/l)+"px"),window.dispatchEvent(new CustomEvent("updateview"))}}},a=()=>{var{style:n}=e.value,{origStyle:{width:o,height:s}}=r;n.width=o,n.height=s};return W(()=>t.mode,(n,o)=>{Dn[o]&&a(),Dn[n]&&i()}),{fixSize:i,resetSize:a}}function yy(e,t){var r=0,i,a,n=function(){for(var o=arguments.length,s=new Array(o),u=0;u{a=null,r=l,e.apply(this,s)},l-rBn.forEach(t=>t.userAction=e);function Ey(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{userAction:!1};if(!Hd){var t=["touchstart","touchmove","touchend","mousedown","mouseup"];t.forEach(r=>{document.addEventListener(r,function(){!gl&&Wd(!0),gl++,setTimeout(()=>{!--gl&&Wd(!1)},0)},Sy)}),Hd=!0}Bn.push(e)}function Ty(e){var t=Bn.indexOf(e);t>=0&&Bn.splice(t,1)}function Cy(){var e=ke({userAction:!1});return Re(()=>{Ey(e)}),Ae(()=>{Ty(e)}),{state:e}}function Vd(){var e=ke({attrs:{}});return Re(()=>{for(var t=Dt();t;){var r=t.type.__scopeId;r&&(e.attrs[r]=""),t=t.proxy&&t.proxy.$mpType==="page"?null:t.parent}}),{state:e}}function Oy(e,t){var r=_e(It,!1);if(!!r){var i=Dt(),a={submit(){var n=i.proxy;return[n[e],typeof t=="string"?n[t]:t.value]},reset(){typeof t=="string"?i.proxy[t]="":t.value=""}};r.addField(a),Ae(()=>{r.removeField(a)})}}function Ay(e,t){var r=document.activeElement;if(!r)return t({});var i={};["input","textarea"].includes(r.tagName.toLowerCase())&&(i.start=r.selectionStart,i.end=r.selectionEnd),t(i)}var Iy=function(){bt(Gt(),"getSelectedTextRange",Ay)},ky=200,pl;function ml(e){return e===null?"":String(e)}var jd=ce({},{name:{type:String,default:""},modelValue:{type:[String,Number],default:""},value:{type:[String,Number],default:""},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1}},Ld),Yd=["input","focus","blur","update:value","update:modelValue","update:focus",...Pd];function My(e,t,r){var i=U(null),a=Pe(t,r),n=te(()=>{var d=Number(e.selectionStart);return isNaN(d)?-1:d}),o=te(()=>{var d=Number(e.selectionEnd);return isNaN(d)?-1:d}),s=te(()=>{var d=Number(e.cursor);return isNaN(d)?-1:d}),u=te(()=>{var d=Number(e.maxlength);return isNaN(d)?140:d}),l=ml(e.modelValue)||ml(e.value),f=ke({value:l,valueOrigin:l,maxlength:u,focus:e.focus,composing:!1,selectionStart:n,selectionEnd:o,cursor:s});return W(()=>f.focus,d=>r("update:focus",d)),W(()=>f.maxlength,d=>f.value=f.value.slice(0,d)),{fieldRef:i,state:f,trigger:a}}function Ry(e,t,r,i){var a=im(s=>{t.value=ml(s)},100);W(()=>e.modelValue,a),W(()=>e.value,a);var n=yy((s,u)=>{a.cancel(),r("update:modelValue",u.value),r("update:value",u.value),i("input",s,u)},100),o=(s,u,l)=>{a.cancel(),n(s,u),l&&n.flush()};return If(()=>{a.cancel(),n.cancel()}),{trigger:i,triggerInput:o}}function Ly(e,t){var{state:r}=Cy(),i=te(()=>e.autoFocus||e.focus);function a(){if(!!i.value){var o=t.value;if(!o||!("plus"in window)){setTimeout(a,100);return}{var s=ky-(Date.now()-pl);if(s>0){setTimeout(a,s);return}o.focus(),r.userAction||plus.key.showSoftKeybord()}}}function n(){var o=t.value;o&&o.blur()}W(()=>e.focus,o=>{o?a():n()}),Re(()=>{pl=pl||Date.now(),i.value&&Vr(a)})}function Py(e,t,r,i,a){function n(){var l=e.value;l&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&l.type!=="number"&&(l.selectionStart=t.selectionStart,l.selectionEnd=t.selectionEnd)}function o(){var l=e.value;l&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&l.type!=="number"&&(l.selectionEnd=l.selectionStart=t.cursor)}function s(l){return l.type==="number"?null:l.selectionEnd}function u(){var l=e.value,f=function(h){t.focus=!0,r("focus",h,{value:t.value}),n(),o()},d=function(h,w){h.stopPropagation(),!(typeof a=="function"&&a(h,t)===!1)&&(t.value=l.value,t.composing||i(h,{value:l.value,cursor:s(l)},w))},g=function(h){t.composing&&(t.composing=!1,d(h,!0)),t.focus=!1,r("blur",h,{value:t.value,cursor:s(h.target)})};l.addEventListener("change",h=>h.stopPropagation()),l.addEventListener("focus",f),l.addEventListener("blur",g),l.addEventListener("input",d),l.addEventListener("compositionstart",h=>{h.stopPropagation(),t.composing=!0}),l.addEventListener("compositionend",h=>{h.stopPropagation(),t.composing&&(t.composing=!1,d(h))})}W([()=>t.selectionStart,()=>t.selectionEnd],n),W(()=>t.cursor,o),W(()=>e.value,u)}function qd(e,t,r,i){Iy();var{fieldRef:a,state:n,trigger:o}=My(e,t,r),{triggerInput:s}=Ry(e,n,r,o);Ly(e,a),Nd(e,a,o);var{state:u}=Vd();Oy("name",n),Py(a,n,o,s,i);var l=String(navigator.vendor).indexOf("Apple")===0&&CSS.supports("image-orientation:from-image");return{fieldRef:a,state:n,scopedAttrsState:u,fixDisabledColor:l,trigger:o}}var Ny=ce({},jd,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),Dy=ge({name:"Input",props:Ny,emits:["confirm",...Yd],setup(e,t){var{emit:r}=t,i=["text","number","idcard","digit","password","tel"],a=["off","one-time-code"],n=te(()=>{var b="";switch(e.type){case"text":e.confirmType==="search"&&(b="search");break;case"idcard":b="text";break;case"digit":b="number";break;default:b=~i.includes(e.type)?e.type:"text";break}return e.password?"password":b}),o=te(()=>{var b=a.indexOf(e.textContentType),c=a.indexOf(Ge(e.textContentType)),v=b!==-1?b:c!==-1?c:0;return a[v]}),s=U(""),u,l=U(null),{fieldRef:f,state:d,scopedAttrsState:g,fixDisabledColor:h,trigger:w}=qd(e,l,r,(b,c)=>{var v=b.target;if(n.value==="number"){if(u&&(v.removeEventListener("blur",u),u=null),v.validity&&!v.validity.valid)return!s.value&&b.data==="-"||s.value[0]==="-"&&b.inputType==="deleteContentBackward"?(s.value="-",c.value="",u=()=>{s.value=v.value=""},v.addEventListener("blur",u),!1):(s.value=c.value=v.value=s.value==="-"?"":s.value,!1);s.value=v.value;var p=c.maxlength;if(p>0&&v.value.length>p)return v.value=v.value.slice(0,p),c.value=v.value,!1}}),_=["number","digit"],x=te(()=>_.includes(e.type)?"0.000000000000000001":"");function m(b){if(b.key==="Enter"){var c=b.target;b.stopPropagation(),w("confirm",b,{value:c.value}),!e.confirmHold&&c.blur()}}return()=>{var b=e.disabled&&h?I("input",{ref:f,value:d.value,tabindex:"-1",readonly:!!e.disabled,type:n.value,maxlength:d.maxlength,step:x.value,class:"uni-input-input",onFocus:c=>c.target.blur()},null,40,["value","readonly","type","maxlength","step","onFocus"]):I("input",{ref:f,value:d.value,disabled:!!e.disabled,type:n.value,maxlength:d.maxlength,step:x.value,enterkeyhint:e.confirmType,pattern:e.type==="number"?"[0-9]*":void 0,class:"uni-input-input",autocomplete:o.value,onKeyup:m},null,40,["value","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup"]);return I("uni-input",{ref:l},[I("div",{class:"uni-input-wrapper"},[ki(I("div",tt(g.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Pi,!(d.value.length||s.value==="-")]]),e.confirmType==="search"?I("form",{action:"",onSubmit:c=>c.preventDefault(),class:"uni-input-form"},[b],40,["onSubmit"]):b])],512)}}});function By(e){return Object.keys(e).map(t=>[t,e[t]])}var $y=["class","style"],Fy=/^on[A-Z]+/,Xd=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{excludeListeners:t=!1,excludeKeys:r=[]}=e,i=Dt(),a=Jo({}),n=Jo({}),o=Jo({}),s=r.concat($y);return i.attrs=ke(i.attrs),M0(()=>{var u=By(i.attrs).reduce((l,f)=>{var[d,g]=f;return s.includes(d)?l.exclude[d]=g:Fy.test(d)?(t||(l.attrs[d]=g),l.listeners[d]=g):l.attrs[d]=g,l},{exclude:{},attrs:{},listeners:{}});a.value=u.attrs,n.value=u.listeners,o.value=u.exclude}),{$attrs:a,$listeners:n,$excludeAttrs:o}},$n,ia;function Fn(){$r(()=>{$n||($n=plus.webview.currentWebview()),ia||(ia=($n.getStyle()||{}).pullToRefresh||{})})}function sr(e){var{disable:t}=e;ia&&ia.support&&$n.setPullToRefresh(Object.assign({},ia,{support:!t}))}function _l(e){var t=[];return Array.isArray(e)&&e.forEach(r=>{Qa(r)?r.type===xt?t.push(..._l(r.children)):t.push(r):Array.isArray(r)&&t.push(..._l(r))}),t}function aa(e){var t=Dt();t.rebuild=e}var zy={scaleArea:{type:Boolean,default:!1}},Uy=ge({inheritAttrs:!1,name:"MovableArea",props:zy,setup(e,t){var{slots:r}=t,i=U(null),a=U(!1),{setContexts:n,events:o}=Hy(e,i),{$listeners:s,$attrs:u,$excludeAttrs:l}=Xd(),f=s.value,d=["onTouchstart","onTouchmove","onTouchend"];d.forEach(m=>{var b=f[m],c=o["_".concat(m)];f[m]=b?[].concat(b,c):c}),Re(()=>{o._resize(),Fn(),a.value=!0});var g=[],h=[];function w(){for(var m=[],b=function(v){var p=g[v];p instanceof Element||(p=p.el);var y=h.find(E=>p===E.rootRef.value);y&&m.push(qa(y))},c=0;c{g=i.value.children,w()});var _=m=>{h.push(m),w()},x=m=>{var b=h.indexOf(m);b>=0&&(h.splice(b,1),w())};return ze("_isMounted",a),ze("movableAreaRootRef",i),ze("addMovableViewContext",_),ze("removeMovableViewContext",x),()=>(r.default&&r.default(),I("uni-movable-area",tt({ref:i},u.value,l.value,f),[I(Ir,{onReize:o._resize},null,8,["onReize"]),g],16))}});function Zd(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function Hy(e,t){var r=U(0),i=U(0),a=ke({x:null,y:null}),n=U(null),o=null,s=[];function u(_){_&&_!==1&&(e.scaleArea?s.forEach(function(x){x._setScale(_)}):o&&o._setScale(_))}function l(_){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,m=t.value;function b(c){for(var v=0;v{sr({disable:!0});var x=_.touches;if(x&&x.length>1){var m={x:x[1].pageX-x[0].pageX,y:x[1].pageY-x[0].pageY};if(n.value=Zd(m),a.x=m.x,a.y=m.y,!e.scaleArea){var b=l(x[0].target),c=l(x[1].target);o=b&&b===c?b:null}}}),d=Ar(_=>{var x=_.touches;if(x&&x.length>1){_.preventDefault();var m={x:x[1].pageX-x[0].pageX,y:x[1].pageY-x[0].pageY};if(a.x!==null&&n.value&&n.value>0){var b=Zd(m)/n.value;u(b)}a.x=m.x,a.y=m.y}}),g=Ar(_=>{sr({disable:!1});var x=_.touches;x&&x.length||_.changedTouches&&(a.x=0,a.y=0,n.value=null,e.scaleArea?s.forEach(function(m){m._endScale()}):o&&o._endScale())});function h(){w(),s.forEach(function(_,x){_.setParent()})}function w(){var _=window.getComputedStyle(t.value),x=t.value.getBoundingClientRect();r.value=x.width-["Left","Right"].reduce(function(m,b){var c="border"+b+"Width",v="padding"+b;return m+parseFloat(_[c])+parseFloat(_[v])},0),i.value=x.height-["Top","Bottom"].reduce(function(m,b){var c="border"+b+"Width",v="padding"+b;return m+parseFloat(_[c])+parseFloat(_[v])},0)}return ze("movableAreaWidth",r),ze("movableAreaHeight",i),{setContexts(_){s=_},events:{_onTouchstart:f,_onTouchmove:d,_onTouchend:g,_resize:h}}}var na=function(e,t,r,i){e.addEventListener(t,a=>{typeof r=="function"&&r(a)===!1&&((typeof a.cancelable!="undefined"?a.cancelable:!0)&&a.preventDefault(),a.stopPropagation())},{passive:!1})},Kd,Gd;function zn(e,t,r){Ae(()=>{document.removeEventListener("mousemove",Kd),document.removeEventListener("mouseup",Gd)});var i=0,a=0,n=0,o=0,s=function(h,w,_,x){if(t({target:h.target,currentTarget:h.currentTarget,preventDefault:h.preventDefault.bind(h),stopPropagation:h.stopPropagation.bind(h),touches:h.touches,changedTouches:h.changedTouches,detail:{state:w,x:_,y:x,dx:_-i,dy:x-a,ddx:_-n,ddy:x-o,timeStamp:h.timeStamp}})===!1)return!1},u=null,l,f;na(e,"touchstart",function(h){if(l=!0,h.touches.length===1&&!u)return u=h,i=n=h.touches[0].pageX,a=o=h.touches[0].pageY,s(h,"start",i,a)}),na(e,"mousedown",function(h){if(f=!0,!l&&!u)return u=h,i=n=h.pageX,a=o=h.pageY,s(h,"start",i,a)}),na(e,"touchmove",function(h){if(h.touches.length===1&&u){var w=s(h,"move",h.touches[0].pageX,h.touches[0].pageY);return n=h.touches[0].pageX,o=h.touches[0].pageY,w}});var d=Kd=function(h){if(!l&&f&&u){var w=s(h,"move",h.pageX,h.pageY);return n=h.pageX,o=h.pageY,w}};document.addEventListener("mousemove",d),na(e,"touchend",function(h){if(h.touches.length===0&&u)return l=!1,u=null,s(h,"end",h.changedTouches[0].pageX,h.changedTouches[0].pageY)});var g=Gd=function(h){if(f=!1,!l&&u)return u=null,s(h,"end",h.pageX,h.pageY)};document.addEventListener("mouseup",g),na(e,"touchcancel",function(h){if(u){l=!1;var w=u;return u=null,s(h,r?"cancel":"end",w.touches[0].pageX,w.touches[0].pageY)}})}function Un(e,t,r){return e>t-r&&ethis._t&&(e=this._t,this._lastDt=e);var t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,r=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(this._x_a>0&&tthis._endPositionX)&&(t=this._endPositionX),(this._y_a>0&&rthis._endPositionY)&&(r=this._endPositionY),{x:t,y:r}},kt.prototype.ds=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},kt.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},kt.prototype.dt=function(){return-this._x_v/this._x_a},kt.prototype.done=function(){var e=Un(this.s().x,this._endPositionX)||Un(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,e},kt.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},kt.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t};function it(e,t,r){this._m=e,this._k=t,this._c=r,this._solution=null,this._endPosition=0,this._startTime=0}it.prototype._solve=function(e,t){var r=this._c,i=this._m,a=this._k,n=r*r-4*i*a;if(n===0){var o=-r/(2*i),s=e,u=t/(o*e);return{x:function(m){return(s+u*m)*Math.pow(Math.E,o*m)},dx:function(m){var b=Math.pow(Math.E,o*m);return o*(s+u*m)*b+u*b}}}if(n>0){var l=(-r-Math.sqrt(n))/(2*i),f=(-r+Math.sqrt(n))/(2*i),d=(t-l*e)/(f-l),g=e-d;return{x:function(m){var b,c;return m===this._t&&(b=this._powER1T,c=this._powER2T),this._t=m,b||(b=this._powER1T=Math.pow(Math.E,l*m)),c||(c=this._powER2T=Math.pow(Math.E,f*m)),g*b+d*c},dx:function(m){var b,c;return m===this._t&&(b=this._powER1T,c=this._powER2T),this._t=m,b||(b=this._powER1T=Math.pow(Math.E,l*m)),c||(c=this._powER2T=Math.pow(Math.E,f*m)),g*l*b+d*f*c}}}var h=Math.sqrt(4*i*a-r*r)/(2*i),w=-r/2*i,_=e,x=(t-w*e)/h;return{x:function(m){return Math.pow(Math.E,w*m)*(_*Math.cos(h*m)+x*Math.sin(h*m))},dx:function(m){var b=Math.pow(Math.E,w*m),c=Math.cos(h*m),v=Math.sin(h*m);return b*(x*h*c-_*h*v)+w*b*(x*v+_*c)}}},it.prototype.x=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0},it.prototype.dx=function(e){return e===void 0&&(e=(new Date().getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0},it.prototype.setEnd=function(e,t,r){if(r||(r=new Date().getTime()),e!==this._endPosition||!kr(t,.1)){t=t||0;var i=this._endPosition;this._solution&&(kr(t,.1)&&(t=this._solution.dx((r-this._startTime)/1e3)),i=this._solution.x((r-this._startTime)/1e3),kr(t,.1)&&(t=0),kr(i,.1)&&(i=0),i+=this._endPosition),this._solution&&kr(i-e,.1)&&kr(t,.1)||(this._endPosition=e,this._solution=this._solve(i-this._endPosition,t),this._startTime=r)}},it.prototype.snap=function(e){this._startTime=new Date().getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}},it.prototype.done=function(e){return e||(e=new Date().getTime()),Un(this.x(),this._endPosition,.1)&&kr(this.dx(),.1)},it.prototype.reconfigure=function(e,t,r){this._m=e,this._k=t,this._c=r,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=new Date().getTime())},it.prototype.springConstant=function(){return this._k},it.prototype.damping=function(){return this._c},it.prototype.configuration=function(){function e(r,i){r.reconfigure(1,i,r.damping())}function t(r,i){r.reconfigure(1,r.springConstant(),i)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:e.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:t.bind(this,this),min:1,max:500}]};function oa(e,t,r){this._springX=new it(e,t,r),this._springY=new it(e,t,r),this._springScale=new it(e,t,r),this._startTime=0}oa.prototype.setEnd=function(e,t,r,i){var a=new Date().getTime();this._springX.setEnd(e,i,a),this._springY.setEnd(t,i,a),this._springScale.setEnd(r,i,a),this._startTime=a},oa.prototype.x=function(){var e=(new Date().getTime()-this._startTime)/1e3;return{x:this._springX.x(e),y:this._springY.x(e),scale:this._springScale.x(e)}},oa.prototype.done=function(){var e=new Date().getTime();return this._springX.done(e)&&this._springY.done(e)&&this._springScale.done(e)},oa.prototype.reconfigure=function(e,t,r){this._springX.reconfigure(e,t,r),this._springY.reconfigure(e,t,r),this._springScale.reconfigure(e,t,r)};var Wy={direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.5},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},Vy=ge({name:"MovableView",props:Wy,emits:["change","scale"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=Pe(a,i),{setParent:o}=jy(e,n,a);return()=>I("uni-movable-view",{ref:a},[I(Ir,{onResize:o},null,8,["onResize"]),r.default&&r.default()],512)}}),wl=!1;function Jd(e){wl||(wl=!0,requestAnimationFrame(function(){e(),wl=!1}))}function Qd(e,t){if(e===t)return 0;var r=e.offsetLeft;return e.offsetParent?r+=Qd(e.offsetParent,t):0}function eh(e,t){if(e===t)return 0;var r=e.offsetTop;return e.offsetParent?r+=eh(e.offsetParent,t):0}function th(e,t){return+((1e3*e-1e3*t)/1e3).toFixed(1)}function rh(e,t,r){var i={id:0,cancelled:!1},a=function(o){o&&o.id&&cancelAnimationFrame(o.id),o&&(o.cancelled=!0)};function n(o,s,u,l){if(!o||!o.cancelled){u(s);var f=s.done();f||o.cancelled||(o.id=requestAnimationFrame(n.bind(null,o,s,u,l))),f&&l&&l(s)}}return n(i,e,t,r),{cancel:a.bind(null,i),model:e}}function Hn(e){return/\d+[ur]px$/i.test(e)?uni.upx2px(parseFloat(e)):Number(e)||0}function jy(e,t,r){var i=_e("movableAreaWidth",U(0)),a=_e("movableAreaHeight",U(0)),n=_e("_isMounted",U(!1)),o=_e("movableAreaRootRef"),s=_e("addMovableViewContext",()=>{}),u=_e("removeMovableViewContext",()=>{}),l=U(Hn(e.x)),f=U(Hn(e.y)),d=U(Number(e.scaleValue)||1),g=U(0),h=U(0),w=U(0),_=U(0),x=U(0),m=U(0),b=null,c=null,v={x:0,y:0},p={x:0,y:0},y=1,E=1,C=0,O=0,P=!1,M=!1,H,re,R=null,B=null,X=new bl,Q=new bl,V={historyX:[0,0],historyY:[0,0],historyT:[0,0]},K=te(()=>{var A=Number(e.damping);return isNaN(A)?20:A}),ae=te(()=>{var A=Number(e.friction);return isNaN(A)||A<=0?2:A}),Te=te(()=>{var A=Number(e.scaleMin);return isNaN(A)?.5:A}),oe=te(()=>{var A=Number(e.scaleMax);return isNaN(A)?10:A}),de=te(()=>e.direction==="all"||e.direction==="horizontal"),le=te(()=>e.direction==="all"||e.direction==="vertical"),J=new oa(1,9*Math.pow(K.value,2)/40,K.value),ye=new kt(1,ae.value);W(()=>e.x,A=>{l.value=Hn(A)}),W(()=>e.y,A=>{f.value=Hn(A)}),W(l,A=>{Ve(A)}),W(f,A=>{lr(A)}),W(()=>e.scaleValue,A=>{d.value=Number(A)||0}),W(d,A=>{fa(A)}),W(Te,()=>{Ne()}),W(oe,()=>{Ne()});function be(){c&&c.cancel(),b&&b.cancel()}function Ve(A){if(de.value){if(A+p.x===C)return C;b&&b.cancel(),ee(A+p.x,f.value+p.y,y)}return A}function lr(A){if(le.value){if(A+p.y===O)return O;b&&b.cancel(),ee(l.value+p.x,A+p.y,y)}return A}function Ne(){if(!e.scale)return!1;$(y,!0),z(y)}function fa(A){return e.scale?(A=D(A),$(A,!0),z(A),A):!1}function ca(){P||e.disabled||(sr({disable:!0}),be(),V.historyX=[0,0],V.historyY=[0,0],V.historyT=[0,0],de.value&&(H=C),le.value&&(re=O),r.value.style.willChange="transform",R=null,B=null,M=!0)}function S(A){if(!P&&!e.disabled&&M){var Y=C,q=O;if(B===null&&(B=Math.abs(A.detail.dx/A.detail.dy)>1?"htouchmove":"vtouchmove"),de.value&&(Y=A.detail.dx+H,V.historyX.shift(),V.historyX.push(Y),!le.value&&R===null&&(R=Math.abs(A.detail.dx/A.detail.dy)<1)),le.value&&(q=A.detail.dy+re,V.historyY.shift(),V.historyY.push(q),!de.value&&R===null&&(R=Math.abs(A.detail.dy/A.detail.dx)<1)),V.historyT.shift(),V.historyT.push(A.detail.timeStamp),!R){A.preventDefault();var he="touch";Yx.value&&(e.outOfBounds?(he="touch-out-of-bounds",Y=x.value+X.x(Y-x.value)):Y=x.value),q<_.value?e.outOfBounds?(he="touch-out-of-bounds",q=_.value-Q.x(_.value-q)):q=_.value:q>m.value&&(e.outOfBounds?(he="touch-out-of-bounds",q=m.value+Q.x(q-m.value)):q=m.value),Jd(function(){Z(Y,q,y,he)})}}}function T(){if(!P&&!e.disabled&&M&&(sr({disable:!1}),r.value.style.willChange="auto",M=!1,!R&&!G("out-of-bounds")&&e.inertia)){var A=1e3*(V.historyX[1]-V.historyX[0])/(V.historyT[1]-V.historyT[0]),Y=1e3*(V.historyY[1]-V.historyY[0])/(V.historyT[1]-V.historyT[0]);ye.setV(A,Y),ye.setS(C,O);var q=ye.delta().x,he=ye.delta().y,ue=q+C,$e=he+O;uex.value&&(ue=x.value,$e=O+(x.value-C)*he/q),$e<_.value?($e=_.value,ue=C+(_.value-O)*q/he):$e>m.value&&($e=m.value,ue=C+(m.value-O)*q/he),ye.setEnd(ue,$e),c=rh(ye,function(){var Ke=ye.s(),De=Ke.x,gt=Ke.y;Z(De,gt,y,"friction")},function(){c.cancel()})}!e.outOfBounds&&!e.inertia&&be()}function k(A,Y){var q=!1;return A>x.value?(A=x.value,q=!0):Am.value?(Y=m.value,q=!0):Y<_.value&&(Y=_.value,q=!0),{x:A,y:Y,outOfBounds:q}}function L(){v.x=Qd(r.value,o.value),v.y=eh(r.value,o.value)}function N(A){A=A||y,A=D(A);var Y=r.value.getBoundingClientRect();h.value=Y.height/y,g.value=Y.width/y;var q=h.value*A,he=g.value*A;p.x=(he-g.value)/2,p.y=(q-h.value)/2}function F(){var A=0-v.x+p.x,Y=i.value-g.value-v.x-p.x;w.value=Math.min(A,Y),x.value=Math.max(A,Y);var q=0-v.y+p.y,he=a.value-h.value-v.y-p.y;_.value=Math.min(q,he),m.value=Math.max(q,he)}function j(){P=!0}function $(A,Y){if(e.scale){A=D(A),N(A),F();var q=k(C,O),he=q.x,ue=q.y;Y?ee(he,ue,A,"",!0,!0):Jd(function(){Z(he,ue,A,"",!0,!0)})}}function z(A){E=A}function D(A){return A=Math.max(.5,Te.value,A),A=Math.min(10,oe.value,A),A}function ee(A,Y,q,he,ue,$e){be(),de.value||(A=C),le.value||(Y=O),e.scale||(q=y);var Ke=k(A,Y);if(A=Ke.x,Y=Ke.y,!e.animation){Z(A,Y,q,he,ue,$e);return}J._springX._solution=null,J._springY._solution=null,J._springScale._solution=null,J._springX._endPosition=C,J._springY._endPosition=O,J._springScale._endPosition=y,J.setEnd(A,Y,q,1),b=rh(J,function(){var De=J.x(),gt=De.x,ur=De.y,Mt=De.scale;Z(gt,ur,Mt,he,ue,$e)},function(){b.cancel()})}function G(A){var Y=k(C,O),q=Y.x,he=Y.y,ue=Y.outOfBounds;return ue&&ee(q,he,y,A),ue}function Z(A,Y,q){var he=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",ue=arguments.length>4?arguments[4]:void 0,$e=arguments.length>5?arguments[5]:void 0;A!==null&&A.toString()!=="NaN"&&typeof A=="number"||(A=C||0),Y!==null&&Y.toString()!=="NaN"&&typeof Y=="number"||(Y=O||0),A=Number(A.toFixed(1)),Y=Number(Y.toFixed(1)),q=Number(q.toFixed(1)),C===A&&O===Y||ue||t("change",{},{x:th(A,p.x),y:th(Y,p.y),source:he}),e.scale||(q=y),q=D(q),q=+q.toFixed(3),$e&&q!==y&&t("scale",{},{x:A,y:Y,scale:q});var Ke="translateX("+A+"px) translateY("+Y+"px) translateZ(0px) scale("+q+")";r.value.style.transform=Ke,r.value.style.webkitTransform=Ke,C=A,O=Y,y=q}function fe(){if(!!n.value){be();var A=e.scale?d.value:1;L(),N(A),F(),C=l.value+p.x,O=f.value+p.y;var Y=k(C,O),q=Y.x,he=Y.y;Z(q,he,A,"",!0),z(A)}}function Be(){P=!1,z(y)}function Oe(A){A&&(A=E*A,j(),$(A))}return Re(()=>{zn(r.value,Y=>{switch(Y.detail.state){case"start":ca();break;case"move":S(Y);break;case"end":T()}}),fe(),ye.reconfigure(1,ae.value),J.reconfigure(1,9*Math.pow(K.value,2)/40,K.value),r.value.style.transformOrigin="center",Fn();var A={rootRef:r,setParent:fe,_endScale:Be,_setScale:Oe};s(A),Zt(()=>{u(A)})}),Zt(()=>{be()}),{setParent:fe}}var Yy=["navigate","redirect","switchTab","reLaunch","navigateBack"],qy={hoverClass:{type:String,default:"navigator-hover"},url:{type:String,default:""},openType:{type:String,default:"navigate",validator(e){return Boolean(~Yy.indexOf(e))}},delta:{type:Number,default:1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:600},exists:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1}};function Xy(e){return()=>{if(e.openType!=="navigateBack"&&!e.url){console.error(" should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab");return}switch(e.openType){case"navigate":uni.navigateTo({url:e.url});break;case"redirect":uni.redirectTo({url:e.url,exists:e.exists});break;case"switchTab":uni.switchTab({url:e.url});break;case"reLaunch":uni.reLaunch({url:e.url});break;case"navigateBack":uni.navigateBack({delta:e.delta});break}}}var Zy=ge({name:"Navigator",inheritAttrs:!1,compatConfig:{MODE:3},props:qy,setup(e,t){var{slots:r}=t,i=Dt(),a=i&&i.root.type.__scopeId||"",{hovering:n,binding:o}=vl(e),s=Xy(e);return()=>{var{hoverClass:u,url:l}=e,f=e.hoverClass&&e.hoverClass!=="none";return I("a",{class:"navigator-wrap",href:l,onClick:cc},[I("uni-navigator",tt({class:f&&n.value?u:""},f&&o,i?i.attrs:{},{[a]:""},{onClick:s}),[r.default&&r.default()],16,["onClick"])],8,["href","onClick"])}}}),Ky={value:{type:Array,default(){return[]},validator:function(e){return Array.isArray(e)&&e.filter(t=>typeof t=="number").length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}};function Gy(e){var t=ke([...e.value]),r=ke({value:t,height:34});return W(()=>e.value,(i,a)=>{(i===a||i.length!==a.length||i.findIndex((n,o)=>n!==a[o])>=0)&&(r.value.length=i.length,i.forEach((n,o)=>{n!==r.value[o]&&r.value.splice(o,1,n)}))}),r}var Jy=ge({name:"PickerView",props:Ky,emits:["change","pickstart","pickend","update:value"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=U(null),o=Pe(a,i),s=Gy(e),u=U(null),l=()=>{var w=u.value;s.height=w.$el.offsetHeight},f=U([]),d=U([]);function g(w){var _=d.value;if(_ instanceof HTMLCollection)return Array.prototype.indexOf.call(_,w.el);_=_.filter(m=>m.type!==jr);var x=_.indexOf(w);return x!==-1?x:f.value.indexOf(w)}var h=function(w){var _=te({get(){var x=g(w.vnode);return s.value[x]||0},set(x){var m=g(w.vnode);if(!(m<0)){var b=s.value[m];if(b!==x){s.value[m]=x;var c=s.value.map(v=>v);i("update:value",c),o("change",{},{value:c})}}}});return _};return ze("getPickerViewColumn",h),ze("pickerViewProps",e),ze("pickerViewState",s),aa(()=>{l(),d.value=n.value.children}),()=>{var w=r.default&&r.default();return I("uni-picker-view",{ref:a},[I(Ir,{ref:u,onResize:_=>{var{height:x}=_;return s.height=x}},null,8,["onResize"]),I("div",{ref:n,class:"uni-picker-view-wrapper"},[w],512)],512)}}});class ih{constructor(t){this._drag=t,this._dragLog=Math.log(t),this._x=0,this._v=0,this._startTime=0}set(t,r){this._x=t,this._v=r,this._startTime=new Date().getTime()}setVelocityByEnd(t){this._v=(t-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(t){t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3);var r=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t);return this._dt=t,this._x+this._v*r/this._dragLog-this._v/this._dragLog}dx(t){t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3);var r=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t);return this._dt=t,this._v*r}done(){return Math.abs(this.dx())<3}reconfigure(t){var r=this.x(),i=this.dx();this._drag=t,this._dragLog=Math.log(t),this.set(r,i)}configuration(){var t=this;return[{label:"Friction",read:function(){return t._drag},write:function(r){t.reconfigure(r)},min:.001,max:.1,step:.001}]}}function ah(e,t,r){return e>t-r&&e0){var f=(-i-Math.sqrt(o))/(2*a),d=(-i+Math.sqrt(o))/(2*a),g=(r-f*t)/(d-f),h=t-g;return{x:function(b){var c,v;return b===this._t&&(c=this._powER1T,v=this._powER2T),this._t=b,c||(c=this._powER1T=Math.pow(Math.E,f*b)),v||(v=this._powER2T=Math.pow(Math.E,d*b)),h*c+g*v},dx:function(b){var c,v;return b===this._t&&(c=this._powER1T,v=this._powER2T),this._t=b,c||(c=this._powER1T=Math.pow(Math.E,f*b)),v||(v=this._powER2T=Math.pow(Math.E,d*b)),h*f*c+g*d*v}}}var w=Math.sqrt(4*a*n-i*i)/(2*a),_=-i/2*a,x=t,m=(r-_*t)/w;return{x:function(b){return Math.pow(Math.E,_*b)*(x*Math.cos(w*b)+m*Math.sin(w*b))},dx:function(b){var c=Math.pow(Math.E,_*b),v=Math.cos(w*b),p=Math.sin(w*b);return c*(m*w*v-x*w*p)+_*c*(m*p+x*v)}}}x(t){return t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0}dx(t){return t===void 0&&(t=(new Date().getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0}setEnd(t,r,i){if(i||(i=new Date().getTime()),t!==this._endPosition||!Mr(r,.4)){r=r||0;var a=this._endPosition;this._solution&&(Mr(r,.4)&&(r=this._solution.dx((i-this._startTime)/1e3)),a=this._solution.x((i-this._startTime)/1e3),Mr(r,.4)&&(r=0),Mr(a,.4)&&(a=0),a+=this._endPosition),this._solution&&Mr(a-t,.4)&&Mr(r,.4)||(this._endPosition=t,this._solution=this._solve(a-this._endPosition,r),this._startTime=i)}}snap(t){this._startTime=new Date().getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}}done(t){return t||(t=new Date().getTime()),ah(this.x(),this._endPosition,.4)&&Mr(this.dx(),.4)}reconfigure(t,r,i){this._m=t,this._k=r,this._c=i,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=new Date().getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){function t(i,a){i.reconfigure(1,a,i.damping())}function r(i,a){i.reconfigure(1,i.springConstant(),a)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:r.bind(this,this),min:1,max:500}]}}class Qy{constructor(t,r,i){this._extent=t,this._friction=r||new ih(.01),this._spring=i||new nh(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(t,r){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(r)}set(t,r){this._friction.set(t,r),t>0&&r>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&r<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=new Date().getTime()}x(t){if(!this._startTime)return 0;if(t||(t=(new Date().getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var r=this._friction.x(t),i=this.dx(t);return(r>0&&i>=0||r<-this._extent&&i<=0)&&(this._springing=!0,this._spring.setEnd(0,i),r<-this._extent?this._springOffset=-this._extent:this._springOffset=0,r=this._spring.x()+this._springOffset),r}dx(t){var r;return this._lastTime===t?r=this._lastDx:r=this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=r,r}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(t){this._friction.setVelocityByEnd(t)}configuration(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t}}function eS(e,t,r){var i={id:0,cancelled:!1};function a(o,s,u,l){if(!o||!o.cancelled){u(s);var f=s.done();f||o.cancelled||(o.id=requestAnimationFrame(a.bind(null,o,s,u,l))),f&&l&&l(s)}}function n(o){o&&o.id&&cancelAnimationFrame(o.id),o&&(o.cancelled=!0)}return a(i,e,t,r),{cancel:n.bind(null,i),model:e}}class tS{constructor(t,r){r=r||{},this._element=t,this._options=r,this._enableSnap=r.enableSnap||!1,this._itemSize=r.itemSize||0,this._enableX=r.enableX||!1,this._enableY=r.enableY||!1,this._shouldDispatchScrollEvent=!!r.onScroll,this._enableX?(this._extent=(r.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=r.scrollWidth):(this._extent=(r.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=r.scrollHeight),this._position=0,this._scroll=new Qy(this._extent,r.friction,r.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(t,r){var i=this._startPosition;this._enableX?i+=t:this._enableY&&(i+=r),i>0?i*=.5:i<-this._extent&&(i=.5*(i+this._extent)-this._extent),this._position=i,this.updatePosition(),this.dispatchScroll()}onTouchEnd(t,r,i){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(r)this._itemSize/2?n-(this._itemSize-Math.abs(o)):n-o,a<=0&&a>=-this._extent&&this._scroll.setVelocityByEnd(a)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=eS(this._scroll,()=>{var s=Date.now(),u=(s-this._scroll._startTime)/1e3,l=this._scroll.x(u);this._position=l,this.updatePosition();var f=this._scroll.dx(u);this._shouldDispatchScrollEvent&&s-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/f),this._lastTime=s)},()=>{this._enableSnap&&(a<=0&&a>=-this._extent&&(this._position=a,this.updatePosition()),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1})}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){var t=this._itemSize,r=this._position%t,i=Math.abs(r)>this._itemSize/2?this._position-(t-Math.abs(r)):this._position-r;this._position!==i&&(this._snapping=!0,this.scrollTo(-i),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(t,r){this._animation&&(this._animation.cancel(),this._scrolling=!1),typeof t=="number"&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);var i="transform "+(r||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+i,this._element.style.transition=i,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(typeof this._options.onScroll=="function"&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}}update(t,r,i){var a=0,n=this._position;this._enableX?(a=this._element.childNodes.length?(r||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=r):(a=this._element.childNodes.length?(r||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=r),typeof t=="number"&&(this._position=-t),this._position<-a?this._position=-a:this._position>0&&(this._position=0),this._itemSize=i||this._itemSize,this.updatePosition(),n!==this._position&&(this.dispatchScroll(),typeof this._options.onSnap=="function"&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=a,this._scroll._extent=a}updatePosition(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t}isScrolling(){return this._scrolling||this._snapping}}function rS(e,t){var r={trackingID:-1,maxDy:0,maxDx:0},i=new tS(e,t);function a(u){var l=u,f=u;return l.detail.state==="move"||l.detail.state==="end"?{x:l.detail.dx,y:l.detail.dy}:{x:f.screenX-r.x,y:f.screenY-r.y}}function n(u){var l=u,f=u;l.detail.state==="start"?(r.trackingID="touch",r.x=l.detail.x,r.y=l.detail.y):(r.trackingID="mouse",r.x=f.screenX,r.y=f.screenY),r.maxDx=0,r.maxDy=0,r.historyX=[0],r.historyY=[0],r.historyTime=[l.detail.timeStamp||f.timeStamp],r.listener=i,i.onTouchStart&&i.onTouchStart(),u.preventDefault()}function o(u){var l=u,f=u;if(r.trackingID!==-1){u.preventDefault();var d=a(u);if(d){for(r.maxDy=Math.max(r.maxDy,Math.abs(d.y)),r.maxDx=Math.max(r.maxDx,Math.abs(d.x)),r.historyX.push(d.x),r.historyY.push(d.y),r.historyTime.push(l.detail.timeStamp||f.timeStamp);r.historyTime.length>10;)r.historyTime.shift(),r.historyX.shift(),r.historyY.shift();r.listener&&r.listener.onTouchMove&&r.listener.onTouchMove(d.x,d.y)}}}function s(u){if(r.trackingID!==-1){u.preventDefault();var l=a(u);if(l){var f=r.listener;r.trackingID=-1,r.listener=null;var d=r.historyTime.length,g={x:0,y:0};if(d>2)for(var h=r.historyTime.length-1,w=r.historyTime[h],_=r.historyX[h],x=r.historyY[h];h>0;){h--;var m=r.historyTime[h],b=w-m;if(b>30&&b<50){g.x=(_-r.historyX[h])/(b/1e3),g.y=(x-r.historyY[h])/(b/1e3);break}}r.historyTime=[],r.historyX=[],r.historyY=[],f&&f.onTouchEnd&&f.onTouchEnd(l.x,l.y,g)}}}return{scroller:i,handleTouchStart:n,handleTouchMove:o,handleTouchEnd:s}}var iS=0;function aS(e){var t="uni-picker-view-content-".concat(iS++);function r(){var i=document.createElement("style");i.innerText=".uni-picker-view-content.".concat(t,">*{height: ").concat(e.value,"px;overflow: hidden;}"),document.head.appendChild(i)}return W(()=>e.value,r),t}function nS(e){var t=20,r=0,i=0;e.addEventListener("touchstart",a=>{var n=a.changedTouches[0];r=n.clientX,i=n.clientY}),e.addEventListener("touchend",a=>{var n=a.changedTouches[0];if(Math.abs(n.clientX-r){s[l]=n[l]}),a.target.dispatchEvent(s)}})}var oS=ge({name:"PickerViewColumn",setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=U(null),o=_e("getPickerViewColumn"),s=Dt(),u=o?o(s):U(0),l=_e("pickerViewProps"),f=_e("pickerViewState"),d=U(34),g=U(null),h=()=>{var O=g.value;d.value=O.$el.offsetHeight},w=te(()=>(f.height-d.value)/2),{state:_}=Vd(),x=aS(d),m,b=ke({current:u.value,length:0}),c;function v(){m&&!c&&(c=!0,Vr(()=>{c=!1;var O=Math.min(b.current,b.length-1);O=Math.max(O,0),m.update(O*d.value,void 0,d.value)}))}W(()=>u.value,O=>{O!==b.current&&(b.current=O,v())}),W(()=>b.current,O=>u.value=O),W([()=>d.value,()=>b.length,()=>f.height],v);var p=0;function y(O){var P=p+O.deltaY;if(Math.abs(P)>10){p=0;var M=Math.min(b.current+(P<0?-1:1),b.length-1);b.current=M=Math.max(M,0),m.scrollTo(M*d.value)}else p=P;O.preventDefault()}function E(O){var{clientY:P}=O,M=a.value;if(!m.isScrolling()){var H=M.getBoundingClientRect(),re=P-H.top-f.height/2,R=d.value/2;if(!(Math.abs(re)<=R)){var B=Math.ceil((Math.abs(re)-R)/d.value),X=re<0?-B:B,Q=Math.min(b.current+X,b.length-1);b.current=Q=Math.max(Q,0),m.scrollTo(Q*d.value)}}}var C=()=>{var O=a.value,P=n.value,{scroller:M,handleTouchStart:H,handleTouchMove:re,handleTouchEnd:R}=rS(P,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:d.value,friction:new ih(1e-4),spring:new nh(2,90,20),onSnap:B=>{!isNaN(B)&&B!==b.current&&(b.current=B)}});m=M,zn(O,B=>{switch(B.detail.state){case"start":H(B),sr({disable:!0});break;case"move":re(B),B.stopPropagation();break;case"end":case"cancel":R(B),sr({disable:!1})}},!0),nS(O),Fn(),v()};return aa(()=>{b.length=n.value.children.length,h(),C()}),()=>{var O=r.default&&r.default(),P="".concat(w.value,"px 0");return I("uni-picker-view-column",{ref:a},[I("div",{onWheel:y,onClick:E,class:"uni-picker-view-group"},[I("div",tt(_.attrs,{class:["uni-picker-view-mask",l.maskClass],style:"background-size: 100% ".concat(w.value,"px;").concat(l.maskStyle)}),null,16),I("div",tt(_.attrs,{class:["uni-picker-view-indicator",l.indicatorClass],style:l.indicatorStyle}),[I(Ir,{ref:g,onResize:M=>{var{height:H}=M;return d.value=H}},null,8,["onResize"])],16),I("div",{ref:n,class:["uni-picker-view-content",x],style:{padding:P}},[O],6)],40,["onWheel","onClick"])],512)}}}),Rr={activeColor:Pa,backgroundColor:"#EBEBEB",activeMode:"backwards"},sS={percent:{type:[Number,String],default:0,validator(e){return!isNaN(parseFloat(e))}},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator(e){return!isNaN(parseFloat(e))}},color:{type:String,default:Rr.activeColor},activeColor:{type:String,default:Rr.activeColor},backgroundColor:{type:String,default:Rr.backgroundColor},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:Rr.activeMode},duration:{type:[Number,String],default:30,validator(e){return!isNaN(parseFloat(e))}}},lS=ge({name:"Progress",props:sS,setup(e){var t=uS(e);return oh(t,e),W(()=>t.realPercent,(r,i)=>{t.strokeTimer&&clearInterval(t.strokeTimer),t.lastPercent=i||0,oh(t,e)}),()=>{var{showInfo:r}=e,{outerBarStyle:i,innerBarStyle:a,currentPercent:n}=t;return I("uni-progress",{class:"uni-progress"},[I("div",{style:i,class:"uni-progress-bar"},[I("div",{style:a,class:"uni-progress-inner-bar"},null,4)],4),r?I("p",{class:"uni-progress-info"},[n+"%"]):""])}}});function uS(e){var t=U(0),r=te(()=>"background-color: ".concat(e.backgroundColor,"; height: ").concat(e.strokeWidth,"px;")),i=te(()=>{var o=e.color!==Rr.activeColor&&e.activeColor===Rr.activeColor?e.color:e.activeColor;return"width: ".concat(t.value,"%;background-color: ").concat(o)}),a=te(()=>{var o=parseFloat(e.percent);return o<0&&(o=0),o>100&&(o=100),o}),n=ke({outerBarStyle:r,innerBarStyle:i,realPercent:a,currentPercent:t,strokeTimer:0,lastPercent:0});return n}function oh(e,t){t.active?(e.currentPercent=t.activeMode===Rr.activeMode?0:e.lastPercent,e.strokeTimer=setInterval(()=>{e.currentPercent+1>e.realPercent?(e.currentPercent=e.realPercent,e.strokeTimer&&clearInterval(e.strokeTimer)):e.currentPercent+=1},parseFloat(t.duration))):e.currentPercent=e.realPercent}var sh=cn("ucg"),fS={name:{type:String,default:""}},cS=ge({name:"RadioGroup",props:fS,setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=Pe(a,r);return vS(e,n),()=>I("uni-radio-group",{ref:a},[i.default&&i.default()],512)}});function vS(e,t){var r=[];Re(()=>{s(r.length-1)});var i=()=>{var u;return(u=r.find(l=>l.value.radioChecked))===null||u===void 0?void 0:u.value.value};ze(sh,{addField(u){r.push(u)},removeField(u){r.splice(r.indexOf(u),1)},radioChange(u,l){var f=r.indexOf(l);s(f,!0),t("change",u,{value:i()})}});var a=_e(It,!1),n={submit:()=>{var u=["",null];return e.name!==""&&(u[0]=e.name,u[1]=i()),u}};a&&(a.addField(n),Ae(()=>{a.removeField(n)}));function o(u,l){u.value={radioChecked:l,value:u.value.value}}function s(u,l){r.forEach((f,d)=>{d!==u&&(l?o(r[d],!1):r.forEach((g,h)=>{d>=h||r[h].value.radioChecked&&o(r[d],!1)}))})}return r}var dS={checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"},value:{type:String,default:""}},hS=ge({name:"Radio",props:dS,setup(e,t){var{slots:r}=t,i=U(e.checked),a=U(e.value),n=te(()=>"background-color: ".concat(e.color,";border-color: ").concat(e.color,";"));W([()=>e.checked,()=>e.value],d=>{var[g,h]=d;i.value=g,a.value=h});var o=()=>{i.value=!1},{uniCheckGroup:s,uniLabel:u,field:l}=gS(i,a,o),f=d=>{e.disabled||(i.value=!0,s&&s.radioChange(d,l))};return u&&(u.addHandler(f),Ae(()=>{u.removeHandler(f)})),Rn(e,{"label-click":f}),()=>{var d=ai(e,"disabled");return I("uni-radio",tt(d,{onClick:f}),[I("div",{class:"uni-radio-wrapper"},[I("div",{class:["uni-radio-input",{"uni-radio-input-disabled":e.disabled}],style:i.value?n.value:""},[i.value?dn(vn,"#fff",18):""],6),r.default&&r.default()])],16,["onClick"])}}});function gS(e,t,r){var i=te({get:()=>({radioChecked:Boolean(e.value),value:t.value}),set:u=>{var{radioChecked:l}=u;e.value=l}}),a={reset:r},n=_e(sh,!1);n&&n.addField(i);var o=_e(It,!1);o&&o.addField(a);var s=_e(Qi,!1);return Ae(()=>{n&&n.removeField(i),o&&o.removeField(a)}),{uniCheckGroup:n,uniForm:o,uniLabel:s,field:i}}function pS(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/\n/,"").replace(/\n/,"")}function mS(e){return e.reduce(function(t,r){var i=r.value,a=r.name;return i.match(/ /)&&a!=="style"&&(i=i.split(" ")),t[a]?Array.isArray(t[a])?t[a].push(i):t[a]=[t[a],i]:t[a]=i,t},{})}function _S(e){e=pS(e);var t=[],r={node:"root",children:[]};return $d(e,{start:function(i,a,n){var o={name:i};if(a.length!==0&&(o.attrs=mS(a)),n){var s=t[0]||r;s.children||(s.children=[]),s.children.push(o)}else t.unshift(o)},end:function(i){var a=t.shift();if(a.name!==i&&console.error("invalid state: mismatch end tag"),t.length===0)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},chars:function(i){var a={type:"text",text:i};if(t.length===0)r.children.push(a);else{var n=t[0];n.children||(n.children=[]),n.children.push(a)}},comment:function(i){var a={node:"comment",text:i},n=t[0];n.children||(n.children=[]),n.children.push(a)}}),r.children}var lh={a:"",abbr:"",address:"",article:"",aside:"",b:"",bdi:"",bdo:["dir"],big:"",blockquote:"",br:"",caption:"",center:"",cite:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",font:"",footer:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",header:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",mark:"",nav:"",ol:["start","type"],p:"",pre:"",q:"",rt:"",ruby:"",s:"",section:"",small:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","height","rowspan","width"],tfoot:"",th:["colspan","height","rowspan","width"],thead:"",tr:["colspan","height","rowspan","width"],tt:"",u:"",ul:""},xl={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'"};function bS(e){return e.replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,function(t,r){if(ie(xl,r)&&xl[r])return xl[r];if(/^#[0-9]{1,4}$/.test(r))return String.fromCharCode(r.slice(1));if(/^#x[0-9a-f]{1,4}$/i.test(r))return String.fromCharCode("0"+r.slice(1));var i=document.createElement("div");return i.innerHTML=t,i.innerText||i.textContent})}function wS(e,t,r){return e==="img"&&t==="src"?vt(r):r}function uh(e,t,r,i){return e.forEach(function(a){if(!!mt(a))if(!ie(a,"type")||a.type==="node"){if(!(typeof a.name=="string"&&a.name))return;var n=a.name.toLowerCase();if(!ie(lh,n))return;var o=document.createElement(n);if(!o)return;var s=a.attrs;if(mt(s)){var u=lh[n]||[];Object.keys(s).forEach(function(f){var d=s[f];switch(f){case"class":Array.isArray(d)&&(d=d.join(" "));case"style":o.setAttribute(f,d),r&&o.setAttribute(r,"");break;default:u.indexOf(f)!==-1&&o.setAttribute(f,wS(n,f,d))}})}xS(a,o,i);var l=a.children;Array.isArray(l)&&l.length&&uh(a.children,o,r,i),t.appendChild(o)}else a.type==="text"&&typeof a.text=="string"&&a.text!==""&&t.appendChild(document.createTextNode(bS(a.text)))}),t}function xS(e,t,r){["a","img"].includes(e.name)&&r&&(t.setAttribute("onClick","return false;"),t.addEventListener("click",i=>{r(i,{node:e}),i.stopPropagation()},!0))}var yS={nodes:{type:[Array,String],default:function(){return[]}}},SS=ge({name:"RichText",compatConfig:{MODE:3},props:yS,emits:["click","touchstart","touchmove","touchcancel","touchend","longpress"],setup(e,t){var{emit:r,attrs:i}=t,a=Dt(),n=U(null),o=Pe(n,r),s=!!i.onItemclick;function u(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o("itemclick",f,d)}function l(f){typeof f=="string"&&(f=_S(f));var d=uh(f,document.createDocumentFragment(),(a&&a.root.type).__scopeId||"",s&&u);n.value.firstElementChild.innerHTML="",n.value.firstElementChild.appendChild(d)}return W(()=>e.nodes,f=>{l(f)}),Re(()=>{l(e.nodes)}),()=>I("uni-rich-text",{ref:n},[I("div",null,null)],512)}}),fh=_i(!0),ES={scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"back"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},TS=ge({name:"ScrollView",compatConfig:{MODE:3},props:ES,emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,t){var{emit:r,slots:i}=t,a=U(null),n=U(null),o=U(null),s=U(null),u=U(null),l=Pe(a,r),{state:f,scrollTopNumber:d,scrollLeftNumber:g}=CS(e);OS(e,f,d,g,l,a,n,s,r);var h=te(()=>{var w="";return e.scrollX?w+="overflow-x:auto;":w+="overflow-x:hidden;",e.scrollY?w+="overflow-y:auto;":w+="overflow-y:hidden;",w});return()=>{var{refresherEnabled:w,refresherBackground:_,refresherDefaultStyle:x}=e,{refresherHeight:m,refreshState:b,refreshRotate:c}=f;return I("uni-scroll-view",{ref:a},[I("div",{ref:o,class:"uni-scroll-view"},[I("div",{ref:n,style:h.value,class:"uni-scroll-view"},[I("div",{ref:s,class:"uni-scroll-view-content"},[w?I("div",{ref:u,style:{backgroundColor:_,height:m+"px"},class:"uni-scroll-view-refresher"},[x!=="none"?I("div",{class:"uni-scroll-view-refresh"},[I("div",{class:"uni-scroll-view-refresh-inner"},[b=="pulling"?I("svg",{key:"refresh__icon",style:{transform:"rotate("+c+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[I("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),I("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,b=="refreshing"?I("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[I("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,x=="none"?i.refresher&&i.refresher():null],4):null,i.default&&i.default()],512)],4)],512)],512)}}});function CS(e){var t=te(()=>Number(e.scrollTop)||0),r=te(()=>Number(e.scrollLeft)||0),i=ke({lastScrollTop:t.value,lastScrollLeft:r.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshRotate:0,refreshState:""});return{state:i,scrollTopNumber:t,scrollLeftNumber:r}}function OS(e,t,r,i,a,n,o,s,u){var l=!1,f=0,d=!1,g=()=>{},h=te(()=>{var y=Number(e.upperThreshold);return isNaN(y)?50:y}),w=te(()=>{var y=Number(e.lowerThreshold);return isNaN(y)?50:y});function _(y,E){var C=o.value,O=0,P="";if(y<0?y=0:E==="x"&&y>C.scrollWidth-C.offsetWidth?y=C.scrollWidth-C.offsetWidth:E==="y"&&y>C.scrollHeight-C.offsetHeight&&(y=C.scrollHeight-C.offsetHeight),E==="x"?O=C.scrollLeft-y:E==="y"&&(O=C.scrollTop-y),O!==0){var M=s.value;M.style.transition="transform .3s ease-out",M.style.webkitTransition="-webkit-transform .3s ease-out",E==="x"?P="translateX("+O+"px) translateZ(0)":E==="y"&&(P="translateY("+O+"px) translateZ(0)"),M.removeEventListener("transitionend",g),M.removeEventListener("webkitTransitionEnd",g),g=()=>v(y,E),M.addEventListener("transitionend",g),M.addEventListener("webkitTransitionEnd",g),E==="x"?C.style.overflowX="hidden":E==="y"&&(C.style.overflowY="hidden"),M.style.transform=P,M.style.webkitTransform=P}}function x(y){var E=y.target;a("scroll",y,{scrollLeft:E.scrollLeft,scrollTop:E.scrollTop,scrollHeight:E.scrollHeight,scrollWidth:E.scrollWidth,deltaX:t.lastScrollLeft-E.scrollLeft,deltaY:t.lastScrollTop-E.scrollTop}),e.scrollY&&(E.scrollTop<=h.value&&t.lastScrollTop-E.scrollTop>0&&y.timeStamp-t.lastScrollToUpperTime>200&&(a("scrolltoupper",y,{direction:"top"}),t.lastScrollToUpperTime=y.timeStamp),E.scrollTop+E.offsetHeight+w.value>=E.scrollHeight&&t.lastScrollTop-E.scrollTop<0&&y.timeStamp-t.lastScrollToLowerTime>200&&(a("scrolltolower",y,{direction:"bottom"}),t.lastScrollToLowerTime=y.timeStamp)),e.scrollX&&(E.scrollLeft<=h.value&&t.lastScrollLeft-E.scrollLeft>0&&y.timeStamp-t.lastScrollToUpperTime>200&&(a("scrolltoupper",y,{direction:"left"}),t.lastScrollToUpperTime=y.timeStamp),E.scrollLeft+E.offsetWidth+w.value>=E.scrollWidth&&t.lastScrollLeft-E.scrollLeft<0&&y.timeStamp-t.lastScrollToLowerTime>200&&(a("scrolltolower",y,{direction:"right"}),t.lastScrollToLowerTime=y.timeStamp)),t.lastScrollTop=E.scrollTop,t.lastScrollLeft=E.scrollLeft}function m(y){e.scrollY&&(e.scrollWithAnimation?_(y,"y"):o.value.scrollTop=y)}function b(y){e.scrollX&&(e.scrollWithAnimation?_(y,"x"):o.value.scrollLeft=y)}function c(y){if(y){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(y)){console.error("id error: scroll-into-view=".concat(y));return}var E=n.value.querySelector("#"+y);if(E){var C=o.value.getBoundingClientRect(),O=E.getBoundingClientRect();if(e.scrollX){var P=O.left-C.left,M=o.value.scrollLeft,H=M+P;e.scrollWithAnimation?_(H,"x"):o.value.scrollLeft=H}if(e.scrollY){var re=O.top-C.top,R=o.value.scrollTop,B=R+re;e.scrollWithAnimation?_(B,"y"):o.value.scrollTop=B}}}}function v(y,E){s.value.style.transition="",s.value.style.webkitTransition="",s.value.style.transform="",s.value.style.webkitTransform="";var C=o.value;E==="x"?(C.style.overflowX=e.scrollX?"auto":"hidden",C.scrollLeft=y):E==="y"&&(C.style.overflowY=e.scrollY?"auto":"hidden",C.scrollTop=y),s.value.removeEventListener("transitionend",g),s.value.removeEventListener("webkitTransitionEnd",g)}function p(y){switch(y){case"refreshing":t.refresherHeight=e.refresherThreshold,l||(l=!0,a("refresherrefresh",{},{}),u("update:refresherTriggered",!0));break;case"restore":case"refresherabort":l=!1,t.refresherHeight=f=0,y==="restore"&&(d=!1,a("refresherrestore",{},{})),y==="refresherabort"&&d&&(d=!1,a("refresherabort",{},{}));break}t.refreshState=y}Re(()=>{Vr(()=>{m(r.value),b(i.value)}),c(e.scrollIntoView);var y=function(H){H.preventDefault(),H.stopPropagation(),x(H)},E={x:0,y:0},C=null,O=function(H){if(E!==null){var re=H.touches[0].pageX,R=H.touches[0].pageY,B=o.value;if(Math.abs(re-E.x)>Math.abs(R-E.y))if(e.scrollX){if(B.scrollLeft===0&&re>E.x){C=!1;return}else if(B.scrollWidth===B.offsetWidth+B.scrollLeft&&reE.y)C=!1,e.refresherEnabled&&H.cancelable!==!1&&H.preventDefault();else if(B.scrollHeight===B.offsetHeight+B.scrollTop&&R0&&(d=!0,a("refresherpulling",H,{deltaY:X})));var Q=t.refresherHeight/e.refresherThreshold;t.refreshRotate=(Q>1?1:Q)*360}}},P=function(H){H.touches.length===1&&(sr({disable:!0}),E={x:H.touches[0].pageX,y:H.touches[0].pageY})},M=function(H){E=null,sr({disable:!1}),t.refresherHeight>=e.refresherThreshold?p("refreshing"):p("refresherabort")};o.value.addEventListener("touchstart",P,fh),o.value.addEventListener("touchmove",O,_i(!1)),o.value.addEventListener("scroll",y,_i(!1)),o.value.addEventListener("touchend",M,fh),Fn(),Ae(()=>{o.value.removeEventListener("touchstart",P),o.value.removeEventListener("touchmove",O),o.value.removeEventListener("scroll",y),o.value.removeEventListener("touchend",M)})}),ss(()=>{e.scrollY&&(o.value.scrollTop=t.lastScrollTop),e.scrollX&&(o.value.scrollLeft=t.lastScrollLeft)}),W(r,y=>{m(y)}),W(i,y=>{b(y)}),W(()=>e.scrollIntoView,y=>{c(y)}),W(()=>e.refresherTriggered,y=>{y===!0?p("refreshing"):y===!1&&p("restore")})}var AS={name:{type:String,default:""},min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},value:{type:[Number,String],default:0},step:{type:[Number,String],default:1},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#e9e9e9"},backgroundColor:{type:String,default:"#e9e9e9"},activeColor:{type:String,default:"#007aff"},selectedColor:{type:String,default:"#007aff"},blockColor:{type:String,default:"#ffffff"},blockSize:{type:[Number,String],default:28},showValue:{type:[Boolean,String],default:!1}},IS=ge({name:"Slider",props:AS,emits:["changing","change"],setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=U(null),o=U(Number(e.value));W(()=>e.value,d=>{o.value=Number(d)});var s=Pe(i,r),u=kS(e,o),{_onClick:l,_onTrack:f}=MS(e,o,i,a,s);return Re(()=>{zn(n.value,f)}),()=>{var{setBgColor:d,setBlockBg:g,setActiveColor:h,setBlockStyle:w}=u;return I("uni-slider",{ref:i,onClick:Ar(l)},[I("div",{class:"uni-slider-wrapper"},[I("div",{class:"uni-slider-tap-area"},[I("div",{style:d.value,class:"uni-slider-handle-wrapper"},[I("div",{ref:n,style:g.value,class:"uni-slider-handle"},null,4),I("div",{style:w.value,class:"uni-slider-thumb"},null,4),I("div",{style:h.value,class:"uni-slider-track"},null,4)],4)]),ki(I("span",{ref:a,class:"uni-slider-value"},[o.value],512),[[Pi,e.showValue]])]),I("slot",null,null)],8,["onClick"])}}});function kS(e,t){var r=()=>{var o=Number(e.max),s=Number(e.min);return 100*(t.value-s)/(o-s)+"%"},i=()=>e.backgroundColor!=="#e9e9e9"?e.backgroundColor:e.color!=="#007aff"?e.color:"#007aff",a=()=>e.activeColor!=="#007aff"?e.activeColor:e.selectedColor!=="#e9e9e9"?e.selectedColor:"#e9e9e9",n={setBgColor:te(()=>({backgroundColor:i()})),setBlockBg:te(()=>({left:r()})),setActiveColor:te(()=>({backgroundColor:a(),width:r()})),setBlockStyle:te(()=>({width:e.blockSize+"px",height:e.blockSize+"px",marginLeft:-e.blockSize/2+"px",marginTop:-e.blockSize/2+"px",left:r(),backgroundColor:e.blockColor}))};return n}function MS(e,t,r,i,a){var n=d=>{e.disabled||(s(d),a("change",d,{value:t.value}))},o=d=>{var g=Number(e.max),h=Number(e.min),w=Number(e.step);return dg?g:RS.mul.call(Math.round((d-h)/w),w)+h},s=d=>{var g=Number(e.max),h=Number(e.min),w=i.value,_=getComputedStyle(w,null).marginLeft,x=w.offsetWidth;x=x+parseInt(_);var m=r.value,b=m.offsetWidth-(e.showValue?x:0),c=m.getBoundingClientRect().left,v=(d.x-c)*(g-h)/b+h;t.value=o(v)},u=d=>{if(!e.disabled)return d.detail.state==="move"?(s({x:d.detail.x}),a("changing",d,{value:t.value}),!1):d.detail.state==="end"&&a("change",d,{value:t.value})},l=_e(It,!1);if(l){var f={reset:()=>t.value=Number(e.min),submit:()=>{var d=["",null];return e.name!==""&&(d[0]=e.name,d[1]=t.value),d}};l.addField(f),Ae(()=>{l.removeField(f)})}return{_onClick:n,_onTrack:u}}var RS={mul:function(e){var t=0,r=this.toString(),i=e.toString();try{t+=r.split(".")[1].length}catch(a){}try{t+=i.split(".")[1].length}catch(a){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,t)}},LS={indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1}};function PS(e){var t=te(()=>{var n=Number(e.interval);return isNaN(n)?5e3:n}),r=te(()=>{var n=Number(e.duration);return isNaN(n)?500:n}),i=te(()=>{var n=Math.round(e.displayMultipleItems);return isNaN(n)?1:n}),a=ke({interval:t,duration:r,displayMultipleItems:i,current:Math.round(e.current)||0,currentItemId:e.currentItemId,userTracking:!1});return a}function NS(e,t,r,i,a,n){function o(){s&&(clearTimeout(s),s=null)}var s=null,u=!0,l=0,f=1,d=null,g=!1,h=0,w,_="",x,m=te(()=>e.circular&&r.value.length>t.displayMultipleItems);function b(R){if(!u)for(var B=r.value,X=B.length,Q=R+t.displayMultipleItems,V=0;V=K.length&&(R-=K.length),R=w%1>.5||w<0?R-1:R,n("transition",{},{dx:e.vertical?0:R*V.offsetWidth,dy:e.vertical?R*V.offsetHeight:0})}function v(){d&&(c(d.toPos),d=null)}function p(R){var B=r.value.length;if(!B)return-1;var X=(Math.round(R)%B+B)%B;if(m.value){if(B<=t.displayMultipleItems)return 0}else if(X>B-t.displayMultipleItems)return B-t.displayMultipleItems;return X}function y(){d=null}function E(){if(!d){g=!1;return}var R=d,B=R.toPos,X=R.acc,Q=R.endTime,V=R.source,K=Q-Date.now();if(K<=0){c(B),d=null,g=!1,w=null;var ae=r.value[t.current];if(ae){var Te=ae.getItemId();n("animationfinish",{},{current:t.current,currentItemId:Te,source:V})}return}var oe=X*K*K/2,de=B+oe;c(de),x=requestAnimationFrame(E)}function C(R,B,X){y();var Q=t.duration,V=r.value.length,K=l;if(m.value)if(X<0){for(;KR;)K-=V}else if(X>0){for(;K>R;)K-=V;for(;K+VR;)K-=V;K+V-R0&&f<1||(f=1)}var K=l;l=-2;var ae=t.current;ae>=0?(u=!1,t.userTracking?(c(K+ae-h),h=ae):(c(ae),e.autoplay&&O())):(u=!0,c(-t.displayMultipleItems-1))}W([()=>e.current,()=>e.currentItemId,()=>[...r.value]],()=>{var R=-1;if(e.currentItemId)for(var B=0,X=r.value;Be.vertical,()=>m.value,()=>t.displayMultipleItems,()=>[...r.value]],P),W(()=>t.interval,()=>{s&&(o(),O())});function M(R,B){var X=_;_="";var Q=r.value;if(!X){var V=Q.length;C(R,"",m.value&&B+(V-R)%V>V/2?1:0)}var K=Q[R];if(K){var ae=t.currentItemId=K.getItemId();n("change",{},{current:t.current,currentItemId:ae,source:X})}}W(()=>t.current,(R,B)=>{M(R,B),a("update:current",R)}),W(()=>t.currentItemId,R=>{a("update:currentItemId",R)});function H(R){R?O():o()}W(()=>e.autoplay&&!t.userTracking,H),H(e.autoplay&&!t.userTracking),Re(()=>{var R=!1,B=0,X=0;function Q(){o(),h=l,B=0,X=Date.now(),y()}function V(ae){var Te=X;X=Date.now();var oe=r.value.length,de=oe-t.displayMultipleItems;function le(Ve){return .5-.25/(Ve+.5)}function J(Ve,lr){var Ne=h+Ve;B=.6*B+.4*lr,m.value||(Ne<0||Ne>de)&&(Ne<0?Ne=-le(-Ne):Ne>de&&(Ne=de+le(Ne-de)),B=0),c(Ne)}var ye=X-Te||1,be=i.value;e.vertical?J(-ae.dy/be.offsetHeight,-ae.ddy/ye):J(-ae.dx/be.offsetWidth,-ae.ddx/ye)}function K(ae){t.userTracking=!1;var Te=B/Math.abs(B),oe=0;!ae&&Math.abs(B)>.2&&(oe=.5*Te);var de=p(l+oe);ae?c(h):(_="touch",t.current=de,C(de,"touch",oe!==0?oe:de===0&&m.value&&l>=1?1:0))}zn(i.value,ae=>{if(!e.disableTouch&&!u){if(ae.detail.state==="start")return t.userTracking=!0,R=!1,Q();if(ae.detail.state==="end")return K(!1);if(ae.detail.state==="cancel")return K(!0);if(t.userTracking){if(!R){R=!0;var Te=Math.abs(ae.detail.dx),oe=Math.abs(ae.detail.dy);if((Te>=oe&&e.vertical||Te<=oe&&!e.vertical)&&(t.userTracking=!1),!t.userTracking){e.autoplay&&O();return}}return V(ae.detail),!1}}})}),Zt(()=>{o(),cancelAnimationFrame(x)});function re(R){C(t.current=R,_="click",m.value?1:0)}return{onSwiperDotClick:re}}var DS=ge({name:"Swiper",props:LS,emits:["change","transition","animationfinish","update:current","update:currentItemId"],setup(e,t){var{slots:r,emit:i}=t,a=U(null),n=Pe(a,i),o=U(null),s=U(null),u=PS(e),l=te(()=>{var b={};return(e.nextMargin||e.previousMargin)&&(b=e.vertical?{left:0,right:0,top:_r(e.previousMargin,!0),bottom:_r(e.nextMargin,!0)}:{top:0,bottom:0,left:_r(e.previousMargin,!0),right:_r(e.nextMargin,!0)}),b}),f=te(()=>{var b=Math.abs(100/u.displayMultipleItems)+"%";return{width:e.vertical?"100%":b,height:e.vertical?b:"100%"}}),d=[],g=[],h=U([]);function w(){for(var b=[],c=function(p){var y=d[p];y instanceof Element||(y=y.el);var E=g.find(C=>y===C.rootRef.value);E&&b.push(qa(E))},v=0;v{d=s.value.children,w()});var _=function(b){g.push(b),w()};ze("addSwiperContext",_);var x=function(b){var c=g.indexOf(b);c>=0&&(g.splice(c,1),w())};ze("removeSwiperContext",x);var{onSwiperDotClick:m}=NS(e,u,h,s,i,n);return()=>{var b=r.default&&r.default();return d=_l(b),I("uni-swiper",{ref:a},[I("div",{ref:o,class:"uni-swiper-wrapper"},[I("div",{class:"uni-swiper-slides",style:l.value},[I("div",{ref:s,class:"uni-swiper-slide-frame",style:f.value},[b],4)],4),e.indicatorDots&&I("div",{class:["uni-swiper-dots",e.vertical?"uni-swiper-dots-vertical":"uni-swiper-dots-horizontal"]},[h.value.map((c,v,p)=>I("div",{onClick:()=>m(v),class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":v=u.current||v{var n=_e("addSwiperContext");n&&n(a)}),Zt(()=>{var n=_e("removeSwiperContext");n&&n(a)}),()=>I("uni-swiper-item",{ref:i,style:{position:"absolute",width:"100%",height:"100%"}},[r.default&&r.default()],512)}}),FS={name:{type:String,default:""},checked:{type:[Boolean,String],default:!1},type:{type:String,default:"switch"},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:"#007aff"}},zS=ge({name:"Switch",props:FS,emits:["change"],setup(e,t){var{emit:r}=t,i=U(null),a=U(e.checked),n=US(e,a),o=Pe(i,r);W(()=>e.checked,u=>{a.value=u});var s=u=>{e.disabled||(a.value=!a.value,o("change",u,{value:a.value}))};return n&&(n.addHandler(s),Ae(()=>{n.removeHandler(s)})),Rn(e,{"label-click":s}),()=>{var{color:u,type:l}=e,f=ai(e,"disabled");return I("uni-switch",tt({ref:i},f,{onClick:s}),[I("div",{class:"uni-switch-wrapper"},[ki(I("div",{class:["uni-switch-input",[a.value?"uni-switch-input-checked":""]],style:{backgroundColor:a.value?u:"#DFDFDF",borderColor:a.value?u:"#DFDFDF"}},null,6),[[Pi,l==="switch"]]),ki(I("div",{class:"uni-checkbox-input"},[a.value?dn(vn,e.color,22):""],512),[[Pi,l==="checkbox"]])])],16,["onClick"])}}});function US(e,t){var r=_e(It,!1),i=_e(Qi,!1),a={submit:()=>{var n=["",null];return e.name&&(n[0]=e.name,n[1]=t.value),n},reset:()=>{t.value=!1}};return r&&(r.addField(a),Zt(()=>{r.removeField(a)})),i}var sa={ensp:"\u2002",emsp:"\u2003",nbsp:"\xA0"};function HS(e,t){return e.replace(/\\n/g,mi).split(mi).map(r=>WS(r,t))}function WS(e,t){var{space:r,decode:i}=t;return!e||(r&&sa[r]&&(e=e.replace(/ /g,sa[r])),!i)?e:e.replace(/ /g,sa.nbsp).replace(/ /g,sa.ensp).replace(/ /g,sa.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")}var VS=ce({},jd,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:""}}),yl=!1;function jS(){var e="(prefers-color-scheme: dark)";yl=String(navigator.platform).indexOf("iP")===0&&String(navigator.vendor).indexOf("Apple")===0&&window.matchMedia(e).media!==e}var YS=ge({name:"Textarea",props:VS,emit:["confirm","linechange",...Yd],setup(e,t){var{emit:r}=t,i=U(null),{fieldRef:a,state:n,scopedAttrsState:o,fixDisabledColor:s,trigger:u}=qd(e,i,r),l=te(()=>n.value.split(mi)),f=te(()=>["done","go","next","search","send"].includes(e.confirmType)),d=U(0),g=U(null);W(()=>d.value,m=>{var b=i.value,c=g.value,v=parseFloat(getComputedStyle(b).lineHeight);isNaN(v)&&(v=c.offsetHeight);var p=Math.round(m/v);u("linechange",{},{height:m,heightRpx:750/window.innerWidth*m,lineCount:p}),e.autoHeight&&(b.style.height=m+"px")});function h(m){var{height:b}=m;d.value=b}function w(m){u("confirm",m,{value:n.value})}function _(m){m.key==="Enter"&&f.value&&m.preventDefault()}function x(m){if(m.key==="Enter"&&f.value){w(m);var b=m.target;!e.confirmHold&&b.blur()}}return jS(),()=>{var m=e.disabled&&s?I("textarea",{ref:a,value:n.value,tabindex:"-1",readonly:!!e.disabled,maxlength:n.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":yl},style:{overflowY:e.autoHeight?"hidden":"auto"},onFocus:b=>b.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):I("textarea",{ref:a,value:n.value,disabled:!!e.disabled,maxlength:n.maxlength,enterkeyhint:e.confirmType,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":yl},style:{overflowY:e.autoHeight?"hidden":"auto"},onKeydown:_,onKeyup:x},null,46,["value","disabled","maxlength","enterkeyhint","onKeydown","onKeyup"]);return I("uni-textarea",{ref:i},[I("div",{class:"uni-textarea-wrapper"},[ki(I("div",tt(o.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[Pi,!n.value.length]]),I("div",{ref:g,class:"uni-textarea-line"},[" "],512),I("div",{class:"uni-textarea-compute"},[l.value.map(b=>I("div",null,[b.trim()?b:"."])),I(Ir,{initial:!0,onResize:h},null,8,["initial","onResize"])]),e.confirmType==="search"?I("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[m],40,["onSubmit"]):m])],512)}}});ce({},hx);function Wn(e,t){if(t||(t=e.id),!!t)return e.$options.name.toLowerCase()+"."+t}function ch(e,t,r){!e||bt(r||Gt(),e,(i,a)=>{var{type:n,data:o}=i;t(n,o,a)})}function vh(e,t){!e||Om(t||Gt(),e)}function Vn(e,t,r,i){var a=Dt(),n=a.proxy;Re(()=>{ch(t||Wn(n),e,i),(r||!t)&&W(()=>n.id,(o,s)=>{ch(Wn(n,o),e,i),vh(s&&Wn(n,s))})}),Ae(()=>{vh(t||Wn(n),i)})}var qS=0;function jn(e){var t=hn(),r=Dt(),i=r.proxy,a=i.$options.name.toLowerCase(),n=e||i.id||"context".concat(qS++);return Re(()=>{var o=i.$el;o.__uniContextInfo={id:n,type:a,page:t}}),"".concat(a,".").concat(n)}function XS(e){return e.__uniContextInfo}class dh extends wd{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r,i,a,n,[...Mn.props,...o])}call(t){var r={animation:this.$props.animation,$el:this.$};t.call(r)}setAttribute(t,r){return t==="animation"&&(this.$animate=!0),super.setAttribute(t,r)}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!!this.$animate){if(t)return this.call(Mn.mounted);this.$animate&&(this.$animate=!1,this.call(Mn.watch.animation.handler))}}}var ZS=["space","decode"];class KS extends dh{constructor(t,r,i,a){super(t,document.createElement("uni-text"),r,i,a,ZS);this._text=""}init(t){this._text=t.t||"",super.init(t)}setText(t){this._text=t,this.update()}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{$props:{space:r,decode:i}}=this;this.$.textContent=HS(this._text,{space:r,decode:i}).join(mi),super.update(t)}}class GS extends ii{constructor(t,r,i,a){super(t,"#text",r,document.createTextNode(""));this.init(a),this.insert(r,i)}}var YT="",JS=["hover-class","hover-stop-propagation","hover-start-time","hover-stay-time"];class QS extends dh{constructor(t,r,i,a,n){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[];super(t,r,i,a,n,[...JS,...o])}update(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.$props["hover-class"];r&&r!=="none"?(this._hover||(this._hover=new eE(this.$,this.$props)),this._hover.addEvent()):this._hover&&this._hover.removeEvent(),super.update(t)}}class eE{constructor(t,r){this._listening=!1,this._hovering=!1,this._hoverTouch=!1,this.$=t,this.props=r,this.__hoverTouchStart=this._hoverTouchStart.bind(this),this.__hoverTouchEnd=this._hoverTouchEnd.bind(this),this.__hoverTouchCancel=this._hoverTouchCancel.bind(this)}get hovering(){return this._hovering}set hovering(t){this._hovering=t;var r=this.props["hover-class"];t?this.$.classList.add(r):this.$.classList.remove(r)}addEvent(){this._listening||(this._listening=!0,this.$.addEventListener("touchstart",this.__hoverTouchStart),this.$.addEventListener("touchend",this.__hoverTouchEnd),this.$.addEventListener("touchcancel",this.__hoverTouchCancel))}removeEvent(){!this._listening||(this._listening=!1,this.$.removeEventListener("touchstart",this.__hoverTouchStart),this.$.removeEventListener("touchend",this.__hoverTouchEnd),this.$.removeEventListener("touchcancel",this.__hoverTouchCancel))}_hoverTouchStart(t){if(!t._hoverPropagationStopped){var r=this.props["hover-class"];!r||r==="none"||this.$.disabled||t.touches.length>1||(this.props["hover-stop-propagation"]&&(t._hoverPropagationStopped=!0),this._hoverTouch=!0,this._hoverStartTimer=setTimeout(()=>{this.hovering=!0,this._hoverTouch||this._hoverReset()},this.props["hover-start-time"]))}}_hoverTouchEnd(){this._hoverTouch=!1,this.hovering&&this._hoverReset()}_hoverReset(){requestAnimationFrame(()=>{clearTimeout(this._hoverStayTimer),this._hoverStayTimer=setTimeout(()=>{this.hovering=!1},this.props["hover-stay-time"])})}_hoverTouchCancel(){this._hoverTouch=!1,this.hovering=!1,clearTimeout(this._hoverStartTimer)}}class tE extends QS{constructor(t,r,i,a){super(t,document.createElement("uni-view"),r,i,a)}}function hh(){return plus.navigator.isImmersedStatusbar()?Math.round(plus.os.name==="iOS"?plus.navigator.getSafeAreaInsets().top:plus.navigator.getStatusbarHeight()):0}function gh(){var e=plus.webview.currentWebview(),t=e.getStyle(),r=t&&t.titleNView;return r&&r.type==="default"?Eu+hh():0}var ph=Symbol("onDraw");function rE(e){for(var t;e;){var r=getComputedStyle(e),i=r.transform||r.webkitTransform;t=i&&i!=="none"?!1:t,t=r.position==="fixed"?!0:t,e=e.parentElement}return t}function Sl(e,t){return te(()=>{var r={};return Object.keys(e).forEach(i=>{if(!(t&&t.includes(i))){var a=e[i];a=i==="src"?vt(a):a,r[i.replace(/[A-Z]/g,n=>"-"+n.toLowerCase())]=a}}),r})}function la(e){var t=ke({top:"0px",left:"0px",width:"0px",height:"0px",position:"static"}),r=U(!1);function i(){var d=e.value,g=d.getBoundingClientRect(),h=["width","height"];r.value=g.width===0||g.height===0,r.value||(t.position=rE(d)?"absolute":"static",h.push("top","left")),h.forEach(w=>{var _=g[w];_=w==="top"?_+(t.position==="static"?document.documentElement.scrollTop||document.body.scrollTop||0:gh()):_,t[w]=_+"px"})}var a=null;function n(){a&&cancelAnimationFrame(a),a=requestAnimationFrame(()=>{a=null,i()})}window.addEventListener("updateview",n);var o=[],s=[];function u(d){s?s.push(d):d()}function l(d){var g=_e(ph),h=w=>{d(w),o.forEach(_=>_(t)),o=null};u(()=>{g?g(h):h({top:"0px",left:"0px",width:Number.MAX_SAFE_INTEGER+"px",height:Number.MAX_SAFE_INTEGER+"px",position:"static"})})}var f=function(d){o?o.push(d):d(t)};return ze(ph,f),Re(()=>{i(),s.forEach(d=>d()),s=null}),Ae(()=>{window.removeEventListener("updateview",n)}),{position:t,hidden:r,onParentReady:l}}var iE=ge({name:"Ad",props:{adpid:{type:[Number,String],default:""},data:{type:Object,default:null},dataCount:{type:Number,default:5},channel:{type:String,default:""}},setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=Pe(i,r),o=Sl(e,["id"]),{position:s,onParentReady:u}=la(a),l;return u(()=>{l=plus.ad.createAdView(Object.assign({},o.value,s)),plus.webview.currentWebview().append(l),l.setDislikeListener(d=>{a.value.style.height="0",window.dispatchEvent(new CustomEvent("updateview")),n("close",{},d)}),l.setRenderingListener(d=>{d.result===0?(a.value.style.height=d.height+"px",window.dispatchEvent(new CustomEvent("updateview"))):n("error",{},{errCode:d.result})}),l.setAdClickedListener(()=>{n("adclicked",{},{})}),W(()=>s,d=>l.setStyle(d),{deep:!0}),W(()=>e.adpid,d=>{d&&f()}),W(()=>e.data,d=>{d&&l.renderingBind(d)});function f(){var d={adpid:e.adpid,width:s.width,count:e.dataCount};e.channel!==void 0&&(d.ext={channel:e.channel}),UniViewJSBridge.invokeServiceMethod("getAdData",d,g=>{var{code:h,data:w,message:_}=g;h===0?l.renderingBind(w):n("error",{},{errMsg:_})})}e.adpid&&f()}),Ae(()=>{l&&l.close()}),()=>I("uni-ad",{ref:i},[I("div",{ref:a,class:"uni-ad-container"},null,512)],512)}});class xe extends ii{constructor(t,r,i,a,n,o,s){super(t,r,a);var u=document.createElement("div");u.__vueParent=aE(this),this.$props=ke({}),this.init(o),this.$app=lc(hT(i,this.$props)),this.$app.mount(u),this.$=u.firstElementChild,s&&(this.$holder=this.$.querySelector(s)),ie(o,"t")&&this.setText(o.t||""),o.a&&ie(o.a,Na)&&cl(this.$,o.a[Na]),this.insert(a,n),wf()}init(t){var{a:r,e:i,w:a}=t;r&&(this.setWxsProps(r),Object.keys(r).forEach(n=>{this.setAttr(n,r[n])})),ie(t,"s")&&this.setAttr("style",t.s),i&&Object.keys(i).forEach(n=>{this.addEvent(n,i[n])}),a&&this.addWxsEvents(t.w)}setText(t){(this.$holder||this.$).textContent=t}addWxsEvent(t,r,i){this.$props[t]=bd(this.$,r,i)}addEvent(t,r){this.$props[t]=md(this.id,r,Ro(t)[1])}removeEvent(t){this.$props[t]=null}setAttr(t,r){if(t===Na)this.$&&cl(this.$,r);else if(t===Iu)this.$.__ownerId=r;else if(t===ku)nr(()=>ud(this,r),od);else if(t===Po){var i=fl(this.$||nt(this.pid).$,r),a=this.$props.style;mt(i)&&mt(a)?Object.keys(i).forEach(n=>{a[n]=i[n]}):this.$props.style=i}else kn(t)?this.$.style.setProperty(t,r):(r=fl(this.$||nt(this.pid).$,r),this.wxsPropsInvoke(t,r,!0)||(this.$props[t]=r))}removeAttr(t){kn(t)?this.$.style.removeProperty(t):this.$props[t]=null}remove(){this.removeUniParent(),this.isUnmounted=!0,this.$app.unmount(),Eh(this.id),this.removeUniChildren()}appendChild(t){return(this.$holder||this.$).appendChild(t)}insertBefore(t,r){return(this.$holder||this.$).insertBefore(t,r)}}class ua extends xe{constructor(t,r,i,a,n,o,s){super(t,r,i,a,n,o,s)}getRebuildFn(){return this._rebuild||(this._rebuild=this.rebuild.bind(this)),this._rebuild}setText(t){return nr(this.getRebuildFn(),al),super.setText(t)}appendChild(t){return nr(this.getRebuildFn(),al),super.appendChild(t)}insertBefore(t,r){return nr(this.getRebuildFn(),al),super.insertBefore(t,r)}rebuild(){var t=this.$.__vueParentComponent;t.rebuild&&t.rebuild()}}function aE(e){for(;e&&e.pid>0;)if(e=nt(e.pid),e){var{__vueParentComponent:t}=e.$;if(t)return t}return null}function El(e,t,r){e.childNodes.forEach(i=>{i instanceof Element?i.className.indexOf(t)===-1&&e.removeChild(i):e.removeChild(i)}),e.appendChild(document.createTextNode(r))}var nE=["value","modelValue"];function mh(e){nE.forEach(t=>{if(ie(e,t)){var r="onUpdate:"+t;ie(e,r)||(e[r]=i=>e[t]=i)}})}class oE extends xe{constructor(t,r,i,a){super(t,"uni-ad",iE,r,i,a)}}var qT="";class sE extends xe{constructor(t,r,i,a){super(t,"uni-button",Sx,r,i,a)}}class oi extends ii{constructor(t,r,i,a){super(t,r,i);this.insert(i,a)}}class lE extends oi{constructor(t,r,i){super(t,"uni-camera",r,i)}}var XT="";class uE extends xe{constructor(t,r,i,a){super(t,"uni-canvas",Mx,r,i,a,"uni-canvas > div")}}var ZT="";class fE extends xe{constructor(t,r,i,a){super(t,"uni-checkbox",$x,r,i,a,".uni-checkbox-wrapper")}setText(t){El(this.$holder,"uni-checkbox-input",t)}}var KT="";class cE extends xe{constructor(t,r,i,a){super(t,"uni-checkbox-group",Nx,r,i,a)}}var GT="",vE=0;function _h(e,t,r){var{position:i,hidden:a,onParentReady:n}=la(e),o,s;n(u=>{var l=te(()=>{var c={};for(var v in i){var p=i[v],y=parseFloat(p),E=parseFloat(u[v]);if(v==="top"||v==="left")p=Math.max(y,E)+"px";else if(v==="width"||v==="height"){var C=v==="width"?"left":"top",O=parseFloat(u[C]),P=parseFloat(i[C]),M=Math.max(O-P,0),H=Math.max(P+y-(O+E),0);p=Math.max(y-M-H,0)+"px"}c[v]=p}return c}),f=["borderRadius","borderColor","borderWidth","backgroundColor"],d=["paddingTop","paddingRight","paddingBottom","paddingLeft","color","textAlign","lineHeight","fontSize","fontWeight","textOverflow","whiteSpace"],g=[],h={start:"left",end:"right"};function w(c){var v=getComputedStyle(e.value);return f.concat(d,g).forEach(p=>{c[p]=v[p]}),c}var _=ke(w({})),x=null;s=function(){x&&cancelAnimationFrame(x),x=requestAnimationFrame(()=>{x=null,w(_)})},window.addEventListener("updateview",s);function m(){var c={};for(var v in c){var p=c[v];(v==="top"||v==="left")&&(p=Math.min(parseFloat(p)-parseFloat(u[v]),0)+"px"),c[v]=p}return c}var b=te(()=>{var c=m(),v=[{tag:"rect",position:c,rectStyles:{color:_.backgroundColor,radius:_.borderRadius,borderColor:_.borderColor,borderWidth:_.borderWidth}}];if("src"in r)r.src&&v.push({tag:"img",position:c,src:r.src});else{var p=parseFloat(_.lineHeight)-parseFloat(_.fontSize),y=parseFloat(c.width)-parseFloat(_.paddingLeft)-parseFloat(_.paddingRight);y=y<0?0:y;var E=parseFloat(c.height)-parseFloat(_.paddingTop)-p/2-parseFloat(_.paddingBottom);E=E<0?0:E,v.push({tag:"font",position:{top:"".concat(parseFloat(c.top)+parseFloat(_.paddingTop)+p/2,"px"),left:"".concat(parseFloat(c.left)+parseFloat(_.paddingLeft),"px"),width:"".concat(y,"px"),height:"".concat(E,"px")},textStyles:{align:h[_.textAlign]||_.textAlign,color:_.color,decoration:"none",lineSpacing:"".concat(p,"px"),margin:"0px",overflow:_.textOverflow,size:_.fontSize,verticalAlign:"top",weight:_.fontWeight,whiteSpace:_.whiteSpace},text:r.text})}return v});o=new plus.nativeObj.View("cover-".concat(Date.now(),"-").concat(vE++),l.value,b.value),plus.webview.currentWebview().append(o),a.value&&o.hide(),o.addEventListener("click",()=>{t("click",{},{})}),W(()=>a.value,c=>{o[c?"hide":"show"]()}),W(()=>l.value,c=>{o.setStyle(c)},{deep:!0}),W(()=>b.value,()=>{o.reset(),o.draw(b.value)},{deep:!0})}),Ae(()=>{o&&o.close(),s&&window.removeEventListener("updateview",s)})}var dE="_doc/uniapp_temp/",hE={src:{type:String,default:""},autoSize:{type:[Boolean,String],default:!1}};function gE(e,t,r){var i=U(""),a;function n(){t.src="",i.value=e.autoSize?"width:0;height:0;":"";var s=e.src?vt(e.src):"";s.indexOf("http://")===0||s.indexOf("https://")===0?(a=plus.downloader.createDownload(s,{filename:dE+"/download/"},(u,l)=>{l===200?o(u.filename):r("error",{},{errMsg:"error"})}),a.start()):s&&o(s)}function o(s){t.src=s,plus.io.getImageInfo({src:s,success:u=>{var{width:l,height:f}=u;e.autoSize&&(i.value="width:".concat(l,"px;height:").concat(f,"px;"),window.dispatchEvent(new CustomEvent("updateview"))),r("load",{},{width:l,height:f})},fail:()=>{r("error",{},{errMsg:"error"})}})}return e.src&&n(),W(()=>e.src,n),Ae(()=>{a&&a.abort()}),i}var bh=ge({name:"CoverImage",props:hE,emits:["click","load","error"],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=ke({src:""}),o=gE(e,n,a);return _h(i,a,n),()=>I("uni-cover-image",{ref:i,style:o.value},[I("div",{class:"uni-cover-image"},null)],4)}});class pE extends xe{constructor(t,r,i,a){super(t,"uni-cover-image",bh,r,i,a)}}var JT="",mE=ge({name:"CoverView",emits:["click"],setup(e,t){var{emit:r}=t,i=U(null),a=U(null),n=Pe(i,r),o=ke({text:""});return _h(i,n,o),aa(()=>{var s=a.value.childNodes[0];o.text=s&&s instanceof Text?s.textContent:"",window.dispatchEvent(new CustomEvent("updateview"))}),()=>I("uni-cover-view",{ref:i},[I("div",{ref:a,class:"uni-cover-view"},null,512)],512)}});class _E extends ua{constructor(t,r,i,a){super(t,"uni-cover-view",mE,r,i,a,".uni-cover-view")}}var QT="";class bE extends xe{constructor(t,r,i,a){super(t,"uni-editor",uy,r,i,a)}}var e2="";class wE extends xe{constructor(t,r,i,a){super(t,"uni-form",mx,r,i,a,"span")}}class xE extends oi{constructor(t,r,i){super(t,"uni-functional-page-navigator",r,i)}}var t2="";class yE extends xe{constructor(t,r,i,a){super(t,"uni-icon",dy,r,i,a)}}var r2="";class SE extends xe{constructor(t,r,i,a){super(t,"uni-image",py,r,i,a)}}var i2="";class EE extends xe{constructor(t,r,i,a){super(t,"uni-input",Dy,r,i,a)}init(t){super.init(t),mh(this.$props)}}var a2="";class TE extends xe{constructor(t,r,i,a){super(t,"uni-label",wx,r,i,a)}}class CE extends oi{constructor(t,r,i){super(t,"uni-live-player",r,i)}}class OE extends oi{constructor(t,r,i){super(t,"uni-live-pusher",r,i)}}var n2="",AE=(e,t,r)=>{r({coord:{latitude:t,longitude:e}})};function Tl(e){if(e.indexOf("#")!==0)return{color:e,opacity:1};var t=e.substr(7,2);return{color:e.substr(0,7),opacity:t?Number("0x"+t)/255:1}}var IE={id:{type:String,default:""},latitude:{type:[Number,String],default:""},longitude:{type:[Number,String],default:""},scale:{type:[String,Number],default:16},markers:{type:Array,default(){return[]}},polyline:{type:Array,default(){return[]}},circles:{type:Array,default(){return[]}},controls:{type:Array,default(){return[]}}},kE=ge({name:"Map",props:IE,emits:["click","regionchange","controltap","markertap","callouttap"],setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=U(null),o=Sl(e,["id"]),{position:s,hidden:u,onParentReady:l}=la(n),f,{_addMarkers:d,_addMapLines:g,_addMapCircles:h,_setMap:w}=ME(e,a);l(()=>{f=ce(plus.maps.create(Gt()+"-map-"+(e.id||Date.now()),Object.assign({},o.value,s,(()=>{if(e.latitude&&e.longitude)return{center:new plus.maps.Point(Number(e.longitude),Number(e.latitude))}})())),{__markers__:[],__lines__:[],__circles__:[]}),f.setZoom(parseInt(String(e.scale))),plus.webview.currentWebview().append(f),u.value&&f.hide(),f.onclick=x=>{a("click",{},x)},f.onstatuschanged=x=>{a("regionchange",{},{})},w(f),d(e.markers),g(e.polyline),h(e.circles),W(()=>o.value,x=>f&&f.setStyles(x),{deep:!0}),W(()=>s,x=>f&&f.setStyles(x),{deep:!0}),W(u,x=>{f&&f[x?"hide":"show"]()}),W(()=>e.scale,x=>{f&&f.setZoom(parseInt(String(x)))}),W([()=>e.latitude,()=>e.longitude],x=>{var[m,b]=x;f&&f.setStyles({center:new plus.maps.Point(Number(m),Number(b))})}),W(()=>e.markers,x=>{d(x,!0)},{deep:!0}),W(()=>e.polyline,x=>{g(x)},{deep:!0}),W(()=>e.circles,x=>{h(x)},{deep:!0})});var _=te(()=>e.controls.map(x=>{var m={position:"absolute"};return["top","left","width","height"].forEach(b=>{x.position[b]&&(m[b]=x.position[b]+"px")}),{id:x.id,iconPath:vt(x.iconPath),position:m,clickable:x.clickable}}));return Ae(()=>{f&&(f.close(),w(null))}),()=>I("uni-map",{ref:i,id:e.id},[I("div",{ref:n,class:"uni-map-container"},null,512),_.value.map((x,m)=>I(bh,{key:m,src:x.iconPath,style:x.position,"auto-size":!0,onClick:()=>x.clickable&&a("controltap",{},{controlId:x.id})},null,8,["src","style","auto-size","onClick"])),I("div",{class:"uni-map-slot"},null)],8,["id"])}});function ME(e,t){var r;function i(h){var{longitude:w,latitude:_}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};!r||(r.setCenter(new plus.maps.Point(Number(w||e.longitude),Number(_||e.latitude))),h({errMsg:"moveToLocation:ok"}))}function a(h){!r||r.getCurrentCenter((w,_)=>{h({longitude:_.getLng(),latitude:_.getLat(),errMsg:"getCenterLocation:ok"})})}function n(h){if(!!r){var w=r.getBounds();h({southwest:w.getSouthWest(),northeast:w.getNorthEast(),errMsg:"getRegion:ok"})}}function o(h){!r||h({scale:r.getZoom(),errMsg:"getScale:ok"})}function s(h){if(!!r){var{id:w,latitude:_,longitude:x,iconPath:m,callout:b,label:c}=h;AE(x,_,v=>{var p,{latitude:y,longitude:E}=v.coord,C=new plus.maps.Marker(new plus.maps.Point(E,y));m&&C.setIcon(vt(m)),c&&c.content&&C.setLabel(c.content);var O=void 0;b&&b.content&&(O=new plus.maps.Bubble(b.content)),O&&C.setBubble(O),(w||w===0)&&(C.onclick=P=>{t("markertap",{},{markerId:w})},O&&(O.onclick=()=>{t("callouttap",{},{markerId:w})})),(p=r)===null||p===void 0||p.addOverlay(C),r.__markers__.push(C)})}}function u(){if(!!r){var h=r.__markers__;h.forEach(w=>{var _;(_=r)===null||_===void 0||_.removeOverlay(w)}),r.__markers__=[]}}function l(h,w){w&&u(),h.forEach(_=>{s(_)})}function f(h){!r||(r.__lines__.length>0&&(r.__lines__.forEach(w=>{var _;(_=r)===null||_===void 0||_.removeOverlay(w)}),r.__lines__=[]),h.forEach(w=>{var _,{color:x,width:m}=w,b=w.points.map(p=>new plus.maps.Point(p.longitude,p.latitude)),c=new plus.maps.Polyline(b);if(x){var v=Tl(x);c.setStrokeColor(v.color),c.setStrokeOpacity(v.opacity)}m&&c.setLineWidth(m),(_=r)===null||_===void 0||_.addOverlay(c),r.__lines__.push(c)}))}function d(h){!r||(r.__circles__.length>0&&(r.__circles__.forEach(w=>{var _;(_=r)===null||_===void 0||_.removeOverlay(w)}),r.__circles__=[]),h.forEach(w=>{var _,{latitude:x,longitude:m,color:b,fillColor:c,radius:v,strokeWidth:p}=w,y=new plus.maps.Circle(new plus.maps.Point(m,x),v);if(b){var E=Tl(b);y.setStrokeColor(E.color),y.setStrokeOpacity(E.opacity)}if(c){var C=Tl(c);y.setFillColor(C.color),y.setFillOpacity(C.opacity)}p&&y.setLineWidth(p),(_=r)===null||_===void 0||_.addOverlay(y),r.__circles__.push(y)}))}var g={moveToLocation:i,getCenterLocation:a,getRegion:n,getScale:o};return Vn((h,w,_)=>{g[h]&&g[h](_,w)},jn(),!0),{_addMarkers:l,_addMapLines:f,_addMapCircles:d,_setMap(h){r=h}}}class RE extends xe{constructor(t,r,i,a){super(t,"uni-map",kE,r,i,a,".uni-map-slot")}}var o2="";class LE extends ua{constructor(t,r,i,a){super(t,"uni-movable-area",Uy,r,i,a)}}var s2="";class PE extends xe{constructor(t,r,i,a){super(t,"uni-movable-view",Vy,r,i,a)}}var l2="";class NE extends xe{constructor(t,r,i,a){super(t,"uni-navigator",Zy,r,i,a,"uni-navigator")}}class DE extends oi{constructor(t,r,i){super(t,"uni-official-account",r,i)}}class BE extends oi{constructor(t,r,i){super(t,"uni-open-data",r,i)}}var si,wh,li;function xh(){return typeof window=="object"&&typeof navigator=="object"&&typeof document=="object"?"webview":"v8"}function yh(){return si.webview.currentWebview().id}var Yn,Cl,Ol={};function Al(e){var t=e.data&&e.data.__message;if(!(!t||!t.__page)){var r=t.__page,i=Ol[r];i&&i(t),t.keep||delete Ol[r]}}function $E(e,t){xh()==="v8"?li?(Yn&&Yn.close(),Yn=new li(yh()),Yn.onmessage=Al):Cl||(Cl=wh.requireModule("globalEvent"),Cl.addEventListener("plusMessage",Al)):window.__plusMessage=Al,Ol[e]=t}class FE{constructor(t){this.webview=t}sendMessage(t){var r=JSON.parse(JSON.stringify({__message:{data:t}})),i=this.webview.id;if(li){var a=new li(i);a.postMessage(r)}else si.webview.postMessageToUniNView&&si.webview.postMessageToUniNView(r,i)}close(){this.webview.close()}}function zE(e){var{context:t={},url:r,data:i={},style:a={},onMessage:n,onClose:o}=e;si=t.plus||plus,wh=t.weex||(typeof weex=="object"?weex:null),li=t.BroadcastChannel||(typeof BroadcastChannel=="object"?BroadcastChannel:null);var s={autoBackButton:!0,titleSize:"17px"},u="page".concat(Date.now());a=ce({},a),a.titleNView!==!1&&a.titleNView!=="none"&&(a.titleNView=ce(s,a.titleNView));var l={top:0,bottom:0,usingComponents:{},popGesture:"close",scrollIndicator:"none",animationType:"pop-in",animationDuration:200,uniNView:{path:"".concat(typeof process=="object"&&process.env&&{}.VUE_APP_TEMPLATE_PATH||"","/").concat(r,".js"),defaultFontSize:16,viewport:si.screen.resolutionWidth}};a=ce(l,a);var f=si.webview.create("",u,a,{extras:{from:yh(),runtime:xh(),data:i,useGlobalEvent:!li}});return f.addEventListener("close",o),$E(u,d=>{typeof n=="function"&&n(d.data),d.keep||f.close("auto")}),f.show(a.animationType,a.animationDuration),new FE(f)}var Ie={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},ui={YEAR:"year",MONTH:"month",DAY:"day"};function qn(e){return e>9?e:"0".concat(e)}function Xn(e,t){e=String(e||"");var r=new Date;if(t===Ie.TIME){var i=e.split(":");i.length===2&&r.setHours(parseInt(i[0]),parseInt(i[1]))}else{var a=e.split("-");a.length===3&&r.setFullYear(parseInt(a[0]),parseInt(String(parseFloat(a[1])-1)),parseInt(a[2]))}return r}function UE(e){if(e.mode===Ie.TIME)return"00:00";if(e.mode===Ie.DATE){var t=new Date().getFullYear()-100;switch(e.fields){case ui.YEAR:return t;case ui.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function HE(e){if(e.mode===Ie.TIME)return"23:59";if(e.mode===Ie.DATE){var t=new Date().getFullYear()+100;switch(e.fields){case ui.YEAR:return t;case ui.MONTH:return t+"-12";default:return t+"-12-31"}}return""}var WE={name:{type:String,default:""},range:{type:Array,default(){return[]}},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:Ie.SELECTOR,validator(e){return Object.values(Ie).indexOf(e)>=0}},fields:{type:String,default:""},start:{type:String,default:UE},end:{type:String,default:HE},disabled:{type:[Boolean,String],default:!1}},VE=ge({name:"Picker",props:WE,emits:["change","cancel","columnchange"],setup(e,t){var{emit:r}=t;xm();var{t:i,getLocale:a}=Je(),n=U(null),o=Pe(n,r),s=U(null),u=U(null),l=()=>{var m=e.value;switch(e.mode){case Ie.MULTISELECTOR:{Array.isArray(m)||(m=[]),Array.isArray(s.value)||(s.value=[]);for(var b=s.value.length=Math.max(m.length,e.range.length),c=0;c{u.value&&u.value.sendMessage(m)},d=m=>{var b={event:"cancel"};u.value=zE({url:"__uniapppicker",data:m,style:{titleNView:!1,animationType:"none",animationDuration:0,background:"rgba(0,0,0,0)",popGesture:"none"},onMessage:c=>{var v=c.event;if(v==="created"){f(m);return}if(v==="columnchange"){delete c.event,o(v,{},c);return}b=c},onClose:()=>{u.value=null;var c=b.event;delete b.event,c&&o(c,{},b)}})},g=(m,b)=>{plus.nativeUI[e.mode===Ie.TIME?"pickTime":"pickDate"](c=>{var v=c.date;o("change",{},{value:e.mode===Ie.TIME?"".concat(qn(v.getHours()),":").concat(qn(v.getMinutes())):"".concat(v.getFullYear(),"-").concat(qn(v.getMonth()+1),"-").concat(qn(v.getDate()))})},()=>{o("cancel",{},{})},e.mode===Ie.TIME?{time:Xn(e.value,Ie.TIME),popover:b}:{date:Xn(e.value,Ie.DATE),minDate:Xn(e.start,Ie.DATE),maxDate:Xn(e.end,Ie.DATE),popover:b})},h=(m,b)=>{(m.mode===Ie.TIME||m.mode===Ie.DATE)&&!m.fields?g(m,b):(m.fields=Object.values(ui).includes(m.fields)?m.fields:ui.DAY,d(m))},w=m=>{if(!e.disabled){var b=m.currentTarget,c=b.getBoundingClientRect();h(Object.assign({},e,{value:s.value,locale:a(),messages:{done:i("uni.picker.done"),cancel:i("uni.picker.cancel")}}),{top:c.top+gh(),left:c.left,width:c.width,height:c.height})}},_=_e(It,!1),x={submit:()=>[e.name,s.value],reset:()=>{switch(e.mode){case Ie.SELECTOR:s.value=0;break;case Ie.MULTISELECTOR:Array.isArray(e.value)&&(s.value=e.value.map(m=>0));break;case Ie.DATE:case Ie.TIME:s.value="";break}}};return _&&(_.addField(x),Ae(()=>_.removeField(x))),Object.keys(e).forEach(m=>{m!=="name"&&W(()=>e[m],b=>{var c={};c[m]=b,f(c)},{deep:!0})}),W(()=>e.value,l,{deep:!0}),l(),()=>I("uni-picker",{ref:n,onClick:w},[I("slot",null,null)],8,["onClick"])}});class jE extends xe{constructor(t,r,i,a){super(t,"uni-picker",VE,r,i,a)}}var u2="";class YE extends ua{constructor(t,r,i,a){super(t,"uni-picker-view",Jy,r,i,a,".uni-picker-view-wrapper")}}var f2="";class qE extends ua{constructor(t,r,i,a){super(t,"uni-picker-view-column",oS,r,i,a,".uni-picker-view-content")}}var c2="";class XE extends xe{constructor(t,r,i,a){super(t,"uni-progress",lS,r,i,a)}}var v2="";class ZE extends xe{constructor(t,r,i,a){super(t,"uni-radio",hS,r,i,a,".uni-radio-wrapper")}setText(t){El(this.$holder,"uni-radio-input",t)}}var d2="";class KE extends xe{constructor(t,r,i,a){super(t,"uni-radio-group",cS,r,i,a)}}var h2="";class GE extends xe{constructor(t,r,i,a){super(t,"uni-rich-text",SS,r,i,a)}}var g2="";class JE extends xe{constructor(t,r,i,a){super(t,"uni-scroll-view",TS,r,i,a,".uni-scroll-view-content")}setText(t){El(this.$holder,"uni-scroll-view-refresher",t)}}var p2="";class QE extends xe{constructor(t,r,i,a){super(t,"uni-slider",IS,r,i,a)}}var m2="";class eT extends ua{constructor(t,r,i,a){super(t,"uni-swiper",DS,r,i,a,".uni-swiper-slide-frame")}}var _2="";class tT extends xe{constructor(t,r,i,a){super(t,"uni-swiper-item",$S,r,i,a)}}var b2="";class rT extends xe{constructor(t,r,i,a){super(t,"uni-switch",zS,r,i,a)}}var w2="";class iT extends xe{constructor(t,r,i,a){super(t,"uni-textarea",YS,r,i,a)}init(t){super.init(t),mh(this.$props)}}var x2="",aT={id:{type:String,default:""},src:{type:String,default:""},duration:{type:[Number,String],default:""},controls:{type:[Boolean,String],default:!0},danmuList:{type:Array,default(){return[]}},danmuBtn:{type:[Boolean,String],default:!1},enableDanmu:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},loop:{type:[Boolean,String],default:!1},muted:{type:[Boolean,String],default:!1},objectFit:{type:String,default:"contain"},poster:{type:String,default:""},direction:{type:[String,Number],default:""},showProgress:{type:Boolean,default:!0},initialTime:{type:[String,Number],default:0},showFullscreenBtn:{type:[Boolean,String],default:!0},pageGesture:{type:[Boolean,String],default:!1},enableProgressGesture:{type:[Boolean,String],default:!0},vslideGesture:{type:[Boolean,String],default:!1},vslideGestureInFullscreen:{type:[Boolean,String],default:!1},showPlayBtn:{type:[Boolean,String],default:!0},enablePlayGesture:{type:[Boolean,String],default:!0},showCenterPlayBtn:{type:[Boolean,String],default:!0},showLoading:{type:[Boolean,String],default:!0},codec:{type:String,default:"hardware"},httpCache:{type:[Boolean,String],default:!1},playStrategy:{type:[Number,String],default:0},header:{type:Object,default(){return{}}},advanced:{type:Array,default(){return[]}}},Sh=["play","pause","ended","timeupdate","fullscreenchange","fullscreenclick","waiting","error"],nT=["play","pause","stop","seek","sendDanmu","playbackRate","requestFullScreen","exitFullScreen"],oT=ge({name:"Video",props:aT,emits:Sh,setup(e,t){var{emit:r}=t,i=U(null),a=Pe(i,r),n=U(null),o=Sl(e,["id"]),{position:s,hidden:u,onParentReady:l}=la(n),f;l(()=>{f=plus.video.createVideoPlayer("video"+Date.now(),Object.assign({},o.value,s)),plus.webview.currentWebview().append(f),u.value&&f.hide(),Sh.forEach(g=>{f.addEventListener(g,h=>{a(g,{},h.detail)})}),W(()=>o.value,g=>f.setStyles(g),{deep:!0}),W(()=>s,g=>f.setStyles(g),{deep:!0}),W(()=>u.value,g=>{f[g?"hide":"show"](),g||f.setStyles(s)})});var d=jn();return Vn((g,h)=>{if(nT.includes(g)){var w;switch(g){case"seek":w=h.position;break;case"sendDanmu":w=h;break;case"playbackRate":w=h.rate;break;case"requestFullScreen":w=h.direction;break}f&&f[g](w)}},d,!0),Ae(()=>{f&&f.close()}),()=>I("uni-video",{ref:i,id:e.id},[I("div",{ref:n,class:"uni-video-container"},null,512),I("div",{class:"uni-video-slot"},null)],8,["id"])}});class sT extends xe{constructor(t,r,i,a){super(t,"uni-video",oT,r,i,a,".uni-video-slot")}}var y2="",lT={src:{type:String,default:""},updateTitle:{type:Boolean,default:!0},webviewStyles:{type:Object,default(){return{}}}},at,uT=e=>{var{htmlId:t,src:r,webviewStyles:i,props:a}=e,n=plus.webview.currentWebview(),o=ce(i,{"uni-app":"none",isUniH5:!0}),s=n.getTitleNView();if(s){var u=Eu+parseFloat(o.top||"0");plus.navigator.isImmersedStatusbar()&&(u+=hh()),o.top=String(u),o.bottom=o.bottom||"0"}at=plus.webview.create(r,t,o),s&&at.addEventListener("titleUpdate",function(){var l;if(!!a.updateTitle){var f=(l=at)===null||l===void 0?void 0:l.getTitle();n.setStyle({titleNView:{titleText:!f||f==="null"?" ":f}})}}),plus.webview.currentWebview().append(at)},fT=()=>{var e;plus.webview.currentWebview().remove(at),(e=at)===null||e===void 0||e.close("none"),at=null},cT=ge({name:"WebView",props:lT,setup(e){var t=Gt(),r=U(null),{hidden:i,onParentReady:a}=la(r),n=te(()=>e.webviewStyles);return a(()=>{var o,s=U(_b+t);uT({htmlId:s.value,src:vt(e.src),webviewStyles:n.value,props:e}),UniViewJSBridge.publishHandler(pb,{},t),i.value&&((o=at)===null||o===void 0||o.hide())}),Ae(()=>{fT(),UniViewJSBridge.publishHandler(mb,{},t)}),W(()=>e.src,o=>{var s,u=vt(o)||"";if(!!u){if(/^(http|https):\/\//.test(u)&&e.webviewStyles.progress){var l;(l=at)===null||l===void 0||l.setStyle({progress:{color:e.webviewStyles.progress.color}})}(s=at)===null||s===void 0||s.loadURL(u)}}),W(n,o=>{var s;(s=at)===null||s===void 0||s.setStyle(o)}),W(i,o=>{at&&at[o?"hide":"show"]()}),()=>I("uni-web-view",{ref:r},null,512)}});class vT extends xe{constructor(t,r,i,a){super(t,"uni-web-view",cT,r,i,a)}}var dT={"#text":GS,"#comment":fx,VIEW:tE,IMAGE:SE,TEXT:KS,NAVIGATOR:NE,FORM:wE,BUTTON:sE,INPUT:EE,LABEL:TE,RADIO:ZE,CHECKBOX:fE,"CHECKBOX-GROUP":cE,AD:oE,CAMERA:lE,CANVAS:uE,"COVER-IMAGE":pE,"COVER-VIEW":_E,EDITOR:bE,"FUNCTIONAL-PAGE-NAVIGATOR":xE,ICON:yE,"RADIO-GROUP":KE,"LIVE-PLAYER":CE,"LIVE-PUSHER":OE,MAP:RE,"MOVABLE-AREA":LE,"MOVABLE-VIEW":PE,"OFFICIAL-ACCOUNT":DE,"OPEN-DATA":BE,PICKER:jE,"PICKER-VIEW":YE,"PICKER-VIEW-COLUMN":qE,PROGRESS:XE,"RICH-TEXT":GE,"SCROLL-VIEW":JE,SLIDER:QE,SWIPER:eT,"SWIPER-ITEM":tT,SWITCH:rT,TEXTAREA:iT,VIDEO:sT,"WEB-VIEW":vT};function hT(e,t){return()=>__(e,t)}var Zn=new Map;function nt(e){return Zn.get(e)}function gT(e){return Zn.get(e)}function Eh(e){return Zn.delete(e)}function Th(e,t,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},n;if(e===0)n=new ii(e,t,r,document.createElement(t));else{var o=dT[t];o?n=new o(e,r,i,a):n=new wd(e,document.createElement(t),r,i,a)}return Zn.set(e,n),n}var Il=[],Ch=!1;function Oh(e){if(Ch)return e();Il.push(e)}function kl(){Ch=!0,Il.forEach(e=>e()),Il.length=0}function pT(){}function Ah(e){var{css:t,route:r,platform:i,pixelRatio:a,windowWidth:n,disableScroll:o,statusbarHeight:s,windowTop:u,windowBottom:l}=e;mT(r),_T(i,a,n),bT();var f=plus.webview.currentWebview().id;window.__id__=f,document.title="".concat(r,"[").concat(f,"]"),xT(s,u,l),o&&document.addEventListener("touchmove",sb),t?wT(r):kl()}function mT(e){window.__PAGE_INFO__={route:e}}function _T(e,t,r){window.__SYSTEM_INFO__={platform:e,pixelRatio:t,windowWidth:r}}function bT(){Th(0,"div",-1,-1).$=document.getElementById("app")}function wT(e){var t=document.createElement("link");t.type="text/css",t.rel="stylesheet",t.href=e+".css",t.onload=kl,t.onerror=kl,document.head.appendChild(t)}function xT(e,t,r){var i={"--window-left":"0px","--window-right":"0px","--window-top":t+"px","--window-bottom":r+"px","--status-bar-height":e+"px"};K_(i)}var Ih=!1;function yT(e){if(!Ih){Ih=!0;var t={onReachBottomDistance:e,onPageScroll(r){UniViewJSBridge.publishHandler(Mp,{scrollTop:r})},onReachBottom(){UniViewJSBridge.publishHandler(Rp)}};requestAnimationFrame(()=>document.addEventListener("scroll",lb(t)))}}function ST(e,t){var{scrollTop:r,selector:i,duration:a}=e;Np(i||r||0,a),t()}function ET(e){var t=e[0];t[0]===Mu?TT(t):Oh(()=>CT(e))}function TT(e){return Ah(e[1])}function CT(e){var t=e[0],r=V1(t[0]===gb?t[1]:[]);e.forEach(i=>{switch(i[0]){case Mu:return Ah(i[1]);case Wp:return pT();case Vp:return Th(i[1],r(i[2]),i[3],i[4],j1(r,i[5]));case jp:return nt(i[1]).remove();case Yp:return nt(i[1]).setAttr(r(i[2]),r(i[3]));case qp:return nt(i[1]).removeAttr(r(i[2]));case Xp:return nt(i[1]).addEvent(r(i[2]),i[3]);case Gp:return nt(i[1]).addWxsEvent(r(i[2]),r(i[3]),i[4]);case Zp:return nt(i[1]).removeEvent(r(i[2]));case Kp:return nt(i[1]).setText(r(i[2]));case Jp:return yT(i[1])}}),Z1()}function OT(){var{subscribe:e}=UniViewJSBridge;e(bc,ET),e(bb,t=>Je().setLocale(t)),e(wc,AT)}function AT(){UniViewJSBridge.publishHandler("webviewReady")}function kh(e){return window.__$__(e).$}function IT(e){var t={};if(e.id&&(t.id=""),e.dataset&&(t.dataset={}),e.rect&&(t.left=0,t.right=0,t.top=0,t.bottom=0),e.size&&(t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight),e.scrollOffset){var r=document.documentElement,i=document.body;t.scrollLeft=r.scrollLeft||i.scrollLeft||0,t.scrollTop=r.scrollTop||i.scrollTop||0,t.scrollHeight=r.scrollHeight||i.scrollHeight||0,t.scrollWidth=r.scrollWidth||i.scrollWidth||0}return t}function Ml(e,t){var r={},{top:i}=Z_();if(t.id&&(r.id=e.id),t.dataset&&(r.dataset=ko(e)),t.rect||t.size){var a=e.getBoundingClientRect();t.rect&&(r.left=a.left,r.right=a.right,r.top=a.top-i,r.bottom=a.bottom-i),t.size&&(r.width=a.width,r.height=a.height)}if(Array.isArray(t.properties)&&t.properties.forEach(s=>{s=s.replace(/-([a-z])/g,function(u,l){return l.toUpperCase()})}),t.scrollOffset)if(e.tagName==="UNI-SCROLL-VIEW"){var n=e.children[0].children[0];r.scrollLeft=n.scrollLeft,r.scrollTop=n.scrollTop,r.scrollHeight=n.scrollHeight,r.scrollWidth=n.scrollWidth}else r.scrollLeft=0,r.scrollTop=0,r.scrollHeight=0,r.scrollWidth=0;if(Array.isArray(t.computedStyle)){var o=getComputedStyle(e);t.computedStyle.forEach(s=>{r[s]=o[s]})}return t.context&&(r.contextInfo=XS(e)),r}function kT(e,t){return e?window.__$__(e).$:t.$el}function Mh(e,t){var r=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(i){for(var a=this.parentElement.querySelectorAll(i),n=a.length;--n>=0&&a.item(n)!==this;);return n>-1};return r.call(e,t)}function MT(e,t,r,i,a){var n=kT(t,e),o=n.parentElement;if(!o)return i?null:[];var{nodeType:s}=n,u=s===3||s===8;if(i){var l=u?o.querySelector(r):Mh(n,r)?n:n.querySelector(r);return l?Ml(l,a):null}else{var f=[],d=(u?o:n).querySelectorAll(r);return d&&d.length&&[].forEach.call(d,g=>{f.push(Ml(g,a))}),!u&&Mh(n,r)&&f.unshift(Ml(n,a)),f}}function RT(e,t,r){var i=[];t.forEach(a=>{var{component:n,selector:o,single:s,fields:u}=a;n===null?i.push(IT(u)):i.push(MT(e,n,o,s,u))}),r(i)}function LT(e,t){var{pageStyle:r,rootFontSize:i}=t;if(r){var a=document.querySelector("uni-page-body")||document.body;a.setAttribute("style",r)}i&&document.documentElement.style.fontSize!==i&&(document.documentElement.style.fontSize=i)}function PT(e,t){var{reqId:r,component:i,options:a,callback:n}=e,o=kh(i);(o.__io||(o.__io={}))[r]=D1(o,a,n)}function NT(e,t){var{reqId:r,component:i}=e,a=kh(i),n=a.__io&&a.__io[r];n&&(n.disconnect(),delete a.__io[r])}var Rl={},Ll={};function DT(e){var t=[],r=["width","minWidth","maxWidth","height","minHeight","maxHeight","orientation"];for(var i of r)i!=="orientation"&&e[i]&&Number(e[i]>=0)&&t.push("(".concat(Rh(i),": ").concat(Number(e[i]),"px)")),i==="orientation"&&e[i]&&t.push("(".concat(Rh(i),": ").concat(e[i],")"));var a=t.join(" and ");return a}function Rh(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function BT(e,t){var{reqId:r,component:i,options:a,callback:n}=e,o=Rl[r]=window.matchMedia(DT(a)),s=Ll[r]=u=>n(u.matches);s(o),o.addListener(s)}function $T(e,t){var{reqId:r,component:i}=e,a=Ll[r],n=Rl[r];n&&(n.removeListener(a),delete Ll[r],delete Rl[r])}function FT(e,t){var{family:r,source:i,desc:a}=e;Pp(r,i,a).then(()=>{t()}).catch(n=>{t(n.toString())})}var zT={$el:document.body};function UT(){var e=Gt();Cm(e,t=>function(){for(var r=arguments.length,i=new Array(r),a=0;a{t.apply(null,i)})}),bt(e,"requestComponentInfo",(t,r)=>{RT(zT,t.reqs,r)}),bt(e,"addIntersectionObserver",t=>{PT(ce({},t,{callback(r){UniViewJSBridge.publishHandler(t.eventName,r)}}))}),bt(e,"removeIntersectionObserver",t=>{NT(t)}),bt(e,"addMediaQueryObserver",t=>{BT(ce({},t,{callback(r){UniViewJSBridge.publishHandler(t.eventName,r)}}))}),bt(e,"removeMediaQueryObserver",t=>{$T(t)}),bt(e,L1,ST),bt(e,R1,FT),bt(e,M1,t=>{LT(null,t)})}window.uni=H1,window.UniViewJSBridge=xc,window.rpx2px=id,window.__$__=nt,window.__f__=Fp;function Lh(){Nm(),UT(),OT(),W1(),xc.publishHandler(wc)}typeof plus!="undefined"?Lh():document.addEventListener("plusready",Lh)}); diff --git a/packages/uni-app-plus/src/service/api/index.ts b/packages/uni-app-plus/src/service/api/index.ts index d81e452dab4d66f06a52871125d21b8148b24cdf..ab999f1e3b3c03c6ed682bf01117b2f943b61fee 100644 --- a/packages/uni-app-plus/src/service/api/index.ts +++ b/packages/uni-app-plus/src/service/api/index.ts @@ -115,4 +115,9 @@ export { setPageMeta, getEnterOptionsSync, getLaunchOptionsSync, + getPushCid, + onPushMessage, + offPushMessage, + // 内部使用 + invokePushCallback, } from '@dcloudio/uni-api' diff --git a/packages/uni-app/dist/uni.compiler.js b/packages/uni-app/dist/uni.compiler.js index 7b71d7e894b289ca660cae2c472637e6d9e41c84..5bd3057a6c225b10b0a8165f1985659d87bfab42 100644 --- a/packages/uni-app/dist/uni.compiler.js +++ b/packages/uni-app/dist/uni.compiler.js @@ -4,6 +4,8 @@ var index = [ /* eslint-disable no-restricted-globals */ ...require('@dcloudio/uni-cloud/lib/uni.plugin.js').default, /* eslint-disable no-restricted-globals */ + ...require('@dcloudio/uni-push/lib/uni.plugin.js'), + /* eslint-disable no-restricted-globals */ ...require('@dcloudio/uni-stat/lib/uni.plugin.js'), ]; diff --git a/packages/uni-app/package.json b/packages/uni-app/package.json index 495edd624ca83b2af37e5a5c591beac48f204f43..c7a0f8ae0174ce0283bbc2735c837d904d7f2331 100644 --- a/packages/uni-app/package.json +++ b/packages/uni-app/package.json @@ -27,6 +27,7 @@ "@dcloudio/uni-cloud": "3.0.0-alpha-3030820220114006", "@dcloudio/uni-components": "3.0.0-alpha-3030820220114006", "@dcloudio/uni-i18n": "3.0.0-alpha-3030820220114006", + "@dcloudio/uni-push": "3.0.0-alpha-3030820220114006", "@dcloudio/uni-shared": "3.0.0-alpha-3030820220114006", "@dcloudio/uni-stat": "3.0.0-alpha-3030820220114006", "@vue/shared": "3.2.30" diff --git a/packages/uni-app/src/compiler/index.ts b/packages/uni-app/src/compiler/index.ts index 0509ea0a38f952bc9e34e04c340d9153a0465266..339e4038d2e327a09a60d945e0c6cbed95339cd6 100644 --- a/packages/uni-app/src/compiler/index.ts +++ b/packages/uni-app/src/compiler/index.ts @@ -2,5 +2,7 @@ export default [ /* eslint-disable no-restricted-globals */ ...require('@dcloudio/uni-cloud/lib/uni.plugin.js').default, /* eslint-disable no-restricted-globals */ + ...require('@dcloudio/uni-push/lib/uni.plugin.js'), + /* eslint-disable no-restricted-globals */ ...require('@dcloudio/uni-stat/lib/uni.plugin.js'), ] diff --git a/packages/uni-cli-shared/src/json/manifest.ts b/packages/uni-cli-shared/src/json/manifest.ts index 219ed22c075574fd55206802d65902e560defc5c..995db0f69b66cfa2dc644d4a53c2f22d4cd183ba 100644 --- a/packages/uni-cli-shared/src/json/manifest.ts +++ b/packages/uni-cli-shared/src/json/manifest.ts @@ -66,6 +66,23 @@ export function getUniStatistics(inputDir: string, platform: UniApp.PLATFORM) { ) } +export function getUniPush(inputDir: string, platform: UniApp.PLATFORM) { + const manifest = parseManifestJsonOnce(inputDir) + return extend( + {}, + manifest.unipush, + manifest[platform] && manifest[platform].unipush + ) +} + +export function isUniPushOffline(inputDir: string) { + const manifest = parseManifestJsonOnce(inputDir) + return ( + manifest?.['app-plus']?.distribute?.sdkConfigs?.push?.unipush?.enable === + true + ) +} + export function getRouterOptions(manifestJson: Record): { mode?: 'history' | 'hash' base?: string diff --git a/packages/uni-cli-shared/src/vite/utils/utils.ts b/packages/uni-cli-shared/src/vite/utils/utils.ts index 232da09aaad38386d8af4b1a47185129e52d9810..84845603cd951856574a3776e36694ef881bc8f7 100644 --- a/packages/uni-cli-shared/src/vite/utils/utils.ts +++ b/packages/uni-cli-shared/src/vite/utils/utils.ts @@ -1,4 +1,4 @@ -import type { ResolvedConfig } from 'vite' +import type { ConfigEnv, ResolvedConfig, UserConfig } from 'vite' export function withSourcemap(config: ResolvedConfig) { if (config.command === 'serve') { @@ -6,3 +6,16 @@ export function withSourcemap(config: ResolvedConfig) { } return !!config.build.sourcemap } + +export function isSsr( + command: ConfigEnv['command'], + config: UserConfig | ResolvedConfig +) { + if (command === 'serve') { + return !!(config.server && config.server.middlewareMode) + } + if (command === 'build') { + return !!(config.build && config.build.ssr) + } + return false +} diff --git a/packages/uni-h5-vite/lib/api.json b/packages/uni-h5-vite/lib/api.json index bc32c86a64cdc08f6a21813071afbaadf7d97fc7..54d489e069427d716634eabb96e4d0d634489842 100644 --- a/packages/uni-h5-vite/lib/api.json +++ b/packages/uni-h5-vite/lib/api.json @@ -41,6 +41,7 @@ "getLocation", "getNetworkType", "getProvider", + "getPushCid", "getRealPath", "getRecorderManager", "getRightWindowStyle", @@ -66,6 +67,7 @@ "hideToast", "hideTopWindow", "interceptors", + "invokePushCallback", "loadFontFace", "login", "makePhoneCall", @@ -74,6 +76,7 @@ "offAccelerometerChange", "offCompassChange", "offNetworkStatusChange", + "offPushMessage", "offWindowResize", "onAccelerometerChange", "onAppLaunch", @@ -82,6 +85,7 @@ "onLocaleChange", "onMemoryWarning", "onNetworkStatusChange", + "onPushMessage", "onSocketClose", "onSocketError", "onSocketMessage", diff --git a/packages/uni-h5-vite/src/plugin/config.ts b/packages/uni-h5-vite/src/plugin/config.ts index 05f32f2926bf8006ec85dc2ace6319323ea3571c..887dc8252bb4ab84951caa6ef65ba9cfff284a4e 100644 --- a/packages/uni-h5-vite/src/plugin/config.ts +++ b/packages/uni-h5-vite/src/plugin/config.ts @@ -9,8 +9,9 @@ import { parseManifestJsonOnce, initPostcssPlugin, parseRpx2UnitOnce, + isSsr, } from '@dcloudio/uni-cli-shared' -import { createDefine, isSsr } from '../utils' +import { createDefine } from '../utils' import { esbuildPrePlugin } from './esbuild/esbuildPrePlugin' import { external } from './configureServer/ssr' import { extend, hasOwn } from '@vue/shared' diff --git a/packages/uni-h5-vite/src/plugins/mainJs.ts b/packages/uni-h5-vite/src/plugins/mainJs.ts index 1c99be57f0ba6e41b62bf6a1596d614d7d0f79b5..3c1b38097df7653539d1eab0fbb5157e90a9bb34 100644 --- a/packages/uni-h5-vite/src/plugins/mainJs.ts +++ b/packages/uni-h5-vite/src/plugins/mainJs.ts @@ -1,6 +1,10 @@ import path from 'path' -import { defineUniMainJsPlugin, normalizePath } from '@dcloudio/uni-cli-shared' -import { isSSR, isSsr, isSsrManifest } from '../utils' +import { + defineUniMainJsPlugin, + isSsr, + normalizePath, +} from '@dcloudio/uni-cli-shared' +import { isSSR, isSsrManifest } from '../utils' export function uniMainJsPlugin() { return defineUniMainJsPlugin((opts) => { diff --git a/packages/uni-h5-vite/src/plugins/ssr.ts b/packages/uni-h5-vite/src/plugins/ssr.ts index 42b9722a353094a240ed22ced22ee3d40de14314..d14259ba1ebb536d76d7b3922eaf05ec413c219b 100644 --- a/packages/uni-h5-vite/src/plugins/ssr.ts +++ b/packages/uni-h5-vite/src/plugins/ssr.ts @@ -3,10 +3,9 @@ import type { Plugin, ResolvedConfig } from 'vite' import { OutputChunk } from 'rollup' -import { parseRpx2UnitOnce } from '@dcloudio/uni-cli-shared' +import { isSsr, parseRpx2UnitOnce } from '@dcloudio/uni-cli-shared' import { - isSsr, initSsrDefine, rewriteSsrVue, rewriteSsrResolve, diff --git a/packages/uni-h5-vite/src/utils/features.ts b/packages/uni-h5-vite/src/utils/features.ts index a32dafe078d6ab9d3eeee828a86f8270a720d7cb..269ea98f53c0480a49463612c5fc76bed607655d 100644 --- a/packages/uni-h5-vite/src/utils/features.ts +++ b/packages/uni-h5-vite/src/utils/features.ts @@ -3,8 +3,9 @@ import { parsePagesJsonOnce, parseManifestJsonOnce, initFeatures, + isSsr, } from '@dcloudio/uni-cli-shared' -import { isSsr, isSsrManifest } from './ssr' +import { isSsrManifest } from './ssr' export function createDefine( command: ConfigEnv['command'], diff --git a/packages/uni-h5-vite/src/utils/ssr.ts b/packages/uni-h5-vite/src/utils/ssr.ts index 171865e3ac30d4dfa558f6507d16b6c5e14e7313..7ca6215d52b9698190f0fce6b0bb7059cc801d7f 100644 --- a/packages/uni-h5-vite/src/utils/ssr.ts +++ b/packages/uni-h5-vite/src/utils/ssr.ts @@ -23,19 +23,6 @@ import { transformPageHead } from '../plugin/transforms/transformPageHead' export const isSSR = (opt: { ssr?: boolean } | boolean | undefined) => opt === undefined ? false : typeof opt === 'boolean' ? opt : opt?.ssr === true -export function isSsr( - command: ConfigEnv['command'], - config: UserConfig | ResolvedConfig -) { - if (command === 'serve') { - return !!(config.server && config.server.middlewareMode) - } - if (command === 'build') { - return !!(config.build && config.build.ssr) - } - return false -} - export function isSsrManifest( command: ConfigEnv['command'], config: UserConfig | ResolvedConfig diff --git a/packages/uni-h5/dist/uni-h5.cjs.js b/packages/uni-h5/dist/uni-h5.cjs.js index 6040b944f96e98dbbffb16b9ce6e7557b30b76a3..353306233e59b9c523045520abe2b799c1b5c9ff 100644 --- a/packages/uni-h5/dist/uni-h5.cjs.js +++ b/packages/uni-h5/dist/uni-h5.cjs.js @@ -1634,10 +1634,10 @@ function useResizeSensorReset(rootRef) { }; } const pixelRatio = 1; -function wrapper(canvas) { - canvas.width = canvas.offsetWidth * pixelRatio; - canvas.height = canvas.offsetHeight * pixelRatio; - canvas.getContext("2d").__hidpi__ = true; +function wrapper(canvas, hidpi = true) { + canvas.width = canvas.offsetWidth * (hidpi ? pixelRatio : 1); + canvas.height = canvas.offsetHeight * (hidpi ? pixelRatio : 1); + canvas.getContext("2d").__hidpi__ = hidpi; } const initHidpiOnce = /* @__PURE__ */ uniShared.once(() => { return void 0; @@ -1678,6 +1678,10 @@ const props$t = { disableScroll: { type: [Boolean, String], default: false + }, + hidpi: { + type: Boolean, + default: true } }; var index$B = /* @__PURE__ */ defineBuiltInComponent({ @@ -1714,7 +1718,7 @@ var index$B = /* @__PURE__ */ defineBuiltInComponent({ const { _handleSubscribe, _resize - } = useMethods(canvas, actionsWaiting); + } = useMethods(props2, canvas, actionsWaiting); useSubscribe(_handleSubscribe, useContextInfo(props2.canvasId)); return () => { const { @@ -1780,21 +1784,22 @@ function useListeners(props2, Listeners, trigger) { _listeners }; } -function useMethods(canvasRef, actionsWaiting) { +function useMethods(props2, canvasRef, actionsWaiting) { let _actionsDefer = []; let _images = {}; + const _pixelRatio = vue.computed(() => props2.hidpi ? pixelRatio : 1); function _resize(size) { let canvas = canvasRef.value; - var hasChanged = !size || canvas.width !== Math.floor(size.width * pixelRatio) || canvas.height !== Math.floor(size.height * pixelRatio); + var hasChanged = !size || canvas.width !== Math.floor(size.width * _pixelRatio.value) || canvas.height !== Math.floor(size.height * _pixelRatio.value); if (!hasChanged) return; if (canvas.width > 0 && canvas.height > 0) { let context = canvas.getContext("2d"); let imageData = context.getImageData(0, 0, canvas.width, canvas.height); - wrapper(canvas); + wrapper(canvas, props2.hidpi); context.putImageData(imageData, 0, 0); } else { - wrapper(canvas); + wrapper(canvas, props2.hidpi); } } function actionsChanged({ @@ -2004,8 +2009,8 @@ function useMethods(canvasRef, actionsWaiting) { height = height ? Math.min(height, maxHeight) : maxHeight; if (!hidpi) { if (!destWidth && !destHeight) { - destWidth = Math.round(width * pixelRatio); - destHeight = Math.round(height * pixelRatio); + destWidth = Math.round(width * _pixelRatio.value); + destHeight = Math.round(height * _pixelRatio.value); } else if (!destWidth) { destWidth = Math.round(width / height * destHeight); } else if (!destHeight) { diff --git a/packages/uni-h5/dist/uni-h5.es.js b/packages/uni-h5/dist/uni-h5.es.js index c0e5c70bb25c6016f2bfee84f108e26063750b89..c8b122ed6a3b4ebda2f535c74f6b3446ae6729b8 100644 --- a/packages/uni-h5/dist/uni-h5.es.js +++ b/packages/uni-h5/dist/uni-h5.es.js @@ -4537,6 +4537,63 @@ const API_GET_LAUNCH_OPTIONS_SYNC = "getLaunchOptionsSync"; const getLaunchOptionsSync = /* @__PURE__ */ defineSyncApi(API_GET_LAUNCH_OPTIONS_SYNC, () => { return getLaunchOptions(); }); +let cid = ""; +function invokePushCallback(args) { + if (args.type === "clientId") { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } else if (args.type === "pushMsg") { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid2) { + getPushCidCallbacks.forEach((callback) => { + callback(cid2); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid2) => { + let res; + if (cid2) { + res = { errMsg: "getPushCid:ok", cid: cid2 }; + hasSuccess && success(res); + } else { + res = { errMsg: "getPushCid:fail" }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } else { + const index2 = onPushMessageCallbacks.indexOf(fn); + if (index2 > -1) { + onPushMessageCallbacks.splice(index2, 1); + } + } +}; const API_CAN_I_USE = "canIUse"; const CanIUseProtocol = [ { @@ -6245,10 +6302,10 @@ const pixelRatio = /* @__PURE__ */ function() { const backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; return (window.devicePixelRatio || 1) / backingStore; }(); -function wrapper(canvas) { - canvas.width = canvas.offsetWidth * pixelRatio; - canvas.height = canvas.offsetHeight * pixelRatio; - canvas.getContext("2d").__hidpi__ = true; +function wrapper(canvas, hidpi = true) { + canvas.width = canvas.offsetWidth * (hidpi ? pixelRatio : 1); + canvas.height = canvas.offsetHeight * (hidpi ? pixelRatio : 1); + canvas.getContext("2d").__hidpi__ = hidpi; } let isHidpi = false; function initHidpi() { @@ -6337,6 +6394,7 @@ function initHidpi() { const args = Array.prototype.slice.call(arguments); args[1] *= pixelRatio; args[2] *= pixelRatio; + args[3] *= pixelRatio; var font2 = this.font; this.font = font2.replace(/(\d+\.?\d*)(px|em|rem|pt)/g, function(w, m, u) { return m * pixelRatio + u; @@ -6353,6 +6411,7 @@ function initHidpi() { var args = Array.prototype.slice.call(arguments); args[1] *= pixelRatio; args[2] *= pixelRatio; + args[3] *= pixelRatio; var font2 = this.font; this.font = font2.replace(/(\d+\.?\d*)(px|em|rem|pt)/g, function(w, m, u) { return m * pixelRatio + u; @@ -6412,6 +6471,10 @@ const props$A = { disableScroll: { type: [Boolean, String], default: false + }, + hidpi: { + type: Boolean, + default: true } }; var index$w = /* @__PURE__ */ defineBuiltInComponent({ @@ -6448,7 +6511,7 @@ var index$w = /* @__PURE__ */ defineBuiltInComponent({ const { _handleSubscribe, _resize - } = useMethods(canvas, actionsWaiting); + } = useMethods(props2, canvas, actionsWaiting); useSubscribe(_handleSubscribe, useContextInfo(props2.canvasId), true); onMounted(() => { _resize(); @@ -6517,21 +6580,22 @@ function useListeners(props2, Listeners, trigger) { _listeners }; } -function useMethods(canvasRef, actionsWaiting) { +function useMethods(props2, canvasRef, actionsWaiting) { let _actionsDefer = []; let _images = {}; + const _pixelRatio = computed(() => props2.hidpi ? pixelRatio : 1); function _resize(size) { let canvas = canvasRef.value; - var hasChanged = !size || canvas.width !== Math.floor(size.width * pixelRatio) || canvas.height !== Math.floor(size.height * pixelRatio); + var hasChanged = !size || canvas.width !== Math.floor(size.width * _pixelRatio.value) || canvas.height !== Math.floor(size.height * _pixelRatio.value); if (!hasChanged) return; if (canvas.width > 0 && canvas.height > 0) { let context = canvas.getContext("2d"); let imageData = context.getImageData(0, 0, canvas.width, canvas.height); - wrapper(canvas); + wrapper(canvas, props2.hidpi); context.putImageData(imageData, 0, 0); } else { - wrapper(canvas); + wrapper(canvas, props2.hidpi); } } function actionsChanged({ @@ -6741,8 +6805,8 @@ function useMethods(canvasRef, actionsWaiting) { height = height ? Math.min(height, maxHeight) : maxHeight; if (!hidpi) { if (!destWidth && !destHeight) { - destWidth = Math.round(width * pixelRatio); - destHeight = Math.round(height * pixelRatio); + destWidth = Math.round(width * _pixelRatio.value); + destHeight = Math.round(height * _pixelRatio.value); } else if (!destWidth) { destWidth = Math.round(width / height * destHeight); } else if (!destHeight) { @@ -19829,6 +19893,10 @@ var api = { setPageMeta, getEnterOptionsSync, getLaunchOptionsSync, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, cssVar, cssEnv, cssConstant, @@ -21990,4 +22058,4 @@ var index = /* @__PURE__ */ defineSystemComponent({ return openBlock(), createBlock("div", clazz, [loadingVNode]); } }); -export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closePreviewImage, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, getClipboardData, getCurrentPages$1 as getCurrentPages, getEnterOptionsSync, getFileInfo, getImageInfo, getLaunchOptionsSync, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, interceptors, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offWindowResize, onAccelerometerChange, onAppLaunch, onCompassChange, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setClipboardData, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setPageMeta, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort }; +export { $emit, $off, $on, $once, index$8 as Ad, index$7 as AdContentPage, index$6 as AdDraw, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, index$y as Button, index$5 as Camera, index$w as Canvas, index$u as Checkbox, index$v as CheckboxGroup, index$a as CoverImage, index$b as CoverView, index$t as Editor, index$A as Form, index$s as Icon, index$r as Image, Input, index$z as Label, LayoutComponent, index$4 as LivePlayer, index$3 as LivePusher, Map$1 as Map, MovableArea, MovableView, index$q as Navigator, index$2 as PageComponent, index$9 as Picker, PickerView, PickerViewColumn, index$p as Progress, index$n as Radio, index$o as RadioGroup, ResizeSensor, index$m as RichText, ScrollView, index$l as Slider, Swiper, SwiperItem, index$k as Switch, index$j as Text, index$i as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$e as Video, index$h as View, index$d as WebView, addInterceptor, addPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closePreviewImage, closeSocket, connectSocket, createAnimation$1 as createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, downloadFile, getApp$1 as getApp, getClipboardData, getCurrentPages$1 as getCurrentPages, getEnterOptionsSync, getFileInfo, getImageInfo, getLaunchOptionsSync, getLeftWindowStyle, getLocale, getLocation, getNetworkType, getProvider, getPushCid, getRealPath, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange$1 as getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, interceptors, invokePushCallback, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offPushMessage, offWindowResize, onAccelerometerChange, onAppLaunch, onCompassChange, onGyroscopeChange, onLocaleChange, onMemoryWarning, onNetworkStatusChange, onPushMessage, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$f as plugin, preloadPage, previewImage, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setClipboardData, setKeepScreenOn, setLeftWindowStyle, setLocale, setNavigationBarColor, setNavigationBarTitle, setPageMeta, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, setupWindow, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope, stopPullDownRefresh, switchTab, uni$1 as uni, uploadFile, upx2px, useI18n, useTabBar, vibrateLong, vibrateShort }; diff --git a/packages/uni-h5/src/service/api/index.ts b/packages/uni-h5/src/service/api/index.ts index f7405245af728ca0a830e975d13f4fcf9418d611..0ba0e45d54bfc6851887f2039e205ecf42183827 100644 --- a/packages/uni-h5/src/service/api/index.ts +++ b/packages/uni-h5/src/service/api/index.ts @@ -97,5 +97,10 @@ export { setPageMeta, getEnterOptionsSync, getLaunchOptionsSync, + getPushCid, + onPushMessage, + offPushMessage, + // 内部使用 + invokePushCallback, } from '@dcloudio/uni-api' //#endif diff --git a/packages/uni-mp-alipay/dist/uni.api.esm.js b/packages/uni-mp-alipay/dist/uni.api.esm.js index f02dad965e38db010fab2b98bc33a0be3d69b52e..1fb486ac52e07c8cd7c330f553b3b4b8a35fb7c2 100644 --- a/packages/uni-mp-alipay/dist/uni.api.esm.js +++ b/packages/uni-mp-alipay/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-baidu/dist/uni.api.esm.js b/packages/uni-mp-baidu/dist/uni.api.esm.js index 27b0210de27f8c70552e87701de4cdb6135b008c..4687011e0a0e0a72805f679409b92c2f7a5ec004 100644 --- a/packages/uni-mp-baidu/dist/uni.api.esm.js +++ b/packages/uni-mp-baidu/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-core/src/api/index.ts b/packages/uni-mp-core/src/api/index.ts index 9b76d6e830c8d35e287bc4625b987b7601dbe606..2ce3194fefff048552c5e5e7ad6f200e54ea7bc3 100644 --- a/packages/uni-mp-core/src/api/index.ts +++ b/packages/uni-mp-core/src/api/index.ts @@ -12,6 +12,12 @@ import { $once, $emit, } from '@dcloudio/uni-api/src/service/base/eventBus' +import { + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, +} from '@dcloudio/uni-api/src/service/plugin/push' import { promisify } from './promise' import { initWrapper } from './wrapper' @@ -32,6 +38,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, } export function initUni(api: Record, protocols: MPProtocols) { diff --git a/packages/uni-mp-core/src/api/locale.ts b/packages/uni-mp-core/src/api/locale.ts index 18e10b99729043a67f007d56ef16a13fae5bf9e0..bba7bd05d4853c81fb0322e57950d6462327b11e 100644 --- a/packages/uni-mp-core/src/api/locale.ts +++ b/packages/uni-mp-core/src/api/locale.ts @@ -21,8 +21,8 @@ export const setLocale: typeof uni.setLocale = (locale) => { return false } -type OnLocaleCHangeCallback = Parameters[0] -const onLocaleChangeCallbacks: OnLocaleCHangeCallback[] = [] +type OnLocaleChangeCallback = Parameters[0] +const onLocaleChangeCallbacks: OnLocaleChangeCallback[] = [] export const onLocaleChange: typeof uni.onLocaleChange = (fn) => { if (onLocaleChangeCallbacks.indexOf(fn) === -1) { onLocaleChangeCallbacks.push(fn) diff --git a/packages/uni-mp-kuaishou/dist/uni.api.esm.js b/packages/uni-mp-kuaishou/dist/uni.api.esm.js index cefba1655343ad15e40cd1d30e9748f107e55957..d61348651bce69608f0aac9a52ac331cfd42cff2 100644 --- a/packages/uni-mp-kuaishou/dist/uni.api.esm.js +++ b/packages/uni-mp-kuaishou/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-lark/dist/uni.api.esm.js b/packages/uni-mp-lark/dist/uni.api.esm.js index 498e7e4c31ac55c4c43a7a965e7addebddb6f2bf..f58cde4801841a7e6a6e42c5c718cfe8cfd01cb2 100644 --- a/packages/uni-mp-lark/dist/uni.api.esm.js +++ b/packages/uni-mp-lark/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-qq/dist/uni.api.esm.js b/packages/uni-mp-qq/dist/uni.api.esm.js index eedb36e9d7e35ccefc42d6f492d8f43fa39b7745..e824a4873f421f3c5f18ab7e6738bad6efaca98e 100644 --- a/packages/uni-mp-qq/dist/uni.api.esm.js +++ b/packages/uni-mp-qq/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-toutiao/dist/uni.api.esm.js b/packages/uni-mp-toutiao/dist/uni.api.esm.js index beef6b785d0eb1f243a2e06e2580c44de99c7d13..b8171695ae70c42d122b53dcc3258ad1bc8531fb 100644 --- a/packages/uni-mp-toutiao/dist/uni.api.esm.js +++ b/packages/uni-mp-toutiao/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-mp-weixin/dist/uni.api.esm.js b/packages/uni-mp-weixin/dist/uni.api.esm.js index 8c1f37c0fdc9af8e5f7105d46eeeafb4c6c1bc65..c70a34f6cd18391ce9661217a4b7b49996a37f19 100644 --- a/packages/uni-mp-weixin/dist/uni.api.esm.js +++ b/packages/uni-mp-weixin/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -153,6 +153,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -548,6 +572,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -736,6 +826,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-push/build.json b/packages/uni-push/build.json new file mode 100644 index 0000000000000000000000000000000000000000..b52c4a68f1530e7105796a23dd7ee9475b22983f --- /dev/null +++ b/packages/uni-push/build.json @@ -0,0 +1,21 @@ +[ + { + "input": { + "src/plugin/index.ts": "lib/uni.plugin.js" + }, + "output": { + "format": "cjs" + }, + "external": ["debug", "@dcloudio/uni-cli-shared"] + }, + { + "input": { + "src/index.ts": ["dist/uni-push.es.js"] + } + }, + { + "input": { + "src/plus.ts": ["dist/uni-push.plus.es.js"] + } + } +] diff --git a/packages/uni-push/dist/uni-push.es.js b/packages/uni-push/dist/uni-push.es.js new file mode 100644 index 0000000000000000000000000000000000000000..fda72b5190df2f7662e017612a40fdc889f84db2 --- /dev/null +++ b/packages/uni-push/dist/uni-push.es.js @@ -0,0 +1,113 @@ +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; +} + +/*! For license information please see gtpush-min.js.LICENSE.txt */ + +var gtpushMin = createCommonjsModule(function (module, exports) { +(function t(e,r){module.exports=r();})(self,(function(){return (()=>{var t={452:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(8269),r(8214),r(888),r(5109));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.BlockCipher;var n=e.algo;var s=[];var a=[];var o=[];var u=[];var c=[];var l=[];var f=[];var h=[];var d=[];var v=[];(function(){var t=[];for(var e=0;e<256;e++)if(e<128)t[e]=e<<1;else t[e]=e<<1^283;var r=0;var i=0;for(var e=0;e<256;e++){var n=i^i<<1^i<<2^i<<3^i<<4;n=n>>>8^255&n^99;s[r]=n;a[n]=r;var p=t[r];var g=t[p];var y=t[g];var m=257*t[n]^16843008*n;o[r]=m<<24|m>>>8;u[r]=m<<16|m>>>16;c[r]=m<<8|m>>>24;l[r]=m;var m=16843009*y^65537*g^257*p^16843008*r;f[n]=m<<24|m>>>8;h[n]=m<<16|m>>>16;d[n]=m<<8|m>>>24;v[n]=m;if(!r)r=i=1;else {r=p^t[t[t[y^p]]];i^=t[t[i]];}}})();var p=[0,1,2,4,8,16,32,64,128,27,54];var g=n.AES=i.extend({_doReset:function(){var t;if(this._nRounds&&this._keyPriorReset===this._key)return;var e=this._keyPriorReset=this._key;var r=e.words;var i=e.sigBytes/4;var n=this._nRounds=i+6;var a=4*(n+1);var o=this._keySchedule=[];for(var u=0;u>>24;t=s[t>>>24]<<24|s[t>>>16&255]<<16|s[t>>>8&255]<<8|s[255&t];t^=p[u/i|0]<<24;}else if(i>6&&u%i==4)t=s[t>>>24]<<24|s[t>>>16&255]<<16|s[t>>>8&255]<<8|s[255&t];o[u]=o[u-i]^t;}var c=this._invKeySchedule=[];for(var l=0;l>>24]]^h[s[t>>>16&255]]^d[s[t>>>8&255]]^v[s[255&t]];}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,u,c,l,s);},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3];t[e+3]=r;this._doCryptBlock(t,e,this._invKeySchedule,f,h,d,v,a);var r=t[e+1];t[e+1]=t[e+3];t[e+3]=r;},_doCryptBlock:function(t,e,r,i,n,s,a,o){var u=this._nRounds;var c=t[e]^r[0];var l=t[e+1]^r[1];var f=t[e+2]^r[2];var h=t[e+3]^r[3];var d=4;for(var v=1;v>>24]^n[l>>>16&255]^s[f>>>8&255]^a[255&h]^r[d++];var g=i[l>>>24]^n[f>>>16&255]^s[h>>>8&255]^a[255&c]^r[d++];var y=i[f>>>24]^n[h>>>16&255]^s[c>>>8&255]^a[255&l]^r[d++];var m=i[h>>>24]^n[c>>>16&255]^s[l>>>8&255]^a[255&f]^r[d++];c=p;l=g;f=y;h=m;}var p=(o[c>>>24]<<24|o[l>>>16&255]<<16|o[f>>>8&255]<<8|o[255&h])^r[d++];var g=(o[l>>>24]<<24|o[f>>>16&255]<<16|o[h>>>8&255]<<8|o[255&c])^r[d++];var y=(o[f>>>24]<<24|o[h>>>16&255]<<16|o[c>>>8&255]<<8|o[255&l])^r[d++];var m=(o[h>>>24]<<24|o[c>>>16&255]<<16|o[l>>>8&255]<<8|o[255&f])^r[d++];t[e]=p;t[e+1]=g;t[e+2]=y;t[e+3]=m;},keySize:256/32});e.AES=i._createHelper(g);})();return t.AES}));},5109:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(888));})(this,(function(t){t.lib.Cipher||function(e){var r=t;var i=r.lib;var n=i.Base;var s=i.WordArray;var a=i.BufferedBlockAlgorithm;var o=r.enc;o.Utf8;var c=o.Base64;var l=r.algo;var f=l.EvpKDF;var h=i.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r);this._xformMode=t;this._key=e;this.reset();},reset:function(){a.reset.call(this);this._doReset();},process:function(t){this._append(t);return this._process()},finalize:function(t){if(t)this._append(t);var e=this._doFinalize();return e},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){if("string"==typeof t)return A;else return w}return function(e){return {encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()});i.StreamCipher=h.extend({_doFinalize:function(){var t=this._process(!!"flush");return t},blockSize:1});var v=r.mode={};var p=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t;this._iv=e;}});var g=v.CBC=function(){var t=p.extend();t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher;var n=i.blockSize;r.call(this,t,e,n);i.encryptBlock(t,e);this._prevBlock=t.slice(e,e+n);}});t.Decryptor=t.extend({processBlock:function(t,e){var i=this._cipher;var n=i.blockSize;var s=t.slice(e,e+n);i.decryptBlock(t,e);r.call(this,t,e,n);this._prevBlock=s;}});function r(t,r,i){var n;var s=this._iv;if(s){n=s;this._iv=e;}else n=this._prevBlock;for(var a=0;a>>2];t.sigBytes-=e;}};i.BlockCipher=h.extend({cfg:h.cfg.extend({mode:g,padding:m}),reset:function(){var t;h.reset.call(this);var e=this.cfg;var r=e.iv;var i=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)t=i.createEncryptor;else {t=i.createDecryptor;this._minBufferSize=1;}if(this._mode&&this._mode.__creator==t)this._mode.init(this,r&&r.words);else {this._mode=t.call(i,this,r&&r.words);this._mode.__creator=t;}},_doProcessBlock:function(t,e){this._mode.processBlock(t,e);},_doFinalize:function(){var t;var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);t=this._process(!!"flush");}else {t=this._process(!!"flush");e.unpad(t);}return t},blockSize:128/32});var S=i.CipherParams=n.extend({init:function(t){this.mixIn(t);},toString:function(t){return (t||this.formatter).stringify(this)}});var E=r.format={};var b=E.OpenSSL={stringify:function(t){var e;var r=t.ciphertext;var i=t.salt;if(i)e=s.create([1398893684,1701076831]).concat(i).concat(r);else e=r;return e.toString(c)},parse:function(t){var e;var r=c.parse(t);var i=r.words;if(1398893684==i[0]&&1701076831==i[1]){e=s.create(i.slice(2,4));i.splice(0,4);r.sigBytes-=16;}return S.create({ciphertext:r,salt:e})}};var w=i.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i);var s=n.finalize(e);var a=n.cfg;return S.create({ciphertext:s,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){i=this.cfg.extend(i);e=this._parse(e,i.format);var n=t.createDecryptor(r,i).finalize(e.ciphertext);return n},_parse:function(t,e){if("string"==typeof t)return e.parse(t,this);else return t}});var D=r.kdf={};var T=D.OpenSSL={execute:function(t,e,r,i){if(!i)i=s.random(64/8);var n=f.create({keySize:e+r}).compute(t,i);var a=s.create(n.words.slice(e),4*r);n.sigBytes=4*e;return S.create({key:n,iv:a,salt:i})}};var A=i.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:T}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=i.kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var s=w.encrypt.call(this,t,e,n.key,i);s.mixIn(n);return s},decrypt:function(t,e,r,i){i=this.cfg.extend(i);e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);i.iv=n.iv;var s=w.decrypt.call(this,t,e,n.key,i);return s}});}();}));},8249:function(t,e,r){(function(r,i){t.exports=i();})(this,(function(){var t=t||function(t,e){var i;if("undefined"!==typeof window&&window.crypto)i=window.crypto;if("undefined"!==typeof self&&self.crypto)i=self.crypto;if("undefined"!==typeof globalThis&&globalThis.crypto)i=globalThis.crypto;if(!i&&"undefined"!==typeof window&&window.msCrypto)i=window.msCrypto;if(!i&&"undefined"!==typeof r.g&&r.g.crypto)i=r.g.crypto;if(!i&&"function"==="function")try{i=r(2480);}catch(t){}var n=function(){if(i){if("function"===typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"===typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")};var s=Object.create||function(){function t(){}return function(e){var r;t.prototype=e;r=new t;t.prototype=null;return r}}();var a={};var o=a.lib={};var u=o.Base=function(){return {extend:function(t){var e=s(this);if(t)e.mixIn(t);if(!e.hasOwnProperty("init")||this.init===e.init)e.init=function(){e.$super.init.apply(this,arguments);};e.init.prototype=e;e.$super=this;return e},create:function(){var t=this.extend();t.init.apply(t,arguments);return t},init:function(){},mixIn:function(t){for(var e in t)if(t.hasOwnProperty(e))this[e]=t[e];if(t.hasOwnProperty("toString"))this.toString=t.toString;},clone:function(){return this.init.prototype.extend(this)}}}();var c=o.WordArray=u.extend({init:function(t,r){t=this.words=t||[];if(r!=e)this.sigBytes=r;else this.sigBytes=4*t.length;},toString:function(t){return (t||f).stringify(this)},concat:function(t){var e=this.words;var r=t.words;var i=this.sigBytes;var n=t.sigBytes;this.clamp();if(i%4)for(var s=0;s>>2]>>>24-s%4*8&255;e[i+s>>>2]|=a<<24-(i+s)%4*8;}else for(var o=0;o>>2]=r[o>>>2];this.sigBytes+=n;return this},clamp:function(){var e=this.words;var r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8;e.length=t.ceil(r/4);},clone:function(){var t=u.clone.call(this);t.words=this.words.slice(0);return t},random:function(t){var e=[];for(var r=0;r>>2]>>>24-n%4*8&255;i.push((s>>>4).toString(16));i.push((15&s).toString(16));}return i.join("")},parse:function(t){var e=t.length;var r=[];for(var i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new c.init(r,e/2)}};var h=l.Latin1={stringify:function(t){var e=t.words;var r=t.sigBytes;var i=[];for(var n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(s));}return i.join("")},parse:function(t){var e=t.length;var r=[];for(var i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new c.init(r,e)}};var d=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}};var v=o.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init;this._nDataBytes=0;},_append:function(t){if("string"==typeof t)t=d.parse(t);this._data.concat(t);this._nDataBytes+=t.sigBytes;},_process:function(e){var r;var i=this._data;var n=i.words;var s=i.sigBytes;var a=this.blockSize;var o=4*a;var u=s/o;if(e)u=t.ceil(u);else u=t.max((0|u)-this._minBufferSize,0);var l=u*a;var f=t.min(4*l,s);if(l){for(var h=0;h>>2]>>>24-s%4*8&255;var o=e[s+1>>>2]>>>24-(s+1)%4*8&255;var u=e[s+2>>>2]>>>24-(s+2)%4*8&255;var c=a<<16|o<<8|u;for(var l=0;l<4&&s+.75*l>>6*(3-l)&63));}var f=i.charAt(64);if(f)while(n.length%4)n.push(f);return n.join("")},parse:function(t){var e=t.length;var r=this._map;var i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var n=0;n>>6-a%4*2;var c=o|u;n[s>>>2]|=c<<24-s%4*8;s++;}return i.create(n,s)}})();return t.enc.Base64}));},3786:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.WordArray;var n=e.enc;n.Base64url={stringify:function(t,e=true){var r=t.words;var i=t.sigBytes;var n=e?this._safe_map:this._map;t.clamp();var s=[];for(var a=0;a>>2]>>>24-a%4*8&255;var u=r[a+1>>>2]>>>24-(a+1)%4*8&255;var c=r[a+2>>>2]>>>24-(a+2)%4*8&255;var l=o<<16|u<<8|c;for(var f=0;f<4&&a+.75*f>>6*(3-f)&63));}var h=n.charAt(64);if(h)while(s.length%4)s.push(h);return s.join("")},parse:function(t,e=true){var r=t.length;var i=e?this._safe_map:this._map;var n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s>>6-a%4*2;var c=o|u;n[s>>>2]|=c<<24-s%4*8;s++;}return i.create(n,s)}})();return t.enc.Base64url}));},298:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.WordArray;var n=e.enc;n.Utf16=n.Utf16BE={stringify:function(t){var e=t.words;var r=t.sigBytes;var i=[];for(var n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(s));}return i.join("")},parse:function(t){var e=t.length;var r=[];for(var n=0;n>>1]|=t.charCodeAt(n)<<16-n%2*16;return i.create(r,2*e)}};n.Utf16LE={stringify:function(t){var e=t.words;var r=t.sigBytes;var i=[];for(var n=0;n>>2]>>>16-n%4*8&65535);i.push(String.fromCharCode(s));}return i.join("")},parse:function(t){var e=t.length;var r=[];for(var n=0;n>>1]|=a(t.charCodeAt(n)<<16-n%2*16);return i.create(r,2*e)}};function a(t){return t<<8&4278255360|t>>>8&16711935}})();return t.enc.Utf16}));},888:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(2783),r(9824));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.Base;var n=r.WordArray;var s=e.algo;var a=s.MD5;var o=s.EvpKDF=i.extend({cfg:i.extend({keySize:128/32,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t);},compute:function(t,e){var r;var i=this.cfg;var s=i.hasher.create();var a=n.create();var o=a.words;var u=i.keySize;var c=i.iterations;while(o.lengthi)e=t.finalize(e);e.clamp();var n=this._oKey=e.clone();var a=this._iKey=e.clone();var o=n.words;var u=a.words;for(var c=0;c>>2]|=t[i]<<24-i%4*8;n.call(this,r,e);}else n.apply(this,arguments);};s.prototype=i;})();return t.lib.WordArray}));},8214:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(e){var r=t;var i=r.lib;var n=i.WordArray;var s=i.Hasher;var a=r.algo;var o=[];(function(){for(var t=0;t<64;t++)o[t]=4294967296*e.abs(e.sin(t+1))|0;})();var u=a.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878]);},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r;var n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);}var s=this._hash.words;var a=t[e+0];var u=t[e+1];var d=t[e+2];var v=t[e+3];var p=t[e+4];var g=t[e+5];var y=t[e+6];var m=t[e+7];var _=t[e+8];var S=t[e+9];var E=t[e+10];var b=t[e+11];var w=t[e+12];var D=t[e+13];var T=t[e+14];var A=t[e+15];var M=s[0];var I=s[1];var R=s[2];var x=s[3];M=c(M,I,R,x,a,7,o[0]);x=c(x,M,I,R,u,12,o[1]);R=c(R,x,M,I,d,17,o[2]);I=c(I,R,x,M,v,22,o[3]);M=c(M,I,R,x,p,7,o[4]);x=c(x,M,I,R,g,12,o[5]);R=c(R,x,M,I,y,17,o[6]);I=c(I,R,x,M,m,22,o[7]);M=c(M,I,R,x,_,7,o[8]);x=c(x,M,I,R,S,12,o[9]);R=c(R,x,M,I,E,17,o[10]);I=c(I,R,x,M,b,22,o[11]);M=c(M,I,R,x,w,7,o[12]);x=c(x,M,I,R,D,12,o[13]);R=c(R,x,M,I,T,17,o[14]);I=c(I,R,x,M,A,22,o[15]);M=l(M,I,R,x,u,5,o[16]);x=l(x,M,I,R,y,9,o[17]);R=l(R,x,M,I,b,14,o[18]);I=l(I,R,x,M,a,20,o[19]);M=l(M,I,R,x,g,5,o[20]);x=l(x,M,I,R,E,9,o[21]);R=l(R,x,M,I,A,14,o[22]);I=l(I,R,x,M,p,20,o[23]);M=l(M,I,R,x,S,5,o[24]);x=l(x,M,I,R,T,9,o[25]);R=l(R,x,M,I,v,14,o[26]);I=l(I,R,x,M,_,20,o[27]);M=l(M,I,R,x,D,5,o[28]);x=l(x,M,I,R,d,9,o[29]);R=l(R,x,M,I,m,14,o[30]);I=l(I,R,x,M,w,20,o[31]);M=f(M,I,R,x,g,4,o[32]);x=f(x,M,I,R,_,11,o[33]);R=f(R,x,M,I,b,16,o[34]);I=f(I,R,x,M,T,23,o[35]);M=f(M,I,R,x,u,4,o[36]);x=f(x,M,I,R,p,11,o[37]);R=f(R,x,M,I,m,16,o[38]);I=f(I,R,x,M,E,23,o[39]);M=f(M,I,R,x,D,4,o[40]);x=f(x,M,I,R,a,11,o[41]);R=f(R,x,M,I,v,16,o[42]);I=f(I,R,x,M,y,23,o[43]);M=f(M,I,R,x,S,4,o[44]);x=f(x,M,I,R,w,11,o[45]);R=f(R,x,M,I,A,16,o[46]);I=f(I,R,x,M,d,23,o[47]);M=h(M,I,R,x,a,6,o[48]);x=h(x,M,I,R,m,10,o[49]);R=h(R,x,M,I,T,15,o[50]);I=h(I,R,x,M,g,21,o[51]);M=h(M,I,R,x,w,6,o[52]);x=h(x,M,I,R,v,10,o[53]);R=h(R,x,M,I,E,15,o[54]);I=h(I,R,x,M,u,21,o[55]);M=h(M,I,R,x,_,6,o[56]);x=h(x,M,I,R,A,10,o[57]);R=h(R,x,M,I,y,15,o[58]);I=h(I,R,x,M,D,21,o[59]);M=h(M,I,R,x,p,6,o[60]);x=h(x,M,I,R,b,10,o[61]);R=h(R,x,M,I,d,15,o[62]);I=h(I,R,x,M,S,21,o[63]);s[0]=s[0]+M|0;s[1]=s[1]+I|0;s[2]=s[2]+R|0;s[3]=s[3]+x|0;},_doFinalize:function(){var t=this._data;var r=t.words;var i=8*this._nDataBytes;var n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var s=e.floor(i/4294967296);var a=i;r[(n+64>>>9<<4)+15]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);r[(n+64>>>9<<4)+14]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);t.sigBytes=4*(r.length+1);this._process();var o=this._hash;var u=o.words;for(var c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8);}return o},clone:function(){var t=s.clone.call(this);t._hash=this._hash.clone();return t}});function c(t,e,r,i,n,s,a){var o=t+(e&r|~e&i)+n+a;return (o<>>32-s)+e}function l(t,e,r,i,n,s,a){var o=t+(e&i|r&~i)+n+a;return (o<>>32-s)+e}function f(t,e,r,i,n,s,a){var o=t+(e^r^i)+n+a;return (o<>>32-s)+e}function h(t,e,r,i,n,s,a){var o=t+(r^(e|~i))+n+a;return (o<>>32-s)+e}r.MD5=s._createHelper(u);r.HmacMD5=s._createHmacHelper(u);})(Math);return t.MD5}));},8568:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(5109));})(this,(function(t){t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher;var n=i.blockSize;r.call(this,t,e,n,i);this._prevBlock=t.slice(e,e+n);}});e.Decryptor=e.extend({processBlock:function(t,e){var i=this._cipher;var n=i.blockSize;var s=t.slice(e,e+n);r.call(this,t,e,n,i);this._prevBlock=s;}});function r(t,e,r,i){var n;var s=this._iv;if(s){n=s.slice(0);this._iv=void 0;}else n=this._prevBlock;i.encryptBlock(n,0);for(var a=0;a>24&255)){var e=t>>16&255;var r=t>>8&255;var i=255&t;if(255===e){e=0;if(255===r){r=0;if(255===i)i=0;else ++i;}else ++r;}else ++e;t=0;t+=e<<16;t+=r<<8;t+=i;}else t+=1<<24;return t}function i(t){if(0===(t[0]=r(t[0])))t[1]=r(t[1]);return t}var n=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher;var n=r.blockSize;var s=this._iv;var a=this._counter;if(s){a=this._counter=s.slice(0);this._iv=void 0;}i(a);var o=a.slice(0);r.encryptBlock(o,0);for(var u=0;u>>2]|=n<<24-s%4*8;t.sigBytes+=n;},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e;}};return t.pad.Ansix923}));},2807:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(5109));})(this,(function(t){t.pad.Iso10126={pad:function(e,r){var i=4*r;var n=i-e.sigBytes%i;e.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1));},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e;}};return t.pad.Iso10126}));},1077:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(5109));})(this,(function(t){t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1));t.pad.ZeroPadding.pad(e,r);},unpad:function(e){t.pad.ZeroPadding.unpad(e);e.sigBytes--;}};return t.pad.Iso97971}));},6991:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(5109));})(this,(function(t){t.pad.NoPadding={pad:function(){},unpad:function(){}};return t.pad.NoPadding}));},6475:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(5109));})(this,(function(t){t.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp();t.sigBytes+=r-(t.sigBytes%r||r);},unpad:function(t){var e=t.words;var r=t.sigBytes-1;for(var r=t.sigBytes-1;r>=0;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}};return t.pad.ZeroPadding}));},2112:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(2783),r(9824));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.Base;var n=r.WordArray;var s=e.algo;var a=s.SHA1;var o=s.HMAC;var u=s.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t);},compute:function(t,e){var r=this.cfg;var i=o.create(r.hasher,t);var s=n.create();var a=n.create([1]);var u=s.words;var c=a.words;var l=r.keySize;var f=r.iterations;while(u.length>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16];var i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var n=0;n<4;n++)c.call(this);for(var n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var s=e.words;var a=s[0];var o=s[1];var u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var f=u>>>16|4294901760&l;var h=l<<16|65535&u;i[0]^=u;i[1]^=f;i[2]^=l;i[3]^=h;i[4]^=u;i[5]^=f;i[6]^=l;i[7]^=h;for(var n=0;n<4;n++)c.call(this);}},_doProcessBlock:function(t,e){var r=this._X;c.call(this);s[0]=r[0]^r[5]>>>16^r[3]<<16;s[1]=r[2]^r[7]>>>16^r[5]<<16;s[2]=r[4]^r[1]>>>16^r[7]<<16;s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++){s[i]=16711935&(s[i]<<8|s[i]>>>24)|4278255360&(s[i]<<24|s[i]>>>8);t[e+i]^=s[i];}},blockSize:128/32,ivSize:64/32});function c(){var t=this._X;var e=this._C;for(var r=0;r<8;r++)a[r]=e[r];e[0]=e[0]+1295307597+this._b|0;e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0;e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0;e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0;e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0;e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0;e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0;e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0;this._b=e[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+e[r];var n=65535&i;var s=i>>>16;var u=((n*n>>>17)+n*s>>>15)+s*s;var c=((4294901760&i)*i|0)+((65535&i)*i|0);o[r]=u^c;}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0;t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0;t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0;t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0;t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0;t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0;t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0;t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0;}e.RabbitLegacy=i._createHelper(u);})();return t.RabbitLegacy}));},4454:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(8269),r(8214),r(888),r(5109));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.StreamCipher;var n=e.algo;var s=[];var a=[];var o=[];var u=n.Rabbit=i.extend({_doReset:function(){var t=this._key.words;var e=this.cfg.iv;for(var r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16];var n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)c.call(this);for(var r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var s=e.words;var a=s[0];var o=s[1];var u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var l=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);var f=u>>>16|4294901760&l;var h=l<<16|65535&u;n[0]^=u;n[1]^=f;n[2]^=l;n[3]^=h;n[4]^=u;n[5]^=f;n[6]^=l;n[7]^=h;for(var r=0;r<4;r++)c.call(this);}},_doProcessBlock:function(t,e){var r=this._X;c.call(this);s[0]=r[0]^r[5]>>>16^r[3]<<16;s[1]=r[2]^r[7]>>>16^r[5]<<16;s[2]=r[4]^r[1]>>>16^r[7]<<16;s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++){s[i]=16711935&(s[i]<<8|s[i]>>>24)|4278255360&(s[i]<<24|s[i]>>>8);t[e+i]^=s[i];}},blockSize:128/32,ivSize:64/32});function c(){var t=this._X;var e=this._C;for(var r=0;r<8;r++)a[r]=e[r];e[0]=e[0]+1295307597+this._b|0;e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0;e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0;e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0;e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0;e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0;e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0;e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0;this._b=e[7]>>>0>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+e[r];var n=65535&i;var s=i>>>16;var u=((n*n>>>17)+n*s>>>15)+s*s;var c=((4294901760&i)*i|0)+((65535&i)*i|0);o[r]=u^c;}t[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0;t[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0;t[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0;t[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0;t[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0;t[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0;t[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0;t[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0;}e.Rabbit=i._createHelper(u);})();return t.Rabbit}));},1857:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(8269),r(8214),r(888),r(5109));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.StreamCipher;var n=e.algo;var s=n.RC4=i.extend({_doReset:function(){var t=this._key;var e=t.words;var r=t.sigBytes;var i=this._S=[];for(var n=0;n<256;n++)i[n]=n;for(var n=0,s=0;n<256;n++){var a=n%r;var o=e[a>>>2]>>>24-a%4*8&255;s=(s+i[n]+o)%256;var u=i[n];i[n]=i[s];i[s]=u;}this._i=this._j=0;},_doProcessBlock:function(t,e){t[e]^=a.call(this);},keySize:256/32,ivSize:0});function a(){var t=this._S;var e=this._i;var r=this._j;var i=0;for(var n=0;n<4;n++){e=(e+1)%256;r=(r+t[e])%256;var s=t[e];t[e]=t[r];t[r]=s;i|=t[(t[e]+t[r])%256]<<24-8*n;}this._i=e;this._j=r;return i}e.RC4=i._createHelper(s);var o=n.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)a.call(this);}});e.RC4Drop=i._createHelper(o);})();return t.RC4}));},706:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(e){var r=t;var i=r.lib;var n=i.WordArray;var s=i.Hasher;var a=r.algo;var o=n.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]);var u=n.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]);var c=n.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]);var l=n.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]);var f=n.create([0,1518500249,1859775393,2400959708,2840853838]);var h=n.create([1352829926,1548603684,1836072691,2053994217,0]);var d=a.RIPEMD160=s.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r;var n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);}var s=this._hash.words;var a=f.words;var d=h.words;var S=o.words;var E=u.words;var b=c.words;var w=l.words;var D,T,A,M,I;var R,x,B,C,O;R=D=s[0];x=T=s[1];B=A=s[2];C=M=s[3];O=I=s[4];var k;for(var r=0;r<80;r+=1){k=D+t[e+S[r]]|0;if(r<16)k+=v(T,A,M)+a[0];else if(r<32)k+=p(T,A,M)+a[1];else if(r<48)k+=g(T,A,M)+a[2];else if(r<64)k+=y(T,A,M)+a[3];else k+=m(T,A,M)+a[4];k|=0;k=_(k,b[r]);k=k+I|0;D=I;I=M;M=_(A,10);A=T;T=k;k=R+t[e+E[r]]|0;if(r<16)k+=m(x,B,C)+d[0];else if(r<32)k+=y(x,B,C)+d[1];else if(r<48)k+=g(x,B,C)+d[2];else if(r<64)k+=p(x,B,C)+d[3];else k+=v(x,B,C)+d[4];k|=0;k=_(k,w[r]);k=k+O|0;R=O;O=C;C=_(B,10);B=x;x=k;}k=s[1]+A+C|0;s[1]=s[2]+M+O|0;s[2]=s[3]+I+R|0;s[3]=s[4]+D+x|0;s[4]=s[0]+T+B|0;s[0]=k;},_doFinalize:function(){var t=this._data;var e=t.words;var r=8*this._nDataBytes;var i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;e[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);t.sigBytes=4*(e.length+1);this._process();var n=this._hash;var s=n.words;for(var a=0;a<5;a++){var o=s[a];s[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);}return n},clone:function(){var t=s.clone.call(this);t._hash=this._hash.clone();return t}});function v(t,e,r){return t^e^r}function p(t,e,r){return t&e|~t&r}function g(t,e,r){return (t|~e)^r}function y(t,e,r){return t&r|e&~r}function m(t,e,r){return t^(e|~r)}function _(t,e){return t<>>32-e}r.RIPEMD160=s._createHelper(d);r.HmacRIPEMD160=s._createHmacHelper(d);})();return t.RIPEMD160}));},2783:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.WordArray;var n=r.Hasher;var s=e.algo;var a=[];var o=s.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(t,e){var r=this._hash.words;var i=r[0];var n=r[1];var s=r[2];var o=r[3];var u=r[4];for(var c=0;c<80;c++){if(c<16)a[c]=0|t[e+c];else {var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31;}var f=(i<<5|i>>>27)+u+a[c];if(c<20)f+=(n&s|~n&o)+1518500249;else if(c<40)f+=(n^s^o)+1859775393;else if(c<60)f+=(n&s|n&o|s&o)-1894007588;else f+=(n^s^o)-899497514;u=o;o=s;s=n<<30|n>>>2;n=i;i=f;}r[0]=r[0]+i|0;r[1]=r[1]+n|0;r[2]=r[2]+s|0;r[3]=r[3]+o|0;r[4]=r[4]+u|0;},_doFinalize:function(){var t=this._data;var e=t.words;var r=8*this._nDataBytes;var i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;e[(i+64>>>9<<4)+14]=Math.floor(r/4294967296);e[(i+64>>>9<<4)+15]=r;t.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var t=n.clone.call(this);t._hash=this._hash.clone();return t}});e.SHA1=n._createHelper(o);e.HmacSHA1=n._createHmacHelper(o);})();return t.SHA1}));},7792:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(2153));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.WordArray;var n=e.algo;var s=n.SHA256;var a=n.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]);},_doFinalize:function(){var t=s._doFinalize.call(this);t.sigBytes-=4;return t}});e.SHA224=s._createHelper(a);e.HmacSHA224=s._createHmacHelper(a);})();return t.SHA224}));},2153:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(e){var r=t;var i=r.lib;var n=i.WordArray;var s=i.Hasher;var a=r.algo;var o=[];var u=[];(function(){function t(t){var r=e.sqrt(t);for(var i=2;i<=r;i++)if(!(t%i))return false;return true}function r(t){return 4294967296*(t-(0|t))|0}var i=2;var n=0;while(n<64){if(t(i)){if(n<8)o[n]=r(e.pow(i,1/2));u[n]=r(e.pow(i,1/3));n++;}i++;}})();var c=[];var l=a.SHA256=s.extend({_doReset:function(){this._hash=new n.init(o.slice(0));},_doProcessBlock:function(t,e){var r=this._hash.words;var i=r[0];var n=r[1];var s=r[2];var a=r[3];var o=r[4];var l=r[5];var f=r[6];var h=r[7];for(var d=0;d<64;d++){if(d<16)c[d]=0|t[e+d];else {var v=c[d-15];var p=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3;var g=c[d-2];var y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=p+c[d-7]+y+c[d-16];}var m=o&l^~o&f;var _=i&n^i&s^n&s;var S=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22);var E=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25);var b=h+E+m+u[d]+c[d];var w=S+_;h=f;f=l;l=o;o=a+b|0;a=s;s=n;n=i;i=b+w|0;}r[0]=r[0]+i|0;r[1]=r[1]+n|0;r[2]=r[2]+s|0;r[3]=r[3]+a|0;r[4]=r[4]+o|0;r[5]=r[5]+l|0;r[6]=r[6]+f|0;r[7]=r[7]+h|0;},_doFinalize:function(){var t=this._data;var r=t.words;var i=8*this._nDataBytes;var n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;r[(n+64>>>9<<4)+14]=e.floor(i/4294967296);r[(n+64>>>9<<4)+15]=i;t.sigBytes=4*r.length;this._process();return this._hash},clone:function(){var t=s.clone.call(this);t._hash=this._hash.clone();return t}});r.SHA256=s._createHelper(l);r.HmacSHA256=s._createHmacHelper(l);})(Math);return t.SHA256}));},3327:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(4938));})(this,(function(t){(function(e){var r=t;var i=r.lib;var n=i.WordArray;var s=i.Hasher;var a=r.x64;var o=a.Word;var u=r.algo;var c=[];var l=[];var f=[];(function(){var t=1,e=0;for(var r=0;r<24;r++){c[t+5*e]=(r+1)*(r+2)/2%64;var i=e%5;var n=(2*t+3*e)%5;t=i;e=n;}for(var t=0;t<5;t++)for(var e=0;e<5;e++)l[t+5*e]=e+(2*t+3*e)%5*5;var s=1;for(var a=0;a<24;a++){var u=0;var h=0;for(var d=0;d<7;d++){if(1&s){var v=(1<>>24)|4278255360&(s<<24|s>>>8);a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var o=r[n];o.high^=a;o.low^=s;}for(var u=0;u<24;u++){for(var d=0;d<5;d++){var v=0,p=0;for(var g=0;g<5;g++){var o=r[d+5*g];v^=o.high;p^=o.low;}var y=h[d];y.high=v;y.low=p;}for(var d=0;d<5;d++){var m=h[(d+4)%5];var _=h[(d+1)%5];var S=_.high;var E=_.low;var v=m.high^(S<<1|E>>>31);var p=m.low^(E<<1|S>>>31);for(var g=0;g<5;g++){var o=r[d+5*g];o.high^=v;o.low^=p;}}for(var b=1;b<25;b++){var v;var p;var o=r[b];var w=o.high;var D=o.low;var T=c[b];if(T<32){v=w<>>32-T;p=D<>>32-T;}else {v=D<>>64-T;p=w<>>64-T;}var A=h[l[b]];A.high=v;A.low=p;}var M=h[0];var I=r[0];M.high=I.high;M.low=I.low;for(var d=0;d<5;d++)for(var g=0;g<5;g++){var b=d+5*g;var o=r[b];var R=h[b];var x=h[(d+1)%5+5*g];var B=h[(d+2)%5+5*g];o.high=R.high^~x.high&B.high;o.low=R.low^~x.low&B.low;}var o=r[0];var C=f[u];o.high^=C.high;o.low^=C.low;}},_doFinalize:function(){var t=this._data;var r=t.words;8*this._nDataBytes;var s=8*t.sigBytes;var a=32*this.blockSize;r[s>>>5]|=1<<24-s%32;r[(e.ceil((s+1)/a)*a>>>5)-1]|=128;t.sigBytes=4*r.length;this._process();var o=this._state;var u=this.cfg.outputLength/8;var c=u/8;var l=[];for(var f=0;f>>24)|4278255360&(d<<24|d>>>8);v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8);l.push(v);l.push(d);}return new n.init(l,u)},clone:function(){var t=s.clone.call(this);var e=t._state=this._state.slice(0);for(var r=0;r<25;r++)e[r]=e[r].clone();return t}});r.SHA3=s._createHelper(d);r.HmacSHA3=s._createHmacHelper(d);})(Math);return t.SHA3}));},7460:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(4938),r(34));})(this,(function(t){(function(){var e=t;var r=e.x64;var i=r.Word;var n=r.WordArray;var s=e.algo;var a=s.SHA512;var o=s.SHA384=a.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)]);},_doFinalize:function(){var t=a._doFinalize.call(this);t.sigBytes-=16;return t}});e.SHA384=a._createHelper(o);e.HmacSHA384=a._createHmacHelper(o);})();return t.SHA384}));},34:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(4938));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.Hasher;var n=e.x64;var s=n.Word;var a=n.WordArray;var o=e.algo;function u(){return s.create.apply(s,arguments)}var c=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)];var l=[];(function(){for(var t=0;t<80;t++)l[t]=u();})();var f=o.SHA512=i.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)]);},_doProcessBlock:function(t,e){var r=this._hash.words;var i=r[0];var n=r[1];var s=r[2];var a=r[3];var o=r[4];var u=r[5];var f=r[6];var h=r[7];var d=i.high;var v=i.low;var p=n.high;var g=n.low;var y=s.high;var m=s.low;var _=a.high;var S=a.low;var E=o.high;var b=o.low;var w=u.high;var D=u.low;var T=f.high;var A=f.low;var M=h.high;var I=h.low;var R=d;var x=v;var B=p;var C=g;var O=y;var k=m;var P=_;var N=S;var V=E;var H=b;var L=w;var K=D;var U=T;var j=A;var F=M;var z=I;for(var q=0;q<80;q++){var G;var Y;var W=l[q];if(q<16){Y=W.high=0|t[e+2*q];G=W.low=0|t[e+2*q+1];}else {var J=l[q-15];var $=J.high;var Z=J.low;var X=($>>>1|Z<<31)^($>>>8|Z<<24)^$>>>7;var Q=(Z>>>1|$<<31)^(Z>>>8|$<<24)^(Z>>>7|$<<25);var tt=l[q-2];var et=tt.high;var rt=tt.low;var it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6;var nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26);var st=l[q-7];var at=st.high;var ot=st.low;var ut=l[q-16];var ct=ut.high;var lt=ut.low;G=Q+ot;Y=X+at+(G>>>0>>0?1:0);G+=nt;Y=Y+it+(G>>>0>>0?1:0);G+=lt;Y=Y+ct+(G>>>0>>0?1:0);W.high=Y;W.low=G;}var ft=V&L^~V&U;var ht=H&K^~H&j;var dt=R&B^R&O^B&O;var vt=x&C^x&k^C&k;var pt=(R>>>28|x<<4)^(R<<30|x>>>2)^(R<<25|x>>>7);var gt=(x>>>28|R<<4)^(x<<30|R>>>2)^(x<<25|R>>>7);var yt=(V>>>14|H<<18)^(V>>>18|H<<14)^(V<<23|H>>>9);var mt=(H>>>14|V<<18)^(H>>>18|V<<14)^(H<<23|V>>>9);var _t=c[q];var St=_t.high;var Et=_t.low;var bt=z+mt;var wt=F+yt+(bt>>>0>>0?1:0);var bt=bt+ht;var wt=wt+ft+(bt>>>0>>0?1:0);var bt=bt+Et;var wt=wt+St+(bt>>>0>>0?1:0);var bt=bt+G;var wt=wt+Y+(bt>>>0>>0?1:0);var Dt=gt+vt;var Tt=pt+dt+(Dt>>>0>>0?1:0);F=U;z=j;U=L;j=K;L=V;K=H;H=N+bt|0;V=P+wt+(H>>>0>>0?1:0)|0;P=O;N=k;O=B;k=C;B=R;C=x;x=bt+Dt|0;R=wt+Tt+(x>>>0>>0?1:0)|0;}v=i.low=v+x;i.high=d+R+(v>>>0>>0?1:0);g=n.low=g+C;n.high=p+B+(g>>>0>>0?1:0);m=s.low=m+k;s.high=y+O+(m>>>0>>0?1:0);S=a.low=S+N;a.high=_+P+(S>>>0>>0?1:0);b=o.low=b+H;o.high=E+V+(b>>>0>>0?1:0);D=u.low=D+K;u.high=w+L+(D>>>0>>0?1:0);A=f.low=A+j;f.high=T+U+(A>>>0>>0?1:0);I=h.low=I+z;h.high=M+F+(I>>>0>>0?1:0);},_doFinalize:function(){var t=this._data;var e=t.words;var r=8*this._nDataBytes;var i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;e[(i+128>>>10<<5)+30]=Math.floor(r/4294967296);e[(i+128>>>10<<5)+31]=r;t.sigBytes=4*e.length;this._process();var n=this._hash.toX32();return n},clone:function(){var t=i.clone.call(this);t._hash=this._hash.clone();return t},blockSize:1024/32});e.SHA512=i._createHelper(f);e.HmacSHA512=i._createHmacHelper(f);})();return t.SHA512}));},4253:function(t,e,r){(function(i,n,s){t.exports=n(r(8249),r(8269),r(8214),r(888),r(5109));})(this,(function(t){(function(){var e=t;var r=e.lib;var i=r.WordArray;var n=r.BlockCipher;var s=e.algo;var a=[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];var o=[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];var u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];var c=[{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}];var l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679];var f=s.DES=n.extend({_doReset:function(){var t=this._key;var e=t.words;var r=[];for(var i=0;i<56;i++){var n=a[i]-1;r[i]=e[n>>>5]>>>31-n%32&1;}var s=this._subKeys=[];for(var c=0;c<16;c++){var l=s[c]=[];var f=u[c];for(var i=0;i<24;i++){l[i/6|0]|=r[(o[i]-1+f)%28]<<31-i%6;l[4+(i/6|0)]|=r[28+(o[i+24]-1+f)%28]<<31-i%6;}l[0]=l[0]<<1|l[0]>>>31;for(var i=1;i<7;i++)l[i]=l[i]>>>4*(i-1)+3;l[7]=l[7]<<5|l[7]>>>27;}var h=this._invSubKeys=[];for(var i=0;i<16;i++)h[i]=s[15-i];},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys);},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys);},_doCryptBlock:function(t,e,r){this._lBlock=t[e];this._rBlock=t[e+1];h.call(this,4,252645135);h.call(this,16,65535);d.call(this,2,858993459);d.call(this,8,16711935);h.call(this,1,1431655765);for(var i=0;i<16;i++){var n=r[i];var s=this._lBlock;var a=this._rBlock;var o=0;for(var u=0;u<8;u++)o|=c[u][((a^n[u])&l[u])>>>0];this._lBlock=a;this._rBlock=s^o;}var f=this._lBlock;this._lBlock=this._rBlock;this._rBlock=f;h.call(this,1,1431655765);d.call(this,8,16711935);d.call(this,2,858993459);h.call(this,16,65535);h.call(this,4,252645135);t[e]=this._lBlock;t[e+1]=this._rBlock;},keySize:64/32,ivSize:64/32,blockSize:64/32});function h(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r;this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r;this._rBlock^=r<192.");var r=e.slice(0,2);var n=e.length<4?e.slice(0,2):e.slice(2,4);var s=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(i.create(r));this._des2=f.createEncryptor(i.create(n));this._des3=f.createEncryptor(i.create(s));},encryptBlock:function(t,e){this._des1.encryptBlock(t,e);this._des2.decryptBlock(t,e);this._des3.encryptBlock(t,e);},decryptBlock:function(t,e){this._des3.decryptBlock(t,e);this._des2.encryptBlock(t,e);this._des1.decryptBlock(t,e);},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=n._createHelper(v);})();return t.TripleDES}));},4938:function(t,e,r){(function(i,n){t.exports=n(r(8249));})(this,(function(t){(function(e){var r=t;var i=r.lib;var n=i.Base;var s=i.WordArray;var a=r.x64={};a.Word=n.extend({init:function(t,e){this.high=t;this.low=e;}});a.WordArray=n.extend({init:function(t,r){t=this.words=t||[];if(r!=e)this.sigBytes=r;else this.sigBytes=8*t.length;},toX32:function(){var t=this.words;var e=t.length;var r=[];for(var i=0;i{Object.defineProperty(e,"__esModule",{value:true});e.ErrorCode=void 0;(function(t){t[t["SUCCESS"]=0]="SUCCESS";t[t["CLIENT_ID_NOT_FOUND"]=1]="CLIENT_ID_NOT_FOUND";t[t["OPERATION_TOO_OFTEN"]=2]="OPERATION_TOO_OFTEN";t[t["REPEAT_MESSAGE"]=3]="REPEAT_MESSAGE";t[t["TIME_OUT"]=4]="TIME_OUT";})(e.ErrorCode||(e.ErrorCode={}));},5987:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1901));const s=i(r(1754));const a=i(r(1237));var o;(function(t){function e(t){a.default.debugMode=t;a.default.info(`setDebugMode: ${t}`);}t.setDebugMode=e;function r(t){try{f(t.appid);n.default.init(t);}catch(t){a.default.error(`init error`,t);}}t.init=r;function i(t){try{n.default.setTag(t);}catch(t){a.default.error(`setTag error`,t);}}t.setTag=i;function o(t){try{n.default.bindAlias(t);}catch(t){a.default.error(`bindAlias error`,t);}}t.bindAlias=o;function u(t){try{n.default.unbindAlias(t);}catch(t){a.default.error(`unbindAlias error`,t);}}t.unbindAlias=u;function c(t){try{if(!t.url)throw new Error("invalid url");if(!t.key||!t.keyId)throw new Error("invalid key or keyId");s.default.socketUrl=t.url;s.default.publicKeyId=t.keyId;s.default.publicKey=t.key;}catch(t){a.default.error(`setSocketServer error`,t);}}t.setSocketServer=c;function l(t){try{n.default.enableSocket(t);}catch(t){a.default.error(`enableSocket error`,t);}}t.enableSocket=l;function f(t){if(null==t||void 0==t||""==t.trim())throw new Error(`invalid appid ${t}`)}})(o||(o={}));e["default"]=o;},127:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});var r;(function(t){t.SDK_VERSION="GTMP-1.0.0.0";t.DEFAULT_SOCKET_URL="wss://wshz.getui.net:5223/nws";t.SOCKET_PROTOCOL_VERSION="1.0";t.SERVER_PUBLIC_KEY="MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB";t.SERVER_PUBLIC_KEY_ID="69d747c4b9f641baf4004be4297e9f3b";})(r||(r={}));e["default"]=r;},1901:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3593));const s=i(r(1237));const a=r(3118);const o=i(r(1754));const u=i(r(3854));const c=i(r(9018));const l=i(r(5084));class f{static init(t){if(this.inited)return;try{this.inited=true;s.default.info(`init: appid=${t.appid}`);o.default.init(t);n.default.connect();}catch(t){this.inited=false;}}static enableSocket(t){this.checkInit();n.default.allowReconnect=t;if(t)n.default.reconnect(0);else n.default.close(`enableSocket ${t}`);}static setTag(t){var e;this.checkInit();if(!o.default.cid){null===(e=t.setTagResult)||void 0===e||e.call(t.setTagResult,{resultCode:a.ErrorCode.CLIENT_ID_NOT_FOUND,message:"client id not found"});return}c.default.create(t.tags,t.setTagResult).send();}static bindAlias(t){var e,r;this.checkInit();if(!o.default.cid){null===(e=t.bindAliasResult)||void 0===e||e.call(t.bindAliasResult,{resultCode:a.ErrorCode.CLIENT_ID_NOT_FOUND,message:"client id not found"});return}let i=(new Date).getTime();if(i-o.default.lastAliasTime<1*1e3){s.default.error(`bind alias fail: alias option can only be called once a second`);null===(r=t.bindAliasResult)||void 0===r||r.call(t.bindAliasResult,{resultCode:a.ErrorCode.OPERATION_TOO_OFTEN,message:"alias option can only be called once a second"});return}u.default.create(t.alias,true,t.bindAliasResult).send();o.default.lastAliasTime=i;}static unbindAlias(t){var e,r;this.checkInit();if(!o.default.cid){null===(e=t.unbindAliasResult)||void 0===e||e.call(t.unbindAliasResult,{resultCode:a.ErrorCode.CLIENT_ID_NOT_FOUND,message:"client id not found"});return}let i=(new Date).getTime();if(i-o.default.lastAliasTime<1*1e3){s.default.error(`unbindAlias alias fail: alias option can only be called once a second`);null===(r=t.unbindAliasResult)||void 0===r||r.call(t.unbindAliasResult,{resultCode:a.ErrorCode.OPERATION_TOO_OFTEN,message:"alias option can only be called once a second"});return}l.default.create(t.alias,t.onlySelf,t.unbindAliasResult).send();o.default.lastAliasTime=i;}static turnOff(){}static turnOn(){}static checkInit(){if(!this.inited)throw new Error(`not init, please invoke init method firstly`)}}f.inited=false;e["default"]=f;},1754:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(323));const s=i(r(207));const a=i(r(127));const o=i(r(3593));const u=i(r(1237));const c=i(r(3270));class l{static init(t){var e;this.appid=t.appid;this.onClientId=t.onClientId;this.onlineState=t.onlineState;this.onPushMsg=t.onPushMsg;if(this.appid!=s.default.getSync(s.default.KEY_APPID,this.appid)){u.default.info("appid changed, clear session and cid");s.default.setSync(s.default.KEY_CID,"");s.default.setSync(s.default.KEY_SESSION,"");}s.default.setSync(s.default.KEY_APPID,this.appid);this.cid=s.default.getSync(s.default.KEY_CID,this.cid);if(this.cid)null===(e=this.onClientId)||void 0===e||e.call(this,{cid:l.cid});this.session=s.default.getSync(s.default.KEY_SESSION,this.session);this.deviceId=s.default.getSync(s.default.KEY_DEVICE_ID,this.deviceId);this.regId=s.default.getSync(s.default.KEY_REGID,this.regId);if(!this.regId){this.regId=this.createRegId();s.default.set({key:s.default.KEY_REGID,data:this.regId});}this.socketUrl=s.default.getSync(s.default.KEY_SOCKET_URL,this.socketUrl);let r=this;c.default.getNetworkType({success:t=>{r.networkType=t;r.networkConnected="none"!=r.networkType&&""!=r.networkType;}});c.default.onNetworkStatusChange((t=>{r.networkConnected=t.isConnected;r.networkType=t.networkType;if(r.networkConnected)o.default.reconnect(0);}));}static createRegId(){return `M-V${n.default.md5Hex(this.getUuid())}-${(new Date).getTime()}`}static getUuid(){return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){let e=16*Math.random()|0,r="x"===t?e:3&e|8;return r.toString(16)}))}}l.appid="";l.cid="";l.regId="";l.session="";l.deviceId="";l.packetId=1;l.online=false;l.socketUrl=a.default.DEFAULT_SOCKET_URL;l.publicKeyId=a.default.SERVER_PUBLIC_KEY_ID;l.publicKey=a.default.SERVER_PUBLIC_KEY;l.lastAliasTime=0;l.networkConnected=true;l.networkType="none";e["default"]=l;},9214:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(9800));const o=r(3118);const u=i(r(1754));class c extends a.default{constructor(){super(...arguments);this.actionMsgData=new l;}static initActionMsg(t,...e){super.initMsg(t);t.command=a.default.Command.CLIENT_MSG;t.data=t.actionMsgData=l.create();return t}static parseActionMsg(t,e){super.parseMsg(t,e);t.actionMsgData=l.parse(t.data);return t}send(){setTimeout((()=>{var t;if(c.waitingLoginMsgMap.has(this.actionMsgData.msgId)||c.waitingResponseMsgMap.has(this.actionMsgData.msgId)){c.waitingLoginMsgMap.delete(this.actionMsgData.msgId);c.waitingResponseMsgMap.delete(this.actionMsgData.msgId);null===(t=this.callback)||void 0===t||t.call(this.callback,{resultCode:o.ErrorCode.TIME_OUT,message:"waiting time out"});}}),1e4);if(!u.default.online){c.waitingLoginMsgMap.set(this.actionMsgData.msgId,this);return}if(this.actionMsgData.msgAction!=c.ClientAction.RECEIVED)c.waitingResponseMsgMap.set(this.actionMsgData.msgId,this);super.send();}receive(){}static sendWaitingMessages(){let t=this.waitingLoginMsgMap.keys();let e;while(e=t.next(),!e.done){let t=this.waitingLoginMsgMap.get(e.value);this.waitingLoginMsgMap.delete(e.value);null===t||void 0===t||t.send();}}static getWaitingResponseMessage(t){return c.waitingResponseMsgMap.get(t)}static removeWaitingResponseMessage(t){let e=c.waitingResponseMsgMap.get(t);if(e)c.waitingResponseMsgMap.delete(t);return e}}c.ServerAction=(n=class{},n.PUSH_MESSAGE="pushmessage",n.REDIRECT_SERVER="redirect_server",n.ADD_PHONE_INFO_RESULT="addphoneinfo",n.SET_MODE_RESULT="set_mode_result",n.SET_TAG_RESULT="settag_result",n.BIND_ALIAS_RESULT="response_bind",n.UNBIND_ALIAS_RESULT="response_unbind",n.FEED_BACK_RESULT="pushmessage_feedback",n.RECEIVED="received",n);c.ClientAction=(s=class{},s.ADD_PHONE_INFO="addphoneinfo",s.SET_MODE="set_mode",s.FEED_BACK="pushmessage_feedback",s.SET_TAGS="set_tag",s.BIND_ALIAS="bind_alias",s.UNBIND_ALIAS="unbind_alias",s.RECEIVED="received",s);c.waitingLoginMsgMap=new Map;c.waitingResponseMsgMap=new Map;class l{constructor(){this.appId="";this.cid="";this.msgId="";this.msgAction="";this.msgData="";this.msgExtraData="";}static create(){let t=new l;t.appId=u.default.appid;t.cid=u.default.cid;t.msgId=(new Date).getTime().toString().substr(4);return t}static parse(t){let e=new l;let r=JSON.parse(t);e.appId=r.appId;e.cid=r.cid;e.msgId=r.msgId;e.msgAction=r.msgAction;e.msgData=r.msgData;e.msgExtraData=r.msgExtraData;return e}}e["default"]=c;},708:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3270));const s=i(r(207));const a=i(r(127));const o=r(3118);const u=i(r(9214));const c=i(r(1754));class l extends u.default{constructor(){super(...arguments);this.addPhoneInfoData=new f;}static create(){let t=new l;super.initActionMsg(t);t.callback=e=>{if(e.resultCode!=o.ErrorCode.SUCCESS&&e.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){t.send();}),30*1e3);else s.default.set({key:s.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});};t.actionMsgData.msgAction=u.default.ClientAction.ADD_PHONE_INFO;t.addPhoneInfoData=f.create();t.actionMsgData.msgData=JSON.stringify(t.addPhoneInfoData);return t}send(){let t=(new Date).getTime();let e=s.default.getSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);if(t-e<24*60*60*1e3)return;super.send();}}class f{constructor(){this.model="";this.brand="";this.system_version="";this.version="";this.device_token="";this.imei="";this.oaid="";this.mac="";this.idfa="";this.deviceid="";this.type="";this.extra={os:"",platform:"",platformVersion:"",platformId:"",appVersion:"",language:""};}static create(){let t=new f;t.model=n.default.model();t.brand=n.default.brand();t.system_version=n.default.osVersion();t.version=a.default.SDK_VERSION;t.device_token="";t.imei="";t.oaid="";t.mac="";t.idfa="";t.type="MINI";t.deviceid=`${t.type}-${c.default.deviceId}`;t.extra={os:n.default.os(),platform:n.default.platform(),platformVersion:n.default.platformVersion(),platformId:n.default.platformId(),appVersion:"",language:n.default.language()};return t}}e["default"]=l;},3854:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1754));const s=i(r(9214));class a extends s.default{constructor(){super(...arguments);this.bindAliasTagData=new o;}static create(t,e,r){let i=new a;super.initActionMsg(i);i.bindAliasTagData=o.create(t,e);i.callback=r;i.actionMsgData.msgAction=s.default.ClientAction.BIND_ALIAS;i.actionMsgData.msgData=JSON.stringify(i.bindAliasTagData);return i}}class o{constructor(){this.alias="";this.cid="";this.appid="";this.sn="";this.is_self="";}static create(t,e){let r=new o;r.alias=t;r.cid=n.default.cid;r.appid=n.default.appid;r.sn=(new Date).getTime().toString();r.is_self=e?"1":"0";return r}}e["default"]=a;},652:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n,s;Object.defineProperty(e,"__esModule",{value:true});const a=i(r(1754));const o=r(3118);const u=i(r(9214));class c extends u.default{constructor(){super(...arguments);this.feedbackData=new l;}static create(t,e){let r=new c;super.initActionMsg(r);r.callback=t=>{if(t.resultCode!=o.ErrorCode.SUCCESS&&t.resultCode!=o.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){r.send();}),30*1e3);};r.feedbackData=l.create(t,e);r.actionMsgData.msgAction=u.default.ClientAction.FEED_BACK;r.actionMsgData.msgData=JSON.stringify(r.feedbackData);return r}send(){super.send();}}c.ActionId=(n=class{},n.RECEIVE="0",n.MP_RECEIVE="210000",n.WEB_RECEIVE="220000",n.BEGIN="1",n);c.RESULT=(s=class{},s.OK="ok",s);class l{constructor(){this.messageid="";this.appkey="";this.appid="";this.taskid="";this.actionid="";this.result="";this.timestamp="";}static create(t,e){let r=new l;r.messageid=t.pushMessageData.messageid;r.appkey=t.pushMessageData.appKey;r.appid=a.default.appid;r.taskid=t.pushMessageData.taskId;r.actionid=e;r.result=c.RESULT.OK;r.timestamp=(new Date).getTime().toString();return r}}e["default"]=c;},9018:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1754));const s=i(r(9214));class a extends s.default{constructor(){super(...arguments);this.setTagData=new o;}static create(t,e){let r=new a;super.initActionMsg(r);r.setTagData=o.create(t);r.callback=e;r.actionMsgData.msgAction=s.default.ClientAction.SET_TAGS;r.actionMsgData.msgData=JSON.stringify(r.setTagData);return r}}class o{constructor(){this.appid="";this.tags="";this.sn="";}static create(t){let e=new o;e.appid=n.default.appid;e.tags=u(t);e.sn=(new Date).getTime().toString();return e}}function u(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}e["default"]=a;},5084:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1754));const s=i(r(9214));class a extends s.default{constructor(){super(...arguments);this.unbindAliasData=new o;}static create(t,e,r){let i=new a;super.initActionMsg(i);i.unbindAliasData=o.create(t,e);i.callback=r;i.actionMsgData.msgAction=s.default.ClientAction.UNBIND_ALIAS;i.actionMsgData.msgData=JSON.stringify(i.unbindAliasData);return i}}class o{constructor(){this.alias="";this.cid="";this.appid="";this.sn="";this.is_self="";}static create(t,e){let r=new o;r.alias=t;r.cid=n.default.cid;r.appid=n.default.appid;r.sn=(new Date).getTime().toString();r.is_self=e?"1":"0";return r}}e["default"]=a;},6561:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9800));class s extends n.default{static create(){let t=new s;super.initMsg(t);t.command=n.default.Command.HEART_BEAT;return t}}e["default"]=s;},358:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(323));const s=i(r(1754));const a=i(r(9800));class o extends a.default{constructor(){super(...arguments);this.keyNegotiateData=new u;}static create(){let t=new o;super.initMsg(t);t.command=a.default.Command.KEY_NEGOTIATE;n.default.resetKey();t.data=t.keyNegotiateData=u.create();return t}send(){super.send();}}class u{constructor(){this.appId="";this.rsaPublicKeyId="";this.algorithm="";this.secretKey="";this.iv="";}static create(){let t=new u;t.appId=s.default.appid;t.rsaPublicKeyId=s.default.publicKeyId;t.algorithm="AES";t.secretKey=n.default.getEncryptedSecretKey();t.iv=n.default.getEncryptedIV();return t}}e["default"]=o;},5301:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9800));const s=i(r(323));const a=i(r(2544));class o extends n.default{constructor(){super(...arguments);this.keyNegotiateResultData=new u;}static parse(t){let e=new o;super.parseMsg(e,t);e.keyNegotiateResultData=u.parse(e.data);return e}receive(){if(0!=this.keyNegotiateResultData.errorCode){console.error(`key negotiate fail: ${this.data}`);return}let t=this.keyNegotiateResultData.encryptType.split("/");if(!s.default.algorithmMap.has(t[0].trim().toLowerCase())||!s.default.modeMap.has(t[1].trim().toLowerCase())||!s.default.paddingMap.has(t[2].trim().toLowerCase())){console.error(`key negotiate fail: ${this.data}`);return}s.default.setEncryptParams(t[0].trim().toLowerCase(),t[1].trim().toLowerCase(),t[2].trim().toLowerCase());a.default.create().send();}}class u{constructor(){this.errorCode=-1;this.errorMsg="";this.encryptType="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.encryptType=r.encryptType;return e}}e["default"]=o;},2544:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1754));const s=i(r(323));const a=i(r(9800));const o=i(r(3527));class u extends a.default{constructor(){super(...arguments);this.loginData=new c;}static create(){let t=new u;super.initMsg(t);t.command=a.default.Command.LOGIN;t.data=t.loginData=c.create();return t}send(){if(!this.loginData.session||n.default.cid!=s.default.md5Hex(this.loginData.session)){o.default.create().send();return}super.send();}}class c{constructor(){this.appId="";this.session="";}static create(){let t=new c;t.appId=n.default.appid;t.session=n.default.session;return t}}e["default"]=u;},8734:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(207));const s=i(r(9800));const a=i(r(1754));const o=i(r(9214));const u=i(r(708));const c=i(r(2544));class l extends s.default{constructor(){super(...arguments);this.loginResultData=new f;}static parse(t){let e=new l;super.parseMsg(e,t);e.loginResultData=f.parse(e.data);return e}receive(){var t;if(0!=this.loginResultData.errorCode){this.data;a.default.session=a.default.cid="";n.default.setSync(n.default.KEY_CID,"");n.default.setSync(n.default.KEY_SESSION,"");c.default.create().send();return}if(!a.default.online){a.default.online=true;null===(t=a.default.onlineState)||void 0===t||t.call(a.default.onlineState,{online:a.default.online});}o.default.sendWaitingMessages();u.default.create().send();}}class f{constructor(){this.errorCode=-1;this.errorMsg="";this.session="";}static parse(t){let e=new f;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.session=r.session;return e}}e["default"]=l;},9800:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(350));const a=i(r(3593));const o=i(r(127));const u=i(r(1754));class c{constructor(){this.version="";this.command=0;this.packetId=0;this.timeStamp=0;this.data="";this.signature="";}static initMsg(t,...e){t.version=o.default.SOCKET_PROTOCOL_VERSION;t.command=0;t.timeStamp=(new Date).getTime();return t}static parseMsg(t,e){let r=JSON.parse(e);t.version=r.version;t.command=r.command;t.packetId=r.packetId;t.timeStamp=r.timeStamp;t.data=r.data;t.signature=r.signature;return t}stringify(){return JSON.stringify(this,["version","command","packetId","timeStamp","data","signature"])}send(){if(!a.default.isAvailable())return;this.packetId=u.default.packetId++;this.data=JSON.stringify(this.data);this.stringify();if(this.command!=c.Command.HEART_BEAT){s.default.sign(this);if(this.data&&this.command!=c.Command.KEY_NEGOTIATE)s.default.encrypt(this);}a.default.send(this.stringify());}}c.Command=(n=class{},n.HEART_BEAT=0,n.KEY_NEGOTIATE=1,n.KEY_NEGOTIATE_RESULT=16,n.REGISTER=2,n.REGISTER_RESULT=32,n.LOGIN=3,n.LOGIN_RESULT=48,n.LOGOUT=4,n.LOGOUT_RESULT=64,n.CLIENT_MSG=5,n.SERVER_MSG=80,n.SERVER_CLOSE=96,n);e["default"]=c;},350:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(323));var s;(function(t){function e(t){t.data=n.default.encrypt(t.data);}t.encrypt=e;function r(t){t.data=n.default.decrypt(t.data);}t.decrypt=r;function i(t){t.signature=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);}t.sign=i;function s(t){let e=n.default.sha256(`${t.timeStamp}${t.packetId}${t.command}${t.data}`);if(t.signature!=e)throw new Error(`msg signature vierfy failed`)}t.verify=s;})(s||(s={}));e["default"]=s;},1236:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(5301));const s=i(r(8734));const a=i(r(9800));const o=i(r(7078));const u=i(r(538));const c=i(r(7821));const l=i(r(217));const f=i(r(7156));const h=i(r(2535));const d=i(r(9214));const v=i(r(7303));const p=i(r(6063));const g=i(r(7923));const y=i(r(350));const m=i(r(9214));const _=i(r(6254));const S=i(r(5035));class E{static receiveMessage(t){let e=a.default.parseMsg(new a.default,t);if(e.command!=a.default.Command.KEY_NEGOTIATE_RESULT&&e.command!=a.default.Command.HEART_BEAT&&e.command!=a.default.Command.SERVER_CLOSE)y.default.decrypt(e);if(e.command!=a.default.Command.HEART_BEAT&&e.command!=a.default.Command.SERVER_CLOSE)y.default.verify(e);switch(e.command){case a.default.Command.KEY_NEGOTIATE_RESULT:n.default.parse(e.stringify()).receive();break;case a.default.Command.REGISTER_RESULT:o.default.parse(e.stringify()).receive();break;case a.default.Command.LOGIN_RESULT:s.default.parse(e.stringify()).receive();break;case a.default.Command.SERVER_MSG:this.receiveActionMsg(e.stringify());break;case a.default.Command.SERVER_CLOSE:S.default.parse(e.stringify()).receive();break;}}static receiveActionMsg(t){let e=m.default.parseActionMsg(new m.default,t);if(e.actionMsgData.msgAction!=d.default.ServerAction.RECEIVED&&e.actionMsgData.msgAction!=d.default.ServerAction.REDIRECT_SERVER){let t=JSON.parse(e.actionMsgData.msgData);_.default.create(t.id).send();}switch(e.actionMsgData.msgAction){case d.default.ServerAction.PUSH_MESSAGE:f.default.parse(t).receive();break;case d.default.ServerAction.REDIRECT_SERVER:h.default.parse(t).receive();break;case d.default.ServerAction.ADD_PHONE_INFO_RESULT:u.default.parse(t).receive();break;case d.default.ServerAction.SET_MODE_RESULT:v.default.parse(t).receive();break;case d.default.ServerAction.SET_TAG_RESULT:p.default.parse(t).receive();break;case d.default.ServerAction.BIND_ALIAS_RESULT:c.default.parse(t).receive();break;case d.default.ServerAction.UNBIND_ALIAS_RESULT:g.default.parse(t).receive();break;case d.default.ServerAction.FEED_BACK_RESULT:l.default.parse(t).receive();break;case d.default.ServerAction.RECEIVED:_.default.parse(t).receive();break}}}e["default"]=E;},6254:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(3118);const s=i(r(1754));const a=i(r(9214));class o extends a.default{constructor(){super(...arguments);this.receivedData=new u;}static create(t){let e=new o;super.initActionMsg(e);e.callback=t=>{if(t.resultCode!=n.ErrorCode.SUCCESS&&t.resultCode!=n.ErrorCode.REPEAT_MESSAGE)setTimeout((function(){e.send();}),3*1e3);};e.actionMsgData.msgAction=a.default.ClientAction.RECEIVED;e.receivedData=u.create(t);e.actionMsgData.msgData=JSON.stringify(e.receivedData);return e}static parse(t){let e=new o;super.parseActionMsg(e,t);e.receivedData=u.parse(e.data);return e}receive(){var t;let e=a.default.getWaitingResponseMessage(this.actionMsgData.msgId);if(e&&e.actionMsgData.msgAction==a.default.ClientAction.ADD_PHONE_INFO||e&&e.actionMsgData.msgAction==a.default.ClientAction.FEED_BACK){a.default.removeWaitingResponseMessage(e.actionMsgData.msgId);null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}send(){super.send();}}class u{constructor(){this.msgId="";this.cid="";}static create(t){let e=new u;e.cid=s.default.cid;e.msgId=t;return e}static parse(t){let e=new u;let r=JSON.parse(t);e.cid=r.cid;e.msgId=r.msgId;return e}}e["default"]=o;},3527:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(1754));const s=i(r(9800));class a extends s.default{constructor(){super(...arguments);this.registerData=new o;}static create(){let t=new a;super.initMsg(t);t.command=s.default.Command.REGISTER;t.data=t.registerData=o.create();return t}send(){super.send();}}class o{constructor(){this.appId="";this.regId="";}static create(){let t=new o;t.appId=n.default.appid;t.regId=n.default.regId;return t}}e["default"]=a;},7078:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9800));const s=i(r(207));const a=i(r(1754));const o=i(r(2544));class u extends n.default{constructor(){super(...arguments);this.registerResultData=new c;}static parse(t){let e=new u;super.parseMsg(e,t);e.registerResultData=c.parse(e.data);return e}receive(){var t;if(0!=this.registerResultData.errorCode||!this.registerResultData.cid||!this.registerResultData.session){console.error(`register fail: ${this.data}`);return}if(a.default.cid!=this.registerResultData.cid)s.default.setSync(s.default.KEY_ADD_PHONE_INFO_TIME,0);a.default.cid=this.registerResultData.cid;null===(t=a.default.onClientId)||void 0===t||t.call(a.default.onClientId,{cid:a.default.cid});s.default.set({key:s.default.KEY_CID,data:a.default.cid});a.default.session=this.registerResultData.session;s.default.set({key:s.default.KEY_SESSION,data:a.default.session});a.default.deviceId=this.registerResultData.deviceId;s.default.set({key:s.default.KEY_DEVICE_ID,data:a.default.deviceId});o.default.create().send();}}class c{constructor(){this.errorCode=-1;this.errorMsg="";this.cid="";this.session="";this.deviceId="";this.regId="";}static parse(t){let e=new c;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;e.cid=r.cid;e.session=r.session;e.deviceId=r.deviceId;e.regId=r.regId;return e}}e["default"]=u;},5035:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3593));const s=i(r(9800));class a extends s.default{constructor(){super(...arguments);this.serverCloseData=new o;}static parse(t){let e=new a;super.parseMsg(e,t);e.serverCloseData=o.parse(e.data);return e}receive(){this.data;if(20==this.serverCloseData.code||23==this.serverCloseData.code||24==this.serverCloseData.code)n.default.allowReconnect=false;n.default.close();}}class o{constructor(){this.code=-1;this.msg="";}static parse(t){let e=new o;let r=JSON.parse(t);e.code=r.code;e.msg=r.msg;return e}}e["default"]=a;},538:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(207));const s=i(r(9214));class a extends s.default{constructor(){super(...arguments);this.addPhoneInfoResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.addPhoneInfoResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.addPhoneInfoResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.addPhoneInfoResultData.errorCode,message:this.addPhoneInfoResultData.errorMsg});n.default.set({key:n.default.KEY_ADD_PHONE_INFO_TIME,data:(new Date).getTime()});}}class o{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new o;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=a;},7821:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(207));const s=i(r(1237));const a=i(r(9214));class o extends a.default{constructor(){super(...arguments);this.bindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.bindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`bind alias result`,this.bindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.bindAliasResultData.errorCode,message:this.bindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},217:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=r(3118);const s=i(r(9214));class a extends s.default{constructor(){super(...arguments);this.feedbackResultData=new o;}static parse(t){let e=new a;super.parseActionMsg(e,t);e.feedbackResultData=o.parse(e.actionMsgData.msgData);return e}receive(){var t;this.feedbackResultData;let e=s.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:n.ErrorCode.SUCCESS,message:"received"});}}class o{constructor(){this.actionId="";this.taskId="";this.result="";}static parse(t){let e=new o;let r=JSON.parse(t);e.actionId=r.actionId;e.taskId=r.taskId;e.result=r.result;return e}}e["default"]=a;},7156:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(1754));const a=i(r(9214));const o=i(r(652));class u extends a.default{constructor(){super(...arguments);this.pushMessageData=new c;}static parse(t){let e=new u;super.parseActionMsg(e,t);e.pushMessageData=c.parse(e.actionMsgData.msgData);return e}receive(){var t;this.pushMessageData;if(this.pushMessageData.appId!=s.default.appid||!this.pushMessageData.messageid||!this.pushMessageData.taskId)this.stringify();o.default.create(this,o.default.ActionId.RECEIVE).send();o.default.create(this,o.default.ActionId.MP_RECEIVE).send();if(this.actionMsgData.msgExtraData&&s.default.onPushMsg)null===(t=s.default.onPushMsg)||void 0===t||t.call(s.default.onPushMsg,{message:this.actionMsgData.msgExtraData});}}class c{constructor(){this.id="";this.appKey="";this.appId="";this.messageid="";this.taskId="";this.actionChain=[];this.cdnType="";}static parse(t){let e=new c;let r=JSON.parse(t);e.id=r.id;e.appKey=r.appKey;e.appId=r.appId;e.messageid=r.messageid;e.taskId=r.taskId;e.actionChain=r.actionChain;e.cdnType=r.cdnType;return e}}(n=class{},n.GO_TO="goto",n.TRANSMIT="transmit",n);e["default"]=u;},2535:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3593));const s=i(r(1754));const a=i(r(9214));class o extends a.default{constructor(){super(...arguments);this.redirectServerData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.redirectServerData=u.parse(e.actionMsgData.msgData);return e}receive(){s.default.socketUrl=this.redirectServerData.addressList.split(",")[0];n.default.connect();}}class u{constructor(){this.addressList="";this.delay=0;this.location="";this.idConfig="";}static parse(t){let e=new u;let r=JSON.parse(t);e.addressList=r.addressList;e.delay=r.delay;e.location=r.location;e.idConfig=r.idConfig;return e}}e["default"]=o;},7303:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(9214));class s extends n.default{constructor(){super(...arguments);this.setModeResultData=new a;}static parse(t){let e=new s;super.parseActionMsg(e,t);e.setModeResultData=a.parse(e.actionMsgData.msgData);return e}receive(){var t;this.setModeResultData;let e=n.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setModeResultData.errorCode,message:this.setModeResultData.errorMsg});}}class a{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new a;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=s;},6063:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(207));const s=i(r(1237));const a=i(r(9214));class o extends a.default{constructor(){super(...arguments);this.setTagResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.setTagResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`set tag result`,this.setTagResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.setTagResultData.errorCode,message:this.setTagResultData.errorMsg});n.default.set({key:n.default.KEY_SET_TAG_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=0;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},7923:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(207));const s=i(r(1237));const a=i(r(9214));class o extends a.default{constructor(){super(...arguments);this.unbindAliasResultData=new u;}static parse(t){let e=new o;super.parseActionMsg(e,t);e.unbindAliasResultData=u.parse(e.actionMsgData.msgData);return e}receive(){var t;s.default.info(`unbind alias result`,this.unbindAliasResultData);let e=a.default.removeWaitingResponseMessage(this.actionMsgData.msgId);if(e)null===(t=e.callback)||void 0===t||t.call(e.callback,{resultCode:this.unbindAliasResultData.errorCode,message:this.unbindAliasResultData.errorMsg});n.default.set({key:n.default.KEY_BIND_ALIAS_TIME,data:(new Date).getTime()});}}class u{constructor(){this.errorCode=-1;this.errorMsg="";}static parse(t){let e=new u;let r=JSON.parse(t);e.errorCode=r.errorCode;e.errorMsg=r.errorMsg;return e}}e["default"]=o;},9285:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{constructor(t){this.delay=10;this.delay=t;}start(){this.cancel();let t=this;this.timer=setInterval((function(){t.run();}),this.delay);}cancel(){if(this.timer)clearInterval(this.timer);}}e["default"]=r;},1571:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};var n;Object.defineProperty(e,"__esModule",{value:true});const s=i(r(6561));const a=i(r(9285));class o extends a.default{static getInstance(){return o.InstanceHolder.instance}run(){s.default.create().send();}refresh(){this.delay=60*1e3;this.start();}}o.INTERVAL=60*1e3;o.InstanceHolder=(n=class{},n.instance=new o(o.INTERVAL),n);e["default"]=o;},3270:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});var r;(function(t){let e;let r;try{e=uni.getSystemInfoSync();r=uni.getAccountInfoSync();}catch(t){}function i(){let t="";try{t=e?e.platform:"";}catch(t){}return t?t:""}t.os=i;function n(){let t="";try{t=e?e.model:"";}catch(t){}return t?t:""}t.model=n;function s(){let t="";try{t=e?e.brand:"";}catch(t){}return t?t:""}t.brand=s;function a(){let t="";try{t=e?e.system:""; +// #ifdef MP-ALIPAY +let r=i();if(t&&r&&!t.toLocaleLowerCase().startsWith(r.toLowerCase()))t=i()+" "+t; +// #endif +}catch(t){}return t?t:""}t.osVersion=a;function o(){let t=""; +// #ifdef APP-PLUS +t="APP-PLUS"; +// #endif +// #ifdef APP-PLUS-NVUE +t="APP-PLUS-NVUE"; +// #endif +// #ifdef APP-NVUE +t="APP-NVUE"; +// #endif +// #ifdef H5 +t="H5"; +// #endif +// #ifdef MP-WEIXIN +t="MP-WEIXIN"; +// #endif +// #ifdef MP-ALIPAY +t="MP-ALIPAY"; +// #endif +// #ifdef MP-BAIDU +t="MP-BAIDU"; +// #endif +// #ifdef MP-TOUTIAO +t="MP-TOUTIAO"; +// #endif +// #ifdef MP-LARK +t="MP-LARK"; +// #endif +// #ifdef MP-QQ +t="MP-QQ"; +// #endif +// #ifdef MP-KUAISHOU +t="MP-KUAISHOU"; +// #endif +// #ifdef MP-360 +t="MP-360"; +// #endif +// #ifdef QUICKAPP-WEBVIEW +t="QUICKAPP-WEBVIEW"; +// #endif +// #ifdef QUICKAPP-WEBVIEW-UNION +t="QUICKAPP-WEBVIEW-UNION"; +// #endif +return t}t.platform=o;function u(){let t="";try{t=e?e.version:"";}catch(t){}return t?t:""}t.platformVersion=u;function c(){let t="";try{t=r?r.miniProgram.appId:"";}catch(t){}return t?t:""}t.platformId=c;function l(){let t="";try{t=e?e.language:"";}catch(t){}return t?t:""}t.language=l;function f(){return ""}t.imei=f;function h(){return ""}t.oaid=h;function d(t){uni.getNetworkType({success:e=>{var r;null===(r=t.success)||void 0===r||r.call(t.success,e.networkType);},fail:e=>{var r;null===(r=t.fail)||void 0===r||r.call(t.fail,e);}});}t.getNetworkType=d;function v(t){uni.onNetworkStatusChange((e=>{t.call(t,e);}));}t.onNetworkStatusChange=v;})(r||(r={}));e["default"]=r;},3593:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(358));const s=i(r(1754));const a=i(r(1236));const o=i(r(1571));const u=i(r(1237));var c;(function(t){let e;let r=false;let i=false;t.allowReconnect=true;function c(){return r&&i}t.isAvailable=c;function l(e){if(!t.allowReconnect)return;setTimeout((function(){f();}),e);}t.reconnect=l;function f(){t.allowReconnect=true;if(!s.default.networkConnected){u.default.info(`connect failed, network is not available`);return}if(i||r)return;let n=s.default.socketUrl;e=uni.connectSocket({url:n,success:function(){i=true;h();},fail:function(){i=false;p();}}); +// #ifdef MP-ALIPAY +uni.onSocketOpen(g);uni.onSocketMessage(y);uni.onSocketError(m);uni.onSocketClose(_); +// #endif +// #ifndef MP-ALIPAY +e.onOpen(g);e.onMessage(y);e.onError(m);e.onClose(_); +// #endif +}t.connect=f;function h(){if(i&&r){n.default.create().send();o.default.getInstance().start();}}function d(t){ +// #ifdef MP-ALIPAY +uni.closeSocket({reason:t,success:function(t){},fail:function(t){p();}}); +// #endif +// #ifndef MP-ALIPAY +e.close({reason:t,success:function(t){},fail:function(t){p();}}); +// #endif +}t.close=d;function v(t){if(r&&r){ +// #ifdef MP-ALIPAY +uni.sendSocketMessage({data:t,success:function(t){},fail:function(t){}}); +// #endif +// #ifndef MP-ALIPAY +e.send({data:t,success:function(t){},fail:function(t){}}); +// #endif +}else throw new Error(`socket not connect`)}t.send=v;function p(t){var e,n;i=false;r=false;o.default.getInstance().cancel();if(s.default.online){s.default.online=false;null===(e=s.default.onlineState)||void 0===e||e.call(s.default.onlineState,{online:s.default.online});}if(s.default.online){s.default.online=false;null===(n=s.default.onlineState)||void 0===n||n.call(s.default.onlineState,{online:s.default.online});}l(1e3);}let g=function(t){r=true;h();};let y=function(t){try{t.data;o.default.getInstance().refresh();a.default.receiveMessage(t.data);}catch(t){}};let m=function(t){d(`socket error`);};let _=function(t){p();};})(c||(c={}));e["default"]=c;},207:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});var r;(function(t){t.KEY_APPID="appid";t.KEY_CID="cid";t.KEY_SESSION="session";t.KEY_REGID="regid";t.KEY_SOCKET_URL="socket_url";t.KEY_DEVICE_ID="deviceid";t.KEY_ADD_PHONE_INFO_TIME="api_time";t.KEY_BIND_ALIAS_TIME="ba_time";t.KEY_SET_TAG_TIME="st_time";function e(t,e){uni.setStorageSync(t,e);}t.setSync=e;function r(t){uni.setStorage({key:t.key,data:t.data,fail:()=>{var e;t.key,t.data;null===(e=t.fail)||void 0===e||e.call(t);}});}t.set=r;function i(t,e){let r=e;try{let e=uni.getStorageSync(t);if(e)r=e;}catch(t){}return r}t.getSync=i;function n(t){uni.getStorage({key:t.key,success:e=>{var r;null===(r=t.success)||void 0===r||r.call(t,e.data);},fail:()=>{var e;t.key;null===(e=t.fail)||void 0===e||e.call(t);}});}t.get=n;})(r||(r={}));e["default"]=r;},323:function(t,e,r){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const n=i(r(3357));const s=i(r(1354));const a=i(r(1754));var o;(function(t){let e;let r;let i;let o;let u=new n.default;let c=s.default.mode.CBC;let l=s.default.pad.Pkcs7;let f=s.default.AES;t.algorithmMap=new Map([["aes",s.default.AES]]);t.modeMap=new Map([["cbc",s.default.mode.CBC],["cfb",s.default.mode.CFB],["cfb128",s.default.mode.CFB],["ecb",s.default.mode.ECB],["ofb",s.default.mode.OFB]]);t.paddingMap=new Map([["nopadding",s.default.pad.NoPadding],["pkcs7",s.default.pad.Pkcs7]]);function h(){e=s.default.MD5((new Date).getTime().toString());r=s.default.MD5(e);u.setPublicKey(a.default.publicKey);e.toString(s.default.enc.Hex);r.toString(s.default.enc.Hex);i=u.encrypt(e.toString(s.default.enc.Hex));o=u.encrypt(r.toString(s.default.enc.Hex));}t.resetKey=h;function d(e,r,i){f=t.algorithmMap.get(e);c=t.modeMap.get(r);l=t.paddingMap.get(i);}t.setEncryptParams=d;function v(t){return f.encrypt(t,e,{iv:r,mode:c,padding:l}).toString()}t.encrypt=v;function p(t){return f.decrypt(t,e,{iv:r,mode:c,padding:l}).toString(s.default.enc.Utf8)}t.decrypt=p;function g(t){return s.default.SHA256(t).toString(s.default.enc.Base64)}t.sha256=g;function y(t){return s.default.MD5(t).toString(s.default.enc.Hex)}t.md5Hex=y;function m(){return i?i:""}t.getEncryptedSecretKey=m;function _(){return o?o:""}t.getEncryptedIV=_;})(o||(o={}));e["default"]=o;},1237:(t,e)=>{Object.defineProperty(e,"__esModule",{value:true});class r{static info(...t){if(this.debugMode)console.info(`[GtPush]`,t);}static error(...t){console.error(`[GtPush]`,t);}}r.debugMode=false;e["default"]=r;},3357:(t,e,r)=>{r.r(e);r.d(e,{JSEncrypt:()=>_t,default:()=>St});var i="0123456789abcdefghijklmnopqrstuvwxyz";function n(t){return i.charAt(t)}function s(t,e){return t&e}function a(t,e){return t|e}function o(t,e){return t^e}function u(t,e){return t&~e}function c(t){if(0==t)return -1;var e=0;if(0==(65535&t)){t>>=16;e+=16;}if(0==(255&t)){t>>=8;e+=8;}if(0==(15&t)){t>>=4;e+=4;}if(0==(3&t)){t>>=2;e+=2;}if(0==(1&t))++e;return e}function l(t){var e=0;while(0!=t){t&=t-1;++e;}return e}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var h="=";function d(t){var e;var r;var i="";for(e=0;e+3<=t.length;e+=3){r=parseInt(t.substring(e,e+3),16);i+=f.charAt(r>>6)+f.charAt(63&r);}if(e+1==t.length){r=parseInt(t.substring(e,e+1),16);i+=f.charAt(r<<2);}else if(e+2==t.length){r=parseInt(t.substring(e,e+2),16);i+=f.charAt(r>>2)+f.charAt((3&r)<<4);}while((3&i.length)>0)i+=h;return i}function v(t){var e="";var r;var i=0;var s=0;for(r=0;r>2);s=3&a;i=1;}else if(1==i){e+=n(s<<2|a>>4);s=15&a;i=2;}else if(2==i){e+=n(s);e+=n(a>>2);s=3&a;i=3;}else {e+=n(s<<2|a>>4);e+=n(15&a);i=0;}}if(1==i)e+=n(s<<2);return e}var g;var y={decode:function(t){var e;if(void 0===g){var r="0123456789ABCDEF";var i=" \f\n\r\t \u2028\u2029";g={};for(e=0;e<16;++e)g[r.charAt(e)]=e;r=r.toLowerCase();for(e=10;e<16;++e)g[r.charAt(e)]=e;for(e=0;e=2){n[n.length]=s;s=0;a=0;}else s<<=4;}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return n}};var m;var _={decode:function(t){var e;if(void 0===m){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var i="= \f\n\r\t \u2028\u2029";m=Object.create(null);for(e=0;e<64;++e)m[r.charAt(e)]=e;m["-"]=62;m["_"]=63;for(e=0;e=4){n[n.length]=s>>16;n[n.length]=s>>8&255;n[n.length]=255&s;s=0;a=0;}else s<<=6;}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=s>>10;break;case 3:n[n.length]=s>>16;n[n.length]=s>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=_.re.exec(t);if(e)if(e[1])t=e[1];else if(e[2])t=e[2];else throw new Error("RegExp out of sync");return _.decode(t)}};var S=1e13;var E=function(){function t(t){this.buf=[+t||0];}t.prototype.mulAdd=function(t,e){var r=this.buf;var i=r.length;var n;var s;for(n=0;n0)r[n]=e;};t.prototype.sub=function(t){var e=this.buf;var r=e.length;var i;var n;for(i=0;i=0;--i)r+=(S+e[i]).toString().substring(1);return r};t.prototype.valueOf=function(){var t=this.buf;var e=0;for(var r=t.length-1;r>=0;--r)e=e*S+t[r];return e};t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this};return t}();var b="…";var w=/^(\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)?)?$/;var D=/^(\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 T(t,e){if(t.length>e)t=t.substring(0,e)+b;return t}var A=function(){function t(e,r){this.hexDigits="0123456789ABCDEF";if(e instanceof t){this.enc=e.enc;this.pos=e.pos;}else {this.enc=e;this.pos=r;}}t.prototype.get=function(t){if(void 0===t)t=this.pos++;if(t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return "string"===typeof this.enc?this.enc.charCodeAt(t):this.enc[t]};t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)};t.prototype.hexDump=function(t,e,r){var i="";for(var n=t;n176)return false}return true};t.prototype.parseStringISO=function(t,e){var r="";for(var i=t;i191&&n<224)r+=String.fromCharCode((31&n)<<6|63&this.get(i++));else r+=String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++));}return r};t.prototype.parseStringBMP=function(t,e){var r="";var i;var n;for(var s=t;s127;var n=i?255:0;var s;var a="";while(r==n&&++t4){a=r;s<<=3;while(0==(128&(+a^n))){a=+a<<1;--s;}a="("+s+" bit)\n";}if(i)r-=256;var o=new E(r);for(var u=t+1;u=c;--l)a+=u>>l&1?"1":"0";if(a.length>r)return s+T(a,r)}return s+a};t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return T(this.parseStringISO(t,e),r);var i=e-t;var n="("+i+" byte)\n";r/=2;if(i>r)e=t+r;for(var s=t;sr)n+=b;return n};t.prototype.parseOID=function(t,e,r){var i="";var n=new E;var s=0;for(var a=t;ar)return T(i,r);n=new E;s=0;}}if(s>0)i+=".incomplete";return i};return t}();var M=function(){function t(t,e,r,i,n){if(!(i instanceof I))throw new Error("Invalid tag value.");this.stream=t;this.header=e;this.length=r;this.tag=i;this.sub=n;}t.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()}};t.prototype.content=function(t){if(void 0===this.tag)return null;if(void 0===t)t=1/0;var e=this.posContent();var r=Math.abs(this.length);if(!this.tag.isUniversal()){if(null!==this.sub)return "("+this.sub.length+" elem)";return this.stream.parseOctetString(e,e+r,t)}switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:if(null!==this.sub)return "("+this.sub.length+" elem)";else return "(no elem)";case 12:return T(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return T(this.stream.parseStringISO(e,e+r),t);case 30:return T(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null};t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"};t.prototype.toPrettyString=function(t){if(void 0===t)t="";var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0)e+="+";e+=this.length;if(this.tag.tagConstructed)e+=" (constructed)";else if(this.tag.isUniversal()&&(3==this.tag.tagNumber||4==this.tag.tagNumber)&&null!==this.sub)e+=" (encapsulates)";e+="\n";if(null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i>6;this.tagConstructed=0!==(32&e);this.tagNumber=31&e;if(31==this.tagNumber){var r=new E;do{e=t.get();r.mulAdd(128,127&e);}while(128&e);this.tagNumber=r.simplify();}}t.prototype.isUniversal=function(){return 0===this.tagClass};t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber};return t}();var R;var x=0xdeadbeefcafe;var B=15715070==(16777215&x);var C=[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];var O=(1<<26)/C[C.length-1];var k=function(){function t(t,e,r){if(null!=t)if("number"==typeof t)this.fromNumber(t,e,r);else if(null==e&&"string"!=typeof t)this.fromString(t,256);else this.fromString(t,e);}t.prototype.toString=function(t){if(this.s<0)return "-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else if(4==t)e=2;else return this.toRadix(t);var r=(1<0){if(u>u)>0){s=true;a=n(i);}while(o>=0){if(u>(u+=this.DB-e);}else {i=this[o]>>(u-=e)&r;if(u<=0){u+=this.DB;--o;}}if(i>0)s=true;if(s)a+=n(i);}}return s?a:"0"};t.prototype.negate=function(){var e=L();t.ZERO.subTo(this,e);return e};t.prototype.abs=function(){return this.s<0?this.negate():this};t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;e=r-t.t;if(0!=e)return this.s<0?-e:e;while(--r>=0)if(0!=(e=this[r]-t[r]))return e;return 0};t.prototype.bitLength=function(){if(this.t<=0)return 0;return this.DB*(this.t-1)+W(this[this.t-1]^this.s&this.DM)};t.prototype.mod=function(e){var r=L();this.abs().divRemTo(e,null,r);if(this.s<0&&r.compareTo(t.ZERO)>0)e.subTo(r,r);return r};t.prototype.modPowInt=function(t,e){var r;if(t<256||e.isEven())r=new N(e);else r=new V(e);return this.exp(t,r)};t.prototype.clone=function(){var t=L();this.copyTo(t);return t};t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;else if(0==this.t)return -1}else if(1==this.t)return this[0];else if(0==this.t)return 0;return (this[1]&(1<<32-this.DB)-1)<>24};t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16};t.prototype.signum=function(){if(this.s<0)return -1;else if(this.t<=0||1==this.t&&this[0]<=0)return 0;else return 1};t.prototype.toByteArray=function(){var t=this.t;var e=[];e[0]=this.s;var r=this.DB-t*this.DB%8;var i;var n=0;if(t-- >0){if(r>r)!=(this.s&this.DM)>>r)e[n++]=i|this.s<=0){if(r<8){i=(this[t]&(1<>(r+=this.DB-8);}else {i=this[t]>>(r-=8)&255;if(r<=0){r+=this.DB;--t;}}if(0!=(128&i))i|=-256;if(0==n&&(128&this.s)!=(128&i))++n;if(n>0||i!=this.s)e[n++]=i;}}return e};t.prototype.equals=function(t){return 0==this.compareTo(t)};t.prototype.min=function(t){return this.compareTo(t)<0?this:t};t.prototype.max=function(t){return this.compareTo(t)>0?this:t};t.prototype.and=function(t){var e=L();this.bitwiseTo(t,s,e);return e};t.prototype.or=function(t){var e=L();this.bitwiseTo(t,a,e);return e};t.prototype.xor=function(t){var e=L();this.bitwiseTo(t,o,e);return e};t.prototype.andNot=function(t){var e=L();this.bitwiseTo(t,u,e);return e};t.prototype.not=function(){var t=L();for(var e=0;e=this.t)return 0!=this.s;return 0!=(this[e]&1<1){var l=L();s.sqrTo(a[1],l);while(o<=c){a[o]=L();s.mulTo(l,a[o-2],a[o]);o+=2;}}var f=t.t-1;var h;var d=true;var v=L();var p;r=W(t[f])-1;while(f>=0){if(r>=u)h=t[f]>>r-u&c;else {h=(t[f]&(1<0)h|=t[f-1]>>this.DB+r-u;}o=i;while(0==(1&h)){h>>=1;--o;}if((r-=o)<0){r+=this.DB;--f;}if(d){a[h].copyTo(n);d=false;}else {while(o>1){s.sqrTo(n,v);s.sqrTo(v,n);o-=2;}if(o>0)s.sqrTo(n,v);else {p=n;n=v;v=p;}s.mulTo(v,a[h],n);}while(f>=0&&0==(t[f]&1<=0){i.subTo(n,i);if(r)s.subTo(o,s);a.subTo(u,a);}else {n.subTo(i,n);if(r)o.subTo(s,o);u.subTo(a,u);}}if(0!=n.compareTo(t.ONE))return t.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;if(u.signum()<0)return u.add(e);else return u};t.prototype.pow=function(t){return this.exp(t,new P)};t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone();var r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r;r=i;}var n=e.getLowestSetBit();var s=r.getLowestSetBit();if(s<0)return e;if(n0){e.rShiftTo(s,e);r.rShiftTo(s,r);}while(e.signum()>0){if((n=e.getLowestSetBit())>0)e.rShiftTo(n,e);if((n=r.getLowestSetBit())>0)r.rShiftTo(n,r);if(e.compareTo(r)>=0){e.subTo(r,e);e.rShiftTo(1,e);}else {r.subTo(e,r);r.rShiftTo(1,r);}}if(s>0)r.lShiftTo(s,r);return r};t.prototype.isProbablePrime=function(t){var e;var r=this.abs();if(1==r.t&&r[0]<=C[C.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t;t.s=this.s;};t.prototype.fromInt=function(t){this.t=1;this.s=t<0?-1:0;if(t>0)this[0]=t;else if(t<-1)this[0]=t+this.DV;else this.t=0;};t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else if(4==r)i=2;else {this.fromRadix(e,r);return}this.t=0;this.s=0;var n=e.length;var s=false;var a=0;while(--n>=0){var o=8==i?255&+e[n]:G(e,n);if(o<0){if("-"==e.charAt(n))s=true;continue}s=false;if(0==a)this[this.t++]=o;else if(a+i>this.DB){this[this.t-1]|=(o&(1<>this.DB-a;}else this[this.t-1]|=o<=this.DB)a-=this.DB;}if(8==i&&0!=(128&+e[0])){this.s=-1;if(a>0)this[this.t-1]|=(1<0&&this[this.t-1]==t)--this.t;};t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t;e.s=this.s;};t.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--o){e[o+s+1]=this[o]>>i|a;a=(this[o]&n)<=0;--o)e[o]=0;e[s]=a;e.t=this.t+s+1;e.s=this.s;e.clamp();};t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var i=t%this.DB;var n=this.DB-i;var s=(1<>i;for(var a=r+1;a>i;}if(i>0)e[this.t-r-1]|=(this.s&s)<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i-=t.s;}e.s=i<0?-1:0;if(i<-1)e[r++]=this.DV+i;else if(i>0)e[r++]=i;e.t=r;e.clamp();};t.prototype.multiplyTo=function(e,r){var i=this.abs();var n=e.abs();var s=i.t;r.t=s+n.t;while(--s>=0)r[s]=0;for(s=0;s=0)t[r]=0;for(r=0;r=e.DV){t[r+e.t]-=e.DV;t[r+e.t+1]=1;}}if(t.t>0)t[t.t-1]+=e.am(r,e[r],t,2*r,0,1);t.s=0;t.clamp();};t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(n.t<=0)return;var s=this.abs();if(s.t0){n.lShiftTo(c,a);s.lShiftTo(c,i);}else {n.copyTo(a);s.copyTo(i);}var l=a.t;var f=a[l-1];if(0==f)return;var h=f*(1<1?a[l-2]>>this.F2:0);var d=this.FV/h;var v=(1<=0){i[i.t++]=1;i.subTo(m,i);}t.ONE.dlShiftTo(l,m);m.subTo(a,a);while(a.t=0){var _=i[--g]==f?this.DM:Math.floor(i[g]*d+(i[g-1]+p)*v);if((i[g]+=a.am(0,_,i,y,0,l))<_){a.dlShiftTo(y,m);i.subTo(m,i);while(i[g]<--_)i.subTo(m,i);}}if(null!=r){i.drShiftTo(l,r);if(o!=u)t.ZERO.subTo(r,r);}i.t=l;i.clamp();if(c>0)i.rShiftTo(c,i);if(o<0)t.ZERO.subTo(i,i);};t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;e=e*(2-(15&t)*e)&15;e=e*(2-(255&t)*e)&255;e=e*(2-((65535&t)*e&65535))&65535;e=e*(2-t*e%this.DV)%this.DV;return e>0?this.DV-e:-e};t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)};t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=L();var n=L();var s=r.convert(this);var a=W(e)-1;s.copyTo(i);while(--a>=0){r.sqrTo(i,n);if((e&1<0)r.mulTo(n,s,i);else {var o=i;i=n;n=o;}}return r.revert(i)};t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))};t.prototype.toRadix=function(t){if(null==t)t=10;if(0==this.signum()||t<2||t>36)return "0";var e=this.chunkSize(t);var r=Math.pow(t,e);var i=Y(r);var n=L();var s=L();var a="";this.divRemTo(i,n,s);while(n.signum()>0){a=(r+s.intValue()).toString(t).substr(1)+a;n.divRemTo(i,n,s);}return s.intValue().toString(t)+a};t.prototype.fromRadix=function(e,r){this.fromInt(0);if(null==r)r=10;var i=this.chunkSize(r);var n=Math.pow(r,i);var s=false;var a=0;var o=0;for(var u=0;u=i){this.dMultiply(n);this.dAddOffset(o,0);a=0;o=0;}}if(a>0){this.dMultiply(Math.pow(r,a));this.dAddOffset(o,0);}if(s)t.ZERO.subTo(this,this);};t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(r)){this.dAddOffset(2,0);if(this.bitLength()>e)this.subTo(t.ONE.shiftLeft(e-1),this);}}else {var n=[];var s=7&e;n.length=(e>>3)+1;r.nextBytes(n);if(s>0)n[0]&=(1<>=this.DB;}if(t.t>=this.DB;}i+=this.s;}else {i+=this.s;while(r>=this.DB;}i+=t.s;}e.s=i<0?-1:0;if(i>0)e[r++]=i;else if(i<-1)e[r++]=this.DV+i;e.t=r;e.clamp();};t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t);++this.t;this.clamp();};t.prototype.dAddOffset=function(t,e){if(0==t)return;while(this.t<=e)this[this.t++]=0;this[e]+=t;while(this[e]>=this.DV){this[e]-=this.DV;if(++e>=this.t)this[this.t++]=0;++this[e];}};t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);r.s=0;r.t=i;while(i>0)r[--i]=0;for(var n=r.t-this.t;i=0)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r};t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE);var i=r.getLowestSetBit();if(i<=0)return false;var n=r.shiftRight(i);e=e+1>>1;if(e>C.length)e=C.length;var s=L();for(var a=0;a0){r.rShiftTo(a,r);i.rShiftTo(a,i);}var o=function(){if((s=r.getLowestSetBit())>0)r.rShiftTo(s,r);if((s=i.getLowestSetBit())>0)i.rShiftTo(s,i);if(r.compareTo(i)>=0){r.subTo(i,r);r.rShiftTo(1,r);}else {i.subTo(r,i);i.rShiftTo(1,i);}if(!(r.signum()>0)){if(a>0)i.lShiftTo(a,i);setTimeout((function(){e(i);}),0);}else setTimeout(o,0);};setTimeout(o,10);};t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else {this.fromNumber(e,i);if(!this.testBit(e-1))this.bitwiseTo(t.ONE.shiftLeft(e-1),a,this);if(this.isEven())this.dAddOffset(1,0);var s=this;var o=function(){s.dAddOffset(2,0);if(s.bitLength()>e)s.subTo(t.ONE.shiftLeft(e-1),s);if(s.isProbablePrime(r))setTimeout((function(){n();}),0);else setTimeout(o,0);};setTimeout(o,0);}else {var u=[];var c=7&e;u.length=(e>>3)+1;r.nextBytes(u);if(c>0)u[0]&=(1<=0)return t.mod(this.m);else return t};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.divRemTo(this.m,null,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var V=function(){function t(t){this.m=t;this.mp=t.invDigit();this.mpl=32767&this.mp;this.mph=this.mp>>15;this.um=(1<0)this.m.subTo(e,e);return e};t.prototype.revert=function(t){var e=L();t.copyTo(e);this.reduce(e);return e};t.prototype.reduce=function(t){while(t.t<=this.mt2)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;r=e+this.m.t;t[r]+=this.m.am(0,i,t,e,0,this.m.t);while(t[r]>=t.DV){t[r]-=t.DV;t[++r]++;}}t.clamp();t.drShiftTo(this.m.t,t);if(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();var H=function(){function t(t){this.m=t;this.r2=L();this.q3=L();k.ONE.dlShiftTo(2*t.t,this.r2);this.mu=this.r2.divide(t);}t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);else if(t.compareTo(this.m)<0)return t;else {var e=L();t.copyTo(e);this.reduce(e);return e}};t.prototype.revert=function(t){return t};t.prototype.reduce=function(t){t.drShiftTo(this.m.t-1,this.r2);if(t.t>this.m.t+1){t.t=this.m.t+1;t.clamp();}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(t.compareTo(this.r2)<0)t.dAddOffset(1,this.m.t+1);t.subTo(this.r2,t);while(t.compareTo(this.m)>=0)t.subTo(this.m,t);};t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r);this.reduce(r);};t.prototype.sqrTo=function(t,e){t.squareTo(e);this.reduce(e);};return t}();function L(){return new k(null)}function K(t,e){return new k(t,e)}var U="undefined"!==typeof navigator;if(U&&B&&"Microsoft Internet Explorer"==navigator.appName){k.prototype.am=function t(e,r,i,n,s,a){var o=32767&r;var u=r>>15;while(--a>=0){var c=32767&this[e];var l=this[e++]>>15;var f=u*c+l*o;c=o*c+((32767&f)<<15)+i[n]+(1073741823&s);s=(c>>>30)+(f>>>15)+u*l+(s>>>30);i[n++]=1073741823&c;}return s};R=30;}else if(U&&B&&"Netscape"!=navigator.appName){k.prototype.am=function t(e,r,i,n,s,a){while(--a>=0){var o=r*this[e++]+i[n]+s;s=Math.floor(o/67108864);i[n++]=67108863&o;}return s};R=26;}else {k.prototype.am=function t(e,r,i,n,s,a){var o=16383&r;var u=r>>14;while(--a>=0){var c=16383&this[e];var l=this[e++]>>14;var f=u*c+l*o;c=o*c+((16383&f)<<14)+i[n]+s;s=(c>>28)+(f>>14)+u*l;i[n++]=268435455&c;}return s};R=28;}k.prototype.DB=R;k.prototype.DM=(1<>>16)){t=r;e+=16;}if(0!=(r=t>>8)){t=r;e+=8;}if(0!=(r=t>>4)){t=r;e+=4;}if(0!=(r=t>>2)){t=r;e+=2;}if(0!=(r=t>>1)){t=r;e+=1;}return e}k.ZERO=Y(0);k.ONE=Y(1);var J=function(){function t(){this.i=0;this.j=0;this.S=[];}t.prototype.init=function(t){var e;var r;var i;for(e=0;e<256;++e)this.S[e]=e;r=0;for(e=0;e<256;++e){r=r+this.S[e]+t[e%t.length]&255;i=this.S[e];this.S[e]=this.S[r];this.S[r]=i;}this.i=0;this.j=0;};t.prototype.next=function(){var t;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;t=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=t;return this.S[t+this.S[this.i]&255]};return t}();function $(){return new J}var Z=256;var X;var Q=null;var tt;if(null==Q){Q=[];tt=0;}function nt(){if(null==X){X=$();while(tt=0&&e>0){var n=t.charCodeAt(i--);if(n<128)r[--e]=n;else if(n>127&&n<2048){r[--e]=63&n|128;r[--e]=n>>6|192;}else {r[--e]=63&n|128;r[--e]=n>>6&63|128;r[--e]=n>>12|224;}}r[--e]=0;var s=new st;var a=[];while(e>2){a[0]=0;while(0==a[0])s.nextBytes(a);r[--e]=a[0];}r[--e]=2;r[--e]=0;return new k(r)}var ut=function(){function t(){this.n=null;this.e=0;this.d=null;this.p=null;this.q=null;this.dmp1=null;this.dmq1=null;this.coeff=null;}t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)};t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);var e=t.mod(this.p).modPow(this.dmp1,this.p);var r=t.mod(this.q).modPow(this.dmq1,this.q);while(e.compareTo(r)<0)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)};t.prototype.setPublic=function(t,e){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=K(t,16);this.e=parseInt(e,16);}else console.error("Invalid RSA public key");};t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3;var r=ot(t,e);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var n=i.toString(16);var s=n.length;for(var a=0;a<2*e-s;a++)n="0"+n;return n};t.prototype.setPrivate=function(t,e,r){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=K(t,16);this.e=parseInt(e,16);this.d=K(r,16);}else console.error("Invalid RSA private key");};t.prototype.setPrivateEx=function(t,e,r,i,n,s,a,o){if(null!=t&&null!=e&&t.length>0&&e.length>0){this.n=K(t,16);this.e=parseInt(e,16);this.d=K(r,16);this.p=K(i,16);this.q=K(n,16);this.dmp1=K(s,16);this.dmq1=K(a,16);this.coeff=K(o,16);}else console.error("Invalid RSA private key");};t.prototype.generate=function(t,e){var r=new st;var i=t>>1;this.e=parseInt(e,16);var n=new k(e,16);for(;;){for(;;){this.p=new k(t-i,1,r);if(0==this.p.subtract(k.ONE).gcd(n).compareTo(k.ONE)&&this.p.isProbablePrime(10))break}for(;;){this.q=new k(i,1,r);if(0==this.q.subtract(k.ONE).gcd(n).compareTo(k.ONE)&&this.q.isProbablePrime(10))break}if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q;this.q=s;}var a=this.p.subtract(k.ONE);var o=this.q.subtract(k.ONE);var u=a.multiply(o);if(0==u.gcd(n).compareTo(k.ONE)){this.n=this.p.multiply(this.q);this.d=n.modInverse(u);this.dmp1=this.d.mod(a);this.dmq1=this.d.mod(o);this.coeff=this.q.modInverse(this.p);break}}};t.prototype.decrypt=function(t){var e=K(t,16);var r=this.doPrivate(e);if(null==r)return null;return ct(r,this.n.bitLength()+7>>3)};t.prototype.generateAsync=function(t,e,r){var i=new st;var n=t>>1;this.e=parseInt(e,16);var s=new k(e,16);var a=this;var o=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q;a.q=t;}var e=a.p.subtract(k.ONE);var i=a.q.subtract(k.ONE);var n=e.multiply(i);if(0==n.gcd(s).compareTo(k.ONE)){a.n=a.p.multiply(a.q);a.d=s.modInverse(n);a.dmp1=a.d.mod(e);a.dmq1=a.d.mod(i);a.coeff=a.q.modInverse(a.p);setTimeout((function(){r();}),0);}else setTimeout(o,0);};var u=function(){a.q=L();a.q.fromNumberAsync(n,1,i,(function(){a.q.subtract(k.ONE).gcda(s,(function(t){if(0==t.compareTo(k.ONE)&&a.q.isProbablePrime(10))setTimeout(e,0);else setTimeout(u,0);}));}));};var c=function(){a.p=L();a.p.fromNumberAsync(t-n,1,i,(function(){a.p.subtract(k.ONE).gcda(s,(function(t){if(0==t.compareTo(k.ONE)&&a.p.isProbablePrime(10))setTimeout(u,0);else setTimeout(c,0);}));}));};setTimeout(c,0);};setTimeout(o,0);};t.prototype.sign=function(t,e,r){var i=ht(r);var n=i+e(t).toString();var s=at(n,this.n.bitLength()/4);if(null==s)return null;var a=this.doPrivate(s);if(null==a)return null;var o=a.toString(16);if(0==(1&o.length))return o;else return "0"+o};t.prototype.verify=function(t,e,r){var i=K(e,16);var n=this.doPublic(i);if(null==n)return null;var s=n.toString(16).replace(/^1f+00/,"");var a=dt(s);return a==r(t).toString()};t.prototype.encryptLong=function(t){var e=this;var r="";var i=(this.n.bitLength()+7>>3)-11;var n=this.setSplitChn(t,i);n.forEach((function(t){r+=e.encrypt(t);}));return r};t.prototype.decryptLong=function(t){var e="";var r=this.n.bitLength()+7>>3;var i=2*r;if(t.length>i){var n=t.match(new RegExp(".{1,"+i+"}","g"))||[];var s=[];for(var a=0;ae){var o=t.substring(0,s);r.push(o);return this.setSplitChn(t.substring(s),e,r)}}r.push(t);return r};return t}();function ct(t,e){var r=t.toByteArray();var i=0;while(i=r.length)return null;var n="";while(++i191&&s<224){n+=String.fromCharCode((31&s)<<6|63&r[i+1]);++i;}else {n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]);i+=2;}}return n}function lt(t,e){var r=[];for(var i=0;i=s.length)return null;r=r.concat(s.slice(a+1));}var o=r;var u=-1;var c="";while(++u191&&l<224){c+=String.fromCharCode((31&l)<<6|63&o[u+1]);++u;}else {c+=String.fromCharCode((15&l)<<12|(63&o[u+1])<<6|63&o[u+2]);u+=2;}}return c}var ft={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function ht(t){return ft[t]||""}function dt(t){for(var e in ft)if(ft.hasOwnProperty(e)){var r=ft[e];var i=r.length;if(t.substr(0,i)==r)return t.substr(i)}return t}var vt={};vt.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");var i=function(){};i.prototype=e.prototype;t.prototype=new i;t.prototype.constructor=t;t.superclass=e.prototype;if(e.prototype.constructor==Object.prototype.constructor)e.prototype.constructor=e;if(r){var n;for(n in r)t.prototype[n]=r[n];var s=function(){},a=["toString","valueOf"];try{if(/MSIE/.test(navigator.userAgent))s=function(t,e){for(n=0;n15)throw "ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+r;return i.toString(16)+e}};this.getEncodedHex=function(){if(null==this.hTLV||this.isModified){this.hV=this.getFreshValueHex();this.hL=this.getLengthHexFromValue();this.hTLV=this.hT+this.hL+this.hV;this.isModified=false;}return this.hTLV};this.getValueHex=function(){this.getEncodedHex();return this.hV};this.getFreshValueHex=function(){return ""};};pt.asn1.DERAbstractString=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(this.s);};this.setStringHex=function(t){this.hTLV=null;this.isModified=true;this.s=null;this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("string"==typeof t)this.setString(t);else if("undefined"!=typeof t["str"])this.setString(t["str"]);else if("undefined"!=typeof t["hex"])this.setStringHex(t["hex"]);};vt.lang.extend(pt.asn1.DERAbstractString,pt.asn1.ASN1Object);pt.asn1.DERAbstractTime=function(t){pt.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e};this.formatDate=function(t,e,r){var i=this.zeroPadding;var n=this.localDateToUTC(t);var s=String(n.getFullYear());if("utc"==e)s=s.substr(2,2);var a=i(String(n.getMonth()+1),2);var o=i(String(n.getDate()),2);var u=i(String(n.getHours()),2);var c=i(String(n.getMinutes()),2);var l=i(String(n.getSeconds()),2);var f=s+a+o+u+c+l;if(true===r){var h=n.getMilliseconds();if(0!=h){var d=i(String(h),3);d=d.replace(/[0]+$/,"");f=f+"."+d;}}return f+"Z"};this.zeroPadding=function(t,e){if(t.length>=e)return t;return new Array(e-t.length+1).join("0")+t};this.getString=function(){return this.s};this.setString=function(t){this.hTLV=null;this.isModified=true;this.s=t;this.hV=stohex(t);};this.setByDateValue=function(t,e,r,i,n,s){var a=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(a);};this.getFreshValueHex=function(){return this.hV};};vt.lang.extend(pt.asn1.DERAbstractTime,pt.asn1.ASN1Object);pt.asn1.DERAbstractStructured=function(t){pt.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null;this.isModified=true;this.asn1Array=t;};this.appendASN1Object=function(t){this.hTLV=null;this.isModified=true;this.asn1Array.push(t);};this.asn1Array=new Array;if("undefined"!=typeof t)if("undefined"!=typeof t["array"])this.asn1Array=t["array"];};vt.lang.extend(pt.asn1.DERAbstractStructured,pt.asn1.ASN1Object);pt.asn1.DERBoolean=function(){pt.asn1.DERBoolean.superclass.constructor.call(this);this.hT="01";this.hTLV="0101ff";};vt.lang.extend(pt.asn1.DERBoolean,pt.asn1.ASN1Object);pt.asn1.DERInteger=function(t){pt.asn1.DERInteger.superclass.constructor.call(this);this.hT="02";this.setByBigInteger=function(t){this.hTLV=null;this.isModified=true;this.hV=pt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);};this.setByInteger=function(t){var e=new k(String(t),10);this.setByBigInteger(e);};this.setValueHex=function(t){this.hV=t;};this.getFreshValueHex=function(){return this.hV};if("undefined"!=typeof t)if("undefined"!=typeof t["bigint"])this.setByBigInteger(t["bigint"]);else if("undefined"!=typeof t["int"])this.setByInteger(t["int"]);else if("number"==typeof t)this.setByInteger(t);else if("undefined"!=typeof t["hex"])this.setValueHex(t["hex"]);};vt.lang.extend(pt.asn1.DERInteger,pt.asn1.ASN1Object);pt.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!==typeof t.obj){var e=pt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex();}pt.asn1.DERBitString.superclass.constructor.call(this);this.hT="03";this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null;this.isModified=true;this.hV=t;};this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7{}};var e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};t[i].call(s.exports,s,s.exports,r);return s.exports}(()=>{r.d=(t,e)=>{for(var i in e)if(r.o(e,i)&&!r.o(t,i))Object.defineProperty(t,i,{enumerable:true,get:e[i]});};})();(()=>{r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}();})();(()=>{r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);})();(()=>{r.r=t=>{if("undefined"!==typeof Symbol&&Symbol.toStringTag)Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:true});};})();var i=r(5987);return i})()})); + +}); + +var GtPush = /*@__PURE__*/getDefaultExportFromCjs(gtpushMin); + +if (process.env.UNI_PUSH_DEBUG) { + GtPush.setDebugMode(true); +} +GtPush.init({ + appid: process.env.UNI_PUSH_APP_ID, + onClientId: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'clientId', + cid: res.cid, + }); + }, + onlineState: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'lineState', + online: res.online, + }); + }, + onPushMsg: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'pushMsg', + message: res.message, + }); + }, +}); diff --git a/packages/uni-push/dist/uni-push.plus.es.js b/packages/uni-push/dist/uni-push.plus.es.js new file mode 100644 index 0000000000000000000000000000000000000000..2253920926b067a4473d289530bccac60823a254 --- /dev/null +++ b/packages/uni-push/dist/uni-push.plus.es.js @@ -0,0 +1,17 @@ +Promise.resolve().then(() => { + const info = plus.push.getClientInfo(); + if (info.clientid) { + // @ts-expect-error + uni.invokePushCallback({ + type: 'clientId', + cid: info.clientid, + }); + } + plus.push.addEventListener('receive', (result) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'pushMsg', + message: result, + }); + }); +}); diff --git a/packages/uni-push/lib/gtpush-min.d.ts b/packages/uni-push/lib/gtpush-min.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8885e9c5957690160b438f498b0c9d896a33fa71 --- /dev/null +++ b/packages/uni-push/lib/gtpush-min.d.ts @@ -0,0 +1,29 @@ +declare namespace GtPush { + /** + * 设置调试模式 + * @param debugMode 打开或关闭调试模式 + */ + function setDebugMode(debugMode: boolean): void + /** + * 初始化GtPush + */ + function init(obj: { + /** + * 个推官网生成的appid + */ + appid: string + /** + * 个推终端ID回调,标识当前终端和应用 + */ + onClientId?: (res: { cid: string }) => void + /** + * 个推终端ID在线状态回调 + */ + onlineState?: (res: { online: boolean }) => void + /** + * 推送消息回调 + */ + onPushMsg?: (res: { message: string }) => void + }): void +} +export default GtPush diff --git a/packages/uni-push/lib/gtpush-min.js b/packages/uni-push/lib/gtpush-min.js new file mode 100644 index 0000000000000000000000000000000000000000..dfdd774134bf2a6bad5d9a5cb35261ecf5cbf194 --- /dev/null +++ b/packages/uni-push/lib/gtpush-min.js @@ -0,0 +1,9224 @@ +/*! For license information please see gtpush-min.js.LICENSE.txt */ +;(function t(e, r) { + if ('object' === typeof exports && 'object' === typeof module) + module.exports = r() + else if ('function' === typeof define && define.amd) define([], r) + else if ('object' === typeof exports) exports['gtpush'] = r() + else e['gtpush'] = r() +})(self, function () { + return (() => { + var t = { + 452: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n(r(8249), r(8269), r(8214), r(888), r(5109)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.BlockCipher + var n = e.algo + var s = [] + var a = [] + var o = [] + var u = [] + var c = [] + var l = [] + var f = [] + var h = [] + var d = [] + var v = [] + ;(function () { + var t = [] + for (var e = 0; e < 256; e++) + if (e < 128) t[e] = e << 1 + else t[e] = (e << 1) ^ 283 + var r = 0 + var i = 0 + for (var e = 0; e < 256; e++) { + var n = i ^ (i << 1) ^ (i << 2) ^ (i << 3) ^ (i << 4) + n = (n >>> 8) ^ (255 & n) ^ 99 + s[r] = n + a[n] = r + var p = t[r] + var g = t[p] + var y = t[g] + var m = (257 * t[n]) ^ (16843008 * n) + o[r] = (m << 24) | (m >>> 8) + u[r] = (m << 16) | (m >>> 16) + c[r] = (m << 8) | (m >>> 24) + l[r] = m + var m = + (16843009 * y) ^ (65537 * g) ^ (257 * p) ^ (16843008 * r) + f[n] = (m << 24) | (m >>> 8) + h[n] = (m << 16) | (m >>> 16) + d[n] = (m << 8) | (m >>> 24) + v[n] = m + if (!r) r = i = 1 + else { + r = p ^ t[t[t[y ^ p]]] + i ^= t[t[i]] + } + } + })() + var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54] + var g = (n.AES = i.extend({ + _doReset: function () { + var t + if (this._nRounds && this._keyPriorReset === this._key) return + var e = (this._keyPriorReset = this._key) + var r = e.words + var i = e.sigBytes / 4 + var n = (this._nRounds = i + 6) + var a = 4 * (n + 1) + var o = (this._keySchedule = []) + for (var u = 0; u < a; u++) + if (u < i) o[u] = r[u] + else { + t = o[u - 1] + if (!(u % i)) { + t = (t << 8) | (t >>> 24) + t = + (s[t >>> 24] << 24) | + (s[(t >>> 16) & 255] << 16) | + (s[(t >>> 8) & 255] << 8) | + s[255 & t] + t ^= p[(u / i) | 0] << 24 + } else if (i > 6 && u % i == 4) + t = + (s[t >>> 24] << 24) | + (s[(t >>> 16) & 255] << 16) | + (s[(t >>> 8) & 255] << 8) | + s[255 & t] + o[u] = o[u - i] ^ t + } + var c = (this._invKeySchedule = []) + for (var l = 0; l < a; l++) { + var u = a - l + if (l % 4) var t = o[u] + else var t = o[u - 4] + if (l < 4 || u <= 4) c[l] = t + else + c[l] = + f[s[t >>> 24]] ^ + h[s[(t >>> 16) & 255]] ^ + d[s[(t >>> 8) & 255]] ^ + v[s[255 & t]] + } + }, + encryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._keySchedule, o, u, c, l, s) + }, + decryptBlock: function (t, e) { + var r = t[e + 1] + t[e + 1] = t[e + 3] + t[e + 3] = r + this._doCryptBlock(t, e, this._invKeySchedule, f, h, d, v, a) + var r = t[e + 1] + t[e + 1] = t[e + 3] + t[e + 3] = r + }, + _doCryptBlock: function (t, e, r, i, n, s, a, o) { + var u = this._nRounds + var c = t[e] ^ r[0] + var l = t[e + 1] ^ r[1] + var f = t[e + 2] ^ r[2] + var h = t[e + 3] ^ r[3] + var d = 4 + for (var v = 1; v < u; v++) { + var p = + i[c >>> 24] ^ + n[(l >>> 16) & 255] ^ + s[(f >>> 8) & 255] ^ + a[255 & h] ^ + r[d++] + var g = + i[l >>> 24] ^ + n[(f >>> 16) & 255] ^ + s[(h >>> 8) & 255] ^ + a[255 & c] ^ + r[d++] + var y = + i[f >>> 24] ^ + n[(h >>> 16) & 255] ^ + s[(c >>> 8) & 255] ^ + a[255 & l] ^ + r[d++] + var m = + i[h >>> 24] ^ + n[(c >>> 16) & 255] ^ + s[(l >>> 8) & 255] ^ + a[255 & f] ^ + r[d++] + c = p + l = g + f = y + h = m + } + var p = + ((o[c >>> 24] << 24) | + (o[(l >>> 16) & 255] << 16) | + (o[(f >>> 8) & 255] << 8) | + o[255 & h]) ^ + r[d++] + var g = + ((o[l >>> 24] << 24) | + (o[(f >>> 16) & 255] << 16) | + (o[(h >>> 8) & 255] << 8) | + o[255 & c]) ^ + r[d++] + var y = + ((o[f >>> 24] << 24) | + (o[(h >>> 16) & 255] << 16) | + (o[(c >>> 8) & 255] << 8) | + o[255 & l]) ^ + r[d++] + var m = + ((o[h >>> 24] << 24) | + (o[(c >>> 16) & 255] << 16) | + (o[(l >>> 8) & 255] << 8) | + o[255 & f]) ^ + r[d++] + t[e] = p + t[e + 1] = g + t[e + 2] = y + t[e + 3] = m + }, + keySize: 256 / 32, + })) + e.AES = i._createHelper(g) + })() + return t.AES + }) + }, + 5109: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(888)) + })(this, function (t) { + t.lib.Cipher || + (function (e) { + var r = t + var i = r.lib + var n = i.Base + var s = i.WordArray + var a = i.BufferedBlockAlgorithm + var o = r.enc + var u = o.Utf8 + var c = o.Base64 + var l = r.algo + var f = l.EvpKDF + var h = (i.Cipher = a.extend({ + cfg: n.extend(), + createEncryptor: function (t, e) { + return this.create(this._ENC_XFORM_MODE, t, e) + }, + createDecryptor: function (t, e) { + return this.create(this._DEC_XFORM_MODE, t, e) + }, + init: function (t, e, r) { + this.cfg = this.cfg.extend(r) + this._xformMode = t + this._key = e + this.reset() + }, + reset: function () { + a.reset.call(this) + this._doReset() + }, + process: function (t) { + this._append(t) + return this._process() + }, + finalize: function (t) { + if (t) this._append(t) + var e = this._doFinalize() + return e + }, + keySize: 128 / 32, + ivSize: 128 / 32, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + _createHelper: (function () { + function t(t) { + if ('string' == typeof t) return A + else return w + } + return function (e) { + return { + encrypt: function (r, i, n) { + return t(i).encrypt(e, r, i, n) + }, + decrypt: function (r, i, n) { + return t(i).decrypt(e, r, i, n) + }, + } + } + })(), + })) + var d = (i.StreamCipher = h.extend({ + _doFinalize: function () { + var t = this._process(!!'flush') + return t + }, + blockSize: 1, + })) + var v = (r.mode = {}) + var p = (i.BlockCipherMode = n.extend({ + createEncryptor: function (t, e) { + return this.Encryptor.create(t, e) + }, + createDecryptor: function (t, e) { + return this.Decryptor.create(t, e) + }, + init: function (t, e) { + this._cipher = t + this._iv = e + }, + })) + var g = (v.CBC = (function () { + var t = p.extend() + t.Encryptor = t.extend({ + processBlock: function (t, e) { + var i = this._cipher + var n = i.blockSize + r.call(this, t, e, n) + i.encryptBlock(t, e) + this._prevBlock = t.slice(e, e + n) + }, + }) + t.Decryptor = t.extend({ + processBlock: function (t, e) { + var i = this._cipher + var n = i.blockSize + var s = t.slice(e, e + n) + i.decryptBlock(t, e) + r.call(this, t, e, n) + this._prevBlock = s + }, + }) + function r(t, r, i) { + var n + var s = this._iv + if (s) { + n = s + this._iv = e + } else n = this._prevBlock + for (var a = 0; a < i; a++) t[r + a] ^= n[a] + } + return t + })()) + var y = (r.pad = {}) + var m = (y.Pkcs7 = { + pad: function (t, e) { + var r = 4 * e + var i = r - (t.sigBytes % r) + var n = (i << 24) | (i << 16) | (i << 8) | i + var a = [] + for (var o = 0; o < i; o += 4) a.push(n) + var u = s.create(a, i) + t.concat(u) + }, + unpad: function (t) { + var e = 255 & t.words[(t.sigBytes - 1) >>> 2] + t.sigBytes -= e + }, + }) + var _ = (i.BlockCipher = h.extend({ + cfg: h.cfg.extend({ mode: g, padding: m }), + reset: function () { + var t + h.reset.call(this) + var e = this.cfg + var r = e.iv + var i = e.mode + if (this._xformMode == this._ENC_XFORM_MODE) + t = i.createEncryptor + else { + t = i.createDecryptor + this._minBufferSize = 1 + } + if (this._mode && this._mode.__creator == t) + this._mode.init(this, r && r.words) + else { + this._mode = t.call(i, this, r && r.words) + this._mode.__creator = t + } + }, + _doProcessBlock: function (t, e) { + this._mode.processBlock(t, e) + }, + _doFinalize: function () { + var t + var e = this.cfg.padding + if (this._xformMode == this._ENC_XFORM_MODE) { + e.pad(this._data, this.blockSize) + t = this._process(!!'flush') + } else { + t = this._process(!!'flush') + e.unpad(t) + } + return t + }, + blockSize: 128 / 32, + })) + var S = (i.CipherParams = n.extend({ + init: function (t) { + this.mixIn(t) + }, + toString: function (t) { + return (t || this.formatter).stringify(this) + }, + })) + var E = (r.format = {}) + var b = (E.OpenSSL = { + stringify: function (t) { + var e + var r = t.ciphertext + var i = t.salt + if (i) + e = s.create([1398893684, 1701076831]).concat(i).concat(r) + else e = r + return e.toString(c) + }, + parse: function (t) { + var e + var r = c.parse(t) + var i = r.words + if (1398893684 == i[0] && 1701076831 == i[1]) { + e = s.create(i.slice(2, 4)) + i.splice(0, 4) + r.sigBytes -= 16 + } + return S.create({ ciphertext: r, salt: e }) + }, + }) + var w = (i.SerializableCipher = n.extend({ + cfg: n.extend({ format: b }), + encrypt: function (t, e, r, i) { + i = this.cfg.extend(i) + var n = t.createEncryptor(r, i) + var s = n.finalize(e) + var a = n.cfg + return S.create({ + ciphertext: s, + key: r, + iv: a.iv, + algorithm: t, + mode: a.mode, + padding: a.padding, + blockSize: t.blockSize, + formatter: i.format, + }) + }, + decrypt: function (t, e, r, i) { + i = this.cfg.extend(i) + e = this._parse(e, i.format) + var n = t.createDecryptor(r, i).finalize(e.ciphertext) + return n + }, + _parse: function (t, e) { + if ('string' == typeof t) return e.parse(t, this) + else return t + }, + })) + var D = (r.kdf = {}) + var T = (D.OpenSSL = { + execute: function (t, e, r, i) { + if (!i) i = s.random(64 / 8) + var n = f.create({ keySize: e + r }).compute(t, i) + var a = s.create(n.words.slice(e), 4 * r) + n.sigBytes = 4 * e + return S.create({ key: n, iv: a, salt: i }) + }, + }) + var A = (i.PasswordBasedCipher = w.extend({ + cfg: w.cfg.extend({ kdf: T }), + encrypt: function (t, e, r, i) { + i = this.cfg.extend(i) + var n = i.kdf.execute(r, t.keySize, t.ivSize) + i.iv = n.iv + var s = w.encrypt.call(this, t, e, n.key, i) + s.mixIn(n) + return s + }, + decrypt: function (t, e, r, i) { + i = this.cfg.extend(i) + e = this._parse(e, i.format) + var n = i.kdf.execute(r, t.keySize, t.ivSize, e.salt) + i.iv = n.iv + var s = w.decrypt.call(this, t, e, n.key, i) + return s + }, + })) + })() + }) + }, + 8249: function (t, e, r) { + ;(function (r, i) { + if (true) t.exports = e = i() + })(this, function () { + var t = + t || + (function (t, e) { + var i + if ('undefined' !== typeof window && window.crypto) + i = window.crypto + if ('undefined' !== typeof self && self.crypto) i = self.crypto + if ('undefined' !== typeof globalThis && globalThis.crypto) + i = globalThis.crypto + if (!i && 'undefined' !== typeof window && window.msCrypto) + i = window.msCrypto + if (!i && 'undefined' !== typeof r.g && r.g.crypto) i = r.g.crypto + if (!i && 'function' === 'function') + try { + i = r(2480) + } catch (t) {} + var n = function () { + if (i) { + if ('function' === typeof i.getRandomValues) + try { + return i.getRandomValues(new Uint32Array(1))[0] + } catch (t) {} + if ('function' === typeof i.randomBytes) + try { + return i.randomBytes(4).readInt32LE() + } catch (t) {} + } + throw new Error( + 'Native crypto module could not be used to get secure random number.' + ) + } + var s = + Object.create || + (function () { + function t() {} + return function (e) { + var r + t.prototype = e + r = new t() + t.prototype = null + return r + } + })() + var a = {} + var o = (a.lib = {}) + var u = (o.Base = (function () { + return { + extend: function (t) { + var e = s(this) + if (t) e.mixIn(t) + if (!e.hasOwnProperty('init') || this.init === e.init) + e.init = function () { + e.$super.init.apply(this, arguments) + } + e.init.prototype = e + e.$super = this + return e + }, + create: function () { + var t = this.extend() + t.init.apply(t, arguments) + return t + }, + init: function () {}, + mixIn: function (t) { + for (var e in t) if (t.hasOwnProperty(e)) this[e] = t[e] + if (t.hasOwnProperty('toString')) this.toString = t.toString + }, + clone: function () { + return this.init.prototype.extend(this) + }, + } + })()) + var c = (o.WordArray = u.extend({ + init: function (t, r) { + t = this.words = t || [] + if (r != e) this.sigBytes = r + else this.sigBytes = 4 * t.length + }, + toString: function (t) { + return (t || f).stringify(this) + }, + concat: function (t) { + var e = this.words + var r = t.words + var i = this.sigBytes + var n = t.sigBytes + this.clamp() + if (i % 4) + for (var s = 0; s < n; s++) { + var a = (r[s >>> 2] >>> (24 - (s % 4) * 8)) & 255 + e[(i + s) >>> 2] |= a << (24 - ((i + s) % 4) * 8) + } + else + for (var o = 0; o < n; o += 4) e[(i + o) >>> 2] = r[o >>> 2] + this.sigBytes += n + return this + }, + clamp: function () { + var e = this.words + var r = this.sigBytes + e[r >>> 2] &= 4294967295 << (32 - (r % 4) * 8) + e.length = t.ceil(r / 4) + }, + clone: function () { + var t = u.clone.call(this) + t.words = this.words.slice(0) + return t + }, + random: function (t) { + var e = [] + for (var r = 0; r < t; r += 4) e.push(n()) + return new c.init(e, t) + }, + })) + var l = (a.enc = {}) + var f = (l.Hex = { + stringify: function (t) { + var e = t.words + var r = t.sigBytes + var i = [] + for (var n = 0; n < r; n++) { + var s = (e[n >>> 2] >>> (24 - (n % 4) * 8)) & 255 + i.push((s >>> 4).toString(16)) + i.push((15 & s).toString(16)) + } + return i.join('') + }, + parse: function (t) { + var e = t.length + var r = [] + for (var i = 0; i < e; i += 2) + r[i >>> 3] |= + parseInt(t.substr(i, 2), 16) << (24 - (i % 8) * 4) + return new c.init(r, e / 2) + }, + }) + var h = (l.Latin1 = { + stringify: function (t) { + var e = t.words + var r = t.sigBytes + var i = [] + for (var n = 0; n < r; n++) { + var s = (e[n >>> 2] >>> (24 - (n % 4) * 8)) & 255 + i.push(String.fromCharCode(s)) + } + return i.join('') + }, + parse: function (t) { + var e = t.length + var r = [] + for (var i = 0; i < e; i++) + r[i >>> 2] |= (255 & t.charCodeAt(i)) << (24 - (i % 4) * 8) + return new c.init(r, e) + }, + }) + var d = (l.Utf8 = { + stringify: function (t) { + try { + return decodeURIComponent(escape(h.stringify(t))) + } catch (t) { + throw new Error('Malformed UTF-8 data') + } + }, + parse: function (t) { + return h.parse(unescape(encodeURIComponent(t))) + }, + }) + var v = (o.BufferedBlockAlgorithm = u.extend({ + reset: function () { + this._data = new c.init() + this._nDataBytes = 0 + }, + _append: function (t) { + if ('string' == typeof t) t = d.parse(t) + this._data.concat(t) + this._nDataBytes += t.sigBytes + }, + _process: function (e) { + var r + var i = this._data + var n = i.words + var s = i.sigBytes + var a = this.blockSize + var o = 4 * a + var u = s / o + if (e) u = t.ceil(u) + else u = t.max((0 | u) - this._minBufferSize, 0) + var l = u * a + var f = t.min(4 * l, s) + if (l) { + for (var h = 0; h < l; h += a) this._doProcessBlock(n, h) + r = n.splice(0, l) + i.sigBytes -= f + } + return new c.init(r, f) + }, + clone: function () { + var t = u.clone.call(this) + t._data = this._data.clone() + return t + }, + _minBufferSize: 0, + })) + var p = (o.Hasher = v.extend({ + cfg: u.extend(), + init: function (t) { + this.cfg = this.cfg.extend(t) + this.reset() + }, + reset: function () { + v.reset.call(this) + this._doReset() + }, + update: function (t) { + this._append(t) + this._process() + return this + }, + finalize: function (t) { + if (t) this._append(t) + var e = this._doFinalize() + return e + }, + blockSize: 512 / 32, + _createHelper: function (t) { + return function (e, r) { + return new t.init(r).finalize(e) + } + }, + _createHmacHelper: function (t) { + return function (e, r) { + return new g.HMAC.init(t, r).finalize(e) + } + }, + })) + var g = (a.algo = {}) + return a + })(Math) + return t + }) + }, + 8269: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = e.enc + var s = (n.Base64 = { + stringify: function (t) { + var e = t.words + var r = t.sigBytes + var i = this._map + t.clamp() + var n = [] + for (var s = 0; s < r; s += 3) { + var a = (e[s >>> 2] >>> (24 - (s % 4) * 8)) & 255 + var o = (e[(s + 1) >>> 2] >>> (24 - ((s + 1) % 4) * 8)) & 255 + var u = (e[(s + 2) >>> 2] >>> (24 - ((s + 2) % 4) * 8)) & 255 + var c = (a << 16) | (o << 8) | u + for (var l = 0; l < 4 && s + 0.75 * l < r; l++) + n.push(i.charAt((c >>> (6 * (3 - l))) & 63)) + } + var f = i.charAt(64) + if (f) while (n.length % 4) n.push(f) + return n.join('') + }, + parse: function (t) { + var e = t.length + var r = this._map + var i = this._reverseMap + if (!i) { + i = this._reverseMap = [] + for (var n = 0; n < r.length; n++) i[r.charCodeAt(n)] = n + } + var s = r.charAt(64) + if (s) { + var o = t.indexOf(s) + if (-1 !== o) e = o + } + return a(t, e, i) + }, + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + }) + function a(t, e, r) { + var n = [] + var s = 0 + for (var a = 0; a < e; a++) + if (a % 4) { + var o = r[t.charCodeAt(a - 1)] << ((a % 4) * 2) + var u = r[t.charCodeAt(a)] >>> (6 - (a % 4) * 2) + var c = o | u + n[s >>> 2] |= c << (24 - (s % 4) * 8) + s++ + } + return i.create(n, s) + } + })() + return t.enc.Base64 + }) + }, + 3786: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = e.enc + var s = (n.Base64url = { + stringify: function (t, e = true) { + var r = t.words + var i = t.sigBytes + var n = e ? this._safe_map : this._map + t.clamp() + var s = [] + for (var a = 0; a < i; a += 3) { + var o = (r[a >>> 2] >>> (24 - (a % 4) * 8)) & 255 + var u = (r[(a + 1) >>> 2] >>> (24 - ((a + 1) % 4) * 8)) & 255 + var c = (r[(a + 2) >>> 2] >>> (24 - ((a + 2) % 4) * 8)) & 255 + var l = (o << 16) | (u << 8) | c + for (var f = 0; f < 4 && a + 0.75 * f < i; f++) + s.push(n.charAt((l >>> (6 * (3 - f))) & 63)) + } + var h = n.charAt(64) + if (h) while (s.length % 4) s.push(h) + return s.join('') + }, + parse: function (t, e = true) { + var r = t.length + var i = e ? this._safe_map : this._map + var n = this._reverseMap + if (!n) { + n = this._reverseMap = [] + for (var s = 0; s < i.length; s++) n[i.charCodeAt(s)] = s + } + var o = i.charAt(64) + if (o) { + var u = t.indexOf(o) + if (-1 !== u) r = u + } + return a(t, r, n) + }, + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + _safe_map: + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + }) + function a(t, e, r) { + var n = [] + var s = 0 + for (var a = 0; a < e; a++) + if (a % 4) { + var o = r[t.charCodeAt(a - 1)] << ((a % 4) * 2) + var u = r[t.charCodeAt(a)] >>> (6 - (a % 4) * 2) + var c = o | u + n[s >>> 2] |= c << (24 - (s % 4) * 8) + s++ + } + return i.create(n, s) + } + })() + return t.enc.Base64url + }) + }, + 298: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = e.enc + var s = + (n.Utf16 = + n.Utf16BE = + { + stringify: function (t) { + var e = t.words + var r = t.sigBytes + var i = [] + for (var n = 0; n < r; n += 2) { + var s = (e[n >>> 2] >>> (16 - (n % 4) * 8)) & 65535 + i.push(String.fromCharCode(s)) + } + return i.join('') + }, + parse: function (t) { + var e = t.length + var r = [] + for (var n = 0; n < e; n++) + r[n >>> 1] |= t.charCodeAt(n) << (16 - (n % 2) * 16) + return i.create(r, 2 * e) + }, + }) + n.Utf16LE = { + stringify: function (t) { + var e = t.words + var r = t.sigBytes + var i = [] + for (var n = 0; n < r; n += 2) { + var s = a((e[n >>> 2] >>> (16 - (n % 4) * 8)) & 65535) + i.push(String.fromCharCode(s)) + } + return i.join('') + }, + parse: function (t) { + var e = t.length + var r = [] + for (var n = 0; n < e; n++) + r[n >>> 1] |= a(t.charCodeAt(n) << (16 - (n % 2) * 16)) + return i.create(r, 2 * e) + }, + } + function a(t) { + return ((t << 8) & 4278255360) | ((t >>> 8) & 16711935) + } + })() + return t.enc.Utf16 + }) + }, + 888: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(2783), r(9824)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.Base + var n = r.WordArray + var s = e.algo + var a = s.MD5 + var o = (s.EvpKDF = i.extend({ + cfg: i.extend({ keySize: 128 / 32, hasher: a, iterations: 1 }), + init: function (t) { + this.cfg = this.cfg.extend(t) + }, + compute: function (t, e) { + var r + var i = this.cfg + var s = i.hasher.create() + var a = n.create() + var o = a.words + var u = i.keySize + var c = i.iterations + while (o.length < u) { + if (r) s.update(r) + r = s.update(t).finalize(e) + s.reset() + for (var l = 1; l < c; l++) { + r = s.finalize(r) + s.reset() + } + a.concat(r) + } + a.sigBytes = 4 * u + return a + }, + })) + e.EvpKDF = function (t, e, r) { + return o.create(r).compute(t, e) + } + })() + return t.EvpKDF + }) + }, + 2209: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.CipherParams + var s = r.enc + var a = s.Hex + var o = r.format + var u = (o.Hex = { + stringify: function (t) { + return t.ciphertext.toString(a) + }, + parse: function (t) { + var e = a.parse(t) + return n.create({ ciphertext: e }) + }, + }) + })() + return t.format.Hex + }) + }, + 9824: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.Base + var n = e.enc + var s = n.Utf8 + var a = e.algo + var o = (a.HMAC = i.extend({ + init: function (t, e) { + t = this._hasher = new t.init() + if ('string' == typeof e) e = s.parse(e) + var r = t.blockSize + var i = 4 * r + if (e.sigBytes > i) e = t.finalize(e) + e.clamp() + var n = (this._oKey = e.clone()) + var a = (this._iKey = e.clone()) + var o = n.words + var u = a.words + for (var c = 0; c < r; c++) { + o[c] ^= 1549556828 + u[c] ^= 909522486 + } + n.sigBytes = a.sigBytes = i + this.reset() + }, + reset: function () { + var t = this._hasher + t.reset() + t.update(this._iKey) + }, + update: function (t) { + this._hasher.update(t) + return this + }, + finalize: function (t) { + var e = this._hasher + var r = e.finalize(t) + e.reset() + var i = e.finalize(this._oKey.clone().concat(r)) + return i + }, + })) + })() + }) + }, + 1354: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n( + r(8249), + r(4938), + r(4433), + r(298), + r(8269), + r(3786), + r(8214), + r(2783), + r(2153), + r(7792), + r(34), + r(7460), + r(3327), + r(706), + r(9824), + r(2112), + r(888), + r(5109), + r(8568), + r(4242), + r(9968), + r(7660), + r(1148), + r(3615), + r(2807), + r(1077), + r(6475), + r(6991), + r(2209), + r(452), + r(4253), + r(1857), + r(4454), + r(3974) + ) + })(this, function (t) { + return t + }) + }, + 4433: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + if ('function' != typeof ArrayBuffer) return + var e = t + var r = e.lib + var i = r.WordArray + var n = i.init + var s = (i.init = function (t) { + if (t instanceof ArrayBuffer) t = new Uint8Array(t) + if ( + t instanceof Int8Array || + ('undefined' !== typeof Uint8ClampedArray && + t instanceof Uint8ClampedArray) || + t instanceof Int16Array || + t instanceof Uint16Array || + t instanceof Int32Array || + t instanceof Uint32Array || + t instanceof Float32Array || + t instanceof Float64Array + ) + t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength) + if (t instanceof Uint8Array) { + var e = t.byteLength + var r = [] + for (var i = 0; i < e; i++) + r[i >>> 2] |= t[i] << (24 - (i % 4) * 8) + n.call(this, r, e) + } else n.apply(this, arguments) + }) + s.prototype = i + })() + return t.lib.WordArray + }) + }, + 8214: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.WordArray + var s = i.Hasher + var a = r.algo + var o = [] + ;(function () { + for (var t = 0; t < 64; t++) + o[t] = (4294967296 * e.abs(e.sin(t + 1))) | 0 + })() + var u = (a.MD5 = s.extend({ + _doReset: function () { + this._hash = new n.init([ + 1732584193, 4023233417, 2562383102, 271733878, + ]) + }, + _doProcessBlock: function (t, e) { + for (var r = 0; r < 16; r++) { + var i = e + r + var n = t[i] + t[i] = + (16711935 & ((n << 8) | (n >>> 24))) | + (4278255360 & ((n << 24) | (n >>> 8))) + } + var s = this._hash.words + var a = t[e + 0] + var u = t[e + 1] + var d = t[e + 2] + var v = t[e + 3] + var p = t[e + 4] + var g = t[e + 5] + var y = t[e + 6] + var m = t[e + 7] + var _ = t[e + 8] + var S = t[e + 9] + var E = t[e + 10] + var b = t[e + 11] + var w = t[e + 12] + var D = t[e + 13] + var T = t[e + 14] + var A = t[e + 15] + var M = s[0] + var I = s[1] + var R = s[2] + var x = s[3] + M = c(M, I, R, x, a, 7, o[0]) + x = c(x, M, I, R, u, 12, o[1]) + R = c(R, x, M, I, d, 17, o[2]) + I = c(I, R, x, M, v, 22, o[3]) + M = c(M, I, R, x, p, 7, o[4]) + x = c(x, M, I, R, g, 12, o[5]) + R = c(R, x, M, I, y, 17, o[6]) + I = c(I, R, x, M, m, 22, o[7]) + M = c(M, I, R, x, _, 7, o[8]) + x = c(x, M, I, R, S, 12, o[9]) + R = c(R, x, M, I, E, 17, o[10]) + I = c(I, R, x, M, b, 22, o[11]) + M = c(M, I, R, x, w, 7, o[12]) + x = c(x, M, I, R, D, 12, o[13]) + R = c(R, x, M, I, T, 17, o[14]) + I = c(I, R, x, M, A, 22, o[15]) + M = l(M, I, R, x, u, 5, o[16]) + x = l(x, M, I, R, y, 9, o[17]) + R = l(R, x, M, I, b, 14, o[18]) + I = l(I, R, x, M, a, 20, o[19]) + M = l(M, I, R, x, g, 5, o[20]) + x = l(x, M, I, R, E, 9, o[21]) + R = l(R, x, M, I, A, 14, o[22]) + I = l(I, R, x, M, p, 20, o[23]) + M = l(M, I, R, x, S, 5, o[24]) + x = l(x, M, I, R, T, 9, o[25]) + R = l(R, x, M, I, v, 14, o[26]) + I = l(I, R, x, M, _, 20, o[27]) + M = l(M, I, R, x, D, 5, o[28]) + x = l(x, M, I, R, d, 9, o[29]) + R = l(R, x, M, I, m, 14, o[30]) + I = l(I, R, x, M, w, 20, o[31]) + M = f(M, I, R, x, g, 4, o[32]) + x = f(x, M, I, R, _, 11, o[33]) + R = f(R, x, M, I, b, 16, o[34]) + I = f(I, R, x, M, T, 23, o[35]) + M = f(M, I, R, x, u, 4, o[36]) + x = f(x, M, I, R, p, 11, o[37]) + R = f(R, x, M, I, m, 16, o[38]) + I = f(I, R, x, M, E, 23, o[39]) + M = f(M, I, R, x, D, 4, o[40]) + x = f(x, M, I, R, a, 11, o[41]) + R = f(R, x, M, I, v, 16, o[42]) + I = f(I, R, x, M, y, 23, o[43]) + M = f(M, I, R, x, S, 4, o[44]) + x = f(x, M, I, R, w, 11, o[45]) + R = f(R, x, M, I, A, 16, o[46]) + I = f(I, R, x, M, d, 23, o[47]) + M = h(M, I, R, x, a, 6, o[48]) + x = h(x, M, I, R, m, 10, o[49]) + R = h(R, x, M, I, T, 15, o[50]) + I = h(I, R, x, M, g, 21, o[51]) + M = h(M, I, R, x, w, 6, o[52]) + x = h(x, M, I, R, v, 10, o[53]) + R = h(R, x, M, I, E, 15, o[54]) + I = h(I, R, x, M, u, 21, o[55]) + M = h(M, I, R, x, _, 6, o[56]) + x = h(x, M, I, R, A, 10, o[57]) + R = h(R, x, M, I, y, 15, o[58]) + I = h(I, R, x, M, D, 21, o[59]) + M = h(M, I, R, x, p, 6, o[60]) + x = h(x, M, I, R, b, 10, o[61]) + R = h(R, x, M, I, d, 15, o[62]) + I = h(I, R, x, M, S, 21, o[63]) + s[0] = (s[0] + M) | 0 + s[1] = (s[1] + I) | 0 + s[2] = (s[2] + R) | 0 + s[3] = (s[3] + x) | 0 + }, + _doFinalize: function () { + var t = this._data + var r = t.words + var i = 8 * this._nDataBytes + var n = 8 * t.sigBytes + r[n >>> 5] |= 128 << (24 - (n % 32)) + var s = e.floor(i / 4294967296) + var a = i + r[(((n + 64) >>> 9) << 4) + 15] = + (16711935 & ((s << 8) | (s >>> 24))) | + (4278255360 & ((s << 24) | (s >>> 8))) + r[(((n + 64) >>> 9) << 4) + 14] = + (16711935 & ((a << 8) | (a >>> 24))) | + (4278255360 & ((a << 24) | (a >>> 8))) + t.sigBytes = 4 * (r.length + 1) + this._process() + var o = this._hash + var u = o.words + for (var c = 0; c < 4; c++) { + var l = u[c] + u[c] = + (16711935 & ((l << 8) | (l >>> 24))) | + (4278255360 & ((l << 24) | (l >>> 8))) + } + return o + }, + clone: function () { + var t = s.clone.call(this) + t._hash = this._hash.clone() + return t + }, + })) + function c(t, e, r, i, n, s, a) { + var o = t + ((e & r) | (~e & i)) + n + a + return ((o << s) | (o >>> (32 - s))) + e + } + function l(t, e, r, i, n, s, a) { + var o = t + ((e & i) | (r & ~i)) + n + a + return ((o << s) | (o >>> (32 - s))) + e + } + function f(t, e, r, i, n, s, a) { + var o = t + (e ^ r ^ i) + n + a + return ((o << s) | (o >>> (32 - s))) + e + } + function h(t, e, r, i, n, s, a) { + var o = t + (r ^ (e | ~i)) + n + a + return ((o << s) | (o >>> (32 - s))) + e + } + r.MD5 = s._createHelper(u) + r.HmacMD5 = s._createHmacHelper(u) + })(Math) + return t.MD5 + }) + }, + 8568: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.mode.CFB = (function () { + var e = t.lib.BlockCipherMode.extend() + e.Encryptor = e.extend({ + processBlock: function (t, e) { + var i = this._cipher + var n = i.blockSize + r.call(this, t, e, n, i) + this._prevBlock = t.slice(e, e + n) + }, + }) + e.Decryptor = e.extend({ + processBlock: function (t, e) { + var i = this._cipher + var n = i.blockSize + var s = t.slice(e, e + n) + r.call(this, t, e, n, i) + this._prevBlock = s + }, + }) + function r(t, e, r, i) { + var n + var s = this._iv + if (s) { + n = s.slice(0) + this._iv = void 0 + } else n = this._prevBlock + i.encryptBlock(n, 0) + for (var a = 0; a < r; a++) t[e + a] ^= n[a] + } + return e + })() + return t.mode.CFB + }) + }, + 9968: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.mode.CTRGladman = (function () { + var e = t.lib.BlockCipherMode.extend() + function r(t) { + if (255 === ((t >> 24) & 255)) { + var e = (t >> 16) & 255 + var r = (t >> 8) & 255 + var i = 255 & t + if (255 === e) { + e = 0 + if (255 === r) { + r = 0 + if (255 === i) i = 0 + else ++i + } else ++r + } else ++e + t = 0 + t += e << 16 + t += r << 8 + t += i + } else t += 1 << 24 + return t + } + function i(t) { + if (0 === (t[0] = r(t[0]))) t[1] = r(t[1]) + return t + } + var n = (e.Encryptor = e.extend({ + processBlock: function (t, e) { + var r = this._cipher + var n = r.blockSize + var s = this._iv + var a = this._counter + if (s) { + a = this._counter = s.slice(0) + this._iv = void 0 + } + i(a) + var o = a.slice(0) + r.encryptBlock(o, 0) + for (var u = 0; u < n; u++) t[e + u] ^= o[u] + }, + })) + e.Decryptor = n + return e + })() + return t.mode.CTRGladman + }) + }, + 4242: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.mode.CTR = (function () { + var e = t.lib.BlockCipherMode.extend() + var r = (e.Encryptor = e.extend({ + processBlock: function (t, e) { + var r = this._cipher + var i = r.blockSize + var n = this._iv + var s = this._counter + if (n) { + s = this._counter = n.slice(0) + this._iv = void 0 + } + var a = s.slice(0) + r.encryptBlock(a, 0) + s[i - 1] = (s[i - 1] + 1) | 0 + for (var o = 0; o < i; o++) t[e + o] ^= a[o] + }, + })) + e.Decryptor = r + return e + })() + return t.mode.CTR + }) + }, + 1148: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.mode.ECB = (function () { + var e = t.lib.BlockCipherMode.extend() + e.Encryptor = e.extend({ + processBlock: function (t, e) { + this._cipher.encryptBlock(t, e) + }, + }) + e.Decryptor = e.extend({ + processBlock: function (t, e) { + this._cipher.decryptBlock(t, e) + }, + }) + return e + })() + return t.mode.ECB + }) + }, + 7660: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.mode.OFB = (function () { + var e = t.lib.BlockCipherMode.extend() + var r = (e.Encryptor = e.extend({ + processBlock: function (t, e) { + var r = this._cipher + var i = r.blockSize + var n = this._iv + var s = this._keystream + if (n) { + s = this._keystream = n.slice(0) + this._iv = void 0 + } + r.encryptBlock(s, 0) + for (var a = 0; a < i; a++) t[e + a] ^= s[a] + }, + })) + e.Decryptor = r + return e + })() + return t.mode.OFB + }) + }, + 3615: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.pad.AnsiX923 = { + pad: function (t, e) { + var r = t.sigBytes + var i = 4 * e + var n = i - (r % i) + var s = r + n - 1 + t.clamp() + t.words[s >>> 2] |= n << (24 - (s % 4) * 8) + t.sigBytes += n + }, + unpad: function (t) { + var e = 255 & t.words[(t.sigBytes - 1) >>> 2] + t.sigBytes -= e + }, + } + return t.pad.Ansix923 + }) + }, + 2807: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.pad.Iso10126 = { + pad: function (e, r) { + var i = 4 * r + var n = i - (e.sigBytes % i) + e.concat(t.lib.WordArray.random(n - 1)).concat( + t.lib.WordArray.create([n << 24], 1) + ) + }, + unpad: function (t) { + var e = 255 & t.words[(t.sigBytes - 1) >>> 2] + t.sigBytes -= e + }, + } + return t.pad.Iso10126 + }) + }, + 1077: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.pad.Iso97971 = { + pad: function (e, r) { + e.concat(t.lib.WordArray.create([2147483648], 1)) + t.pad.ZeroPadding.pad(e, r) + }, + unpad: function (e) { + t.pad.ZeroPadding.unpad(e) + e.sigBytes-- + }, + } + return t.pad.Iso97971 + }) + }, + 6991: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.pad.NoPadding = { pad: function () {}, unpad: function () {} } + return t.pad.NoPadding + }) + }, + 6475: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(5109)) + })(this, function (t) { + t.pad.ZeroPadding = { + pad: function (t, e) { + var r = 4 * e + t.clamp() + t.sigBytes += r - (t.sigBytes % r || r) + }, + unpad: function (t) { + var e = t.words + var r = t.sigBytes - 1 + for (var r = t.sigBytes - 1; r >= 0; r--) + if ((e[r >>> 2] >>> (24 - (r % 4) * 8)) & 255) { + t.sigBytes = r + 1 + break + } + }, + } + return t.pad.ZeroPadding + }) + }, + 2112: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(2783), r(9824)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.Base + var n = r.WordArray + var s = e.algo + var a = s.SHA1 + var o = s.HMAC + var u = (s.PBKDF2 = i.extend({ + cfg: i.extend({ keySize: 128 / 32, hasher: a, iterations: 1 }), + init: function (t) { + this.cfg = this.cfg.extend(t) + }, + compute: function (t, e) { + var r = this.cfg + var i = o.create(r.hasher, t) + var s = n.create() + var a = n.create([1]) + var u = s.words + var c = a.words + var l = r.keySize + var f = r.iterations + while (u.length < l) { + var h = i.update(e).finalize(a) + i.reset() + var d = h.words + var v = d.length + var p = h + for (var g = 1; g < f; g++) { + p = i.finalize(p) + i.reset() + var y = p.words + for (var m = 0; m < v; m++) d[m] ^= y[m] + } + s.concat(h) + c[0]++ + } + s.sigBytes = 4 * l + return s + }, + })) + e.PBKDF2 = function (t, e, r) { + return u.create(r).compute(t, e) + } + })() + return t.PBKDF2 + }) + }, + 3974: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n(r(8249), r(8269), r(8214), r(888), r(5109)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.StreamCipher + var n = e.algo + var s = [] + var a = [] + var o = [] + var u = (n.RabbitLegacy = i.extend({ + _doReset: function () { + var t = this._key.words + var e = this.cfg.iv + var r = (this._X = [ + t[0], + (t[3] << 16) | (t[2] >>> 16), + t[1], + (t[0] << 16) | (t[3] >>> 16), + t[2], + (t[1] << 16) | (t[0] >>> 16), + t[3], + (t[2] << 16) | (t[1] >>> 16), + ]) + var i = (this._C = [ + (t[2] << 16) | (t[2] >>> 16), + (4294901760 & t[0]) | (65535 & t[1]), + (t[3] << 16) | (t[3] >>> 16), + (4294901760 & t[1]) | (65535 & t[2]), + (t[0] << 16) | (t[0] >>> 16), + (4294901760 & t[2]) | (65535 & t[3]), + (t[1] << 16) | (t[1] >>> 16), + (4294901760 & t[3]) | (65535 & t[0]), + ]) + this._b = 0 + for (var n = 0; n < 4; n++) c.call(this) + for (var n = 0; n < 8; n++) i[n] ^= r[(n + 4) & 7] + if (e) { + var s = e.words + var a = s[0] + var o = s[1] + var u = + (16711935 & ((a << 8) | (a >>> 24))) | + (4278255360 & ((a << 24) | (a >>> 8))) + var l = + (16711935 & ((o << 8) | (o >>> 24))) | + (4278255360 & ((o << 24) | (o >>> 8))) + var f = (u >>> 16) | (4294901760 & l) + var h = (l << 16) | (65535 & u) + i[0] ^= u + i[1] ^= f + i[2] ^= l + i[3] ^= h + i[4] ^= u + i[5] ^= f + i[6] ^= l + i[7] ^= h + for (var n = 0; n < 4; n++) c.call(this) + } + }, + _doProcessBlock: function (t, e) { + var r = this._X + c.call(this) + s[0] = r[0] ^ (r[5] >>> 16) ^ (r[3] << 16) + s[1] = r[2] ^ (r[7] >>> 16) ^ (r[5] << 16) + s[2] = r[4] ^ (r[1] >>> 16) ^ (r[7] << 16) + s[3] = r[6] ^ (r[3] >>> 16) ^ (r[1] << 16) + for (var i = 0; i < 4; i++) { + s[i] = + (16711935 & ((s[i] << 8) | (s[i] >>> 24))) | + (4278255360 & ((s[i] << 24) | (s[i] >>> 8))) + t[e + i] ^= s[i] + } + }, + blockSize: 128 / 32, + ivSize: 64 / 32, + })) + function c() { + var t = this._X + var e = this._C + for (var r = 0; r < 8; r++) a[r] = e[r] + e[0] = (e[0] + 1295307597 + this._b) | 0 + e[1] = (e[1] + 3545052371 + (e[0] >>> 0 < a[0] >>> 0 ? 1 : 0)) | 0 + e[2] = (e[2] + 886263092 + (e[1] >>> 0 < a[1] >>> 0 ? 1 : 0)) | 0 + e[3] = (e[3] + 1295307597 + (e[2] >>> 0 < a[2] >>> 0 ? 1 : 0)) | 0 + e[4] = (e[4] + 3545052371 + (e[3] >>> 0 < a[3] >>> 0 ? 1 : 0)) | 0 + e[5] = (e[5] + 886263092 + (e[4] >>> 0 < a[4] >>> 0 ? 1 : 0)) | 0 + e[6] = (e[6] + 1295307597 + (e[5] >>> 0 < a[5] >>> 0 ? 1 : 0)) | 0 + e[7] = (e[7] + 3545052371 + (e[6] >>> 0 < a[6] >>> 0 ? 1 : 0)) | 0 + this._b = e[7] >>> 0 < a[7] >>> 0 ? 1 : 0 + for (var r = 0; r < 8; r++) { + var i = t[r] + e[r] + var n = 65535 & i + var s = i >>> 16 + var u = ((((n * n) >>> 17) + n * s) >>> 15) + s * s + var c = (((4294901760 & i) * i) | 0) + (((65535 & i) * i) | 0) + o[r] = u ^ c + } + t[0] = + (o[0] + + ((o[7] << 16) | (o[7] >>> 16)) + + ((o[6] << 16) | (o[6] >>> 16))) | + 0 + t[1] = (o[1] + ((o[0] << 8) | (o[0] >>> 24)) + o[7]) | 0 + t[2] = + (o[2] + + ((o[1] << 16) | (o[1] >>> 16)) + + ((o[0] << 16) | (o[0] >>> 16))) | + 0 + t[3] = (o[3] + ((o[2] << 8) | (o[2] >>> 24)) + o[1]) | 0 + t[4] = + (o[4] + + ((o[3] << 16) | (o[3] >>> 16)) + + ((o[2] << 16) | (o[2] >>> 16))) | + 0 + t[5] = (o[5] + ((o[4] << 8) | (o[4] >>> 24)) + o[3]) | 0 + t[6] = + (o[6] + + ((o[5] << 16) | (o[5] >>> 16)) + + ((o[4] << 16) | (o[4] >>> 16))) | + 0 + t[7] = (o[7] + ((o[6] << 8) | (o[6] >>> 24)) + o[5]) | 0 + } + e.RabbitLegacy = i._createHelper(u) + })() + return t.RabbitLegacy + }) + }, + 4454: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n(r(8249), r(8269), r(8214), r(888), r(5109)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.StreamCipher + var n = e.algo + var s = [] + var a = [] + var o = [] + var u = (n.Rabbit = i.extend({ + _doReset: function () { + var t = this._key.words + var e = this.cfg.iv + for (var r = 0; r < 4; r++) + t[r] = + (16711935 & ((t[r] << 8) | (t[r] >>> 24))) | + (4278255360 & ((t[r] << 24) | (t[r] >>> 8))) + var i = (this._X = [ + t[0], + (t[3] << 16) | (t[2] >>> 16), + t[1], + (t[0] << 16) | (t[3] >>> 16), + t[2], + (t[1] << 16) | (t[0] >>> 16), + t[3], + (t[2] << 16) | (t[1] >>> 16), + ]) + var n = (this._C = [ + (t[2] << 16) | (t[2] >>> 16), + (4294901760 & t[0]) | (65535 & t[1]), + (t[3] << 16) | (t[3] >>> 16), + (4294901760 & t[1]) | (65535 & t[2]), + (t[0] << 16) | (t[0] >>> 16), + (4294901760 & t[2]) | (65535 & t[3]), + (t[1] << 16) | (t[1] >>> 16), + (4294901760 & t[3]) | (65535 & t[0]), + ]) + this._b = 0 + for (var r = 0; r < 4; r++) c.call(this) + for (var r = 0; r < 8; r++) n[r] ^= i[(r + 4) & 7] + if (e) { + var s = e.words + var a = s[0] + var o = s[1] + var u = + (16711935 & ((a << 8) | (a >>> 24))) | + (4278255360 & ((a << 24) | (a >>> 8))) + var l = + (16711935 & ((o << 8) | (o >>> 24))) | + (4278255360 & ((o << 24) | (o >>> 8))) + var f = (u >>> 16) | (4294901760 & l) + var h = (l << 16) | (65535 & u) + n[0] ^= u + n[1] ^= f + n[2] ^= l + n[3] ^= h + n[4] ^= u + n[5] ^= f + n[6] ^= l + n[7] ^= h + for (var r = 0; r < 4; r++) c.call(this) + } + }, + _doProcessBlock: function (t, e) { + var r = this._X + c.call(this) + s[0] = r[0] ^ (r[5] >>> 16) ^ (r[3] << 16) + s[1] = r[2] ^ (r[7] >>> 16) ^ (r[5] << 16) + s[2] = r[4] ^ (r[1] >>> 16) ^ (r[7] << 16) + s[3] = r[6] ^ (r[3] >>> 16) ^ (r[1] << 16) + for (var i = 0; i < 4; i++) { + s[i] = + (16711935 & ((s[i] << 8) | (s[i] >>> 24))) | + (4278255360 & ((s[i] << 24) | (s[i] >>> 8))) + t[e + i] ^= s[i] + } + }, + blockSize: 128 / 32, + ivSize: 64 / 32, + })) + function c() { + var t = this._X + var e = this._C + for (var r = 0; r < 8; r++) a[r] = e[r] + e[0] = (e[0] + 1295307597 + this._b) | 0 + e[1] = (e[1] + 3545052371 + (e[0] >>> 0 < a[0] >>> 0 ? 1 : 0)) | 0 + e[2] = (e[2] + 886263092 + (e[1] >>> 0 < a[1] >>> 0 ? 1 : 0)) | 0 + e[3] = (e[3] + 1295307597 + (e[2] >>> 0 < a[2] >>> 0 ? 1 : 0)) | 0 + e[4] = (e[4] + 3545052371 + (e[3] >>> 0 < a[3] >>> 0 ? 1 : 0)) | 0 + e[5] = (e[5] + 886263092 + (e[4] >>> 0 < a[4] >>> 0 ? 1 : 0)) | 0 + e[6] = (e[6] + 1295307597 + (e[5] >>> 0 < a[5] >>> 0 ? 1 : 0)) | 0 + e[7] = (e[7] + 3545052371 + (e[6] >>> 0 < a[6] >>> 0 ? 1 : 0)) | 0 + this._b = e[7] >>> 0 < a[7] >>> 0 ? 1 : 0 + for (var r = 0; r < 8; r++) { + var i = t[r] + e[r] + var n = 65535 & i + var s = i >>> 16 + var u = ((((n * n) >>> 17) + n * s) >>> 15) + s * s + var c = (((4294901760 & i) * i) | 0) + (((65535 & i) * i) | 0) + o[r] = u ^ c + } + t[0] = + (o[0] + + ((o[7] << 16) | (o[7] >>> 16)) + + ((o[6] << 16) | (o[6] >>> 16))) | + 0 + t[1] = (o[1] + ((o[0] << 8) | (o[0] >>> 24)) + o[7]) | 0 + t[2] = + (o[2] + + ((o[1] << 16) | (o[1] >>> 16)) + + ((o[0] << 16) | (o[0] >>> 16))) | + 0 + t[3] = (o[3] + ((o[2] << 8) | (o[2] >>> 24)) + o[1]) | 0 + t[4] = + (o[4] + + ((o[3] << 16) | (o[3] >>> 16)) + + ((o[2] << 16) | (o[2] >>> 16))) | + 0 + t[5] = (o[5] + ((o[4] << 8) | (o[4] >>> 24)) + o[3]) | 0 + t[6] = + (o[6] + + ((o[5] << 16) | (o[5] >>> 16)) + + ((o[4] << 16) | (o[4] >>> 16))) | + 0 + t[7] = (o[7] + ((o[6] << 8) | (o[6] >>> 24)) + o[5]) | 0 + } + e.Rabbit = i._createHelper(u) + })() + return t.Rabbit + }) + }, + 1857: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n(r(8249), r(8269), r(8214), r(888), r(5109)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.StreamCipher + var n = e.algo + var s = (n.RC4 = i.extend({ + _doReset: function () { + var t = this._key + var e = t.words + var r = t.sigBytes + var i = (this._S = []) + for (var n = 0; n < 256; n++) i[n] = n + for (var n = 0, s = 0; n < 256; n++) { + var a = n % r + var o = (e[a >>> 2] >>> (24 - (a % 4) * 8)) & 255 + s = (s + i[n] + o) % 256 + var u = i[n] + i[n] = i[s] + i[s] = u + } + this._i = this._j = 0 + }, + _doProcessBlock: function (t, e) { + t[e] ^= a.call(this) + }, + keySize: 256 / 32, + ivSize: 0, + })) + function a() { + var t = this._S + var e = this._i + var r = this._j + var i = 0 + for (var n = 0; n < 4; n++) { + e = (e + 1) % 256 + r = (r + t[e]) % 256 + var s = t[e] + t[e] = t[r] + t[r] = s + i |= t[(t[e] + t[r]) % 256] << (24 - 8 * n) + } + this._i = e + this._j = r + return i + } + e.RC4 = i._createHelper(s) + var o = (n.RC4Drop = s.extend({ + cfg: s.cfg.extend({ drop: 192 }), + _doReset: function () { + s._doReset.call(this) + for (var t = this.cfg.drop; t > 0; t--) a.call(this) + }, + })) + e.RC4Drop = i._createHelper(o) + })() + return t.RC4 + }) + }, + 706: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.WordArray + var s = i.Hasher + var a = r.algo + var o = n.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, + ]) + var u = n.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, + ]) + var c = n.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, + ]) + var l = n.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, + ]) + var f = n.create([ + 0, 1518500249, 1859775393, 2400959708, 2840853838, + ]) + var h = n.create([ + 1352829926, 1548603684, 1836072691, 2053994217, 0, + ]) + var d = (a.RIPEMD160 = s.extend({ + _doReset: function () { + this._hash = n.create([ + 1732584193, 4023233417, 2562383102, 271733878, 3285377520, + ]) + }, + _doProcessBlock: function (t, e) { + for (var r = 0; r < 16; r++) { + var i = e + r + var n = t[i] + t[i] = + (16711935 & ((n << 8) | (n >>> 24))) | + (4278255360 & ((n << 24) | (n >>> 8))) + } + var s = this._hash.words + var a = f.words + var d = h.words + var S = o.words + var E = u.words + var b = c.words + var w = l.words + var D, T, A, M, I + var R, x, B, C, O + R = D = s[0] + x = T = s[1] + B = A = s[2] + C = M = s[3] + O = I = s[4] + var k + for (var r = 0; r < 80; r += 1) { + k = (D + t[e + S[r]]) | 0 + if (r < 16) k += v(T, A, M) + a[0] + else if (r < 32) k += p(T, A, M) + a[1] + else if (r < 48) k += g(T, A, M) + a[2] + else if (r < 64) k += y(T, A, M) + a[3] + else k += m(T, A, M) + a[4] + k |= 0 + k = _(k, b[r]) + k = (k + I) | 0 + D = I + I = M + M = _(A, 10) + A = T + T = k + k = (R + t[e + E[r]]) | 0 + if (r < 16) k += m(x, B, C) + d[0] + else if (r < 32) k += y(x, B, C) + d[1] + else if (r < 48) k += g(x, B, C) + d[2] + else if (r < 64) k += p(x, B, C) + d[3] + else k += v(x, B, C) + d[4] + k |= 0 + k = _(k, w[r]) + k = (k + O) | 0 + R = O + O = C + C = _(B, 10) + B = x + x = k + } + k = (s[1] + A + C) | 0 + s[1] = (s[2] + M + O) | 0 + s[2] = (s[3] + I + R) | 0 + s[3] = (s[4] + D + x) | 0 + s[4] = (s[0] + T + B) | 0 + s[0] = k + }, + _doFinalize: function () { + var t = this._data + var e = t.words + var r = 8 * this._nDataBytes + var i = 8 * t.sigBytes + e[i >>> 5] |= 128 << (24 - (i % 32)) + e[(((i + 64) >>> 9) << 4) + 14] = + (16711935 & ((r << 8) | (r >>> 24))) | + (4278255360 & ((r << 24) | (r >>> 8))) + t.sigBytes = 4 * (e.length + 1) + this._process() + var n = this._hash + var s = n.words + for (var a = 0; a < 5; a++) { + var o = s[a] + s[a] = + (16711935 & ((o << 8) | (o >>> 24))) | + (4278255360 & ((o << 24) | (o >>> 8))) + } + return n + }, + clone: function () { + var t = s.clone.call(this) + t._hash = this._hash.clone() + return t + }, + })) + function v(t, e, r) { + return t ^ e ^ r + } + function p(t, e, r) { + return (t & e) | (~t & r) + } + function g(t, e, r) { + return (t | ~e) ^ r + } + function y(t, e, r) { + return (t & r) | (e & ~r) + } + function m(t, e, r) { + return t ^ (e | ~r) + } + function _(t, e) { + return (t << e) | (t >>> (32 - e)) + } + r.RIPEMD160 = s._createHelper(d) + r.HmacRIPEMD160 = s._createHmacHelper(d) + })(Math) + return t.RIPEMD160 + }) + }, + 2783: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = r.Hasher + var s = e.algo + var a = [] + var o = (s.SHA1 = n.extend({ + _doReset: function () { + this._hash = new i.init([ + 1732584193, 4023233417, 2562383102, 271733878, 3285377520, + ]) + }, + _doProcessBlock: function (t, e) { + var r = this._hash.words + var i = r[0] + var n = r[1] + var s = r[2] + var o = r[3] + var u = r[4] + for (var c = 0; c < 80; c++) { + if (c < 16) a[c] = 0 | t[e + c] + else { + var l = a[c - 3] ^ a[c - 8] ^ a[c - 14] ^ a[c - 16] + a[c] = (l << 1) | (l >>> 31) + } + var f = ((i << 5) | (i >>> 27)) + u + a[c] + if (c < 20) f += ((n & s) | (~n & o)) + 1518500249 + else if (c < 40) f += (n ^ s ^ o) + 1859775393 + else if (c < 60) + f += ((n & s) | (n & o) | (s & o)) - 1894007588 + else f += (n ^ s ^ o) - 899497514 + u = o + o = s + s = (n << 30) | (n >>> 2) + n = i + i = f + } + r[0] = (r[0] + i) | 0 + r[1] = (r[1] + n) | 0 + r[2] = (r[2] + s) | 0 + r[3] = (r[3] + o) | 0 + r[4] = (r[4] + u) | 0 + }, + _doFinalize: function () { + var t = this._data + var e = t.words + var r = 8 * this._nDataBytes + var i = 8 * t.sigBytes + e[i >>> 5] |= 128 << (24 - (i % 32)) + e[(((i + 64) >>> 9) << 4) + 14] = Math.floor(r / 4294967296) + e[(((i + 64) >>> 9) << 4) + 15] = r + t.sigBytes = 4 * e.length + this._process() + return this._hash + }, + clone: function () { + var t = n.clone.call(this) + t._hash = this._hash.clone() + return t + }, + })) + e.SHA1 = n._createHelper(o) + e.HmacSHA1 = n._createHmacHelper(o) + })() + return t.SHA1 + }) + }, + 7792: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(2153)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = e.algo + var s = n.SHA256 + var a = (n.SHA224 = s.extend({ + _doReset: function () { + this._hash = new i.init([ + 3238371032, 914150663, 812702999, 4144912697, 4290775857, + 1750603025, 1694076839, 3204075428, + ]) + }, + _doFinalize: function () { + var t = s._doFinalize.call(this) + t.sigBytes -= 4 + return t + }, + })) + e.SHA224 = s._createHelper(a) + e.HmacSHA224 = s._createHmacHelper(a) + })() + return t.SHA224 + }) + }, + 2153: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.WordArray + var s = i.Hasher + var a = r.algo + var o = [] + var u = [] + ;(function () { + function t(t) { + var r = e.sqrt(t) + for (var i = 2; i <= r; i++) if (!(t % i)) return false + return true + } + function r(t) { + return (4294967296 * (t - (0 | t))) | 0 + } + var i = 2 + var n = 0 + while (n < 64) { + if (t(i)) { + if (n < 8) o[n] = r(e.pow(i, 1 / 2)) + u[n] = r(e.pow(i, 1 / 3)) + n++ + } + i++ + } + })() + var c = [] + var l = (a.SHA256 = s.extend({ + _doReset: function () { + this._hash = new n.init(o.slice(0)) + }, + _doProcessBlock: function (t, e) { + var r = this._hash.words + var i = r[0] + var n = r[1] + var s = r[2] + var a = r[3] + var o = r[4] + var l = r[5] + var f = r[6] + var h = r[7] + for (var d = 0; d < 64; d++) { + if (d < 16) c[d] = 0 | t[e + d] + else { + var v = c[d - 15] + var p = + ((v << 25) | (v >>> 7)) ^ + ((v << 14) | (v >>> 18)) ^ + (v >>> 3) + var g = c[d - 2] + var y = + ((g << 15) | (g >>> 17)) ^ + ((g << 13) | (g >>> 19)) ^ + (g >>> 10) + c[d] = p + c[d - 7] + y + c[d - 16] + } + var m = (o & l) ^ (~o & f) + var _ = (i & n) ^ (i & s) ^ (n & s) + var S = + ((i << 30) | (i >>> 2)) ^ + ((i << 19) | (i >>> 13)) ^ + ((i << 10) | (i >>> 22)) + var E = + ((o << 26) | (o >>> 6)) ^ + ((o << 21) | (o >>> 11)) ^ + ((o << 7) | (o >>> 25)) + var b = h + E + m + u[d] + c[d] + var w = S + _ + h = f + f = l + l = o + o = (a + b) | 0 + a = s + s = n + n = i + i = (b + w) | 0 + } + r[0] = (r[0] + i) | 0 + r[1] = (r[1] + n) | 0 + r[2] = (r[2] + s) | 0 + r[3] = (r[3] + a) | 0 + r[4] = (r[4] + o) | 0 + r[5] = (r[5] + l) | 0 + r[6] = (r[6] + f) | 0 + r[7] = (r[7] + h) | 0 + }, + _doFinalize: function () { + var t = this._data + var r = t.words + var i = 8 * this._nDataBytes + var n = 8 * t.sigBytes + r[n >>> 5] |= 128 << (24 - (n % 32)) + r[(((n + 64) >>> 9) << 4) + 14] = e.floor(i / 4294967296) + r[(((n + 64) >>> 9) << 4) + 15] = i + t.sigBytes = 4 * r.length + this._process() + return this._hash + }, + clone: function () { + var t = s.clone.call(this) + t._hash = this._hash.clone() + return t + }, + })) + r.SHA256 = s._createHelper(l) + r.HmacSHA256 = s._createHmacHelper(l) + })(Math) + return t.SHA256 + }) + }, + 3327: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(4938)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.WordArray + var s = i.Hasher + var a = r.x64 + var o = a.Word + var u = r.algo + var c = [] + var l = [] + var f = [] + ;(function () { + var t = 1, + e = 0 + for (var r = 0; r < 24; r++) { + c[t + 5 * e] = (((r + 1) * (r + 2)) / 2) % 64 + var i = e % 5 + var n = (2 * t + 3 * e) % 5 + t = i + e = n + } + for (var t = 0; t < 5; t++) + for (var e = 0; e < 5; e++) + l[t + 5 * e] = e + ((2 * t + 3 * e) % 5) * 5 + var s = 1 + for (var a = 0; a < 24; a++) { + var u = 0 + var h = 0 + for (var d = 0; d < 7; d++) { + if (1 & s) { + var v = (1 << d) - 1 + if (v < 32) h ^= 1 << v + else u ^= 1 << (v - 32) + } + if (128 & s) s = (s << 1) ^ 113 + else s <<= 1 + } + f[a] = o.create(u, h) + } + })() + var h = [] + ;(function () { + for (var t = 0; t < 25; t++) h[t] = o.create() + })() + var d = (u.SHA3 = s.extend({ + cfg: s.cfg.extend({ outputLength: 512 }), + _doReset: function () { + var t = (this._state = []) + for (var e = 0; e < 25; e++) t[e] = new o.init() + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32 + }, + _doProcessBlock: function (t, e) { + var r = this._state + var i = this.blockSize / 2 + for (var n = 0; n < i; n++) { + var s = t[e + 2 * n] + var a = t[e + 2 * n + 1] + s = + (16711935 & ((s << 8) | (s >>> 24))) | + (4278255360 & ((s << 24) | (s >>> 8))) + a = + (16711935 & ((a << 8) | (a >>> 24))) | + (4278255360 & ((a << 24) | (a >>> 8))) + var o = r[n] + o.high ^= a + o.low ^= s + } + for (var u = 0; u < 24; u++) { + for (var d = 0; d < 5; d++) { + var v = 0, + p = 0 + for (var g = 0; g < 5; g++) { + var o = r[d + 5 * g] + v ^= o.high + p ^= o.low + } + var y = h[d] + y.high = v + y.low = p + } + for (var d = 0; d < 5; d++) { + var m = h[(d + 4) % 5] + var _ = h[(d + 1) % 5] + var S = _.high + var E = _.low + var v = m.high ^ ((S << 1) | (E >>> 31)) + var p = m.low ^ ((E << 1) | (S >>> 31)) + for (var g = 0; g < 5; g++) { + var o = r[d + 5 * g] + o.high ^= v + o.low ^= p + } + } + for (var b = 1; b < 25; b++) { + var v + var p + var o = r[b] + var w = o.high + var D = o.low + var T = c[b] + if (T < 32) { + v = (w << T) | (D >>> (32 - T)) + p = (D << T) | (w >>> (32 - T)) + } else { + v = (D << (T - 32)) | (w >>> (64 - T)) + p = (w << (T - 32)) | (D >>> (64 - T)) + } + var A = h[l[b]] + A.high = v + A.low = p + } + var M = h[0] + var I = r[0] + M.high = I.high + M.low = I.low + for (var d = 0; d < 5; d++) + for (var g = 0; g < 5; g++) { + var b = d + 5 * g + var o = r[b] + var R = h[b] + var x = h[((d + 1) % 5) + 5 * g] + var B = h[((d + 2) % 5) + 5 * g] + o.high = R.high ^ (~x.high & B.high) + o.low = R.low ^ (~x.low & B.low) + } + var o = r[0] + var C = f[u] + o.high ^= C.high + o.low ^= C.low + } + }, + _doFinalize: function () { + var t = this._data + var r = t.words + var i = 8 * this._nDataBytes + var s = 8 * t.sigBytes + var a = 32 * this.blockSize + r[s >>> 5] |= 1 << (24 - (s % 32)) + r[((e.ceil((s + 1) / a) * a) >>> 5) - 1] |= 128 + t.sigBytes = 4 * r.length + this._process() + var o = this._state + var u = this.cfg.outputLength / 8 + var c = u / 8 + var l = [] + for (var f = 0; f < c; f++) { + var h = o[f] + var d = h.high + var v = h.low + d = + (16711935 & ((d << 8) | (d >>> 24))) | + (4278255360 & ((d << 24) | (d >>> 8))) + v = + (16711935 & ((v << 8) | (v >>> 24))) | + (4278255360 & ((v << 24) | (v >>> 8))) + l.push(v) + l.push(d) + } + return new n.init(l, u) + }, + clone: function () { + var t = s.clone.call(this) + var e = (t._state = this._state.slice(0)) + for (var r = 0; r < 25; r++) e[r] = e[r].clone() + return t + }, + })) + r.SHA3 = s._createHelper(d) + r.HmacSHA3 = s._createHmacHelper(d) + })(Math) + return t.SHA3 + }) + }, + 7460: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(4938), r(34)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.x64 + var i = r.Word + var n = r.WordArray + var s = e.algo + var a = s.SHA512 + var o = (s.SHA384 = a.extend({ + _doReset: function () { + this._hash = new n.init([ + new i.init(3418070365, 3238371032), + new i.init(1654270250, 914150663), + new i.init(2438529370, 812702999), + new i.init(355462360, 4144912697), + new i.init(1731405415, 4290775857), + new i.init(2394180231, 1750603025), + new i.init(3675008525, 1694076839), + new i.init(1203062813, 3204075428), + ]) + }, + _doFinalize: function () { + var t = a._doFinalize.call(this) + t.sigBytes -= 16 + return t + }, + })) + e.SHA384 = a._createHelper(o) + e.HmacSHA384 = a._createHmacHelper(o) + })() + return t.SHA384 + }) + }, + 34: function (t, e, r) { + ;(function (i, n, s) { + if (true) t.exports = e = n(r(8249), r(4938)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.Hasher + var n = e.x64 + var s = n.Word + var a = n.WordArray + var o = e.algo + function u() { + return s.create.apply(s, arguments) + } + var c = [ + u(1116352408, 3609767458), + u(1899447441, 602891725), + u(3049323471, 3964484399), + u(3921009573, 2173295548), + u(961987163, 4081628472), + u(1508970993, 3053834265), + u(2453635748, 2937671579), + u(2870763221, 3664609560), + u(3624381080, 2734883394), + u(310598401, 1164996542), + u(607225278, 1323610764), + u(1426881987, 3590304994), + u(1925078388, 4068182383), + u(2162078206, 991336113), + u(2614888103, 633803317), + u(3248222580, 3479774868), + u(3835390401, 2666613458), + u(4022224774, 944711139), + u(264347078, 2341262773), + u(604807628, 2007800933), + u(770255983, 1495990901), + u(1249150122, 1856431235), + u(1555081692, 3175218132), + u(1996064986, 2198950837), + u(2554220882, 3999719339), + u(2821834349, 766784016), + u(2952996808, 2566594879), + u(3210313671, 3203337956), + u(3336571891, 1034457026), + u(3584528711, 2466948901), + u(113926993, 3758326383), + u(338241895, 168717936), + u(666307205, 1188179964), + u(773529912, 1546045734), + u(1294757372, 1522805485), + u(1396182291, 2643833823), + u(1695183700, 2343527390), + u(1986661051, 1014477480), + u(2177026350, 1206759142), + u(2456956037, 344077627), + u(2730485921, 1290863460), + u(2820302411, 3158454273), + u(3259730800, 3505952657), + u(3345764771, 106217008), + u(3516065817, 3606008344), + u(3600352804, 1432725776), + u(4094571909, 1467031594), + u(275423344, 851169720), + u(430227734, 3100823752), + u(506948616, 1363258195), + u(659060556, 3750685593), + u(883997877, 3785050280), + u(958139571, 3318307427), + u(1322822218, 3812723403), + u(1537002063, 2003034995), + u(1747873779, 3602036899), + u(1955562222, 1575990012), + u(2024104815, 1125592928), + u(2227730452, 2716904306), + u(2361852424, 442776044), + u(2428436474, 593698344), + u(2756734187, 3733110249), + u(3204031479, 2999351573), + u(3329325298, 3815920427), + u(3391569614, 3928383900), + u(3515267271, 566280711), + u(3940187606, 3454069534), + u(4118630271, 4000239992), + u(116418474, 1914138554), + u(174292421, 2731055270), + u(289380356, 3203993006), + u(460393269, 320620315), + u(685471733, 587496836), + u(852142971, 1086792851), + u(1017036298, 365543100), + u(1126000580, 2618297676), + u(1288033470, 3409855158), + u(1501505948, 4234509866), + u(1607167915, 987167468), + u(1816402316, 1246189591), + ] + var l = [] + ;(function () { + for (var t = 0; t < 80; t++) l[t] = u() + })() + var f = (o.SHA512 = i.extend({ + _doReset: function () { + this._hash = new a.init([ + new s.init(1779033703, 4089235720), + new s.init(3144134277, 2227873595), + new s.init(1013904242, 4271175723), + new s.init(2773480762, 1595750129), + new s.init(1359893119, 2917565137), + new s.init(2600822924, 725511199), + new s.init(528734635, 4215389547), + new s.init(1541459225, 327033209), + ]) + }, + _doProcessBlock: function (t, e) { + var r = this._hash.words + var i = r[0] + var n = r[1] + var s = r[2] + var a = r[3] + var o = r[4] + var u = r[5] + var f = r[6] + var h = r[7] + var d = i.high + var v = i.low + var p = n.high + var g = n.low + var y = s.high + var m = s.low + var _ = a.high + var S = a.low + var E = o.high + var b = o.low + var w = u.high + var D = u.low + var T = f.high + var A = f.low + var M = h.high + var I = h.low + var R = d + var x = v + var B = p + var C = g + var O = y + var k = m + var P = _ + var N = S + var V = E + var H = b + var L = w + var K = D + var U = T + var j = A + var F = M + var z = I + for (var q = 0; q < 80; q++) { + var G + var Y + var W = l[q] + if (q < 16) { + Y = W.high = 0 | t[e + 2 * q] + G = W.low = 0 | t[e + 2 * q + 1] + } else { + var J = l[q - 15] + var $ = J.high + var Z = J.low + var X = + (($ >>> 1) | (Z << 31)) ^ + (($ >>> 8) | (Z << 24)) ^ + ($ >>> 7) + var Q = + ((Z >>> 1) | ($ << 31)) ^ + ((Z >>> 8) | ($ << 24)) ^ + ((Z >>> 7) | ($ << 25)) + var tt = l[q - 2] + var et = tt.high + var rt = tt.low + var it = + ((et >>> 19) | (rt << 13)) ^ + ((et << 3) | (rt >>> 29)) ^ + (et >>> 6) + var nt = + ((rt >>> 19) | (et << 13)) ^ + ((rt << 3) | (et >>> 29)) ^ + ((rt >>> 6) | (et << 26)) + var st = l[q - 7] + var at = st.high + var ot = st.low + var ut = l[q - 16] + var ct = ut.high + var lt = ut.low + G = Q + ot + Y = X + at + (G >>> 0 < Q >>> 0 ? 1 : 0) + G += nt + Y = Y + it + (G >>> 0 < nt >>> 0 ? 1 : 0) + G += lt + Y = Y + ct + (G >>> 0 < lt >>> 0 ? 1 : 0) + W.high = Y + W.low = G + } + var ft = (V & L) ^ (~V & U) + var ht = (H & K) ^ (~H & j) + var dt = (R & B) ^ (R & O) ^ (B & O) + var vt = (x & C) ^ (x & k) ^ (C & k) + var pt = + ((R >>> 28) | (x << 4)) ^ + ((R << 30) | (x >>> 2)) ^ + ((R << 25) | (x >>> 7)) + var gt = + ((x >>> 28) | (R << 4)) ^ + ((x << 30) | (R >>> 2)) ^ + ((x << 25) | (R >>> 7)) + var yt = + ((V >>> 14) | (H << 18)) ^ + ((V >>> 18) | (H << 14)) ^ + ((V << 23) | (H >>> 9)) + var mt = + ((H >>> 14) | (V << 18)) ^ + ((H >>> 18) | (V << 14)) ^ + ((H << 23) | (V >>> 9)) + var _t = c[q] + var St = _t.high + var Et = _t.low + var bt = z + mt + var wt = F + yt + (bt >>> 0 < z >>> 0 ? 1 : 0) + var bt = bt + ht + var wt = wt + ft + (bt >>> 0 < ht >>> 0 ? 1 : 0) + var bt = bt + Et + var wt = wt + St + (bt >>> 0 < Et >>> 0 ? 1 : 0) + var bt = bt + G + var wt = wt + Y + (bt >>> 0 < G >>> 0 ? 1 : 0) + var Dt = gt + vt + var Tt = pt + dt + (Dt >>> 0 < gt >>> 0 ? 1 : 0) + F = U + z = j + U = L + j = K + L = V + K = H + H = (N + bt) | 0 + V = (P + wt + (H >>> 0 < N >>> 0 ? 1 : 0)) | 0 + P = O + N = k + O = B + k = C + B = R + C = x + x = (bt + Dt) | 0 + R = (wt + Tt + (x >>> 0 < bt >>> 0 ? 1 : 0)) | 0 + } + v = i.low = v + x + i.high = d + R + (v >>> 0 < x >>> 0 ? 1 : 0) + g = n.low = g + C + n.high = p + B + (g >>> 0 < C >>> 0 ? 1 : 0) + m = s.low = m + k + s.high = y + O + (m >>> 0 < k >>> 0 ? 1 : 0) + S = a.low = S + N + a.high = _ + P + (S >>> 0 < N >>> 0 ? 1 : 0) + b = o.low = b + H + o.high = E + V + (b >>> 0 < H >>> 0 ? 1 : 0) + D = u.low = D + K + u.high = w + L + (D >>> 0 < K >>> 0 ? 1 : 0) + A = f.low = A + j + f.high = T + U + (A >>> 0 < j >>> 0 ? 1 : 0) + I = h.low = I + z + h.high = M + F + (I >>> 0 < z >>> 0 ? 1 : 0) + }, + _doFinalize: function () { + var t = this._data + var e = t.words + var r = 8 * this._nDataBytes + var i = 8 * t.sigBytes + e[i >>> 5] |= 128 << (24 - (i % 32)) + e[(((i + 128) >>> 10) << 5) + 30] = Math.floor(r / 4294967296) + e[(((i + 128) >>> 10) << 5) + 31] = r + t.sigBytes = 4 * e.length + this._process() + var n = this._hash.toX32() + return n + }, + clone: function () { + var t = i.clone.call(this) + t._hash = this._hash.clone() + return t + }, + blockSize: 1024 / 32, + })) + e.SHA512 = i._createHelper(f) + e.HmacSHA512 = i._createHmacHelper(f) + })() + return t.SHA512 + }) + }, + 4253: function (t, e, r) { + ;(function (i, n, s) { + if (true) + t.exports = e = n(r(8249), r(8269), r(8214), r(888), r(5109)) + })(this, function (t) { + ;(function () { + var e = t + var r = e.lib + var i = r.WordArray + var n = r.BlockCipher + var s = e.algo + var a = [ + 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, + ] + var o = [ + 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, + ] + var u = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28] + var c = [ + { + 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, + }, + ] + var l = [ + 4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, + 2147483679, + ] + var f = (s.DES = n.extend({ + _doReset: function () { + var t = this._key + var e = t.words + var r = [] + for (var i = 0; i < 56; i++) { + var n = a[i] - 1 + r[i] = (e[n >>> 5] >>> (31 - (n % 32))) & 1 + } + var s = (this._subKeys = []) + for (var c = 0; c < 16; c++) { + var l = (s[c] = []) + var f = u[c] + for (var i = 0; i < 24; i++) { + l[(i / 6) | 0] |= r[(o[i] - 1 + f) % 28] << (31 - (i % 6)) + l[4 + ((i / 6) | 0)] |= + r[28 + ((o[i + 24] - 1 + f) % 28)] << (31 - (i % 6)) + } + l[0] = (l[0] << 1) | (l[0] >>> 31) + for (var i = 1; i < 7; i++) l[i] = l[i] >>> (4 * (i - 1) + 3) + l[7] = (l[7] << 5) | (l[7] >>> 27) + } + var h = (this._invSubKeys = []) + for (var i = 0; i < 16; i++) h[i] = s[15 - i] + }, + encryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._subKeys) + }, + decryptBlock: function (t, e) { + this._doCryptBlock(t, e, this._invSubKeys) + }, + _doCryptBlock: function (t, e, r) { + this._lBlock = t[e] + this._rBlock = t[e + 1] + h.call(this, 4, 252645135) + h.call(this, 16, 65535) + d.call(this, 2, 858993459) + d.call(this, 8, 16711935) + h.call(this, 1, 1431655765) + for (var i = 0; i < 16; i++) { + var n = r[i] + var s = this._lBlock + var a = this._rBlock + var o = 0 + for (var u = 0; u < 8; u++) + o |= c[u][((a ^ n[u]) & l[u]) >>> 0] + this._lBlock = a + this._rBlock = s ^ o + } + var f = this._lBlock + this._lBlock = this._rBlock + this._rBlock = f + h.call(this, 1, 1431655765) + d.call(this, 8, 16711935) + d.call(this, 2, 858993459) + h.call(this, 16, 65535) + h.call(this, 4, 252645135) + t[e] = this._lBlock + t[e + 1] = this._rBlock + }, + keySize: 64 / 32, + ivSize: 64 / 32, + blockSize: 64 / 32, + })) + function h(t, e) { + var r = ((this._lBlock >>> t) ^ this._rBlock) & e + this._rBlock ^= r + this._lBlock ^= r << t + } + function d(t, e) { + var r = ((this._rBlock >>> t) ^ this._lBlock) & e + this._lBlock ^= r + this._rBlock ^= r << t + } + e.DES = n._createHelper(f) + var v = (s.TripleDES = n.extend({ + _doReset: function () { + var t = this._key + var e = t.words + if (2 !== e.length && 4 !== e.length && e.length < 6) + throw new Error( + 'Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.' + ) + var r = e.slice(0, 2) + var n = e.length < 4 ? e.slice(0, 2) : e.slice(2, 4) + var s = e.length < 6 ? e.slice(0, 2) : e.slice(4, 6) + this._des1 = f.createEncryptor(i.create(r)) + this._des2 = f.createEncryptor(i.create(n)) + this._des3 = f.createEncryptor(i.create(s)) + }, + encryptBlock: function (t, e) { + this._des1.encryptBlock(t, e) + this._des2.decryptBlock(t, e) + this._des3.encryptBlock(t, e) + }, + decryptBlock: function (t, e) { + this._des3.decryptBlock(t, e) + this._des2.encryptBlock(t, e) + this._des1.decryptBlock(t, e) + }, + keySize: 192 / 32, + ivSize: 64 / 32, + blockSize: 64 / 32, + })) + e.TripleDES = n._createHelper(v) + })() + return t.TripleDES + }) + }, + 4938: function (t, e, r) { + ;(function (i, n) { + if (true) t.exports = e = n(r(8249)) + })(this, function (t) { + ;(function (e) { + var r = t + var i = r.lib + var n = i.Base + var s = i.WordArray + var a = (r.x64 = {}) + var o = (a.Word = n.extend({ + init: function (t, e) { + this.high = t + this.low = e + }, + })) + var u = (a.WordArray = n.extend({ + init: function (t, r) { + t = this.words = t || [] + if (r != e) this.sigBytes = r + else this.sigBytes = 8 * t.length + }, + toX32: function () { + var t = this.words + var e = t.length + var r = [] + for (var i = 0; i < e; i++) { + var n = t[i] + r.push(n.high) + r.push(n.low) + } + return s.create(r, this.sigBytes) + }, + clone: function () { + var t = n.clone.call(this) + var e = (t.words = this.words.slice(0)) + var r = e.length + for (var i = 0; i < r; i++) e[i] = e[i].clone() + return t + }, + })) + })() + return t + }) + }, + 3118: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + e.ErrorCode = void 0 + var r + ;(function (t) { + t[(t['SUCCESS'] = 0)] = 'SUCCESS' + t[(t['CLIENT_ID_NOT_FOUND'] = 1)] = 'CLIENT_ID_NOT_FOUND' + t[(t['OPERATION_TOO_OFTEN'] = 2)] = 'OPERATION_TOO_OFTEN' + t[(t['REPEAT_MESSAGE'] = 3)] = 'REPEAT_MESSAGE' + t[(t['TIME_OUT'] = 4)] = 'TIME_OUT' + })((r = e.ErrorCode || (e.ErrorCode = {}))) + }, + 5987: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1901)) + const s = i(r(1754)) + const a = i(r(1237)) + var o + ;(function (t) { + function e(t) { + a.default.debugMode = t + a.default.info(`setDebugMode: ${t}`) + } + t.setDebugMode = e + function r(t) { + try { + f(t.appid) + n.default.init(t) + } catch (t) { + a.default.error(`init error`, t) + } + } + t.init = r + function i(t) { + try { + n.default.setTag(t) + } catch (t) { + a.default.error(`setTag error`, t) + } + } + t.setTag = i + function o(t) { + try { + n.default.bindAlias(t) + } catch (t) { + a.default.error(`bindAlias error`, t) + } + } + t.bindAlias = o + function u(t) { + try { + n.default.unbindAlias(t) + } catch (t) { + a.default.error(`unbindAlias error`, t) + } + } + t.unbindAlias = u + function c(t) { + try { + if (!t.url) throw new Error('invalid url') + if (!t.key || !t.keyId) throw new Error('invalid key or keyId') + s.default.socketUrl = t.url + s.default.publicKeyId = t.keyId + s.default.publicKey = t.key + } catch (t) { + a.default.error(`setSocketServer error`, t) + } + } + t.setSocketServer = c + function l(t) { + try { + n.default.enableSocket(t) + } catch (t) { + a.default.error(`enableSocket error`, t) + } + } + t.enableSocket = l + function f(t) { + if (null == t || void 0 == t || '' == t.trim()) + throw new Error(`invalid appid ${t}`) + } + })(o || (o = {})) + e['default'] = o + }, + 127: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + var r + ;(function (t) { + t.SDK_VERSION = 'GTMP-1.0.0.0' + t.DEFAULT_SOCKET_URL = 'wss://wshz.getui.net:5223/nws' + t.SOCKET_PROTOCOL_VERSION = '1.0' + t.SERVER_PUBLIC_KEY = + 'MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB' + t.SERVER_PUBLIC_KEY_ID = '69d747c4b9f641baf4004be4297e9f3b' + })(r || (r = {})) + e['default'] = r + }, + 1901: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(3593)) + const s = i(r(1237)) + const a = r(3118) + const o = i(r(1754)) + const u = i(r(3854)) + const c = i(r(9018)) + const l = i(r(5084)) + class f { + static init(t) { + if (this.inited) return + try { + this.inited = true + s.default.info(`init: appid=${t.appid}`) + o.default.init(t) + n.default.connect() + } catch (t) { + this.inited = false + } + } + static enableSocket(t) { + this.checkInit() + n.default.allowReconnect = t + if (t) n.default.reconnect(0) + else n.default.close(`enableSocket ${t}`) + } + static setTag(t) { + var e + this.checkInit() + if (!o.default.cid) { + null === (e = t.setTagResult) || + void 0 === e || + e.call(t.setTagResult, { + resultCode: a.ErrorCode.CLIENT_ID_NOT_FOUND, + message: 'client id not found', + }) + return + } + c.default.create(t.tags, t.setTagResult).send() + } + static bindAlias(t) { + var e, r + this.checkInit() + if (!o.default.cid) { + null === (e = t.bindAliasResult) || + void 0 === e || + e.call(t.bindAliasResult, { + resultCode: a.ErrorCode.CLIENT_ID_NOT_FOUND, + message: 'client id not found', + }) + return + } + let i = new Date().getTime() + if (i - o.default.lastAliasTime < 1 * 1e3) { + s.default.error( + `bind alias fail: alias option can only be called once a second` + ) + null === (r = t.bindAliasResult) || + void 0 === r || + r.call(t.bindAliasResult, { + resultCode: a.ErrorCode.OPERATION_TOO_OFTEN, + message: 'alias option can only be called once a second', + }) + return + } + u.default.create(t.alias, true, t.bindAliasResult).send() + o.default.lastAliasTime = i + } + static unbindAlias(t) { + var e, r + this.checkInit() + if (!o.default.cid) { + null === (e = t.unbindAliasResult) || + void 0 === e || + e.call(t.unbindAliasResult, { + resultCode: a.ErrorCode.CLIENT_ID_NOT_FOUND, + message: 'client id not found', + }) + return + } + let i = new Date().getTime() + if (i - o.default.lastAliasTime < 1 * 1e3) { + s.default.error( + `unbindAlias alias fail: alias option can only be called once a second` + ) + null === (r = t.unbindAliasResult) || + void 0 === r || + r.call(t.unbindAliasResult, { + resultCode: a.ErrorCode.OPERATION_TOO_OFTEN, + message: 'alias option can only be called once a second', + }) + return + } + l.default.create(t.alias, t.onlySelf, t.unbindAliasResult).send() + o.default.lastAliasTime = i + } + static turnOff() {} + static turnOn() {} + static checkInit() { + if (!this.inited) + throw new Error(`not init, please invoke init method firstly`) + } + } + f.inited = false + e['default'] = f + }, + 1754: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(323)) + const s = i(r(207)) + const a = i(r(127)) + const o = i(r(3593)) + const u = i(r(1237)) + const c = i(r(3270)) + class l { + static init(t) { + var e + this.appid = t.appid + this.onClientId = t.onClientId + this.onlineState = t.onlineState + this.onPushMsg = t.onPushMsg + if ( + this.appid != s.default.getSync(s.default.KEY_APPID, this.appid) + ) { + u.default.info('appid changed, clear session and cid') + s.default.setSync(s.default.KEY_CID, '') + s.default.setSync(s.default.KEY_SESSION, '') + } + s.default.setSync(s.default.KEY_APPID, this.appid) + this.cid = s.default.getSync(s.default.KEY_CID, this.cid) + if (this.cid) + null === (e = this.onClientId) || + void 0 === e || + e.call(this, { cid: l.cid }) + this.session = s.default.getSync( + s.default.KEY_SESSION, + this.session + ) + this.deviceId = s.default.getSync( + s.default.KEY_DEVICE_ID, + this.deviceId + ) + this.regId = s.default.getSync(s.default.KEY_REGID, this.regId) + if (!this.regId) { + this.regId = this.createRegId() + s.default.set({ key: s.default.KEY_REGID, data: this.regId }) + } + this.socketUrl = s.default.getSync( + s.default.KEY_SOCKET_URL, + this.socketUrl + ) + let r = this + c.default.getNetworkType({ + success: (t) => { + r.networkType = t + r.networkConnected = + 'none' != r.networkType && '' != r.networkType + }, + }) + c.default.onNetworkStatusChange((t) => { + r.networkConnected = t.isConnected + r.networkType = t.networkType + if (r.networkConnected) o.default.reconnect(0) + }) + } + static createRegId() { + return `M-V${n.default.md5Hex( + this.getUuid() + )}-${new Date().getTime()}` + } + static getUuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( + /[xy]/g, + function (t) { + let e = (16 * Math.random()) | 0, + r = 'x' === t ? e : (3 & e) | 8 + return r.toString(16) + } + ) + } + } + l.appid = '' + l.cid = '' + l.regId = '' + l.session = '' + l.deviceId = '' + l.packetId = 1 + l.online = false + l.socketUrl = a.default.DEFAULT_SOCKET_URL + l.publicKeyId = a.default.SERVER_PUBLIC_KEY_ID + l.publicKey = a.default.SERVER_PUBLIC_KEY + l.lastAliasTime = 0 + l.networkConnected = true + l.networkType = 'none' + e['default'] = l + }, + 9214: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + var n, s + Object.defineProperty(e, '__esModule', { value: true }) + const a = i(r(9800)) + const o = r(3118) + const u = i(r(1754)) + class c extends a.default { + constructor() { + super(...arguments) + this.actionMsgData = new l() + } + static initActionMsg(t, ...e) { + super.initMsg(t) + t.command = a.default.Command.CLIENT_MSG + t.data = t.actionMsgData = l.create() + return t + } + static parseActionMsg(t, e) { + super.parseMsg(t, e) + t.actionMsgData = l.parse(t.data) + return t + } + send() { + let t = setTimeout(() => { + var t + if ( + c.waitingLoginMsgMap.has(this.actionMsgData.msgId) || + c.waitingResponseMsgMap.has(this.actionMsgData.msgId) + ) { + c.waitingLoginMsgMap.delete(this.actionMsgData.msgId) + c.waitingResponseMsgMap.delete(this.actionMsgData.msgId) + null === (t = this.callback) || + void 0 === t || + t.call(this.callback, { + resultCode: o.ErrorCode.TIME_OUT, + message: 'waiting time out', + }) + } + }, 1e4) + if (!u.default.online) { + c.waitingLoginMsgMap.set(this.actionMsgData.msgId, this) + return + } + if (this.actionMsgData.msgAction != c.ClientAction.RECEIVED) + c.waitingResponseMsgMap.set(this.actionMsgData.msgId, this) + super.send() + } + receive() {} + static sendWaitingMessages() { + let t = this.waitingLoginMsgMap.keys() + let e + while (((e = t.next()), !e.done)) { + let t = this.waitingLoginMsgMap.get(e.value) + this.waitingLoginMsgMap.delete(e.value) + null === t || void 0 === t || t.send() + } + } + static getWaitingResponseMessage(t) { + return c.waitingResponseMsgMap.get(t) + } + static removeWaitingResponseMessage(t) { + let e = c.waitingResponseMsgMap.get(t) + if (e) c.waitingResponseMsgMap.delete(t) + return e + } + } + c.ServerAction = + ((n = class {}), + (n.PUSH_MESSAGE = 'pushmessage'), + (n.REDIRECT_SERVER = 'redirect_server'), + (n.ADD_PHONE_INFO_RESULT = 'addphoneinfo'), + (n.SET_MODE_RESULT = 'set_mode_result'), + (n.SET_TAG_RESULT = 'settag_result'), + (n.BIND_ALIAS_RESULT = 'response_bind'), + (n.UNBIND_ALIAS_RESULT = 'response_unbind'), + (n.FEED_BACK_RESULT = 'pushmessage_feedback'), + (n.RECEIVED = 'received'), + n) + c.ClientAction = + ((s = class {}), + (s.ADD_PHONE_INFO = 'addphoneinfo'), + (s.SET_MODE = 'set_mode'), + (s.FEED_BACK = 'pushmessage_feedback'), + (s.SET_TAGS = 'set_tag'), + (s.BIND_ALIAS = 'bind_alias'), + (s.UNBIND_ALIAS = 'unbind_alias'), + (s.RECEIVED = 'received'), + s) + c.waitingLoginMsgMap = new Map() + c.waitingResponseMsgMap = new Map() + class l { + constructor() { + this.appId = '' + this.cid = '' + this.msgId = '' + this.msgAction = '' + this.msgData = '' + this.msgExtraData = '' + } + static create() { + let t = new l() + t.appId = u.default.appid + t.cid = u.default.cid + t.msgId = new Date().getTime().toString().substr(4) + return t + } + static parse(t) { + let e = new l() + let r = JSON.parse(t) + e.appId = r.appId + e.cid = r.cid + e.msgId = r.msgId + e.msgAction = r.msgAction + e.msgData = r.msgData + e.msgExtraData = r.msgExtraData + return e + } + } + e['default'] = c + }, + 708: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(3270)) + const s = i(r(207)) + const a = i(r(127)) + const o = r(3118) + const u = i(r(9214)) + const c = i(r(1754)) + class l extends u.default { + constructor() { + super(...arguments) + this.addPhoneInfoData = new f() + } + static create() { + let t = new l() + super.initActionMsg(t) + t.callback = (e) => { + if ( + e.resultCode != o.ErrorCode.SUCCESS && + e.resultCode != o.ErrorCode.REPEAT_MESSAGE + ) + setTimeout(function () { + t.send() + }, 30 * 1e3) + else + s.default.set({ + key: s.default.KEY_ADD_PHONE_INFO_TIME, + data: new Date().getTime(), + }) + } + t.actionMsgData.msgAction = u.default.ClientAction.ADD_PHONE_INFO + t.addPhoneInfoData = f.create() + t.actionMsgData.msgData = JSON.stringify(t.addPhoneInfoData) + return t + } + send() { + let t = new Date().getTime() + let e = s.default.getSync(s.default.KEY_ADD_PHONE_INFO_TIME, 0) + if (t - e < 24 * 60 * 60 * 1e3) return + super.send() + } + } + class f { + constructor() { + this.model = '' + this.brand = '' + this.system_version = '' + this.version = '' + this.device_token = '' + this.imei = '' + this.oaid = '' + this.mac = '' + this.idfa = '' + this.deviceid = '' + this.type = '' + this.extra = { + os: '', + platform: '', + platformVersion: '', + platformId: '', + appVersion: '', + language: '', + } + } + static create() { + let t = new f() + t.model = n.default.model() + t.brand = n.default.brand() + t.system_version = n.default.osVersion() + t.version = a.default.SDK_VERSION + t.device_token = '' + t.imei = '' + t.oaid = '' + t.mac = '' + t.idfa = '' + t.type = 'MINI' + t.deviceid = `${t.type}-${c.default.deviceId}` + t.extra = { + os: n.default.os(), + platform: n.default.platform(), + platformVersion: n.default.platformVersion(), + platformId: n.default.platformId(), + appVersion: '', + language: n.default.language(), + } + return t + } + } + e['default'] = l + }, + 3854: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1754)) + const s = i(r(9214)) + class a extends s.default { + constructor() { + super(...arguments) + this.bindAliasTagData = new o() + } + static create(t, e, r) { + let i = new a() + super.initActionMsg(i) + i.bindAliasTagData = o.create(t, e) + i.callback = r + i.actionMsgData.msgAction = s.default.ClientAction.BIND_ALIAS + i.actionMsgData.msgData = JSON.stringify(i.bindAliasTagData) + return i + } + } + class o { + constructor() { + this.alias = '' + this.cid = '' + this.appid = '' + this.sn = '' + this.is_self = '' + } + static create(t, e) { + let r = new o() + r.alias = t + r.cid = n.default.cid + r.appid = n.default.appid + r.sn = new Date().getTime().toString() + r.is_self = e ? '1' : '0' + return r + } + } + e['default'] = a + }, + 652: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + var n, s + Object.defineProperty(e, '__esModule', { value: true }) + const a = i(r(1754)) + const o = r(3118) + const u = i(r(9214)) + class c extends u.default { + constructor() { + super(...arguments) + this.feedbackData = new l() + } + static create(t, e) { + let r = new c() + super.initActionMsg(r) + r.callback = (t) => { + if ( + t.resultCode != o.ErrorCode.SUCCESS && + t.resultCode != o.ErrorCode.REPEAT_MESSAGE + ) + setTimeout(function () { + r.send() + }, 30 * 1e3) + } + r.feedbackData = l.create(t, e) + r.actionMsgData.msgAction = u.default.ClientAction.FEED_BACK + r.actionMsgData.msgData = JSON.stringify(r.feedbackData) + return r + } + send() { + super.send() + } + } + c.ActionId = + ((n = class {}), + (n.RECEIVE = '0'), + (n.MP_RECEIVE = '210000'), + (n.WEB_RECEIVE = '220000'), + (n.BEGIN = '1'), + n) + c.RESULT = ((s = class {}), (s.OK = 'ok'), s) + class l { + constructor() { + this.messageid = '' + this.appkey = '' + this.appid = '' + this.taskid = '' + this.actionid = '' + this.result = '' + this.timestamp = '' + } + static create(t, e) { + let r = new l() + r.messageid = t.pushMessageData.messageid + r.appkey = t.pushMessageData.appKey + r.appid = a.default.appid + r.taskid = t.pushMessageData.taskId + r.actionid = e + r.result = c.RESULT.OK + r.timestamp = new Date().getTime().toString() + return r + } + } + e['default'] = c + }, + 9018: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1754)) + const s = i(r(9214)) + class a extends s.default { + constructor() { + super(...arguments) + this.setTagData = new o() + } + static create(t, e) { + let r = new a() + super.initActionMsg(r) + r.setTagData = o.create(t) + r.callback = e + r.actionMsgData.msgAction = s.default.ClientAction.SET_TAGS + r.actionMsgData.msgData = JSON.stringify(r.setTagData) + return r + } + } + class o { + constructor() { + this.appid = '' + this.tags = '' + this.sn = '' + } + static create(t) { + let e = new o() + e.appid = n.default.appid + e.tags = u(t) + e.sn = new Date().getTime().toString() + return e + } + } + function u(t) { + return encodeURIComponent(t) + .replace(/!/g, '%21') + .replace(/'/g, '%27') + .replace(/\(/g, '%28') + .replace(/\)/g, '%29') + .replace(/\*/g, '%2A') + } + e['default'] = a + }, + 5084: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1754)) + const s = i(r(9214)) + class a extends s.default { + constructor() { + super(...arguments) + this.unbindAliasData = new o() + } + static create(t, e, r) { + let i = new a() + super.initActionMsg(i) + i.unbindAliasData = o.create(t, e) + i.callback = r + i.actionMsgData.msgAction = s.default.ClientAction.UNBIND_ALIAS + i.actionMsgData.msgData = JSON.stringify(i.unbindAliasData) + return i + } + } + class o { + constructor() { + this.alias = '' + this.cid = '' + this.appid = '' + this.sn = '' + this.is_self = '' + } + static create(t, e) { + let r = new o() + r.alias = t + r.cid = n.default.cid + r.appid = n.default.appid + r.sn = new Date().getTime().toString() + r.is_self = e ? '1' : '0' + return r + } + } + e['default'] = a + }, + 6561: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(9800)) + class s extends n.default { + static create() { + let t = new s() + super.initMsg(t) + t.command = n.default.Command.HEART_BEAT + return t + } + } + e['default'] = s + }, + 358: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(323)) + const s = i(r(1754)) + const a = i(r(9800)) + class o extends a.default { + constructor() { + super(...arguments) + this.keyNegotiateData = new u() + } + static create() { + let t = new o() + super.initMsg(t) + t.command = a.default.Command.KEY_NEGOTIATE + n.default.resetKey() + t.data = t.keyNegotiateData = u.create() + return t + } + send() { + super.send() + } + } + class u { + constructor() { + this.appId = '' + this.rsaPublicKeyId = '' + this.algorithm = '' + this.secretKey = '' + this.iv = '' + } + static create() { + let t = new u() + t.appId = s.default.appid + t.rsaPublicKeyId = s.default.publicKeyId + t.algorithm = 'AES' + t.secretKey = n.default.getEncryptedSecretKey() + t.iv = n.default.getEncryptedIV() + return t + } + } + e['default'] = o + }, + 5301: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(9800)) + const s = i(r(323)) + const a = i(r(2544)) + class o extends n.default { + constructor() { + super(...arguments) + this.keyNegotiateResultData = new u() + } + static parse(t) { + let e = new o() + super.parseMsg(e, t) + e.keyNegotiateResultData = u.parse(e.data) + return e + } + receive() { + if (0 != this.keyNegotiateResultData.errorCode) { + console.error(`key negotiate fail: ${this.data}`) + return + } + let t = this.keyNegotiateResultData.encryptType.split('/') + if ( + !s.default.algorithmMap.has(t[0].trim().toLowerCase()) || + !s.default.modeMap.has(t[1].trim().toLowerCase()) || + !s.default.paddingMap.has(t[2].trim().toLowerCase()) + ) { + console.error(`key negotiate fail: ${this.data}`) + return + } + s.default.setEncryptParams( + t[0].trim().toLowerCase(), + t[1].trim().toLowerCase(), + t[2].trim().toLowerCase() + ) + a.default.create().send() + } + } + class u { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + this.encryptType = '' + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + e.encryptType = r.encryptType + return e + } + } + e['default'] = o + }, + 2544: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1754)) + const s = i(r(323)) + const a = i(r(9800)) + const o = i(r(3527)) + class u extends a.default { + constructor() { + super(...arguments) + this.loginData = new c() + } + static create() { + let t = new u() + super.initMsg(t) + t.command = a.default.Command.LOGIN + t.data = t.loginData = c.create() + return t + } + send() { + if ( + !this.loginData.session || + n.default.cid != s.default.md5Hex(this.loginData.session) + ) { + o.default.create().send() + return + } + super.send() + } + } + class c { + constructor() { + this.appId = '' + this.session = '' + } + static create() { + let t = new c() + t.appId = n.default.appid + t.session = n.default.session + return t + } + } + e['default'] = u + }, + 8734: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(207)) + const s = i(r(9800)) + const a = i(r(1754)) + const o = i(r(9214)) + const u = i(r(708)) + const c = i(r(2544)) + class l extends s.default { + constructor() { + super(...arguments) + this.loginResultData = new f() + } + static parse(t) { + let e = new l() + super.parseMsg(e, t) + e.loginResultData = f.parse(e.data) + return e + } + receive() { + var t + if (0 != this.loginResultData.errorCode) { + this.data + a.default.session = a.default.cid = '' + n.default.setSync(n.default.KEY_CID, '') + n.default.setSync(n.default.KEY_SESSION, '') + c.default.create().send() + return + } + if (!a.default.online) { + a.default.online = true + null === (t = a.default.onlineState) || + void 0 === t || + t.call(a.default.onlineState, { online: a.default.online }) + } + o.default.sendWaitingMessages() + u.default.create().send() + } + } + class f { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + this.session = '' + } + static parse(t) { + let e = new f() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + e.session = r.session + return e + } + } + e['default'] = l + }, + 9800: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + var n + Object.defineProperty(e, '__esModule', { value: true }) + const s = i(r(350)) + const a = i(r(3593)) + const o = i(r(127)) + const u = i(r(1754)) + class c { + constructor() { + this.version = '' + this.command = 0 + this.packetId = 0 + this.timeStamp = 0 + this.data = '' + this.signature = '' + } + static initMsg(t, ...e) { + t.version = o.default.SOCKET_PROTOCOL_VERSION + t.command = 0 + t.timeStamp = new Date().getTime() + return t + } + static parseMsg(t, e) { + let r = JSON.parse(e) + t.version = r.version + t.command = r.command + t.packetId = r.packetId + t.timeStamp = r.timeStamp + t.data = r.data + t.signature = r.signature + return t + } + stringify() { + return JSON.stringify(this, [ + 'version', + 'command', + 'packetId', + 'timeStamp', + 'data', + 'signature', + ]) + } + send() { + if (!a.default.isAvailable()) return + this.packetId = u.default.packetId++ + this.data = JSON.stringify(this.data) + this.stringify() + if (this.command != c.Command.HEART_BEAT) { + s.default.sign(this) + if (this.data && this.command != c.Command.KEY_NEGOTIATE) + s.default.encrypt(this) + } + a.default.send(this.stringify()) + } + } + c.Command = + ((n = class {}), + (n.HEART_BEAT = 0), + (n.KEY_NEGOTIATE = 1), + (n.KEY_NEGOTIATE_RESULT = 16), + (n.REGISTER = 2), + (n.REGISTER_RESULT = 32), + (n.LOGIN = 3), + (n.LOGIN_RESULT = 48), + (n.LOGOUT = 4), + (n.LOGOUT_RESULT = 64), + (n.CLIENT_MSG = 5), + (n.SERVER_MSG = 80), + (n.SERVER_CLOSE = 96), + n) + e['default'] = c + }, + 350: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(323)) + var s + ;(function (t) { + function e(t) { + t.data = n.default.encrypt(t.data) + } + t.encrypt = e + function r(t) { + t.data = n.default.decrypt(t.data) + } + t.decrypt = r + function i(t) { + t.signature = n.default.sha256( + `${t.timeStamp}${t.packetId}${t.command}${t.data}` + ) + } + t.sign = i + function s(t) { + let e = n.default.sha256( + `${t.timeStamp}${t.packetId}${t.command}${t.data}` + ) + if (t.signature != e) throw new Error(`msg signature vierfy failed`) + } + t.verify = s + })(s || (s = {})) + e['default'] = s + }, + 1236: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(5301)) + const s = i(r(8734)) + const a = i(r(9800)) + const o = i(r(7078)) + const u = i(r(538)) + const c = i(r(7821)) + const l = i(r(217)) + const f = i(r(7156)) + const h = i(r(2535)) + const d = i(r(9214)) + const v = i(r(7303)) + const p = i(r(6063)) + const g = i(r(7923)) + const y = i(r(350)) + const m = i(r(9214)) + const _ = i(r(6254)) + const S = i(r(5035)) + class E { + static receiveMessage(t) { + let e = a.default.parseMsg(new a.default(), t) + if ( + e.command != a.default.Command.KEY_NEGOTIATE_RESULT && + e.command != a.default.Command.HEART_BEAT && + e.command != a.default.Command.SERVER_CLOSE + ) + y.default.decrypt(e) + if ( + e.command != a.default.Command.HEART_BEAT && + e.command != a.default.Command.SERVER_CLOSE + ) + y.default.verify(e) + switch (e.command) { + case a.default.Command.KEY_NEGOTIATE_RESULT: + n.default.parse(e.stringify()).receive() + break + case a.default.Command.REGISTER_RESULT: + o.default.parse(e.stringify()).receive() + break + case a.default.Command.LOGIN_RESULT: + s.default.parse(e.stringify()).receive() + break + case a.default.Command.SERVER_MSG: + this.receiveActionMsg(e.stringify()) + break + case a.default.Command.SERVER_CLOSE: + S.default.parse(e.stringify()).receive() + break + default: + break + } + } + static receiveActionMsg(t) { + let e = m.default.parseActionMsg(new m.default(), t) + if ( + e.actionMsgData.msgAction != d.default.ServerAction.RECEIVED && + e.actionMsgData.msgAction != + d.default.ServerAction.REDIRECT_SERVER + ) { + let t = JSON.parse(e.actionMsgData.msgData) + _.default.create(t.id).send() + } + switch (e.actionMsgData.msgAction) { + case d.default.ServerAction.PUSH_MESSAGE: + f.default.parse(t).receive() + break + case d.default.ServerAction.REDIRECT_SERVER: + h.default.parse(t).receive() + break + case d.default.ServerAction.ADD_PHONE_INFO_RESULT: + u.default.parse(t).receive() + break + case d.default.ServerAction.SET_MODE_RESULT: + v.default.parse(t).receive() + break + case d.default.ServerAction.SET_TAG_RESULT: + p.default.parse(t).receive() + break + case d.default.ServerAction.BIND_ALIAS_RESULT: + c.default.parse(t).receive() + break + case d.default.ServerAction.UNBIND_ALIAS_RESULT: + g.default.parse(t).receive() + break + case d.default.ServerAction.FEED_BACK_RESULT: + l.default.parse(t).receive() + break + case d.default.ServerAction.RECEIVED: + _.default.parse(t).receive() + break + } + } + } + e['default'] = E + }, + 6254: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = r(3118) + const s = i(r(1754)) + const a = i(r(9214)) + class o extends a.default { + constructor() { + super(...arguments) + this.receivedData = new u() + } + static create(t) { + let e = new o() + super.initActionMsg(e) + e.callback = (t) => { + if ( + t.resultCode != n.ErrorCode.SUCCESS && + t.resultCode != n.ErrorCode.REPEAT_MESSAGE + ) + setTimeout(function () { + e.send() + }, 3 * 1e3) + } + e.actionMsgData.msgAction = a.default.ClientAction.RECEIVED + e.receivedData = u.create(t) + e.actionMsgData.msgData = JSON.stringify(e.receivedData) + return e + } + static parse(t) { + let e = new o() + super.parseActionMsg(e, t) + e.receivedData = u.parse(e.data) + return e + } + receive() { + var t + let e = a.default.getWaitingResponseMessage( + this.actionMsgData.msgId + ) + if ( + (e && + e.actionMsgData.msgAction == + a.default.ClientAction.ADD_PHONE_INFO) || + (e && + e.actionMsgData.msgAction == a.default.ClientAction.FEED_BACK) + ) { + a.default.removeWaitingResponseMessage(e.actionMsgData.msgId) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: n.ErrorCode.SUCCESS, + message: 'received', + }) + } + } + send() { + super.send() + } + } + class u { + constructor() { + this.msgId = '' + this.cid = '' + } + static create(t) { + let e = new u() + e.cid = s.default.cid + e.msgId = t + return e + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.cid = r.cid + e.msgId = r.msgId + return e + } + } + e['default'] = o + }, + 3527: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(1754)) + const s = i(r(9800)) + class a extends s.default { + constructor() { + super(...arguments) + this.registerData = new o() + } + static create() { + let t = new a() + super.initMsg(t) + t.command = s.default.Command.REGISTER + t.data = t.registerData = o.create() + return t + } + send() { + super.send() + } + } + class o { + constructor() { + this.appId = '' + this.regId = '' + } + static create() { + let t = new o() + t.appId = n.default.appid + t.regId = n.default.regId + return t + } + } + e['default'] = a + }, + 7078: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(9800)) + const s = i(r(207)) + const a = i(r(1754)) + const o = i(r(2544)) + class u extends n.default { + constructor() { + super(...arguments) + this.registerResultData = new c() + } + static parse(t) { + let e = new u() + super.parseMsg(e, t) + e.registerResultData = c.parse(e.data) + return e + } + receive() { + var t + if ( + 0 != this.registerResultData.errorCode || + !this.registerResultData.cid || + !this.registerResultData.session + ) { + console.error(`register fail: ${this.data}`) + return + } + if (a.default.cid != this.registerResultData.cid) + s.default.setSync(s.default.KEY_ADD_PHONE_INFO_TIME, 0) + a.default.cid = this.registerResultData.cid + null === (t = a.default.onClientId) || + void 0 === t || + t.call(a.default.onClientId, { cid: a.default.cid }) + s.default.set({ key: s.default.KEY_CID, data: a.default.cid }) + a.default.session = this.registerResultData.session + s.default.set({ + key: s.default.KEY_SESSION, + data: a.default.session, + }) + a.default.deviceId = this.registerResultData.deviceId + s.default.set({ + key: s.default.KEY_DEVICE_ID, + data: a.default.deviceId, + }) + o.default.create().send() + } + } + class c { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + this.cid = '' + this.session = '' + this.deviceId = '' + this.regId = '' + } + static parse(t) { + let e = new c() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + e.cid = r.cid + e.session = r.session + e.deviceId = r.deviceId + e.regId = r.regId + return e + } + } + e['default'] = u + }, + 5035: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(3593)) + const s = i(r(9800)) + class a extends s.default { + constructor() { + super(...arguments) + this.serverCloseData = new o() + } + static parse(t) { + let e = new a() + super.parseMsg(e, t) + e.serverCloseData = o.parse(e.data) + return e + } + receive() { + this.data + if ( + 20 == this.serverCloseData.code || + 23 == this.serverCloseData.code || + 24 == this.serverCloseData.code + ) + n.default.allowReconnect = false + n.default.close() + } + } + class o { + constructor() { + this.code = -1 + this.msg = '' + } + static parse(t) { + let e = new o() + let r = JSON.parse(t) + e.code = r.code + e.msg = r.msg + return e + } + } + e['default'] = a + }, + 538: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(207)) + const s = i(r(9214)) + class a extends s.default { + constructor() { + super(...arguments) + this.addPhoneInfoResultData = new o() + } + static parse(t) { + let e = new a() + super.parseActionMsg(e, t) + e.addPhoneInfoResultData = o.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + this.addPhoneInfoResultData + let e = s.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: this.addPhoneInfoResultData.errorCode, + message: this.addPhoneInfoResultData.errorMsg, + }) + n.default.set({ + key: n.default.KEY_ADD_PHONE_INFO_TIME, + data: new Date().getTime(), + }) + } + } + class o { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + } + static parse(t) { + let e = new o() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + return e + } + } + e['default'] = a + }, + 7821: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(207)) + const s = i(r(1237)) + const a = i(r(9214)) + class o extends a.default { + constructor() { + super(...arguments) + this.bindAliasResultData = new u() + } + static parse(t) { + let e = new o() + super.parseActionMsg(e, t) + e.bindAliasResultData = u.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + s.default.info(`bind alias result`, this.bindAliasResultData) + let e = a.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: this.bindAliasResultData.errorCode, + message: this.bindAliasResultData.errorMsg, + }) + n.default.set({ + key: n.default.KEY_BIND_ALIAS_TIME, + data: new Date().getTime(), + }) + } + } + class u { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + return e + } + } + e['default'] = o + }, + 217: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = r(3118) + const s = i(r(9214)) + class a extends s.default { + constructor() { + super(...arguments) + this.feedbackResultData = new o() + } + static parse(t) { + let e = new a() + super.parseActionMsg(e, t) + e.feedbackResultData = o.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + this.feedbackResultData + let e = s.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: n.ErrorCode.SUCCESS, + message: 'received', + }) + } + } + class o { + constructor() { + this.actionId = '' + this.taskId = '' + this.result = '' + } + static parse(t) { + let e = new o() + let r = JSON.parse(t) + e.actionId = r.actionId + e.taskId = r.taskId + e.result = r.result + return e + } + } + e['default'] = a + }, + 7156: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + var n + Object.defineProperty(e, '__esModule', { value: true }) + const s = i(r(1754)) + const a = i(r(9214)) + const o = i(r(652)) + class u extends a.default { + constructor() { + super(...arguments) + this.pushMessageData = new c() + } + static parse(t) { + let e = new u() + super.parseActionMsg(e, t) + e.pushMessageData = c.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + this.pushMessageData + if ( + this.pushMessageData.appId != s.default.appid || + !this.pushMessageData.messageid || + !this.pushMessageData.taskId + ) + this.stringify() + o.default.create(this, o.default.ActionId.RECEIVE).send() + o.default.create(this, o.default.ActionId.MP_RECEIVE).send() + if (this.actionMsgData.msgExtraData && s.default.onPushMsg) + null === (t = s.default.onPushMsg) || + void 0 === t || + t.call(s.default.onPushMsg, { + message: this.actionMsgData.msgExtraData, + }) + } + } + class c { + constructor() { + this.id = '' + this.appKey = '' + this.appId = '' + this.messageid = '' + this.taskId = '' + this.actionChain = [] + this.cdnType = '' + } + static parse(t) { + let e = new c() + let r = JSON.parse(t) + e.id = r.id + e.appKey = r.appKey + e.appId = r.appId + e.messageid = r.messageid + e.taskId = r.taskId + e.actionChain = r.actionChain + e.cdnType = r.cdnType + return e + } + } + class l { + constructor() { + this.type = '' + this.actionid = '' + this.do = '' + } + } + l.Type = + ((n = class {}), (n.GO_TO = 'goto'), (n.TRANSMIT = 'transmit'), n) + e['default'] = u + }, + 2535: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(3593)) + const s = i(r(1754)) + const a = i(r(9214)) + class o extends a.default { + constructor() { + super(...arguments) + this.redirectServerData = new u() + } + static parse(t) { + let e = new o() + super.parseActionMsg(e, t) + e.redirectServerData = u.parse(e.actionMsgData.msgData) + return e + } + receive() { + s.default.socketUrl = + this.redirectServerData.addressList.split(',')[0] + n.default.connect() + } + } + class u { + constructor() { + this.addressList = '' + this.delay = 0 + this.location = '' + this.idConfig = '' + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.addressList = r.addressList + e.delay = r.delay + e.location = r.location + e.idConfig = r.idConfig + return e + } + } + e['default'] = o + }, + 7303: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(9214)) + class s extends n.default { + constructor() { + super(...arguments) + this.setModeResultData = new a() + } + static parse(t) { + let e = new s() + super.parseActionMsg(e, t) + e.setModeResultData = a.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + this.setModeResultData + let e = n.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: this.setModeResultData.errorCode, + message: this.setModeResultData.errorMsg, + }) + } + } + class a { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + } + static parse(t) { + let e = new a() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + return e + } + } + e['default'] = s + }, + 6063: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(207)) + const s = i(r(1237)) + const a = i(r(9214)) + class o extends a.default { + constructor() { + super(...arguments) + this.setTagResultData = new u() + } + static parse(t) { + let e = new o() + super.parseActionMsg(e, t) + e.setTagResultData = u.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + s.default.info(`set tag result`, this.setTagResultData) + let e = a.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: this.setTagResultData.errorCode, + message: this.setTagResultData.errorMsg, + }) + n.default.set({ + key: n.default.KEY_SET_TAG_TIME, + data: new Date().getTime(), + }) + } + } + class u { + constructor() { + this.errorCode = 0 + this.errorMsg = '' + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + return e + } + } + e['default'] = o + }, + 7923: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(207)) + const s = i(r(1237)) + const a = i(r(9214)) + class o extends a.default { + constructor() { + super(...arguments) + this.unbindAliasResultData = new u() + } + static parse(t) { + let e = new o() + super.parseActionMsg(e, t) + e.unbindAliasResultData = u.parse(e.actionMsgData.msgData) + return e + } + receive() { + var t + s.default.info(`unbind alias result`, this.unbindAliasResultData) + let e = a.default.removeWaitingResponseMessage( + this.actionMsgData.msgId + ) + if (e) + null === (t = e.callback) || + void 0 === t || + t.call(e.callback, { + resultCode: this.unbindAliasResultData.errorCode, + message: this.unbindAliasResultData.errorMsg, + }) + n.default.set({ + key: n.default.KEY_BIND_ALIAS_TIME, + data: new Date().getTime(), + }) + } + } + class u { + constructor() { + this.errorCode = -1 + this.errorMsg = '' + } + static parse(t) { + let e = new u() + let r = JSON.parse(t) + e.errorCode = r.errorCode + e.errorMsg = r.errorMsg + return e + } + } + e['default'] = o + }, + 9285: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + class r { + constructor(t) { + this.delay = 10 + this.delay = t + } + start() { + this.cancel() + let t = this + this.timer = setInterval(function () { + t.run() + }, this.delay) + } + cancel() { + if (this.timer) clearInterval(this.timer) + } + } + e['default'] = r + }, + 1571: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + var n + Object.defineProperty(e, '__esModule', { value: true }) + const s = i(r(6561)) + const a = i(r(9285)) + class o extends a.default { + static getInstance() { + return o.InstanceHolder.instance + } + run() { + s.default.create().send() + } + refresh() { + this.delay = 60 * 1e3 + this.start() + } + } + o.INTERVAL = 60 * 1e3 + o.InstanceHolder = ((n = class {}), (n.instance = new o(o.INTERVAL)), n) + e['default'] = o + }, + 3270: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + var r + ;(function (t) { + let e + let r + try { + e = uni.getSystemInfoSync() + r = uni.getAccountInfoSync() + } catch (t) {} + function i() { + let t = '' + try { + t = e ? e.platform : '' + } catch (t) {} + return t ? t : '' + } + t.os = i + function n() { + let t = '' + try { + t = e ? e.model : '' + } catch (t) {} + return t ? t : '' + } + t.model = n + function s() { + let t = '' + try { + t = e ? e.brand : '' + } catch (t) {} + return t ? t : '' + } + t.brand = s + function a() { + let t = '' + try { + t = e ? e.system : '' + // #ifdef MP-ALIPAY + let r = i() + if (t && r && !t.toLocaleLowerCase().startsWith(r.toLowerCase())) + t = i() + ' ' + t + // #endif + } catch (t) {} + return t ? t : '' + } + t.osVersion = a + function o() { + let t = '' + // #ifdef APP-PLUS + t = 'APP-PLUS' + // #endif + // #ifdef APP-PLUS-NVUE + t = 'APP-PLUS-NVUE' + // #endif + // #ifdef APP-NVUE + t = 'APP-NVUE' + // #endif + // #ifdef H5 + t = 'H5' + // #endif + // #ifdef MP-WEIXIN + t = 'MP-WEIXIN' + // #endif + // #ifdef MP-ALIPAY + t = 'MP-ALIPAY' + // #endif + // #ifdef MP-BAIDU + t = 'MP-BAIDU' + // #endif + // #ifdef MP-TOUTIAO + t = 'MP-TOUTIAO' + // #endif + // #ifdef MP-LARK + t = 'MP-LARK' + // #endif + // #ifdef MP-QQ + t = 'MP-QQ' + // #endif + // #ifdef MP-KUAISHOU + t = 'MP-KUAISHOU' + // #endif + // #ifdef MP-360 + t = 'MP-360' + // #endif + // #ifdef QUICKAPP-WEBVIEW + t = 'QUICKAPP-WEBVIEW' + // #endif + // #ifdef QUICKAPP-WEBVIEW-UNION + t = 'QUICKAPP-WEBVIEW-UNION' + // #endif + return t + } + t.platform = o + function u() { + let t = '' + try { + t = e ? e.version : '' + } catch (t) {} + return t ? t : '' + } + t.platformVersion = u + function c() { + let t = '' + try { + t = r ? r.miniProgram.appId : '' + } catch (t) {} + return t ? t : '' + } + t.platformId = c + function l() { + let t = '' + try { + t = e ? e.language : '' + } catch (t) {} + return t ? t : '' + } + t.language = l + function f() { + return '' + } + t.imei = f + function h() { + return '' + } + t.oaid = h + function d(t) { + uni.getNetworkType({ + success: (e) => { + var r + null === (r = t.success) || + void 0 === r || + r.call(t.success, e.networkType) + }, + fail: (e) => { + var r + null === (r = t.fail) || void 0 === r || r.call(t.fail, e) + }, + }) + } + t.getNetworkType = d + function v(t) { + uni.onNetworkStatusChange((e) => { + t.call(t, e) + }) + } + t.onNetworkStatusChange = v + })(r || (r = {})) + e['default'] = r + }, + 3593: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(358)) + const s = i(r(1754)) + const a = i(r(1236)) + const o = i(r(1571)) + const u = i(r(1237)) + var c + ;(function (t) { + let e + let r = false + let i = false + t.allowReconnect = true + function c() { + return r && i + } + t.isAvailable = c + function l(e) { + if (!t.allowReconnect) return + setTimeout(function () { + f() + }, e) + } + t.reconnect = l + function f() { + t.allowReconnect = true + if (!s.default.networkConnected) { + u.default.info(`connect failed, network is not available`) + return + } + if (i || r) return + let n = s.default.socketUrl + e = uni.connectSocket({ + url: n, + success: function () { + i = true + h() + }, + fail: function () { + i = false + p('') + }, + }) + // #ifdef MP-ALIPAY + uni.onSocketOpen(g) + uni.onSocketMessage(y) + uni.onSocketError(m) + uni.onSocketClose(_) + // #endif + // #ifndef MP-ALIPAY + e.onOpen(g) + e.onMessage(y) + e.onError(m) + e.onClose(_) + // #endif + } + t.connect = f + function h() { + if (i && r) { + n.default.create().send() + o.default.getInstance().start() + } + } + function d(t) { + // #ifdef MP-ALIPAY + uni.closeSocket({ + reason: t, + success: function (t) {}, + fail: function (t) { + p(t) + }, + }) + // #endif + // #ifndef MP-ALIPAY + e.close({ + reason: t, + success: function (t) {}, + fail: function (t) { + p(t) + }, + }) + // #endif + } + t.close = d + function v(t) { + if (r && r) { + // #ifdef MP-ALIPAY + uni.sendSocketMessage({ + data: t, + success: function (t) {}, + fail: function (t) {}, + }) + // #endif + // #ifndef MP-ALIPAY + e.send({ + data: t, + success: function (t) {}, + fail: function (t) {}, + }) + // #endif + } else throw new Error(`socket not connect`) + } + t.send = v + function p(t) { + var e, n + i = false + r = false + o.default.getInstance().cancel() + if (s.default.online) { + s.default.online = false + null === (e = s.default.onlineState) || + void 0 === e || + e.call(s.default.onlineState, { online: s.default.online }) + } + if (s.default.online) { + s.default.online = false + null === (n = s.default.onlineState) || + void 0 === n || + n.call(s.default.onlineState, { online: s.default.online }) + } + l(1e3) + } + let g = function (t) { + r = true + h() + } + let y = function (t) { + try { + t.data + o.default.getInstance().refresh() + a.default.receiveMessage(t.data) + } catch (t) {} + } + let m = function (t) { + d(`socket error`) + } + let _ = function (t) { + p(t) + } + })(c || (c = {})) + e['default'] = c + }, + 207: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + var r + ;(function (t) { + t.KEY_APPID = 'appid' + t.KEY_CID = 'cid' + t.KEY_SESSION = 'session' + t.KEY_REGID = 'regid' + t.KEY_SOCKET_URL = 'socket_url' + t.KEY_DEVICE_ID = 'deviceid' + t.KEY_ADD_PHONE_INFO_TIME = 'api_time' + t.KEY_BIND_ALIAS_TIME = 'ba_time' + t.KEY_SET_TAG_TIME = 'st_time' + function e(t, e) { + uni.setStorageSync(t, e) + } + t.setSync = e + function r(t) { + uni.setStorage({ + key: t.key, + data: t.data, + fail: () => { + var e + t.key, t.data + null === (e = t.fail) || void 0 === e || e.call(t) + }, + }) + } + t.set = r + function i(t, e) { + let r = e + try { + let e = uni.getStorageSync(t) + if (e) r = e + } catch (t) {} + return r + } + t.getSync = i + function n(t) { + uni.getStorage({ + key: t.key, + success: (e) => { + var r + null === (r = t.success) || void 0 === r || r.call(t, e.data) + }, + fail: () => { + var e + t.key + null === (e = t.fail) || void 0 === e || e.call(t) + }, + }) + } + t.get = n + })(r || (r = {})) + e['default'] = r + }, + 323: function (t, e, r) { + 'use strict' + var i = + (this && this.__importDefault) || + function (t) { + return t && t.__esModule ? t : { default: t } + } + Object.defineProperty(e, '__esModule', { value: true }) + const n = i(r(3357)) + const s = i(r(1354)) + const a = i(r(1754)) + var o + ;(function (t) { + let e + let r + let i + let o + let u = new n.default() + let c = s.default.mode.CBC + let l = s.default.pad.Pkcs7 + let f = s.default.AES + t.algorithmMap = new Map([['aes', s.default.AES]]) + t.modeMap = new Map([ + ['cbc', s.default.mode.CBC], + ['cfb', s.default.mode.CFB], + ['cfb128', s.default.mode.CFB], + ['ecb', s.default.mode.ECB], + ['ofb', s.default.mode.OFB], + ]) + t.paddingMap = new Map([ + ['nopadding', s.default.pad.NoPadding], + ['pkcs7', s.default.pad.Pkcs7], + ]) + function h() { + e = s.default.MD5(new Date().getTime().toString()) + r = s.default.MD5(e) + u.setPublicKey(a.default.publicKey) + e.toString(s.default.enc.Hex) + r.toString(s.default.enc.Hex) + i = u.encrypt(e.toString(s.default.enc.Hex)) + o = u.encrypt(r.toString(s.default.enc.Hex)) + } + t.resetKey = h + function d(e, r, i) { + f = t.algorithmMap.get(e) + c = t.modeMap.get(r) + l = t.paddingMap.get(i) + } + t.setEncryptParams = d + function v(t) { + return f.encrypt(t, e, { iv: r, mode: c, padding: l }).toString() + } + t.encrypt = v + function p(t) { + return f + .decrypt(t, e, { iv: r, mode: c, padding: l }) + .toString(s.default.enc.Utf8) + } + t.decrypt = p + function g(t) { + return s.default.SHA256(t).toString(s.default.enc.Base64) + } + t.sha256 = g + function y(t) { + return s.default.MD5(t).toString(s.default.enc.Hex) + } + t.md5Hex = y + function m() { + return i ? i : '' + } + t.getEncryptedSecretKey = m + function _() { + return o ? o : '' + } + t.getEncryptedIV = _ + })(o || (o = {})) + e['default'] = o + }, + 1237: (t, e) => { + 'use strict' + Object.defineProperty(e, '__esModule', { value: true }) + class r { + static info(...t) { + if (this.debugMode) console.info(`[GtPush]`, t) + } + static error(...t) { + console.error(`[GtPush]`, t) + } + } + r.debugMode = false + e['default'] = r + }, + 3357: (t, e, r) => { + 'use strict' + r.r(e) + r.d(e, { JSEncrypt: () => _t, default: () => St }) + var i = '0123456789abcdefghijklmnopqrstuvwxyz' + function n(t) { + return i.charAt(t) + } + function s(t, e) { + return t & e + } + function a(t, e) { + return t | e + } + function o(t, e) { + return t ^ e + } + function u(t, e) { + return t & ~e + } + function c(t) { + if (0 == t) return -1 + var e = 0 + if (0 == (65535 & t)) { + t >>= 16 + e += 16 + } + if (0 == (255 & t)) { + t >>= 8 + e += 8 + } + if (0 == (15 & t)) { + t >>= 4 + e += 4 + } + if (0 == (3 & t)) { + t >>= 2 + e += 2 + } + if (0 == (1 & t)) ++e + return e + } + function l(t) { + var e = 0 + while (0 != t) { + t &= t - 1 + ++e + } + return e + } + var f = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + var h = '=' + function d(t) { + var e + var r + var i = '' + for (e = 0; e + 3 <= t.length; e += 3) { + r = parseInt(t.substring(e, e + 3), 16) + i += f.charAt(r >> 6) + f.charAt(63 & r) + } + if (e + 1 == t.length) { + r = parseInt(t.substring(e, e + 1), 16) + i += f.charAt(r << 2) + } else if (e + 2 == t.length) { + r = parseInt(t.substring(e, e + 2), 16) + i += f.charAt(r >> 2) + f.charAt((3 & r) << 4) + } + while ((3 & i.length) > 0) i += h + return i + } + function v(t) { + var e = '' + var r + var i = 0 + var s = 0 + for (r = 0; r < t.length; ++r) { + if (t.charAt(r) == h) break + var a = f.indexOf(t.charAt(r)) + if (a < 0) continue + if (0 == i) { + e += n(a >> 2) + s = 3 & a + i = 1 + } else if (1 == i) { + e += n((s << 2) | (a >> 4)) + s = 15 & a + i = 2 + } else if (2 == i) { + e += n(s) + e += n(a >> 2) + s = 3 & a + i = 3 + } else { + e += n((s << 2) | (a >> 4)) + e += n(15 & a) + i = 0 + } + } + if (1 == i) e += n(s << 2) + return e + } + function p(t) { + var e = v(t) + var r + var i = [] + for (r = 0; 2 * r < e.length; ++r) + i[r] = parseInt(e.substring(2 * r, 2 * r + 2), 16) + return i + } + var g + var y = { + decode: function (t) { + var e + if (void 0 === g) { + var r = '0123456789ABCDEF' + var i = ' \f\n\r\t \u2028\u2029' + g = {} + for (e = 0; e < 16; ++e) g[r.charAt(e)] = e + r = r.toLowerCase() + for (e = 10; e < 16; ++e) g[r.charAt(e)] = e + for (e = 0; e < i.length; ++e) g[i.charAt(e)] = -1 + } + var n = [] + var s = 0 + var a = 0 + for (e = 0; e < t.length; ++e) { + var o = t.charAt(e) + if ('=' == o) break + o = g[o] + if (-1 == o) continue + if (void 0 === o) + throw new Error('Illegal character at offset ' + e) + s |= o + if (++a >= 2) { + n[n.length] = s + s = 0 + a = 0 + } else s <<= 4 + } + if (a) throw new Error('Hex encoding incomplete: 4 bits missing') + return n + }, + } + var m + var _ = { + decode: function (t) { + var e + if (void 0 === m) { + var r = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + var i = '= \f\n\r\t \u2028\u2029' + m = Object.create(null) + for (e = 0; e < 64; ++e) m[r.charAt(e)] = e + m['-'] = 62 + m['_'] = 63 + for (e = 0; e < i.length; ++e) m[i.charAt(e)] = -1 + } + var n = [] + var s = 0 + var a = 0 + for (e = 0; e < t.length; ++e) { + var o = t.charAt(e) + if ('=' == o) break + o = m[o] + if (-1 == o) continue + if (void 0 === o) + throw new Error('Illegal character at offset ' + e) + s |= o + if (++a >= 4) { + n[n.length] = s >> 16 + n[n.length] = (s >> 8) & 255 + n[n.length] = 255 & s + s = 0 + a = 0 + } else s <<= 6 + } + switch (a) { + case 1: + throw new Error( + 'Base64 encoding incomplete: at least 2 bits missing' + ) + case 2: + n[n.length] = s >> 10 + break + case 3: + n[n.length] = s >> 16 + n[n.length] = (s >> 8) & 255 + break + } + return n + }, + re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/, + unarmor: function (t) { + var e = _.re.exec(t) + if (e) + if (e[1]) t = e[1] + else if (e[2]) t = e[2] + else throw new Error('RegExp out of sync') + return _.decode(t) + }, + } + var S = 1e13 + var E = (function () { + function t(t) { + this.buf = [+t || 0] + } + t.prototype.mulAdd = function (t, e) { + var r = this.buf + var i = r.length + var n + var s + for (n = 0; n < i; ++n) { + s = r[n] * t + e + if (s < S) e = 0 + else { + e = 0 | (s / S) + s -= e * S + } + r[n] = s + } + if (e > 0) r[n] = e + } + t.prototype.sub = function (t) { + var e = this.buf + var r = e.length + var i + var n + for (i = 0; i < r; ++i) { + n = e[i] - t + if (n < 0) { + n += S + t = 1 + } else t = 0 + e[i] = n + } + while (0 === e[e.length - 1]) e.pop() + } + t.prototype.toString = function (t) { + if (10 != (t || 10)) throw new Error('only base 10 is supported') + var e = this.buf + var r = e[e.length - 1].toString() + for (var i = e.length - 2; i >= 0; --i) + r += (S + e[i]).toString().substring(1) + return r + } + t.prototype.valueOf = function () { + var t = this.buf + var e = 0 + for (var r = t.length - 1; r >= 0; --r) e = e * S + t[r] + return e + } + t.prototype.simplify = function () { + var t = this.buf + return 1 == t.length ? t[0] : this + } + return t + })() + var b = '…' + var w = + /^(\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)?)?$/ + var D = + /^(\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 T(t, e) { + if (t.length > e) t = t.substring(0, e) + b + return t + } + var A = (function () { + function t(e, r) { + this.hexDigits = '0123456789ABCDEF' + if (e instanceof t) { + this.enc = e.enc + this.pos = e.pos + } else { + this.enc = e + this.pos = r + } + } + t.prototype.get = function (t) { + if (void 0 === t) t = this.pos++ + if (t >= this.enc.length) + throw new Error( + 'Requesting byte offset ' + + t + + ' on a stream of length ' + + this.enc.length + ) + return 'string' === typeof this.enc + ? this.enc.charCodeAt(t) + : this.enc[t] + } + t.prototype.hexByte = function (t) { + return ( + this.hexDigits.charAt((t >> 4) & 15) + + this.hexDigits.charAt(15 & t) + ) + } + t.prototype.hexDump = function (t, e, r) { + var i = '' + for (var n = t; n < e; ++n) { + i += this.hexByte(this.get(n)) + if (true !== r) + switch (15 & n) { + case 7: + i += ' ' + break + case 15: + i += '\n' + break + default: + i += ' ' + } + } + return i + } + t.prototype.isASCII = function (t, e) { + for (var r = t; r < e; ++r) { + var i = this.get(r) + if (i < 32 || i > 176) return false + } + return true + } + t.prototype.parseStringISO = function (t, e) { + var r = '' + for (var i = t; i < e; ++i) r += String.fromCharCode(this.get(i)) + return r + } + t.prototype.parseStringUTF = function (t, e) { + var r = '' + for (var i = t; i < e; ) { + var n = this.get(i++) + if (n < 128) r += String.fromCharCode(n) + else if (n > 191 && n < 224) + r += String.fromCharCode(((31 & n) << 6) | (63 & this.get(i++))) + else + r += String.fromCharCode( + ((15 & n) << 12) | + ((63 & this.get(i++)) << 6) | + (63 & this.get(i++)) + ) + } + return r + } + t.prototype.parseStringBMP = function (t, e) { + var r = '' + var i + var n + for (var s = t; s < e; ) { + i = this.get(s++) + n = this.get(s++) + r += String.fromCharCode((i << 8) | n) + } + return r + } + t.prototype.parseTime = function (t, e, r) { + var i = this.parseStringISO(t, e) + var n = (r ? w : D).exec(i) + if (!n) return 'Unrecognized time: ' + i + if (r) { + n[1] = +n[1] + n[1] += +n[1] < 70 ? 2e3 : 1900 + } + i = n[1] + '-' + n[2] + '-' + n[3] + ' ' + n[4] + if (n[5]) { + i += ':' + n[5] + if (n[6]) { + i += ':' + n[6] + if (n[7]) i += '.' + n[7] + } + } + if (n[8]) { + i += ' UTC' + if ('Z' != n[8]) { + i += n[8] + if (n[9]) i += ':' + n[9] + } + } + return i + } + t.prototype.parseInteger = function (t, e) { + var r = this.get(t) + var i = r > 127 + var n = i ? 255 : 0 + var s + var a = '' + while (r == n && ++t < e) r = this.get(t) + s = e - t + if (0 === s) return i ? -1 : 0 + if (s > 4) { + a = r + s <<= 3 + while (0 == (128 & (+a ^ n))) { + a = +a << 1 + --s + } + a = '(' + s + ' bit)\n' + } + if (i) r -= 256 + var o = new E(r) + for (var u = t + 1; u < e; ++u) o.mulAdd(256, this.get(u)) + return a + o.toString() + } + t.prototype.parseBitString = function (t, e, r) { + var i = this.get(t) + var n = ((e - t - 1) << 3) - i + var s = '(' + n + ' bit)\n' + var a = '' + for (var o = t + 1; o < e; ++o) { + var u = this.get(o) + var c = o == e - 1 ? i : 0 + for (var l = 7; l >= c; --l) a += (u >> l) & 1 ? '1' : '0' + if (a.length > r) return s + T(a, r) + } + return s + a + } + t.prototype.parseOctetString = function (t, e, r) { + if (this.isASCII(t, e)) return T(this.parseStringISO(t, e), r) + var i = e - t + var n = '(' + i + ' byte)\n' + r /= 2 + if (i > r) e = t + r + for (var s = t; s < e; ++s) n += this.hexByte(this.get(s)) + if (i > r) n += b + return n + } + t.prototype.parseOID = function (t, e, r) { + var i = '' + var n = new E() + var s = 0 + for (var a = t; a < e; ++a) { + var o = this.get(a) + n.mulAdd(128, 127 & o) + s += 7 + if (!(128 & o)) { + if ('' === i) { + n = n.simplify() + if (n instanceof E) { + n.sub(80) + i = '2.' + n.toString() + } else { + var u = n < 80 ? (n < 40 ? 0 : 1) : 2 + i = u + '.' + (n - 40 * u) + } + } else i += '.' + n.toString() + if (i.length > r) return T(i, r) + n = new E() + s = 0 + } + } + if (s > 0) i += '.incomplete' + return i + } + return t + })() + var M = (function () { + function t(t, e, r, i, n) { + if (!(i instanceof I)) throw new Error('Invalid tag value.') + this.stream = t + this.header = e + this.length = r + this.tag = i + this.sub = n + } + t.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() + } + } + t.prototype.content = function (t) { + if (void 0 === this.tag) return null + if (void 0 === t) t = 1 / 0 + var e = this.posContent() + var r = Math.abs(this.length) + if (!this.tag.isUniversal()) { + if (null !== this.sub) return '(' + this.sub.length + ' elem)' + return this.stream.parseOctetString(e, e + r, t) + } + switch (this.tag.tagNumber) { + case 1: + return 0 === this.stream.get(e) ? 'false' : 'true' + case 2: + return this.stream.parseInteger(e, e + r) + case 3: + return this.sub + ? '(' + this.sub.length + ' elem)' + : this.stream.parseBitString(e, e + r, t) + case 4: + return this.sub + ? '(' + this.sub.length + ' elem)' + : this.stream.parseOctetString(e, e + r, t) + case 6: + return this.stream.parseOID(e, e + r, t) + case 16: + case 17: + if (null !== this.sub) return '(' + this.sub.length + ' elem)' + else return '(no elem)' + case 12: + return T(this.stream.parseStringUTF(e, e + r), t) + case 18: + case 19: + case 20: + case 21: + case 22: + case 26: + return T(this.stream.parseStringISO(e, e + r), t) + case 30: + return T(this.stream.parseStringBMP(e, e + r), t) + case 23: + case 24: + return this.stream.parseTime(e, e + r, 23 == this.tag.tagNumber) + } + return null + } + t.prototype.toString = function () { + return ( + this.typeName() + + '@' + + this.stream.pos + + '[header:' + + this.header + + ',length:' + + this.length + + ',sub:' + + (null === this.sub ? 'null' : this.sub.length) + + ']' + ) + } + t.prototype.toPrettyString = function (t) { + if (void 0 === t) t = '' + var e = t + this.typeName() + ' @' + this.stream.pos + if (this.length >= 0) e += '+' + e += this.length + if (this.tag.tagConstructed) e += ' (constructed)' + else if ( + this.tag.isUniversal() && + (3 == this.tag.tagNumber || 4 == this.tag.tagNumber) && + null !== this.sub + ) + e += ' (encapsulates)' + e += '\n' + if (null !== this.sub) { + t += ' ' + for (var r = 0, i = this.sub.length; r < i; ++r) + e += this.sub[r].toPrettyString(t) + } + return e + } + t.prototype.posStart = function () { + return this.stream.pos + } + t.prototype.posContent = function () { + return this.stream.pos + this.header + } + t.prototype.posEnd = function () { + return this.stream.pos + this.header + Math.abs(this.length) + } + t.prototype.toHexString = function () { + return this.stream.hexDump(this.posStart(), this.posEnd(), true) + } + t.decodeLength = function (t) { + var e = t.get() + var r = 127 & e + if (r == e) return r + if (r > 6) + throw new Error( + 'Length over 48 bits not supported at position ' + (t.pos - 1) + ) + if (0 === r) return null + e = 0 + for (var i = 0; i < r; ++i) e = 256 * e + t.get() + return e + } + t.prototype.getHexStringValue = function () { + var t = this.toHexString() + var e = 2 * this.header + var r = 2 * this.length + return t.substr(e, r) + } + t.decode = function (e) { + var r + if (!(e instanceof A)) r = new A(e, 0) + else r = e + var i = new A(r) + var n = new I(r) + var s = t.decodeLength(r) + var a = r.pos + var o = a - i.pos + var u = null + var c = function () { + var e = [] + if (null !== s) { + var i = a + s + while (r.pos < i) e[e.length] = t.decode(r) + if (r.pos != i) + throw new Error( + 'Content size is not correct for container starting at offset ' + + a + ) + } else + try { + for (;;) { + var n = t.decode(r) + if (n.tag.isEOC()) break + e[e.length] = n + } + s = a - r.pos + } catch (t) { + throw new Error( + 'Exception while decoding undefined length content: ' + t + ) + } + return e + } + if (n.tagConstructed) u = c() + else if (n.isUniversal() && (3 == n.tagNumber || 4 == n.tagNumber)) + try { + if (3 == n.tagNumber) + if (0 != r.get()) + throw new Error( + 'BIT STRINGs with unused bits cannot encapsulate.' + ) + u = c() + for (var l = 0; l < u.length; ++l) + if (u[l].tag.isEOC()) + throw new Error('EOC is not supposed to be actual content.') + } catch (t) { + u = null + } + if (null === u) { + if (null === s) + throw new Error( + "We can't skip over an invalid tag with undefined length at offset " + + a + ) + r.pos = a + Math.abs(s) + } + return new t(i, o, s, n, u) + } + return t + })() + var I = (function () { + function t(t) { + var e = t.get() + this.tagClass = e >> 6 + this.tagConstructed = 0 !== (32 & e) + this.tagNumber = 31 & e + if (31 == this.tagNumber) { + var r = new E() + do { + e = t.get() + r.mulAdd(128, 127 & e) + } while (128 & e) + this.tagNumber = r.simplify() + } + } + t.prototype.isUniversal = function () { + return 0 === this.tagClass + } + t.prototype.isEOC = function () { + return 0 === this.tagClass && 0 === this.tagNumber + } + return t + })() + var R + var x = 0xdeadbeefcafe + var B = 15715070 == (16777215 & x) + var C = [ + 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, + ] + var O = (1 << 26) / C[C.length - 1] + var k = (function () { + function t(t, e, r) { + if (null != t) + if ('number' == typeof t) this.fromNumber(t, e, r) + else if (null == e && 'string' != typeof t) + this.fromString(t, 256) + else this.fromString(t, e) + } + t.prototype.toString = function (t) { + if (this.s < 0) return '-' + this.negate().toString(t) + var e + if (16 == t) e = 4 + else if (8 == t) e = 3 + else if (2 == t) e = 1 + else if (32 == t) e = 5 + else if (4 == t) e = 2 + else return this.toRadix(t) + var r = (1 << e) - 1 + var i + var s = false + var a = '' + var o = this.t + var u = this.DB - ((o * this.DB) % e) + if (o-- > 0) { + if (u < this.DB && (i = this[o] >> u) > 0) { + s = true + a = n(i) + } + while (o >= 0) { + if (u < e) { + i = (this[o] & ((1 << u) - 1)) << (e - u) + i |= this[--o] >> (u += this.DB - e) + } else { + i = (this[o] >> (u -= e)) & r + if (u <= 0) { + u += this.DB + --o + } + } + if (i > 0) s = true + if (s) a += n(i) + } + } + return s ? a : '0' + } + t.prototype.negate = function () { + var e = L() + t.ZERO.subTo(this, e) + return e + } + t.prototype.abs = function () { + return this.s < 0 ? this.negate() : this + } + t.prototype.compareTo = function (t) { + var e = this.s - t.s + if (0 != e) return e + var r = this.t + e = r - t.t + if (0 != e) return this.s < 0 ? -e : e + while (--r >= 0) if (0 != (e = this[r] - t[r])) return e + return 0 + } + t.prototype.bitLength = function () { + if (this.t <= 0) return 0 + return ( + this.DB * (this.t - 1) + W(this[this.t - 1] ^ (this.s & this.DM)) + ) + } + t.prototype.mod = function (e) { + var r = L() + this.abs().divRemTo(e, null, r) + if (this.s < 0 && r.compareTo(t.ZERO) > 0) e.subTo(r, r) + return r + } + t.prototype.modPowInt = function (t, e) { + var r + if (t < 256 || e.isEven()) r = new N(e) + else r = new V(e) + return this.exp(t, r) + } + t.prototype.clone = function () { + var t = L() + this.copyTo(t) + return t + } + t.prototype.intValue = function () { + if (this.s < 0) { + if (1 == this.t) return this[0] - this.DV + else if (0 == this.t) return -1 + } else if (1 == this.t) return this[0] + else if (0 == this.t) return 0 + return ( + ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0] + ) + } + t.prototype.byteValue = function () { + return 0 == this.t ? this.s : (this[0] << 24) >> 24 + } + t.prototype.shortValue = function () { + return 0 == this.t ? this.s : (this[0] << 16) >> 16 + } + t.prototype.signum = function () { + if (this.s < 0) return -1 + else if (this.t <= 0 || (1 == this.t && this[0] <= 0)) return 0 + else return 1 + } + t.prototype.toByteArray = function () { + var t = this.t + var e = [] + e[0] = this.s + var r = this.DB - ((t * this.DB) % 8) + var i + var n = 0 + if (t-- > 0) { + if (r < this.DB && (i = this[t] >> r) != (this.s & this.DM) >> r) + e[n++] = i | (this.s << (this.DB - r)) + while (t >= 0) { + if (r < 8) { + i = (this[t] & ((1 << r) - 1)) << (8 - r) + i |= this[--t] >> (r += this.DB - 8) + } else { + i = (this[t] >> (r -= 8)) & 255 + if (r <= 0) { + r += this.DB + --t + } + } + if (0 != (128 & i)) i |= -256 + if (0 == n && (128 & this.s) != (128 & i)) ++n + if (n > 0 || i != this.s) e[n++] = i + } + } + return e + } + t.prototype.equals = function (t) { + return 0 == this.compareTo(t) + } + t.prototype.min = function (t) { + return this.compareTo(t) < 0 ? this : t + } + t.prototype.max = function (t) { + return this.compareTo(t) > 0 ? this : t + } + t.prototype.and = function (t) { + var e = L() + this.bitwiseTo(t, s, e) + return e + } + t.prototype.or = function (t) { + var e = L() + this.bitwiseTo(t, a, e) + return e + } + t.prototype.xor = function (t) { + var e = L() + this.bitwiseTo(t, o, e) + return e + } + t.prototype.andNot = function (t) { + var e = L() + this.bitwiseTo(t, u, e) + return e + } + t.prototype.not = function () { + var t = L() + for (var e = 0; e < this.t; ++e) t[e] = this.DM & ~this[e] + t.t = this.t + t.s = ~this.s + return t + } + t.prototype.shiftLeft = function (t) { + var e = L() + if (t < 0) this.rShiftTo(-t, e) + else this.lShiftTo(t, e) + return e + } + t.prototype.shiftRight = function (t) { + var e = L() + if (t < 0) this.lShiftTo(-t, e) + else this.rShiftTo(t, e) + return e + } + t.prototype.getLowestSetBit = function () { + for (var t = 0; t < this.t; ++t) + if (0 != this[t]) return t * this.DB + c(this[t]) + if (this.s < 0) return this.t * this.DB + return -1 + } + t.prototype.bitCount = function () { + var t = 0 + var e = this.s & this.DM + for (var r = 0; r < this.t; ++r) t += l(this[r] ^ e) + return t + } + t.prototype.testBit = function (t) { + var e = Math.floor(t / this.DB) + if (e >= this.t) return 0 != this.s + return 0 != (this[e] & (1 << t % this.DB)) + } + t.prototype.setBit = function (t) { + return this.changeBit(t, a) + } + t.prototype.clearBit = function (t) { + return this.changeBit(t, u) + } + t.prototype.flipBit = function (t) { + return this.changeBit(t, o) + } + t.prototype.add = function (t) { + var e = L() + this.addTo(t, e) + return e + } + t.prototype.subtract = function (t) { + var e = L() + this.subTo(t, e) + return e + } + t.prototype.multiply = function (t) { + var e = L() + this.multiplyTo(t, e) + return e + } + t.prototype.divide = function (t) { + var e = L() + this.divRemTo(t, e, null) + return e + } + t.prototype.remainder = function (t) { + var e = L() + this.divRemTo(t, null, e) + return e + } + t.prototype.divideAndRemainder = function (t) { + var e = L() + var r = L() + this.divRemTo(t, e, r) + return [e, r] + } + t.prototype.modPow = function (t, e) { + var r = t.bitLength() + var i + var n = Y(1) + var s + if (r <= 0) return n + else if (r < 18) i = 1 + else if (r < 48) i = 3 + else if (r < 144) i = 4 + else if (r < 768) i = 5 + else i = 6 + if (r < 8) s = new N(e) + else if (e.isEven()) s = new H(e) + else s = new V(e) + var a = [] + var o = 3 + var u = i - 1 + var c = (1 << i) - 1 + a[1] = s.convert(this) + if (i > 1) { + var l = L() + s.sqrTo(a[1], l) + while (o <= c) { + a[o] = L() + s.mulTo(l, a[o - 2], a[o]) + o += 2 + } + } + var f = t.t - 1 + var h + var d = true + var v = L() + var p + r = W(t[f]) - 1 + while (f >= 0) { + if (r >= u) h = (t[f] >> (r - u)) & c + else { + h = (t[f] & ((1 << (r + 1)) - 1)) << (u - r) + if (f > 0) h |= t[f - 1] >> (this.DB + r - u) + } + o = i + while (0 == (1 & h)) { + h >>= 1 + --o + } + if ((r -= o) < 0) { + r += this.DB + --f + } + if (d) { + a[h].copyTo(n) + d = false + } else { + while (o > 1) { + s.sqrTo(n, v) + s.sqrTo(v, n) + o -= 2 + } + if (o > 0) s.sqrTo(n, v) + else { + p = n + n = v + v = p + } + s.mulTo(v, a[h], n) + } + while (f >= 0 && 0 == (t[f] & (1 << r))) { + s.sqrTo(n, v) + p = n + n = v + v = p + if (--r < 0) { + r = this.DB - 1 + --f + } + } + } + return s.revert(n) + } + t.prototype.modInverse = function (e) { + var r = e.isEven() + if ((this.isEven() && r) || 0 == e.signum()) return t.ZERO + var i = e.clone() + var n = this.clone() + var s = Y(1) + var a = Y(0) + var o = Y(0) + var u = Y(1) + while (0 != i.signum()) { + while (i.isEven()) { + i.rShiftTo(1, i) + if (r) { + if (!s.isEven() || !a.isEven()) { + s.addTo(this, s) + a.subTo(e, a) + } + s.rShiftTo(1, s) + } else if (!a.isEven()) a.subTo(e, a) + a.rShiftTo(1, a) + } + while (n.isEven()) { + n.rShiftTo(1, n) + if (r) { + if (!o.isEven() || !u.isEven()) { + o.addTo(this, o) + u.subTo(e, u) + } + o.rShiftTo(1, o) + } else if (!u.isEven()) u.subTo(e, u) + u.rShiftTo(1, u) + } + if (i.compareTo(n) >= 0) { + i.subTo(n, i) + if (r) s.subTo(o, s) + a.subTo(u, a) + } else { + n.subTo(i, n) + if (r) o.subTo(s, o) + u.subTo(a, u) + } + } + if (0 != n.compareTo(t.ONE)) return t.ZERO + if (u.compareTo(e) >= 0) return u.subtract(e) + if (u.signum() < 0) u.addTo(e, u) + else return u + if (u.signum() < 0) return u.add(e) + else return u + } + t.prototype.pow = function (t) { + return this.exp(t, new P()) + } + t.prototype.gcd = function (t) { + var e = this.s < 0 ? this.negate() : this.clone() + var r = t.s < 0 ? t.negate() : t.clone() + if (e.compareTo(r) < 0) { + var i = e + e = r + r = i + } + var n = e.getLowestSetBit() + var s = r.getLowestSetBit() + if (s < 0) return e + if (n < s) s = n + if (s > 0) { + e.rShiftTo(s, e) + r.rShiftTo(s, r) + } + while (e.signum() > 0) { + if ((n = e.getLowestSetBit()) > 0) e.rShiftTo(n, e) + if ((n = r.getLowestSetBit()) > 0) r.rShiftTo(n, r) + if (e.compareTo(r) >= 0) { + e.subTo(r, e) + e.rShiftTo(1, e) + } else { + r.subTo(e, r) + r.rShiftTo(1, r) + } + } + if (s > 0) r.lShiftTo(s, r) + return r + } + t.prototype.isProbablePrime = function (t) { + var e + var r = this.abs() + if (1 == r.t && r[0] <= C[C.length - 1]) { + for (e = 0; e < C.length; ++e) if (r[0] == C[e]) return true + return false + } + if (r.isEven()) return false + e = 1 + while (e < C.length) { + var i = C[e] + var n = e + 1 + while (n < C.length && i < O) i *= C[n++] + i = r.modInt(i) + while (e < n) if (i % C[e++] == 0) return false + } + return r.millerRabin(t) + } + t.prototype.copyTo = function (t) { + for (var e = this.t - 1; e >= 0; --e) t[e] = this[e] + t.t = this.t + t.s = this.s + } + t.prototype.fromInt = function (t) { + this.t = 1 + this.s = t < 0 ? -1 : 0 + if (t > 0) this[0] = t + else if (t < -1) this[0] = t + this.DV + else this.t = 0 + } + t.prototype.fromString = function (e, r) { + var i + if (16 == r) i = 4 + else if (8 == r) i = 3 + else if (256 == r) i = 8 + else if (2 == r) i = 1 + else if (32 == r) i = 5 + else if (4 == r) i = 2 + else { + this.fromRadix(e, r) + return + } + this.t = 0 + this.s = 0 + var n = e.length + var s = false + var a = 0 + while (--n >= 0) { + var o = 8 == i ? 255 & +e[n] : G(e, n) + if (o < 0) { + if ('-' == e.charAt(n)) s = true + continue + } + s = false + if (0 == a) this[this.t++] = o + else if (a + i > this.DB) { + this[this.t - 1] |= (o & ((1 << (this.DB - a)) - 1)) << a + this[this.t++] = o >> (this.DB - a) + } else this[this.t - 1] |= o << a + a += i + if (a >= this.DB) a -= this.DB + } + if (8 == i && 0 != (128 & +e[0])) { + this.s = -1 + if (a > 0) this[this.t - 1] |= ((1 << (this.DB - a)) - 1) << a + } + this.clamp() + if (s) t.ZERO.subTo(this, this) + } + t.prototype.clamp = function () { + var t = this.s & this.DM + while (this.t > 0 && this[this.t - 1] == t) --this.t + } + t.prototype.dlShiftTo = function (t, e) { + var r + for (r = this.t - 1; r >= 0; --r) e[r + t] = this[r] + for (r = t - 1; r >= 0; --r) e[r] = 0 + e.t = this.t + t + e.s = this.s + } + t.prototype.drShiftTo = function (t, e) { + for (var r = t; r < this.t; ++r) e[r - t] = this[r] + e.t = Math.max(this.t - t, 0) + e.s = this.s + } + t.prototype.lShiftTo = function (t, e) { + var r = t % this.DB + var i = this.DB - r + var n = (1 << i) - 1 + var s = Math.floor(t / this.DB) + var a = (this.s << r) & this.DM + for (var o = this.t - 1; o >= 0; --o) { + e[o + s + 1] = (this[o] >> i) | a + a = (this[o] & n) << r + } + for (var o = s - 1; o >= 0; --o) e[o] = 0 + e[s] = a + e.t = this.t + s + 1 + e.s = this.s + e.clamp() + } + t.prototype.rShiftTo = function (t, e) { + e.s = this.s + var r = Math.floor(t / this.DB) + if (r >= this.t) { + e.t = 0 + return + } + var i = t % this.DB + var n = this.DB - i + var s = (1 << i) - 1 + e[0] = this[r] >> i + for (var a = r + 1; a < this.t; ++a) { + e[a - r - 1] |= (this[a] & s) << n + e[a - r] = this[a] >> i + } + if (i > 0) e[this.t - r - 1] |= (this.s & s) << n + e.t = this.t - r + e.clamp() + } + t.prototype.subTo = function (t, e) { + var r = 0 + var i = 0 + var n = Math.min(t.t, this.t) + while (r < n) { + i += this[r] - t[r] + e[r++] = i & this.DM + i >>= this.DB + } + if (t.t < this.t) { + i -= t.s + while (r < this.t) { + i += this[r] + e[r++] = i & this.DM + i >>= this.DB + } + i += this.s + } else { + i += this.s + while (r < t.t) { + i -= t[r] + e[r++] = i & this.DM + i >>= this.DB + } + i -= t.s + } + e.s = i < 0 ? -1 : 0 + if (i < -1) e[r++] = this.DV + i + else if (i > 0) e[r++] = i + e.t = r + e.clamp() + } + t.prototype.multiplyTo = function (e, r) { + var i = this.abs() + var n = e.abs() + var s = i.t + r.t = s + n.t + while (--s >= 0) r[s] = 0 + for (s = 0; s < n.t; ++s) r[s + i.t] = i.am(0, n[s], r, s, 0, i.t) + r.s = 0 + r.clamp() + if (this.s != e.s) t.ZERO.subTo(r, r) + } + t.prototype.squareTo = function (t) { + var e = this.abs() + var r = (t.t = 2 * e.t) + while (--r >= 0) t[r] = 0 + for (r = 0; r < e.t - 1; ++r) { + var i = e.am(r, e[r], t, 2 * r, 0, 1) + if ( + (t[r + e.t] += e.am( + r + 1, + 2 * e[r], + t, + 2 * r + 1, + i, + e.t - r - 1 + )) >= e.DV + ) { + t[r + e.t] -= e.DV + t[r + e.t + 1] = 1 + } + } + if (t.t > 0) t[t.t - 1] += e.am(r, e[r], t, 2 * r, 0, 1) + t.s = 0 + t.clamp() + } + t.prototype.divRemTo = function (e, r, i) { + var n = e.abs() + if (n.t <= 0) return + var s = this.abs() + if (s.t < n.t) { + if (null != r) r.fromInt(0) + if (null != i) this.copyTo(i) + return + } + if (null == i) i = L() + var a = L() + var o = this.s + var u = e.s + var c = this.DB - W(n[n.t - 1]) + if (c > 0) { + n.lShiftTo(c, a) + s.lShiftTo(c, i) + } else { + n.copyTo(a) + s.copyTo(i) + } + var l = a.t + var f = a[l - 1] + if (0 == f) return + var h = f * (1 << this.F1) + (l > 1 ? a[l - 2] >> this.F2 : 0) + var d = this.FV / h + var v = (1 << this.F1) / h + var p = 1 << this.F2 + var g = i.t + var y = g - l + var m = null == r ? L() : r + a.dlShiftTo(y, m) + if (i.compareTo(m) >= 0) { + i[i.t++] = 1 + i.subTo(m, i) + } + t.ONE.dlShiftTo(l, m) + m.subTo(a, a) + while (a.t < l) a[a.t++] = 0 + while (--y >= 0) { + var _ = + i[--g] == f + ? this.DM + : Math.floor(i[g] * d + (i[g - 1] + p) * v) + if ((i[g] += a.am(0, _, i, y, 0, l)) < _) { + a.dlShiftTo(y, m) + i.subTo(m, i) + while (i[g] < --_) i.subTo(m, i) + } + } + if (null != r) { + i.drShiftTo(l, r) + if (o != u) t.ZERO.subTo(r, r) + } + i.t = l + i.clamp() + if (c > 0) i.rShiftTo(c, i) + if (o < 0) t.ZERO.subTo(i, i) + } + t.prototype.invDigit = function () { + if (this.t < 1) return 0 + var t = this[0] + if (0 == (1 & t)) return 0 + var e = 3 & t + e = (e * (2 - (15 & t) * e)) & 15 + e = (e * (2 - (255 & t) * e)) & 255 + e = (e * (2 - (((65535 & t) * e) & 65535))) & 65535 + e = (e * (2 - ((t * e) % this.DV))) % this.DV + return e > 0 ? this.DV - e : -e + } + t.prototype.isEven = function () { + return 0 == (this.t > 0 ? 1 & this[0] : this.s) + } + t.prototype.exp = function (e, r) { + if (e > 4294967295 || e < 1) return t.ONE + var i = L() + var n = L() + var s = r.convert(this) + var a = W(e) - 1 + s.copyTo(i) + while (--a >= 0) { + r.sqrTo(i, n) + if ((e & (1 << a)) > 0) r.mulTo(n, s, i) + else { + var o = i + i = n + n = o + } + } + return r.revert(i) + } + t.prototype.chunkSize = function (t) { + return Math.floor((Math.LN2 * this.DB) / Math.log(t)) + } + t.prototype.toRadix = function (t) { + if (null == t) t = 10 + if (0 == this.signum() || t < 2 || t > 36) return '0' + var e = this.chunkSize(t) + var r = Math.pow(t, e) + var i = Y(r) + var n = L() + var s = L() + var a = '' + this.divRemTo(i, n, s) + while (n.signum() > 0) { + a = (r + s.intValue()).toString(t).substr(1) + a + n.divRemTo(i, n, s) + } + return s.intValue().toString(t) + a + } + t.prototype.fromRadix = function (e, r) { + this.fromInt(0) + if (null == r) r = 10 + var i = this.chunkSize(r) + var n = Math.pow(r, i) + var s = false + var a = 0 + var o = 0 + for (var u = 0; u < e.length; ++u) { + var c = G(e, u) + if (c < 0) { + if ('-' == e.charAt(u) && 0 == this.signum()) s = true + continue + } + o = r * o + c + if (++a >= i) { + this.dMultiply(n) + this.dAddOffset(o, 0) + a = 0 + o = 0 + } + } + if (a > 0) { + this.dMultiply(Math.pow(r, a)) + this.dAddOffset(o, 0) + } + if (s) t.ZERO.subTo(this, this) + } + t.prototype.fromNumber = function (e, r, i) { + if ('number' == typeof r) + if (e < 2) this.fromInt(1) + else { + this.fromNumber(e, i) + if (!this.testBit(e - 1)) + this.bitwiseTo(t.ONE.shiftLeft(e - 1), a, this) + if (this.isEven()) this.dAddOffset(1, 0) + while (!this.isProbablePrime(r)) { + this.dAddOffset(2, 0) + if (this.bitLength() > e) + this.subTo(t.ONE.shiftLeft(e - 1), this) + } + } + else { + var n = [] + var s = 7 & e + n.length = (e >> 3) + 1 + r.nextBytes(n) + if (s > 0) n[0] &= (1 << s) - 1 + else n[0] = 0 + this.fromString(n, 256) + } + } + t.prototype.bitwiseTo = function (t, e, r) { + var i + var n + var s = Math.min(t.t, this.t) + for (i = 0; i < s; ++i) r[i] = e(this[i], t[i]) + if (t.t < this.t) { + n = t.s & this.DM + for (i = s; i < this.t; ++i) r[i] = e(this[i], n) + r.t = this.t + } else { + n = this.s & this.DM + for (i = s; i < t.t; ++i) r[i] = e(n, t[i]) + r.t = t.t + } + r.s = e(this.s, t.s) + r.clamp() + } + t.prototype.changeBit = function (e, r) { + var i = t.ONE.shiftLeft(e) + this.bitwiseTo(i, r, i) + return i + } + t.prototype.addTo = function (t, e) { + var r = 0 + var i = 0 + var n = Math.min(t.t, this.t) + while (r < n) { + i += this[r] + t[r] + e[r++] = i & this.DM + i >>= this.DB + } + if (t.t < this.t) { + i += t.s + while (r < this.t) { + i += this[r] + e[r++] = i & this.DM + i >>= this.DB + } + i += this.s + } else { + i += this.s + while (r < t.t) { + i += t[r] + e[r++] = i & this.DM + i >>= this.DB + } + i += t.s + } + e.s = i < 0 ? -1 : 0 + if (i > 0) e[r++] = i + else if (i < -1) e[r++] = this.DV + i + e.t = r + e.clamp() + } + t.prototype.dMultiply = function (t) { + this[this.t] = this.am(0, t - 1, this, 0, 0, this.t) + ++this.t + this.clamp() + } + t.prototype.dAddOffset = function (t, e) { + if (0 == t) return + while (this.t <= e) this[this.t++] = 0 + this[e] += t + while (this[e] >= this.DV) { + this[e] -= this.DV + if (++e >= this.t) this[this.t++] = 0 + ++this[e] + } + } + t.prototype.multiplyLowerTo = function (t, e, r) { + var i = Math.min(this.t + t.t, e) + r.s = 0 + r.t = i + while (i > 0) r[--i] = 0 + for (var n = r.t - this.t; i < n; ++i) + r[i + this.t] = this.am(0, t[i], r, i, 0, this.t) + for (var n = Math.min(t.t, e); i < n; ++i) + this.am(0, t[i], r, i, 0, e - i) + r.clamp() + } + t.prototype.multiplyUpperTo = function (t, e, r) { + --e + var i = (r.t = this.t + t.t - e) + r.s = 0 + while (--i >= 0) r[i] = 0 + for (i = Math.max(e - this.t, 0); i < t.t; ++i) + r[this.t + i - e] = this.am(e - i, t[i], r, 0, 0, this.t + i - e) + r.clamp() + r.drShiftTo(1, r) + } + t.prototype.modInt = function (t) { + if (t <= 0) return 0 + var e = this.DV % t + var r = this.s < 0 ? t - 1 : 0 + if (this.t > 0) + if (0 == e) r = this[0] % t + else + for (var i = this.t - 1; i >= 0; --i) r = (e * r + this[i]) % t + return r + } + t.prototype.millerRabin = function (e) { + var r = this.subtract(t.ONE) + var i = r.getLowestSetBit() + if (i <= 0) return false + var n = r.shiftRight(i) + e = (e + 1) >> 1 + if (e > C.length) e = C.length + var s = L() + for (var a = 0; a < e; ++a) { + s.fromInt(C[Math.floor(Math.random() * C.length)]) + var o = s.modPow(n, this) + if (0 != o.compareTo(t.ONE) && 0 != o.compareTo(r)) { + var u = 1 + while (u++ < i && 0 != o.compareTo(r)) { + o = o.modPowInt(2, this) + if (0 == o.compareTo(t.ONE)) return false + } + if (0 != o.compareTo(r)) return false + } + } + return true + } + t.prototype.square = function () { + var t = L() + this.squareTo(t) + return t + } + t.prototype.gcda = function (t, e) { + var r = this.s < 0 ? this.negate() : this.clone() + var i = t.s < 0 ? t.negate() : t.clone() + if (r.compareTo(i) < 0) { + var n = r + r = i + i = n + } + var s = r.getLowestSetBit() + var a = i.getLowestSetBit() + if (a < 0) { + e(r) + return + } + if (s < a) a = s + if (a > 0) { + r.rShiftTo(a, r) + i.rShiftTo(a, i) + } + var o = function () { + if ((s = r.getLowestSetBit()) > 0) r.rShiftTo(s, r) + if ((s = i.getLowestSetBit()) > 0) i.rShiftTo(s, i) + if (r.compareTo(i) >= 0) { + r.subTo(i, r) + r.rShiftTo(1, r) + } else { + i.subTo(r, i) + i.rShiftTo(1, i) + } + if (!(r.signum() > 0)) { + if (a > 0) i.lShiftTo(a, i) + setTimeout(function () { + e(i) + }, 0) + } else setTimeout(o, 0) + } + setTimeout(o, 10) + } + t.prototype.fromNumberAsync = function (e, r, i, n) { + if ('number' == typeof r) + if (e < 2) this.fromInt(1) + else { + this.fromNumber(e, i) + if (!this.testBit(e - 1)) + this.bitwiseTo(t.ONE.shiftLeft(e - 1), a, this) + if (this.isEven()) this.dAddOffset(1, 0) + var s = this + var o = function () { + s.dAddOffset(2, 0) + if (s.bitLength() > e) s.subTo(t.ONE.shiftLeft(e - 1), s) + if (s.isProbablePrime(r)) + setTimeout(function () { + n() + }, 0) + else setTimeout(o, 0) + } + setTimeout(o, 0) + } + else { + var u = [] + var c = 7 & e + u.length = (e >> 3) + 1 + r.nextBytes(u) + if (c > 0) u[0] &= (1 << c) - 1 + else u[0] = 0 + this.fromString(u, 256) + } + } + return t + })() + var P = (function () { + function t() {} + t.prototype.convert = function (t) { + return t + } + t.prototype.revert = function (t) { + return t + } + t.prototype.mulTo = function (t, e, r) { + t.multiplyTo(e, r) + } + t.prototype.sqrTo = function (t, e) { + t.squareTo(e) + } + return t + })() + var N = (function () { + function t(t) { + this.m = t + } + t.prototype.convert = function (t) { + if (t.s < 0 || t.compareTo(this.m) >= 0) return t.mod(this.m) + else return t + } + t.prototype.revert = function (t) { + return t + } + t.prototype.reduce = function (t) { + t.divRemTo(this.m, null, t) + } + t.prototype.mulTo = function (t, e, r) { + t.multiplyTo(e, r) + this.reduce(r) + } + t.prototype.sqrTo = function (t, e) { + t.squareTo(e) + this.reduce(e) + } + return t + })() + var V = (function () { + function t(t) { + this.m = t + this.mp = t.invDigit() + this.mpl = 32767 & this.mp + this.mph = this.mp >> 15 + this.um = (1 << (t.DB - 15)) - 1 + this.mt2 = 2 * t.t + } + t.prototype.convert = function (t) { + var e = L() + t.abs().dlShiftTo(this.m.t, e) + e.divRemTo(this.m, null, e) + if (t.s < 0 && e.compareTo(k.ZERO) > 0) this.m.subTo(e, e) + return e + } + t.prototype.revert = function (t) { + var e = L() + t.copyTo(e) + this.reduce(e) + return e + } + t.prototype.reduce = function (t) { + while (t.t <= this.mt2) t[t.t++] = 0 + for (var e = 0; e < this.m.t; ++e) { + var r = 32767 & t[e] + var i = + (r * this.mpl + + (((r * this.mph + (t[e] >> 15) * this.mpl) & this.um) << + 15)) & + t.DM + r = e + this.m.t + t[r] += this.m.am(0, i, t, e, 0, this.m.t) + while (t[r] >= t.DV) { + t[r] -= t.DV + t[++r]++ + } + } + t.clamp() + t.drShiftTo(this.m.t, t) + if (t.compareTo(this.m) >= 0) t.subTo(this.m, t) + } + t.prototype.mulTo = function (t, e, r) { + t.multiplyTo(e, r) + this.reduce(r) + } + t.prototype.sqrTo = function (t, e) { + t.squareTo(e) + this.reduce(e) + } + return t + })() + var H = (function () { + function t(t) { + this.m = t + this.r2 = L() + this.q3 = L() + k.ONE.dlShiftTo(2 * t.t, this.r2) + this.mu = this.r2.divide(t) + } + t.prototype.convert = function (t) { + if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m) + else if (t.compareTo(this.m) < 0) return t + else { + var e = L() + t.copyTo(e) + this.reduce(e) + return e + } + } + t.prototype.revert = function (t) { + return t + } + t.prototype.reduce = function (t) { + t.drShiftTo(this.m.t - 1, this.r2) + if (t.t > this.m.t + 1) { + t.t = this.m.t + 1 + t.clamp() + } + this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3) + this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2) + while (t.compareTo(this.r2) < 0) t.dAddOffset(1, this.m.t + 1) + t.subTo(this.r2, t) + while (t.compareTo(this.m) >= 0) t.subTo(this.m, t) + } + t.prototype.mulTo = function (t, e, r) { + t.multiplyTo(e, r) + this.reduce(r) + } + t.prototype.sqrTo = function (t, e) { + t.squareTo(e) + this.reduce(e) + } + return t + })() + function L() { + return new k(null) + } + function K(t, e) { + return new k(t, e) + } + var U = 'undefined' !== typeof navigator + if (U && B && 'Microsoft Internet Explorer' == navigator.appName) { + k.prototype.am = function t(e, r, i, n, s, a) { + var o = 32767 & r + var u = r >> 15 + while (--a >= 0) { + var c = 32767 & this[e] + var l = this[e++] >> 15 + var f = u * c + l * o + c = o * c + ((32767 & f) << 15) + i[n] + (1073741823 & s) + s = (c >>> 30) + (f >>> 15) + u * l + (s >>> 30) + i[n++] = 1073741823 & c + } + return s + } + R = 30 + } else if (U && B && 'Netscape' != navigator.appName) { + k.prototype.am = function t(e, r, i, n, s, a) { + while (--a >= 0) { + var o = r * this[e++] + i[n] + s + s = Math.floor(o / 67108864) + i[n++] = 67108863 & o + } + return s + } + R = 26 + } else { + k.prototype.am = function t(e, r, i, n, s, a) { + var o = 16383 & r + var u = r >> 14 + while (--a >= 0) { + var c = 16383 & this[e] + var l = this[e++] >> 14 + var f = u * c + l * o + c = o * c + ((16383 & f) << 14) + i[n] + s + s = (c >> 28) + (f >> 14) + u * l + i[n++] = 268435455 & c + } + return s + } + R = 28 + } + k.prototype.DB = R + k.prototype.DM = (1 << R) - 1 + k.prototype.DV = 1 << R + var j = 52 + k.prototype.FV = Math.pow(2, j) + k.prototype.F1 = j - R + k.prototype.F2 = 2 * R - j + var F = [] + var z + var q + z = '0'.charCodeAt(0) + for (q = 0; q <= 9; ++q) F[z++] = q + z = 'a'.charCodeAt(0) + for (q = 10; q < 36; ++q) F[z++] = q + z = 'A'.charCodeAt(0) + for (q = 10; q < 36; ++q) F[z++] = q + function G(t, e) { + var r = F[t.charCodeAt(e)] + return null == r ? -1 : r + } + function Y(t) { + var e = L() + e.fromInt(t) + return e + } + function W(t) { + var e = 1 + var r + if (0 != (r = t >>> 16)) { + t = r + e += 16 + } + if (0 != (r = t >> 8)) { + t = r + e += 8 + } + if (0 != (r = t >> 4)) { + t = r + e += 4 + } + if (0 != (r = t >> 2)) { + t = r + e += 2 + } + if (0 != (r = t >> 1)) { + t = r + e += 1 + } + return e + } + k.ZERO = Y(0) + k.ONE = Y(1) + var J = (function () { + function t() { + this.i = 0 + this.j = 0 + this.S = [] + } + t.prototype.init = function (t) { + var e + var r + var i + for (e = 0; e < 256; ++e) this.S[e] = e + r = 0 + for (e = 0; e < 256; ++e) { + r = (r + this.S[e] + t[e % t.length]) & 255 + i = this.S[e] + this.S[e] = this.S[r] + this.S[r] = i + } + this.i = 0 + this.j = 0 + } + t.prototype.next = function () { + var t + this.i = (this.i + 1) & 255 + this.j = (this.j + this.S[this.i]) & 255 + t = this.S[this.i] + this.S[this.i] = this.S[this.j] + this.S[this.j] = t + return this.S[(t + this.S[this.i]) & 255] + } + return t + })() + function $() { + return new J() + } + var Z = 256 + var X + var Q = null + var tt + if (null == Q) { + Q = [] + tt = 0 + var et = void 0 + var rt = 0 + var it = function (t) { + rt = rt || 0 + if (rt >= 256 || tt >= rng_psize) return + try { + var e = t.x + t.y + Q[tt++] = 255 & e + rt += 1 + } catch (t) {} + } + } + function nt() { + if (null == X) { + X = $() + while (tt < Z) { + var t = Math.floor(65536 * Math.random()) + Q[tt++] = 255 & t + } + X.init(Q) + for (tt = 0; tt < Q.length; ++tt) Q[tt] = 0 + tt = 0 + } + return X.next() + } + var st = (function () { + function t() {} + t.prototype.nextBytes = function (t) { + for (var e = 0; e < t.length; ++e) t[e] = nt() + } + return t + })() + function at(t, e) { + if (e < t.length + 22) { + console.error('Message too long for RSA') + return null + } + var r = e - t.length - 6 + var i = '' + for (var n = 0; n < r; n += 2) i += 'ff' + var s = '0001' + i + '00' + t + return K(s, 16) + } + function ot(t, e) { + if (e < t.length + 11) { + console.error('Message too long for RSA') + return null + } + var r = [] + var i = t.length - 1 + while (i >= 0 && e > 0) { + var n = t.charCodeAt(i--) + if (n < 128) r[--e] = n + else if (n > 127 && n < 2048) { + r[--e] = (63 & n) | 128 + r[--e] = (n >> 6) | 192 + } else { + r[--e] = (63 & n) | 128 + r[--e] = ((n >> 6) & 63) | 128 + r[--e] = (n >> 12) | 224 + } + } + r[--e] = 0 + var s = new st() + var a = [] + while (e > 2) { + a[0] = 0 + while (0 == a[0]) s.nextBytes(a) + r[--e] = a[0] + } + r[--e] = 2 + r[--e] = 0 + return new k(r) + } + var ut = (function () { + function t() { + this.n = null + this.e = 0 + this.d = null + this.p = null + this.q = null + this.dmp1 = null + this.dmq1 = null + this.coeff = null + } + t.prototype.doPublic = function (t) { + return t.modPowInt(this.e, this.n) + } + t.prototype.doPrivate = function (t) { + if (null == this.p || null == this.q) + return t.modPow(this.d, this.n) + var e = t.mod(this.p).modPow(this.dmp1, this.p) + var r = t.mod(this.q).modPow(this.dmq1, this.q) + while (e.compareTo(r) < 0) e = e.add(this.p) + return e + .subtract(r) + .multiply(this.coeff) + .mod(this.p) + .multiply(this.q) + .add(r) + } + t.prototype.setPublic = function (t, e) { + if (null != t && null != e && t.length > 0 && e.length > 0) { + this.n = K(t, 16) + this.e = parseInt(e, 16) + } else console.error('Invalid RSA public key') + } + t.prototype.encrypt = function (t) { + var e = (this.n.bitLength() + 7) >> 3 + var r = ot(t, e) + if (null == r) return null + var i = this.doPublic(r) + if (null == i) return null + var n = i.toString(16) + var s = n.length + for (var a = 0; a < 2 * e - s; a++) n = '0' + n + return n + } + t.prototype.setPrivate = function (t, e, r) { + if (null != t && null != e && t.length > 0 && e.length > 0) { + this.n = K(t, 16) + this.e = parseInt(e, 16) + this.d = K(r, 16) + } else console.error('Invalid RSA private key') + } + t.prototype.setPrivateEx = function (t, e, r, i, n, s, a, o) { + if (null != t && null != e && t.length > 0 && e.length > 0) { + this.n = K(t, 16) + this.e = parseInt(e, 16) + this.d = K(r, 16) + this.p = K(i, 16) + this.q = K(n, 16) + this.dmp1 = K(s, 16) + this.dmq1 = K(a, 16) + this.coeff = K(o, 16) + } else console.error('Invalid RSA private key') + } + t.prototype.generate = function (t, e) { + var r = new st() + var i = t >> 1 + this.e = parseInt(e, 16) + var n = new k(e, 16) + for (;;) { + for (;;) { + this.p = new k(t - i, 1, r) + if ( + 0 == this.p.subtract(k.ONE).gcd(n).compareTo(k.ONE) && + this.p.isProbablePrime(10) + ) + break + } + for (;;) { + this.q = new k(i, 1, r) + if ( + 0 == this.q.subtract(k.ONE).gcd(n).compareTo(k.ONE) && + this.q.isProbablePrime(10) + ) + break + } + if (this.p.compareTo(this.q) <= 0) { + var s = this.p + this.p = this.q + this.q = s + } + var a = this.p.subtract(k.ONE) + var o = this.q.subtract(k.ONE) + var u = a.multiply(o) + if (0 == u.gcd(n).compareTo(k.ONE)) { + this.n = this.p.multiply(this.q) + this.d = n.modInverse(u) + this.dmp1 = this.d.mod(a) + this.dmq1 = this.d.mod(o) + this.coeff = this.q.modInverse(this.p) + break + } + } + } + t.prototype.decrypt = function (t) { + var e = K(t, 16) + var r = this.doPrivate(e) + if (null == r) return null + return ct(r, (this.n.bitLength() + 7) >> 3) + } + t.prototype.generateAsync = function (t, e, r) { + var i = new st() + var n = t >> 1 + this.e = parseInt(e, 16) + var s = new k(e, 16) + var a = this + var o = function () { + var e = function () { + if (a.p.compareTo(a.q) <= 0) { + var t = a.p + a.p = a.q + a.q = t + } + var e = a.p.subtract(k.ONE) + var i = a.q.subtract(k.ONE) + var n = e.multiply(i) + if (0 == n.gcd(s).compareTo(k.ONE)) { + a.n = a.p.multiply(a.q) + a.d = s.modInverse(n) + a.dmp1 = a.d.mod(e) + a.dmq1 = a.d.mod(i) + a.coeff = a.q.modInverse(a.p) + setTimeout(function () { + r() + }, 0) + } else setTimeout(o, 0) + } + var u = function () { + a.q = L() + a.q.fromNumberAsync(n, 1, i, function () { + a.q.subtract(k.ONE).gcda(s, function (t) { + if (0 == t.compareTo(k.ONE) && a.q.isProbablePrime(10)) + setTimeout(e, 0) + else setTimeout(u, 0) + }) + }) + } + var c = function () { + a.p = L() + a.p.fromNumberAsync(t - n, 1, i, function () { + a.p.subtract(k.ONE).gcda(s, function (t) { + if (0 == t.compareTo(k.ONE) && a.p.isProbablePrime(10)) + setTimeout(u, 0) + else setTimeout(c, 0) + }) + }) + } + setTimeout(c, 0) + } + setTimeout(o, 0) + } + t.prototype.sign = function (t, e, r) { + var i = ht(r) + var n = i + e(t).toString() + var s = at(n, this.n.bitLength() / 4) + if (null == s) return null + var a = this.doPrivate(s) + if (null == a) return null + var o = a.toString(16) + if (0 == (1 & o.length)) return o + else return '0' + o + } + t.prototype.verify = function (t, e, r) { + var i = K(e, 16) + var n = this.doPublic(i) + if (null == n) return null + var s = n.toString(16).replace(/^1f+00/, '') + var a = dt(s) + return a == r(t).toString() + } + t.prototype.encryptLong = function (t) { + var e = this + var r = '' + var i = ((this.n.bitLength() + 7) >> 3) - 11 + var n = this.setSplitChn(t, i) + n.forEach(function (t) { + r += e.encrypt(t) + }) + return r + } + t.prototype.decryptLong = function (t) { + var e = '' + var r = (this.n.bitLength() + 7) >> 3 + var i = 2 * r + if (t.length > i) { + var n = t.match(new RegExp('.{1,' + i + '}', 'g')) || [] + var s = [] + for (var a = 0; a < n.length; a++) { + var o = K(n[a], 16) + var u = this.doPrivate(o) + if (null == u) return null + s.push(u) + } + e = lt(s, r) + } else e = this.decrypt(t) + return e + } + t.prototype.setSplitChn = function (t, e, r) { + if (void 0 === r) r = [] + var i = t.split('') + var n = 0 + for (var s = 0; s < i.length; s++) { + var a = i[s].charCodeAt(0) + if (a <= 127) n += 1 + else if (a <= 2047) n += 2 + else if (a <= 65535) n += 3 + else n += 4 + if (n > e) { + var o = t.substring(0, s) + r.push(o) + return this.setSplitChn(t.substring(s), e, r) + } + } + r.push(t) + return r + } + return t + })() + function ct(t, e) { + var r = t.toByteArray() + var i = 0 + while (i < r.length && 0 == r[i]) ++i + if (r.length - i != e - 1 || 2 != r[i]) return null + ++i + while (0 != r[i]) if (++i >= r.length) return null + var n = '' + while (++i < r.length) { + var s = 255 & r[i] + if (s < 128) n += String.fromCharCode(s) + else if (s > 191 && s < 224) { + n += String.fromCharCode(((31 & s) << 6) | (63 & r[i + 1])) + ++i + } else { + n += String.fromCharCode( + ((15 & s) << 12) | ((63 & r[i + 1]) << 6) | (63 & r[i + 2]) + ) + i += 2 + } + } + return n + } + function lt(t, e) { + var r = [] + for (var i = 0; i < t.length; i++) { + var n = t[i] + var s = n.toByteArray() + var a = 0 + while (a < s.length && 0 == s[a]) ++a + if (s.length - a != e - 1 || 2 != s[a]) return null + ++a + while (0 != s[a]) if (++a >= s.length) return null + r = r.concat(s.slice(a + 1)) + } + var o = r + var u = -1 + var c = '' + while (++u < o.length) { + var l = 255 & o[u] + if (l < 128) c += String.fromCharCode(l) + else if (l > 191 && l < 224) { + c += String.fromCharCode(((31 & l) << 6) | (63 & o[u + 1])) + ++u + } else { + c += String.fromCharCode( + ((15 & l) << 12) | ((63 & o[u + 1]) << 6) | (63 & o[u + 2]) + ) + u += 2 + } + } + return c + } + var ft = { + md2: '3020300c06082a864886f70d020205000410', + md5: '3020300c06082a864886f70d020505000410', + sha1: '3021300906052b0e03021a05000414', + sha224: '302d300d06096086480165030402040500041c', + sha256: '3031300d060960864801650304020105000420', + sha384: '3041300d060960864801650304020205000430', + sha512: '3051300d060960864801650304020305000440', + ripemd160: '3021300906052b2403020105000414', + } + function ht(t) { + return ft[t] || '' + } + function dt(t) { + for (var e in ft) + if (ft.hasOwnProperty(e)) { + var r = ft[e] + var i = r.length + if (t.substr(0, i) == r) return t.substr(i) + } + return t + } + var vt = {} + vt.lang = { + extend: function (t, e, r) { + if (!e || !t) + throw new Error( + 'YAHOO.lang.extend failed, please check that ' + + 'all dependencies are included.' + ) + var i = function () {} + i.prototype = e.prototype + t.prototype = new i() + t.prototype.constructor = t + t.superclass = e.prototype + if (e.prototype.constructor == Object.prototype.constructor) + e.prototype.constructor = e + if (r) { + var n + for (n in r) t.prototype[n] = r[n] + var s = function () {}, + a = ['toString', 'valueOf'] + try { + if (/MSIE/.test(navigator.userAgent)) + s = function (t, e) { + for (n = 0; n < a.length; n += 1) { + var r = a[n], + i = e[r] + if ('function' === typeof i && i != Object.prototype[r]) + t[r] = i + } + } + } catch (t) {} + s(t.prototype, r) + } + }, + } + var pt = {} + if ('undefined' == typeof pt.asn1 || !pt.asn1) pt.asn1 = {} + pt.asn1.ASN1Util = new (function () { + this.integerToByteHex = function (t) { + var e = t.toString(16) + if (e.length % 2 == 1) e = '0' + e + return e + } + this.bigIntToMinTwosComplementsHex = function (t) { + var e = t.toString(16) + if ('-' != e.substr(0, 1)) { + if (e.length % 2 == 1) e = '0' + e + else if (!e.match(/^[0-7]/)) e = '00' + e + } else { + var r = e.substr(1) + var i = r.length + if (i % 2 == 1) i += 1 + else if (!e.match(/^[0-7]/)) i += 2 + var n = '' + for (var s = 0; s < i; s++) n += 'f' + var a = new k(n, 16) + var o = a.xor(t).add(k.ONE) + e = o.toString(16).replace(/^-/, '') + } + return e + } + this.getPEMStringFromHex = function (t, e) { + return hextopem(t, e) + } + this.newObject = function (t) { + var e = pt, + r = e.asn1, + i = r.DERBoolean, + n = r.DERInteger, + s = r.DERBitString, + a = r.DEROctetString, + o = r.DERNull, + u = r.DERObjectIdentifier, + c = r.DEREnumerated, + l = r.DERUTF8String, + f = r.DERNumericString, + h = r.DERPrintableString, + d = r.DERTeletexString, + v = r.DERIA5String, + p = r.DERUTCTime, + g = r.DERGeneralizedTime, + y = r.DERSequence, + m = r.DERSet, + _ = r.DERTaggedObject, + S = r.ASN1Util.newObject + var E = Object.keys(t) + if (1 != E.length) throw 'key of param shall be only one.' + var b = E[0] + if ( + -1 == + ':bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:'.indexOf( + ':' + b + ':' + ) + ) + throw 'undefined key: ' + b + if ('bool' == b) return new i(t[b]) + if ('int' == b) return new n(t[b]) + if ('bitstr' == b) return new s(t[b]) + if ('octstr' == b) return new a(t[b]) + if ('null' == b) return new o(t[b]) + if ('oid' == b) return new u(t[b]) + if ('enum' == b) return new c(t[b]) + if ('utf8str' == b) return new l(t[b]) + if ('numstr' == b) return new f(t[b]) + if ('prnstr' == b) return new h(t[b]) + if ('telstr' == b) return new d(t[b]) + if ('ia5str' == b) return new v(t[b]) + if ('utctime' == b) return new p(t[b]) + if ('gentime' == b) return new g(t[b]) + if ('seq' == b) { + var w = t[b] + var D = [] + for (var T = 0; T < w.length; T++) { + var A = S(w[T]) + D.push(A) + } + return new y({ array: D }) + } + if ('set' == b) { + var w = t[b] + var D = [] + for (var T = 0; T < w.length; T++) { + var A = S(w[T]) + D.push(A) + } + return new m({ array: D }) + } + if ('tag' == b) { + var M = t[b] + if ( + '[object Array]' === Object.prototype.toString.call(M) && + 3 == M.length + ) { + var I = S(M[2]) + return new _({ tag: M[0], explicit: M[1], obj: I }) + } else { + var R = {} + if (void 0 !== M.explicit) R.explicit = M.explicit + if (void 0 !== M.tag) R.tag = M.tag + if (void 0 === M.obj) throw "obj shall be specified for 'tag'." + R.obj = S(M.obj) + return new _(R) + } + } + } + this.jsonToASN1HEX = function (t) { + var e = this.newObject(t) + return e.getEncodedHex() + } + })() + pt.asn1.ASN1Util.oidHexToInt = function (t) { + var e = '' + var r = parseInt(t.substr(0, 2), 16) + var i = Math.floor(r / 40) + var n = r % 40 + var e = i + '.' + n + var s = '' + for (var a = 2; a < t.length; a += 2) { + var o = parseInt(t.substr(a, 2), 16) + var u = ('00000000' + o.toString(2)).slice(-8) + s += u.substr(1, 7) + if ('0' == u.substr(0, 1)) { + var c = new k(s, 2) + e = e + '.' + c.toString(10) + s = '' + } + } + return e + } + pt.asn1.ASN1Util.oidIntToHex = function (t) { + var e = function (t) { + var e = t.toString(16) + if (1 == e.length) e = '0' + e + return e + } + var r = function (t) { + var r = '' + var i = new k(t, 10) + var n = i.toString(2) + var s = 7 - (n.length % 7) + if (7 == s) s = 0 + var a = '' + for (var o = 0; o < s; o++) a += '0' + n = a + n + for (var o = 0; o < n.length - 1; o += 7) { + var u = n.substr(o, 7) + if (o != n.length - 7) u = '1' + u + r += e(parseInt(u, 2)) + } + return r + } + if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t + var i = '' + var n = t.split('.') + var s = 40 * parseInt(n[0]) + parseInt(n[1]) + i += e(s) + n.splice(0, 2) + for (var a = 0; a < n.length; a++) i += r(n[a]) + return i + } + pt.asn1.ASN1Object = function () { + var t = true + var e = null + var r = '00' + var i = '00' + var n = '' + this.getLengthHexFromValue = function () { + if ('undefined' == typeof 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=' + n.length + ',v=' + this.hV + ) + var t = this.hV.length / 2 + var e = t.toString(16) + if (e.length % 2 == 1) e = '0' + e + if (t < 128) return e + else { + var r = e.length / 2 + if (r > 15) + throw ( + 'ASN.1 length too long to represent by 8x: n = ' + + t.toString(16) + ) + var i = 128 + r + return i.toString(16) + e + } + } + this.getEncodedHex = function () { + if (null == this.hTLV || this.isModified) { + this.hV = this.getFreshValueHex() + this.hL = this.getLengthHexFromValue() + this.hTLV = this.hT + this.hL + this.hV + this.isModified = false + } + return this.hTLV + } + this.getValueHex = function () { + this.getEncodedHex() + return this.hV + } + this.getFreshValueHex = function () { + return '' + } + } + pt.asn1.DERAbstractString = function (t) { + pt.asn1.DERAbstractString.superclass.constructor.call(this) + var e = null + var r = null + this.getString = function () { + return this.s + } + this.setString = function (t) { + this.hTLV = null + this.isModified = true + this.s = t + this.hV = stohex(this.s) + } + this.setStringHex = function (t) { + this.hTLV = null + this.isModified = true + this.s = null + this.hV = t + } + this.getFreshValueHex = function () { + return this.hV + } + if ('undefined' != typeof t) + if ('string' == typeof t) this.setString(t) + else if ('undefined' != typeof t['str']) this.setString(t['str']) + else if ('undefined' != typeof t['hex']) this.setStringHex(t['hex']) + } + vt.lang.extend(pt.asn1.DERAbstractString, pt.asn1.ASN1Object) + pt.asn1.DERAbstractTime = function (t) { + pt.asn1.DERAbstractTime.superclass.constructor.call(this) + var e = null + var r = null + this.localDateToUTC = function (t) { + utc = t.getTime() + 6e4 * t.getTimezoneOffset() + var e = new Date(utc) + return e + } + this.formatDate = function (t, e, r) { + var i = this.zeroPadding + var n = this.localDateToUTC(t) + var s = String(n.getFullYear()) + if ('utc' == e) s = s.substr(2, 2) + var a = i(String(n.getMonth() + 1), 2) + var o = i(String(n.getDate()), 2) + var u = i(String(n.getHours()), 2) + var c = i(String(n.getMinutes()), 2) + var l = i(String(n.getSeconds()), 2) + var f = s + a + o + u + c + l + if (true === r) { + var h = n.getMilliseconds() + if (0 != h) { + var d = i(String(h), 3) + d = d.replace(/[0]+$/, '') + f = f + '.' + d + } + } + return f + 'Z' + } + this.zeroPadding = function (t, e) { + if (t.length >= e) return t + return new Array(e - t.length + 1).join('0') + t + } + this.getString = function () { + return this.s + } + this.setString = function (t) { + this.hTLV = null + this.isModified = true + this.s = t + this.hV = stohex(t) + } + this.setByDateValue = function (t, e, r, i, n, s) { + var a = new Date(Date.UTC(t, e - 1, r, i, n, s, 0)) + this.setByDate(a) + } + this.getFreshValueHex = function () { + return this.hV + } + } + vt.lang.extend(pt.asn1.DERAbstractTime, pt.asn1.ASN1Object) + pt.asn1.DERAbstractStructured = function (t) { + pt.asn1.DERAbstractString.superclass.constructor.call(this) + var e = null + this.setByASN1ObjectArray = function (t) { + this.hTLV = null + this.isModified = true + this.asn1Array = t + } + this.appendASN1Object = function (t) { + this.hTLV = null + this.isModified = true + this.asn1Array.push(t) + } + this.asn1Array = new Array() + if ('undefined' != typeof t) + if ('undefined' != typeof t['array']) this.asn1Array = t['array'] + } + vt.lang.extend(pt.asn1.DERAbstractStructured, pt.asn1.ASN1Object) + pt.asn1.DERBoolean = function () { + pt.asn1.DERBoolean.superclass.constructor.call(this) + this.hT = '01' + this.hTLV = '0101ff' + } + vt.lang.extend(pt.asn1.DERBoolean, pt.asn1.ASN1Object) + pt.asn1.DERInteger = function (t) { + pt.asn1.DERInteger.superclass.constructor.call(this) + this.hT = '02' + this.setByBigInteger = function (t) { + this.hTLV = null + this.isModified = true + this.hV = pt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t) + } + this.setByInteger = function (t) { + var e = new k(String(t), 10) + this.setByBigInteger(e) + } + this.setValueHex = function (t) { + this.hV = t + } + this.getFreshValueHex = function () { + return this.hV + } + if ('undefined' != typeof t) + if ('undefined' != typeof t['bigint']) + this.setByBigInteger(t['bigint']) + else if ('undefined' != typeof t['int']) this.setByInteger(t['int']) + else if ('number' == typeof t) this.setByInteger(t) + else if ('undefined' != typeof t['hex']) this.setValueHex(t['hex']) + } + vt.lang.extend(pt.asn1.DERInteger, pt.asn1.ASN1Object) + pt.asn1.DERBitString = function (t) { + if (void 0 !== t && 'undefined' !== typeof t.obj) { + var e = pt.asn1.ASN1Util.newObject(t.obj) + t.hex = '00' + e.getEncodedHex() + } + pt.asn1.DERBitString.superclass.constructor.call(this) + this.hT = '03' + this.setHexValueIncludingUnusedBits = function (t) { + this.hTLV = null + this.isModified = true + this.hV = t + } + this.setUnusedBitsAndHexValue = function (t, e) { + if (t < 0 || 7 < t) + throw 'unused bits shall be from 0 to 7: u = ' + t + var r = '0' + t + this.hTLV = null + this.isModified = true + this.hV = r + e + } + this.setByBinaryString = function (t) { + t = t.replace(/0+$/, '') + var e = 8 - (t.length % 8) + if (8 == e) e = 0 + for (var r = 0; r <= e; r++) t += '0' + var i = '' + for (var r = 0; r < t.length - 1; r += 8) { + var n = t.substr(r, 8) + var s = parseInt(n, 2).toString(16) + if (1 == s.length) s = '0' + s + i += s + } + this.hTLV = null + this.isModified = true + this.hV = '0' + e + i + } + this.setByBooleanArray = function (t) { + var e = '' + for (var r = 0; r < t.length; r++) + if (true == t[r]) e += '1' + else e += '0' + this.setByBinaryString(e) + } + this.newFalseArray = function (t) { + var e = new Array(t) + for (var r = 0; r < t; r++) e[r] = false + return e + } + this.getFreshValueHex = function () { + return this.hV + } + if ('undefined' != typeof t) + if ('string' == typeof t && t.toLowerCase().match(/^[0-9a-f]+$/)) + this.setHexValueIncludingUnusedBits(t) + else if ('undefined' != typeof t['hex']) + this.setHexValueIncludingUnusedBits(t['hex']) + else if ('undefined' != typeof t['bin']) + this.setByBinaryString(t['bin']) + else if ('undefined' != typeof t['array']) + this.setByBooleanArray(t['array']) + } + vt.lang.extend(pt.asn1.DERBitString, pt.asn1.ASN1Object) + pt.asn1.DEROctetString = function (t) { + if (void 0 !== t && 'undefined' !== typeof t.obj) { + var e = pt.asn1.ASN1Util.newObject(t.obj) + t.hex = e.getEncodedHex() + } + pt.asn1.DEROctetString.superclass.constructor.call(this, t) + this.hT = '04' + } + vt.lang.extend(pt.asn1.DEROctetString, pt.asn1.DERAbstractString) + pt.asn1.DERNull = function () { + pt.asn1.DERNull.superclass.constructor.call(this) + this.hT = '05' + this.hTLV = '0500' + } + vt.lang.extend(pt.asn1.DERNull, pt.asn1.ASN1Object) + pt.asn1.DERObjectIdentifier = function (t) { + var e = function (t) { + var e = t.toString(16) + if (1 == e.length) e = '0' + e + return e + } + var r = function (t) { + var r = '' + var i = new k(t, 10) + var n = i.toString(2) + var s = 7 - (n.length % 7) + if (7 == s) s = 0 + var a = '' + for (var o = 0; o < s; o++) a += '0' + n = a + n + for (var o = 0; o < n.length - 1; o += 7) { + var u = n.substr(o, 7) + if (o != n.length - 7) u = '1' + u + r += e(parseInt(u, 2)) + } + return r + } + pt.asn1.DERObjectIdentifier.superclass.constructor.call(this) + this.hT = '06' + this.setValueHex = function (t) { + this.hTLV = null + this.isModified = true + this.s = null + this.hV = t + } + this.setValueOidString = function (t) { + if (!t.match(/^[0-9.]+$/)) throw 'malformed oid string: ' + t + var i = '' + var n = t.split('.') + var s = 40 * parseInt(n[0]) + parseInt(n[1]) + i += e(s) + n.splice(0, 2) + for (var a = 0; a < n.length; a++) i += r(n[a]) + this.hTLV = null + this.isModified = true + this.s = null + this.hV = i + } + this.setValueName = function (t) { + var e = pt.asn1.x509.OID.name2oid(t) + if ('' !== e) this.setValueOidString(e) + else throw 'DERObjectIdentifier oidName undefined: ' + t + } + this.getFreshValueHex = function () { + return this.hV + } + if (void 0 !== t) + if ('string' === typeof t) + if (t.match(/^[0-2].[0-9.]+$/)) this.setValueOidString(t) + else this.setValueName(t) + else if (void 0 !== t.oid) this.setValueOidString(t.oid) + else if (void 0 !== t.hex) this.setValueHex(t.hex) + else if (void 0 !== t.name) this.setValueName(t.name) + } + vt.lang.extend(pt.asn1.DERObjectIdentifier, pt.asn1.ASN1Object) + pt.asn1.DEREnumerated = function (t) { + pt.asn1.DEREnumerated.superclass.constructor.call(this) + this.hT = '0a' + this.setByBigInteger = function (t) { + this.hTLV = null + this.isModified = true + this.hV = pt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t) + } + this.setByInteger = function (t) { + var e = new k(String(t), 10) + this.setByBigInteger(e) + } + this.setValueHex = function (t) { + this.hV = t + } + this.getFreshValueHex = function () { + return this.hV + } + if ('undefined' != typeof t) + if ('undefined' != typeof t['int']) this.setByInteger(t['int']) + else if ('number' == typeof t) this.setByInteger(t) + else if ('undefined' != typeof t['hex']) this.setValueHex(t['hex']) + } + vt.lang.extend(pt.asn1.DEREnumerated, pt.asn1.ASN1Object) + pt.asn1.DERUTF8String = function (t) { + pt.asn1.DERUTF8String.superclass.constructor.call(this, t) + this.hT = '0c' + } + vt.lang.extend(pt.asn1.DERUTF8String, pt.asn1.DERAbstractString) + pt.asn1.DERNumericString = function (t) { + pt.asn1.DERNumericString.superclass.constructor.call(this, t) + this.hT = '12' + } + vt.lang.extend(pt.asn1.DERNumericString, pt.asn1.DERAbstractString) + pt.asn1.DERPrintableString = function (t) { + pt.asn1.DERPrintableString.superclass.constructor.call(this, t) + this.hT = '13' + } + vt.lang.extend(pt.asn1.DERPrintableString, pt.asn1.DERAbstractString) + pt.asn1.DERTeletexString = function (t) { + pt.asn1.DERTeletexString.superclass.constructor.call(this, t) + this.hT = '14' + } + vt.lang.extend(pt.asn1.DERTeletexString, pt.asn1.DERAbstractString) + pt.asn1.DERIA5String = function (t) { + pt.asn1.DERIA5String.superclass.constructor.call(this, t) + this.hT = '16' + } + vt.lang.extend(pt.asn1.DERIA5String, pt.asn1.DERAbstractString) + pt.asn1.DERUTCTime = function (t) { + pt.asn1.DERUTCTime.superclass.constructor.call(this, t) + this.hT = '17' + this.setByDate = function (t) { + this.hTLV = null + this.isModified = true + this.date = t + this.s = this.formatDate(this.date, 'utc') + this.hV = stohex(this.s) + } + this.getFreshValueHex = function () { + if ( + 'undefined' == typeof this.date && + 'undefined' == typeof this.s + ) { + this.date = new Date() + this.s = this.formatDate(this.date, 'utc') + this.hV = stohex(this.s) + } + return this.hV + } + if (void 0 !== t) + if (void 0 !== t.str) this.setString(t.str) + else if ('string' == typeof t && t.match(/^[0-9]{12}Z$/)) + this.setString(t) + else if (void 0 !== t.hex) this.setStringHex(t.hex) + else if (void 0 !== t.date) this.setByDate(t.date) + } + vt.lang.extend(pt.asn1.DERUTCTime, pt.asn1.DERAbstractTime) + pt.asn1.DERGeneralizedTime = function (t) { + pt.asn1.DERGeneralizedTime.superclass.constructor.call(this, t) + this.hT = '18' + this.withMillis = false + this.setByDate = function (t) { + this.hTLV = null + this.isModified = true + this.date = t + this.s = this.formatDate(this.date, 'gen', this.withMillis) + this.hV = stohex(this.s) + } + this.getFreshValueHex = function () { + if (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) + } + return this.hV + } + if (void 0 !== t) { + if (void 0 !== t.str) this.setString(t.str) + else if ('string' == typeof t && t.match(/^[0-9]{14}Z$/)) + this.setString(t) + else if (void 0 !== t.hex) this.setStringHex(t.hex) + else if (void 0 !== t.date) this.setByDate(t.date) + if (true === t.millis) this.withMillis = true + } + } + vt.lang.extend(pt.asn1.DERGeneralizedTime, pt.asn1.DERAbstractTime) + pt.asn1.DERSequence = function (t) { + pt.asn1.DERSequence.superclass.constructor.call(this, t) + this.hT = '30' + this.getFreshValueHex = function () { + var t = '' + for (var e = 0; e < this.asn1Array.length; e++) { + var r = this.asn1Array[e] + t += r.getEncodedHex() + } + this.hV = t + return this.hV + } + } + vt.lang.extend(pt.asn1.DERSequence, pt.asn1.DERAbstractStructured) + pt.asn1.DERSet = function (t) { + pt.asn1.DERSet.superclass.constructor.call(this, t) + this.hT = '31' + this.sortFlag = true + this.getFreshValueHex = function () { + var t = new Array() + for (var e = 0; e < this.asn1Array.length; e++) { + var r = this.asn1Array[e] + t.push(r.getEncodedHex()) + } + if (true == this.sortFlag) t.sort() + this.hV = t.join('') + return this.hV + } + if ('undefined' != typeof t) + if ('undefined' != typeof t.sortflag && false == t.sortflag) + this.sortFlag = false + } + vt.lang.extend(pt.asn1.DERSet, pt.asn1.DERAbstractStructured) + pt.asn1.DERTaggedObject = function (t) { + pt.asn1.DERTaggedObject.superclass.constructor.call(this) + this.hT = 'a0' + this.hV = '' + this.isExplicit = true + this.asn1Object = null + this.setASN1Object = function (t, e, r) { + this.hT = e + this.isExplicit = t + this.asn1Object = r + if (this.isExplicit) { + this.hV = this.asn1Object.getEncodedHex() + this.hTLV = null + this.isModified = true + } else { + this.hV = null + this.hTLV = r.getEncodedHex() + this.hTLV = this.hTLV.replace(/^../, e) + this.isModified = false + } + } + this.getFreshValueHex = function () { + return this.hV + } + if ('undefined' != typeof t) { + if ('undefined' != typeof t['tag']) this.hT = t['tag'] + if ('undefined' != typeof t['explicit']) + this.isExplicit = t['explicit'] + if ('undefined' != typeof t['obj']) { + this.asn1Object = t['obj'] + this.setASN1Object(this.isExplicit, this.hT, this.asn1Object) + } + } + } + vt.lang.extend(pt.asn1.DERTaggedObject, pt.asn1.ASN1Object) + var gt = + (void 0 && (void 0).__extends) || + (function () { + var t = function (e, r) { + t = + Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && + function (t, e) { + t.__proto__ = e + }) || + function (t, e) { + for (var r in e) + if (Object.prototype.hasOwnProperty.call(e, r)) t[r] = e[r] + } + return t(e, r) + } + return function (e, r) { + if ('function' !== typeof r && null !== r) + throw new TypeError( + 'Class extends value ' + + String(r) + + ' is not a constructor or null' + ) + t(e, r) + function i() { + this.constructor = e + } + e.prototype = + null === r + ? Object.create(r) + : ((i.prototype = r.prototype), new i()) + } + })() + var yt = (function (t) { + gt(e, t) + function e(r) { + var i = t.call(this) || this + if (r) + if ('string' === typeof r) i.parseKey(r) + else if (e.hasPrivateKeyProperty(r) || e.hasPublicKeyProperty(r)) + i.parsePropertiesFrom(r) + return i + } + e.prototype.parseKey = function (t) { + try { + var e = 0 + var r = 0 + var i = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/ + var n = i.test(t) ? y.decode(t) : _.unarmor(t) + var s = M.decode(n) + if (3 === s.sub.length) s = s.sub[2].sub[0] + if (9 === s.sub.length) { + e = s.sub[1].getHexStringValue() + this.n = K(e, 16) + r = s.sub[2].getHexStringValue() + this.e = parseInt(r, 16) + var a = s.sub[3].getHexStringValue() + this.d = K(a, 16) + var o = s.sub[4].getHexStringValue() + this.p = K(o, 16) + var u = s.sub[5].getHexStringValue() + this.q = K(u, 16) + var c = s.sub[6].getHexStringValue() + this.dmp1 = K(c, 16) + var l = s.sub[7].getHexStringValue() + this.dmq1 = K(l, 16) + var f = s.sub[8].getHexStringValue() + this.coeff = K(f, 16) + } else if (2 === s.sub.length) { + var h = s.sub[1] + var d = h.sub[0] + e = d.sub[0].getHexStringValue() + this.n = K(e, 16) + r = d.sub[1].getHexStringValue() + this.e = parseInt(r, 16) + } else return false + return true + } catch (t) { + return false + } + } + e.prototype.getPrivateBaseKey = function () { + var t = { + array: [ + new pt.asn1.DERInteger({ int: 0 }), + new pt.asn1.DERInteger({ bigint: this.n }), + new pt.asn1.DERInteger({ int: this.e }), + new pt.asn1.DERInteger({ bigint: this.d }), + new pt.asn1.DERInteger({ bigint: this.p }), + new pt.asn1.DERInteger({ bigint: this.q }), + new pt.asn1.DERInteger({ bigint: this.dmp1 }), + new pt.asn1.DERInteger({ bigint: this.dmq1 }), + new pt.asn1.DERInteger({ bigint: this.coeff }), + ], + } + var e = new pt.asn1.DERSequence(t) + return e.getEncodedHex() + } + e.prototype.getPrivateBaseKeyB64 = function () { + return d(this.getPrivateBaseKey()) + } + e.prototype.getPublicBaseKey = function () { + var t = new pt.asn1.DERSequence({ + array: [ + new pt.asn1.DERObjectIdentifier({ + oid: '1.2.840.113549.1.1.1', + }), + new pt.asn1.DERNull(), + ], + }) + var e = new pt.asn1.DERSequence({ + array: [ + new pt.asn1.DERInteger({ bigint: this.n }), + new pt.asn1.DERInteger({ int: this.e }), + ], + }) + var r = new pt.asn1.DERBitString({ hex: '00' + e.getEncodedHex() }) + var i = new pt.asn1.DERSequence({ array: [t, r] }) + return i.getEncodedHex() + } + e.prototype.getPublicBaseKeyB64 = function () { + return d(this.getPublicBaseKey()) + } + e.wordwrap = function (t, e) { + e = e || 64 + if (!t) return t + var r = '(.{1,' + e + '})( +|$\n?)|(.{1,' + e + '})' + return t.match(RegExp(r, 'g')).join('\n') + } + e.prototype.getPrivateKey = function () { + var t = '-----BEGIN RSA PRIVATE KEY-----\n' + t += e.wordwrap(this.getPrivateBaseKeyB64()) + '\n' + t += '-----END RSA PRIVATE KEY-----' + return t + } + e.prototype.getPublicKey = function () { + var t = '-----BEGIN PUBLIC KEY-----\n' + t += e.wordwrap(this.getPublicBaseKeyB64()) + '\n' + t += '-----END PUBLIC KEY-----' + return t + } + e.hasPublicKeyProperty = function (t) { + t = t || {} + return t.hasOwnProperty('n') && t.hasOwnProperty('e') + } + e.hasPrivateKeyProperty = function (t) { + t = t || {} + return ( + t.hasOwnProperty('n') && + t.hasOwnProperty('e') && + t.hasOwnProperty('d') && + t.hasOwnProperty('p') && + t.hasOwnProperty('q') && + t.hasOwnProperty('dmp1') && + t.hasOwnProperty('dmq1') && + t.hasOwnProperty('coeff') + ) + } + e.prototype.parsePropertiesFrom = function (t) { + this.n = t.n + this.e = t.e + if (t.hasOwnProperty('d')) { + this.d = t.d + this.p = t.p + this.q = t.q + this.dmp1 = t.dmp1 + this.dmq1 = t.dmq1 + this.coeff = t.coeff + } + } + return e + })(ut) + const mt = { i: '3.2.1' } + var _t = (function () { + function t(t) { + if (void 0 === t) t = {} + t = t || {} + this.default_key_size = t.default_key_size + ? parseInt(t.default_key_size, 10) + : 1024 + this.default_public_exponent = t.default_public_exponent || '010001' + this.log = t.log || false + this.key = null + } + t.prototype.setKey = function (t) { + if (this.log && this.key) + console.warn('A key was already set, overriding existing.') + this.key = new yt(t) + } + t.prototype.setPrivateKey = function (t) { + this.setKey(t) + } + t.prototype.setPublicKey = function (t) { + this.setKey(t) + } + t.prototype.decrypt = function (t) { + try { + return this.getKey().decrypt(v(t)) + } catch (t) { + return false + } + } + t.prototype.encrypt = function (t) { + try { + return this.getKey().encrypt(t) + } catch (t) { + return false + } + } + t.prototype.encryptLong = function (t) { + try { + return d(this.getKey().encryptLong(t)) + } catch (t) { + return false + } + } + t.prototype.decryptLong = function (t) { + try { + return this.getKey().decryptLong(t) + } catch (t) { + return false + } + } + t.prototype.sign = function (t, e, r) { + try { + return d(this.getKey().sign(t, e, r)) + } catch (t) { + return false + } + } + t.prototype.verify = function (t, e, r) { + try { + return this.getKey().verify(t, v(e), r) + } catch (t) { + return false + } + } + t.prototype.getKey = function (t) { + if (!this.key) { + this.key = new yt() + if (t && '[object Function]' === {}.toString.call(t)) { + this.key.generateAsync( + this.default_key_size, + this.default_public_exponent, + t + ) + return + } + this.key.generate( + this.default_key_size, + this.default_public_exponent + ) + } + return this.key + } + t.prototype.getPrivateKey = function () { + return this.getKey().getPrivateKey() + } + t.prototype.getPrivateKeyB64 = function () { + return this.getKey().getPrivateBaseKeyB64() + } + t.prototype.getPublicKey = function () { + return this.getKey().getPublicKey() + } + t.prototype.getPublicKeyB64 = function () { + return this.getKey().getPublicBaseKeyB64() + } + t.version = mt.i + return t + })() + const St = _t + }, + 2480: () => {}, + } + var e = {} + function r(i) { + var n = e[i] + if (void 0 !== n) return n.exports + var s = (e[i] = { exports: {} }) + t[i].call(s.exports, s, s.exports, r) + return s.exports + } + ;(() => { + r.d = (t, e) => { + for (var i in e) + if (r.o(e, i) && !r.o(t, i)) + Object.defineProperty(t, i, { enumerable: true, get: e[i] }) + } + })() + ;(() => { + r.g = (function () { + if ('object' === typeof globalThis) return globalThis + try { + return this || new Function('return this')() + } catch (t) { + if ('object' === typeof window) return window + } + })() + })() + ;(() => { + r.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e) + })() + ;(() => { + r.r = (t) => { + if ('undefined' !== typeof Symbol && Symbol.toStringTag) + Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }) + Object.defineProperty(t, '__esModule', { value: true }) + } + })() + var i = r(5987) + return i + })() +}) +//# sourceMappingURL=gtpush.map diff --git a/packages/uni-push/lib/gtpush-min.js.LICENSE.txt b/packages/uni-push/lib/gtpush-min.js.LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..3520684e1a8e69c8540806cc73f528bacc64bf0d --- /dev/null +++ b/packages/uni-push/lib/gtpush-min.js.LICENSE.txt @@ -0,0 +1,32 @@ +/*! +Copyright (c) 2011, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.9.0 +*/ + +/** + * @fileOverview + * @name asn1-1.0.js + * @author Kenji Urushima kenji.urushima@gmail.com + * @version asn1 1.0.13 (2017-Jun-02) + * @since jsrsasign 2.1 + * @license MIT License + */ + +/** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + +/** @preserve + (c) 2012 by Cédric Mesnil. 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. + + 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 HOLDER 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. + */ diff --git a/packages/uni-push/lib/gtpush.map b/packages/uni-push/lib/gtpush.map new file mode 100644 index 0000000000000000000000000000000000000000..c3d29fc0ad821d1449d7f6d43d1f43308439b62c --- /dev/null +++ b/packages/uni-push/lib/gtpush.map @@ -0,0 +1 @@ +{"version":3,"file":"gtpush-min.js","mappings":";CAAA,SAAUA,EAAiCC,EAAMC,GAChD,GAAsB,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,QACP,GAAsB,kBAAZC,QACdA,QAAQ,UAAYD,SAEpBD,EAAK,UAAYC,KARnB,CASGK,MAAM,WACT,wCCVE,SAAUN,EAAMC,EAASM,GAC1B,GAAI,KAEHJ,EAAOD,QAAUA,EAAUD,EAAQ,EAAQ,MAAW,EAAQ,MAAiB,EAAQ,MAAU,EAAQ,KAAa,EAAQ,QAH/H,CAaCO,MAAM,SAAUC,IAEhB,WAEG,IAAIC,EAAID,EACR,IAAIE,EAAQD,EAAEE,IACd,IAAIC,EAAcF,EAAME,YACxB,IAAIC,EAASJ,EAAEK,KAGf,IAAIC,EAAO,GACX,IAAIC,EAAW,GACf,IAAIC,EAAY,GAChB,IAAIC,EAAY,GAChB,IAAIC,EAAY,G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D,EACd,GAAGJ,EAAoBjF,EAAEqF,EAAYngD,KAAS+/C,EAAoBjF,EAAEt9C,EAASwC,GAC5E+I,OAAOob,eAAe3mB,EAASwC,EAAK,CAAEogD,WAAY,KAAMh0B,IAAK+zB,EAAWngD,gBCJ3E+/C,EAAoBx3C,EAAI,WACvB,GAA0B,kBAAfF,WAAyB,OAAOA,WAC3C,IACC,OAAOvK,MAAQ,IAAIuiD,SAAS,cAAb,GACd,MAAO50C,GACR,GAAsB,kBAAXrD,OAAqB,OAAOA,QALjB,aCAxB23C,EAAoBjF,EAAI,CAAC7xC,EAAKq3C,IAAUv3C,OAAOI,UAAUE,eAAerG,KAAKiG,EAAKq3C,aCClFP,EAAoB51B,EAAK3sB,IACxB,GAAqB,qBAAX+iD,QAA0BA,OAAOC,YAC1Cz3C,OAAOob,eAAe3mB,EAAS+iD,OAAOC,YAAa,CAAEp8B,MAAO,WAE7Drb,OAAOob,eAAe3mB,EAAS,aAAc,CAAE4mB,MAAO,YCFvD,IAAIq8B,EAAsBV,EAAoB","sources":["webpack://gtpush/webpack/universalModuleDefinition","webpack://gtpush/./node_modules/crypto-js/aes.js","webpack://gtpush/./node_modules/crypto-js/cipher-core.js","webpack://gtpush/./node_modules/crypto-js/core.js","webpack://gtpush/./node_modules/crypto-js/enc-base64.js","webpack://gtpush/./node_modules/crypto-js/enc-base64url.js","webpack://gtpush/./node_modules/crypto-js/enc-utf16.js","webpack://gtpush/./node_modules/crypto-js/evpkdf.js","webpack://gtpush/./node_modules/crypto-js/format-hex.js","webpack://gtpush/./node_modules/crypto-js/hmac.js","webpack://gtpush/./node_modules/crypto-js/index.js","webpack://gtpush/./node_modules/crypto-js/lib-typedarrays.js","webpack://gtpush/./node_modules/crypto-js/md5.js","webpack://gtpush/./node_modules/crypto-js/mode-cfb.js","webpack://gtpush/./node_modules/crypto-js/mode-ctr-gladman.js","webpack://gtpush/./node_modules/crypto-js/mode-ctr.js","webpack://gtpush/./node_modules/crypto-js/mode-ecb.js","webpack://gtpush/./node_modules/crypto-js/mode-ofb.js","webpack://gtpush/./node_modules/crypto-js/pad-ansix923.js","webpack://gtpush/./node_modules/crypto-js/pad-iso10126.js","webpack://gtpush/./node_modules/crypto-js/pad-iso97971.js","webpack://gtpush/./node_modules/crypto-js/pad-nopadding.js","webpack://gtpush/./node_modules/crypto-js/pad-zeropadding.js","webpack://gtpush/./node_modules/crypto-js/pbkdf2.js","webpack://gtpush/./node_modules/crypto-js/rabbit-legacy.js","webpack://gtpush/./node_modules/crypto-js/rabbit.js","webpack://gtpush/./node_modules/crypto-js/rc4.js","webpack://gtpush/./node_modules/crypto-js/ripemd160.js","webpack://gtpush/./node_modules/crypto-js/sha1.js","webpack://gtpush/./node_modules/crypto-js/sha224.js","webpack://gtpush/./node_modules/crypto-js/sha256.js","webpack://gtpush/./node_modules/crypto-js/sha3.js","webpack://gtpush/./node_modules/crypto-js/sha384.js","webpack://gtpush/./node_modules/crypto-js/sha512.js","webpack://gtpush/./node_modules/crypto-js/tripledes.js","webpack://gtpush/./node_modules/crypto-js/x64-core.js","webpack://gtpush/./src/ErrorCode.ts","webpack://gtpush/./src/GtPush.ts","webpack://gtpush/./src/core/Constant.ts","webpack://gtpush/./src/core/GtLogic.ts","webpack://gtpush/./src/core/GtRuntime.ts","webpack://gtpush/./src/message/ActionMsg.ts","webpack://gtpush/./src/message/ClientMsg/AddPhoneInfo.ts","webpack://gtpush/./src/message/ClientMsg/BindAlias.ts","webpack://gtpush/./src/message/ClientMsg/Feedback.ts","webpack://gtpush/./src/message/ClientMsg/SetTag.ts","webpack://gtpush/./src/message/ClientMsg/UnbindAlias.ts","webpack://gtpush/./src/message/HeartBeat.ts","webpack://gtpush/./src/message/KeyNegotiate.ts","webpack://gtpush/./src/message/KeyNegotiateResult.ts","webpack://gtpush/./src/message/Login.ts","webpack://gtpush/./src/message/LoginResult.ts","webpack://gtpush/./src/message/Message.ts","webpack://gtpush/./src/message/MessageCoder.ts","webpack://gtpush/./src/message/MessageHandler.ts","webpack://gtpush/./src/message/Received.ts","webpack://gtpush/./src/message/Register.ts","webpack://gtpush/./src/message/RegisterResult.ts","webpack://gtpush/./src/message/ServerClose.ts","webpack://gtpush/./src/message/ServerMsg/AddPhoneInfoResult.ts","webpack://gtpush/./src/message/ServerMsg/BindAliasResult.ts","webpack://gtpush/./src/message/ServerMsg/FeedbackResult.ts","webpack://gtpush/./src/message/ServerMsg/PushMessage.ts","webpack://gtpush/./src/message/ServerMsg/RedirectServer.ts","webpack://gtpush/./src/message/ServerMsg/SetModeResult.ts","webpack://gtpush/./src/message/ServerMsg/SetTagResult.ts","webpack://gtpush/./src/message/ServerMsg/UnbindAliasResult.ts","webpack://gtpush/./src/task/DelayTask.ts","webpack://gtpush/./src/task/HeartBeatTask.ts","webpack://gtpush/./src/uniapi/Device.ts","webpack://gtpush/./src/uniapi/SocketManager.ts","webpack://gtpush/./src/uniapi/Storage.ts","webpack://gtpush/./src/utils/CryptManager.ts","webpack://gtpush/./src/utils/Log.ts","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/util.js","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/base64.js","webpack://gtpush/./src/wxmp-rsa/lib/asn1js/hex.js","webpack://gtpush/./src/wxmp-rsa/lib/asn1js/base64.js","webpack://gtpush/./src/wxmp-rsa/lib/asn1js/int10.js","webpack://gtpush/./src/wxmp-rsa/lib/asn1js/asn1.js","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/jsbn.js","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/prng4.js","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/rng.js","webpack://gtpush/./src/wxmp-rsa/lib/jsbn/rsa.js","webpack://gtpush/./src/wxmp-rsa/lib/jsrsasign/yahoo.js","webpack://gtpush/./src/wxmp-rsa/lib/jsrsasign/asn1-1.0.js","webpack://gtpush/./src/wxmp-rsa/JSEncryptRSAKey.js","webpack://gtpush/./src/wxmp-rsa/JSEncrypt.js","webpack://gtpush/./src/wxmp-rsa/index.js","webpack://gtpush/webpack/bootstrap","webpack://gtpush/webpack/runtime/define property getters","webpack://gtpush/webpack/runtime/global","webpack://gtpush/webpack/runtime/hasOwnProperty shorthand","webpack://gtpush/webpack/runtime/make namespace object","webpack://gtpush/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"gtpush\"] = factory();\n\telse\n\t\troot[\"gtpush\"] = factory();\n})(self, function() {\nreturn ",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t var t;\n\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t var block;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t var modeCreator;\n\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t var finalProcessedBlocks;\n\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t var wordArray;\n\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t var salt;\n\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64url encoding strategy.\n\t */\n\t var Base64url = C_enc.Base64url = {\n\t /**\n\t * Converts a word array to a Base64url string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {string} The Base64url string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);\n\t */\n\t stringify: function (wordArray, urlSafe=true) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = urlSafe ? this._safe_map : this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64url string to a word array.\n\t *\n\t * @param {string} base64Str The Base64url string.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64url.parse(base64String);\n\t */\n\t parse: function (base64Str, urlSafe=true) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = urlSafe ? this._safe_map : this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n\t _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\treturn CryptoJS.enc.Base64url;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t var block;\n\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./lib-typedarrays\"), require(\"./enc-utf16\"), require(\"./enc-base64\"), require(\"./enc-base64url\"), require(\"./md5\"), require(\"./sha1\"), require(\"./sha256\"), require(\"./sha224\"), require(\"./sha512\"), require(\"./sha384\"), require(\"./sha3\"), require(\"./ripemd160\"), require(\"./hmac\"), require(\"./pbkdf2\"), require(\"./evpkdf\"), require(\"./cipher-core\"), require(\"./mode-cfb\"), require(\"./mode-ctr\"), require(\"./mode-ctr-gladman\"), require(\"./mode-ofb\"), require(\"./mode-ecb\"), require(\"./pad-ansix923\"), require(\"./pad-iso10126\"), require(\"./pad-iso97971\"), require(\"./pad-zeropadding\"), require(\"./pad-nopadding\"), require(\"./format-hex\"), require(\"./aes\"), require(\"./tripledes\"), require(\"./rc4\"), require(\"./rabbit\"), require(\"./rabbit-legacy\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./lib-typedarrays\", \"./enc-utf16\", \"./enc-base64\", \"./enc-base64url\", \"./md5\", \"./sha1\", \"./sha256\", \"./sha224\", \"./sha512\", \"./sha384\", \"./sha3\", \"./ripemd160\", \"./hmac\", \"./pbkdf2\", \"./evpkdf\", \"./cipher-core\", \"./mode-cfb\", \"./mode-ctr\", \"./mode-ctr-gladman\", \"./mode-ofb\", \"./mode-ecb\", \"./pad-ansix923\", \"./pad-iso10126\", \"./pad-iso97971\", \"./pad-zeropadding\", \"./pad-nopadding\", \"./format-hex\", \"./aes\", \"./tripledes\", \"./rc4\", \"./rabbit\", \"./rabbit-legacy\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working varialbes\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t var keystream;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t for (var i = data.sigBytes - 1; i >= 0; i--) {\n\t if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t data.sigBytes = i + 1;\n\t break;\n\t }\n\t }\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA1 = C_algo.SHA1;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA1\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA1,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - 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.\n\n\tTHIS 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 HOLDER 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.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t var tMsw;\n\t var tLsw;\n\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./sha512\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./sha512\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t var Wil;\n\t var Wih;\n\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t Wih = Wi.high = M[offset + i * 2] | 0;\n\t Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t Wil = gamma0l + Wi7l;\n\t Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t Wil = Wil + gamma1l;\n\t Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t Wil = Wil + Wi16l;\n\t Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t // Make sure the key length is valid (64, 128 or >= 192 bit)\n\t if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n\t throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n\t }\n\n\t // Extend the key according to the keying options defined in 3DES standard\n\t var key1 = keyWords.slice(0, 2);\n\t var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n\t var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(key1));\n\t this._des2 = DES.createEncryptor(WordArray.create(key2));\n\t this._des3 = DES.createEncryptor(WordArray.create(key3));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = void 0;\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ErrorCode[ErrorCode[\"CLIENT_ID_NOT_FOUND\"] = 1] = \"CLIENT_ID_NOT_FOUND\";\n ErrorCode[ErrorCode[\"OPERATION_TOO_OFTEN\"] = 2] = \"OPERATION_TOO_OFTEN\";\n ErrorCode[ErrorCode[\"REPEAT_MESSAGE\"] = 3] = \"REPEAT_MESSAGE\";\n ErrorCode[ErrorCode[\"TIME_OUT\"] = 4] = \"TIME_OUT\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtLogic_1 = __importDefault(require(\"./core/GtLogic\"));\nconst GtRuntime_1 = __importDefault(require(\"./core/GtRuntime\"));\nconst Log_1 = __importDefault(require(\"./utils/Log\"));\nvar GtPush;\n(function (GtPush) {\n /**\n * 设置调试模式\n * @param debugMode 打开或关闭调试模式\n */\n function setDebugMode(debugMode) {\n Log_1.default.debugMode = debugMode;\n Log_1.default.info(`setDebugMode: ${debugMode}`);\n }\n GtPush.setDebugMode = setDebugMode;\n /**\n * 初始化GtPush\n */\n function init(obj) {\n try {\n checkAppid(obj.appid);\n GtLogic_1.default.init(obj);\n }\n catch (error) {\n Log_1.default.error(`init error`, error);\n }\n }\n GtPush.init = init;\n /**\n * 设置一组标签,后续可使用该标签定向推送\n * 需要在获取到Clientid之后调用,默认一天只能成功设置一次(可联系技术支持进行修改)\n */\n function setTag(obj) {\n try {\n GtLogic_1.default.setTag(obj);\n }\n catch (error) {\n Log_1.default.error(`setTag error`, error);\n }\n }\n GtPush.setTag = setTag;\n /**\n * 绑定别名,后续可以使用该别名进行定向推送,重复绑定以最后一次为准\n * 两次调用的间隔需大于 1s,每天限制调用 100 次\n * 可用于与客户账号系统关联,建议将邮箱、昵称、手机号等用户标识设为别名\n * 使用场景:\n * 同一个账号(比如手机号)分别登陆在 A、B、C 三台设备上的同一个 APP,产生了 3 个不同的 cid,\n * 想让这三台设备同时接收到推送,就可以让三台设备的三个cid都绑定同一个别名也就是你的账号(比如手机号),\n * 最多支持 10 台设备,也就是最多绑定 10 个 cid\n */\n function bindAlias(obj) {\n try {\n GtLogic_1.default.bindAlias(obj);\n }\n catch (error) {\n Log_1.default.error(`bindAlias error`, error);\n }\n }\n GtPush.bindAlias = bindAlias;\n /**\n * 解绑别名\n * 两次调用的间隔需大于 1s。只能解绑与当前应用 cid 关联的别名,每天限制调用 100 次\n */\n function unbindAlias(obj) {\n try {\n GtLogic_1.default.unbindAlias(obj);\n }\n catch (error) {\n Log_1.default.error(`unbindAlias error`, error);\n }\n }\n GtPush.unbindAlias = unbindAlias;\n /**\n * 配置socketServer信息\n * @param obj sockeetServer配置,包括url、key、keyId\n */\n function setSocketServer(obj) {\n try {\n if (!obj.url) {\n throw new Error('invalid url');\n }\n if (!obj.key || !obj.keyId) {\n throw new Error('invalid key or keyId');\n }\n GtRuntime_1.default.socketUrl = obj.url;\n GtRuntime_1.default.publicKeyId = obj.keyId;\n GtRuntime_1.default.publicKey = obj.key;\n }\n catch (error) {\n Log_1.default.error(`setSocketServer error`, error);\n }\n }\n GtPush.setSocketServer = setSocketServer;\n /**\n * 设置是否允许socket连接\n * @param enable 是否允许socket连接\n */\n function enableSocket(enable) {\n try {\n GtLogic_1.default.enableSocket(enable);\n }\n catch (error) {\n Log_1.default.error(`enableSocket error`, error);\n }\n }\n GtPush.enableSocket = enableSocket;\n // /**\n // * 打开推送\n // */\n // export function turnOn():void {\n // try {\n // \tGtLogic.turnOn()\n // }catch(error) {\n // \tLog.error(`turnOn error`, error)\n // }\n // }\n // /**\n // * 关闭推送\n // */\n // export function turnOff():void {\n // try {\n // \tGtLogic.turnOff()\n // }catch(error) {\n // \tLog.error(`turnOn error`, error)\n // }\n // }\n function checkAppid(appid) {\n if (appid == null || appid == undefined || appid.trim() == '') {\n throw new Error(`invalid appid ${appid}`);\n }\n }\n})(GtPush || (GtPush = {}));\nexports.default = GtPush;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Constant;\n(function (Constant) {\n Constant.SDK_VERSION = 'GTMP-1.0.0.0';\n Constant.DEFAULT_SOCKET_URL = 'wss://wshz.getui.net:5223/nws';\n Constant.SOCKET_PROTOCOL_VERSION = '1.0';\n //测试环境\n // export const SERVER_PUBLIC_KEY = \"MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAMltTBkk0HDen5gSn2gX5n4EoBlaQWc0S+d2X6BEPBWpktX8IJk14QbVRFAB2YJlM7kkq+g2jaDVXo+rEq539xJhBPId7hf1a3hhk/qOF0Z4n8pI0URBEGK/IeJr9Ktb8wIDAQAB\";\n // export const SERVER_PUBLIC_KEY_ID = \"fe078ec968ebae837c563bbc73c4672d\";\n //正式环境\n Constant.SERVER_PUBLIC_KEY = \"MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAJp1rROuvBF7sBSnvLaesj2iFhMcY8aXyLvpnNLKs2wjL3JmEnyr++SlVa35liUlzi83tnAFkn3A9GB7pHBNzawyUkBh8WUhq5bnFIkk2RaDa6+5MpG84DEv52p7RR+aWwIDAQAB\";\n Constant.SERVER_PUBLIC_KEY_ID = \"69d747c4b9f641baf4004be4297e9f3b\";\n})(Constant || (Constant = {}));\nexports.default = Constant;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst SocketManager_1 = __importDefault(require(\"../uniapi/SocketManager\"));\nconst Log_1 = __importDefault(require(\"../utils/Log\"));\nconst ErrorCode_1 = require(\"../ErrorCode\");\nconst GtRuntime_1 = __importDefault(require(\"./GtRuntime\"));\nconst BindAlias_1 = __importDefault(require(\"../message/ClientMsg/BindAlias\"));\nconst SetTag_1 = __importDefault(require(\"../message/ClientMsg/SetTag\"));\nconst UnbindAlias_1 = __importDefault(require(\"../message/ClientMsg/UnbindAlias\"));\nclass GtLogic {\n static init(obj) {\n if (this.inited) {\n return;\n }\n try {\n this.inited = true;\n Log_1.default.info(`init: appid=${obj.appid}`);\n GtRuntime_1.default.init(obj);\n SocketManager_1.default.connect();\n }\n catch (error) {\n this.inited = false;\n }\n }\n static enableSocket(enable) {\n this.checkInit();\n SocketManager_1.default.allowReconnect = enable;\n if (enable) {\n SocketManager_1.default.reconnect(0);\n }\n else {\n SocketManager_1.default.close(`enableSocket ${enable}`);\n }\n }\n static setTag(obj) {\n var _a;\n this.checkInit();\n if (!GtRuntime_1.default.cid) {\n (_a = obj.setTagResult) === null || _a === void 0 ? void 0 : _a.call(obj.setTagResult, { resultCode: ErrorCode_1.ErrorCode.CLIENT_ID_NOT_FOUND, message: 'client id not found' });\n return;\n }\n SetTag_1.default.create(obj.tags, obj.setTagResult).send();\n }\n static bindAlias(obj) {\n var _a, _b;\n this.checkInit();\n if (!GtRuntime_1.default.cid) {\n (_a = obj.bindAliasResult) === null || _a === void 0 ? void 0 : _a.call(obj.bindAliasResult, { resultCode: ErrorCode_1.ErrorCode.CLIENT_ID_NOT_FOUND, message: 'client id not found' });\n return;\n }\n //1秒频控\n let time = new Date().getTime();\n if (time - GtRuntime_1.default.lastAliasTime < 1 * 1000) {\n Log_1.default.error(`bind alias fail: alias option can only be called once a second`);\n (_b = obj.bindAliasResult) === null || _b === void 0 ? void 0 : _b.call(obj.bindAliasResult, { resultCode: ErrorCode_1.ErrorCode.OPERATION_TOO_OFTEN, message: 'alias option can only be called once a second' });\n return;\n }\n BindAlias_1.default.create(obj.alias, true, obj.bindAliasResult).send();\n GtRuntime_1.default.lastAliasTime = time;\n }\n static unbindAlias(obj) {\n var _a, _b;\n this.checkInit();\n if (!GtRuntime_1.default.cid) {\n (_a = obj.unbindAliasResult) === null || _a === void 0 ? void 0 : _a.call(obj.unbindAliasResult, { resultCode: ErrorCode_1.ErrorCode.CLIENT_ID_NOT_FOUND, message: 'client id not found' });\n return;\n }\n //1秒频控\n let time = new Date().getTime();\n if (time - GtRuntime_1.default.lastAliasTime < 1 * 1000) {\n Log_1.default.error(`unbindAlias alias fail: alias option can only be called once a second`);\n (_b = obj.unbindAliasResult) === null || _b === void 0 ? void 0 : _b.call(obj.unbindAliasResult, { resultCode: ErrorCode_1.ErrorCode.OPERATION_TOO_OFTEN, message: 'alias option can only be called once a second' });\n return;\n }\n UnbindAlias_1.default.create(obj.alias, obj.onlySelf, obj.unbindAliasResult).send();\n GtRuntime_1.default.lastAliasTime = time;\n }\n static turnOff() {\n }\n static turnOn() {\n }\n static checkInit() {\n if (!this.inited) {\n throw new Error(`not init, please invoke init method firstly`);\n }\n }\n}\nGtLogic.inited = false;\nexports.default = GtLogic;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst CryptManager_1 = __importDefault(require(\"../utils/CryptManager\"));\nconst Storage_1 = __importDefault(require(\"../uniapi/Storage\"));\nconst Constant_1 = __importDefault(require(\"./Constant\"));\nconst SocketManager_1 = __importDefault(require(\"../uniapi/SocketManager\"));\nconst Log_1 = __importDefault(require(\"../utils/Log\"));\nconst Device_1 = __importDefault(require(\"../uniapi/Device\"));\nclass GtRuntime {\n static init(obj) {\n var _a;\n this.appid = obj.appid;\n this.onClientId = obj.onClientId;\n this.onlineState = obj.onlineState;\n this.onPushMsg = obj.onPushMsg;\n if (this.appid != Storage_1.default.getSync(Storage_1.default.KEY_APPID, this.appid)) {\n Log_1.default.info('appid changed, clear session and cid');\n //appid发生变更,清除本地cid、session、regId\n Storage_1.default.setSync(Storage_1.default.KEY_CID, '');\n Storage_1.default.setSync(Storage_1.default.KEY_SESSION, '');\n }\n Storage_1.default.setSync(Storage_1.default.KEY_APPID, this.appid);\n this.cid = Storage_1.default.getSync(Storage_1.default.KEY_CID, this.cid);\n if (this.cid) {\n (_a = this.onClientId) === null || _a === void 0 ? void 0 : _a.call(this, { cid: GtRuntime.cid });\n }\n this.session = Storage_1.default.getSync(Storage_1.default.KEY_SESSION, this.session);\n this.deviceId = Storage_1.default.getSync(Storage_1.default.KEY_DEVICE_ID, this.deviceId);\n this.regId = Storage_1.default.getSync(Storage_1.default.KEY_REGID, this.regId);\n if (!this.regId) {\n this.regId = this.createRegId();\n Storage_1.default.set({ key: Storage_1.default.KEY_REGID, data: this.regId });\n }\n this.socketUrl = Storage_1.default.getSync(Storage_1.default.KEY_SOCKET_URL, this.socketUrl);\n let _this = this;\n Device_1.default.getNetworkType({\n success: (networkType) => {\n _this.networkType = networkType;\n _this.networkConnected = _this.networkType != 'none' && _this.networkType != '';\n }\n });\n Device_1.default.onNetworkStatusChange((result) => {\n _this.networkConnected = result.isConnected;\n _this.networkType = result.networkType;\n if (_this.networkConnected) {\n SocketManager_1.default.reconnect(0);\n }\n });\n }\n static createRegId() {\n return `M-V${CryptManager_1.default.md5Hex(this.getUuid())}-${new Date().getTime()}`;\n }\n static getUuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n }\n}\nGtRuntime.appid = '';\nGtRuntime.cid = '';\nGtRuntime.regId = '';\nGtRuntime.session = '';\nGtRuntime.deviceId = '';\nGtRuntime.packetId = 1;\nGtRuntime.online = false;\nGtRuntime.socketUrl = Constant_1.default.DEFAULT_SOCKET_URL;\nGtRuntime.publicKeyId = Constant_1.default.SERVER_PUBLIC_KEY_ID;\nGtRuntime.publicKey = Constant_1.default.SERVER_PUBLIC_KEY;\nGtRuntime.lastAliasTime = 0;\nGtRuntime.networkConnected = true;\nGtRuntime.networkType = 'none';\nexports.default = GtRuntime;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Message_1 = __importDefault(require(\"./Message\"));\nconst ErrorCode_1 = require(\"../ErrorCode\");\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nclass ActionMsg extends Message_1.default {\n constructor() {\n super(...arguments);\n this.actionMsgData = new ActionMsgData();\n }\n static initActionMsg(instance, ...args) {\n super.initMsg(instance);\n instance.command = Message_1.default.Command.CLIENT_MSG;\n instance.data = instance.actionMsgData = ActionMsgData.create();\n return instance;\n }\n static parseActionMsg(instance, data) {\n super.parseMsg(instance, data);\n instance.actionMsgData = ActionMsgData.parse(instance.data);\n return instance;\n }\n send() {\n //启动一个定时器,一定时间内没有从队列移除则认为失败了\n let timer = setTimeout(() => {\n var _a;\n if (ActionMsg.waitingLoginMsgMap.has(this.actionMsgData.msgId) || ActionMsg.waitingResponseMsgMap.has(this.actionMsgData.msgId)) {\n ActionMsg.waitingLoginMsgMap.delete(this.actionMsgData.msgId);\n ActionMsg.waitingResponseMsgMap.delete(this.actionMsgData.msgId);\n (_a = this.callback) === null || _a === void 0 ? void 0 : _a.call(this.callback, { resultCode: ErrorCode_1.ErrorCode.TIME_OUT, message: 'waiting time out' });\n }\n }, 10000);\n //将命令放进map中,等待登录\n if (!GtRuntime_1.default.online) {\n ActionMsg.waitingLoginMsgMap.set(this.actionMsgData.msgId, this);\n return;\n }\n if (this.actionMsgData.msgAction != ActionMsg.ClientAction.RECEIVED) {\n //将非received命令放进map中,等待响应\n ActionMsg.waitingResponseMsgMap.set(this.actionMsgData.msgId, this);\n }\n super.send();\n }\n receive() {\n }\n static sendWaitingMessages() {\n let iterator = this.waitingLoginMsgMap.keys();\n let r;\n while (r = iterator.next(), !r.done) {\n let message = this.waitingLoginMsgMap.get(r.value);\n this.waitingLoginMsgMap.delete(r.value);\n message === null || message === void 0 ? void 0 : message.send();\n }\n }\n static getWaitingResponseMessage(msgId) {\n return ActionMsg.waitingResponseMsgMap.get(msgId);\n }\n static removeWaitingResponseMessage(msgId) {\n let actionMsg = ActionMsg.waitingResponseMsgMap.get(msgId);\n if (actionMsg) {\n ActionMsg.waitingResponseMsgMap.delete(msgId);\n }\n return actionMsg;\n }\n}\nActionMsg.ServerAction = (_a = class {\n },\n // static readonly PUSH_MESSAGE = 'p_m'\n // static readonly REDIRECT_SERVER = 'r_s'\n // static readonly ADD_PHONE_INFO_RESULT = 'a_p_i_r'\n // static readonly SET_MODE_RESULT = 's_m_r'\n // static readonly SET_TAG_RESULT = 's_t_r'\n // static readonly BIND_ALIAS_RESULT = 'b_a_r'\n // static readonly UNBIND_ALIAS_RESULT = 'ub_a_r'\n // static readonly FEED_BACK_RESULT = 'f_b_r'\n // static readonly RECEIVED = 'rv'\n _a.PUSH_MESSAGE = 'pushmessage',\n _a.REDIRECT_SERVER = 'redirect_server',\n _a.ADD_PHONE_INFO_RESULT = 'addphoneinfo',\n _a.SET_MODE_RESULT = 'set_mode_result',\n _a.SET_TAG_RESULT = 'settag_result',\n _a.BIND_ALIAS_RESULT = 'response_bind',\n _a.UNBIND_ALIAS_RESULT = 'response_unbind',\n _a.FEED_BACK_RESULT = 'pushmessage_feedback',\n _a.RECEIVED = 'received',\n _a);\nActionMsg.ClientAction = (_b = class {\n },\n // static readonly ADD_PHONE_INFO: string = 'a_p_i'\n // static readonly SET_MODE: string = 's_m'\n // static readonly FEED_BACK: string = 'f_b'\n // static readonly SET_TAGS: string = 's_t'\n // static readonly BIND_ALIAS: string = 'b_a'\n // static readonly UNBIND_ALIAS: string = 'ub_a'\n // static readonly RECEIVED: string = 'rv'\n _b.ADD_PHONE_INFO = 'addphoneinfo',\n _b.SET_MODE = 'set_mode',\n _b.FEED_BACK = 'pushmessage_feedback',\n _b.SET_TAGS = 'set_tag',\n _b.BIND_ALIAS = 'bind_alias',\n _b.UNBIND_ALIAS = 'unbind_alias',\n _b.RECEIVED = 'received',\n _b);\nActionMsg.waitingLoginMsgMap = new Map();\nActionMsg.waitingResponseMsgMap = new Map();\nclass ActionMsgData {\n constructor() {\n this.appId = '';\n this.cid = '';\n this.msgId = '';\n this.msgAction = '';\n this.msgData = '';\n this.msgExtraData = '';\n }\n static create() {\n let instance = new ActionMsgData();\n instance.appId = GtRuntime_1.default.appid;\n instance.cid = GtRuntime_1.default.cid;\n //服务端要求msgId不能超过int取值范围,这里去除时间戳前四位\n instance.msgId = new Date().getTime().toString().substr(4);\n return instance;\n }\n static parse(data) {\n let instance = new ActionMsgData();\n let actionMsg = JSON.parse(data);\n instance.appId = actionMsg.appId;\n instance.cid = actionMsg.cid;\n instance.msgId = actionMsg.msgId;\n instance.msgAction = actionMsg.msgAction;\n instance.msgData = actionMsg.msgData;\n instance.msgExtraData = actionMsg.msgExtraData;\n return instance;\n }\n}\nexports.default = ActionMsg;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Device_1 = __importDefault(require(\"../../uniapi/Device\"));\nconst Storage_1 = __importDefault(require(\"../../uniapi/Storage\"));\nconst Constant_1 = __importDefault(require(\"../../core/Constant\"));\nconst ErrorCode_1 = require(\"../../ErrorCode\");\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nclass AddPhoneInfo extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.addPhoneInfoData = new AddPhoneInfoData();\n }\n static create() {\n let instance = new AddPhoneInfo();\n super.initActionMsg(instance);\n instance.callback = (res) => {\n console.log('add phone info result', res);\n //addPhoneInfo失败时30秒后重试\n if (res.resultCode != ErrorCode_1.ErrorCode.SUCCESS && res.resultCode != ErrorCode_1.ErrorCode.REPEAT_MESSAGE) {\n setTimeout(function () {\n instance.send();\n }, 30 * 1000);\n }\n else {\n Storage_1.default.set({ key: Storage_1.default.KEY_ADD_PHONE_INFO_TIME, data: new Date().getTime() });\n }\n };\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.ADD_PHONE_INFO;\n instance.addPhoneInfoData = AddPhoneInfoData.create();\n instance.actionMsgData.msgData = JSON.stringify(instance.addPhoneInfoData);\n return instance;\n }\n send() {\n let time = new Date().getTime();\n let lasTime = Storage_1.default.getSync(Storage_1.default.KEY_ADD_PHONE_INFO_TIME, 0);\n if (time - lasTime < 24 * 60 * 60 * 1000) {\n console.log(`add phone info fail, can only be called once during 24 hours`);\n return;\n }\n super.send();\n }\n}\nclass AddPhoneInfoData {\n constructor() {\n //属性命名格式与服务端协议保持一致,勿随意改动\n this.model = '';\n this.brand = '';\n this.system_version = '';\n this.version = '';\n this.device_token = '';\n this.imei = '';\n this.oaid = '';\n this.mac = '';\n this.idfa = '';\n this.deviceid = '';\n this.type = '';\n this.extra = {\n os: '',\n platform: '',\n platformVersion: '',\n platformId: '',\n appVersion: '',\n language: ''\n };\n }\n static create() {\n let instance = new AddPhoneInfoData();\n instance.model = Device_1.default.model();\n instance.brand = Device_1.default.brand();\n instance.system_version = Device_1.default.osVersion();\n instance.version = Constant_1.default.SDK_VERSION;\n instance.device_token = '';\n instance.imei = '';\n instance.oaid = '';\n instance.mac = '';\n instance.idfa = '';\n instance.type = 'MINI';\n instance.deviceid = `${instance.type}-${GtRuntime_1.default.deviceId}`;\n instance.extra = {\n os: Device_1.default.os(),\n platform: Device_1.default.platform(),\n platformVersion: Device_1.default.platformVersion(),\n platformId: Device_1.default.platformId(),\n appVersion: '',\n language: Device_1.default.language()\n };\n return instance;\n }\n}\nexports.default = AddPhoneInfo;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass BindAlias extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.bindAliasTagData = new BindAliasData();\n }\n static create(alias, onlySelf, callback) {\n let instance = new BindAlias();\n super.initActionMsg(instance);\n instance.bindAliasTagData = BindAliasData.create(alias, onlySelf);\n instance.callback = callback;\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.BIND_ALIAS;\n instance.actionMsgData.msgData = JSON.stringify(instance.bindAliasTagData);\n return instance;\n }\n}\nclass BindAliasData {\n constructor() {\n this.alias = '';\n this.cid = '';\n this.appid = '';\n this.sn = '';\n this.is_self = '';\n }\n static create(alias, onlySelf) {\n let instance = new BindAliasData();\n instance.alias = alias;\n instance.cid = GtRuntime_1.default.cid;\n instance.appid = GtRuntime_1.default.appid;\n instance.sn = new Date().getTime().toString();\n instance.is_self = onlySelf ? \"1\" : \"0\";\n return instance;\n }\n}\nexports.default = BindAlias;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ErrorCode_1 = require(\"../../ErrorCode\");\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass Feedback extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.feedbackData = new FeedbackData();\n }\n static create(pushMessage, actionId) {\n let instance = new Feedback();\n super.initActionMsg(instance);\n instance.callback = (res) => {\n console.log('feedback result', res);\n //失败时将在30秒后重试\n if (res.resultCode != ErrorCode_1.ErrorCode.SUCCESS && res.resultCode != ErrorCode_1.ErrorCode.REPEAT_MESSAGE) {\n setTimeout(function () {\n instance.send();\n }, 30 * 1000);\n }\n };\n instance.feedbackData = FeedbackData.create(pushMessage, actionId);\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.FEED_BACK;\n instance.actionMsgData.msgData = JSON.stringify(instance.feedbackData);\n return instance;\n }\n send() {\n super.send();\n }\n}\nFeedback.ActionId = (_a = class {\n },\n _a.RECEIVE = '0',\n _a.MP_RECEIVE = '210000',\n _a.WEB_RECEIVE = '220000',\n _a.BEGIN = '1',\n _a);\nFeedback.RESULT = (_b = class {\n },\n _b.OK = 'ok',\n _b);\nclass FeedbackData {\n constructor() {\n this.messageid = '';\n this.appkey = '';\n this.appid = '';\n this.taskid = '';\n this.actionid = '';\n this.result = '';\n this.timestamp = '';\n }\n static create(pushMessage, actionId) {\n let instance = new FeedbackData();\n instance.messageid = pushMessage.pushMessageData.messageid;\n instance.appkey = pushMessage.pushMessageData.appKey;\n instance.appid = GtRuntime_1.default.appid;\n instance.taskid = pushMessage.pushMessageData.taskId;\n instance.actionid = actionId;\n instance.result = Feedback.RESULT.OK;\n instance.timestamp = new Date().getTime().toString();\n return instance;\n }\n}\nexports.default = Feedback;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass SetTag extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.setTagData = new SetTagData();\n }\n static create(tags, callback) {\n let instance = new SetTag();\n super.initActionMsg(instance);\n instance.setTagData = SetTagData.create(tags);\n instance.callback = callback;\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.SET_TAGS;\n instance.actionMsgData.msgData = JSON.stringify(instance.setTagData);\n return instance;\n }\n}\nclass SetTagData {\n constructor() {\n this.appid = '';\n this.tags = '';\n this.sn = '';\n }\n static create(tags) {\n let instance = new SetTagData();\n instance.appid = GtRuntime_1.default.appid;\n instance.tags = urlencode(tags);\n instance.sn = new Date().getTime().toString();\n return instance;\n }\n}\nfunction urlencode(str) {\n return encodeURIComponent(str).replace(/!/g, '%21')\n .replace(/'/g, '%27')\n .replace(/\\(/g, '%28')\n .replace(/\\)/g, '%29')\n .replace(/\\*/g, '%2A');\n}\nexports.default = SetTag;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass UnbindAlias extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.unbindAliasData = new UnbindAliasData();\n }\n static create(alias, onlySelf, callback) {\n let instance = new UnbindAlias();\n super.initActionMsg(instance);\n instance.unbindAliasData = UnbindAliasData.create(alias, onlySelf);\n instance.callback = callback;\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.UNBIND_ALIAS;\n instance.actionMsgData.msgData = JSON.stringify(instance.unbindAliasData);\n return instance;\n }\n}\nclass UnbindAliasData {\n constructor() {\n this.alias = '';\n this.cid = '';\n this.appid = '';\n this.sn = '';\n this.is_self = '';\n }\n static create(alias, onlySelf) {\n let instance = new UnbindAliasData();\n instance.alias = alias;\n instance.cid = GtRuntime_1.default.cid;\n instance.appid = GtRuntime_1.default.appid;\n instance.sn = new Date().getTime().toString();\n instance.is_self = onlySelf ? \"1\" : \"0\";\n return instance;\n }\n}\nexports.default = UnbindAlias;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Message_1 = __importDefault(require(\"./Message\"));\nclass HeartBeat extends Message_1.default {\n static create() {\n let instance = new HeartBeat();\n super.initMsg(instance);\n instance.command = Message_1.default.Command.HEART_BEAT;\n return instance;\n }\n}\nexports.default = HeartBeat;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst CryptManager_1 = __importDefault(require(\"../utils/CryptManager\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst Message_1 = __importDefault(require(\"./Message\"));\nclass KeyNegotiate extends Message_1.default {\n constructor() {\n super(...arguments);\n this.keyNegotiateData = new KeyNegotiateData();\n }\n static create() {\n let instance = new KeyNegotiate();\n super.initMsg(instance);\n instance.command = Message_1.default.Command.KEY_NEGOTIATE;\n CryptManager_1.default.resetKey();\n instance.data = instance.keyNegotiateData = KeyNegotiateData.create();\n return instance;\n }\n send() {\n super.send();\n }\n}\nclass KeyNegotiateData {\n constructor() {\n this.appId = '';\n this.rsaPublicKeyId = '';\n this.algorithm = '';\n this.secretKey = '';\n this.iv = '';\n }\n static create() {\n let instance = new KeyNegotiateData();\n instance.appId = GtRuntime_1.default.appid;\n instance.rsaPublicKeyId = GtRuntime_1.default.publicKeyId;\n instance.algorithm = 'AES';\n instance.secretKey = CryptManager_1.default.getEncryptedSecretKey();\n instance.iv = CryptManager_1.default.getEncryptedIV();\n return instance;\n }\n}\nexports.default = KeyNegotiate;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Message_1 = __importDefault(require(\"./Message\"));\nconst CryptManager_1 = __importDefault(require(\"../utils/CryptManager\"));\nconst Login_1 = __importDefault(require(\"./Login\"));\nclass KeyNegotiateResult extends Message_1.default {\n constructor() {\n super(...arguments);\n this.keyNegotiateResultData = new KeyNegotiateResultData();\n }\n static parse(data) {\n let instance = new KeyNegotiateResult();\n super.parseMsg(instance, data);\n instance.keyNegotiateResultData = KeyNegotiateResultData.parse(instance.data);\n return instance;\n }\n receive() {\n if (this.keyNegotiateResultData.errorCode != 0) {\n console.error(`key negotiate fail: ${this.data}`);\n return;\n }\n let encryptMode = this.keyNegotiateResultData.encryptType.split('/');\n if (!CryptManager_1.default.algorithmMap.has(encryptMode[0].trim().toLowerCase()) ||\n !CryptManager_1.default.modeMap.has(encryptMode[1].trim().toLowerCase()) ||\n !CryptManager_1.default.paddingMap.has(encryptMode[2].trim().toLowerCase())) {\n console.error(`key negotiate fail: ${this.data}`);\n return;\n }\n CryptManager_1.default.setEncryptParams(encryptMode[0].trim().toLowerCase(), encryptMode[1].trim().toLowerCase(), encryptMode[2].trim().toLowerCase());\n Login_1.default.create().send();\n }\n}\nclass KeyNegotiateResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n this.encryptType = '';\n }\n static parse(data) {\n let instance = new KeyNegotiateResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n instance.encryptType = result.encryptType;\n return instance;\n }\n}\nexports.default = KeyNegotiateResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst CryptManager_1 = __importDefault(require(\"../utils/CryptManager\"));\nconst Message_1 = __importDefault(require(\"./Message\"));\nconst Register_1 = __importDefault(require(\"./Register\"));\nclass Login extends Message_1.default {\n constructor() {\n super(...arguments);\n this.loginData = new LoginData();\n }\n static create() {\n let instance = new Login();\n super.initMsg(instance);\n instance.command = Message_1.default.Command.LOGIN;\n instance.data = instance.loginData = LoginData.create();\n return instance;\n }\n send() {\n if (!this.loginData.session || GtRuntime_1.default.cid != CryptManager_1.default.md5Hex(this.loginData.session)) {\n console.log(`invalid session or cid, do register`);\n Register_1.default.create().send();\n return;\n }\n super.send();\n }\n}\nclass LoginData {\n constructor() {\n this.appId = '';\n this.session = '';\n }\n static create() {\n let instance = new LoginData();\n instance.appId = GtRuntime_1.default.appid;\n instance.session = GtRuntime_1.default.session;\n return instance;\n }\n}\nexports.default = Login;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Storage_1 = __importDefault(require(\"../uniapi/Storage\"));\nconst Message_1 = __importDefault(require(\"./Message\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"./ActionMsg\"));\nconst AddPhoneInfo_1 = __importDefault(require(\"./ClientMsg/AddPhoneInfo\"));\nconst Login_1 = __importDefault(require(\"./Login\"));\nclass LoginResult extends Message_1.default {\n constructor() {\n super(...arguments);\n this.loginResultData = new LoginResultData();\n }\n static parse(data) {\n let instance = new LoginResult();\n super.parseMsg(instance, data);\n instance.loginResultData = LoginResultData.parse(instance.data);\n return instance;\n }\n receive() {\n var _a;\n if (this.loginResultData.errorCode != 0) {\n console.log(`login fail: ${this.data}`);\n //登录失败则清除session,cid重新走登录流程\n GtRuntime_1.default.session = GtRuntime_1.default.cid = '';\n Storage_1.default.setSync(Storage_1.default.KEY_CID, '');\n Storage_1.default.setSync(Storage_1.default.KEY_SESSION, '');\n Login_1.default.create().send();\n return;\n }\n if (!GtRuntime_1.default.online) {\n GtRuntime_1.default.online = true;\n (_a = GtRuntime_1.default.onlineState) === null || _a === void 0 ? void 0 : _a.call(GtRuntime_1.default.onlineState, { online: GtRuntime_1.default.online });\n }\n ActionMsg_1.default.sendWaitingMessages();\n AddPhoneInfo_1.default.create().send();\n }\n}\nclass LoginResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n this.session = '';\n }\n static parse(data) {\n let instance = new LoginResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n instance.session = result.session;\n return instance;\n }\n}\nexports.default = LoginResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst MessageCoder_1 = __importDefault(require(\"./MessageCoder\"));\nconst SocketManager_1 = __importDefault(require(\"../uniapi/SocketManager\"));\nconst Constant_1 = __importDefault(require(\"../core/Constant\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nclass Message {\n constructor() {\n this.version = '';\n this.command = 0;\n this.packetId = 0;\n this.timeStamp = 0;\n this.data = '';\n this.signature = '';\n }\n static initMsg(message, ...args) {\n message.version = Constant_1.default.SOCKET_PROTOCOL_VERSION;\n message.command = 0;\n // message.packetId = GtRuntime.packetId++\n message.timeStamp = new Date().getTime();\n return message;\n }\n static parseMsg(message, json) {\n let obj = JSON.parse(json);\n message.version = obj.version;\n message.command = obj.command;\n message.packetId = obj.packetId;\n message.timeStamp = obj.timeStamp;\n message.data = obj.data;\n message.signature = obj.signature;\n return message;\n }\n stringify() {\n return JSON.stringify(this, ['version', 'command', 'packetId', 'timeStamp', 'data', 'signature']);\n }\n send() {\n // MessageSender.sendMessage(this)\n if (!SocketManager_1.default.isAvailable()) {\n return;\n }\n this.packetId = GtRuntime_1.default.packetId++;\n this.data = JSON.stringify(this.data);\n console.log(`send msg`, this.stringify());\n if (this.command != Message.Command.HEART_BEAT) {\n MessageCoder_1.default.sign(this);\n if (this.data && this.command != Message.Command.KEY_NEGOTIATE) {\n MessageCoder_1.default.encrypt(this);\n }\n }\n SocketManager_1.default.send(this.stringify());\n }\n}\nMessage.Command = (_a = class {\n },\n _a.HEART_BEAT = 0x00,\n _a.KEY_NEGOTIATE = 0x01,\n _a.KEY_NEGOTIATE_RESULT = 0x10,\n _a.REGISTER = 0x02,\n _a.REGISTER_RESULT = 0x20,\n _a.LOGIN = 0x03,\n _a.LOGIN_RESULT = 0x30,\n _a.LOGOUT = 0x04,\n _a.LOGOUT_RESULT = 0x40,\n _a.CLIENT_MSG = 0x05,\n _a.SERVER_MSG = 0x50,\n _a.SERVER_CLOSE = 0x60,\n _a);\nexports.default = Message;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst CryptManager_1 = __importDefault(require(\"../utils/CryptManager\"));\n/**\n * 消息加解密、签名、验签\n */\nvar MessageCoder;\n(function (MessageCoder) {\n function encrypt(msg) {\n msg.data = CryptManager_1.default.encrypt(msg.data);\n }\n MessageCoder.encrypt = encrypt;\n function decrypt(msg) {\n msg.data = CryptManager_1.default.decrypt(msg.data);\n }\n MessageCoder.decrypt = decrypt;\n function sign(msg) {\n msg.signature = CryptManager_1.default.sha256(`${msg.timeStamp}${msg.packetId}${msg.command}${msg.data}`);\n }\n MessageCoder.sign = sign;\n function verify(msg) {\n let verify = CryptManager_1.default.sha256(`${msg.timeStamp}${msg.packetId}${msg.command}${msg.data}`);\n if (msg.signature != verify) {\n throw new Error(`msg signature vierfy failed`);\n }\n }\n MessageCoder.verify = verify;\n})(MessageCoder || (MessageCoder = {}));\nexports.default = MessageCoder;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst KeyNegotiateResult_1 = __importDefault(require(\"../message/KeyNegotiateResult\"));\nconst LoginResult_1 = __importDefault(require(\"../message/LoginResult\"));\nconst Message_1 = __importDefault(require(\"../message/Message\"));\nconst RegisterResult_1 = __importDefault(require(\"../message/RegisterResult\"));\nconst AddPhoneInfoResult_1 = __importDefault(require(\"../message/ServerMsg/AddPhoneInfoResult\"));\nconst BindAliasResult_1 = __importDefault(require(\"../message/ServerMsg/BindAliasResult\"));\nconst FeedbackResult_1 = __importDefault(require(\"../message/ServerMsg/FeedbackResult\"));\nconst PushMessage_1 = __importDefault(require(\"../message/ServerMsg/PushMessage\"));\nconst RedirectServer_1 = __importDefault(require(\"../message/ServerMsg/RedirectServer\"));\nconst ActionMsg_1 = __importDefault(require(\"../message/ActionMsg\"));\nconst SetModeResult_1 = __importDefault(require(\"../message/ServerMsg/SetModeResult\"));\nconst SetTagResult_1 = __importDefault(require(\"../message/ServerMsg/SetTagResult\"));\nconst UnbindAliasResult_1 = __importDefault(require(\"../message/ServerMsg/UnbindAliasResult\"));\nconst MessageCoder_1 = __importDefault(require(\"./MessageCoder\"));\nconst ActionMsg_2 = __importDefault(require(\"../message/ActionMsg\"));\nconst Received_1 = __importDefault(require(\"../message/Received\"));\nconst ServerClose_1 = __importDefault(require(\"./ServerClose\"));\nclass MessageHandler {\n static receiveMessage(msg) {\n let message = Message_1.default.parseMsg(new Message_1.default(), msg);\n console.log(`receive msg`, message);\n if (message.command != Message_1.default.Command.KEY_NEGOTIATE_RESULT\n && message.command != Message_1.default.Command.HEART_BEAT\n && message.command != Message_1.default.Command.SERVER_CLOSE) {\n MessageCoder_1.default.decrypt(message);\n }\n if (message.command != Message_1.default.Command.HEART_BEAT\n && message.command != Message_1.default.Command.SERVER_CLOSE) {\n MessageCoder_1.default.verify(message);\n }\n switch (message.command) {\n case Message_1.default.Command.KEY_NEGOTIATE_RESULT:\n KeyNegotiateResult_1.default.parse(message.stringify()).receive();\n break;\n case Message_1.default.Command.REGISTER_RESULT:\n RegisterResult_1.default.parse(message.stringify()).receive();\n break;\n case Message_1.default.Command.LOGIN_RESULT:\n LoginResult_1.default.parse(message.stringify()).receive();\n break;\n case Message_1.default.Command.SERVER_MSG:\n this.receiveActionMsg(message.stringify());\n break;\n case Message_1.default.Command.SERVER_CLOSE:\n ServerClose_1.default.parse(message.stringify()).receive();\n break;\n default:\n console.log(`receive an unknow msg`);\n break;\n }\n }\n static receiveActionMsg(msg) {\n let actionMsg = ActionMsg_2.default.parseActionMsg(new ActionMsg_2.default(), msg);\n if (actionMsg.actionMsgData.msgAction != ActionMsg_1.default.ServerAction.RECEIVED && actionMsg.actionMsgData.msgAction != ActionMsg_1.default.ServerAction.REDIRECT_SERVER) {\n let actionMsgData = JSON.parse(actionMsg.actionMsgData.msgData);\n Received_1.default.create(actionMsgData.id).send();\n }\n switch (actionMsg.actionMsgData.msgAction) {\n case ActionMsg_1.default.ServerAction.PUSH_MESSAGE:\n PushMessage_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.REDIRECT_SERVER:\n RedirectServer_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.ADD_PHONE_INFO_RESULT:\n AddPhoneInfoResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.SET_MODE_RESULT:\n SetModeResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.SET_TAG_RESULT:\n SetTagResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.BIND_ALIAS_RESULT:\n BindAliasResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.UNBIND_ALIAS_RESULT:\n UnbindAliasResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.FEED_BACK_RESULT:\n FeedbackResult_1.default.parse(msg).receive();\n break;\n case ActionMsg_1.default.ServerAction.RECEIVED:\n Received_1.default.parse(msg).receive();\n break;\n }\n }\n}\nexports.default = MessageHandler;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ErrorCode_1 = require(\"../ErrorCode\");\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"./ActionMsg\"));\nclass Received extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.receivedData = new ReceivedData();\n }\n static create(msgId) {\n let instance = new Received();\n super.initActionMsg(instance);\n instance.callback = (res) => {\n //received失败时3秒后重试\n if (res.resultCode != ErrorCode_1.ErrorCode.SUCCESS && res.resultCode != ErrorCode_1.ErrorCode.REPEAT_MESSAGE) {\n setTimeout(function () {\n instance.send();\n }, 3 * 1000);\n }\n };\n instance.actionMsgData.msgAction = ActionMsg_1.default.ClientAction.RECEIVED;\n instance.receivedData = ReceivedData.create(msgId);\n instance.actionMsgData.msgData = JSON.stringify(instance.receivedData);\n return instance;\n }\n static parse(data) {\n let instance = new Received();\n super.parseActionMsg(instance, data);\n instance.receivedData = ReceivedData.parse(instance.data);\n return instance;\n }\n receive() {\n var _a;\n //addphoneinfo和feedback收到received则说明成功了,服务端不会响应result命令,因此在received这里处理\n let actionMsg = ActionMsg_1.default.getWaitingResponseMessage(this.actionMsgData.msgId);\n if (actionMsg && actionMsg.actionMsgData.msgAction == ActionMsg_1.default.ClientAction.ADD_PHONE_INFO || actionMsg && actionMsg.actionMsgData.msgAction == ActionMsg_1.default.ClientAction.FEED_BACK) {\n ActionMsg_1.default.removeWaitingResponseMessage(actionMsg.actionMsgData.msgId);\n (_a = actionMsg.callback) === null || _a === void 0 ? void 0 : _a.call(actionMsg.callback, { resultCode: ErrorCode_1.ErrorCode.SUCCESS, message: 'received' });\n }\n }\n send() {\n super.send();\n }\n}\nclass ReceivedData {\n constructor() {\n this.msgId = '';\n this.cid = '';\n }\n static create(msgId) {\n let instance = new ReceivedData();\n instance.cid = GtRuntime_1.default.cid;\n instance.msgId = msgId;\n return instance;\n }\n static parse(data) {\n let instance = new ReceivedData();\n let receivedData = JSON.parse(data);\n instance.cid = receivedData.cid;\n instance.msgId = receivedData.msgId;\n return instance;\n }\n}\nexports.default = Received;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst Message_1 = __importDefault(require(\"./Message\"));\nclass Register extends Message_1.default {\n constructor() {\n super(...arguments);\n this.registerData = new RegisterData();\n }\n static create() {\n let instance = new Register();\n super.initMsg(instance);\n instance.command = Message_1.default.Command.REGISTER;\n instance.data = instance.registerData = RegisterData.create();\n return instance;\n }\n send() {\n super.send();\n }\n}\nclass RegisterData {\n constructor() {\n this.appId = '';\n this.regId = '';\n }\n static create() {\n let instance = new RegisterData();\n instance.appId = GtRuntime_1.default.appid;\n instance.regId = GtRuntime_1.default.regId;\n return instance;\n }\n}\nexports.default = Register;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Message_1 = __importDefault(require(\"./Message\"));\nconst Storage_1 = __importDefault(require(\"../uniapi/Storage\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst Login_1 = __importDefault(require(\"./Login\"));\nclass RegisterResult extends Message_1.default {\n constructor() {\n super(...arguments);\n this.registerResultData = new RegisterResultData();\n }\n static parse(data) {\n let instance = new RegisterResult();\n super.parseMsg(instance, data);\n instance.registerResultData = RegisterResultData.parse(instance.data);\n return instance;\n }\n receive() {\n var _a;\n if (this.registerResultData.errorCode != 0 || !this.registerResultData.cid || !this.registerResultData.session) {\n console.error(`register fail: ${this.data}`);\n return;\n }\n if (GtRuntime_1.default.cid != this.registerResultData.cid) {\n //cid发生变更,重置addPhoneInfo时间间隔\n Storage_1.default.setSync(Storage_1.default.KEY_ADD_PHONE_INFO_TIME, 0);\n }\n GtRuntime_1.default.cid = this.registerResultData.cid;\n (_a = GtRuntime_1.default.onClientId) === null || _a === void 0 ? void 0 : _a.call(GtRuntime_1.default.onClientId, { cid: GtRuntime_1.default.cid });\n Storage_1.default.set({ key: Storage_1.default.KEY_CID, data: GtRuntime_1.default.cid });\n GtRuntime_1.default.session = this.registerResultData.session;\n Storage_1.default.set({ key: Storage_1.default.KEY_SESSION, data: GtRuntime_1.default.session });\n GtRuntime_1.default.deviceId = this.registerResultData.deviceId;\n Storage_1.default.set({ key: Storage_1.default.KEY_DEVICE_ID, data: GtRuntime_1.default.deviceId });\n Login_1.default.create().send();\n }\n}\nclass RegisterResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n this.cid = '';\n this.session = '';\n this.deviceId = '';\n this.regId = '';\n }\n static parse(data) {\n let instance = new RegisterResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n instance.cid = result.cid;\n instance.session = result.session;\n instance.deviceId = result.deviceId;\n instance.regId = result.regId;\n return instance;\n }\n}\nexports.default = RegisterResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst SocketManager_1 = __importDefault(require(\"../uniapi/SocketManager\"));\nconst Message_1 = __importDefault(require(\"./Message\"));\nclass ServerClose extends Message_1.default {\n constructor() {\n super(...arguments);\n this.serverCloseData = new ServerCloseData();\n }\n static parse(data) {\n let instance = new ServerClose();\n super.parseMsg(instance, data);\n instance.serverCloseData = ServerCloseData.parse(instance.data);\n return instance;\n }\n receive() {\n console.log(`server close: ${this.data}`);\n if (this.serverCloseData.code == 20\n || this.serverCloseData.code == 23\n || this.serverCloseData.code == 24) {\n //code 20、23、24,不重连\n SocketManager_1.default.allowReconnect = false;\n }\n SocketManager_1.default.close();\n }\n}\nclass ServerCloseData {\n constructor() {\n this.code = -1;\n this.msg = '';\n }\n static parse(data) {\n let instance = new ServerCloseData();\n let result = JSON.parse(data);\n instance.code = result.code;\n instance.msg = result.msg;\n return instance;\n }\n}\nexports.default = ServerClose;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Storage_1 = __importDefault(require(\"../../uniapi/Storage\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass AddPhoneInfoResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.addPhoneInfoResultData = new AddPhoneInfoResultData();\n }\n static parse(data) {\n let instance = new AddPhoneInfoResult();\n super.parseActionMsg(instance, data);\n instance.addPhoneInfoResultData = AddPhoneInfoResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n console.log(`add phone info result`, this.addPhoneInfoResultData);\n let addPhoneInfo = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (addPhoneInfo) {\n (_a = addPhoneInfo.callback) === null || _a === void 0 ? void 0 : _a.call(addPhoneInfo.callback, { resultCode: this.addPhoneInfoResultData.errorCode, message: this.addPhoneInfoResultData.errorMsg });\n }\n Storage_1.default.set({ key: Storage_1.default.KEY_ADD_PHONE_INFO_TIME, data: new Date().getTime() });\n }\n}\nclass AddPhoneInfoResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n }\n static parse(data) {\n let instance = new AddPhoneInfoResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n return instance;\n }\n}\nexports.default = AddPhoneInfoResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Storage_1 = __importDefault(require(\"../../uniapi/Storage\"));\nconst Log_1 = __importDefault(require(\"../../utils/Log\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass BindAliasResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.bindAliasResultData = new BindAliasResultData();\n }\n static parse(data) {\n let instance = new BindAliasResult();\n super.parseActionMsg(instance, data);\n instance.bindAliasResultData = BindAliasResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n Log_1.default.info(`bind alias result`, this.bindAliasResultData);\n let bindAlias = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (bindAlias) {\n (_a = bindAlias.callback) === null || _a === void 0 ? void 0 : _a.call(bindAlias.callback, { resultCode: this.bindAliasResultData.errorCode, message: this.bindAliasResultData.errorMsg });\n }\n Storage_1.default.set({ key: Storage_1.default.KEY_BIND_ALIAS_TIME, data: new Date().getTime() });\n }\n}\nclass BindAliasResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n }\n static parse(data) {\n let instance = new BindAliasResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n return instance;\n }\n}\nexports.default = BindAliasResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ErrorCode_1 = require(\"../../ErrorCode\");\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass FeedbackResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.feedbackResultData = new FeedbackResultData();\n }\n static parse(data) {\n let instance = new FeedbackResult();\n super.parseActionMsg(instance, data);\n instance.feedbackResultData = FeedbackResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n console.log(`feedback result`, this.feedbackResultData);\n let feedback = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (feedback) {\n (_a = feedback.callback) === null || _a === void 0 ? void 0 : _a.call(feedback.callback, { resultCode: ErrorCode_1.ErrorCode.SUCCESS, message: 'received' });\n }\n }\n}\nclass FeedbackResultData {\n constructor() {\n this.actionId = '';\n this.taskId = '';\n this.result = '';\n }\n static parse(data) {\n let instance = new FeedbackResultData();\n let feedbackResultData = JSON.parse(data);\n instance.actionId = feedbackResultData.actionId;\n instance.taskId = feedbackResultData.taskId;\n instance.result = feedbackResultData.result;\n return instance;\n }\n}\nexports.default = FeedbackResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nconst Feedback_1 = __importDefault(require(\"../ClientMsg/Feedback\"));\nclass PushMessage extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.pushMessageData = new PushMessageData();\n }\n static parse(data) {\n let instance = new PushMessage();\n super.parseActionMsg(instance, data);\n instance.pushMessageData = PushMessageData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n console.log(`push message receive`, this.pushMessageData);\n if (this.pushMessageData.appId != GtRuntime_1.default.appid ||\n !this.pushMessageData.messageid ||\n !this.pushMessageData.taskId) {\n console.log(`invalid push message`, this.stringify());\n }\n //发送回执\n Feedback_1.default.create(this, Feedback_1.default.ActionId.RECEIVE).send();\n Feedback_1.default.create(this, Feedback_1.default.ActionId.MP_RECEIVE).send();\n if (this.actionMsgData.msgExtraData && GtRuntime_1.default.onPushMsg) {\n (_a = GtRuntime_1.default.onPushMsg) === null || _a === void 0 ? void 0 : _a.call(GtRuntime_1.default.onPushMsg, { message: this.actionMsgData.msgExtraData });\n }\n }\n}\nclass PushMessageData {\n constructor() {\n this.id = '';\n this.appKey = '';\n this.appId = '';\n this.messageid = '';\n this.taskId = '';\n this.actionChain = [];\n this.cdnType = '';\n }\n static parse(data) {\n let instance = new PushMessageData();\n let pushMessageData = JSON.parse(data);\n instance.id = pushMessageData.id;\n instance.appKey = pushMessageData.appKey;\n instance.appId = pushMessageData.appId;\n instance.messageid = pushMessageData.messageid;\n instance.taskId = pushMessageData.taskId;\n instance.actionChain = pushMessageData.actionChain;\n instance.cdnType = pushMessageData.cdnType;\n return instance;\n }\n}\nclass ActionChain {\n constructor() {\n this.type = '';\n this.actionid = '';\n this.do = '';\n }\n}\nActionChain.Type = (_a = class {\n },\n _a.GO_TO = 'goto',\n _a.TRANSMIT = 'transmit',\n _a);\nexports.default = PushMessage;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst SocketManager_1 = __importDefault(require(\"../../uniapi/SocketManager\"));\nconst GtRuntime_1 = __importDefault(require(\"../../core/GtRuntime\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass RedirectServer extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.redirectServerData = new RedirectServerData();\n }\n static parse(data) {\n let instance = new RedirectServer();\n super.parseActionMsg(instance, data);\n instance.redirectServerData = RedirectServerData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n GtRuntime_1.default.socketUrl = this.redirectServerData.addressList.split(',')[0];\n SocketManager_1.default.connect();\n }\n}\nclass RedirectServerData {\n constructor() {\n this.addressList = '';\n this.delay = 0;\n this.location = '';\n this.idConfig = '';\n }\n static parse(data) {\n let instance = new RedirectServerData();\n let redirectServerData = JSON.parse(data);\n instance.addressList = redirectServerData.addressList;\n instance.delay = redirectServerData.delay;\n instance.location = redirectServerData.location;\n instance.idConfig = redirectServerData.idConfig;\n return instance;\n }\n}\nexports.default = RedirectServer;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass SetModeResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.setModeResultData = new SetModeResultData();\n }\n static parse(data) {\n let instance = new SetModeResult();\n super.parseActionMsg(instance, data);\n instance.setModeResultData = SetModeResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n console.log(`set mode result`, this.setModeResultData);\n let setMode = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (setMode) {\n (_a = setMode.callback) === null || _a === void 0 ? void 0 : _a.call(setMode.callback, { resultCode: this.setModeResultData.errorCode, message: this.setModeResultData.errorMsg });\n }\n }\n}\nclass SetModeResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n }\n static parse(data) {\n let instance = new SetModeResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n return instance;\n }\n}\nexports.default = SetModeResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Storage_1 = __importDefault(require(\"../../uniapi/Storage\"));\nconst Log_1 = __importDefault(require(\"../../utils/Log\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass SetTagResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.setTagResultData = new SetTagResultData();\n }\n static parse(data) {\n let instance = new SetTagResult();\n super.parseActionMsg(instance, data);\n instance.setTagResultData = SetTagResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n Log_1.default.info(`set tag result`, this.setTagResultData);\n let setTag = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (setTag) {\n (_a = setTag.callback) === null || _a === void 0 ? void 0 : _a.call(setTag.callback, { resultCode: this.setTagResultData.errorCode, message: this.setTagResultData.errorMsg });\n }\n Storage_1.default.set({ key: Storage_1.default.KEY_SET_TAG_TIME, data: new Date().getTime() });\n }\n}\nclass SetTagResultData {\n constructor() {\n this.errorCode = 0;\n this.errorMsg = '';\n }\n static parse(data) {\n let instance = new SetTagResultData();\n let setTagResultData = JSON.parse(data);\n instance.errorCode = setTagResultData.errorCode;\n instance.errorMsg = setTagResultData.errorMsg;\n return instance;\n }\n}\nexports.default = SetTagResult;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst Storage_1 = __importDefault(require(\"../../uniapi/Storage\"));\nconst Log_1 = __importDefault(require(\"../../utils/Log\"));\nconst ActionMsg_1 = __importDefault(require(\"../ActionMsg\"));\nclass UnbindAliasResult extends ActionMsg_1.default {\n constructor() {\n super(...arguments);\n this.unbindAliasResultData = new UnbindAliasResultData();\n }\n static parse(data) {\n let instance = new UnbindAliasResult();\n super.parseActionMsg(instance, data);\n instance.unbindAliasResultData = UnbindAliasResultData.parse(instance.actionMsgData.msgData);\n return instance;\n }\n receive() {\n var _a;\n Log_1.default.info(`unbind alias result`, this.unbindAliasResultData);\n let unbindAlias = ActionMsg_1.default.removeWaitingResponseMessage(this.actionMsgData.msgId);\n if (unbindAlias) {\n (_a = unbindAlias.callback) === null || _a === void 0 ? void 0 : _a.call(unbindAlias.callback, { resultCode: this.unbindAliasResultData.errorCode, message: this.unbindAliasResultData.errorMsg });\n }\n Storage_1.default.set({ key: Storage_1.default.KEY_BIND_ALIAS_TIME, data: new Date().getTime() });\n }\n}\nclass UnbindAliasResultData {\n constructor() {\n this.errorCode = -1;\n this.errorMsg = '';\n }\n static parse(data) {\n let instance = new UnbindAliasResultData();\n let result = JSON.parse(data);\n instance.errorCode = result.errorCode;\n instance.errorMsg = result.errorMsg;\n return instance;\n }\n}\nexports.default = UnbindAliasResult;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass DelayTask {\n constructor(delay) {\n this.delay = 10;\n this.delay = delay;\n }\n start() {\n this.cancel();\n let _this = this;\n this.timer = setInterval(function () {\n _this.run();\n }, this.delay);\n }\n cancel() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n }\n}\nexports.default = DelayTask;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst HeartBeat_1 = __importDefault(require(\"../message/HeartBeat\"));\nconst DelayTask_1 = __importDefault(require(\"./DelayTask\"));\nclass HeartBeatTask extends DelayTask_1.default {\n static getInstance() {\n return HeartBeatTask.InstanceHolder.instance;\n }\n run() {\n HeartBeat_1.default.create().send();\n }\n refresh() {\n this.delay = 60 * 1000;\n this.start();\n }\n}\nHeartBeatTask.INTERVAL = 60 * 1000;\nHeartBeatTask.InstanceHolder = (_a = class {\n },\n _a.instance = new HeartBeatTask(HeartBeatTask.INTERVAL),\n _a);\nexports.default = HeartBeatTask;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Device;\n(function (Device) {\n let systemInfo;\n let accountInfo;\n try {\n systemInfo = uni.getSystemInfoSync();\n accountInfo = uni.getAccountInfoSync();\n }\n catch (error) {\n }\n function os() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.platform : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.os = os;\n function model() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.model : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.model = model;\n function brand() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.brand : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.brand = brand;\n function osVersion() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.system : '';\n // #ifdef MP-ALIPAY\n let osPrefix = os();\n if (result && osPrefix && !result.toLocaleLowerCase().startsWith(osPrefix.toLowerCase())) {\n result = os() + ' ' + result;\n }\n // #endif\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.osVersion = osVersion;\n function platform() {\n let platform = '';\n // #ifdef APP-PLUS\n platform = 'APP-PLUS';\n // #endif\n // #ifdef APP-PLUS-NVUE\n platform = 'APP-PLUS-NVUE';\n // #endif\n // #ifdef APP-NVUE\n platform = 'APP-NVUE';\n // #endif\n // #ifdef H5\n platform = 'H5';\n // #endif\n // #ifdef MP-WEIXIN\n platform = 'MP-WEIXIN';\n // #endif\n // #ifdef MP-ALIPAY\n platform = 'MP-ALIPAY';\n // #endif\n // #ifdef MP-BAIDU\n platform = 'MP-BAIDU';\n // #endif\n // #ifdef MP-TOUTIAO\n platform = 'MP-TOUTIAO';\n // #endif\n // #ifdef MP-LARK\n platform = 'MP-LARK';\n // #endif\n // #ifdef MP-QQ\n platform = 'MP-QQ';\n // #endif\n // #ifdef MP-KUAISHOU\n platform = 'MP-KUAISHOU';\n // #endif\n // #ifdef MP-360\n platform = 'MP-360';\n // #endif\n // #ifdef QUICKAPP-WEBVIEW\t\n platform = 'QUICKAPP-WEBVIEW';\n // #endif\n // #ifdef QUICKAPP-WEBVIEW-UNION\n platform = 'QUICKAPP-WEBVIEW-UNION';\n // #endif\n return platform;\n }\n Device.platform = platform;\n function platformVersion() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.version : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.platformVersion = platformVersion;\n function platformId() {\n let result = '';\n try {\n result = accountInfo ? accountInfo.miniProgram.appId : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.platformId = platformId;\n function language() {\n let result = '';\n try {\n result = systemInfo ? systemInfo.language : '';\n }\n catch (error) {\n console.log(error);\n }\n return result ? result : '';\n }\n Device.language = language;\n function imei() {\n return '';\n }\n Device.imei = imei;\n function oaid() {\n return '';\n }\n Device.oaid = oaid;\n function getNetworkType(callback) {\n uni.getNetworkType({\n success: (result) => {\n var _a;\n console.log(`getNetworkType: `, result);\n (_a = callback.success) === null || _a === void 0 ? void 0 : _a.call(callback.success, result.networkType);\n },\n fail: (result) => {\n var _a;\n (_a = callback.fail) === null || _a === void 0 ? void 0 : _a.call(callback.fail, result);\n }\n });\n }\n Device.getNetworkType = getNetworkType;\n function onNetworkStatusChange(callback) {\n uni.onNetworkStatusChange((result) => {\n console.log(`onNetworkStatusChange: `, result);\n callback.call(callback, result);\n });\n }\n Device.onNetworkStatusChange = onNetworkStatusChange;\n})(Device || (Device = {}));\nexports.default = Device;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst KeyNegotiate_1 = __importDefault(require(\"../message/KeyNegotiate\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nconst MessageHandler_1 = __importDefault(require(\"../message/MessageHandler\"));\nconst HeartBeatTask_1 = __importDefault(require(\"../task/HeartBeatTask\"));\nconst Log_1 = __importDefault(require(\"../utils/Log\"));\nvar SocketManager;\n(function (SocketManager) {\n let socketTask;\n let socketOpen = false;\n let socketConnected = false;\n SocketManager.allowReconnect = true;\n function isAvailable() {\n return socketOpen && socketConnected;\n }\n SocketManager.isAvailable = isAvailable;\n function reconnect(delay) {\n if (!SocketManager.allowReconnect) {\n return;\n }\n setTimeout(function () {\n connect();\n }, delay);\n }\n SocketManager.reconnect = reconnect;\n function connect() {\n SocketManager.allowReconnect = true;\n if (!GtRuntime_1.default.networkConnected) {\n Log_1.default.info(`connect failed, network is not available`);\n return;\n }\n if (socketConnected || socketOpen) {\n return;\n }\n let url = GtRuntime_1.default.socketUrl;\n console.log(`socket url is ${url}`);\n socketTask = uni.connectSocket({\n url: url,\n success: function () {\n socketConnected = true;\n console.log(`socket connect success`);\n startNegotiating();\n },\n fail: function () {\n socketConnected = false;\n console.log(`socket connect fail`);\n resetSocket('');\n }\n });\n // #ifdef MP-ALIPAY\n uni.onSocketOpen(onOpen);\n uni.onSocketMessage(onMessage);\n uni.onSocketError(onError);\n uni.onSocketClose(onClose);\n // #endif \n // #ifndef MP-ALIPAY\n socketTask.onOpen(onOpen);\n socketTask.onMessage(onMessage);\n socketTask.onError(onError);\n socketTask.onClose(onClose);\n // #endif \n }\n SocketManager.connect = connect;\n /**\n * 不同小程序平台socket触发connect和open回调的顺序不同,为了确保兼容,两个回调都触发协商流程\n */\n function startNegotiating() {\n if (socketConnected && socketOpen) {\n KeyNegotiate_1.default.create().send();\n HeartBeatTask_1.default.getInstance().start();\n }\n }\n function close(reason) {\n // #ifdef MP-ALIPAY\n uni.closeSocket({\n reason: reason,\n success: function (res) {\n console.log(`socket close success`, res);\n },\n fail: function (res) {\n console.log(`socket close fail`, res);\n resetSocket(res);\n }\n });\n // #endif \n // #ifndef MP-ALIPAY\n socketTask.close({\n reason: reason,\n success: function (res) {\n console.log(`socket close success`, res);\n },\n fail: function (res) {\n console.log(`socket close fail`, res);\n resetSocket(res);\n }\n });\n // #endif \n }\n SocketManager.close = close;\n function send(msg) {\n if (socketOpen && socketOpen) {\n // #ifdef MP-ALIPAY\n uni.sendSocketMessage({\n data: msg,\n success: function (res) {\n console.log(`socket send success`, msg);\n },\n fail: function (res) {\n console.log(`socket send fail`, res);\n }\n });\n // #endif \n // #ifndef MP-ALIPAY\n socketTask.send({\n data: msg,\n success: function (res) {\n console.log(`socket send success`, msg);\n },\n fail: function (res) {\n console.log(`socket send fail`, res);\n }\n });\n // #endif \n }\n else {\n throw new Error(`socket not connect`);\n }\n }\n SocketManager.send = send;\n function resetSocket(res) {\n var _a, _b;\n socketConnected = false;\n socketOpen = false;\n HeartBeatTask_1.default.getInstance().cancel();\n if (GtRuntime_1.default.online) {\n GtRuntime_1.default.online = false;\n (_a = GtRuntime_1.default.onlineState) === null || _a === void 0 ? void 0 : _a.call(GtRuntime_1.default.onlineState, { online: GtRuntime_1.default.online });\n }\n if (GtRuntime_1.default.online) {\n GtRuntime_1.default.online = false;\n (_b = GtRuntime_1.default.onlineState) === null || _b === void 0 ? void 0 : _b.call(GtRuntime_1.default.onlineState, { online: GtRuntime_1.default.online });\n }\n reconnect(1000);\n }\n let onOpen = function (res) {\n socketOpen = true;\n console.log(`socket onOpen`);\n startNegotiating();\n };\n let onMessage = function (res) {\n try {\n console.log(`socket onMessage`, res.data);\n HeartBeatTask_1.default.getInstance().refresh();\n MessageHandler_1.default.receiveMessage(res.data);\n }\n catch (error) {\n console.log(`handle received msg error`, error);\n }\n };\n let onError = function (res) {\n console.log(`socket onError`, res);\n close(`socket error`);\n };\n let onClose = function (res) {\n console.log(`socket onClose`, res);\n resetSocket(res);\n };\n})(SocketManager || (SocketManager = {}));\nexports.default = SocketManager;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Storage;\n(function (Storage) {\n Storage.KEY_APPID = 'appid';\n Storage.KEY_CID = 'cid';\n Storage.KEY_SESSION = 'session';\n Storage.KEY_REGID = 'regid';\n Storage.KEY_SOCKET_URL = 'socket_url';\n Storage.KEY_DEVICE_ID = 'deviceid';\n Storage.KEY_ADD_PHONE_INFO_TIME = 'api_time';\n Storage.KEY_BIND_ALIAS_TIME = 'ba_time';\n Storage.KEY_SET_TAG_TIME = 'st_time';\n function setSync(key, value) {\n uni.setStorageSync(key, value);\n }\n Storage.setSync = setSync;\n function set(obj) {\n uni.setStorage({\n key: obj.key,\n data: obj.data,\n fail: () => {\n var _a;\n console.log(`storage set fail: key=${obj.key}, data=${obj.data}`);\n (_a = obj.fail) === null || _a === void 0 ? void 0 : _a.call(obj);\n }\n });\n }\n Storage.set = set;\n function getSync(key, defaultValue) {\n let result = defaultValue;\n try {\n let value = uni.getStorageSync(key);\n if (value) {\n result = value;\n }\n }\n catch (error) {\n console.log(`get storage error`, error);\n }\n return result;\n }\n Storage.getSync = getSync;\n function get(obj) {\n uni.getStorage({\n key: obj.key,\n success: (result) => {\n var _a;\n (_a = obj.success) === null || _a === void 0 ? void 0 : _a.call(obj, result.data);\n },\n fail: () => {\n var _a;\n console.log(`storage set fail: key=${obj.key}`);\n (_a = obj.fail) === null || _a === void 0 ? void 0 : _a.call(obj);\n }\n });\n }\n Storage.get = get;\n})(Storage || (Storage = {}));\nexports.default = Storage;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst wxmp_rsa_1 = __importDefault(require(\"../wxmp-rsa\"));\nconst crypto_js_1 = __importDefault(require(\"crypto-js\"));\nconst GtRuntime_1 = __importDefault(require(\"../core/GtRuntime\"));\nvar CryptManager;\n(function (CryptManager) {\n let secretKey;\n let iv;\n let encryptedSecretKey;\n let encryptedIV;\n let rsa = new wxmp_rsa_1.default();\n let symmetricMode = crypto_js_1.default.mode.CBC;\n let symmetricPadding = crypto_js_1.default.pad.Pkcs7;\n let symmetricAlgorithm = crypto_js_1.default.AES;\n CryptManager.algorithmMap = new Map([\n ['aes', crypto_js_1.default.AES]\n ]);\n CryptManager.modeMap = new Map([\n ['cbc', crypto_js_1.default.mode.CBC],\n ['cfb', crypto_js_1.default.mode.CFB],\n ['cfb128', crypto_js_1.default.mode.CFB],\n ['ecb', crypto_js_1.default.mode.ECB],\n ['ofb', crypto_js_1.default.mode.OFB]\n ]);\n CryptManager.paddingMap = new Map([\n ['nopadding', crypto_js_1.default.pad.NoPadding],\n ['pkcs7', crypto_js_1.default.pad.Pkcs7]\n ]);\n function resetKey() {\n secretKey = crypto_js_1.default.MD5(new Date().getTime().toString());\n iv = crypto_js_1.default.MD5(secretKey);\n rsa.setPublicKey(GtRuntime_1.default.publicKey);\n console.log(`secretKey is ${secretKey.toString(crypto_js_1.default.enc.Hex)}`);\n console.log(`iv is ${iv.toString(crypto_js_1.default.enc.Hex)}`);\n encryptedSecretKey = rsa.encrypt(secretKey.toString(crypto_js_1.default.enc.Hex));\n encryptedIV = rsa.encrypt(iv.toString(crypto_js_1.default.enc.Hex));\n }\n CryptManager.resetKey = resetKey;\n function setEncryptParams(algorthim, mode, padding) {\n symmetricAlgorithm = CryptManager.algorithmMap.get(algorthim);\n symmetricMode = CryptManager.modeMap.get(mode);\n symmetricPadding = CryptManager.paddingMap.get(padding);\n }\n CryptManager.setEncryptParams = setEncryptParams;\n function encrypt(plainText) {\n //返回的是base64格式的密文\n return symmetricAlgorithm.encrypt(plainText, secretKey, { iv: iv, mode: symmetricMode, padding: symmetricPadding }).toString();\n }\n CryptManager.encrypt = encrypt;\n function decrypt(cipherText) {\n return symmetricAlgorithm.decrypt(cipherText, secretKey, { iv: iv, mode: symmetricMode, padding: symmetricPadding }).toString(crypto_js_1.default.enc.Utf8);\n }\n CryptManager.decrypt = decrypt;\n function sha256(text) {\n return crypto_js_1.default.SHA256(text).toString(crypto_js_1.default.enc.Base64);\n }\n CryptManager.sha256 = sha256;\n function md5Hex(text) {\n return crypto_js_1.default.MD5(text).toString(crypto_js_1.default.enc.Hex);\n }\n CryptManager.md5Hex = md5Hex;\n function getEncryptedSecretKey() {\n return encryptedSecretKey ? encryptedSecretKey : '';\n }\n CryptManager.getEncryptedSecretKey = getEncryptedSecretKey;\n function getEncryptedIV() {\n return encryptedIV ? encryptedIV : '';\n }\n CryptManager.getEncryptedIV = getEncryptedIV;\n})(CryptManager || (CryptManager = {}));\nexports.default = CryptManager;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Log {\n static info(...msg) {\n if (this.debugMode) {\n console.info(`[GtPush]`, msg);\n }\n //最终发版时会通过打包配置将所有console.log调用去除\n console.log(msg);\n }\n static error(...msg) {\n console.error(`[GtPush]`, msg);\n }\n}\nLog.debugMode = false;\nexports.default = Log;\n","var BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\r\nexport function int2char(n) {\r\n return BI_RM.charAt(n);\r\n}\r\n//#region BIT_OPERATIONS\r\n// (public) this & a\r\nexport function op_and(x, y) {\r\n return x & y;\r\n}\r\n// (public) this | a\r\nexport function op_or(x, y) {\r\n return x | y;\r\n}\r\n// (public) this ^ a\r\nexport function op_xor(x, y) {\r\n return x ^ y;\r\n}\r\n// (public) this & ~a\r\nexport function op_andnot(x, y) {\r\n return x & ~y;\r\n}\r\n// return index of lowest 1-bit in x, x < 2^31\r\nexport function lbit(x) {\r\n if (x == 0) {\r\n return -1;\r\n }\r\n var r = 0;\r\n if ((x & 0xffff) == 0) {\r\n x >>= 16;\r\n r += 16;\r\n }\r\n if ((x & 0xff) == 0) {\r\n x >>= 8;\r\n r += 8;\r\n }\r\n if ((x & 0xf) == 0) {\r\n x >>= 4;\r\n r += 4;\r\n }\r\n if ((x & 3) == 0) {\r\n x >>= 2;\r\n r += 2;\r\n }\r\n if ((x & 1) == 0) {\r\n ++r;\r\n }\r\n return r;\r\n}\r\n// return number of 1 bits in x\r\nexport function cbit(x) {\r\n var r = 0;\r\n while (x != 0) {\r\n x &= x - 1;\r\n ++r;\r\n }\r\n return r;\r\n}\r\n//#endregion BIT_OPERATIONS\r\n","import { int2char } from \"./util\";\r\nvar b64map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\nvar b64pad = \"=\";\r\nexport function hex2b64(h) {\r\n var i;\r\n var c;\r\n var ret = \"\";\r\n for (i = 0; i + 3 <= h.length; i += 3) {\r\n c = parseInt(h.substring(i, i + 3), 16);\r\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\r\n }\r\n if (i + 1 == h.length) {\r\n c = parseInt(h.substring(i, i + 1), 16);\r\n ret += b64map.charAt(c << 2);\r\n }\r\n else if (i + 2 == h.length) {\r\n c = parseInt(h.substring(i, i + 2), 16);\r\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\r\n }\r\n while ((ret.length & 3) > 0) {\r\n ret += b64pad;\r\n }\r\n return ret;\r\n}\r\n// convert a base64 string to hex\r\nexport function b64tohex(s) {\r\n var ret = \"\";\r\n var i;\r\n var k = 0; // b64 state, 0-3\r\n var slop = 0;\r\n for (i = 0; i < s.length; ++i) {\r\n if (s.charAt(i) == b64pad) {\r\n break;\r\n }\r\n var v = b64map.indexOf(s.charAt(i));\r\n if (v < 0) {\r\n continue;\r\n }\r\n if (k == 0) {\r\n ret += int2char(v >> 2);\r\n slop = v & 3;\r\n k = 1;\r\n }\r\n else if (k == 1) {\r\n ret += int2char((slop << 2) | (v >> 4));\r\n slop = v & 0xf;\r\n k = 2;\r\n }\r\n else if (k == 2) {\r\n ret += int2char(slop);\r\n ret += int2char(v >> 2);\r\n slop = v & 3;\r\n k = 3;\r\n }\r\n else {\r\n ret += int2char((slop << 2) | (v >> 4));\r\n ret += int2char(v & 0xf);\r\n k = 0;\r\n }\r\n }\r\n if (k == 1) {\r\n ret += int2char(slop << 2);\r\n }\r\n return ret;\r\n}\r\n// convert a base64 string to a byte/number array\r\nexport function b64toBA(s) {\r\n // piggyback on b64tohex for now, optimize later\r\n var h = b64tohex(s);\r\n var i;\r\n var a = [];\r\n for (i = 0; 2 * i < h.length; ++i) {\r\n a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\r\n }\r\n return a;\r\n}\r\n","// Hex JavaScript decoder\r\n// Copyright (c) 2008-2013 Lapo Luchini \r\n// Permission to use, copy, modify, and/or distribute this software for any\r\n// purpose with or without fee is hereby granted, provided that the above\r\n// copyright notice and this permission notice appear in all copies.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\r\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\r\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\r\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\r\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\r\nvar decoder;\r\nexport var Hex = {\r\n decode: function (a) {\r\n var i;\r\n if (decoder === undefined) {\r\n var hex = \"0123456789ABCDEF\";\r\n var ignore = \" \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\r\n decoder = {};\r\n for (i = 0; i < 16; ++i) {\r\n decoder[hex.charAt(i)] = i;\r\n }\r\n hex = hex.toLowerCase();\r\n for (i = 10; i < 16; ++i) {\r\n decoder[hex.charAt(i)] = i;\r\n }\r\n for (i = 0; i < ignore.length; ++i) {\r\n decoder[ignore.charAt(i)] = -1;\r\n }\r\n }\r\n var out = [];\r\n var bits = 0;\r\n var char_count = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n var c = a.charAt(i);\r\n if (c == \"=\") {\r\n break;\r\n }\r\n c = decoder[c];\r\n if (c == -1) {\r\n continue;\r\n }\r\n if (c === undefined) {\r\n throw new Error(\"Illegal character at offset \" + i);\r\n }\r\n bits |= c;\r\n if (++char_count >= 2) {\r\n out[out.length] = bits;\r\n bits = 0;\r\n char_count = 0;\r\n }\r\n else {\r\n bits <<= 4;\r\n }\r\n }\r\n if (char_count) {\r\n throw new Error(\"Hex encoding incomplete: 4 bits missing\");\r\n }\r\n return out;\r\n }\r\n};\r\n","// Base64 JavaScript decoder\r\n// Copyright (c) 2008-2013 Lapo Luchini \r\n// Permission to use, copy, modify, and/or distribute this software for any\r\n// purpose with or without fee is hereby granted, provided that the above\r\n// copyright notice and this permission notice appear in all copies.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\r\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\r\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\r\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\r\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\r\nvar decoder;\r\nexport var Base64 = {\r\n decode: function (a) {\r\n var i;\r\n if (decoder === undefined) {\r\n var b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\r\n var ignore = \"= \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\r\n decoder = Object.create(null);\r\n for (i = 0; i < 64; ++i) {\r\n decoder[b64.charAt(i)] = i;\r\n }\r\n decoder['-'] = 62; //+\r\n decoder['_'] = 63; //-\r\n for (i = 0; i < ignore.length; ++i) {\r\n decoder[ignore.charAt(i)] = -1;\r\n }\r\n }\r\n var out = [];\r\n var bits = 0;\r\n var char_count = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n var c = a.charAt(i);\r\n if (c == \"=\") {\r\n break;\r\n }\r\n c = decoder[c];\r\n if (c == -1) {\r\n continue;\r\n }\r\n if (c === undefined) {\r\n throw new Error(\"Illegal character at offset \" + i);\r\n }\r\n bits |= c;\r\n if (++char_count >= 4) {\r\n out[out.length] = (bits >> 16);\r\n out[out.length] = (bits >> 8) & 0xFF;\r\n out[out.length] = bits & 0xFF;\r\n bits = 0;\r\n char_count = 0;\r\n }\r\n else {\r\n bits <<= 6;\r\n }\r\n }\r\n switch (char_count) {\r\n case 1:\r\n throw new Error(\"Base64 encoding incomplete: at least 2 bits missing\");\r\n case 2:\r\n out[out.length] = (bits >> 10);\r\n break;\r\n case 3:\r\n out[out.length] = (bits >> 16);\r\n out[out.length] = (bits >> 8) & 0xFF;\r\n break;\r\n }\r\n return out;\r\n },\r\n re: /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/,\r\n unarmor: function (a) {\r\n var m = Base64.re.exec(a);\r\n if (m) {\r\n if (m[1]) {\r\n a = m[1];\r\n }\r\n else if (m[2]) {\r\n a = m[2];\r\n }\r\n else {\r\n throw new Error(\"RegExp out of sync\");\r\n }\r\n }\r\n return Base64.decode(a);\r\n }\r\n};\r\n","// Big integer base-10 printing library\r\n// Copyright (c) 2014 Lapo Luchini \r\n// Permission to use, copy, modify, and/or distribute this software for any\r\n// purpose with or without fee is hereby granted, provided that the above\r\n// copyright notice and this permission notice appear in all copies.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\r\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\r\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\r\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\r\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\r\nvar max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256\r\nvar Int10 = /** @class */ (function () {\r\n function Int10(value) {\r\n this.buf = [+value || 0];\r\n }\r\n Int10.prototype.mulAdd = function (m, c) {\r\n // assert(m <= 256)\r\n var b = this.buf;\r\n var l = b.length;\r\n var i;\r\n var t;\r\n for (i = 0; i < l; ++i) {\r\n t = b[i] * m + c;\r\n if (t < max) {\r\n c = 0;\r\n }\r\n else {\r\n c = 0 | (t / max);\r\n t -= c * max;\r\n }\r\n b[i] = t;\r\n }\r\n if (c > 0) {\r\n b[i] = c;\r\n }\r\n };\r\n Int10.prototype.sub = function (c) {\r\n // assert(m <= 256)\r\n var b = this.buf;\r\n var l = b.length;\r\n var i;\r\n var t;\r\n for (i = 0; i < l; ++i) {\r\n t = b[i] - c;\r\n if (t < 0) {\r\n t += max;\r\n c = 1;\r\n }\r\n else {\r\n c = 0;\r\n }\r\n b[i] = t;\r\n }\r\n while (b[b.length - 1] === 0) {\r\n b.pop();\r\n }\r\n };\r\n Int10.prototype.toString = function (base) {\r\n if ((base || 10) != 10) {\r\n throw new Error(\"only base 10 is supported\");\r\n }\r\n var b = this.buf;\r\n var s = b[b.length - 1].toString();\r\n for (var i = b.length - 2; i >= 0; --i) {\r\n s += (max + b[i]).toString().substring(1);\r\n }\r\n return s;\r\n };\r\n Int10.prototype.valueOf = function () {\r\n var b = this.buf;\r\n var v = 0;\r\n for (var i = b.length - 1; i >= 0; --i) {\r\n v = v * max + b[i];\r\n }\r\n return v;\r\n };\r\n Int10.prototype.simplify = function () {\r\n var b = this.buf;\r\n return (b.length == 1) ? b[0] : this;\r\n };\r\n return Int10;\r\n}());\r\nexport { Int10 };\r\n","// ASN.1 JavaScript decoder\r\n// Copyright (c) 2008-2014 Lapo Luchini \r\n// Permission to use, copy, modify, and/or distribute this software for any\r\n// purpose with or without fee is hereby granted, provided that the above\r\n// copyright notice and this permission notice appear in all copies.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\r\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\r\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\r\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\r\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\r\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\r\n/*global oids */\r\nimport { Int10 } from \"./int10\";\r\nvar ellipsis = \"\\u2026\";\r\nvar reTimeS = /^(\\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)?)?$/;\r\nvar reTimeL = /^(\\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)?)?$/;\r\nfunction stringCut(str, len) {\r\n if (str.length > len) {\r\n str = str.substring(0, len) + ellipsis;\r\n }\r\n return str;\r\n}\r\nvar Stream = /** @class */ (function () {\r\n function Stream(enc, pos) {\r\n this.hexDigits = \"0123456789ABCDEF\";\r\n if (enc instanceof Stream) {\r\n this.enc = enc.enc;\r\n this.pos = enc.pos;\r\n }\r\n else {\r\n // enc should be an array or a binary string\r\n this.enc = enc;\r\n this.pos = pos;\r\n }\r\n }\r\n Stream.prototype.get = function (pos) {\r\n if (pos === undefined) {\r\n pos = this.pos++;\r\n }\r\n if (pos >= this.enc.length) {\r\n throw new Error(\"Requesting byte offset \" + pos + \" on a stream of length \" + this.enc.length);\r\n }\r\n return (\"string\" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];\r\n };\r\n Stream.prototype.hexByte = function (b) {\r\n return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);\r\n };\r\n Stream.prototype.hexDump = function (start, end, raw) {\r\n var s = \"\";\r\n for (var i = start; i < end; ++i) {\r\n s += this.hexByte(this.get(i));\r\n if (raw !== true) {\r\n switch (i & 0xF) {\r\n case 0x7:\r\n s += \" \";\r\n break;\r\n case 0xF:\r\n s += \"\\n\";\r\n break;\r\n default:\r\n s += \" \";\r\n }\r\n }\r\n }\r\n return s;\r\n };\r\n Stream.prototype.isASCII = function (start, end) {\r\n for (var i = start; i < end; ++i) {\r\n var c = this.get(i);\r\n if (c < 32 || c > 176) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n Stream.prototype.parseStringISO = function (start, end) {\r\n var s = \"\";\r\n for (var i = start; i < end; ++i) {\r\n s += String.fromCharCode(this.get(i));\r\n }\r\n return s;\r\n };\r\n Stream.prototype.parseStringUTF = function (start, end) {\r\n var s = \"\";\r\n for (var i = start; i < end;) {\r\n var c = this.get(i++);\r\n if (c < 128) {\r\n s += String.fromCharCode(c);\r\n }\r\n else if ((c > 191) && (c < 224)) {\r\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\r\n }\r\n else {\r\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\r\n }\r\n }\r\n return s;\r\n };\r\n Stream.prototype.parseStringBMP = function (start, end) {\r\n var str = \"\";\r\n var hi;\r\n var lo;\r\n for (var i = start; i < end;) {\r\n hi = this.get(i++);\r\n lo = this.get(i++);\r\n str += String.fromCharCode((hi << 8) | lo);\r\n }\r\n return str;\r\n };\r\n Stream.prototype.parseTime = function (start, end, shortYear) {\r\n var s = this.parseStringISO(start, end);\r\n var m = (shortYear ? reTimeS : reTimeL).exec(s);\r\n if (!m) {\r\n return \"Unrecognized time: \" + s;\r\n }\r\n if (shortYear) {\r\n // to avoid querying the timer, use the fixed range [1970, 2069]\r\n // it will conform with ITU X.400 [-10, +40] sliding window until 2030\r\n m[1] = +m[1];\r\n m[1] += (+m[1] < 70) ? 2000 : 1900;\r\n }\r\n s = m[1] + \"-\" + m[2] + \"-\" + m[3] + \" \" + m[4];\r\n if (m[5]) {\r\n s += \":\" + m[5];\r\n if (m[6]) {\r\n s += \":\" + m[6];\r\n if (m[7]) {\r\n s += \".\" + m[7];\r\n }\r\n }\r\n }\r\n if (m[8]) {\r\n s += \" UTC\";\r\n if (m[8] != \"Z\") {\r\n s += m[8];\r\n if (m[9]) {\r\n s += \":\" + m[9];\r\n }\r\n }\r\n }\r\n return s;\r\n };\r\n Stream.prototype.parseInteger = function (start, end) {\r\n var v = this.get(start);\r\n var neg = (v > 127);\r\n var pad = neg ? 255 : 0;\r\n var len;\r\n var s = \"\";\r\n // skip unuseful bits (not allowed in DER)\r\n while (v == pad && ++start < end) {\r\n v = this.get(start);\r\n }\r\n len = end - start;\r\n if (len === 0) {\r\n return neg ? -1 : 0;\r\n }\r\n // show bit length of huge integers\r\n if (len > 4) {\r\n s = v;\r\n len <<= 3;\r\n while (((+s ^ pad) & 0x80) == 0) {\r\n s = +s << 1;\r\n --len;\r\n }\r\n s = \"(\" + len + \" bit)\\n\";\r\n }\r\n // decode the integer\r\n if (neg) {\r\n v = v - 256;\r\n }\r\n var n = new Int10(v);\r\n for (var i = start + 1; i < end; ++i) {\r\n n.mulAdd(256, this.get(i));\r\n }\r\n return s + n.toString();\r\n };\r\n Stream.prototype.parseBitString = function (start, end, maxLength) {\r\n var unusedBit = this.get(start);\r\n var lenBit = ((end - start - 1) << 3) - unusedBit;\r\n var intro = \"(\" + lenBit + \" bit)\\n\";\r\n var s = \"\";\r\n for (var i = start + 1; i < end; ++i) {\r\n var b = this.get(i);\r\n var skip = (i == end - 1) ? unusedBit : 0;\r\n for (var j = 7; j >= skip; --j) {\r\n s += (b >> j) & 1 ? \"1\" : \"0\";\r\n }\r\n if (s.length > maxLength) {\r\n return intro + stringCut(s, maxLength);\r\n }\r\n }\r\n return intro + s;\r\n };\r\n Stream.prototype.parseOctetString = function (start, end, maxLength) {\r\n if (this.isASCII(start, end)) {\r\n return stringCut(this.parseStringISO(start, end), maxLength);\r\n }\r\n var len = end - start;\r\n var s = \"(\" + len + \" byte)\\n\";\r\n maxLength /= 2; // we work in bytes\r\n if (len > maxLength) {\r\n end = start + maxLength;\r\n }\r\n for (var i = start; i < end; ++i) {\r\n s += this.hexByte(this.get(i));\r\n }\r\n if (len > maxLength) {\r\n s += ellipsis;\r\n }\r\n return s;\r\n };\r\n Stream.prototype.parseOID = function (start, end, maxLength) {\r\n var s = \"\";\r\n var n = new Int10();\r\n var bits = 0;\r\n for (var i = start; i < end; ++i) {\r\n var v = this.get(i);\r\n n.mulAdd(128, v & 0x7F);\r\n bits += 7;\r\n if (!(v & 0x80)) { // finished\r\n if (s === \"\") {\r\n n = n.simplify();\r\n if (n instanceof Int10) {\r\n n.sub(80);\r\n s = \"2.\" + n.toString();\r\n }\r\n else {\r\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\r\n s = m + \".\" + (n - m * 40);\r\n }\r\n }\r\n else {\r\n s += \".\" + n.toString();\r\n }\r\n if (s.length > maxLength) {\r\n return stringCut(s, maxLength);\r\n }\r\n n = new Int10();\r\n bits = 0;\r\n }\r\n }\r\n if (bits > 0) {\r\n s += \".incomplete\";\r\n }\r\n return s;\r\n };\r\n return Stream;\r\n}());\r\nexport { Stream };\r\nvar ASN1 = /** @class */ (function () {\r\n function ASN1(stream, header, length, tag, sub) {\r\n if (!(tag instanceof ASN1Tag)) {\r\n throw new Error(\"Invalid tag value.\");\r\n }\r\n this.stream = stream;\r\n this.header = header;\r\n this.length = length;\r\n this.tag = tag;\r\n this.sub = sub;\r\n }\r\n ASN1.prototype.typeName = function () {\r\n switch (this.tag.tagClass) {\r\n case 0: // universal\r\n switch (this.tag.tagNumber) {\r\n case 0x00:\r\n return \"EOC\";\r\n case 0x01:\r\n return \"BOOLEAN\";\r\n case 0x02:\r\n return \"INTEGER\";\r\n case 0x03:\r\n return \"BIT_STRING\";\r\n case 0x04:\r\n return \"OCTET_STRING\";\r\n case 0x05:\r\n return \"NULL\";\r\n case 0x06:\r\n return \"OBJECT_IDENTIFIER\";\r\n case 0x07:\r\n return \"ObjectDescriptor\";\r\n case 0x08:\r\n return \"EXTERNAL\";\r\n case 0x09:\r\n return \"REAL\";\r\n case 0x0A:\r\n return \"ENUMERATED\";\r\n case 0x0B:\r\n return \"EMBEDDED_PDV\";\r\n case 0x0C:\r\n return \"UTF8String\";\r\n case 0x10:\r\n return \"SEQUENCE\";\r\n case 0x11:\r\n return \"SET\";\r\n case 0x12:\r\n return \"NumericString\";\r\n case 0x13:\r\n return \"PrintableString\"; // ASCII subset\r\n case 0x14:\r\n return \"TeletexString\"; // aka T61String\r\n case 0x15:\r\n return \"VideotexString\";\r\n case 0x16:\r\n return \"IA5String\"; // ASCII\r\n case 0x17:\r\n return \"UTCTime\";\r\n case 0x18:\r\n return \"GeneralizedTime\";\r\n case 0x19:\r\n return \"GraphicString\";\r\n case 0x1A:\r\n return \"VisibleString\"; // ASCII subset\r\n case 0x1B:\r\n return \"GeneralString\";\r\n case 0x1C:\r\n return \"UniversalString\";\r\n case 0x1E:\r\n return \"BMPString\";\r\n }\r\n return \"Universal_\" + this.tag.tagNumber.toString();\r\n case 1:\r\n return \"Application_\" + this.tag.tagNumber.toString();\r\n case 2:\r\n return \"[\" + this.tag.tagNumber.toString() + \"]\"; // Context\r\n case 3:\r\n return \"Private_\" + this.tag.tagNumber.toString();\r\n }\r\n };\r\n ASN1.prototype.content = function (maxLength) {\r\n if (this.tag === undefined) {\r\n return null;\r\n }\r\n if (maxLength === undefined) {\r\n maxLength = Infinity;\r\n }\r\n var content = this.posContent();\r\n var len = Math.abs(this.length);\r\n if (!this.tag.isUniversal()) {\r\n if (this.sub !== null) {\r\n return \"(\" + this.sub.length + \" elem)\";\r\n }\r\n return this.stream.parseOctetString(content, content + len, maxLength);\r\n }\r\n switch (this.tag.tagNumber) {\r\n case 0x01: // BOOLEAN\r\n return (this.stream.get(content) === 0) ? \"false\" : \"true\";\r\n case 0x02: // INTEGER\r\n return this.stream.parseInteger(content, content + len);\r\n case 0x03: // BIT_STRING\r\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\r\n this.stream.parseBitString(content, content + len, maxLength);\r\n case 0x04: // OCTET_STRING\r\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\r\n this.stream.parseOctetString(content, content + len, maxLength);\r\n // case 0x05: // NULL\r\n case 0x06: // OBJECT_IDENTIFIER\r\n return this.stream.parseOID(content, content + len, maxLength);\r\n // case 0x07: // ObjectDescriptor\r\n // case 0x08: // EXTERNAL\r\n // case 0x09: // REAL\r\n // case 0x0A: // ENUMERATED\r\n // case 0x0B: // EMBEDDED_PDV\r\n case 0x10: // SEQUENCE\r\n case 0x11: // SET\r\n if (this.sub !== null) {\r\n return \"(\" + this.sub.length + \" elem)\";\r\n }\r\n else {\r\n return \"(no elem)\";\r\n }\r\n case 0x0C: // UTF8String\r\n return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);\r\n case 0x12: // NumericString\r\n case 0x13: // PrintableString\r\n case 0x14: // TeletexString\r\n case 0x15: // VideotexString\r\n case 0x16: // IA5String\r\n // case 0x19: // GraphicString\r\n case 0x1A: // VisibleString\r\n // case 0x1B: // GeneralString\r\n // case 0x1C: // UniversalString\r\n return stringCut(this.stream.parseStringISO(content, content + len), maxLength);\r\n case 0x1E: // BMPString\r\n return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);\r\n case 0x17: // UTCTime\r\n case 0x18: // GeneralizedTime\r\n return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));\r\n }\r\n return null;\r\n };\r\n ASN1.prototype.toString = function () {\r\n return this.typeName() + \"@\" + this.stream.pos + \"[header:\" + this.header + \",length:\" + this.length + \",sub:\" + ((this.sub === null) ? \"null\" : this.sub.length) + \"]\";\r\n };\r\n ASN1.prototype.toPrettyString = function (indent) {\r\n if (indent === undefined) {\r\n indent = \"\";\r\n }\r\n var s = indent + this.typeName() + \" @\" + this.stream.pos;\r\n if (this.length >= 0) {\r\n s += \"+\";\r\n }\r\n s += this.length;\r\n if (this.tag.tagConstructed) {\r\n s += \" (constructed)\";\r\n }\r\n else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {\r\n s += \" (encapsulates)\";\r\n }\r\n s += \"\\n\";\r\n if (this.sub !== null) {\r\n indent += \" \";\r\n for (var i = 0, max = this.sub.length; i < max; ++i) {\r\n s += this.sub[i].toPrettyString(indent);\r\n }\r\n }\r\n return s;\r\n };\r\n ASN1.prototype.posStart = function () {\r\n return this.stream.pos;\r\n };\r\n ASN1.prototype.posContent = function () {\r\n return this.stream.pos + this.header;\r\n };\r\n ASN1.prototype.posEnd = function () {\r\n return this.stream.pos + this.header + Math.abs(this.length);\r\n };\r\n ASN1.prototype.toHexString = function () {\r\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\r\n };\r\n ASN1.decodeLength = function (stream) {\r\n var buf = stream.get();\r\n var len = buf & 0x7F;\r\n if (len == buf) {\r\n return len;\r\n }\r\n // no reason to use Int10, as it would be a huge buffer anyways\r\n if (len > 6) {\r\n throw new Error(\"Length over 48 bits not supported at position \" + (stream.pos - 1));\r\n }\r\n if (len === 0) {\r\n return null;\r\n } // undefined\r\n buf = 0;\r\n for (var i = 0; i < len; ++i) {\r\n buf = (buf * 256) + stream.get();\r\n }\r\n return buf;\r\n };\r\n /**\r\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\r\n * @returns {string}\r\n * @public\r\n */\r\n ASN1.prototype.getHexStringValue = function () {\r\n var hexString = this.toHexString();\r\n var offset = this.header * 2;\r\n var length = this.length * 2;\r\n return hexString.substr(offset, length);\r\n };\r\n ASN1.decode = function (str) {\r\n var stream;\r\n if (!(str instanceof Stream)) {\r\n stream = new Stream(str, 0);\r\n }\r\n else {\r\n stream = str;\r\n }\r\n var streamStart = new Stream(stream);\r\n var tag = new ASN1Tag(stream);\r\n var len = ASN1.decodeLength(stream);\r\n var start = stream.pos;\r\n var header = start - streamStart.pos;\r\n var sub = null;\r\n var getSub = function () {\r\n var ret = [];\r\n if (len !== null) {\r\n // definite length\r\n var end = start + len;\r\n while (stream.pos < end) {\r\n ret[ret.length] = ASN1.decode(stream);\r\n }\r\n if (stream.pos != end) {\r\n throw new Error(\"Content size is not correct for container starting at offset \" + start);\r\n }\r\n }\r\n else {\r\n // undefined length\r\n try {\r\n for (;;) {\r\n var s = ASN1.decode(stream);\r\n if (s.tag.isEOC()) {\r\n break;\r\n }\r\n ret[ret.length] = s;\r\n }\r\n len = start - stream.pos; // undefined lengths are represented as negative values\r\n }\r\n catch (e) {\r\n throw new Error(\"Exception while decoding undefined length content: \" + e);\r\n }\r\n }\r\n return ret;\r\n };\r\n if (tag.tagConstructed) {\r\n // must have valid content\r\n sub = getSub();\r\n }\r\n else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {\r\n // sometimes BitString and OctetString are used to encapsulate ASN.1\r\n try {\r\n if (tag.tagNumber == 0x03) {\r\n if (stream.get() != 0) {\r\n throw new Error(\"BIT STRINGs with unused bits cannot encapsulate.\");\r\n }\r\n }\r\n sub = getSub();\r\n for (var i = 0; i < sub.length; ++i) {\r\n if (sub[i].tag.isEOC()) {\r\n throw new Error(\"EOC is not supposed to be actual content.\");\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // but silently ignore when they don't\r\n sub = null;\r\n }\r\n }\r\n if (sub === null) {\r\n if (len === null) {\r\n throw new Error(\"We can't skip over an invalid tag with undefined length at offset \" + start);\r\n }\r\n stream.pos = start + Math.abs(len);\r\n }\r\n return new ASN1(streamStart, header, len, tag, sub);\r\n };\r\n return ASN1;\r\n}());\r\nexport { ASN1 };\r\nvar ASN1Tag = /** @class */ (function () {\r\n function ASN1Tag(stream) {\r\n var buf = stream.get();\r\n this.tagClass = buf >> 6;\r\n this.tagConstructed = ((buf & 0x20) !== 0);\r\n this.tagNumber = buf & 0x1F;\r\n if (this.tagNumber == 0x1F) { // long tag\r\n var n = new Int10();\r\n do {\r\n buf = stream.get();\r\n n.mulAdd(128, buf & 0x7F);\r\n } while (buf & 0x80);\r\n this.tagNumber = n.simplify();\r\n }\r\n }\r\n ASN1Tag.prototype.isUniversal = function () {\r\n return this.tagClass === 0x00;\r\n };\r\n ASN1Tag.prototype.isEOC = function () {\r\n return this.tagClass === 0x00 && this.tagNumber === 0x00;\r\n };\r\n return ASN1Tag;\r\n}());\r\nexport { ASN1Tag };\r\n","// Copyright (c) 2005 Tom Wu\r\n// All Rights Reserved.\r\n// See \"LICENSE\" for details.\r\n// Basic JavaScript BN library - subset useful for RSA encryption.\r\nimport { cbit, int2char, lbit, op_and, op_andnot, op_or, op_xor } from \"./util\";\r\n// Bits per digit\r\nvar dbits;\r\n// JavaScript engine analysis\r\nvar canary = 0xdeadbeefcafe;\r\nvar j_lm = ((canary & 0xffffff) == 0xefcafe);\r\n//#region\r\nvar lowprimes = [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];\r\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\r\n//#endregion\r\n// (public) Constructor\r\nvar BigInteger = /** @class */ (function () {\r\n function BigInteger(a, b, c) {\r\n if (a != null) {\r\n if (\"number\" == typeof a) {\r\n this.fromNumber(a, b, c);\r\n }\r\n else if (b == null && \"string\" != typeof a) {\r\n this.fromString(a, 256);\r\n }\r\n else {\r\n this.fromString(a, b);\r\n }\r\n }\r\n }\r\n //#region PUBLIC\r\n // BigInteger.prototype.toString = bnToString;\r\n // (public) return string representation in given radix\r\n BigInteger.prototype.toString = function (b) {\r\n if (this.s < 0) {\r\n return \"-\" + this.negate().toString(b);\r\n }\r\n var k;\r\n if (b == 16) {\r\n k = 4;\r\n }\r\n else if (b == 8) {\r\n k = 3;\r\n }\r\n else if (b == 2) {\r\n k = 1;\r\n }\r\n else if (b == 32) {\r\n k = 5;\r\n }\r\n else if (b == 4) {\r\n k = 2;\r\n }\r\n else {\r\n return this.toRadix(b);\r\n }\r\n var km = (1 << k) - 1;\r\n var d;\r\n var m = false;\r\n var r = \"\";\r\n var i = this.t;\r\n var p = this.DB - (i * this.DB) % k;\r\n if (i-- > 0) {\r\n if (p < this.DB && (d = this[i] >> p) > 0) {\r\n m = true;\r\n r = int2char(d);\r\n }\r\n while (i >= 0) {\r\n if (p < k) {\r\n d = (this[i] & ((1 << p) - 1)) << (k - p);\r\n d |= this[--i] >> (p += this.DB - k);\r\n }\r\n else {\r\n d = (this[i] >> (p -= k)) & km;\r\n if (p <= 0) {\r\n p += this.DB;\r\n --i;\r\n }\r\n }\r\n if (d > 0) {\r\n m = true;\r\n }\r\n if (m) {\r\n r += int2char(d);\r\n }\r\n }\r\n }\r\n return m ? r : \"0\";\r\n };\r\n // BigInteger.prototype.negate = bnNegate;\r\n // (public) -this\r\n BigInteger.prototype.negate = function () {\r\n var r = nbi();\r\n BigInteger.ZERO.subTo(this, r);\r\n return r;\r\n };\r\n // BigInteger.prototype.abs = bnAbs;\r\n // (public) |this|\r\n BigInteger.prototype.abs = function () {\r\n return (this.s < 0) ? this.negate() : this;\r\n };\r\n // BigInteger.prototype.compareTo = bnCompareTo;\r\n // (public) return + if this > a, - if this < a, 0 if equal\r\n BigInteger.prototype.compareTo = function (a) {\r\n var r = this.s - a.s;\r\n if (r != 0) {\r\n return r;\r\n }\r\n var i = this.t;\r\n r = i - a.t;\r\n if (r != 0) {\r\n return (this.s < 0) ? -r : r;\r\n }\r\n while (--i >= 0) {\r\n if ((r = this[i] - a[i]) != 0) {\r\n return r;\r\n }\r\n }\r\n return 0;\r\n };\r\n // BigInteger.prototype.bitLength = bnBitLength;\r\n // (public) return the number of bits in \"this\"\r\n BigInteger.prototype.bitLength = function () {\r\n if (this.t <= 0) {\r\n return 0;\r\n }\r\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\r\n };\r\n // BigInteger.prototype.mod = bnMod;\r\n // (public) this mod a\r\n BigInteger.prototype.mod = function (a) {\r\n var r = nbi();\r\n this.abs().divRemTo(a, null, r);\r\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\r\n a.subTo(r, r);\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.modPowInt = bnModPowInt;\r\n // (public) this^e % m, 0 <= e < 2^32\r\n BigInteger.prototype.modPowInt = function (e, m) {\r\n var z;\r\n if (e < 256 || m.isEven()) {\r\n z = new Classic(m);\r\n }\r\n else {\r\n z = new Montgomery(m);\r\n }\r\n return this.exp(e, z);\r\n };\r\n // BigInteger.prototype.clone = bnClone;\r\n // (public)\r\n BigInteger.prototype.clone = function () {\r\n var r = nbi();\r\n this.copyTo(r);\r\n return r;\r\n };\r\n // BigInteger.prototype.intValue = bnIntValue;\r\n // (public) return value as integer\r\n BigInteger.prototype.intValue = function () {\r\n if (this.s < 0) {\r\n if (this.t == 1) {\r\n return this[0] - this.DV;\r\n }\r\n else if (this.t == 0) {\r\n return -1;\r\n }\r\n }\r\n else if (this.t == 1) {\r\n return this[0];\r\n }\r\n else if (this.t == 0) {\r\n return 0;\r\n }\r\n // assumes 16 < DB < 32\r\n return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\r\n };\r\n // BigInteger.prototype.byteValue = bnByteValue;\r\n // (public) return value as byte\r\n BigInteger.prototype.byteValue = function () {\r\n return (this.t == 0) ? this.s : (this[0] << 24) >> 24;\r\n };\r\n // BigInteger.prototype.shortValue = bnShortValue;\r\n // (public) return value as short (assumes DB>=16)\r\n BigInteger.prototype.shortValue = function () {\r\n return (this.t == 0) ? this.s : (this[0] << 16) >> 16;\r\n };\r\n // BigInteger.prototype.signum = bnSigNum;\r\n // (public) 0 if this == 0, 1 if this > 0\r\n BigInteger.prototype.signum = function () {\r\n if (this.s < 0) {\r\n return -1;\r\n }\r\n else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {\r\n return 0;\r\n }\r\n else {\r\n return 1;\r\n }\r\n };\r\n // BigInteger.prototype.toByteArray = bnToByteArray;\r\n // (public) convert to bigendian byte array\r\n BigInteger.prototype.toByteArray = function () {\r\n var i = this.t;\r\n var r = [];\r\n r[0] = this.s;\r\n var p = this.DB - (i * this.DB) % 8;\r\n var d;\r\n var k = 0;\r\n if (i-- > 0) {\r\n if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {\r\n r[k++] = d | (this.s << (this.DB - p));\r\n }\r\n while (i >= 0) {\r\n if (p < 8) {\r\n d = (this[i] & ((1 << p) - 1)) << (8 - p);\r\n d |= this[--i] >> (p += this.DB - 8);\r\n }\r\n else {\r\n d = (this[i] >> (p -= 8)) & 0xff;\r\n if (p <= 0) {\r\n p += this.DB;\r\n --i;\r\n }\r\n }\r\n if ((d & 0x80) != 0) {\r\n d |= -256;\r\n }\r\n if (k == 0 && (this.s & 0x80) != (d & 0x80)) {\r\n ++k;\r\n }\r\n if (k > 0 || d != this.s) {\r\n r[k++] = d;\r\n }\r\n }\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.equals = bnEquals;\r\n BigInteger.prototype.equals = function (a) {\r\n return (this.compareTo(a) == 0);\r\n };\r\n // BigInteger.prototype.min = bnMin;\r\n BigInteger.prototype.min = function (a) {\r\n return (this.compareTo(a) < 0) ? this : a;\r\n };\r\n // BigInteger.prototype.max = bnMax;\r\n BigInteger.prototype.max = function (a) {\r\n return (this.compareTo(a) > 0) ? this : a;\r\n };\r\n // BigInteger.prototype.and = bnAnd;\r\n BigInteger.prototype.and = function (a) {\r\n var r = nbi();\r\n this.bitwiseTo(a, op_and, r);\r\n return r;\r\n };\r\n // BigInteger.prototype.or = bnOr;\r\n BigInteger.prototype.or = function (a) {\r\n var r = nbi();\r\n this.bitwiseTo(a, op_or, r);\r\n return r;\r\n };\r\n // BigInteger.prototype.xor = bnXor;\r\n BigInteger.prototype.xor = function (a) {\r\n var r = nbi();\r\n this.bitwiseTo(a, op_xor, r);\r\n return r;\r\n };\r\n // BigInteger.prototype.andNot = bnAndNot;\r\n BigInteger.prototype.andNot = function (a) {\r\n var r = nbi();\r\n this.bitwiseTo(a, op_andnot, r);\r\n return r;\r\n };\r\n // BigInteger.prototype.not = bnNot;\r\n // (public) ~this\r\n BigInteger.prototype.not = function () {\r\n var r = nbi();\r\n for (var i = 0; i < this.t; ++i) {\r\n r[i] = this.DM & ~this[i];\r\n }\r\n r.t = this.t;\r\n r.s = ~this.s;\r\n return r;\r\n };\r\n // BigInteger.prototype.shiftLeft = bnShiftLeft;\r\n // (public) this << n\r\n BigInteger.prototype.shiftLeft = function (n) {\r\n var r = nbi();\r\n if (n < 0) {\r\n this.rShiftTo(-n, r);\r\n }\r\n else {\r\n this.lShiftTo(n, r);\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.shiftRight = bnShiftRight;\r\n // (public) this >> n\r\n BigInteger.prototype.shiftRight = function (n) {\r\n var r = nbi();\r\n if (n < 0) {\r\n this.lShiftTo(-n, r);\r\n }\r\n else {\r\n this.rShiftTo(n, r);\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\r\n // (public) returns index of lowest 1-bit (or -1 if none)\r\n BigInteger.prototype.getLowestSetBit = function () {\r\n for (var i = 0; i < this.t; ++i) {\r\n if (this[i] != 0) {\r\n return i * this.DB + lbit(this[i]);\r\n }\r\n }\r\n if (this.s < 0) {\r\n return this.t * this.DB;\r\n }\r\n return -1;\r\n };\r\n // BigInteger.prototype.bitCount = bnBitCount;\r\n // (public) return number of set bits\r\n BigInteger.prototype.bitCount = function () {\r\n var r = 0;\r\n var x = this.s & this.DM;\r\n for (var i = 0; i < this.t; ++i) {\r\n r += cbit(this[i] ^ x);\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.testBit = bnTestBit;\r\n // (public) true iff nth bit is set\r\n BigInteger.prototype.testBit = function (n) {\r\n var j = Math.floor(n / this.DB);\r\n if (j >= this.t) {\r\n return (this.s != 0);\r\n }\r\n return ((this[j] & (1 << (n % this.DB))) != 0);\r\n };\r\n // BigInteger.prototype.setBit = bnSetBit;\r\n // (public) this | (1< 1) {\r\n var g2 = nbi();\r\n z.sqrTo(g[1], g2);\r\n while (n <= km) {\r\n g[n] = nbi();\r\n z.mulTo(g2, g[n - 2], g[n]);\r\n n += 2;\r\n }\r\n }\r\n var j = e.t - 1;\r\n var w;\r\n var is1 = true;\r\n var r2 = nbi();\r\n var t;\r\n i = nbits(e[j]) - 1;\r\n while (j >= 0) {\r\n if (i >= k1) {\r\n w = (e[j] >> (i - k1)) & km;\r\n }\r\n else {\r\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\r\n if (j > 0) {\r\n w |= e[j - 1] >> (this.DB + i - k1);\r\n }\r\n }\r\n n = k;\r\n while ((w & 1) == 0) {\r\n w >>= 1;\r\n --n;\r\n }\r\n if ((i -= n) < 0) {\r\n i += this.DB;\r\n --j;\r\n }\r\n if (is1) { // ret == 1, don't bother squaring or multiplying it\r\n g[w].copyTo(r);\r\n is1 = false;\r\n }\r\n else {\r\n while (n > 1) {\r\n z.sqrTo(r, r2);\r\n z.sqrTo(r2, r);\r\n n -= 2;\r\n }\r\n if (n > 0) {\r\n z.sqrTo(r, r2);\r\n }\r\n else {\r\n t = r;\r\n r = r2;\r\n r2 = t;\r\n }\r\n z.mulTo(r2, g[w], r);\r\n }\r\n while (j >= 0 && (e[j] & (1 << i)) == 0) {\r\n z.sqrTo(r, r2);\r\n t = r;\r\n r = r2;\r\n r2 = t;\r\n if (--i < 0) {\r\n i = this.DB - 1;\r\n --j;\r\n }\r\n }\r\n }\r\n return z.revert(r);\r\n };\r\n // BigInteger.prototype.modInverse = bnModInverse;\r\n // (public) 1/this % m (HAC 14.61)\r\n BigInteger.prototype.modInverse = function (m) {\r\n var ac = m.isEven();\r\n if ((this.isEven() && ac) || m.signum() == 0) {\r\n return BigInteger.ZERO;\r\n }\r\n var u = m.clone();\r\n var v = this.clone();\r\n var a = nbv(1);\r\n var b = nbv(0);\r\n var c = nbv(0);\r\n var d = nbv(1);\r\n while (u.signum() != 0) {\r\n while (u.isEven()) {\r\n u.rShiftTo(1, u);\r\n if (ac) {\r\n if (!a.isEven() || !b.isEven()) {\r\n a.addTo(this, a);\r\n b.subTo(m, b);\r\n }\r\n a.rShiftTo(1, a);\r\n }\r\n else if (!b.isEven()) {\r\n b.subTo(m, b);\r\n }\r\n b.rShiftTo(1, b);\r\n }\r\n while (v.isEven()) {\r\n v.rShiftTo(1, v);\r\n if (ac) {\r\n if (!c.isEven() || !d.isEven()) {\r\n c.addTo(this, c);\r\n d.subTo(m, d);\r\n }\r\n c.rShiftTo(1, c);\r\n }\r\n else if (!d.isEven()) {\r\n d.subTo(m, d);\r\n }\r\n d.rShiftTo(1, d);\r\n }\r\n if (u.compareTo(v) >= 0) {\r\n u.subTo(v, u);\r\n if (ac) {\r\n a.subTo(c, a);\r\n }\r\n b.subTo(d, b);\r\n }\r\n else {\r\n v.subTo(u, v);\r\n if (ac) {\r\n c.subTo(a, c);\r\n }\r\n d.subTo(b, d);\r\n }\r\n }\r\n if (v.compareTo(BigInteger.ONE) != 0) {\r\n return BigInteger.ZERO;\r\n }\r\n if (d.compareTo(m) >= 0) {\r\n return d.subtract(m);\r\n }\r\n if (d.signum() < 0) {\r\n d.addTo(m, d);\r\n }\r\n else {\r\n return d;\r\n }\r\n if (d.signum() < 0) {\r\n return d.add(m);\r\n }\r\n else {\r\n return d;\r\n }\r\n };\r\n // BigInteger.prototype.pow = bnPow;\r\n // (public) this^e\r\n BigInteger.prototype.pow = function (e) {\r\n return this.exp(e, new NullExp());\r\n };\r\n // BigInteger.prototype.gcd = bnGCD;\r\n // (public) gcd(this,a) (HAC 14.54)\r\n BigInteger.prototype.gcd = function (a) {\r\n var x = (this.s < 0) ? this.negate() : this.clone();\r\n var y = (a.s < 0) ? a.negate() : a.clone();\r\n if (x.compareTo(y) < 0) {\r\n var t = x;\r\n x = y;\r\n y = t;\r\n }\r\n var i = x.getLowestSetBit();\r\n var g = y.getLowestSetBit();\r\n if (g < 0) {\r\n return x;\r\n }\r\n if (i < g) {\r\n g = i;\r\n }\r\n if (g > 0) {\r\n x.rShiftTo(g, x);\r\n y.rShiftTo(g, y);\r\n }\r\n while (x.signum() > 0) {\r\n if ((i = x.getLowestSetBit()) > 0) {\r\n x.rShiftTo(i, x);\r\n }\r\n if ((i = y.getLowestSetBit()) > 0) {\r\n y.rShiftTo(i, y);\r\n }\r\n if (x.compareTo(y) >= 0) {\r\n x.subTo(y, x);\r\n x.rShiftTo(1, x);\r\n }\r\n else {\r\n y.subTo(x, y);\r\n y.rShiftTo(1, y);\r\n }\r\n }\r\n if (g > 0) {\r\n y.lShiftTo(g, y);\r\n }\r\n return y;\r\n };\r\n // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\r\n // (public) test primality with certainty >= 1-.5^t\r\n BigInteger.prototype.isProbablePrime = function (t) {\r\n var i;\r\n var x = this.abs();\r\n if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {\r\n for (i = 0; i < lowprimes.length; ++i) {\r\n if (x[0] == lowprimes[i]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n if (x.isEven()) {\r\n return false;\r\n }\r\n i = 1;\r\n while (i < lowprimes.length) {\r\n var m = lowprimes[i];\r\n var j = i + 1;\r\n while (j < lowprimes.length && m < lplim) {\r\n m *= lowprimes[j++];\r\n }\r\n m = x.modInt(m);\r\n while (i < j) {\r\n if (m % lowprimes[i++] == 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n return x.millerRabin(t);\r\n };\r\n //#endregion PUBLIC\r\n //#region PROTECTED\r\n // BigInteger.prototype.copyTo = bnpCopyTo;\r\n // (protected) copy this to r\r\n BigInteger.prototype.copyTo = function (r) {\r\n for (var i = this.t - 1; i >= 0; --i) {\r\n r[i] = this[i];\r\n }\r\n r.t = this.t;\r\n r.s = this.s;\r\n };\r\n // BigInteger.prototype.fromInt = bnpFromInt;\r\n // (protected) set from integer value x, -DV <= x < DV\r\n BigInteger.prototype.fromInt = function (x) {\r\n this.t = 1;\r\n this.s = (x < 0) ? -1 : 0;\r\n if (x > 0) {\r\n this[0] = x;\r\n }\r\n else if (x < -1) {\r\n this[0] = x + this.DV;\r\n }\r\n else {\r\n this.t = 0;\r\n }\r\n };\r\n // BigInteger.prototype.fromString = bnpFromString;\r\n // (protected) set from string and radix\r\n BigInteger.prototype.fromString = function (s, b) {\r\n var k;\r\n if (b == 16) {\r\n k = 4;\r\n }\r\n else if (b == 8) {\r\n k = 3;\r\n }\r\n else if (b == 256) {\r\n k = 8;\r\n /* byte array */\r\n }\r\n else if (b == 2) {\r\n k = 1;\r\n }\r\n else if (b == 32) {\r\n k = 5;\r\n }\r\n else if (b == 4) {\r\n k = 2;\r\n }\r\n else {\r\n this.fromRadix(s, b);\r\n return;\r\n }\r\n this.t = 0;\r\n this.s = 0;\r\n var i = s.length;\r\n var mi = false;\r\n var sh = 0;\r\n while (--i >= 0) {\r\n var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);\r\n if (x < 0) {\r\n if (s.charAt(i) == \"-\") {\r\n mi = true;\r\n }\r\n continue;\r\n }\r\n mi = false;\r\n if (sh == 0) {\r\n this[this.t++] = x;\r\n }\r\n else if (sh + k > this.DB) {\r\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\r\n this[this.t++] = (x >> (this.DB - sh));\r\n }\r\n else {\r\n this[this.t - 1] |= x << sh;\r\n }\r\n sh += k;\r\n if (sh >= this.DB) {\r\n sh -= this.DB;\r\n }\r\n }\r\n if (k == 8 && ((+s[0]) & 0x80) != 0) {\r\n this.s = -1;\r\n if (sh > 0) {\r\n this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\r\n }\r\n }\r\n this.clamp();\r\n if (mi) {\r\n BigInteger.ZERO.subTo(this, this);\r\n }\r\n };\r\n // BigInteger.prototype.clamp = bnpClamp;\r\n // (protected) clamp off excess high words\r\n BigInteger.prototype.clamp = function () {\r\n var c = this.s & this.DM;\r\n while (this.t > 0 && this[this.t - 1] == c) {\r\n --this.t;\r\n }\r\n };\r\n // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\r\n // (protected) r = this << n*DB\r\n BigInteger.prototype.dlShiftTo = function (n, r) {\r\n var i;\r\n for (i = this.t - 1; i >= 0; --i) {\r\n r[i + n] = this[i];\r\n }\r\n for (i = n - 1; i >= 0; --i) {\r\n r[i] = 0;\r\n }\r\n r.t = this.t + n;\r\n r.s = this.s;\r\n };\r\n // BigInteger.prototype.drShiftTo = bnpDRShiftTo;\r\n // (protected) r = this >> n*DB\r\n BigInteger.prototype.drShiftTo = function (n, r) {\r\n for (var i = n; i < this.t; ++i) {\r\n r[i - n] = this[i];\r\n }\r\n r.t = Math.max(this.t - n, 0);\r\n r.s = this.s;\r\n };\r\n // BigInteger.prototype.lShiftTo = bnpLShiftTo;\r\n // (protected) r = this << n\r\n BigInteger.prototype.lShiftTo = function (n, r) {\r\n var bs = n % this.DB;\r\n var cbs = this.DB - bs;\r\n var bm = (1 << cbs) - 1;\r\n var ds = Math.floor(n / this.DB);\r\n var c = (this.s << bs) & this.DM;\r\n for (var i = this.t - 1; i >= 0; --i) {\r\n r[i + ds + 1] = (this[i] >> cbs) | c;\r\n c = (this[i] & bm) << bs;\r\n }\r\n for (var i = ds - 1; i >= 0; --i) {\r\n r[i] = 0;\r\n }\r\n r[ds] = c;\r\n r.t = this.t + ds + 1;\r\n r.s = this.s;\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.rShiftTo = bnpRShiftTo;\r\n // (protected) r = this >> n\r\n BigInteger.prototype.rShiftTo = function (n, r) {\r\n r.s = this.s;\r\n var ds = Math.floor(n / this.DB);\r\n if (ds >= this.t) {\r\n r.t = 0;\r\n return;\r\n }\r\n var bs = n % this.DB;\r\n var cbs = this.DB - bs;\r\n var bm = (1 << bs) - 1;\r\n r[0] = this[ds] >> bs;\r\n for (var i = ds + 1; i < this.t; ++i) {\r\n r[i - ds - 1] |= (this[i] & bm) << cbs;\r\n r[i - ds] = this[i] >> bs;\r\n }\r\n if (bs > 0) {\r\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\r\n }\r\n r.t = this.t - ds;\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.subTo = bnpSubTo;\r\n // (protected) r = this - a\r\n BigInteger.prototype.subTo = function (a, r) {\r\n var i = 0;\r\n var c = 0;\r\n var m = Math.min(a.t, this.t);\r\n while (i < m) {\r\n c += this[i] - a[i];\r\n r[i++] = c & this.DM;\r\n c >>= this.DB;\r\n }\r\n if (a.t < this.t) {\r\n c -= a.s;\r\n while (i < this.t) {\r\n c += this[i];\r\n r[i++] = c & this.DM;\r\n c >>= this.DB;\r\n }\r\n c += this.s;\r\n }\r\n else {\r\n c += this.s;\r\n while (i < a.t) {\r\n c -= a[i];\r\n r[i++] = c & this.DM;\r\n c >>= this.DB;\r\n }\r\n c -= a.s;\r\n }\r\n r.s = (c < 0) ? -1 : 0;\r\n if (c < -1) {\r\n r[i++] = this.DV + c;\r\n }\r\n else if (c > 0) {\r\n r[i++] = c;\r\n }\r\n r.t = i;\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.multiplyTo = bnpMultiplyTo;\r\n // (protected) r = this * a, r != this,a (HAC 14.12)\r\n // \"this\" should be the larger one if appropriate.\r\n BigInteger.prototype.multiplyTo = function (a, r) {\r\n var x = this.abs();\r\n var y = a.abs();\r\n var i = x.t;\r\n r.t = i + y.t;\r\n while (--i >= 0) {\r\n r[i] = 0;\r\n }\r\n for (i = 0; i < y.t; ++i) {\r\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\r\n }\r\n r.s = 0;\r\n r.clamp();\r\n if (this.s != a.s) {\r\n BigInteger.ZERO.subTo(r, r);\r\n }\r\n };\r\n // BigInteger.prototype.squareTo = bnpSquareTo;\r\n // (protected) r = this^2, r != this (HAC 14.16)\r\n BigInteger.prototype.squareTo = function (r) {\r\n var x = this.abs();\r\n var i = r.t = 2 * x.t;\r\n while (--i >= 0) {\r\n r[i] = 0;\r\n }\r\n for (i = 0; i < x.t - 1; ++i) {\r\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\r\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\r\n r[i + x.t] -= x.DV;\r\n r[i + x.t + 1] = 1;\r\n }\r\n }\r\n if (r.t > 0) {\r\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\r\n }\r\n r.s = 0;\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.divRemTo = bnpDivRemTo;\r\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\r\n // r != q, this != m. q or r may be null.\r\n BigInteger.prototype.divRemTo = function (m, q, r) {\r\n var pm = m.abs();\r\n if (pm.t <= 0) {\r\n return;\r\n }\r\n var pt = this.abs();\r\n if (pt.t < pm.t) {\r\n if (q != null) {\r\n q.fromInt(0);\r\n }\r\n if (r != null) {\r\n this.copyTo(r);\r\n }\r\n return;\r\n }\r\n if (r == null) {\r\n r = nbi();\r\n }\r\n var y = nbi();\r\n var ts = this.s;\r\n var ms = m.s;\r\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\r\n if (nsh > 0) {\r\n pm.lShiftTo(nsh, y);\r\n pt.lShiftTo(nsh, r);\r\n }\r\n else {\r\n pm.copyTo(y);\r\n pt.copyTo(r);\r\n }\r\n var ys = y.t;\r\n var y0 = y[ys - 1];\r\n if (y0 == 0) {\r\n return;\r\n }\r\n var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\r\n var d1 = this.FV / yt;\r\n var d2 = (1 << this.F1) / yt;\r\n var e = 1 << this.F2;\r\n var i = r.t;\r\n var j = i - ys;\r\n var t = (q == null) ? nbi() : q;\r\n y.dlShiftTo(j, t);\r\n if (r.compareTo(t) >= 0) {\r\n r[r.t++] = 1;\r\n r.subTo(t, r);\r\n }\r\n BigInteger.ONE.dlShiftTo(ys, t);\r\n t.subTo(y, y); // \"negative\" y so we can replace sub with am later\r\n while (y.t < ys) {\r\n y[y.t++] = 0;\r\n }\r\n while (--j >= 0) {\r\n // Estimate quotient digit\r\n var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\r\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out\r\n y.dlShiftTo(j, t);\r\n r.subTo(t, r);\r\n while (r[i] < --qd) {\r\n r.subTo(t, r);\r\n }\r\n }\r\n }\r\n if (q != null) {\r\n r.drShiftTo(ys, q);\r\n if (ts != ms) {\r\n BigInteger.ZERO.subTo(q, q);\r\n }\r\n }\r\n r.t = ys;\r\n r.clamp();\r\n if (nsh > 0) {\r\n r.rShiftTo(nsh, r);\r\n } // Denormalize remainder\r\n if (ts < 0) {\r\n BigInteger.ZERO.subTo(r, r);\r\n }\r\n };\r\n // BigInteger.prototype.invDigit = bnpInvDigit;\r\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\r\n // justification:\r\n // xy == 1 (mod m)\r\n // xy = 1+km\r\n // xy(2-xy) = (1+km)(1-km)\r\n // x[y(2-xy)] = 1-k^2m^2\r\n // x[y(2-xy)] == 1 (mod m^2)\r\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\r\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\r\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\r\n BigInteger.prototype.invDigit = function () {\r\n if (this.t < 1) {\r\n return 0;\r\n }\r\n var x = this[0];\r\n if ((x & 1) == 0) {\r\n return 0;\r\n }\r\n var y = x & 3; // y == 1/x mod 2^2\r\n y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\r\n y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\r\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\r\n // last step - calculate inverse mod DV directly;\r\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\r\n y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\r\n // we really want the negative inverse, and -DV < y < DV\r\n return (y > 0) ? this.DV - y : -y;\r\n };\r\n // BigInteger.prototype.isEven = bnpIsEven;\r\n // (protected) true iff this is even\r\n BigInteger.prototype.isEven = function () {\r\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\r\n };\r\n // BigInteger.prototype.exp = bnpExp;\r\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\r\n BigInteger.prototype.exp = function (e, z) {\r\n if (e > 0xffffffff || e < 1) {\r\n return BigInteger.ONE;\r\n }\r\n var r = nbi();\r\n var r2 = nbi();\r\n var g = z.convert(this);\r\n var i = nbits(e) - 1;\r\n g.copyTo(r);\r\n while (--i >= 0) {\r\n z.sqrTo(r, r2);\r\n if ((e & (1 << i)) > 0) {\r\n z.mulTo(r2, g, r);\r\n }\r\n else {\r\n var t = r;\r\n r = r2;\r\n r2 = t;\r\n }\r\n }\r\n return z.revert(r);\r\n };\r\n // BigInteger.prototype.chunkSize = bnpChunkSize;\r\n // (protected) return x s.t. r^x < DV\r\n BigInteger.prototype.chunkSize = function (r) {\r\n return Math.floor(Math.LN2 * this.DB / Math.log(r));\r\n };\r\n // BigInteger.prototype.toRadix = bnpToRadix;\r\n // (protected) convert to radix string\r\n BigInteger.prototype.toRadix = function (b) {\r\n if (b == null) {\r\n b = 10;\r\n }\r\n if (this.signum() == 0 || b < 2 || b > 36) {\r\n return \"0\";\r\n }\r\n var cs = this.chunkSize(b);\r\n var a = Math.pow(b, cs);\r\n var d = nbv(a);\r\n var y = nbi();\r\n var z = nbi();\r\n var r = \"\";\r\n this.divRemTo(d, y, z);\r\n while (y.signum() > 0) {\r\n r = (a + z.intValue()).toString(b).substr(1) + r;\r\n y.divRemTo(d, y, z);\r\n }\r\n return z.intValue().toString(b) + r;\r\n };\r\n // BigInteger.prototype.fromRadix = bnpFromRadix;\r\n // (protected) convert from radix string\r\n BigInteger.prototype.fromRadix = function (s, b) {\r\n this.fromInt(0);\r\n if (b == null) {\r\n b = 10;\r\n }\r\n var cs = this.chunkSize(b);\r\n var d = Math.pow(b, cs);\r\n var mi = false;\r\n var j = 0;\r\n var w = 0;\r\n for (var i = 0; i < s.length; ++i) {\r\n var x = intAt(s, i);\r\n if (x < 0) {\r\n if (s.charAt(i) == \"-\" && this.signum() == 0) {\r\n mi = true;\r\n }\r\n continue;\r\n }\r\n w = b * w + x;\r\n if (++j >= cs) {\r\n this.dMultiply(d);\r\n this.dAddOffset(w, 0);\r\n j = 0;\r\n w = 0;\r\n }\r\n }\r\n if (j > 0) {\r\n this.dMultiply(Math.pow(b, j));\r\n this.dAddOffset(w, 0);\r\n }\r\n if (mi) {\r\n BigInteger.ZERO.subTo(this, this);\r\n }\r\n };\r\n // BigInteger.prototype.fromNumber = bnpFromNumber;\r\n // (protected) alternate constructor\r\n BigInteger.prototype.fromNumber = function (a, b, c) {\r\n if (\"number\" == typeof b) {\r\n // new BigInteger(int,int,RNG)\r\n if (a < 2) {\r\n this.fromInt(1);\r\n }\r\n else {\r\n this.fromNumber(a, c);\r\n if (!this.testBit(a - 1)) {\r\n // force MSB set\r\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);\r\n }\r\n if (this.isEven()) {\r\n this.dAddOffset(1, 0);\r\n } // force odd\r\n while (!this.isProbablePrime(b)) {\r\n this.dAddOffset(2, 0);\r\n if (this.bitLength() > a) {\r\n this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // new BigInteger(int,RNG)\r\n var x = [];\r\n var t = a & 7;\r\n x.length = (a >> 3) + 1;\r\n b.nextBytes(x);\r\n if (t > 0) {\r\n x[0] &= ((1 << t) - 1);\r\n }\r\n else {\r\n x[0] = 0;\r\n }\r\n this.fromString(x, 256);\r\n }\r\n };\r\n // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\r\n // (protected) r = this op a (bitwise)\r\n BigInteger.prototype.bitwiseTo = function (a, op, r) {\r\n var i;\r\n var f;\r\n var m = Math.min(a.t, this.t);\r\n for (i = 0; i < m; ++i) {\r\n r[i] = op(this[i], a[i]);\r\n }\r\n if (a.t < this.t) {\r\n f = a.s & this.DM;\r\n for (i = m; i < this.t; ++i) {\r\n r[i] = op(this[i], f);\r\n }\r\n r.t = this.t;\r\n }\r\n else {\r\n f = this.s & this.DM;\r\n for (i = m; i < a.t; ++i) {\r\n r[i] = op(f, a[i]);\r\n }\r\n r.t = a.t;\r\n }\r\n r.s = op(this.s, a.s);\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.changeBit = bnpChangeBit;\r\n // (protected) this op (1<>= this.DB;\r\n }\r\n if (a.t < this.t) {\r\n c += a.s;\r\n while (i < this.t) {\r\n c += this[i];\r\n r[i++] = c & this.DM;\r\n c >>= this.DB;\r\n }\r\n c += this.s;\r\n }\r\n else {\r\n c += this.s;\r\n while (i < a.t) {\r\n c += a[i];\r\n r[i++] = c & this.DM;\r\n c >>= this.DB;\r\n }\r\n c += a.s;\r\n }\r\n r.s = (c < 0) ? -1 : 0;\r\n if (c > 0) {\r\n r[i++] = c;\r\n }\r\n else if (c < -1) {\r\n r[i++] = this.DV + c;\r\n }\r\n r.t = i;\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.dMultiply = bnpDMultiply;\r\n // (protected) this *= n, this >= 0, 1 < n < DV\r\n BigInteger.prototype.dMultiply = function (n) {\r\n this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\r\n ++this.t;\r\n this.clamp();\r\n };\r\n // BigInteger.prototype.dAddOffset = bnpDAddOffset;\r\n // (protected) this += n << w words, this >= 0\r\n BigInteger.prototype.dAddOffset = function (n, w) {\r\n if (n == 0) {\r\n return;\r\n }\r\n while (this.t <= w) {\r\n this[this.t++] = 0;\r\n }\r\n this[w] += n;\r\n while (this[w] >= this.DV) {\r\n this[w] -= this.DV;\r\n if (++w >= this.t) {\r\n this[this.t++] = 0;\r\n }\r\n ++this[w];\r\n }\r\n };\r\n // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\r\n // (protected) r = lower n words of \"this * a\", a.t <= n\r\n // \"this\" should be the larger one if appropriate.\r\n BigInteger.prototype.multiplyLowerTo = function (a, n, r) {\r\n var i = Math.min(this.t + a.t, n);\r\n r.s = 0; // assumes a,this >= 0\r\n r.t = i;\r\n while (i > 0) {\r\n r[--i] = 0;\r\n }\r\n for (var j = r.t - this.t; i < j; ++i) {\r\n r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\r\n }\r\n for (var j = Math.min(a.t, n); i < j; ++i) {\r\n this.am(0, a[i], r, i, 0, n - i);\r\n }\r\n r.clamp();\r\n };\r\n // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\r\n // (protected) r = \"this * a\" without lower n words, n > 0\r\n // \"this\" should be the larger one if appropriate.\r\n BigInteger.prototype.multiplyUpperTo = function (a, n, r) {\r\n --n;\r\n var i = r.t = this.t + a.t - n;\r\n r.s = 0; // assumes a,this >= 0\r\n while (--i >= 0) {\r\n r[i] = 0;\r\n }\r\n for (i = Math.max(n - this.t, 0); i < a.t; ++i) {\r\n r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\r\n }\r\n r.clamp();\r\n r.drShiftTo(1, r);\r\n };\r\n // BigInteger.prototype.modInt = bnpModInt;\r\n // (protected) this % n, n < 2^26\r\n BigInteger.prototype.modInt = function (n) {\r\n if (n <= 0) {\r\n return 0;\r\n }\r\n var d = this.DV % n;\r\n var r = (this.s < 0) ? n - 1 : 0;\r\n if (this.t > 0) {\r\n if (d == 0) {\r\n r = this[0] % n;\r\n }\r\n else {\r\n for (var i = this.t - 1; i >= 0; --i) {\r\n r = (d * r + this[i]) % n;\r\n }\r\n }\r\n }\r\n return r;\r\n };\r\n // BigInteger.prototype.millerRabin = bnpMillerRabin;\r\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\r\n BigInteger.prototype.millerRabin = function (t) {\r\n var n1 = this.subtract(BigInteger.ONE);\r\n var k = n1.getLowestSetBit();\r\n if (k <= 0) {\r\n return false;\r\n }\r\n var r = n1.shiftRight(k);\r\n t = (t + 1) >> 1;\r\n if (t > lowprimes.length) {\r\n t = lowprimes.length;\r\n }\r\n var a = nbi();\r\n for (var i = 0; i < t; ++i) {\r\n // Pick bases at random, instead of starting at 2\r\n a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\r\n var y = a.modPow(r, this);\r\n if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\r\n var j = 1;\r\n while (j++ < k && y.compareTo(n1) != 0) {\r\n y = y.modPowInt(2, this);\r\n if (y.compareTo(BigInteger.ONE) == 0) {\r\n return false;\r\n }\r\n }\r\n if (y.compareTo(n1) != 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n // BigInteger.prototype.square = bnSquare;\r\n // (public) this^2\r\n BigInteger.prototype.square = function () {\r\n var r = nbi();\r\n this.squareTo(r);\r\n return r;\r\n };\r\n //#region ASYNC\r\n // Public API method\r\n BigInteger.prototype.gcda = function (a, callback) {\r\n var x = (this.s < 0) ? this.negate() : this.clone();\r\n var y = (a.s < 0) ? a.negate() : a.clone();\r\n if (x.compareTo(y) < 0) {\r\n var t = x;\r\n x = y;\r\n y = t;\r\n }\r\n var i = x.getLowestSetBit();\r\n var g = y.getLowestSetBit();\r\n if (g < 0) {\r\n callback(x);\r\n return;\r\n }\r\n if (i < g) {\r\n g = i;\r\n }\r\n if (g > 0) {\r\n x.rShiftTo(g, x);\r\n y.rShiftTo(g, y);\r\n }\r\n // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.\r\n var gcda1 = function () {\r\n if ((i = x.getLowestSetBit()) > 0) {\r\n x.rShiftTo(i, x);\r\n }\r\n if ((i = y.getLowestSetBit()) > 0) {\r\n y.rShiftTo(i, y);\r\n }\r\n if (x.compareTo(y) >= 0) {\r\n x.subTo(y, x);\r\n x.rShiftTo(1, x);\r\n }\r\n else {\r\n y.subTo(x, y);\r\n y.rShiftTo(1, y);\r\n }\r\n if (!(x.signum() > 0)) {\r\n if (g > 0) {\r\n y.lShiftTo(g, y);\r\n }\r\n setTimeout(function () { callback(y); }, 0); // escape\r\n }\r\n else {\r\n setTimeout(gcda1, 0);\r\n }\r\n };\r\n setTimeout(gcda1, 10);\r\n };\r\n // (protected) alternate constructor\r\n BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {\r\n if (\"number\" == typeof b) {\r\n if (a < 2) {\r\n this.fromInt(1);\r\n }\r\n else {\r\n this.fromNumber(a, c);\r\n if (!this.testBit(a - 1)) {\r\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);\r\n }\r\n if (this.isEven()) {\r\n this.dAddOffset(1, 0);\r\n }\r\n var bnp_1 = this;\r\n var bnpfn1_1 = function () {\r\n bnp_1.dAddOffset(2, 0);\r\n if (bnp_1.bitLength() > a) {\r\n bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);\r\n }\r\n if (bnp_1.isProbablePrime(b)) {\r\n setTimeout(function () { callback(); }, 0); // escape\r\n }\r\n else {\r\n setTimeout(bnpfn1_1, 0);\r\n }\r\n };\r\n setTimeout(bnpfn1_1, 0);\r\n }\r\n }\r\n else {\r\n var x = [];\r\n var t = a & 7;\r\n x.length = (a >> 3) + 1;\r\n b.nextBytes(x);\r\n if (t > 0) {\r\n x[0] &= ((1 << t) - 1);\r\n }\r\n else {\r\n x[0] = 0;\r\n }\r\n this.fromString(x, 256);\r\n }\r\n };\r\n return BigInteger;\r\n}());\r\nexport { BigInteger };\r\n//#region REDUCERS\r\n//#region NullExp\r\nvar NullExp = /** @class */ (function () {\r\n function NullExp() {\r\n }\r\n // NullExp.prototype.convert = nNop;\r\n NullExp.prototype.convert = function (x) {\r\n return x;\r\n };\r\n // NullExp.prototype.revert = nNop;\r\n NullExp.prototype.revert = function (x) {\r\n return x;\r\n };\r\n // NullExp.prototype.mulTo = nMulTo;\r\n NullExp.prototype.mulTo = function (x, y, r) {\r\n x.multiplyTo(y, r);\r\n };\r\n // NullExp.prototype.sqrTo = nSqrTo;\r\n NullExp.prototype.sqrTo = function (x, r) {\r\n x.squareTo(r);\r\n };\r\n return NullExp;\r\n}());\r\n// Modular reduction using \"classic\" algorithm\r\nvar Classic = /** @class */ (function () {\r\n function Classic(m) {\r\n this.m = m;\r\n }\r\n // Classic.prototype.convert = cConvert;\r\n Classic.prototype.convert = function (x) {\r\n if (x.s < 0 || x.compareTo(this.m) >= 0) {\r\n return x.mod(this.m);\r\n }\r\n else {\r\n return x;\r\n }\r\n };\r\n // Classic.prototype.revert = cRevert;\r\n Classic.prototype.revert = function (x) {\r\n return x;\r\n };\r\n // Classic.prototype.reduce = cReduce;\r\n Classic.prototype.reduce = function (x) {\r\n x.divRemTo(this.m, null, x);\r\n };\r\n // Classic.prototype.mulTo = cMulTo;\r\n Classic.prototype.mulTo = function (x, y, r) {\r\n x.multiplyTo(y, r);\r\n this.reduce(r);\r\n };\r\n // Classic.prototype.sqrTo = cSqrTo;\r\n Classic.prototype.sqrTo = function (x, r) {\r\n x.squareTo(r);\r\n this.reduce(r);\r\n };\r\n return Classic;\r\n}());\r\n//#endregion\r\n//#region Montgomery\r\n// Montgomery reduction\r\nvar Montgomery = /** @class */ (function () {\r\n function Montgomery(m) {\r\n this.m = m;\r\n this.mp = m.invDigit();\r\n this.mpl = this.mp & 0x7fff;\r\n this.mph = this.mp >> 15;\r\n this.um = (1 << (m.DB - 15)) - 1;\r\n this.mt2 = 2 * m.t;\r\n }\r\n // Montgomery.prototype.convert = montConvert;\r\n // xR mod m\r\n Montgomery.prototype.convert = function (x) {\r\n var r = nbi();\r\n x.abs().dlShiftTo(this.m.t, r);\r\n r.divRemTo(this.m, null, r);\r\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\r\n this.m.subTo(r, r);\r\n }\r\n return r;\r\n };\r\n // Montgomery.prototype.revert = montRevert;\r\n // x/R mod m\r\n Montgomery.prototype.revert = function (x) {\r\n var r = nbi();\r\n x.copyTo(r);\r\n this.reduce(r);\r\n return r;\r\n };\r\n // Montgomery.prototype.reduce = montReduce;\r\n // x = x/R mod m (HAC 14.32)\r\n Montgomery.prototype.reduce = function (x) {\r\n while (x.t <= this.mt2) {\r\n // pad x so am has enough room later\r\n x[x.t++] = 0;\r\n }\r\n for (var i = 0; i < this.m.t; ++i) {\r\n // faster way of calculating u0 = x[i]*mp mod DV\r\n var j = x[i] & 0x7fff;\r\n var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\r\n // use am to combine the multiply-shift-add into one call\r\n j = i + this.m.t;\r\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\r\n // propagate carry\r\n while (x[j] >= x.DV) {\r\n x[j] -= x.DV;\r\n x[++j]++;\r\n }\r\n }\r\n x.clamp();\r\n x.drShiftTo(this.m.t, x);\r\n if (x.compareTo(this.m) >= 0) {\r\n x.subTo(this.m, x);\r\n }\r\n };\r\n // Montgomery.prototype.mulTo = montMulTo;\r\n // r = \"xy/R mod m\"; x,y != r\r\n Montgomery.prototype.mulTo = function (x, y, r) {\r\n x.multiplyTo(y, r);\r\n this.reduce(r);\r\n };\r\n // Montgomery.prototype.sqrTo = montSqrTo;\r\n // r = \"x^2/R mod m\"; x != r\r\n Montgomery.prototype.sqrTo = function (x, r) {\r\n x.squareTo(r);\r\n this.reduce(r);\r\n };\r\n return Montgomery;\r\n}());\r\n//#endregion Montgomery\r\n//#region Barrett\r\n// Barrett modular reduction\r\nvar Barrett = /** @class */ (function () {\r\n function Barrett(m) {\r\n this.m = m;\r\n // setup Barrett\r\n this.r2 = nbi();\r\n this.q3 = nbi();\r\n BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\r\n this.mu = this.r2.divide(m);\r\n }\r\n // Barrett.prototype.convert = barrettConvert;\r\n Barrett.prototype.convert = function (x) {\r\n if (x.s < 0 || x.t > 2 * this.m.t) {\r\n return x.mod(this.m);\r\n }\r\n else if (x.compareTo(this.m) < 0) {\r\n return x;\r\n }\r\n else {\r\n var r = nbi();\r\n x.copyTo(r);\r\n this.reduce(r);\r\n return r;\r\n }\r\n };\r\n // Barrett.prototype.revert = barrettRevert;\r\n Barrett.prototype.revert = function (x) {\r\n return x;\r\n };\r\n // Barrett.prototype.reduce = barrettReduce;\r\n // x = x mod m (HAC 14.42)\r\n Barrett.prototype.reduce = function (x) {\r\n x.drShiftTo(this.m.t - 1, this.r2);\r\n if (x.t > this.m.t + 1) {\r\n x.t = this.m.t + 1;\r\n x.clamp();\r\n }\r\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\r\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\r\n while (x.compareTo(this.r2) < 0) {\r\n x.dAddOffset(1, this.m.t + 1);\r\n }\r\n x.subTo(this.r2, x);\r\n while (x.compareTo(this.m) >= 0) {\r\n x.subTo(this.m, x);\r\n }\r\n };\r\n // Barrett.prototype.mulTo = barrettMulTo;\r\n // r = x*y mod m; x,y != r\r\n Barrett.prototype.mulTo = function (x, y, r) {\r\n x.multiplyTo(y, r);\r\n this.reduce(r);\r\n };\r\n // Barrett.prototype.sqrTo = barrettSqrTo;\r\n // r = x^2 mod m; x != r\r\n Barrett.prototype.sqrTo = function (x, r) {\r\n x.squareTo(r);\r\n this.reduce(r);\r\n };\r\n return Barrett;\r\n}());\r\n//#endregion\r\n//#endregion REDUCERS\r\n// return new, unset BigInteger\r\nexport function nbi() { return new BigInteger(null); }\r\nexport function parseBigInt(str, r) {\r\n return new BigInteger(str, r);\r\n}\r\n// am: Compute w_j += (x*this_i), propagate carries,\r\n// c is initial carry, returns final carry.\r\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\r\n// We need to select the fastest one that works in this environment.\r\nvar inBrowser = typeof navigator !== \"undefined\";\r\nif (inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\r\n // am2 avoids a big mult-and-extract completely.\r\n // Max digit bits should be <= 30 because we do bitwise ops\r\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\r\n BigInteger.prototype.am = function am2(i, x, w, j, c, n) {\r\n var xl = x & 0x7fff;\r\n var xh = x >> 15;\r\n while (--n >= 0) {\r\n var l = this[i] & 0x7fff;\r\n var h = this[i++] >> 15;\r\n var m = xh * l + h * xl;\r\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\r\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\r\n w[j++] = l & 0x3fffffff;\r\n }\r\n return c;\r\n };\r\n dbits = 30;\r\n}\r\nelse if (inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\r\n // am1: use a single mult and divide to get the high bits,\r\n // max digit bits should be 26 because\r\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\r\n BigInteger.prototype.am = function am1(i, x, w, j, c, n) {\r\n while (--n >= 0) {\r\n var v = x * this[i++] + w[j] + c;\r\n c = Math.floor(v / 0x4000000);\r\n w[j++] = v & 0x3ffffff;\r\n }\r\n return c;\r\n };\r\n dbits = 26;\r\n}\r\nelse { // Mozilla/Netscape seems to prefer am3\r\n // Alternately, set max digit bits to 28 since some\r\n // browsers slow down when dealing with 32-bit numbers.\r\n BigInteger.prototype.am = function am3(i, x, w, j, c, n) {\r\n var xl = x & 0x3fff;\r\n var xh = x >> 14;\r\n while (--n >= 0) {\r\n var l = this[i] & 0x3fff;\r\n var h = this[i++] >> 14;\r\n var m = xh * l + h * xl;\r\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\r\n c = (l >> 28) + (m >> 14) + xh * h;\r\n w[j++] = l & 0xfffffff;\r\n }\r\n return c;\r\n };\r\n dbits = 28;\r\n}\r\nBigInteger.prototype.DB = dbits;\r\nBigInteger.prototype.DM = ((1 << dbits) - 1);\r\nBigInteger.prototype.DV = (1 << dbits);\r\nvar BI_FP = 52;\r\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\r\nBigInteger.prototype.F1 = BI_FP - dbits;\r\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\r\n// Digit conversions\r\nvar BI_RC = [];\r\nvar rr;\r\nvar vv;\r\nrr = \"0\".charCodeAt(0);\r\nfor (vv = 0; vv <= 9; ++vv) {\r\n BI_RC[rr++] = vv;\r\n}\r\nrr = \"a\".charCodeAt(0);\r\nfor (vv = 10; vv < 36; ++vv) {\r\n BI_RC[rr++] = vv;\r\n}\r\nrr = \"A\".charCodeAt(0);\r\nfor (vv = 10; vv < 36; ++vv) {\r\n BI_RC[rr++] = vv;\r\n}\r\nexport function intAt(s, i) {\r\n var c = BI_RC[s.charCodeAt(i)];\r\n return (c == null) ? -1 : c;\r\n}\r\n// return bigint initialized to value\r\nexport function nbv(i) {\r\n var r = nbi();\r\n r.fromInt(i);\r\n return r;\r\n}\r\n// returns bit length of the integer x\r\nexport function nbits(x) {\r\n var r = 1;\r\n var t;\r\n if ((t = x >>> 16) != 0) {\r\n x = t;\r\n r += 16;\r\n }\r\n if ((t = x >> 8) != 0) {\r\n x = t;\r\n r += 8;\r\n }\r\n if ((t = x >> 4) != 0) {\r\n x = t;\r\n r += 4;\r\n }\r\n if ((t = x >> 2) != 0) {\r\n x = t;\r\n r += 2;\r\n }\r\n if ((t = x >> 1) != 0) {\r\n x = t;\r\n r += 1;\r\n }\r\n return r;\r\n}\r\n// \"constants\"\r\nBigInteger.ZERO = nbv(0);\r\nBigInteger.ONE = nbv(1);\r\n","// prng4.js - uses Arcfour as a PRNG\r\nvar Arcfour = /** @class */ (function () {\r\n function Arcfour() {\r\n this.i = 0;\r\n this.j = 0;\r\n this.S = [];\r\n }\r\n // Arcfour.prototype.init = ARC4init;\r\n // Initialize arcfour context from key, an array of ints, each from [0..255]\r\n Arcfour.prototype.init = function (key) {\r\n var i;\r\n var j;\r\n var t;\r\n for (i = 0; i < 256; ++i) {\r\n this.S[i] = i;\r\n }\r\n j = 0;\r\n for (i = 0; i < 256; ++i) {\r\n j = (j + this.S[i] + key[i % key.length]) & 255;\r\n t = this.S[i];\r\n this.S[i] = this.S[j];\r\n this.S[j] = t;\r\n }\r\n this.i = 0;\r\n this.j = 0;\r\n };\r\n // Arcfour.prototype.next = ARC4next;\r\n Arcfour.prototype.next = function () {\r\n var t;\r\n this.i = (this.i + 1) & 255;\r\n this.j = (this.j + this.S[this.i]) & 255;\r\n t = this.S[this.i];\r\n this.S[this.i] = this.S[this.j];\r\n this.S[this.j] = t;\r\n return this.S[(t + this.S[this.i]) & 255];\r\n };\r\n return Arcfour;\r\n}());\r\nexport { Arcfour };\r\n// Plug in your RNG constructor here\r\nexport function prng_newstate() {\r\n return new Arcfour();\r\n}\r\n// Pool size must be a multiple of 4 and greater than 32.\r\n// An array of bytes the size of the pool will be passed to init()\r\nexport var rng_psize = 256;\r\n","// Random number generator - requires a PRNG backend, e.g. prng4.js\r\nimport { prng_newstate, rng_psize } from \"./prng4\";\r\nvar rng_state;\r\nvar rng_pool = null;\r\nvar rng_pptr;\r\n// Initialize the pool with junk if needed.\r\nif (rng_pool == null) {\r\n rng_pool = [];\r\n rng_pptr = 0;\r\n var t = void 0;\r\n // Use mouse events for entropy, if we do not have enough entropy by the time\r\n // we need it, entropy will be generated by Math.random.\r\n var count = 0;\r\n var onMouseMoveListener = function (ev) {\r\n count = count || 0;\r\n if (count >= 256 || rng_pptr >= rng_psize) {\r\n return;\r\n }\r\n try {\r\n var mouseCoordinates = ev.x + ev.y;\r\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\r\n count += 1;\r\n }\r\n catch (e) {\r\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\r\n }\r\n };\r\n}\r\nfunction rng_get_byte() {\r\n if (rng_state == null) {\r\n rng_state = prng_newstate();\r\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\r\n while (rng_pptr < rng_psize) {\r\n var random = Math.floor(65536 * Math.random());\r\n rng_pool[rng_pptr++] = random & 255;\r\n }\r\n rng_state.init(rng_pool);\r\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\r\n rng_pool[rng_pptr] = 0;\r\n }\r\n rng_pptr = 0;\r\n }\r\n // TODO: allow reseeding after first request\r\n return rng_state.next();\r\n}\r\nvar SecureRandom = /** @class */ (function () {\r\n function SecureRandom() {\r\n }\r\n SecureRandom.prototype.nextBytes = function (ba) {\r\n for (var i = 0; i < ba.length; ++i) {\r\n ba[i] = rng_get_byte();\r\n }\r\n };\r\n return SecureRandom;\r\n}());\r\nexport { SecureRandom };\r\n","// Depends on jsbn.js and rng.js\r\n// Version 1.1: support utf-8 encoding in pkcs1pad2\r\n// convert a (hex) string to a bignum object\r\nimport { BigInteger, nbi, parseBigInt } from \"./jsbn\";\r\nimport { SecureRandom } from \"./rng\";\r\n// function linebrk(s,n) {\r\n// var ret = \"\";\r\n// var i = 0;\r\n// while(i + n < s.length) {\r\n// ret += s.substring(i,i+n) + \"\\n\";\r\n// i += n;\r\n// }\r\n// return ret + s.substring(i,s.length);\r\n// }\r\n// function byte2Hex(b) {\r\n// if(b < 0x10)\r\n// return \"0\" + b.toString(16);\r\n// else\r\n// return b.toString(16);\r\n// }\r\nfunction pkcs1pad1(s, n) {\r\n if (n < s.length + 22) {\r\n console.error(\"Message too long for RSA\");\r\n return null;\r\n }\r\n var len = n - s.length - 6;\r\n var filler = \"\";\r\n for (var f = 0; f < len; f += 2) {\r\n filler += \"ff\";\r\n }\r\n var m = \"0001\" + filler + \"00\" + s;\r\n return parseBigInt(m, 16);\r\n}\r\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\r\nfunction pkcs1pad2(s, n) {\r\n if (n < s.length + 11) { // TODO: fix for utf-8\r\n console.error(\"Message too long for RSA\");\r\n return null;\r\n }\r\n var ba = [];\r\n var i = s.length - 1;\r\n while (i >= 0 && n > 0) {\r\n var c = s.charCodeAt(i--);\r\n if (c < 128) { // encode using utf-8\r\n ba[--n] = c;\r\n }\r\n else if ((c > 127) && (c < 2048)) {\r\n ba[--n] = (c & 63) | 128;\r\n ba[--n] = (c >> 6) | 192;\r\n }\r\n else {\r\n ba[--n] = (c & 63) | 128;\r\n ba[--n] = ((c >> 6) & 63) | 128;\r\n ba[--n] = (c >> 12) | 224;\r\n }\r\n }\r\n ba[--n] = 0;\r\n var rng = new SecureRandom();\r\n var x = [];\r\n while (n > 2) { // random non-zero pad\r\n x[0] = 0;\r\n while (x[0] == 0) {\r\n rng.nextBytes(x);\r\n }\r\n ba[--n] = x[0];\r\n }\r\n ba[--n] = 2;\r\n ba[--n] = 0;\r\n return new BigInteger(ba);\r\n}\r\n// \"empty\" RSA key constructor\r\nvar RSAKey = /** @class */ (function () {\r\n function RSAKey() {\r\n this.n = null;\r\n this.e = 0;\r\n this.d = null;\r\n this.p = null;\r\n this.q = null;\r\n this.dmp1 = null;\r\n this.dmq1 = null;\r\n this.coeff = null;\r\n }\r\n //#region PROTECTED\r\n // protected\r\n // RSAKey.prototype.doPublic = RSADoPublic;\r\n // Perform raw public operation on \"x\": return x^e (mod n)\r\n RSAKey.prototype.doPublic = function (x) {\r\n return x.modPowInt(this.e, this.n);\r\n };\r\n // RSAKey.prototype.doPrivate = RSADoPrivate;\r\n // Perform raw private operation on \"x\": return x^d (mod n)\r\n RSAKey.prototype.doPrivate = function (x) {\r\n if (this.p == null || this.q == null) {\r\n return x.modPow(this.d, this.n);\r\n }\r\n // TODO: re-calculate any missing CRT params\r\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\r\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\r\n while (xp.compareTo(xq) < 0) {\r\n xp = xp.add(this.p);\r\n }\r\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\r\n };\r\n //#endregion PROTECTED\r\n //#region PUBLIC\r\n // RSAKey.prototype.setPublic = RSASetPublic;\r\n // Set the public key fields N and e from hex strings\r\n RSAKey.prototype.setPublic = function (N, E) {\r\n if (N != null && E != null && N.length > 0 && E.length > 0) {\r\n this.n = parseBigInt(N, 16);\r\n this.e = parseInt(E, 16);\r\n }\r\n else {\r\n console.error(\"Invalid RSA public key\");\r\n }\r\n };\r\n // RSAKey.prototype.encrypt = RSAEncrypt;\r\n // Return the PKCS#1 RSA encryption of \"text\" as an even-length hex string\r\n RSAKey.prototype.encrypt = function (text) {\r\n var maxLength = (this.n.bitLength() + 7) >> 3;\r\n var m = pkcs1pad2(text, maxLength);\r\n if (m == null) {\r\n return null;\r\n }\r\n var c = this.doPublic(m);\r\n if (c == null) {\r\n return null;\r\n }\r\n var h = c.toString(16);\r\n var length = h.length;\r\n // fix zero before result\r\n for (var i = 0; i < maxLength * 2 - length; i++) {\r\n h = \"0\" + h;\r\n }\r\n return h;\r\n };\r\n // RSAKey.prototype.setPrivate = RSASetPrivate;\r\n // Set the private key fields N, e, and d from hex strings\r\n RSAKey.prototype.setPrivate = function (N, E, D) {\r\n if (N != null && E != null && N.length > 0 && E.length > 0) {\r\n this.n = parseBigInt(N, 16);\r\n this.e = parseInt(E, 16);\r\n this.d = parseBigInt(D, 16);\r\n }\r\n else {\r\n console.error(\"Invalid RSA private key\");\r\n }\r\n };\r\n // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;\r\n // Set the private key fields N, e, d and CRT params from hex strings\r\n RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {\r\n if (N != null && E != null && N.length > 0 && E.length > 0) {\r\n this.n = parseBigInt(N, 16);\r\n this.e = parseInt(E, 16);\r\n this.d = parseBigInt(D, 16);\r\n this.p = parseBigInt(P, 16);\r\n this.q = parseBigInt(Q, 16);\r\n this.dmp1 = parseBigInt(DP, 16);\r\n this.dmq1 = parseBigInt(DQ, 16);\r\n this.coeff = parseBigInt(C, 16);\r\n }\r\n else {\r\n console.error(\"Invalid RSA private key\");\r\n }\r\n };\r\n // RSAKey.prototype.generate = RSAGenerate;\r\n // Generate a new random private key B bits long, using public expt E\r\n RSAKey.prototype.generate = function (B, E) {\r\n var rng = new SecureRandom();\r\n var qs = B >> 1;\r\n this.e = parseInt(E, 16);\r\n var ee = new BigInteger(E, 16);\r\n for (;;) {\r\n for (;;) {\r\n this.p = new BigInteger(B - qs, 1, rng);\r\n if (this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\r\n break;\r\n }\r\n }\r\n for (;;) {\r\n this.q = new BigInteger(qs, 1, rng);\r\n if (this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\r\n break;\r\n }\r\n }\r\n if (this.p.compareTo(this.q) <= 0) {\r\n var t = this.p;\r\n this.p = this.q;\r\n this.q = t;\r\n }\r\n var p1 = this.p.subtract(BigInteger.ONE);\r\n var q1 = this.q.subtract(BigInteger.ONE);\r\n var phi = p1.multiply(q1);\r\n if (phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {\r\n this.n = this.p.multiply(this.q);\r\n this.d = ee.modInverse(phi);\r\n this.dmp1 = this.d.mod(p1);\r\n this.dmq1 = this.d.mod(q1);\r\n this.coeff = this.q.modInverse(this.p);\r\n break;\r\n }\r\n }\r\n };\r\n // RSAKey.prototype.decrypt = RSADecrypt;\r\n // Return the PKCS#1 RSA decryption of \"ctext\".\r\n // \"ctext\" is an even-length hex string and the output is a plain string.\r\n RSAKey.prototype.decrypt = function (ctext) {\r\n var c = parseBigInt(ctext, 16);\r\n var m = this.doPrivate(c);\r\n if (m == null) {\r\n return null;\r\n }\r\n return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);\r\n };\r\n // Generate a new random private key B bits long, using public expt E\r\n RSAKey.prototype.generateAsync = function (B, E, callback) {\r\n var rng = new SecureRandom();\r\n var qs = B >> 1;\r\n this.e = parseInt(E, 16);\r\n var ee = new BigInteger(E, 16);\r\n var rsa = this;\r\n // These functions have non-descript names because they were originally for(;;) loops.\r\n // I don't know about cryptography to give them better names than loop1-4.\r\n var loop1 = function () {\r\n var loop4 = function () {\r\n if (rsa.p.compareTo(rsa.q) <= 0) {\r\n var t = rsa.p;\r\n rsa.p = rsa.q;\r\n rsa.q = t;\r\n }\r\n var p1 = rsa.p.subtract(BigInteger.ONE);\r\n var q1 = rsa.q.subtract(BigInteger.ONE);\r\n var phi = p1.multiply(q1);\r\n if (phi.gcd(ee).compareTo(BigInteger.ONE) == 0) {\r\n rsa.n = rsa.p.multiply(rsa.q);\r\n rsa.d = ee.modInverse(phi);\r\n rsa.dmp1 = rsa.d.mod(p1);\r\n rsa.dmq1 = rsa.d.mod(q1);\r\n rsa.coeff = rsa.q.modInverse(rsa.p);\r\n setTimeout(function () { callback(); }, 0); // escape\r\n }\r\n else {\r\n setTimeout(loop1, 0);\r\n }\r\n };\r\n var loop3 = function () {\r\n rsa.q = nbi();\r\n rsa.q.fromNumberAsync(qs, 1, rng, function () {\r\n rsa.q.subtract(BigInteger.ONE).gcda(ee, function (r) {\r\n if (r.compareTo(BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {\r\n setTimeout(loop4, 0);\r\n }\r\n else {\r\n setTimeout(loop3, 0);\r\n }\r\n });\r\n });\r\n };\r\n var loop2 = function () {\r\n rsa.p = nbi();\r\n rsa.p.fromNumberAsync(B - qs, 1, rng, function () {\r\n rsa.p.subtract(BigInteger.ONE).gcda(ee, function (r) {\r\n if (r.compareTo(BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {\r\n setTimeout(loop3, 0);\r\n }\r\n else {\r\n setTimeout(loop2, 0);\r\n }\r\n });\r\n });\r\n };\r\n setTimeout(loop2, 0);\r\n };\r\n setTimeout(loop1, 0);\r\n };\r\n RSAKey.prototype.sign = function (text, digestMethod, digestName) {\r\n var header = getDigestHeader(digestName);\r\n var digest = header + digestMethod(text).toString();\r\n var m = pkcs1pad1(digest, this.n.bitLength() / 4);\r\n if (m == null) {\r\n return null;\r\n }\r\n var c = this.doPrivate(m);\r\n if (c == null) {\r\n return null;\r\n }\r\n var h = c.toString(16);\r\n if ((h.length & 1) == 0) {\r\n return h;\r\n }\r\n else {\r\n return \"0\" + h;\r\n }\r\n };\r\n RSAKey.prototype.verify = function (text, signature, digestMethod) {\r\n var c = parseBigInt(signature, 16);\r\n var m = this.doPublic(c);\r\n if (m == null) {\r\n return null;\r\n }\r\n var unpadded = m.toString(16).replace(/^1f+00/, \"\");\r\n var digest = removeDigestHeader(unpadded);\r\n return digest == digestMethod(text).toString();\r\n };\r\n RSAKey.prototype.encryptLong = function (text) {\r\n var _this = this;\r\n var res = '';\r\n var maxLen = ((this.n.bitLength() + 7) >> 3) - 11;\r\n var textArr = this.setSplitChn(text, maxLen);\r\n textArr.forEach(function (v) {\r\n res += _this.encrypt(v);\r\n });\r\n return res;\r\n };\r\n RSAKey.prototype.decryptLong = function (ctext) {\r\n var res = '';\r\n var maxLen = (this.n.bitLength() + 7) >> 3;\r\n var splitMaxLen = maxLen * 2;\r\n if (ctext.length > splitMaxLen) {\r\n var ctextArr = ctext.match(new RegExp('.{1,' + splitMaxLen + '}', 'g')) || [];\r\n var mArr = [];\r\n for (var i = 0; i < ctextArr.length; i++) {\r\n var c = parseBigInt(ctextArr[i], 16);\r\n var m = this.doPrivate(c);\r\n if (m == null) {\r\n return null;\r\n }\r\n mArr.push(m);\r\n }\r\n res = pkcs1unpad2Long(mArr, maxLen);\r\n }\r\n else {\r\n res = this.decrypt(ctext);\r\n }\r\n return res;\r\n };\r\n RSAKey.prototype.setSplitChn = function (str, maxLen, res) {\r\n if (res === void 0) { res = []; }\r\n var arr = str.split('');\r\n var len = 0;\r\n for (var i = 0; i < arr.length; i++) {\r\n var charCode = arr[i].charCodeAt(0);\r\n if (charCode <= 0x007f) {\r\n len += 1;\r\n }\r\n else if (charCode <= 0x07ff) {\r\n len += 2;\r\n }\r\n else if (charCode <= 0xffff) {\r\n len += 3;\r\n }\r\n else {\r\n len += 4;\r\n }\r\n if (len > maxLen) {\r\n var currentStr = str.substring(0, i);\r\n res.push(currentStr);\r\n return this.setSplitChn(str.substring(i), maxLen, res);\r\n }\r\n }\r\n res.push(str);\r\n return res;\r\n };\r\n return RSAKey;\r\n}());\r\nexport { RSAKey };\r\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\r\nfunction pkcs1unpad2(d, n) {\r\n var b = d.toByteArray();\r\n var i = 0;\r\n while (i < b.length && b[i] == 0) {\r\n ++i;\r\n }\r\n if (b.length - i != n - 1 || b[i] != 2) {\r\n return null;\r\n }\r\n ++i;\r\n while (b[i] != 0) {\r\n if (++i >= b.length) {\r\n return null;\r\n }\r\n }\r\n var ret = \"\";\r\n while (++i < b.length) {\r\n var c = b[i] & 255;\r\n if (c < 128) { // utf-8 decode\r\n ret += String.fromCharCode(c);\r\n }\r\n else if ((c > 191) && (c < 224)) {\r\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\r\n ++i;\r\n }\r\n else {\r\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\r\n i += 2;\r\n }\r\n }\r\n return ret;\r\n}\r\nfunction pkcs1unpad2Long(dArr, n) {\r\n var bArr = [];\r\n for (var j = 0; j < dArr.length; j++) {\r\n var d = dArr[j];\r\n var b_1 = d.toByteArray();\r\n var i_1 = 0;\r\n while (i_1 < b_1.length && b_1[i_1] == 0) {\r\n ++i_1;\r\n }\r\n if (b_1.length - i_1 != n - 1 || b_1[i_1] != 2) {\r\n return null;\r\n }\r\n ++i_1;\r\n while (b_1[i_1] != 0) {\r\n if (++i_1 >= b_1.length) {\r\n return null;\r\n }\r\n }\r\n bArr = bArr.concat(b_1.slice(i_1 + 1));\r\n }\r\n var b = bArr;\r\n var i = -1;\r\n var ret = \"\";\r\n while (++i < b.length) {\r\n var c = b[i] & 255;\r\n if (c < 128) { // utf-8 decode\r\n ret += String.fromCharCode(c);\r\n }\r\n else if ((c > 191) && (c < 224)) {\r\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\r\n ++i;\r\n }\r\n else {\r\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\r\n i += 2;\r\n }\r\n }\r\n return ret;\r\n}\r\n// https://tools.ietf.org/html/rfc3447#page-43\r\nvar DIGEST_HEADERS = {\r\n md2: \"3020300c06082a864886f70d020205000410\",\r\n md5: \"3020300c06082a864886f70d020505000410\",\r\n sha1: \"3021300906052b0e03021a05000414\",\r\n sha224: \"302d300d06096086480165030402040500041c\",\r\n sha256: \"3031300d060960864801650304020105000420\",\r\n sha384: \"3041300d060960864801650304020205000430\",\r\n sha512: \"3051300d060960864801650304020305000440\",\r\n ripemd160: \"3021300906052b2403020105000414\"\r\n};\r\nfunction getDigestHeader(name) {\r\n return DIGEST_HEADERS[name] || \"\";\r\n}\r\nfunction removeDigestHeader(str) {\r\n for (var name_1 in DIGEST_HEADERS) {\r\n if (DIGEST_HEADERS.hasOwnProperty(name_1)) {\r\n var header = DIGEST_HEADERS[name_1];\r\n var len = header.length;\r\n if (str.substr(0, len) == header) {\r\n return str.substr(len);\r\n }\r\n }\r\n }\r\n return str;\r\n}\r\n// Return the PKCS#1 RSA encryption of \"text\" as a Base64-encoded string\r\n// function RSAEncryptB64(text) {\r\n// var h = this.encrypt(text);\r\n// if(h) return hex2b64(h); else return null;\r\n// }\r\n// public\r\n// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\r\n","/*!\r\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\r\nCode licensed under the BSD License:\r\nhttp://developer.yahoo.com/yui/license.html\r\nversion: 2.9.0\r\n*/\r\nexport var YAHOO = {};\r\nYAHOO.lang = {\r\n /**\r\n * Utility to set up the prototype, constructor and superclass properties to\r\n * support an inheritance strategy that can chain constructors and methods.\r\n * Static members will not be inherited.\r\n *\r\n * @method extend\r\n * @static\r\n * @param {Function} subc the object to modify\r\n * @param {Function} superc the object to inherit\r\n * @param {Object} overrides additional properties/methods to add to the\r\n * subclass prototype. These will override the\r\n * matching items obtained from the superclass\r\n * if present.\r\n */\r\n extend: function (subc, superc, overrides) {\r\n if (!superc || !subc) {\r\n throw new Error(\"YAHOO.lang.extend failed, please check that \" +\r\n \"all dependencies are included.\");\r\n }\r\n var F = function () { };\r\n F.prototype = superc.prototype;\r\n subc.prototype = new F();\r\n subc.prototype.constructor = subc;\r\n subc.superclass = superc.prototype;\r\n if (superc.prototype.constructor == Object.prototype.constructor) {\r\n superc.prototype.constructor = superc;\r\n }\r\n if (overrides) {\r\n var i;\r\n for (i in overrides) {\r\n subc.prototype[i] = overrides[i];\r\n }\r\n /*\r\n * IE will not enumerate native functions in a derived object even if the\r\n * function was overridden. This is a workaround for specific functions\r\n * we care about on the Object prototype.\r\n * @property _IEEnumFix\r\n * @param {Function} r the object to receive the augmentation\r\n * @param {Function} s the object that supplies the properties to augment\r\n * @static\r\n * @private\r\n */\r\n var _IEEnumFix = function () { }, ADD = [\"toString\", \"valueOf\"];\r\n try {\r\n if (/MSIE/.test(navigator.userAgent)) {\r\n _IEEnumFix = function (r, s) {\r\n for (i = 0; i < ADD.length; i = i + 1) {\r\n var fname = ADD[i], f = s[fname];\r\n if (typeof f === 'function' && f != Object.prototype[fname]) {\r\n r[fname] = f;\r\n }\r\n }\r\n };\r\n }\r\n }\r\n catch (ex) { }\r\n ;\r\n _IEEnumFix(subc.prototype, overrides);\r\n }\r\n }\r\n};\r\n","/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license\r\n */\r\n/*\r\n * asn1.js - ASN.1 DER encoder classes\r\n *\r\n * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)\r\n *\r\n * This software is licensed under the terms of the MIT License.\r\n * https://kjur.github.io/jsrsasign/license\r\n *\r\n * The above copyright and license notice shall be\r\n * included in all copies or substantial portions of the Software.\r\n */\r\nimport { BigInteger } from \"../jsbn/jsbn\";\r\nimport { YAHOO } from \"./yahoo\";\r\n/**\r\n * @fileOverview\r\n * @name asn1-1.0.js\r\n * @author Kenji Urushima kenji.urushima@gmail.com\r\n * @version asn1 1.0.13 (2017-Jun-02)\r\n * @since jsrsasign 2.1\r\n * @license MIT License\r\n */\r\n/**\r\n * kjur's class library name space\r\n *

\r\n * This name space provides following name spaces:\r\n *

    \r\n *
  • {@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder
  • \r\n *
  • {@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL
  • \r\n *
  • {@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature\r\n * class and utilities
  • \r\n *
\r\n *

\r\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\r\n * @name KJUR\r\n * @namespace kjur's class library name space\r\n */\r\nexport var KJUR = {};\r\n/**\r\n * kjur's ASN.1 class library name space\r\n *

\r\n * This is ITU-T X.690 ASN.1 DER encoder class library and\r\n * class structure and methods is very similar to\r\n * org.bouncycastle.asn1 package of\r\n * well known BouncyCaslte Cryptography Library.\r\n *

PROVIDING ASN.1 PRIMITIVES

\r\n * Here are ASN.1 DER primitive classes.\r\n *
    \r\n *
  • 0x01 {@link KJUR.asn1.DERBoolean}
  • \r\n *
  • 0x02 {@link KJUR.asn1.DERInteger}
  • \r\n *
  • 0x03 {@link KJUR.asn1.DERBitString}
  • \r\n *
  • 0x04 {@link KJUR.asn1.DEROctetString}
  • \r\n *
  • 0x05 {@link KJUR.asn1.DERNull}
  • \r\n *
  • 0x06 {@link KJUR.asn1.DERObjectIdentifier}
  • \r\n *
  • 0x0a {@link KJUR.asn1.DEREnumerated}
  • \r\n *
  • 0x0c {@link KJUR.asn1.DERUTF8String}
  • \r\n *
  • 0x12 {@link KJUR.asn1.DERNumericString}
  • \r\n *
  • 0x13 {@link KJUR.asn1.DERPrintableString}
  • \r\n *
  • 0x14 {@link KJUR.asn1.DERTeletexString}
  • \r\n *
  • 0x16 {@link KJUR.asn1.DERIA5String}
  • \r\n *
  • 0x17 {@link KJUR.asn1.DERUTCTime}
  • \r\n *
  • 0x18 {@link KJUR.asn1.DERGeneralizedTime}
  • \r\n *
  • 0x30 {@link KJUR.asn1.DERSequence}
  • \r\n *
  • 0x31 {@link KJUR.asn1.DERSet}
  • \r\n *
\r\n *

OTHER ASN.1 CLASSES

\r\n *
    \r\n *
  • {@link KJUR.asn1.ASN1Object}
  • \r\n *
  • {@link KJUR.asn1.DERAbstractString}
  • \r\n *
  • {@link KJUR.asn1.DERAbstractTime}
  • \r\n *
  • {@link KJUR.asn1.DERAbstractStructured}
  • \r\n *
  • {@link KJUR.asn1.DERTaggedObject}
  • \r\n *
\r\n *

SUB NAME SPACES

\r\n *
    \r\n *
  • {@link KJUR.asn1.cades} - CAdES long term signature format
  • \r\n *
  • {@link KJUR.asn1.cms} - Cryptographic Message Syntax
  • \r\n *
  • {@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)
  • \r\n *
  • {@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format
  • \r\n *
  • {@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL
  • \r\n *
\r\n *

\r\n * NOTE: Please ignore method summary and document of this namespace.\r\n * This caused by a bug of jsdoc2.\r\n * @name KJUR.asn1\r\n * @namespace\r\n */\r\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1)\r\n KJUR.asn1 = {};\r\n/**\r\n * ASN1 utilities class\r\n * @name KJUR.asn1.ASN1Util\r\n * @class ASN1 utilities class\r\n * @since asn1 1.0.2\r\n */\r\nKJUR.asn1.ASN1Util = new function () {\r\n this.integerToByteHex = function (i) {\r\n var h = i.toString(16);\r\n if ((h.length % 2) == 1)\r\n h = '0' + h;\r\n return h;\r\n };\r\n this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {\r\n var h = bigIntegerValue.toString(16);\r\n if (h.substr(0, 1) != '-') {\r\n if (h.length % 2 == 1) {\r\n h = '0' + h;\r\n }\r\n else {\r\n if (!h.match(/^[0-7]/)) {\r\n h = '00' + h;\r\n }\r\n }\r\n }\r\n else {\r\n var hPos = h.substr(1);\r\n var xorLen = hPos.length;\r\n if (xorLen % 2 == 1) {\r\n xorLen += 1;\r\n }\r\n else {\r\n if (!h.match(/^[0-7]/)) {\r\n xorLen += 2;\r\n }\r\n }\r\n var hMask = '';\r\n for (var i = 0; i < xorLen; i++) {\r\n hMask += 'f';\r\n }\r\n var biMask = new BigInteger(hMask, 16);\r\n var biNeg = biMask.xor(bigIntegerValue).add(BigInteger.ONE);\r\n h = biNeg.toString(16).replace(/^-/, '');\r\n }\r\n return h;\r\n };\r\n /**\r\n * get PEM string from hexadecimal data and header string\r\n * @name getPEMStringFromHex\r\n * @memberOf KJUR.asn1.ASN1Util\r\n * @function\r\n * @param {String} dataHex hexadecimal string of PEM body\r\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\r\n * @return {String} PEM formatted string of input data\r\n * @description\r\n * This method converts a hexadecimal string to a PEM string with\r\n * a specified header. Its line break will be CRLF(\"\\r\\n\").\r\n * @example\r\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\r\n * // value of pem will be:\r\n * -----BEGIN PRIVATE KEY-----\r\n * YWFh\r\n * -----END PRIVATE KEY-----\r\n */\r\n this.getPEMStringFromHex = function (dataHex, pemHeader) {\r\n return hextopem(dataHex, pemHeader);\r\n };\r\n /**\r\n * generate ASN1Object specifed by JSON parameters\r\n * @name newObject\r\n * @memberOf KJUR.asn1.ASN1Util\r\n * @function\r\n * @param {Array} param JSON parameter to generate ASN1Object\r\n * @return {KJUR.asn1.ASN1Object} generated object\r\n * @since asn1 1.0.3\r\n * @description\r\n * generate any ASN1Object specified by JSON param\r\n * including ASN.1 primitive or structured.\r\n * Generally 'param' can be described as follows:\r\n *
\r\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\r\n *
\r\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\r\n *
    \r\n *
  • 'bool' - DERBoolean
  • \r\n *
  • 'int' - DERInteger
  • \r\n *
  • 'bitstr' - DERBitString
  • \r\n *
  • 'octstr' - DEROctetString
  • \r\n *
  • 'null' - DERNull
  • \r\n *
  • 'oid' - DERObjectIdentifier
  • \r\n *
  • 'enum' - DEREnumerated
  • \r\n *
  • 'utf8str' - DERUTF8String
  • \r\n *
  • 'numstr' - DERNumericString
  • \r\n *
  • 'prnstr' - DERPrintableString
  • \r\n *
  • 'telstr' - DERTeletexString
  • \r\n *
  • 'ia5str' - DERIA5String
  • \r\n *
  • 'utctime' - DERUTCTime
  • \r\n *
  • 'gentime' - DERGeneralizedTime
  • \r\n *
  • 'seq' - DERSequence
  • \r\n *
  • 'set' - DERSet
  • \r\n *
  • 'tag' - DERTaggedObject
  • \r\n *
\r\n * @example\r\n * newObject({'prnstr': 'aaa'});\r\n * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})\r\n * // ASN.1 Tagged Object\r\n * newObject({'tag': {'tag': 'a1',\r\n * 'explicit': true,\r\n * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});\r\n * // more simple representation of ASN.1 Tagged Object\r\n * newObject({'tag': ['a1',\r\n * true,\r\n * {'seq': [\r\n * {'int': 3},\r\n * {'prnstr': 'aaa'}]}\r\n * ]});\r\n */\r\n this.newObject = function (param) {\r\n var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;\r\n var keys = Object.keys(param);\r\n if (keys.length != 1)\r\n throw \"key of param shall be only one.\";\r\n var key = keys[0];\r\n if (\":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:\".indexOf(\":\" + key + \":\") == -1)\r\n throw \"undefined key: \" + key;\r\n if (key == \"bool\")\r\n return new _DERBoolean(param[key]);\r\n if (key == \"int\")\r\n return new _DERInteger(param[key]);\r\n if (key == \"bitstr\")\r\n return new _DERBitString(param[key]);\r\n if (key == \"octstr\")\r\n return new _DEROctetString(param[key]);\r\n if (key == \"null\")\r\n return new _DERNull(param[key]);\r\n if (key == \"oid\")\r\n return new _DERObjectIdentifier(param[key]);\r\n if (key == \"enum\")\r\n return new _DEREnumerated(param[key]);\r\n if (key == \"utf8str\")\r\n return new _DERUTF8String(param[key]);\r\n if (key == \"numstr\")\r\n return new _DERNumericString(param[key]);\r\n if (key == \"prnstr\")\r\n return new _DERPrintableString(param[key]);\r\n if (key == \"telstr\")\r\n return new _DERTeletexString(param[key]);\r\n if (key == \"ia5str\")\r\n return new _DERIA5String(param[key]);\r\n if (key == \"utctime\")\r\n return new _DERUTCTime(param[key]);\r\n if (key == \"gentime\")\r\n return new _DERGeneralizedTime(param[key]);\r\n if (key == \"seq\") {\r\n var paramList = param[key];\r\n var a = [];\r\n for (var i = 0; i < paramList.length; i++) {\r\n var asn1Obj = _newObject(paramList[i]);\r\n a.push(asn1Obj);\r\n }\r\n return new _DERSequence({ 'array': a });\r\n }\r\n if (key == \"set\") {\r\n var paramList = param[key];\r\n var a = [];\r\n for (var i = 0; i < paramList.length; i++) {\r\n var asn1Obj = _newObject(paramList[i]);\r\n a.push(asn1Obj);\r\n }\r\n return new _DERSet({ 'array': a });\r\n }\r\n if (key == \"tag\") {\r\n var tagParam = param[key];\r\n if (Object.prototype.toString.call(tagParam) === '[object Array]' &&\r\n tagParam.length == 3) {\r\n var obj = _newObject(tagParam[2]);\r\n return new _DERTaggedObject({ tag: tagParam[0],\r\n explicit: tagParam[1],\r\n obj: obj });\r\n }\r\n else {\r\n var newParam = {};\r\n if (tagParam.explicit !== undefined)\r\n newParam.explicit = tagParam.explicit;\r\n if (tagParam.tag !== undefined)\r\n newParam.tag = tagParam.tag;\r\n if (tagParam.obj === undefined)\r\n throw \"obj shall be specified for 'tag'.\";\r\n newParam.obj = _newObject(tagParam.obj);\r\n return new _DERTaggedObject(newParam);\r\n }\r\n }\r\n };\r\n /**\r\n * get encoded hexadecimal string of ASN1Object specifed by JSON parameters\r\n * @name jsonToASN1HEX\r\n * @memberOf KJUR.asn1.ASN1Util\r\n * @function\r\n * @param {Array} param JSON parameter to generate ASN1Object\r\n * @return hexadecimal string of ASN1Object\r\n * @since asn1 1.0.4\r\n * @description\r\n * As for ASN.1 object representation of JSON object,\r\n * please see {@link newObject}.\r\n * @example\r\n * jsonToASN1HEX({'prnstr': 'aaa'});\r\n */\r\n this.jsonToASN1HEX = function (param) {\r\n var asn1Obj = this.newObject(param);\r\n return asn1Obj.getEncodedHex();\r\n };\r\n};\r\n/**\r\n * get dot noted oid number string from hexadecimal value of OID\r\n * @name oidHexToInt\r\n * @memberOf KJUR.asn1.ASN1Util\r\n * @function\r\n * @param {String} hex hexadecimal value of object identifier\r\n * @return {String} dot noted string of object identifier\r\n * @since jsrsasign 4.8.3 asn1 1.0.7\r\n * @description\r\n * This static method converts from hexadecimal string representation of\r\n * ASN.1 value of object identifier to oid number string.\r\n * @example\r\n * KJUR.asn1.ASN1Util.oidHexToInt('550406') → \"2.5.4.6\"\r\n */\r\nKJUR.asn1.ASN1Util.oidHexToInt = function (hex) {\r\n var s = \"\";\r\n var i01 = parseInt(hex.substr(0, 2), 16);\r\n var i0 = Math.floor(i01 / 40);\r\n var i1 = i01 % 40;\r\n var s = i0 + \".\" + i1;\r\n var binbuf = \"\";\r\n for (var i = 2; i < hex.length; i += 2) {\r\n var value = parseInt(hex.substr(i, 2), 16);\r\n var bin = (\"00000000\" + value.toString(2)).slice(-8);\r\n binbuf = binbuf + bin.substr(1, 7);\r\n if (bin.substr(0, 1) == \"0\") {\r\n var bi = new BigInteger(binbuf, 2);\r\n s = s + \".\" + bi.toString(10);\r\n binbuf = \"\";\r\n }\r\n }\r\n ;\r\n return s;\r\n};\r\n/**\r\n * get hexadecimal value of object identifier from dot noted oid value\r\n * @name oidIntToHex\r\n * @memberOf KJUR.asn1.ASN1Util\r\n * @function\r\n * @param {String} oidString dot noted string of object identifier\r\n * @return {String} hexadecimal value of object identifier\r\n * @since jsrsasign 4.8.3 asn1 1.0.7\r\n * @description\r\n * This static method converts from object identifier value string.\r\n * to hexadecimal string representation of it.\r\n * @example\r\n * KJUR.asn1.ASN1Util.oidIntToHex(\"2.5.4.6\") → \"550406\"\r\n */\r\nKJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {\r\n var itox = function (i) {\r\n var h = i.toString(16);\r\n if (h.length == 1)\r\n h = '0' + h;\r\n return h;\r\n };\r\n var roidtox = function (roid) {\r\n var h = '';\r\n var bi = new BigInteger(roid, 10);\r\n var b = bi.toString(2);\r\n var padLen = 7 - b.length % 7;\r\n if (padLen == 7)\r\n padLen = 0;\r\n var bPad = '';\r\n for (var i = 0; i < padLen; i++)\r\n bPad += '0';\r\n b = bPad + b;\r\n for (var i = 0; i < b.length - 1; i += 7) {\r\n var b8 = b.substr(i, 7);\r\n if (i != b.length - 7)\r\n b8 = '1' + b8;\r\n h += itox(parseInt(b8, 2));\r\n }\r\n return h;\r\n };\r\n if (!oidString.match(/^[0-9.]+$/)) {\r\n throw \"malformed oid string: \" + oidString;\r\n }\r\n var h = '';\r\n var a = oidString.split('.');\r\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\r\n h += itox(i0);\r\n a.splice(0, 2);\r\n for (var i = 0; i < a.length; i++) {\r\n h += roidtox(a[i]);\r\n }\r\n return h;\r\n};\r\n// ********************************************************************\r\n// Abstract ASN.1 Classes\r\n// ********************************************************************\r\n// ********************************************************************\r\n/**\r\n * base class for ASN.1 DER encoder object\r\n * @name KJUR.asn1.ASN1Object\r\n * @class base class for ASN.1 DER encoder object\r\n * @property {Boolean} isModified flag whether internal data was changed\r\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\r\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\r\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\r\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\r\n * @description\r\n */\r\nKJUR.asn1.ASN1Object = function () {\r\n var isModified = true;\r\n var hTLV = null;\r\n var hT = '00';\r\n var hL = '00';\r\n var hV = '';\r\n /**\r\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\r\n * @name getLengthHexFromValue\r\n * @memberOf KJUR.asn1.ASN1Object#\r\n * @function\r\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\r\n */\r\n this.getLengthHexFromValue = function () {\r\n if (typeof this.hV == \"undefined\" || this.hV == null) {\r\n throw \"this.hV is null or undefined.\";\r\n }\r\n if (this.hV.length % 2 == 1) {\r\n throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\r\n }\r\n var n = this.hV.length / 2;\r\n var hN = n.toString(16);\r\n if (hN.length % 2 == 1) {\r\n hN = \"0\" + hN;\r\n }\r\n if (n < 128) {\r\n return hN;\r\n }\r\n else {\r\n var hNlen = hN.length / 2;\r\n if (hNlen > 15) {\r\n throw \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\r\n }\r\n var head = 128 + hNlen;\r\n return head.toString(16) + hN;\r\n }\r\n };\r\n /**\r\n * get hexadecimal string of ASN.1 TLV bytes\r\n * @name getEncodedHex\r\n * @memberOf KJUR.asn1.ASN1Object#\r\n * @function\r\n * @return {String} hexadecimal string of ASN.1 TLV\r\n */\r\n this.getEncodedHex = function () {\r\n if (this.hTLV == null || this.isModified) {\r\n this.hV = this.getFreshValueHex();\r\n this.hL = this.getLengthHexFromValue();\r\n this.hTLV = this.hT + this.hL + this.hV;\r\n this.isModified = false;\r\n //alert(\"first time: \" + this.hTLV);\r\n }\r\n return this.hTLV;\r\n };\r\n /**\r\n * get hexadecimal string of ASN.1 TLV value(V) bytes\r\n * @name getValueHex\r\n * @memberOf KJUR.asn1.ASN1Object#\r\n * @function\r\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\r\n */\r\n this.getValueHex = function () {\r\n this.getEncodedHex();\r\n return this.hV;\r\n };\r\n this.getFreshValueHex = function () {\r\n return '';\r\n };\r\n};\r\n// == BEGIN DERAbstractString ================================================\r\n/**\r\n * base class for ASN.1 DER string classes\r\n * @name KJUR.asn1.DERAbstractString\r\n * @class base class for ASN.1 DER string classes\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @property {String} s internal string of value\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • str - specify initial ASN.1 value(V) by a string
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n */\r\nKJUR.asn1.DERAbstractString = function (params) {\r\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\r\n var s = null;\r\n var hV = null;\r\n /**\r\n * get string value of this string object\r\n * @name getString\r\n * @memberOf KJUR.asn1.DERAbstractString#\r\n * @function\r\n * @return {String} string value of this string object\r\n */\r\n this.getString = function () {\r\n return this.s;\r\n };\r\n /**\r\n * set value by a string\r\n * @name setString\r\n * @memberOf KJUR.asn1.DERAbstractString#\r\n * @function\r\n * @param {String} newS value by a string to set\r\n */\r\n this.setString = function (newS) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.s = newS;\r\n this.hV = stohex(this.s);\r\n };\r\n /**\r\n * set value by a hexadecimal string\r\n * @name setStringHex\r\n * @memberOf KJUR.asn1.DERAbstractString#\r\n * @function\r\n * @param {String} newHexString value by a hexadecimal string to set\r\n */\r\n this.setStringHex = function (newHexString) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.s = null;\r\n this.hV = newHexString;\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params == \"string\") {\r\n this.setString(params);\r\n }\r\n else if (typeof params['str'] != \"undefined\") {\r\n this.setString(params['str']);\r\n }\r\n else if (typeof params['hex'] != \"undefined\") {\r\n this.setStringHex(params['hex']);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\r\n// == END DERAbstractString ================================================\r\n// == BEGIN DERAbstractTime ==================================================\r\n/**\r\n * base class for ASN.1 DER Generalized/UTCTime class\r\n * @name KJUR.asn1.DERAbstractTime\r\n * @class base class for ASN.1 DER Generalized/UTCTime class\r\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n * @see KJUR.asn1.ASN1Object - superclass\r\n */\r\nKJUR.asn1.DERAbstractTime = function (params) {\r\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\r\n var s = null;\r\n var date = null;\r\n // --- PRIVATE METHODS --------------------\r\n this.localDateToUTC = function (d) {\r\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\r\n var utcDate = new Date(utc);\r\n return utcDate;\r\n };\r\n /*\r\n * format date string by Data object\r\n * @name formatDate\r\n * @memberOf KJUR.asn1.AbstractTime;\r\n * @param {Date} dateObject\r\n * @param {string} type 'utc' or 'gen'\r\n * @param {boolean} withMillis flag for with millisections or not\r\n * @description\r\n * 'withMillis' flag is supported from asn1 1.0.6.\r\n */\r\n this.formatDate = function (dateObject, type, withMillis) {\r\n var pad = this.zeroPadding;\r\n var d = this.localDateToUTC(dateObject);\r\n var year = String(d.getFullYear());\r\n if (type == 'utc')\r\n year = year.substr(2, 2);\r\n var month = pad(String(d.getMonth() + 1), 2);\r\n var day = pad(String(d.getDate()), 2);\r\n var hour = pad(String(d.getHours()), 2);\r\n var min = pad(String(d.getMinutes()), 2);\r\n var sec = pad(String(d.getSeconds()), 2);\r\n var s = year + month + day + hour + min + sec;\r\n if (withMillis === true) {\r\n var millis = d.getMilliseconds();\r\n if (millis != 0) {\r\n var sMillis = pad(String(millis), 3);\r\n sMillis = sMillis.replace(/[0]+$/, \"\");\r\n s = s + \".\" + sMillis;\r\n }\r\n }\r\n return s + \"Z\";\r\n };\r\n this.zeroPadding = function (s, len) {\r\n if (s.length >= len)\r\n return s;\r\n return new Array(len - s.length + 1).join('0') + s;\r\n };\r\n // --- PUBLIC METHODS --------------------\r\n /**\r\n * get string value of this string object\r\n * @name getString\r\n * @memberOf KJUR.asn1.DERAbstractTime#\r\n * @function\r\n * @return {String} string value of this time object\r\n */\r\n this.getString = function () {\r\n return this.s;\r\n };\r\n /**\r\n * set value by a string\r\n * @name setString\r\n * @memberOf KJUR.asn1.DERAbstractTime#\r\n * @function\r\n * @param {String} newS value by a string to set such like \"130430235959Z\"\r\n */\r\n this.setString = function (newS) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.s = newS;\r\n this.hV = stohex(newS);\r\n };\r\n /**\r\n * set value by a Date object\r\n * @name setByDateValue\r\n * @memberOf KJUR.asn1.DERAbstractTime#\r\n * @function\r\n * @param {Integer} year year of date (ex. 2013)\r\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\r\n * @param {Integer} day day of month\r\n * @param {Integer} hour hours of date\r\n * @param {Integer} min minutes of date\r\n * @param {Integer} sec seconds of date\r\n */\r\n this.setByDateValue = function (year, month, day, hour, min, sec) {\r\n var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\r\n this.setByDate(dateObject);\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\r\n// == END DERAbstractTime ==================================================\r\n// == BEGIN DERAbstractStructured ============================================\r\n/**\r\n * base class for ASN.1 DER structured class\r\n * @name KJUR.asn1.DERAbstractStructured\r\n * @class base class for ASN.1 DER structured class\r\n * @property {Array} asn1Array internal array of ASN1Object\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n * @see KJUR.asn1.ASN1Object - superclass\r\n */\r\nKJUR.asn1.DERAbstractStructured = function (params) {\r\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\r\n var asn1Array = null;\r\n /**\r\n * set value by array of ASN1Object\r\n * @name setByASN1ObjectArray\r\n * @memberOf KJUR.asn1.DERAbstractStructured#\r\n * @function\r\n * @param {array} asn1ObjectArray array of ASN1Object to set\r\n */\r\n this.setByASN1ObjectArray = function (asn1ObjectArray) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.asn1Array = asn1ObjectArray;\r\n };\r\n /**\r\n * append an ASN1Object to internal array\r\n * @name appendASN1Object\r\n * @memberOf KJUR.asn1.DERAbstractStructured#\r\n * @function\r\n * @param {ASN1Object} asn1Object to add\r\n */\r\n this.appendASN1Object = function (asn1Object) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.asn1Array.push(asn1Object);\r\n };\r\n this.asn1Array = new Array();\r\n if (typeof params != \"undefined\") {\r\n if (typeof params['array'] != \"undefined\") {\r\n this.asn1Array = params['array'];\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n// ASN.1 Object Classes\r\n// ********************************************************************\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Boolean\r\n * @name KJUR.asn1.DERBoolean\r\n * @class class for ASN.1 DER Boolean\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n * @see KJUR.asn1.ASN1Object - superclass\r\n */\r\nKJUR.asn1.DERBoolean = function () {\r\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\r\n this.hT = \"01\";\r\n this.hTLV = \"0101ff\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Integer\r\n * @name KJUR.asn1.DERInteger\r\n * @class class for ASN.1 DER Integer\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • int - specify initial ASN.1 value(V) by integer value
  • \r\n *
  • bigint - specify initial ASN.1 value(V) by BigInteger object
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n */\r\nKJUR.asn1.DERInteger = function (params) {\r\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\r\n this.hT = \"02\";\r\n /**\r\n * set value by Tom Wu's BigInteger object\r\n * @name setByBigInteger\r\n * @memberOf KJUR.asn1.DERInteger#\r\n * @function\r\n * @param {BigInteger} bigIntegerValue to set\r\n */\r\n this.setByBigInteger = function (bigIntegerValue) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\r\n };\r\n /**\r\n * set value by integer value\r\n * @name setByInteger\r\n * @memberOf KJUR.asn1.DERInteger\r\n * @function\r\n * @param {Integer} integer value to set\r\n */\r\n this.setByInteger = function (intValue) {\r\n var bi = new BigInteger(String(intValue), 10);\r\n this.setByBigInteger(bi);\r\n };\r\n /**\r\n * set value by integer value\r\n * @name setValueHex\r\n * @memberOf KJUR.asn1.DERInteger#\r\n * @function\r\n * @param {String} hexadecimal string of integer value\r\n * @description\r\n *
\r\n * NOTE: Value shall be represented by minimum octet length of\r\n * two's complement representation.\r\n * @example\r\n * new KJUR.asn1.DERInteger(123);\r\n * new KJUR.asn1.DERInteger({'int': 123});\r\n * new KJUR.asn1.DERInteger({'hex': '1fad'});\r\n */\r\n this.setValueHex = function (newHexString) {\r\n this.hV = newHexString;\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params['bigint'] != \"undefined\") {\r\n this.setByBigInteger(params['bigint']);\r\n }\r\n else if (typeof params['int'] != \"undefined\") {\r\n this.setByInteger(params['int']);\r\n }\r\n else if (typeof params == \"number\") {\r\n this.setByInteger(params);\r\n }\r\n else if (typeof params['hex'] != \"undefined\") {\r\n this.setValueHex(params['hex']);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER encoded BitString primitive\r\n * @name KJUR.asn1.DERBitString\r\n * @class class for ASN.1 DER encoded BitString primitive\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • bin - specify binary string (ex. '10111')
  • \r\n *
  • array - specify array of boolean (ex. [true,false,true,true])
  • \r\n *
  • hex - specify hexadecimal string of ASN.1 value(V) including unused bits
  • \r\n *
  • obj - specify {@link KJUR.asn1.ASN1Util.newObject}\r\n * argument for \"BitString encapsulates\" structure.
  • \r\n *
\r\n * NOTE1: 'params' can be omitted.
\r\n * NOTE2: 'obj' parameter have been supported since\r\n * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).
\r\n * @example\r\n * // default constructor\r\n * o = new KJUR.asn1.DERBitString();\r\n * // initialize with binary string\r\n * o = new KJUR.asn1.DERBitString({bin: \"1011\"});\r\n * // initialize with boolean array\r\n * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});\r\n * // initialize with hexadecimal string (04 is unused bits)\r\n * o = new KJUR.asn1.DEROctetString({hex: \"04bac0\"});\r\n * // initialize with ASN1Util.newObject argument for encapsulated\r\n * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\r\n * // above generates a ASN.1 data like this:\r\n * // BIT STRING, encapsulates {\r\n * // SEQUENCE {\r\n * // INTEGER 3\r\n * // PrintableString 'aaa'\r\n * // }\r\n * // }\r\n */\r\nKJUR.asn1.DERBitString = function (params) {\r\n if (params !== undefined && typeof params.obj !== \"undefined\") {\r\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\r\n params.hex = \"00\" + o.getEncodedHex();\r\n }\r\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\r\n this.hT = \"03\";\r\n /**\r\n * set ASN.1 value(V) by a hexadecimal string including unused bits\r\n * @name setHexValueIncludingUnusedBits\r\n * @memberOf KJUR.asn1.DERBitString#\r\n * @function\r\n * @param {String} newHexStringIncludingUnusedBits\r\n */\r\n this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.hV = newHexStringIncludingUnusedBits;\r\n };\r\n /**\r\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\r\n * @name setUnusedBitsAndHexValue\r\n * @memberOf KJUR.asn1.DERBitString#\r\n * @function\r\n * @param {Integer} unusedBits\r\n * @param {String} hValue\r\n */\r\n this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {\r\n if (unusedBits < 0 || 7 < unusedBits) {\r\n throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\r\n }\r\n var hUnusedBits = \"0\" + unusedBits;\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.hV = hUnusedBits + hValue;\r\n };\r\n /**\r\n * set ASN.1 DER BitString by binary string
\r\n * @name setByBinaryString\r\n * @memberOf KJUR.asn1.DERBitString#\r\n * @function\r\n * @param {String} binaryString binary value string (i.e. '10111')\r\n * @description\r\n * Its unused bits will be calculated automatically by length of\r\n * 'binaryValue'.
\r\n * NOTE: Trailing zeros '0' will be ignored.\r\n * @example\r\n * o = new KJUR.asn1.DERBitString();\r\n * o.setByBooleanArray(\"01011\");\r\n */\r\n this.setByBinaryString = function (binaryString) {\r\n binaryString = binaryString.replace(/0+$/, '');\r\n var unusedBits = 8 - binaryString.length % 8;\r\n if (unusedBits == 8)\r\n unusedBits = 0;\r\n for (var i = 0; i <= unusedBits; i++) {\r\n binaryString += '0';\r\n }\r\n var h = '';\r\n for (var i = 0; i < binaryString.length - 1; i += 8) {\r\n var b = binaryString.substr(i, 8);\r\n var x = parseInt(b, 2).toString(16);\r\n if (x.length == 1)\r\n x = '0' + x;\r\n h += x;\r\n }\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.hV = '0' + unusedBits + h;\r\n };\r\n /**\r\n * set ASN.1 TLV value(V) by an array of boolean
\r\n * @name setByBooleanArray\r\n * @memberOf KJUR.asn1.DERBitString#\r\n * @function\r\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\r\n * @description\r\n * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\r\n * @example\r\n * o = new KJUR.asn1.DERBitString();\r\n * o.setByBooleanArray([false, true, false, true, true]);\r\n */\r\n this.setByBooleanArray = function (booleanArray) {\r\n var s = '';\r\n for (var i = 0; i < booleanArray.length; i++) {\r\n if (booleanArray[i] == true) {\r\n s += '1';\r\n }\r\n else {\r\n s += '0';\r\n }\r\n }\r\n this.setByBinaryString(s);\r\n };\r\n /**\r\n * generate an array of falses with specified length
\r\n * @name newFalseArray\r\n * @memberOf KJUR.asn1.DERBitString\r\n * @function\r\n * @param {Integer} nLength length of array to generate\r\n * @return {array} array of boolean falses\r\n * @description\r\n * This static method may be useful to initialize boolean array.\r\n * @example\r\n * o = new KJUR.asn1.DERBitString();\r\n * o.newFalseArray(3) → [false, false, false]\r\n */\r\n this.newFalseArray = function (nLength) {\r\n var a = new Array(nLength);\r\n for (var i = 0; i < nLength; i++) {\r\n a[i] = false;\r\n }\r\n return a;\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params == \"string\" && params.toLowerCase().match(/^[0-9a-f]+$/)) {\r\n this.setHexValueIncludingUnusedBits(params);\r\n }\r\n else if (typeof params['hex'] != \"undefined\") {\r\n this.setHexValueIncludingUnusedBits(params['hex']);\r\n }\r\n else if (typeof params['bin'] != \"undefined\") {\r\n this.setByBinaryString(params['bin']);\r\n }\r\n else if (typeof params['array'] != \"undefined\") {\r\n this.setByBooleanArray(params['array']);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER OctetString
\r\n * @name KJUR.asn1.DEROctetString\r\n * @class class for ASN.1 DER OctetString\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * This class provides ASN.1 OctetString simple type.
\r\n * Supported \"params\" attributes are:\r\n *
    \r\n *
  • str - to set a string as a value
  • \r\n *
  • hex - to set a hexadecimal string as a value
  • \r\n *
  • obj - to set a encapsulated ASN.1 value by JSON object\r\n * which is defined in {@link KJUR.asn1.ASN1Util.newObject}
  • \r\n *
\r\n * NOTE: A parameter 'obj' have been supported\r\n * for \"OCTET STRING, encapsulates\" structure.\r\n * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n * @example\r\n * // default constructor\r\n * o = new KJUR.asn1.DEROctetString();\r\n * // initialize with string\r\n * o = new KJUR.asn1.DEROctetString({str: \"aaa\"});\r\n * // initialize with hexadecimal string\r\n * o = new KJUR.asn1.DEROctetString({hex: \"616161\"});\r\n * // initialize with ASN1Util.newObject argument\r\n * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\r\n * // above generates a ASN.1 data like this:\r\n * // OCTET STRING, encapsulates {\r\n * // SEQUENCE {\r\n * // INTEGER 3\r\n * // PrintableString 'aaa'\r\n * // }\r\n * // }\r\n */\r\nKJUR.asn1.DEROctetString = function (params) {\r\n if (params !== undefined && typeof params.obj !== \"undefined\") {\r\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\r\n params.hex = o.getEncodedHex();\r\n }\r\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\r\n this.hT = \"04\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Null\r\n * @name KJUR.asn1.DERNull\r\n * @class class for ASN.1 DER Null\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n * @see KJUR.asn1.ASN1Object - superclass\r\n */\r\nKJUR.asn1.DERNull = function () {\r\n KJUR.asn1.DERNull.superclass.constructor.call(this);\r\n this.hT = \"05\";\r\n this.hTLV = \"0500\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER ObjectIdentifier\r\n * @name KJUR.asn1.DERObjectIdentifier\r\n * @class class for ASN.1 DER ObjectIdentifier\r\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n */\r\nKJUR.asn1.DERObjectIdentifier = function (params) {\r\n var itox = function (i) {\r\n var h = i.toString(16);\r\n if (h.length == 1)\r\n h = '0' + h;\r\n return h;\r\n };\r\n var roidtox = function (roid) {\r\n var h = '';\r\n var bi = new BigInteger(roid, 10);\r\n var b = bi.toString(2);\r\n var padLen = 7 - b.length % 7;\r\n if (padLen == 7)\r\n padLen = 0;\r\n var bPad = '';\r\n for (var i = 0; i < padLen; i++)\r\n bPad += '0';\r\n b = bPad + b;\r\n for (var i = 0; i < b.length - 1; i += 7) {\r\n var b8 = b.substr(i, 7);\r\n if (i != b.length - 7)\r\n b8 = '1' + b8;\r\n h += itox(parseInt(b8, 2));\r\n }\r\n return h;\r\n };\r\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\r\n this.hT = \"06\";\r\n /**\r\n * set value by a hexadecimal string\r\n * @name setValueHex\r\n * @memberOf KJUR.asn1.DERObjectIdentifier#\r\n * @function\r\n * @param {String} newHexString hexadecimal value of OID bytes\r\n */\r\n this.setValueHex = function (newHexString) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.s = null;\r\n this.hV = newHexString;\r\n };\r\n /**\r\n * set value by a OID string
\r\n * @name setValueOidString\r\n * @memberOf KJUR.asn1.DERObjectIdentifier#\r\n * @function\r\n * @param {String} oidString OID string (ex. 2.5.4.13)\r\n * @example\r\n * o = new KJUR.asn1.DERObjectIdentifier();\r\n * o.setValueOidString(\"2.5.4.13\");\r\n */\r\n this.setValueOidString = function (oidString) {\r\n if (!oidString.match(/^[0-9.]+$/)) {\r\n throw \"malformed oid string: \" + oidString;\r\n }\r\n var h = '';\r\n var a = oidString.split('.');\r\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\r\n h += itox(i0);\r\n a.splice(0, 2);\r\n for (var i = 0; i < a.length; i++) {\r\n h += roidtox(a[i]);\r\n }\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.s = null;\r\n this.hV = h;\r\n };\r\n /**\r\n * set value by a OID name\r\n * @name setValueName\r\n * @memberOf KJUR.asn1.DERObjectIdentifier#\r\n * @function\r\n * @param {String} oidName OID name (ex. 'serverAuth')\r\n * @since 1.0.1\r\n * @description\r\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\r\n * Otherwise raise error.\r\n * @example\r\n * o = new KJUR.asn1.DERObjectIdentifier();\r\n * o.setValueName(\"serverAuth\");\r\n */\r\n this.setValueName = function (oidName) {\r\n var oid = KJUR.asn1.x509.OID.name2oid(oidName);\r\n if (oid !== '') {\r\n this.setValueOidString(oid);\r\n }\r\n else {\r\n throw \"DERObjectIdentifier oidName undefined: \" + oidName;\r\n }\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (params !== undefined) {\r\n if (typeof params === \"string\") {\r\n if (params.match(/^[0-2].[0-9.]+$/)) {\r\n this.setValueOidString(params);\r\n }\r\n else {\r\n this.setValueName(params);\r\n }\r\n }\r\n else if (params.oid !== undefined) {\r\n this.setValueOidString(params.oid);\r\n }\r\n else if (params.hex !== undefined) {\r\n this.setValueHex(params.hex);\r\n }\r\n else if (params.name !== undefined) {\r\n this.setValueName(params.name);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Enumerated\r\n * @name KJUR.asn1.DEREnumerated\r\n * @class class for ASN.1 DER Enumerated\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • int - specify initial ASN.1 value(V) by integer value
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n * @example\r\n * new KJUR.asn1.DEREnumerated(123);\r\n * new KJUR.asn1.DEREnumerated({int: 123});\r\n * new KJUR.asn1.DEREnumerated({hex: '1fad'});\r\n */\r\nKJUR.asn1.DEREnumerated = function (params) {\r\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\r\n this.hT = \"0a\";\r\n /**\r\n * set value by Tom Wu's BigInteger object\r\n * @name setByBigInteger\r\n * @memberOf KJUR.asn1.DEREnumerated#\r\n * @function\r\n * @param {BigInteger} bigIntegerValue to set\r\n */\r\n this.setByBigInteger = function (bigIntegerValue) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\r\n };\r\n /**\r\n * set value by integer value\r\n * @name setByInteger\r\n * @memberOf KJUR.asn1.DEREnumerated#\r\n * @function\r\n * @param {Integer} integer value to set\r\n */\r\n this.setByInteger = function (intValue) {\r\n var bi = new BigInteger(String(intValue), 10);\r\n this.setByBigInteger(bi);\r\n };\r\n /**\r\n * set value by integer value\r\n * @name setValueHex\r\n * @memberOf KJUR.asn1.DEREnumerated#\r\n * @function\r\n * @param {String} hexadecimal string of integer value\r\n * @description\r\n *
\r\n * NOTE: Value shall be represented by minimum octet length of\r\n * two's complement representation.\r\n */\r\n this.setValueHex = function (newHexString) {\r\n this.hV = newHexString;\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params['int'] != \"undefined\") {\r\n this.setByInteger(params['int']);\r\n }\r\n else if (typeof params == \"number\") {\r\n this.setByInteger(params);\r\n }\r\n else if (typeof params['hex'] != \"undefined\") {\r\n this.setValueHex(params['hex']);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER UTF8String\r\n * @name KJUR.asn1.DERUTF8String\r\n * @class class for ASN.1 DER UTF8String\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n */\r\nKJUR.asn1.DERUTF8String = function (params) {\r\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\r\n this.hT = \"0c\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER NumericString\r\n * @name KJUR.asn1.DERNumericString\r\n * @class class for ASN.1 DER NumericString\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n */\r\nKJUR.asn1.DERNumericString = function (params) {\r\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\r\n this.hT = \"12\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER PrintableString\r\n * @name KJUR.asn1.DERPrintableString\r\n * @class class for ASN.1 DER PrintableString\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n */\r\nKJUR.asn1.DERPrintableString = function (params) {\r\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\r\n this.hT = \"13\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER TeletexString\r\n * @name KJUR.asn1.DERTeletexString\r\n * @class class for ASN.1 DER TeletexString\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n */\r\nKJUR.asn1.DERTeletexString = function (params) {\r\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\r\n this.hT = \"14\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER IA5String\r\n * @name KJUR.asn1.DERIA5String\r\n * @class class for ASN.1 DER IA5String\r\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\r\n * @extends KJUR.asn1.DERAbstractString\r\n * @description\r\n * @see KJUR.asn1.DERAbstractString - superclass\r\n */\r\nKJUR.asn1.DERIA5String = function (params) {\r\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\r\n this.hT = \"16\";\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER UTCTime\r\n * @name KJUR.asn1.DERUTCTime\r\n * @class class for ASN.1 DER UTCTime\r\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\r\n * @extends KJUR.asn1.DERAbstractTime\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
  • date - specify Date object.
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n *

EXAMPLES

\r\n * @example\r\n * d1 = new KJUR.asn1.DERUTCTime();\r\n * d1.setString('130430125959Z');\r\n *\r\n * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\r\n * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\r\n * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');\r\n */\r\nKJUR.asn1.DERUTCTime = function (params) {\r\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\r\n this.hT = \"17\";\r\n /**\r\n * set value by a Date object
\r\n * @name setByDate\r\n * @memberOf KJUR.asn1.DERUTCTime#\r\n * @function\r\n * @param {Date} dateObject Date object to set ASN.1 value(V)\r\n * @example\r\n * o = new KJUR.asn1.DERUTCTime();\r\n * o.setByDate(new Date(\"2016/12/31\"));\r\n */\r\n this.setByDate = function (dateObject) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.date = dateObject;\r\n this.s = this.formatDate(this.date, 'utc');\r\n this.hV = stohex(this.s);\r\n };\r\n this.getFreshValueHex = function () {\r\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\r\n this.date = new Date();\r\n this.s = this.formatDate(this.date, 'utc');\r\n this.hV = stohex(this.s);\r\n }\r\n return this.hV;\r\n };\r\n if (params !== undefined) {\r\n if (params.str !== undefined) {\r\n this.setString(params.str);\r\n }\r\n else if (typeof params == \"string\" && params.match(/^[0-9]{12}Z$/)) {\r\n this.setString(params);\r\n }\r\n else if (params.hex !== undefined) {\r\n this.setStringHex(params.hex);\r\n }\r\n else if (params.date !== undefined) {\r\n this.setByDate(params.date);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER GeneralizedTime\r\n * @name KJUR.asn1.DERGeneralizedTime\r\n * @class class for ASN.1 DER GeneralizedTime\r\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\r\n * @property {Boolean} withMillis flag to show milliseconds or not\r\n * @extends KJUR.asn1.DERAbstractTime\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')
  • \r\n *
  • hex - specify initial ASN.1 value(V) by a hexadecimal string
  • \r\n *
  • date - specify Date object.
  • \r\n *
  • millis - specify flag to show milliseconds (from 1.0.6)
  • \r\n *
\r\n * NOTE1: 'params' can be omitted.\r\n * NOTE2: 'withMillis' property is supported from asn1 1.0.6.\r\n */\r\nKJUR.asn1.DERGeneralizedTime = function (params) {\r\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\r\n this.hT = \"18\";\r\n this.withMillis = false;\r\n /**\r\n * set value by a Date object\r\n * @name setByDate\r\n * @memberOf KJUR.asn1.DERGeneralizedTime#\r\n * @function\r\n * @param {Date} dateObject Date object to set ASN.1 value(V)\r\n * @example\r\n * When you specify UTC time, use 'Date.UTC' method like this:
\r\n * o1 = new DERUTCTime();\r\n * o1.setByDate(date);\r\n *\r\n * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\r\n */\r\n this.setByDate = function (dateObject) {\r\n this.hTLV = null;\r\n this.isModified = true;\r\n this.date = dateObject;\r\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\r\n this.hV = stohex(this.s);\r\n };\r\n this.getFreshValueHex = function () {\r\n if (this.date === undefined && this.s === undefined) {\r\n this.date = new Date();\r\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\r\n this.hV = stohex(this.s);\r\n }\r\n return this.hV;\r\n };\r\n if (params !== undefined) {\r\n if (params.str !== undefined) {\r\n this.setString(params.str);\r\n }\r\n else if (typeof params == \"string\" && params.match(/^[0-9]{14}Z$/)) {\r\n this.setString(params);\r\n }\r\n else if (params.hex !== undefined) {\r\n this.setStringHex(params.hex);\r\n }\r\n else if (params.date !== undefined) {\r\n this.setByDate(params.date);\r\n }\r\n if (params.millis === true) {\r\n this.withMillis = true;\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Sequence\r\n * @name KJUR.asn1.DERSequence\r\n * @class class for ASN.1 DER Sequence\r\n * @extends KJUR.asn1.DERAbstractStructured\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • array - specify array of ASN1Object to set elements of content
  • \r\n *
\r\n * NOTE: 'params' can be omitted.\r\n */\r\nKJUR.asn1.DERSequence = function (params) {\r\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\r\n this.hT = \"30\";\r\n this.getFreshValueHex = function () {\r\n var h = '';\r\n for (var i = 0; i < this.asn1Array.length; i++) {\r\n var asn1Obj = this.asn1Array[i];\r\n h += asn1Obj.getEncodedHex();\r\n }\r\n this.hV = h;\r\n return this.hV;\r\n };\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER Set\r\n * @name KJUR.asn1.DERSet\r\n * @class class for ASN.1 DER Set\r\n * @extends KJUR.asn1.DERAbstractStructured\r\n * @description\r\n *
\r\n * As for argument 'params' for constructor, you can specify one of\r\n * following properties:\r\n *
    \r\n *
  • array - specify array of ASN1Object to set elements of content
  • \r\n *
  • sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.
  • \r\n *
\r\n * NOTE1: 'params' can be omitted.
\r\n * NOTE2: sortflag is supported since 1.0.5.\r\n */\r\nKJUR.asn1.DERSet = function (params) {\r\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\r\n this.hT = \"31\";\r\n this.sortFlag = true; // item shall be sorted only in ASN.1 DER\r\n this.getFreshValueHex = function () {\r\n var a = new Array();\r\n for (var i = 0; i < this.asn1Array.length; i++) {\r\n var asn1Obj = this.asn1Array[i];\r\n a.push(asn1Obj.getEncodedHex());\r\n }\r\n if (this.sortFlag == true)\r\n a.sort();\r\n this.hV = a.join('');\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params.sortflag != \"undefined\" &&\r\n params.sortflag == false)\r\n this.sortFlag = false;\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\r\n// ********************************************************************\r\n/**\r\n * class for ASN.1 DER TaggedObject\r\n * @name KJUR.asn1.DERTaggedObject\r\n * @class class for ASN.1 DER TaggedObject\r\n * @extends KJUR.asn1.ASN1Object\r\n * @description\r\n *
\r\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\r\n * For example, if you find '[1]' tag in a ASN.1 dump,\r\n * 'tagNoHex' will be 'a1'.\r\n *
\r\n * As for optional argument 'params' for constructor, you can specify *ANY* of\r\n * following properties:\r\n *
    \r\n *
  • explicit - specify true if this is explicit tag otherwise false\r\n * (default is 'true').
  • \r\n *
  • tag - specify tag (default is 'a0' which means [0])
  • \r\n *
  • obj - specify ASN1Object which is tagged
  • \r\n *
\r\n * @example\r\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\r\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\r\n * hex = d2.getEncodedHex();\r\n */\r\nKJUR.asn1.DERTaggedObject = function (params) {\r\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\r\n this.hT = \"a0\";\r\n this.hV = '';\r\n this.isExplicit = true;\r\n this.asn1Object = null;\r\n /**\r\n * set value by an ASN1Object\r\n * @name setString\r\n * @memberOf KJUR.asn1.DERTaggedObject#\r\n * @function\r\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\r\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\r\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\r\n */\r\n this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {\r\n this.hT = tagNoHex;\r\n this.isExplicit = isExplicitFlag;\r\n this.asn1Object = asn1Object;\r\n if (this.isExplicit) {\r\n this.hV = this.asn1Object.getEncodedHex();\r\n this.hTLV = null;\r\n this.isModified = true;\r\n }\r\n else {\r\n this.hV = null;\r\n this.hTLV = asn1Object.getEncodedHex();\r\n this.hTLV = this.hTLV.replace(/^../, tagNoHex);\r\n this.isModified = false;\r\n }\r\n };\r\n this.getFreshValueHex = function () {\r\n return this.hV;\r\n };\r\n if (typeof params != \"undefined\") {\r\n if (typeof params['tag'] != \"undefined\") {\r\n this.hT = params['tag'];\r\n }\r\n if (typeof params['explicit'] != \"undefined\") {\r\n this.isExplicit = params['explicit'];\r\n }\r\n if (typeof params['obj'] != \"undefined\") {\r\n this.asn1Object = params['obj'];\r\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\r\n }\r\n }\r\n};\r\nYAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\r\n","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nimport { hex2b64 } from \"./lib/jsbn/base64\";\r\nimport { Hex } from \"./lib/asn1js/hex\";\r\nimport { Base64 } from \"./lib/asn1js/base64\";\r\nimport { ASN1 } from \"./lib/asn1js/asn1\";\r\nimport { RSAKey } from \"./lib/jsbn/rsa\";\r\nimport { parseBigInt } from \"./lib/jsbn/jsbn\";\r\nimport { KJUR } from \"./lib/jsrsasign/asn1-1.0\";\r\n/**\r\n * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.\r\n * This object is just a decorator for parsing the key parameter\r\n * @param {string|Object} key - The key in string format, or an object containing\r\n * the parameters needed to build a RSAKey object.\r\n * @constructor\r\n */\r\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\r\n __extends(JSEncryptRSAKey, _super);\r\n function JSEncryptRSAKey(key) {\r\n var _this = _super.call(this) || this;\r\n // Call the super constructor.\r\n // RSAKey.call(this);\r\n // If a key key was provided.\r\n if (key) {\r\n // If this is a string...\r\n if (typeof key === \"string\") {\r\n _this.parseKey(key);\r\n }\r\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\r\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\r\n // Set the values for the key.\r\n _this.parsePropertiesFrom(key);\r\n }\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Method to parse a pem encoded string containing both a public or private key.\r\n * The method will translate the pem encoded string in a der encoded string and\r\n * will parse private key and public key parameters. This method accepts public key\r\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\r\n *\r\n * @todo Check how many rsa formats use the same format of pkcs #1.\r\n *\r\n * The format is defined as:\r\n * PublicKeyInfo ::= SEQUENCE {\r\n * algorithm AlgorithmIdentifier,\r\n * PublicKey BIT STRING\r\n * }\r\n * Where AlgorithmIdentifier is:\r\n * AlgorithmIdentifier ::= SEQUENCE {\r\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\r\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\r\n * }\r\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\r\n * RSAPublicKey ::= SEQUENCE {\r\n * modulus INTEGER, -- n\r\n * publicExponent INTEGER -- e\r\n * }\r\n * it's possible to examine the structure of the keys obtained from openssl using\r\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\r\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\r\n * @private\r\n */\r\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\r\n try {\r\n var modulus = 0;\r\n var public_exponent = 0;\r\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\r\n var der = reHex.test(pem) ? Hex.decode(pem) : Base64.unarmor(pem);\r\n var asn1 = ASN1.decode(der);\r\n // Fixes a bug with OpenSSL 1.0+ private keys\r\n if (asn1.sub.length === 3) {\r\n asn1 = asn1.sub[2].sub[0];\r\n }\r\n if (asn1.sub.length === 9) {\r\n // Parse the private key.\r\n modulus = asn1.sub[1].getHexStringValue(); // bigint\r\n this.n = parseBigInt(modulus, 16);\r\n public_exponent = asn1.sub[2].getHexStringValue(); // int\r\n this.e = parseInt(public_exponent, 16);\r\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\r\n this.d = parseBigInt(private_exponent, 16);\r\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\r\n this.p = parseBigInt(prime1, 16);\r\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\r\n this.q = parseBigInt(prime2, 16);\r\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\r\n this.dmp1 = parseBigInt(exponent1, 16);\r\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\r\n this.dmq1 = parseBigInt(exponent2, 16);\r\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\r\n this.coeff = parseBigInt(coefficient, 16);\r\n }\r\n else if (asn1.sub.length === 2) {\r\n // Parse the public key.\r\n var bit_string = asn1.sub[1];\r\n var sequence = bit_string.sub[0];\r\n modulus = sequence.sub[0].getHexStringValue();\r\n this.n = parseBigInt(modulus, 16);\r\n public_exponent = sequence.sub[1].getHexStringValue();\r\n this.e = parseInt(public_exponent, 16);\r\n }\r\n else {\r\n return false;\r\n }\r\n return true;\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Translate rsa parameters in a hex encoded string representing the rsa key.\r\n *\r\n * The translation follow the ASN.1 notation :\r\n * RSAPrivateKey ::= SEQUENCE {\r\n * version Version,\r\n * modulus INTEGER, -- n\r\n * publicExponent INTEGER, -- e\r\n * privateExponent INTEGER, -- d\r\n * prime1 INTEGER, -- p\r\n * prime2 INTEGER, -- q\r\n * exponent1 INTEGER, -- d mod (p1)\r\n * exponent2 INTEGER, -- d mod (q-1)\r\n * coefficient INTEGER, -- (inverse of q) mod p\r\n * }\r\n * @returns {string} DER Encoded String representing the rsa private key\r\n * @private\r\n */\r\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\r\n var options = {\r\n array: [\r\n new KJUR.asn1.DERInteger({ int: 0 }),\r\n new KJUR.asn1.DERInteger({ bigint: this.n }),\r\n new KJUR.asn1.DERInteger({ int: this.e }),\r\n new KJUR.asn1.DERInteger({ bigint: this.d }),\r\n new KJUR.asn1.DERInteger({ bigint: this.p }),\r\n new KJUR.asn1.DERInteger({ bigint: this.q }),\r\n new KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\r\n new KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\r\n new KJUR.asn1.DERInteger({ bigint: this.coeff })\r\n ]\r\n };\r\n var seq = new KJUR.asn1.DERSequence(options);\r\n return seq.getEncodedHex();\r\n };\r\n /**\r\n * base64 (pem) encoded version of the DER encoded representation\r\n * @returns {string} pem encoded representation without header and footer\r\n * @public\r\n */\r\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\r\n return hex2b64(this.getPrivateBaseKey());\r\n };\r\n /**\r\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\r\n * The representation follow the ASN.1 notation :\r\n * PublicKeyInfo ::= SEQUENCE {\r\n * algorithm AlgorithmIdentifier,\r\n * PublicKey BIT STRING\r\n * }\r\n * Where AlgorithmIdentifier is:\r\n * AlgorithmIdentifier ::= SEQUENCE {\r\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\r\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\r\n * }\r\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\r\n * RSAPublicKey ::= SEQUENCE {\r\n * modulus INTEGER, -- n\r\n * publicExponent INTEGER -- e\r\n * }\r\n * @returns {string} DER Encoded String representing the rsa public key\r\n * @private\r\n */\r\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\r\n var first_sequence = new KJUR.asn1.DERSequence({\r\n array: [\r\n new KJUR.asn1.DERObjectIdentifier({ oid: \"1.2.840.113549.1.1.1\" }),\r\n new KJUR.asn1.DERNull()\r\n ]\r\n });\r\n var second_sequence = new KJUR.asn1.DERSequence({\r\n array: [\r\n new KJUR.asn1.DERInteger({ bigint: this.n }),\r\n new KJUR.asn1.DERInteger({ int: this.e })\r\n ]\r\n });\r\n var bit_string = new KJUR.asn1.DERBitString({\r\n hex: \"00\" + second_sequence.getEncodedHex()\r\n });\r\n var seq = new KJUR.asn1.DERSequence({\r\n array: [\r\n first_sequence,\r\n bit_string\r\n ]\r\n });\r\n return seq.getEncodedHex();\r\n };\r\n /**\r\n * base64 (pem) encoded version of the DER encoded representation\r\n * @returns {string} pem encoded representation without header and footer\r\n * @public\r\n */\r\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\r\n return hex2b64(this.getPublicBaseKey());\r\n };\r\n /**\r\n * wrap the string in block of width chars. The default value for rsa keys is 64\r\n * characters.\r\n * @param {string} str the pem encoded string without header and footer\r\n * @param {Number} [width=64] - the length the string has to be wrapped at\r\n * @returns {string}\r\n * @private\r\n */\r\n JSEncryptRSAKey.wordwrap = function (str, width) {\r\n width = width || 64;\r\n if (!str) {\r\n return str;\r\n }\r\n var regex = \"(.{1,\" + width + \"})( +|$\\n?)|(.{1,\" + width + \"})\";\r\n return str.match(RegExp(regex, \"g\")).join(\"\\n\");\r\n };\r\n /**\r\n * Retrieve the pem encoded private key\r\n * @returns {string} the pem encoded private key with header/footer\r\n * @public\r\n */\r\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\r\n var key = \"-----BEGIN RSA PRIVATE KEY-----\\n\";\r\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + \"\\n\";\r\n key += \"-----END RSA PRIVATE KEY-----\";\r\n return key;\r\n };\r\n /**\r\n * Retrieve the pem encoded public key\r\n * @returns {string} the pem encoded public key with header/footer\r\n * @public\r\n */\r\n JSEncryptRSAKey.prototype.getPublicKey = function () {\r\n var key = \"-----BEGIN PUBLIC KEY-----\\n\";\r\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + \"\\n\";\r\n key += \"-----END PUBLIC KEY-----\";\r\n return key;\r\n };\r\n /**\r\n * Check if the object contains the necessary parameters to populate the rsa modulus\r\n * and public exponent parameters.\r\n * @param {Object} [obj={}] - An object that may contain the two public key\r\n * parameters\r\n * @returns {boolean} true if the object contains both the modulus and the public exponent\r\n * properties (n and e)\r\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\r\n * be a parseable integer number\r\n * @private\r\n */\r\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\r\n obj = obj || {};\r\n return (obj.hasOwnProperty(\"n\") &&\r\n obj.hasOwnProperty(\"e\"));\r\n };\r\n /**\r\n * Check if the object contains ALL the parameters of an RSA key.\r\n * @param {Object} [obj={}] - An object that may contain nine rsa key\r\n * parameters\r\n * @returns {boolean} true if the object contains all the parameters needed\r\n * @todo check for types of the parameters all the parameters but the public exponent\r\n * should be parseable bigint objects, the public exponent should be a parseable integer number\r\n * @private\r\n */\r\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\r\n obj = obj || {};\r\n return (obj.hasOwnProperty(\"n\") &&\r\n obj.hasOwnProperty(\"e\") &&\r\n obj.hasOwnProperty(\"d\") &&\r\n obj.hasOwnProperty(\"p\") &&\r\n obj.hasOwnProperty(\"q\") &&\r\n obj.hasOwnProperty(\"dmp1\") &&\r\n obj.hasOwnProperty(\"dmq1\") &&\r\n obj.hasOwnProperty(\"coeff\"));\r\n };\r\n /**\r\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\r\n * include the modulus and public exponent (n, e) parameters.\r\n * @param {Object} obj - the object containing rsa parameters\r\n * @private\r\n */\r\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\r\n this.n = obj.n;\r\n this.e = obj.e;\r\n if (obj.hasOwnProperty(\"d\")) {\r\n this.d = obj.d;\r\n this.p = obj.p;\r\n this.q = obj.q;\r\n this.dmp1 = obj.dmp1;\r\n this.dmq1 = obj.dmq1;\r\n this.coeff = obj.coeff;\r\n }\r\n };\r\n return JSEncryptRSAKey;\r\n}(RSAKey));\r\nexport { JSEncryptRSAKey };\r\n","import { b64tohex, hex2b64 } from \"./lib/jsbn/base64\";\r\nimport { JSEncryptRSAKey } from \"./JSEncryptRSAKey\";\r\nimport version from './version.json';\r\n/**\r\n *\r\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\r\n * possible parameters are:\r\n * - default_key_size {number} default: 1024 the key size in bit\r\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\r\n * - log {boolean} default: false whether log warn/error or not\r\n * @constructor\r\n */\r\nvar JSEncrypt = /** @class */ (function () {\r\n function JSEncrypt(options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;\r\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\r\n this.log = options.log || false;\r\n // The private and public key.\r\n this.key = null;\r\n }\r\n /**\r\n * Method to set the rsa key parameter (one method is enough to set both the public\r\n * and the private key, since the private key contains the public key paramenters)\r\n * Log a warning if logs are enabled\r\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\r\n * @public\r\n */\r\n JSEncrypt.prototype.setKey = function (key) {\r\n if (this.log && this.key) {\r\n console.warn(\"A key was already set, overriding existing.\");\r\n }\r\n this.key = new JSEncryptRSAKey(key);\r\n };\r\n /**\r\n * Proxy method for setKey, for api compatibility\r\n * @see setKey\r\n * @public\r\n */\r\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\r\n // Create the key.\r\n this.setKey(privkey);\r\n };\r\n /**\r\n * Proxy method for setKey, for api compatibility\r\n * @see setKey\r\n * @public\r\n */\r\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\r\n // Sets the public key.\r\n this.setKey(pubkey);\r\n };\r\n /**\r\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\r\n * components of the rsa key object. Note that if the object was not set will be created\r\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\r\n * @param {string} str base64 encoded crypted string to decrypt\r\n * @return {string} the decrypted string\r\n * @public\r\n */\r\n JSEncrypt.prototype.decrypt = function (str) {\r\n // Return the decrypted string.\r\n try {\r\n return this.getKey().decrypt(b64tohex(str));\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\r\n * components of the rsa key object. Note that if the object was not set will be created\r\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\r\n * @param {string} str the string to encrypt\r\n * @return {string} the encrypted string encoded in base64\r\n * @public\r\n */\r\n JSEncrypt.prototype.encrypt = function (str) {\r\n // Return the encrypted string.\r\n try {\r\n return this.getKey().encrypt(str);\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n // 超长文本加密\r\n JSEncrypt.prototype.encryptLong = function (str) {\r\n try {\r\n return hex2b64(this.getKey().encryptLong(str));\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n // 超长文本解密\r\n JSEncrypt.prototype.decryptLong = function (str) {\r\n try {\r\n return this.getKey().decryptLong(str);\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Proxy method for RSAKey object's sign.\r\n * @param {string} str the string to sign\r\n * @param {function} digestMethod hash method\r\n * @param {string} digestName the name of the hash algorithm\r\n * @return {string} the signature encoded in base64\r\n * @public\r\n */\r\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\r\n // return the RSA signature of 'str' in 'hex' format.\r\n try {\r\n return hex2b64(this.getKey().sign(str, digestMethod, digestName));\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Proxy method for RSAKey object's verify.\r\n * @param {string} str the string to verify\r\n * @param {string} signature the signature encoded in base64 to compare the string to\r\n * @param {function} digestMethod hash method\r\n * @return {boolean} whether the data and signature match\r\n * @public\r\n */\r\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\r\n // Return the decrypted 'digest' of the signature.\r\n try {\r\n return this.getKey().verify(str, b64tohex(signature), digestMethod);\r\n }\r\n catch (ex) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\r\n * will be created and returned\r\n * @param {callback} [cb] the callback to be called if we want the key to be generated\r\n * in an async fashion\r\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\r\n * @public\r\n */\r\n JSEncrypt.prototype.getKey = function (cb) {\r\n // Only create new if it does not exist.\r\n if (!this.key) {\r\n // Get a new private key.\r\n this.key = new JSEncryptRSAKey();\r\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\r\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\r\n return;\r\n }\r\n // Generate the key.\r\n this.key.generate(this.default_key_size, this.default_public_exponent);\r\n }\r\n return this.key;\r\n };\r\n /**\r\n * Returns the pem encoded representation of the private key\r\n * If the key doesn't exists a new key will be created\r\n * @returns {string} pem encoded representation of the private key WITH header and footer\r\n * @public\r\n */\r\n JSEncrypt.prototype.getPrivateKey = function () {\r\n // Return the private representation of this key.\r\n return this.getKey().getPrivateKey();\r\n };\r\n /**\r\n * Returns the pem encoded representation of the private key\r\n * If the key doesn't exists a new key will be created\r\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\r\n * @public\r\n */\r\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\r\n // Return the private representation of this key.\r\n return this.getKey().getPrivateBaseKeyB64();\r\n };\r\n /**\r\n * Returns the pem encoded representation of the public key\r\n * If the key doesn't exists a new key will be created\r\n * @returns {string} pem encoded representation of the public key WITH header and footer\r\n * @public\r\n */\r\n JSEncrypt.prototype.getPublicKey = function () {\r\n // Return the private representation of this key.\r\n return this.getKey().getPublicKey();\r\n };\r\n /**\r\n * Returns the pem encoded representation of the public key\r\n * If the key doesn't exists a new key will be created\r\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\r\n * @public\r\n */\r\n JSEncrypt.prototype.getPublicKeyB64 = function () {\r\n // Return the private representation of this key.\r\n return this.getKey().getPublicBaseKeyB64();\r\n };\r\n JSEncrypt.version = version.version;\r\n return JSEncrypt;\r\n}());\r\nexport { JSEncrypt };\r\n","import { JSEncrypt } from './JSEncrypt';\r\nexport { JSEncrypt };\r\nexport default JSEncrypt;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(5987);\n"],"names":["webpackUniversalModuleDefinition","root","factory","exports","module","define","amd","self","undef","this","CryptoJS","C","C_lib","lib","BlockCipher","C_algo","algo","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","d","i","x","xi","sx","x2","x4","x8","t","RCON","AES","extend","_doReset","_nRounds","_keyPriorReset","_key","key","keyWords","words","keySize","sigBytes","nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","encryptBlock","M","offset","_doCryptBlock","decryptBlock","s0","s1","s2","s3","round","t0","t1","t2","t3","_createHelper","Cipher","undefined","Base","WordArray","BufferedBlockAlgorithm","C_enc","enc","Utf8","Base64","EvpKDF","cfg","createEncryptor","create","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","init","xformMode","_xformMode","reset","call","process","dataUpdate","_append","_process","finalize","finalProcessedData","_doFinalize","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","encrypt","message","decrypt","ciphertext","StreamCipher","finalProcessedBlocks","blockSize","C_mode","mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","processBlock","xorBlock","_prevBlock","slice","thisBlock","block","C_pad","pad","Pkcs7","data","blockSizeBytes","nPaddingBytes","paddingWord","paddingWords","push","padding","concat","unpad","modeCreator","_minBufferSize","_mode","__creator","_doProcessBlock","_data","CipherParams","cipherParams","mixIn","toString","formatter","stringify","C_format","format","OpenSSLFormatter","OpenSSL","wordArray","salt","parse","openSSLStr","ciphertextWords","splice","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","password","random","compute","derivedParams","Math","crypto","window","globalThis","msCrypto","g","err","cryptoSecureRandomInt","getRandomValues","Uint32Array","randomBytes","readInt32LE","Error","Object","F","obj","subtype","prototype","overrides","hasOwnProperty","$super","apply","arguments","instance","properties","propertyName","clone","length","encoder","Hex","thisWords","thatWords","thisSigBytes","thatSigBytes","clamp","thatByte","j","ceil","nBytes","hexChars","bite","join","hexStr","hexStrLength","parseInt","substr","Latin1","latin1Chars","String","fromCharCode","latin1Str","latin1StrLength","charCodeAt","decodeURIComponent","escape","e","utf8Str","unescape","encodeURIComponent","_nDataBytes","doFlush","processedWords","dataWords","dataSigBytes","nBlocksReady","max","nWordsReady","nBytesReady","min","Hasher","update","messageUpdate","hash","hasher","_createHmacHelper","HMAC","map","_map","base64Chars","byte1","byte2","byte3","triplet","charAt","paddingChar","base64Str","base64StrLength","reverseMap","_reverseMap","paddingIndex","indexOf","parseLoop","bits1","bits2","bitsCombined","Base64url","urlSafe","_safe_map","Utf16BE","Utf16","utf16Chars","codePoint","utf16Str","utf16StrLength","Utf16LE","swapEndian","word","MD5","iterations","derivedKey","derivedKeyWords","HexFormatter","input","_hasher","hasherBlockSize","hasherBlockSizeBytes","oKey","_oKey","iKey","_iKey","oKeyWords","iKeyWords","innerHash","hmac","ArrayBuffer","superInit","subInit","typedArray","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","buffer","byteOffset","byteLength","typedArrayByteLength","T","abs","sin","_hash","offset_i","M_offset_i","H","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","a","b","c","FF","GG","HH","II","nBitsTotal","nBitsLeft","nBitsTotalH","floor","nBitsTotalL","H_i","s","n","HmacMD5","CFB","generateKeystreamAndEncrypt","keystream","CTRGladman","incWord","b1","b2","b3","incCounter","counter","_counter","CTR","ECB","OFB","_keystream","AnsiX923","lastBytePos","Ansix923","Iso10126","Iso97971","ZeroPadding","NoPadding","SHA1","PBKDF2","blockIndex","blockIndexWords","blockWords","blockWordsLength","intermediate","intermediateWords","S","C_","G","RabbitLegacy","K","X","_X","_C","_b","nextState","IV","IV_0","IV_1","i0","i2","i1","i3","gx","ga","gb","gh","gl","Rabbit","RC4","keySigBytes","_S","keyByteIndex","keyByte","_i","_j","generateKeystreamWord","keystreamWord","RC4Drop","drop","_zl","_zr","_sl","_sr","_hl","_hr","RIPEMD160","hl","hr","zl","zr","sl","sr","al","bl","cl","dl","el","ar","br","cr","dr","er","f1","f2","f3","f4","f5","rotl","y","z","HmacRIPEMD160","W","HmacSHA1","SHA256","SHA224","HmacSHA224","isPrime","sqrtN","sqrt","factor","getFractionalBits","nPrime","pow","f","h","gamma0x","gamma0","gamma1x","gamma1","ch","maj","sigma0","sigma1","HmacSHA256","C_x64","x64","X64Word","Word","RHO_OFFSETS","PI_INDEXES","ROUND_CONSTANTS","newX","newY","LFSR","roundConstantMsw","roundConstantLsw","bitPosition","SHA3","outputLength","state","_state","nBlockSizeLanes","M2i","M2i1","lane","high","low","tMsw","tLsw","Tx","Tx4","Tx1","Tx1Msw","Tx1Lsw","laneIndex","laneMsw","laneLsw","rhoOffset","TPiLane","T0","state0","TLane","Tx1Lane","Tx2Lane","roundConstant","blockSizeBits","outputLengthBytes","outputLengthLanes","hashWords","HmacSHA3","X64WordArray","SHA512","SHA384","HmacSHA384","X64Word_create","H0","H1","H2","H3","H4","H5","H6","H7","H0h","H0l","H1h","H1l","H2h","H2l","H3h","H3l","H4h","H4l","H5h","H5l","H6h","H6l","H7h","H7l","ah","bh","dh","eh","fh","fl","hh","Wil","Wih","Wi","gamma0xh","gamma0xl","gamma0h","gamma0l","gamma1xh","gamma1xl","gamma1h","gamma1l","Wi7","Wi7h","Wi7l","Wi16","Wi16h","Wi16l","chh","chl","majh","majl","sigma0h","sigma0l","sigma1h","sigma1l","Ki","Kih","Kil","t1l","t1h","t2l","t2h","toX32","HmacSHA512","PC1","PC2","BIT_SHIFTS","SBOX_P","SBOX_MASK","DES","keyBits","keyBitPos","subKeys","_subKeys","nSubKey","subKey","bitShift","invSubKeys","_invSubKeys","_lBlock","_rBlock","exchangeLR","exchangeRL","lBlock","rBlock","mask","TripleDES","key1","key2","key3","_des1","_des2","_des3","X32WordArray","x64Words","x64WordsLength","x32Words","x64Word","wordsLength","defineProperty","value","ErrorCode","__importDefault","mod","__esModule","GtLogic_1","GtRuntime_1","Log_1","GtPush","setDebugMode","debugMode","default","info","checkAppid","appid","error","setTag","bindAlias","unbindAlias","setSocketServer","url","keyId","socketUrl","publicKeyId","publicKey","enableSocket","enable","trim","Constant","SDK_VERSION","DEFAULT_SOCKET_URL","SOCKET_PROTOCOL_VERSION","SERVER_PUBLIC_KEY","SERVER_PUBLIC_KEY_ID","SocketManager_1","ErrorCode_1","BindAlias_1","SetTag_1","UnbindAlias_1","GtLogic","static","inited","connect","checkInit","allowReconnect","reconnect","close","_a","cid","setTagResult","resultCode","CLIENT_ID_NOT_FOUND","tags","send","bindAliasResult","time","Date","getTime","lastAliasTime","OPERATION_TOO_OFTEN","alias","unbindAliasResult","onlySelf","CryptManager_1","Storage_1","Constant_1","Device_1","GtRuntime","onClientId","onlineState","onPushMsg","getSync","KEY_APPID","setSync","KEY_CID","KEY_SESSION","session","deviceId","KEY_DEVICE_ID","regId","KEY_REGID","createRegId","set","KEY_SOCKET_URL","_this","getNetworkType","success","networkType","networkConnected","onNetworkStatusChange","result","isConnected","md5Hex","getUuid","replace","r","v","packetId","online","Message_1","ActionMsg","constructor","super","actionMsgData","ActionMsgData","args","initMsg","command","Command","CLIENT_MSG","parseMsg","timer","setTimeout","waitingLoginMsgMap","has","msgId","waitingResponseMsgMap","delete","callback","TIME_OUT","msgAction","ClientAction","RECEIVED","receive","iterator","keys","next","done","get","actionMsg","ServerAction","PUSH_MESSAGE","REDIRECT_SERVER","ADD_PHONE_INFO_RESULT","SET_MODE_RESULT","SET_TAG_RESULT","BIND_ALIAS_RESULT","UNBIND_ALIAS_RESULT","FEED_BACK_RESULT","ADD_PHONE_INFO","SET_MODE","FEED_BACK","SET_TAGS","BIND_ALIAS","UNBIND_ALIAS","Map","appId","msgData","msgExtraData","JSON","ActionMsg_1","AddPhoneInfo","addPhoneInfoData","AddPhoneInfoData","initActionMsg","res","SUCCESS","REPEAT_MESSAGE","KEY_ADD_PHONE_INFO_TIME","lasTime","model","brand","system_version","version","device_token","imei","oaid","mac","idfa","deviceid","type","extra","os","platform","platformVersion","platformId","appVersion","language","osVersion","BindAlias","bindAliasTagData","BindAliasData","sn","is_self","Feedback","feedbackData","FeedbackData","pushMessage","actionId","ActionId","RECEIVE","MP_RECEIVE","WEB_RECEIVE","BEGIN","RESULT","OK","messageid","appkey","taskid","actionid","timestamp","pushMessageData","appKey","taskId","SetTag","setTagData","SetTagData","urlencode","str","UnbindAlias","unbindAliasData","UnbindAliasData","HeartBeat","HEART_BEAT","KeyNegotiate","keyNegotiateData","KeyNegotiateData","KEY_NEGOTIATE","resetKey","rsaPublicKeyId","secretKey","getEncryptedSecretKey","getEncryptedIV","Login_1","KeyNegotiateResult","keyNegotiateResultData","KeyNegotiateResultData","errorCode","console","encryptMode","encryptType","split","algorithmMap","toLowerCase","modeMap","paddingMap","setEncryptParams","errorMsg","Register_1","Login","loginData","LoginData","LOGIN","AddPhoneInfo_1","LoginResult","loginResultData","LoginResultData","sendWaitingMessages","MessageCoder_1","Message","timeStamp","signature","json","isAvailable","sign","KEY_NEGOTIATE_RESULT","REGISTER","REGISTER_RESULT","LOGIN_RESULT","LOGOUT","LOGOUT_RESULT","SERVER_MSG","SERVER_CLOSE","MessageCoder","msg","sha256","verify","KeyNegotiateResult_1","LoginResult_1","RegisterResult_1","AddPhoneInfoResult_1","BindAliasResult_1","FeedbackResult_1","PushMessage_1","RedirectServer_1","SetModeResult_1","SetTagResult_1","UnbindAliasResult_1","ActionMsg_2","Received_1","ServerClose_1","MessageHandler","receiveActionMsg","parseActionMsg","id","Received","receivedData","ReceivedData","getWaitingResponseMessage","removeWaitingResponseMessage","Register","registerData","RegisterData","RegisterResult","registerResultData","RegisterResultData","ServerClose","serverCloseData","ServerCloseData","code","AddPhoneInfoResult","addPhoneInfoResultData","AddPhoneInfoResultData","addPhoneInfo","BindAliasResult","bindAliasResultData","BindAliasResultData","KEY_BIND_ALIAS_TIME","FeedbackResult","feedbackResultData","FeedbackResultData","feedback","Feedback_1","PushMessage","PushMessageData","actionChain","cdnType","ActionChain","do","Type","GO_TO","TRANSMIT","RedirectServer","redirectServerData","RedirectServerData","addressList","delay","location","idConfig","SetModeResult","setModeResultData","SetModeResultData","setMode","SetTagResult","setTagResultData","SetTagResultData","KEY_SET_TAG_TIME","UnbindAliasResult","unbindAliasResultData","UnbindAliasResultData","DelayTask","start","cancel","setInterval","run","clearInterval","HeartBeat_1","DelayTask_1","HeartBeatTask","InstanceHolder","refresh","INTERVAL","Device","systemInfo","accountInfo","uni","getSystemInfoSync","getAccountInfoSync","system","osPrefix","toLocaleLowerCase","startsWith","miniProgram","fail","KeyNegotiate_1","MessageHandler_1","HeartBeatTask_1","SocketManager","socketTask","socketOpen","socketConnected","connectSocket","startNegotiating","resetSocket","onSocketOpen","onOpen","onSocketMessage","onMessage","onSocketError","onError","onSocketClose","onClose","getInstance","reason","closeSocket","sendSocketMessage","receiveMessage","Storage","setStorageSync","setStorage","defaultValue","getStorageSync","getStorage","wxmp_rsa_1","crypto_js_1","CryptManager","encryptedSecretKey","encryptedIV","rsa","symmetricMode","symmetricPadding","symmetricAlgorithm","setPublicKey","algorthim","plainText","cipherText","text","Log","BI_RM","int2char","op_and","op_or","op_xor","op_andnot","lbit","cbit","b64map","b64pad","hex2b64","ret","substring","b64tohex","k","slop","b64toBA","decoder","decode","hex","ignore","out","bits","char_count","b64","re","unarmor","m","exec","Int10","buf","mulAdd","l","sub","pop","base","valueOf","simplify","ellipsis","reTimeS","reTimeL","stringCut","len","Stream","pos","hexDigits","hexByte","hexDump","end","raw","isASCII","parseStringISO","parseStringUTF","parseStringBMP","hi","lo","parseTime","shortYear","parseInteger","neg","parseBitString","maxLength","unusedBit","lenBit","intro","skip","parseOctetString","parseOID","ASN1","stream","header","tag","ASN1Tag","typeName","tagClass","tagNumber","content","Infinity","posContent","isUniversal","toPrettyString","indent","tagConstructed","posStart","posEnd","toHexString","decodeLength","getHexStringValue","hexString","streamStart","getSub","isEOC","dbits","canary","j_lm","lowprimes","lplim","BigInteger","fromNumber","fromString","negate","toRadix","km","p","DB","nbi","ZERO","subTo","compareTo","bitLength","nbits","DM","divRemTo","modPowInt","isEven","Classic","Montgomery","exp","copyTo","intValue","DV","byteValue","shortValue","signum","toByteArray","equals","and","bitwiseTo","or","xor","andNot","not","shiftLeft","rShiftTo","lShiftTo","shiftRight","getLowestSetBit","bitCount","testBit","setBit","changeBit","clearBit","flipBit","add","addTo","subtract","multiply","multiplyTo","divide","remainder","divideAndRemainder","q","modPow","nbv","Barrett","k1","convert","g2","sqrTo","mulTo","w","is1","r2","revert","modInverse","ac","u","ONE","NullExp","gcd","isProbablePrime","modInt","millerRabin","fromInt","fromRadix","mi","sh","intAt","dlShiftTo","drShiftTo","bs","cbs","bm","ds","am","squareTo","pm","pt","ts","ms","nsh","ys","y0","yt","F1","F2","d1","FV","d2","qd","invDigit","chunkSize","LN2","log","cs","dMultiply","dAddOffset","nextBytes","op","multiplyLowerTo","multiplyUpperTo","n1","square","gcda","gcda1","fromNumberAsync","bnp_1","bnpfn1_1","reduce","mp","mpl","mph","um","mt2","u0","q3","mu","parseBigInt","inBrowser","navigator","appName","am2","xl","xh","am1","am3","BI_FP","BI_RC","rr","vv","Arcfour","prng_newstate","rng_state","rng_pool","rng_pptr","count","onMouseMoveListener","ev","rng_psize","mouseCoordinates","rng_get_byte","SecureRandom","ba","pkcs1pad1","filler","pkcs1pad2","rng","RSAKey","dmp1","dmq1","coeff","doPublic","doPrivate","xp","xq","setPublic","N","E","setPrivate","D","setPrivateEx","P","Q","DP","DQ","generate","B","qs","ee","p1","q1","phi","ctext","pkcs1unpad2","generateAsync","loop1","loop4","loop3","loop2","digestMethod","digestName","getDigestHeader","digest","unpadded","removeDigestHeader","encryptLong","maxLen","textArr","setSplitChn","forEach","decryptLong","splitMaxLen","ctextArr","match","RegExp","mArr","pkcs1unpad2Long","arr","charCode","currentStr","dArr","bArr","b_1","i_1","DIGEST_HEADERS","md2","md5","sha1","sha224","sha384","sha512","ripemd160","name","name_1","YAHOO","lang","subc","superc","superclass","_IEEnumFix","ADD","test","userAgent","fname","ex","KJUR","asn1","ASN1Util","integerToByteHex","bigIntToMinTwosComplementsHex","bigIntegerValue","hPos","xorLen","hMask","biMask","biNeg","getPEMStringFromHex","dataHex","pemHeader","hextopem","newObject","param","_KJUR","_KJUR_asn1","_DERBoolean","DERBoolean","_DERInteger","DERInteger","_DERBitString","DERBitString","_DEROctetString","DEROctetString","_DERNull","DERNull","_DERObjectIdentifier","DERObjectIdentifier","_DEREnumerated","DEREnumerated","_DERUTF8String","DERUTF8String","_DERNumericString","DERNumericString","_DERPrintableString","DERPrintableString","_DERTeletexString","DERTeletexString","_DERIA5String","DERIA5String","_DERUTCTime","DERUTCTime","_DERGeneralizedTime","DERGeneralizedTime","_DERSequence","DERSequence","_DERSet","DERSet","_DERTaggedObject","DERTaggedObject","_newObject","paramList","asn1Obj","tagParam","explicit","newParam","jsonToASN1HEX","getEncodedHex","oidHexToInt","i01","binbuf","bin","bi","oidIntToHex","oidString","itox","roidtox","roid","padLen","bPad","b8","ASN1Object","isModified","hTLV","hT","hL","hV","getLengthHexFromValue","hN","hNlen","head","getFreshValueHex","getValueHex","DERAbstractString","params","getString","setString","newS","stohex","setStringHex","newHexString","DERAbstractTime","date","localDateToUTC","utc","getTimezoneOffset","utcDate","formatDate","dateObject","withMillis","zeroPadding","year","getFullYear","month","getMonth","day","getDate","hour","getHours","getMinutes","sec","getSeconds","millis","getMilliseconds","sMillis","Array","setByDateValue","UTC","setByDate","DERAbstractStructured","asn1Array","setByASN1ObjectArray","asn1ObjectArray","appendASN1Object","asn1Object","setByBigInteger","setByInteger","setValueHex","o","setHexValueIncludingUnusedBits","newHexStringIncludingUnusedBits","setUnusedBitsAndHexValue","unusedBits","hValue","hUnusedBits","setByBinaryString","binaryString","setByBooleanArray","booleanArray","newFalseArray","nLength","setValueOidString","setValueName","oidName","oid","x509","OID","name2oid","sortFlag","sort","sortflag","isExplicit","setASN1Object","isExplicitFlag","tagNoHex","__extends","extendStatics","setPrototypeOf","__proto__","TypeError","__","JSEncryptRSAKey","_super","parseKey","hasPrivateKeyProperty","hasPublicKeyProperty","parsePropertiesFrom","pem","modulus","public_exponent","reHex","der","private_exponent","prime1","prime2","exponent1","exponent2","coefficient","bit_string","sequence","getPrivateBaseKey","options","array","int","bigint","seq","getPrivateBaseKeyB64","getPublicBaseKey","first_sequence","second_sequence","getPublicBaseKeyB64","wordwrap","width","regex","getPrivateKey","getPublicKey","JSEncrypt","default_key_size","default_public_exponent","setKey","warn","setPrivateKey","privkey","pubkey","getKey","cb","getPrivateKeyB64","getPublicKeyB64","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","enumerable","Function","prop","Symbol","toStringTag","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/packages/uni-push/lib/uni.plugin.js b/packages/uni-push/lib/uni.plugin.js new file mode 100644 index 0000000000000000000000000000000000000000..f95a9071533f631ad7b91bc9c96dcc7edc8edac9 --- /dev/null +++ b/packages/uni-push/lib/uni.plugin.js @@ -0,0 +1,75 @@ +'use strict' + +var path = require('path') +var debug = require('debug') +var uniCliShared = require('@dcloudio/uni-cli-shared') + +function _interopDefaultLegacy(e) { + return e && typeof e === 'object' && 'default' in e ? e : { default: e } +} + +var path__default = /*#__PURE__*/ _interopDefaultLegacy(path) +var debug__default = /*#__PURE__*/ _interopDefaultLegacy(debug) + +const debugPush = debug__default['default']('uni:push') +var index = [ + uniCliShared.defineUniMainJsPlugin((opts) => { + let isEnable = false + let isOffline = false + return { + name: 'uni:push', + enforce: 'pre', + config(config, env) { + if (uniCliShared.isSsr(env.command, config)) { + return + } + const inputDir = process.env.UNI_INPUT_DIR + const platform = process.env.UNI_PLATFORM + isOffline = + platform === 'app' && uniCliShared.isUniPushOffline(inputDir) + if (isOffline) { + isEnable = true + return + } + const { appid, enable, debug } = uniCliShared.getUniPush( + inputDir, + platform + ) + isEnable = appid && enable === true + if (!isEnable) { + return + } + debugPush('appid', appid, 'deubg', debug) + return { + define: { + 'process.env.UNI_PUSH_APP_ID': JSON.stringify(appid), + 'process.env.UNI_PUSH_DEBUG': !!debug, + }, + } + }, + resolveId(id) { + if (id === '@dcloudio/uni-push') { + return uniCliShared.resolveBuiltIn( + path__default['default'].join( + '@dcloudio/uni-push', + isOffline ? 'dist/uni-push.plus.es.js' : 'dist/uni-push.es.js' + ) + ) + } + }, + transform(code, id) { + if (!opts.filter(id)) { + return + } + if (isEnable) { + return { + code: code + `;import '@dcloudio/uni-push';`, + map: null, + } + } + }, + } + }), +] + +module.exports = index diff --git a/packages/uni-push/lib/version b/packages/uni-push/lib/version new file mode 100644 index 0000000000000000000000000000000000000000..4c7070aba67f205fbaee99fcf7c5256c2d9565b4 --- /dev/null +++ b/packages/uni-push/lib/version @@ -0,0 +1 @@ +1.0.0.20220127134911 diff --git a/packages/uni-push/package.json b/packages/uni-push/package.json new file mode 100644 index 0000000000000000000000000000000000000000..513800eb7c9b9d7dd35355a77af0fe44ffeeaea4 --- /dev/null +++ b/packages/uni-push/package.json @@ -0,0 +1,28 @@ +{ + "name": "@dcloudio/uni-push", + "version": "3.0.0-alpha-3030820220114006", + "description": "@dcloudio/uni-push", + "main": "lib/uni-push.js", + "module": "lib/uni-push.js", + "files": [ + "lib" + ], + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/dcloudio/uni-app.git", + "directory": "packages/uni-push" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/dcloudio/uni-app/issues" + }, + "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da", + "dependencies": { + "@dcloudio/uni-cli-shared": "3.0.0-alpha-3030820220114006", + "debug": "^4.3.2" + }, + "devDependencies": { + "@types/debug": "^4.1.7" + } +} diff --git a/packages/uni-push/src/index.ts b/packages/uni-push/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e6a3e4f42358591128e38fe3990fafbeb6ab67cd --- /dev/null +++ b/packages/uni-push/src/index.ts @@ -0,0 +1,30 @@ +import GtPush from '../lib/gtpush-min' + +if (process.env.UNI_PUSH_DEBUG) { + GtPush.setDebugMode(true) +} + +GtPush.init({ + appid: process.env.UNI_PUSH_APP_ID!, + onClientId: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'clientId', + cid: res.cid, + }) + }, + onlineState: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'lineState', + online: res.online, + }) + }, + onPushMsg: (res) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'pushMsg', + message: res.message, + }) + }, +}) diff --git a/packages/uni-push/src/plugin/index.ts b/packages/uni-push/src/plugin/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..6eaa4dba00aea45b18e2d438679b877e411c913f --- /dev/null +++ b/packages/uni-push/src/plugin/index.ts @@ -0,0 +1,66 @@ +import path from 'path' +import debug from 'debug' +import { + defineUniMainJsPlugin, + isSsr, + getUniPush, + isUniPushOffline, + resolveBuiltIn, +} from '@dcloudio/uni-cli-shared' + +const debugPush = debug('uni:push') +export default [ + defineUniMainJsPlugin((opts) => { + let isEnable = false + let isOffline = false + return { + name: 'uni:push', + enforce: 'pre', + config(config, env) { + if (isSsr(env.command, config)) { + return + } + const inputDir = process.env.UNI_INPUT_DIR! + const platform = process.env.UNI_PLATFORM! + isOffline = platform === 'app' && isUniPushOffline(inputDir) + if (isOffline) { + isEnable = true + return + } + const { appid, enable, debug } = getUniPush(inputDir, platform) + isEnable = appid && enable === true + if (!isEnable) { + return + } + debugPush('appid', appid, 'deubg', debug) + return { + define: { + 'process.env.UNI_PUSH_APP_ID': JSON.stringify(appid), + 'process.env.UNI_PUSH_DEBUG': !!debug, + }, + } + }, + resolveId(id) { + if (id === '@dcloudio/uni-push') { + return resolveBuiltIn( + path.join( + '@dcloudio/uni-push', + isOffline ? 'dist/uni-push.plus.es.js' : 'dist/uni-push.es.js' + ) + ) + } + }, + transform(code, id) { + if (!opts.filter(id)) { + return + } + if (isEnable) { + return { + code: code + `;import '@dcloudio/uni-push';`, + map: null, + } + } + }, + } + }), +] diff --git a/packages/uni-push/src/plus.ts b/packages/uni-push/src/plus.ts new file mode 100644 index 0000000000000000000000000000000000000000..90ec795078941f3e1732a5ca94c2a96459e5d52b --- /dev/null +++ b/packages/uni-push/src/plus.ts @@ -0,0 +1,17 @@ +Promise.resolve().then(() => { + const info = plus.push.getClientInfo() + if (info.clientid) { + // @ts-expect-error + uni.invokePushCallback({ + type: 'clientId', + cid: info.clientid, + }) + } + plus.push.addEventListener('receive', (result) => { + // @ts-expect-error + uni.invokePushCallback({ + type: 'pushMsg', + message: result, + }) + }) +}) diff --git a/packages/uni-push/tsconfig.json b/packages/uni-push/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..ab42e457ca602eb0616860aff4b0f1de398706c3 --- /dev/null +++ b/packages/uni-push/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "outDir": "dist", + "sourceMap": false, + "target": "es2015", + "module": "esnext", + "moduleResolution": "node", + "allowJs": false, + "strict": true, + "noUnusedLocals": true, + "experimentalDecorators": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "removeComments": false, + "lib": ["ESNext", "DOM"], + "types": ["@dcloudio/types"] + }, + "include": ["src"] +} diff --git a/packages/uni-quickapp-webview/dist/uni.api.esm.js b/packages/uni-quickapp-webview/dist/uni.api.esm.js index af2da22b84018ad4e4352f11349c8ac022f51a1e..c641248a94e3f95138bf11d7aa7d8aaae7dd9c3f 100644 --- a/packages/uni-quickapp-webview/dist/uni.api.esm.js +++ b/packages/uni-quickapp-webview/dist/uni.api.esm.js @@ -1,4 +1,4 @@ -import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared'; +import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, extend } from '@vue/shared'; import { injectHook } from 'vue'; //App @@ -189,6 +189,30 @@ function isBoolean(...args) { return args.some((elem) => elem.toLowerCase() === 'boolean'); } +function tryCatch(fn) { + return function () { + try { + return fn.apply(fn, arguments); + } + catch (e) { + // TODO + console.error(e); + } + }; +} + +function getApiCallbacks(args) { + const apiCallbacks = {}; + for (const name in args) { + const fn = args[name]; + if (isFunction(fn)) { + apiCallbacks[name] = tryCatch(fn); + delete args[name]; + } + } + return apiCallbacks; +} + const HOOK_SUCCESS = 'success'; const HOOK_FAIL = 'fail'; const HOOK_COMPLETE = 'complete'; @@ -584,6 +608,72 @@ const $emit = defineSyncApi(API_EMIT, (name, ...args) => { emitter.emit(name, ...args); }, EmitProtocol); +let cid = ''; +/** + * @private + * @param args + */ +function invokePushCallback(args) { + if (args.type === 'clientId') { + cid = args.cid; + invokeGetPushCidCallbacks(cid); + } + else if (args.type === 'pushMsg') { + onPushMessageCallbacks.forEach((callback) => { + callback({ data: args.message }); + }); + } +} +const getPushCidCallbacks = []; +function invokeGetPushCidCallbacks(cid) { + getPushCidCallbacks.forEach((callback) => { + callback(cid); + }); + getPushCidCallbacks.length = 0; +} +function getPushCid(args) { + if (!isPlainObject(args)) { + args = {}; + } + const { success, fail, complete } = getApiCallbacks(args); + const hasSuccess = isFunction(success); + const hasFail = isFunction(fail); + const hasComplete = isFunction(complete); + getPushCidCallbacks.push((cid) => { + let res; + if (cid) { + res = { errMsg: 'getPushCid:ok', cid }; + hasSuccess && success(res); + } + else { + res = { errMsg: 'getPushCid:fail' }; + hasFail && fail(res); + } + hasComplete && complete(res); + }); + if (cid) { + Promise.resolve().then(() => invokeGetPushCidCallbacks(cid)); + } +} +const onPushMessageCallbacks = []; +// 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 +const onPushMessage = (fn) => { + if (onPushMessageCallbacks.indexOf(fn) === -1) { + onPushMessageCallbacks.push(fn); + } +}; +const offPushMessage = (fn) => { + if (!fn) { + onPushMessageCallbacks.length = 0; + } + else { + const index = onPushMessageCallbacks.indexOf(fn); + if (index > -1) { + onPushMessageCallbacks.splice(index, 1); + } + } +}; + const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/; const CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 @@ -772,6 +862,10 @@ const baseApis = { getLocale, setLocale, onLocaleChange, + getPushCid, + onPushMessage, + offPushMessage, + invokePushCallback, }; function initUni(api, protocols) { const wrapper = initWrapper(protocols); diff --git a/packages/uni-stat/lib/uni.plugin.js b/packages/uni-stat/lib/uni.plugin.js index 8e957e5768eea8536c195277dc6f62feca797457..b87c898863329ae8a3590dded15330635276c859 100644 --- a/packages/uni-stat/lib/uni.plugin.js +++ b/packages/uni-stat/lib/uni.plugin.js @@ -14,7 +14,7 @@ var index = [ name: 'uni:stat', enforce: 'pre', config(config, env) { - if (isSsr(env.command, config)) { + if (uniCliShared.isSsr(env.command, config)) { return; } const inputDir = process.env.UNI_INPUT_DIR; @@ -64,15 +64,6 @@ var index = [ }, }; }), -]; -function isSsr(command, config) { - if (command === 'serve') { - return !!(config.server && config.server.middlewareMode); - } - if (command === 'build') { - return !!(config.build && config.build.ssr); - } - return false; -} +]; module.exports = index; diff --git a/packages/uni-stat/src/plugin/index.ts b/packages/uni-stat/src/plugin/index.ts index e4f5f054f3fd7e01f75caf362a89159a643e904a..02031fb1e3df81d91cbd95cb48e4e2cf3312ca31 100644 --- a/packages/uni-stat/src/plugin/index.ts +++ b/packages/uni-stat/src/plugin/index.ts @@ -1,4 +1,3 @@ -import type { ConfigEnv, UserConfig } from 'vite' import debug from 'debug' import { M, @@ -6,6 +5,7 @@ import { getUniStatistics, parseManifestJsonOnce, parsePagesJson, + isSsr, } from '@dcloudio/uni-cli-shared' export default [ @@ -64,13 +64,3 @@ export default [ } }), ] - -function isSsr(command: ConfigEnv['command'], config: UserConfig) { - if (command === 'serve') { - return !!(config.server && config.server.middlewareMode) - } - if (command === 'build') { - return !!(config.build && config.build.ssr) - } - return false -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b228df384001460aca216f8668bfda9b6b253a4e..877832a5050dc57a9d9c1521783c21778e09e264 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -154,6 +154,7 @@ importers: '@dcloudio/uni-cloud': 3.0.0-alpha-3030820220114006 '@dcloudio/uni-components': 3.0.0-alpha-3030820220114006 '@dcloudio/uni-i18n': 3.0.0-alpha-3030820220114006 + '@dcloudio/uni-push': 3.0.0-alpha-3030820220114006 '@dcloudio/uni-shared': 3.0.0-alpha-3030820220114006 '@dcloudio/uni-stat': 3.0.0-alpha-3030820220114006 '@vue/shared': 3.2.30 @@ -161,6 +162,7 @@ importers: '@dcloudio/uni-cloud': link:../uni-cloud '@dcloudio/uni-components': link:../uni-components '@dcloudio/uni-i18n': link:../uni-i18n + '@dcloudio/uni-push': link:../uni-push '@dcloudio/uni-shared': link:../uni-shared '@dcloudio/uni-stat': link:../uni-stat '@vue/shared': 3.2.30 @@ -742,6 +744,17 @@ importers: devDependencies: '@vue/compiler-core': 3.2.30 + packages/uni-push: + specifiers: + '@dcloudio/uni-cli-shared': 3.0.0-alpha-3030820220114006 + '@types/debug': ^4.1.7 + debug: ^4.3.2 + dependencies: + '@dcloudio/uni-cli-shared': link:../uni-cli-shared + debug: 4.3.3 + devDependencies: + '@types/debug': 4.1.7 + packages/uni-quickapp-webview: specifiers: '@dcloudio/uni-cli-shared': 3.0.0-alpha-3030820220114006 diff --git a/scripts/utils.js b/scripts/utils.js index 5ab4f78599e5aecc10b056ee73d7f61a8d40369b..c93a60215d315b6f2c86ef55f4e414deeb55bd25 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -8,6 +8,8 @@ const priority = { 'uni-app': 90, 'uni-cli-shared': 80, 'uni-stat': 75, + 'uni-push': 75, + 'uni-components': 75, 'uni-mp-vue': 75, 'uni-mp-alipay': 70, 'uni-mp-baidu': 70,