var plusContext={};const DC_INTERVAL_ID="__dc__Interval_id__";var __dc__setInterval=function(e,t){return setIntervalWeex(DC_INTERVAL_ID,e,t)},__dc__clearInterval=function(e){clearIntervalWeex(DC_INTERVAL_ID,e)};plusContext.setInterval=__dc__setInterval,plusContext.clearInterval=__dc__clearInterval,plusContext.setTimeout=function(e,t){var n=arguments.length,i=Array(2<n?n-2:0);for(idx=2;idx<n;idx++)i[idx-2]=arguments[idx];var o=__dc__setInterval(function(){__dc__clearInterval(o),e.apply(void 0,i)},t=t||1);return o},plusContext.clearTimeout=__dc__clearInterval,plusContext.getLocationHerf=function(e){return e.weex.config.bundleUrl};var PlusObject=function(plusContext,param){plusContext.__param__=param;var dc_plusobjects={},dc_plusMouldes={};function PlusObject(e,t){for(var n in this.weex=t,this.weex_instance_id=e,this.__HtMl_Id__,this.__io__dc_vue_call_exec_sync="undefined"!=typeof global&&global.__io__dc_vue_call_exec_sync,this.__io__dc_vue_call_exec="undefined"!=typeof global&&global.__io__dc_vue_call_exec,this.weexBridge=t.requireModule("plus"),this.globalEvent=t.requireModule("globalEvent"),dc_plusMouldes){var i;this[n]||(i=dc_plusMouldes[n](plusContext,this,this.require,param[n]))&&(this[n]=i)}}return PlusObject.prototype.updateConfigInfo=function(){var e=this.weexBridge.getConfigInfo();if(e)for(var t in"string"==typeof e&&(e=JSON.parse(e)),this.__WebVieW_Id__=e.__WebVieW_Id__,this.__HtMl_Id__=e.__HtMl_Id__,e){var n=this[t];if("object"==typeof n&&e[t])if(n.updateInfo)n.updateInfo(e[t]);else{var i,o=e[t];for(i in o)n[i]=n[i]||o[i]}}},PlusObject.prototype.require=function(e){var t;return this[e]||(t=dc_plusMouldes[e](plusContext,this,this.require,param[e]))&&(this[e]=t),this[e]},PlusObject.prototype.importMoudle=function(name){if(this[name])return this[name];var script=this.weexBridge.importMoudle(name);return eval(script),this.require(name)},PlusObject.register=function(e,t){dc_plusMouldes[e]=t},PlusObject.newPlus=function(e,t){var n=dc_plusobjects[e];return n||((n=new PlusObject(e,t)).updateConfigInfo(),dc_plusobjects[e]=n),n},PlusObject.deletePlus=function(e){dc_plusobjects[e]&&delete dc_plusobjects[e]},PlusObject}(plusContext,param);function WebviewGroupMoudle(e,r,t){function n(e,t){r.webview.NView.prototype.constructor.apply(this,["WebviewGroup"]),this.__children=[];var n=[];if(Array.isArray(e))for(var i=0;i<e.length;i++){var o=e[i];o.styles=o.styles||{},o.styles.name=o.id;var s=new r.webview.Webview(o.url,o.styles,!0,o.extras);r.webview.__pushWindow__(s),this.__children.push(s);o=[s.__uuid__,[o.url,o.styles,s.__callback_id__,location.host+location.pathname,o.extras]];n.push(o)}r.webview.exec(this,"createGroup",[n,t,this.__callback_id__])}var i=n.prototype;return r.tools.extend(i,t.NView.prototype),(i.constructor=n).prototype.setSelectIndex=function(e){r.webview.exec(this,"setSelectIndex",[e])},n.prototype.children=function(){return this.__children},t.createGroup=function(e,t){return new n(e,t)},n}function LoadWebviewMoudle(e,u,t){var l=t,_="NWindow",c=(u=u).bridge,f=u.tools;function d(){return e.getLocationHerf(u)}function p(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)n(e[t])}function n(e){var t;(t=e).onclick&&"function"==typeof t.onclick&&(e=c.callbackId(function(){t.onclick(t)}),t.__cb__={id:e,htmlId:u.__HtMl_Id__})}function h(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&"input"==t.tag?t.inputStyles&&(t.inputStyles.onComplete&&"function"==typeof t.inputStyles.onComplete&&(t.inputStyles.__onCompleteCallBackId__=c.callbackId(t.inputStyles.onComplete)),t.inputStyles.onFocus&&"function"==typeof t.inputStyles.onFocus&&(t.inputStyles.__onFocusCallBackId__=c.callbackId(t.inputStyles.onFocus)),t.inputStyles.onBlur&&"function"==typeof t.inputStyles.onBlur&&(t.inputStyles.__onBlurCallBackId__=c.callbackId(t.inputStyles.onBlur))):t&&"richtext"==t.tag&&t.richTextStyles&&t.richTextStyles.onClick&&"function"==typeof t.richTextStyles.onClick&&(t.richTextStyles.__onClickCallBackId__=c.callbackId(t.richTextStyles.onClick))}function i(e,t,n,i){if(this.__view_array__=new Array,l.NView.prototype.constructor.apply(this,[_]),this.id=null,t&&t.name&&(this.id=t.name),i)for(var o in i)this[o]=i[o];!this.id&&e&&(this.id=t.name=e),f.platform==f.IOS&&t&&t.navigationbar&&(this.__navigationbar__=t.navigationbar);var s=[],r=null;if(t&&(r=t.titleNView||t.navigationbar)&&(r.uuid="_Nav_Bar_"+this.__uuid__,s.push(r.uuid),u.nativeObj.__appendSubViewInfo(r),p(r.buttons),h(r.tags)),t&&t.subNViews&&Array.isArray(t.subNViews)){for(var c=0;c<t.subNViews.length;c++){var a=t.subNViews[c];h(a.tags),a.uuid=f.UUID("Nativeview"),s.push(a.uuid),u.nativeObj.__appendSubViewInfo(a)}this.__subNViewsUids__=s,this.checkJSObject=!0,setTimeout(function(){this.checkJSObject=!1,u.nativeObj.__removeSubViewInfos(s)})}n||(l.__pushWindow__(this),l.exec(this,_,[e,t,this.__callback_id__,d(),i]))}var o=i.prototype;function s(){e.__needNotifyNative__&&"touchmove"==this.type&&(e.__needNotifyNative__=l.execSync(u.webview.currentWebview(),"needTouchEvent",[])),o.oldPreventDefault.call(this)}return u.tools.extend(o,l.NView.prototype),o.constructor=i,o.show=function(e,t,n,i){var o;n&&"function"==typeof n&&(o=c.callbackId(function(){n()})),l.exec(this,"show",[e,t,null,o,i])},o.close=function(e,t,n){this===u.webview.__JSON_Window_Stack[u.__HtMl_Id__]&&u.bridge.callbackFromNative(this.__callback_id__,{status:u.bridge.OK,message:{evt:"close"},keepCallback:!0}),l.exec(this,"close",[e,t,n])},o.setStyle=function(e){var t;e&&"object"==typeof e&&(!e||(t=e.titleNView||e.navigationbar)&&(h(t.tags),p(t.buttons)),l.exec(this,"setOption",[e]))},o.updateSubNViews=function(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&h(t.tags);l.exec(this,"updateSubNViews",[e])},o.nativeInstanceObject=function(){var e=u.ios||u.android;return e&&e.getWebviewById?e.getWebviewById(this.__uuid__):null},o.hide=function(e,t,n){l.exec(this,"hide",[e,t,n])},o.setVisible=function(e){l.exec(this,"setVisible",[e])},o.pause=function(){l.exec(this,"pause",[])},o.resume=function(){l.exec(this,"resume",[])},o.isPause=function(){return l.execSync(this,"isPause",[])},o.isVisible=function(){return l.execSync(this,"isVisible",[])},o.setFixBottom=function(e){l.exec(this,"setFixBottom",[e])},o.getSubNViews=function(){var e=[],t=l.execSync(this,"getSubNViews",[]);if(t&&Array.isArray(t)&&0<t.length){for(var n=0;n<t.length;n++){var i=u.nativeObj.View.__getViewByUidAndCreate(t[n]);e.push(i)}return e}if(this.checkJSObject&&this.__subNViewsUids__)for(n=0;n<this.__subNViewsUids__.length;n++)(i=u.nativeObj.View.__getViewByUidFromCache(this.__subNViewsUids__[n]))&&e.push(i);return e},o.getNavigationbar=function(){return this.getTitleNView()},o.setTitleNViewButtonBadge=function(e){l.exec(this,"setTitleNViewButtonBadge",[e])},o.removeTitleNViewButtonBadge=function(e){l.exec(this,"removeTitleNViewButtonBadge",[e])},o.showTitleNViewButtonRedDot=function(e){l.exec(this,"showTitleNViewButtonRedDot",[e])},o.hideTitleNViewButtonRedDot=function(e){l.exec(this,"hideTitleNViewButtonRedDot",[e])},o.setTitleNViewSearchInputFocus=function(e){l.exec(this,"setTitleNViewSearchInputFocus",[e])},o.setTitleNViewSearchInputText=function(e){l.exec(this,"setTitleNViewSearchInputText",[e])},o.getTitleNViewSearchInputText=function(){return l.execSync(this,"getTitleNViewSearchInputText")},o.setTitleNViewButtonStyle=function(e,t){null!=e&&t&&(n(t),l.exec(this,"setTitleNViewButtonStyle",[e,t]))},o.getTitleNView=function(){var e,t;return f.platform==f.IOS?(t="_Nav_Bar_"+this.__uuid__,!(e=u.nativeObj.View.getViewById(t))&&this.__navigationbar__&&((e=new u.nativeObj.View(t,this.__navigationbar__,"",!0)).__uuid__=t)):(t=this.__uuid__,(e=u.nativeObj.View.getViewById(t))||(t=l.execSync(this,"getTitleNView",[]))&&((e=new u.nativeObj.View(t.id,t.styles,!0)).__uuid__=t.uuid)),e},e.__needNotifyNative__=!1,o.__needTouchEvent__=function(){Event.prototype.preventDefault!==s&&(o.oldPreventDefault=Event.prototype.preventDefault,Event.prototype.preventDefault=s)},o.drag=function(e,t,n){if(e&&e.direction&&"string"==typeof e.direction&&e.moveMode&&"string"==typeof e.moveMode){var i=e.moveMode.toLocaleLowerCase();if("followfinger"==i||"follow"==i||"silent"==i||"bounce"==i){var o,s,r=e.direction.toLocaleLowerCase();if("left"==r||"right"==r||"rtl"==r||"ltr"==r){if("rtl"==r&&(e.direction="left"),"ltr"==r&&(e.direction="right"),t){r=t.view;if(null!=r&&("string"==typeof r||r instanceof u.webview.Webview||r instanceof u.nativeObj.View)&&("string"!=typeof r&&(t.view=r.__uuid__),t.moveMode)){if("string"!=typeof t.moveMode)return;r=t.moveMode.toLocaleLowerCase();if("follow"!=r&&"silent"!=r)return;if("silent"==i&&"silent"==r)return}}n&&"function"==typeof n&&(o=u.webview.currentWebview().__uuid__,s=c.callbackId(n)),l.exec(this,"drag",[e,t,o,s])}}}},o.setJsFile=function(e,t){e&&"string"==typeof e&&l.exec(this,"setPreloadJsFile",[e,t])},o.appendJsFile=function(e){e&&"string"==typeof e&&l.exec(this,"appendPreloadJsFile",[e])},o.setContentVisible=function(e){l.exec(this,"setContentVisible",[e])},o.opener=function(){var e=l.execSync(this,"opener",[]);return e?u.webview._find__Window_By_UUID__(e.uuid,e.id,e.extras):null},o.opened=function(){var e=l.execSync(this,"opened",[]);if(e){for(var t=[],n={},i=0;i<e.length;i++){var o=e[i],s=u.webview.__JSON_Window_Stack[o];s||((s=new u.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,s.id=o.id,c.exec("UI","execMethod",["UI","setcallbackid",[s.__uuid__,[s.__callback_id__]]])),t.push(s),n[s.__uuid__]=s}return t}},o.remove=function(e){var t;if("string"==typeof e)t=e;else{if(!(e instanceof u.webview.Webview))return e instanceof u.nativeObj.View?void l.exec(this,"removeNativeView",[_,e.__uuid__]):void 0;t=e.__uuid__}l.exec(this,"remove",[t])},o.removeFromParent=function(){l.exec(this,"removeFromParent",[])},o.parent=function(){var e=l.execSync(this,"parent",[]);return e?u.webview._find__Window_By_UUID__(e.uuid,e.id,e.extras):null},o.children=function(){for(var e=[],t=l.execSync(this,"children",[]),n=0;n<t.length;n++)e.push(u.webview._find__Window_By_UUID__(t[n].uuid,t[n].id,t[n].extras));return e},o.getURL=function(){return l.execSync(this,"getUrl",[])},o.getTitle=function(){return l.execSync(this,"getTitle",[])},o.getStyle=function(){return l.execSync(this,"getOption")},o.loadURL=function(e,t){e&&"string"==typeof e&&l.exec(this,"load",[e,d(),t])},o.loadData=function(e,t){e&&"string"==typeof e&&l.exec(this,"loadData",[e,t])},o.stop=function(){l.exec(this,"stop",[])},o.reload=function(e){l.exec(this,"reload",[e])},o.draw=function(e,t,n,i){var o,s;f.platform==f.IOS?e.__captureWebview?e.__captureWebview(this.__uuid__,i,t,n):"function"==typeof n&&n({code:-1,message:"Parameter error"}):(o=function(e){"function"==typeof n&&n(e)},e&&e.__id__?(s=c.callbackId(function(){"function"==typeof t&&t()},o),l.exec(this,"draw",[e.__id__,this.__uuid__,s,i])):o({code:-1,message:"Destroyed objects"}))},o.checkRenderedContent=function(e,t,n){var i=c.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});l.exec(this,"checkRenderedContent",[this.__uuid__,i,e])},o.back=function(){l.exec(this,"back",[])},o.forward=function(){l.exec(this,"forward",[])},o.canBack=function(n){var e;n&&"function"==typeof n&&(n&&(e=c.callbackId(function(e){var t={};t.canBack=e,n(t)})),l.exec(this,"canBack",[e]))},o.canForward=function(n){var e;n&&"function"==typeof n&&(n&&(e=c.callbackId(function(e){var t={};t.canForward=e,n(t)})),l.exec(this,"canForward",[e]))},o.clear=function(){l.exec(this,"clear",[])},o.evalJS=function(e){e&&"string"==typeof e&&l.exec(this,"evalJS",[e])},o.evalJSSync=function(e){if(e&&"string"==typeof e)return l.execSync(this,"evalJSSync",[e])},o.test=function(e){l.exec(this,"test",[e])},o.append=function(e){e&&(e instanceof i||e instanceof u.webview.WebviewGroup?(this.__view_array__.push(e),l.exec(this,"append",[e.__IDENTITY__,e.__uuid__])):e instanceof u.nativeObj.View?l.exec(this,"appendNativeView",[e.IDENTITY||_,e.__uuid__]):l.exec(this,"appendNativeView",[e.IDENTITY||_,e.__uuid__||e.id||e._UUID_]))},o.setPullToRefresh=function(e,t){var n;t&&(n=u.bridge.callbackId(t)),this.addEventListener("pulldownrefreshevent",t,!1),l.exec(this,"setPullToRefresh",[e,n])},o.endPullToRefresh=function(){l.exec(this,"endPullToRefresh",[])},o.beginPullToRefresh=function(){l.exec(this,"beginPullToRefresh",[])},o.setBounce=function(e,t){l.exec(this,"setBounce",[e,t])},o.resetBounce=function(){l.exec(this,"resetBounce",[])},o.setBlockNetworkImage=function(e){l.exec(this,"setBlockNetworkImage",[e])},o.captureSnapshot=function(e,t,n){var i="function"!=typeof t?null:function(e){t()},o=u.bridge.callbackId(i,"function"!=typeof n?null:function(e){n(e)});u.tools.platform==u.tools.IOS?i():l.exec(this,"captureSnapshot",[e,o])},o.clearSnapshot=function(e){u.tools.platform!=u.tools.IOS&&l.exec(this,"clearSnapshot",[e])},o.overrideUrlLoading=function(e,t){var n=c.callbackId(function(e){"function"==typeof t&&t(e)});l.exec(this,"overrideUrlLoading",[e,n])},o.overrideResourceRequest=function(e){l.exec(this,"overrideResourceRequest",[e])},o.isHardwareAccelerated=function(){return f.platform!=f.IOS&&l.execSync(this,"isHardwareAccelerated",[])},o.listenResourceLoading=function(e,t){var n=c.callbackId(function(e){"function"==typeof t&&t(e)});l.exec(this,"listenResourceLoading",[e,n])},o.setCssFile=function(e){l.exec(this,"setCssFile",[e])},o.setCssText=function(e){l.exec(this,"setCssText",[e])},o.showBehind=function(e){l.exec(this,"showBehind",[e.__IDENTITY__,e.__uuid__])},o.animate=function(e,t){var n;f.platform!=f.IOS?(t&&(n=c.callbackId(function(){"function"==typeof t&&t()})),l.exec(this,"webview_animate",[e,n])):setTimeout(t,10)},o.interceptTouchEvent=function(e){l.exec(this,"interceptTouchEvent",[e])},o.setFavoriteOptions=function(e){l.exec(this,"setFavoriteOptions",[e])},o.getFavoriteOptions=function(){return l.execSync(this,"getFavoriteOptions")},o.setShareOptions=function(e){l.exec(this,"setShareOptions",[e])},o.getShareOptions=function(){return l.execSync(this,"getShareOptions")},o.getSafeAreaInsets=function(){return u.tools.ANDROID==u.tools.platform?{bottom:0,left:0,right:0,top:0,deviceBottom:0,deviceLeft:0,deviceRight:0,deviceTop:0}:l.execSync(this,"getSafeAreaInsets")},o.restore=function(){l.exec(this,"webview_restore",null)},o.setSoftinputTemporary=function(e){l.exec(this,"setSoftinputTemporary",[e])},i}service.register("weexPlus",{create:function(t,e,n){return{instance:{WeexPlus:function(e){return PlusObject.newPlus(t,e)}}}},refresh:function(e,t,n){},destroy:function(e,t){PlusObject.deletePlus(e)}}),PlusObject.register("tools",function(t,e,n,i){var o={__UUID__:0,UNKNOWN:-1,IOS:0,ANDROID:1,platform:-1,debug:!1,UUID:function(e){return e+this.__UUID__+++(new Date).valueOf()},extend:function(e,t){for(var n in t)e[n]=t[n]},typeName:function(e){return Object.prototype.toString.call(e).slice(8,-1)},isDate:function(e){return"Date"==this.typeName(e)},isArray:function(e){return"Array"==this.typeName(e)},isDebug:function(){return this.debug},stringify:function(e){return(t&&t.JSON3?t.JSON3:JSON).stringify(e)},isNumber:function(e){return"number"==typeof e||e instanceof Number},getElementOffsetInWebview:function(e,t){for(var n=0,i=e;i;)n+=i[t],i=i.offsetParent;return n},getElementOffsetXInWebview:function(e){return this.getElementOffsetInWebview(e,"offsetLeft")},getElementOffsetYInWebview:function(e){return this.getElementOffsetInWebview(e,"offsetTop")},execJSfile:function(e){var t=document.createElement("script");t.type="text/javascript",t.src=e,function e(t){var n=document.head,i=document.body;n?n.insertBefore(t,n.firstChild):i?i.insertBefore(t,i.firstChild):setTimeout(function(){e(t)},100)}(t)},copyObjProp2Obj:function(e,t,n){var i,o=!!Array.isArray(n);for(i in t){var s=!0;if(o)for(var r=0;r<n.length;r++)if(i==n[r]){s=!1;break}s?e[i]=t[i]:s=!0}},clone:function(e){if(!e||"function"==typeof e||this.isDate(e)||"object"!=typeof e)return e;var t,n;if(this.isArray(e)){for(t=[],n=0;n<e.length;++n)t.push(this.clone(e[n]));return t}for(n in t={},e)n in t&&t[n]==e[n]||(t[n]=o.clone(e[n]));return t}};return o.debug=!(!t.__param__||!t.__param__.debug),o.platform=t.__param__.platform,o}),PlusObject.register("bridge",function(plusContext,plus,require,param){var T=plus.tools;return plus.globalEvent.addEventListener("nativeToUniJs",function(e){if(e)try{eval(e.data)}catch(e){}}),{NO_RESULT:0,OK:1,CLASS_NOT_FOUND_EXCEPTION:2,ILLEGAL_ACCESS_EXCEPTION:3,INSTANTIATION_EXCEPTION:4,MALFORMED_URL_EXCEPTION:5,IO_EXCEPTION:6,INVALID_ACTION:7,JSON_EXCEPTION:8,ERROR:9,callbacks:{},exec:function(e,t,n,i,o){n&&n.push(i),T.IOS==T.platform?plus.weexBridge.exec(T.stringify([plus.__HtMl_Id__,e,t,i||null,n])):T.ANDROID==T.platform&&(plus.__io__dc_vue_call_exec?plus.__io__dc_vue_call_exec(plus.weex_instance_id,T.stringify(n),"pdr:"+T.stringify([e,t,!0])):plus.weexBridge.exec(T.stringify(n),"pdr:"+T.stringify([e,t,!0])))},execSync2:function(e,t,n,i,o){return this.execSync(e,t,n,i,o)},execSync:function(service,action,args,fn,force){var ret,json,ret;if(T.IOS==T.platform?(json=T.stringify([plus.__HtMl_Id__,service,action,null,args]),ret=plus.weexBridge.execSync(json)):T.ANDROID==T.platform&&(ret=plus.__io__dc_vue_call_exec_sync?plus.__io__dc_vue_call_exec_sync(plus.weex_instance_id,T.stringify(args),"pdr:"+T.stringify([service,action,!1])):plus.weexBridge.execSync(T.stringify(args),"pdr:"+T.stringify([service,action,!1]))),fn)return fn(ret);var _ret=void 0;try{_ret=eval(ret)}catch(e){}return _ret},nativeEval:function(e){e()},callbackFromNative:function(e,t){var n=this.callbacks[e];n&&(t.status==this.OK&&n.success?n.success&&n.success(t.message):n.fail&&n.fail(t.message),t.keepCallback||delete this.callbacks[e])},callbackId:function(e,t){var n=T.UUID("plus");return this.callbacks[n]={success:e,fail:t},n}}}),PlusObject.register("obj",function(e,t,n,i){function o(){var r=this;r.__callbacks__={},r.__callback_id__=t.bridge.callbackId(function(e){var t=e.evt,n=e.args,i=r.__callbacks__[t];if(i)for(var o=i.length,s=0;s<o;s++)r.onCallback(i[s],t,n)})}return o.prototype.addEventListener=function(e,t,n){var i=!1;return t&&this.__callbacks__&&(this.__callbacks__[e]||(this.__callbacks__[e]=[],i=!0),this.__callbacks__[e].push(t)),i},o.prototype.removeEventListener=function(e,t){var n=!1,i=this;return i.__callbacks__&&i.__callbacks__[e]&&(i.__callbacks__[e].pop(t),(n=0===i.__callbacks__[e].length)&&(i.__callbacks__[e]=null)),n},{Callback:o}}),PlusObject.register("device",function(e,t,n,i){var s=t.require("bridge");return{imei:i&&i.imei||"",imsi:i&&i.imsi||[],model:i&&i.model||"",vendor:i&&i.vendor||"",uuid:i&&i.uuid||"",dial:function(e,t){s.exec("Device","dial",[e,t])},beep:function(e){s.exec("Device","beep",[e])},vibrate:function(e){s.exec("Device","vibrate",[e])},setWakelock:function(e){s.exec("Device","setWakelock",[e])},isWakelock:function(){return s.execSync("Device","isWakelock",[])},setVolume:function(e){s.execSync("Device","setVolume",[e])},getVolume:function(){return s.execSync("Device","getVolume",[])},execCallback:function(t,e){var n="function"!=typeof t.complete?function(){}:t.complete,i="function"!=typeof t.success?n:function(e){t.success(e),n(e)},o="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};callbackID=s.callbackId(i,o),s.exec("Device",e,[callbackID])},getInfo:function(e){this.execCallback(e,"getInfo")},getOAID:function(e){this.execCallback(e,"getOAID")},getVAID:function(e){this.execCallback(e,"getVAID")},getAAID:function(e){this.execCallback(e,"getAAID")},isCaptured:function(){return s.execSync("Device","isCaptured",[])},updateInfo:function(e){e&&(this.imei=e.imei,this.imsi=e.imsi,this.model=e.model,this.vendor=e.vendor,this.uuid=e.uuid)},getDeviceId:function(){return s.execSync("Device","getDeviceId",[])}}}),PlusObject.register("os",function(e,t,n,i){return{language:(i=i||{}).language||null,version:i.version||null,name:i.name||null,vendor:i.vendor||null,updateInfo:function(e){e&&(this.language=e.language,this.version=e.version,this.name=e.name,this.vendor=e.vendor)}}}),PlusObject.register("screen",function(e,t,n,i){var o=t.require("bridge");return{resolutionHeight:(i=i||{}).resolutionHeight||null,resolutionWidth:i.resolutionWidth||null,scale:i.scale||null,dpiX:i.dpiX||null,dpiY:i.dpiY||null,height:i.height||null,width:i.width||null,setBrightness:function(e,t){o.execSync("Device","setBrightness",[e,t])},lockOrientation:function(e){o.exec("Device","lockOrientation",[e])},unlockOrientation:function(){o.exec("Device","unlockOrientation",[])},getBrightness:function(e){return o.execSync("Device","getBrightness",[e])},getCureentSize:function(){return o.execSync("Device","getCurrentSize",[])},getCurrentSize:function(){return o.execSync("Device","getCurrentSize",[])},updateInfo:function(e){e&&(this.resolutionHeight=e.resolutionHeight,this.resolutionWidth=e.resolutionWidth,this.scale=e.scale,this.dpiX=e.dpiX,this.dpiY=e.dpiY,this.width=e.width,this.height=e.height)}}}),PlusObject.register("display",function(e,t,n,i){return{resolutionHeight:(i=i||{}).resolutionHeight||null,resolutionWidth:i.resolutionWidth||null,updateInfo:function(e){e&&(this.resolutionHeight=e.resolutionHeight,this.resolutionWidth=e.resolutionWidth)}}}),PlusObject.register("networkinfo",function(e,t,n,i){var o=t.require("bridge");return{CONNECTION_TYPE:i.CONNECTION_TYPE,CONNECTION_UNKNOW:0,CONNECTION_NONE:1,CONNECTION_ETHERNET:2,CONNECTION_WIFI:3,CONNECTION_CELL2G:4,CONNECTION_CELL3G:5,CONNECTION_CELL4G:7,getCurrentType:function(){return o.execSync("Device","getCurrentType",null)},getCurrentAPN:function(){return o.execSync("Device","getCurrentAPN",null)},isSetProxy:function(){return o.execSync("Device","isSetProxy",null)}}}),PlusObject.register("runtime",function(e,t,n,i){var c=t.bridge,a="Runtime";return{appid:null,arguments:(i=i||{}).arguments||null,version:i.version||null,innerVersion:i.innerVersion||null,uniVersion:i.uniVersion||null,launchLoadedTime:null,launcher:null,origin:null,processId:null,startupTime:null,restart:function(){c.exec(a,"restart",[])},install:function(e,t,n,i){i=c.callbackId(n,i);c.exec(a,"install",[e,i,t])},getProperty:function(e,t){t=c.callbackId(t);c.exec(a,"getProperty",[e,t])},quit:function(){c.exec(a,"quit",[])},openURL:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"openURL",[e,i,n])},launchApplication:function(e,t){var n=c.callbackId(null,function(e){"function"==typeof t&&t(e)});c.exec(a,"launchApplication",[e,n])},setBadgeNumber:function(e,t){"number"==typeof e&&c.exec(a,"setBadgeNumber",[e,t])},openFile:function(e,t,n){var i=c.callbackId(null,function(e){"function"==typeof n&&n(e)});c.exec(a,"openFile",[e,t,i])},openDocument:function(e,t,n,i){var o=c.callbackId(function(e){"function"==typeof n&&n(e)},function(e){"function"==typeof i&&i(e)});c.exec(a,"openDocument",[e,t,o])},showPrivacyDialog:function(e){t.tools.ANDROID==t.tools.platform&&this.execCallback(e,"showPrivacyDialog")},execCallback:function(t,e){var n="function"!=typeof t.complete?function(){}:t.complete,i="function"!=typeof t.success?n:function(e){t.success(e),n(e)},o="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};callbackID=c.callbackId(i,o),c.exec(a,e,[callbackID,t])},isStreamValid:function(){return c.execSync(a,"isStreamValid")},openWeb:function(e){return c.exec(a,"openWeb",[e])},isApplicationExist:function(e){return null!=e&&"string"!=typeof e&&c.execSync(a,"isApplicationExist",[e])},processDirectPage:function(){return c.execSync(a,"processDirectPage",[])},isCustomLaunchPath:function(){return c.execSync(a,"isCustomLaunchPath")},updateInfo:function(e){e&&(this.appid=e.appid,this.arguments=e.arguments,this.version=e.version,this.versionCode=e.versionCode,this.innerVersion=e.innerVersion,this.uniVersion=e.uniVersion,this.launchLoadedTime=e.launchLoadedTime,this.launcher=e.launcher,this.origin=e.origin,this.processId=e.processId,this.startupTime=e.startupTime,this.channel=e.channel)},getDCloudId:function(){return c.execSync(a,"getDCloudId")},agreePrivacy:function(){c.exec(a,"agreePrivacy",[])},disagreePrivacy:function(){c.exec(a,"disagreePrivacy",[])},isAgreePrivacy:function(){return c.execSync(a,"isAgreePrivacy",[])},downloadFile:function(o,s,r){var e;if("string"==typeof o.url)10<o.url.length&&"blob:file:"==o.url.substring(0,10)?((e=new XMLHttpRequest).open("GET",o.url,!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.responseType="blob",e.onload=function(e){if(200==this.status){var t=this.response;try{const i=new FileReader;i.onload=function(e){var t=c.callbackId(s,r);c.exec(a,"downloadBlob",[e.target.result,o.fileName,t])},i.readAsDataURL(t),i.onerror=function(){r({code:-1,message:"blob error"})}}catch(e){r(n={code:-1,message:e})}}else{var n={code:-1,message:this.status};r(n)}},e.onerror=function(e){r({code:-1,message:"data error"})},e.send()):((e=document.createElement("a")).href=o.url+"&DCLOUD_DOWNLOAD_BLOB:"+o.fileName,e.download=o.fileName,e.click());else try{const t=new FileReader;t.onload=function(e){var t=c.callbackId(s,r);c.exec(a,"downloadBlob",[e.target.result,o.fileName,t])},t.readAsDataURL(o.url),t.onerror=function(){r({code:-1,message:"blob error"})}}catch(e){r({code:-1,message:e})}}}}),PlusObject.register("accelerometer",function(s,r,e,t){function o(e,t,n){this.xAxis=e,this.yAxis=t,this.zAxis=n}var n=r.bridge,c=r.tools,i="Accelerometer",a=!1,u={},l=[],_=null;function f(e){var t=n.callbackId(function(e){var t=l.slice(0);_=new o(e.x,e.y,e.z);for(var n=0,i=t.length;n<i;n++)t[n].win(_)},function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].fail(e)});n.exec(i,"start",[t,e]),a=!0}function d(e,t){return{win:e,fail:t}}function p(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(n.exec(i,"stop",[]),a=!1))}return{getCurrentAcceleration:function(t,n,e){var i=d(function(e){p(i),t(e)},function(e){p(i),n&&n(e)});l.push(i),a||f(-1)},watchAcceleration:function(e,t,n){var i=n&&n.frequency&&"number"==typeof n.frequency?n.frequency:500,n=c.UUID("watch"),o=d(function(){},function(e){p(o),t&&t(e)});return l.push(o),u[n]={timer:(s.setInterval?s:r).setInterval(function(){_&&e(_)},i),listeners:o},a?_&&e(_):f(i),n},clearWatch:function(e){e&&u[e]&&((s.clearInterval?s:r).clearInterval(u[e].timer),p(u[e].listeners),delete u[e])}}}),PlusObject.register("geolocation",function(r,c){var a="Geolocation",u=(c=c).bridge,l=c.tools,_={};function n(e,t,n,i,o,s,r){this.latitude=e,this.longitude=t,this.accuracy=void 0!==i?i:null,this.altitude=void 0!==n?n:null,this.heading=void 0!==o?o:null,this.speed=void 0!==s?s:null,0!==this.speed&&null!==this.speed||(this.heading=NaN),this.altitudeAccuracy=void 0!==r?r:null}function f(e,t){e?(this.coordsType=e.coordsType,this.address=e.address,this.addresses=e.addresses,this.coords=new n(e.latitude,e.longitude,e.altitude,e.accuracy,e.heading,e.velocity,e.altitudeAccuracy)):this.coords=new n,this.timestamp=void 0!==t?t:(new Date).getTime()}function d(e,t){this.code=e||null,this.message=t||""}function p(e){var t={maximumAge:1e3,enableHighAccuracy:!1,timeout:1/0,geocode:!0};return e&&(void 0!==e.maximumAge&&!isNaN(e.maximumAge)&&0<e.maximumAge&&(t.maximumAge=e.maximumAge),void 0!==e.enableHighAccuracy&&(t.enableHighAccuracy=e.enableHighAccuracy),void 0===e.timeout||isNaN(e.timeout)||(e.timeout<0?t.timeout=0:t.timeout=e.timeout),e.coordsType&&(t.coordsType=e.coordsType),e.provider&&(t.provider=e.provider),void 0!==e.geocode&&(t.geocode=e.geocode)),t}function h(e,t){var n;return n=r.setTimeout?r.setTimeout(function(){y(n),n=null,e(new d(d.TIMEOUT,"Position retrieval timed out."))},t):c.setTimeout(function(){y(n),e(new d(d.TIMEOUT,"Position retrieval timed out."))},t)}function y(e){r.clearTimeout?!0!==e&&r.clearTimeout(e):!0!==e&&c.clearTimeout(e)}d.PERMISSION_DENIED=1,d.POSITION_UNAVAILABLE=2,d.TIMEOUT=3,d.UNKNOWN_ERROR=4;var g=c.geolocation={lastPosition:null,getCurrentPosition:function(e,t,n){v(e,t,n,!0)},watchPosition:function(t,n,i){i=p(i);var o=l.UUID("timer");_[o]=v(t,n,i,!1);function s(e){y(_[o].timer),_[o].isStop=!0,e=new d(e.code,e.message),n&&n(e)}var e=u.callbackId(function(e){_[o].isStop||(y(_[o].timer),i.timeout!==1/0&&(_[o].timer=h(s,i.timeout)),e=new f({latitude:e.latitude,longitude:e.longitude,altitude:e.altitude,accuracy:e.accuracy,heading:e.heading,velocity:e.velocity,coordsType:e.coordsType,address:e.address,addresses:e.addresses,altitudeAccuracy:e.altitudeAccuracy},void 0===e.timestamp?(new Date).getTime():e.timestamp instanceof Date?e.timestamp.getTime():e.timestamp),g.lastPosition=e,t(e))},s);return u.exec(a,"watchPosition",[e,o,i.enableHighAccuracy,i.coordsType,i.provider,i.geocode,i.timeout,i.maximumAge],{cbid:e,l:r.getLocationHerf(c)}),o},clearWatch:function(e){e&&void 0!==_[e]&&(_[e].isStop=!0,y(_[e].timer),u.exec(a,"clearWatch",[e]))}};function v(t,n,e,i){e=p(e);var o={timer:null,isStop:!1},s=function(e){y(o.timer),o.timer=null;e=new d(e.code,e.message);n&&n(e)};return g.lastPosition&&e.maximumAge&&(new Date).getTime()-g.lastPosition.timestamp<=e.maximumAge?t(g.lastPosition):0===e.timeout?s(new d(d.TIMEOUT,"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter.")):(e.timeout!==1/0?o.timer=h(s,e.timeout):o.timer=!0,i&&(s=u.callbackId(function(e){y(o.timer),o.timer&&(e=new f({latitude:e.latitude,longitude:e.longitude,altitude:e.altitude,accuracy:e.accuracy,heading:e.heading,velocity:e.velocity,coordsType:e.coordsType,address:e.address,addresses:e.addresses,altitudeAccuracy:e.altitudeAccuracy},void 0===e.timestamp?(new Date).getTime():e.timestamp instanceof Date?e.timestamp.getTime():e.timestamp),g.lastPosition=e,t(e))},s),u.exec(a,"getCurrentPosition",[s,e.enableHighAccuracy,e.maximumAge,e.coordsType,e.provider,e.geocode,e.timeout],{cbid:s,l:r.getLocationHerf(c)}))),o}return g}),PlusObject.register("stream",function(e,t){var i=t.bridge,o=t.tools,s="Stream";t.stream={open:function(e,t,n){n=i.callbackId(t,n);i.exec(s,"open",[e,n])},setRestoreState:function(e){i.exec(s,"setRestoreState",[e])},preload:function(e){i.exec(s,"preload",[e])},list:function(e,t,n){n=i.callbackId(t,n);i.exec(s,"list",[e,n])},remove:function(e){i.exec(s,"remove",[e])},freetrafficRequest:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(s,"freetrafficRequest",[e,t])):"function"==typeof n&&n({code:-3,message:"Not Supported"})},freetrafficBind:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(s,"freetrafficBind",[e,t])):"function"==typeof n&&n({code:-3,message:"Not Supported"})},freetrafficRelease:function(e,t,n){o.platform!=o.IOS?(t=i.callbackId(t,n),i.exec(s,"freetrafficRelease",[e,t])):"function"==typeof n&&n({code:-3,message:"Not Supported"})},freetrafficInfo:function(e,t){o.platform!=o.IOS?(e=i.callbackId(e,t),i.exec(s,"freetrafficInfo",[e])):"function"==typeof t&&t({code:-3,message:"Not Supported"})},freetrafficIsValid:function(){if(o.platform!=o.IOS)return i.exec(s,"freetrafficIsValid",null);"function"==typeof errorCallback&&errorCallback({code:-3,message:"Not Supported"})},activate:function(){o.platform!=o.IOS?i.exec(s,"activate",null):"function"==typeof errorCallback&&errorCallback({code:-3,message:"Not Supported"})}}}),PlusObject.register("video",function(r,c){var s;c.__Media_Live__Push__=(s=[],{pushCallback_LivePush:function(e,t,n,i,o){s[o]={fun:t,nokeep:n,pushobj:i}},execCallback_LivePush:function(e,t,n){var i;s[n]&&((i={}).type=e,i.target=s[n].pushobj,i.detail=t,s[n].fun&&s[n].fun(i))}});var a=c.bridge,u="VideoPlayer",l="LivePusher",_=c.tools,o={},n={};function f(e){return _.getElementOffsetXInWebview(e)}function d(e){return _.getElementOffsetYInWebview(e)}function i(e,t,n,i){this.id=_.UUID("dt"),this.IDENTITY=u,this.userId=n,div=r.document&&document.getElementById(e);var o=this.id;i||(i=[],div&&(c.tools.platform==c.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[f(div),d(div),div.offsetWidth,div.offsetHeight];a.exec(u,"resize",[o,e])},200)},!1):div.addEventListener("resize",function(){var e=[f(div),d(div),div.offsetWidth,div.offsetHeight];a.exec(u,"resize",[o,e])},!1),i=[f(div),d(div),div.offsetWidth,div.offsetHeight]),a.exec(u,"VideoPlayer",[this.id,i,t,n]))}var e=i.prototype;function t(t,e,n,i){this.IDENTITY="LivePusher",this.id=n,this.__uuid__=c.tools.UUID("LivePusher"),this.options=e,this.onCapture=null,me=this;var o=null;null==n&&(this.id=this.__uuid__);var s=r.document&&document.getElementById(t);null!=s&&(c.tools.ANDROID==c.tools.platform?window.onresize=function(){var e=document.getElementById(t),e=[f(e),d(e),e.offsetWidth,e.offsetHeight];a.exec(l,"resize",[me.__uuid__,e])}:c.tools.IOS==c.tools.platform&&s.addEventListener("resize",function(){var e=[f(s),d(s),s.offsetWidth,s.offsetHeight];a.exec(l,"resize",[me.__uuid__,e])},!1),o=[f(s),d(s),s.offsetWidth,s.offsetHeight]),null!=i&&!i||a.exec(l,"LivePusher",[this.__uuid__,this.id,o,e])}e.play=function(){a.exec(u,"VideoPlayer_play",[this.id])},e.pause=function(){a.exec(u,"VideoPlayer_pause",[this.id])},e.stop=function(){a.exec(u,"VideoPlayer_stop",[this.id])},e.close=function(){a.exec(u,"VideoPlayer_close",[this.id])},e.sendDanmu=function(e){a.exec(u,"VideoPlayer_sendDanmu",[this.id,e])},e.seek=function(e){a.exec(u,"VideoPlayer_seek",[this.id,e])},e.playbackRate=function(e){a.exec(u,"VideoPlayer_playbackRate",[this.id,e])},e.requestFullScreen=function(e){a.exec(u,"VideoPlayer_requestFullScreen",[this.id,e])},e.exitFullScreen=function(){a.exec(u,"VideoPlayer_exitFullScreen",[this.id])},e.hide=function(){a.exec(u,"VideoPlayer_hide",[this.id])},e.show=function(){a.exec(u,"VideoPlayer_show",[this.id])},e.hideStatusBar=function(){a.exec(u,"VideoPlayer_hideStatusBar",[this.id])},e.showStatusBar=function(){a.exec(u,"VideoPlayer_showStatusBar",[this.id])},e.setOptions=function(e){a.exec(u,"VideoPlayer_setOptions",[this.id,e])},e.setStyles=e.setOptions,e.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=a.callbackId(n)),a.exec(u,"VideoPlayer_addEventListener",[this.id,e,n,c.__HtMl_Id__])};e=t.prototype;function p(t,e){e&&e.onCapture&&"function"==typeof e.onCapture&&(e.__onCaptureCallbackId__=a.callbackId(e.onCapture));var n=document.getElementById(t);c.tools.ANDROID==c.tools.platform?window.onresize=function(){var e=document.getElementById(t),e=[f(e),d(e),e.offsetWidth,e.offsetHeight];a.exec(u,"resize",e)}:c.tools.IOS==c.tools.platform&&n.addEventListener("resize",function(){var e=[f(n),d(n),n.offsetWidth,n.offsetHeight];a.exec(u,"resize",e)},!1);var i=[n.offsetLeft,n.offsetTop,n.offsetWidth,n.offsetHeight];a.exec(u,"VideoCapture",[i,e])}e.start=function(t,n){var e=a.callbackId("function"!=typeof t?null:function(e){t()},"function"!=typeof n?null:function(e){n(e)});a.exec(l,"start",[this.__uuid__,e])},e.preview=function(){a.exec(l,"preview",[this.__uuid__])},e.stop=function(e){a.exec(l,"stop",[this.__uuid__,e])},e.pause=function(){a.exec(l,"pause",[this.__uuid__])},e.close=function(){a.exec(l,"close",[this.__uuid__])},e.resume=function(){a.exec(l,"resume",[this.__uuid__])},e.close=function(){a.exec(l,"close",[this.__uuid__])},e.setStyles=function(e){a.exec(l,"setOptions",[this.__uuid__],e)},e.setOptions=function(e){a.exec(l,"setOptions",[this.__uuid__],e)},e.switchCamera=function(e){a.exec(l,"switchCamera",[this.__uuid__])},e.addEventListener=function(e,t,n){var i,o=this;t&&(i=function(e){"function"==typeof callback&&(e.target=o,t(e))},t.listener=i,i=a.callbackId(i)),c.__Media_Live__Push__.pushCallback_LivePush(e,t,n,this,i),a.exec(l,"addEventListener",[this.__uuid__,c.__HtMl_Id__,e,i])},e.snapshot=function(t,n){var e=a.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});a.exec(l,"snapshot",[this.__uuid__,e])};e=p.prototype;function h(e,t){t&&t.video&&(t.video.onCaptionChanged&&"function"==typeof t.video.onCaptionChanged&&(t.video.__onCaptionChangedCallbackId__=a.callbackId(t.onCapture)),t.video.onWatermarkChanged&&"function"==typeof t.video.onWatermarkChanged&&(t.video.__onWatermarkChangedCallbackId__=a.callbackId(t.onCapture))),div=document.getElementById(e),div.addEventListener("resize",function(){var e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];a.exec(_BARCODE,"resize",[e])},!1);e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];a.exec(u,"VideoEditor",[e,t])}e.setFilter=function(e){a.exec(u,"VideoCapture_setFilter",[e])},e.setFacing=function(e){a.exec(u,"VideoCapture_setFacing",[e])},e.setResolution=function(e){a.exec(u,"VideoCapture_setResolution",[e])},e.start=function(){a.exec(u,"VideoCapture_start",[])},e.stop=function(){a.exec(u,"VideoCapture_stop",[])},e.getSupportedResolutions=function(){return a.execSync(u,"VideoCapture_getSupportedResolutions",[])},e.close=function(){a.exec(u,"VideoCapture_close",[]),this.isClose=!0};e=h.prototype;e.setCaption=function(e,t){a.exec(u,"VideoEditor_setCaption",[e,t])},e.setWatermark=function(e,t){a.exec(u,"VideoEditor_setWatermark",[e,t])},e.setIndex=function(e){a.exec(u,"VideoEditor_setIndex",[e])},e.play=function(){a.exec(u,"VideoEditor_play",[])},e.pause=function(){a.exec(u,"VideoEditor_pause",[])},e.close=function(){a.exec(u,"VideoEditor_close",[]),this.isClose=!0};e={VideoPlayer:i,createVideoPlayer:function(e,t){return e=new i(null,t,e),n[e.id]=e,n[e.id]},getVideoPlayerById:function(e){if(e&&"string"==typeof e){var t=a.execSync(u,"getVideoPlayerById",[e]);if(null!=t&&null!=t.uid){if(n[t.uid])return n[t.uid];if(null==t)return null;e=new c.video.VideoPlayer(null,null,t.name,!0);return e.id=t.uid,n[t.uid]=e}}},createLivePusher:function(e,t,n){var i=!0,i=new c.video.LivePusher(null,t,e,i=null!=n&&!n?!1:i);return o[i.__uuid__]=i,o[i.__uuid__]},getLivePusherById:function(e){if(e&&"string"==typeof e){var t=a.execSync(l,"getLivePusherById",[e]);if(null!=t&&t.uuid){if(o[t.uuid])return o[t.uuid];e=new c.video.LivePusher(null,null,e,!1);return e.__uuid__=t.uuid,o[t.uuid]=e}return null}},VideoCapture:p,VideoEditor:h,LivePusher:t,getSupportedResolutions:function(){return a.execSync(u,"getSupportedResolutions",[])},getVideoInfo:function(e,t){var n=null;t&&"function"==typeof t&&(n=a.callbackId(t)),a.exec(u,"getVideoInfo",[e,n])}};c.video=e}),PlusObject.register("maps",function(u,l,e,t){var s=l.bridge,_=l.tools,f="Maps",o="createObject",i="updateObject",r="updateObjectSYNC",c="execMethod",d={callback:[],pushCallback:function(e,t,n){this.callback[e]={fun:t,nokeep:n}},execCallback:function(e,t){this.callback[e]&&(this.callback[e].fun&&this.callback[e].fun(e,t),this.callback[e].nokeep&&delete this.callback[e])}},p={};function h(e,t,n,i){return _.ANDROID==_.platform?s.exec(f,o,[_.stringify([e,t,n,i])],null):s.exec(f,o,[e,t,n,i],null)}function y(e,t,n){return _.ANDROID==_.platform?s.exec(f,i,[_.stringify([e,[t,n]])],null):s.exec(f,i,[e,[t,n]],null)}function a(e,t,n){return _.ANDROID==_.platform?s.exec(f,c,[_.stringify([e,[t,n]])],null):s.exec(f,c,[e,[t,n]],null)}function g(e,t,n,i,o){var s,r;r={zoom:12,type:"MAPTYPE_NORMAL",traffic:!1,zoomControls:!1},(s=t)&&s.center instanceof m&&(r.center=s.center),s&&"number"==typeof s.zoom&&s.zoom<=22&&1<=s.zoom&&(r.zoom=s.zoom),!s||"MAPTYPE_NORMAL"!=s.type&&"MAPTYPE_SATELLITE"!=s.type||(r.type=s.type),s&&"boolean"==typeof s.traffic&&(r.traffic=s.traffic),s&&"boolean"==typeof s.zoomControls&&(r.zoomControls=s.zoomControls),s&&"string"==typeof s.position&&(r.position=s.position),s&&(r.top=s.top,r.left=s.left,r.width=s.width,r.height=s.height),t=r;var c,a=this;this.IDENTITY=f,this._UUID_=o||_.UUID("map"),this._map_id_=n,this._ui_div_id_=e,this.__showUserLocationVisable__=!1,this.center=t.center||new l.maps.Point(116.39716,39.91669),this.zoom=t.zoom,this.userLocation=null,this.mapType=t.type,this.zoomControlsVisable=t.zoomControls,this.trafficVisable=t.traffic,this.visable=!0,this.onclick=function(e){},this.onstatuschanged=function(){},d.pushCallback(this._UUID_,function(e,t){var n;"click"==t.callbackType?a.onclick&&a.onclick(t.payload):"change"==t.callbackType&&(a&&(a.zoom=t.zoom),a.onstatuschanged&&((n={}).target=a,n.zoom=t.zoom,n.center=new m(t.center.long,t.center.lat),t.northease&&(n.bounds=new I(new m(t.northease.long,t.northease.lat),new m(t.southwest.long,t.southwest.lat))),a.onstatuschanged(n)))}),i||(i=[t],(c=u.document&&u.document.getElementById(this._ui_div_id_))&&(l.tools.platform==l.tools.ANDROID?document.addEventListener("plusorientationchange",function(){setTimeout(function(){var e=[c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight];y(a._UUID_,"resize",e)},200)},!1):c.addEventListener("resize",function(){var e=[c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight];y(a._UUID_,"resize",e)},!1),i=[t,c.offsetLeft,c.offsetTop,c.offsetWidth,c.offsetHeight]),p[this._UUID_]=h(this._UUID_,"mapview",i,this._map_id_))}var n=g.prototype;function v(e){this._UUID_=_.UUID("Bubble"),this.label="string"==typeof e?e:"",this.icon=null,this.marker=null,this.__contentImage=null,this.__contentImageAsDataURL=null,this.onclick=function(e){}}n.close=function(){a("map","close",this._UUID_),p[this._UUID_]&&delete p[this._UUID_]},n.centerAndZoom=function(e,t){e instanceof m&&"number"==typeof t&&(this.center=e,this.zoom=t,y(this._UUID_,"centerAndZoom",[e,t]))},n.setCenter=function(e){e instanceof m&&(this.center=e,y(this._UUID_,"setCenter",[e]))},n.getCenter=function(){return this.center},n.setZoom=function(e){"number"==typeof e&&(this.zoom=e,y(this._UUID_,"setZoom",[e]))},n.resize=function(){var e,t=u.document&&u.document.getElementById(this._ui_div_id_);t?(e=[t.offsetLeft,t.offsetTop,t.offsetWidth,t.offsetHeight],y(this._UUID_,"resize",e)):console.log("map The 'resize'method is not supported in custom component mode. Please use the 'setstyles' method")},n.getZoom=function(){return this.zoom},n.setMapType=function(e){"MAPTYPE_NORMAL"!=e&&"MAPTYPE_SATELLITE"!=e||(this.mapType=e,y(this._UUID_,"setMapType",[e]))},n.getMapType=function(){return this.mapType},n.showUserLocation=function(e){"boolean"==typeof e&&this.__showUserLocationVisable__!=e&&(this.__showUserLocationVisable__=e,y(this._UUID_,"showUserLocation",[e]))},n.isShowUserLocation=function(){return this.__showUserLocationVisable__},n.getUserLocation=function(n){if("function"!=typeof n)return!1;var e=_.UUID("callback");d.pushCallback(e,function(e,t){n&&n(t.state,t.point)},!0);e=[e,l.__HtMl_Id__];return y(this._UUID_,"getUserLocation",e),!0},n.getCurrentCenter=function(n){if("function"!=typeof n)return!1;function e(e,t){n&&n(t.state,t.point)}var t=s.callbackId(e);d.pushCallback(t,e,!0);t=[t,l.__HtMl_Id__];return y(this._UUID_,"getCurrentCenter",t),!0},n.setTraffic=function(e){"boolean"==typeof e&&e!=this.trafficVisable&&(this.trafficVisable=e,y(this._UUID_,"setTraffic",[e]))},n.isTraffic=function(){return this.trafficVisable},n.showZoomControls=function(e){"boolean"==typeof e&&e!=this.zoomControlsVisable&&(this.zoomControlsVisable=e,y(this._UUID_,"showZoomControls",[e]))},n.isShowZoomControls=function(){return this.zoomControlsVisable},n.getBounds=function(){var e,t,n,n=(e=this._UUID_,t="getBounds",n=[],_.ANDROID==_.platform?s.execSync(f,r,[_.stringify([e,[t,n]])],null):s.execSync(f,r,[e,[t,n]],null));return new I(new m(n.northease.longitude,n.northease.latitude),new m(n.southwest.longitude,n.southwest.latitude))},n.reset=function(){y(this._UUID_,"reset",[null])},n.show=function(){var e,t;1!=this.visable&&(this.visable=!0,t=[null],(e=u.document&&u.document.getElementById(this._ui_div_id_))&&(e.style.display="",t=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight]),y(this._UUID_,"show",t))},n.hide=function(){0!=this.visable&&(this.visable=!1,u.document&&u.document.getElementById(this._ui_div_id_)&&(document.getElementById(this._ui_div_id_).style.display="none"),y(this._UUID_,"hide",[null]))},n.addOverlay=function(e){if(e instanceof D||e instanceof k||e instanceof U||e instanceof T||e instanceof S){e=[e._UUID_];return y(this._UUID_,"addOverlay",e),!0}return!1},n.removeOverlay=function(e){if(e instanceof D||e instanceof k||e instanceof U||e instanceof T||e instanceof S){e=[e._UUID_];return y(this._UUID_,"removeOverlay",e),!0}return!1},n.clearOverlays=function(){y(this._UUID_,"clearOverlays",[null])},g.calculateDistance=function(e,t,n,i){var o=s.callbackId(function(e){"function"==typeof n&&n({distance:e})},function(e){"function"==typeof i&&i(e)});s.exec(f,"calculateDistance",[e,t,o])},g.calculateArea=function(e,t,n){var i=s.callbackId(function(e){"function"==typeof t&&t({area:e})},function(e){"function"==typeof n&&n(e)});s.exec(f,"calculateArea",[e,i])},g.convertCoordinates=function(e,t,n,i){var o=s.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});s.exec(f,"convertCoordinates",[e,t,o])},g.geocode=function(e,t,n,i){var o=s.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.address=e.addr,t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});s.exec(f,"geocode",[e,t,o])},g.reverseGeocode=function(e,t,n,i){var o=s.callbackId(function(e){var t;"function"==typeof n&&((t={}).coord=new m(e.long,e.lat),t.address=e.addr,t.coordType=e.type,n(t))},function(e){"function"==typeof i&&i(e)});s.exec(f,"reverseGeocode",[e,t,o])};var b=v.prototype;function I(e,t,n,i){"number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof i?(this.northease=new m(e,t),this.northeast=new m(e,t),this.southwest=new m(n,i)):e instanceof m&&t instanceof m&&(this.northease=e,this.northeast=e,this.southwest=t)}function m(e,t){this.longitude=e,this.latitude=t}b.setIcon=function(e){"string"==typeof e&&(this.icon=e,this.marker&&y(this.marker._UUID_,"setBubbleIcon",[this.icon]))},b.loadImage=function(e){this.__contentImage=e,this.__contentImageAsDataURL=null,this.marker&&y(this.marker._UUID_,"loadImage",[e])},b.loadImageDataURL=function(e){this.__contentImage=null,this.__contentImageAsDataURL=e,this.marker&&y(this.marker._UUID_,"loadImageDataURL",[e])},b.getLabel=function(){return this.label},b.setLabel=function(e){"string"==typeof e&&(this.label=e,this.marker&&y(this.marker._UUID_,"setBubbleLabel",[this.label]))},b.belongMarker=function(){return this.marker},I.prototype.setNorthEase=function(e){e instanceof m&&(this.northease=e,this.northeast=e)},I.prototype.setNorthEast=function(e){e instanceof m&&(this.northease=e,this.northeast=e)},I.prototype.getNorthEase=function(){return this.northease},I.prototype.getNorthEast=function(){return this.northeast},I.prototype.setSouthWest=function(e){e instanceof m&&(this.southwest=e)},I.prototype.getSouthWest=function(){return this.southwest},I.prototype.contains=function(e){return e instanceof m&&(e.longitude<=this.northease.longitude&&e.longitude>=this.southwest.longitude&&e.latitude<=this.northease.latitude&&e.latitude>=this.southwest.latitude)},I.prototype.equals=function(e){return e instanceof I&&(this.northease.equals(e.northease)&&this.southwest.equals(e.southwest))},I.prototype.getCenter=function(){var e=(this.northease.longitude-this.southwest.longitude)/2,t=(this.northease.latitude-this.southwest.latitude)/2;return new m(e+this.southwest.longitude,t+this.southwest.latitude)};b=m.prototype;function x(){this._UUID_=null,this.visable=!0}b.setLng=function(e){this.longitude=e},b.getLng=function(){return this.longitude},b.setLat=function(e){this.latitude=e},b.getLat=function(){return this.latitude},b.equals=function(e){return this.longitude==e.longitude&&this.latitude==e.latitude};b=x.prototype;function S(e){var n=this;this._UUID_=_.UUID("marker"),this.point=e,this.icon="",this.caption="",this.bubble=null,this.canDraggable=!1,this.onclick=function(e){},this.onDrag=function(e){},d.pushCallback(this._UUID_,function(e,t){"bubbleclick"==t.type?n.bubble&&n.bubble.onclick&&n.bubble.onclick(n.bubble):"markerclick"==t.type?n.onclick&&n.onclick(n):"onDrag"==t.type&&(n.point=t.pt,n.onDrag(n))}),h(this._UUID_,"marker",[e])}b.show=function(){1!=this.visable&&(this.visable=!0,y(this._UUID_,"show",["true"]))},b.hide=function(){0!=this.visable&&(this.visable=!1,y(this._UUID_,"hide",["false"]))},b.isVisible=function(){return this.visable},b.bringToTop=function(){y(this._UUID_,"bringToTop",[])};b=S.prototype=new x;function w(){this.strokeColor="#FFFFFF",this.strokeOpacity=1,this.fillColor="#FFFFFF",this.fillOpacity=1,this.lineWidth=5,this.visable=!0}b.constructor=S,b.setPoint=function(e){e instanceof m&&(this.point=e,y(this._UUID_,"setPoint",[e]))},b.getPoint=function(){return this.point},b.setIcon=function(e){"string"==typeof e&&(this.icon=e,y(this._UUID_,"setIcon",[e]))},b.setLabel=function(e){"string"==typeof e&&(this.caption=e,y(this._UUID_,"setLabel",[e]))},b.getLabel=function(){return this.caption},b.setBubble=function(e,t){var n,i;e instanceof v?((n=e.marker)&&n!=this&&(i=[n.bubble=null,null,null,null,!1],y(n._UUID_,"setBubble",i)),(e.marker=this).bubble=e,i=[this.bubble.label,this.bubble.icon,this.bubble.__contentImageAsDataURL,this.bubble.__contentImage,t],y(this._UUID_,"setBubble",i)):null==e&&y(this._UUID_,"setBubble",[null,null,null,null,t])},b.hideBubble=function(){this.bubble&&y(this._UUID_,"hideBubble",[])},b.getBubble=function(){return this.bubble},b.setDraggable=function(e){e!=this.canDraggable&&(this.canDraggable=!this.canDraggable,y(this._UUID_,"setDraggable",[this.canDraggable]))},b.isDraggable=function(){return this.canDraggable},b.setIcons=function(e,t){y(this._UUID_,"setIcons",[e,t])};b=w.prototype=new x;function D(e,t){this.center=e,this.radius=t,this._UUID_=_.UUID("circle"),h(this._UUID_,"circle",[e,t])}b.constructor=w,b.setStrokeColor=function(e){"string"==typeof e&&(this.strokeColor=e,y(this._UUID_,"setStrokeColor",[e]))},b.getStrokeColor=function(){return this.strokeColor},b.setStrokeOpacity=function(e){"number"==typeof e&&(e<0?e=0:1<e&&(e=1),this.strokeOpacity=e,y(this._UUID_,"setStrokeOpacity",[e]))},b.getStrokeOpacity=function(){return this.strokeOpacity},b.setFillColor=function(e){"string"==typeof e&&(this.fillColor=e,y(this._UUID_,"setFillColor",[e]))},b.getFillColor=function(){return this.fillColor},b.setFillOpacity=function(e){"number"==typeof e&&(e<0?e=0:1<e&&(e=1),this.fillOpacity=e,y(this._UUID_,"setFillOpacity",[e]))},b.getFillOpacity=function(){return this.fillOpacity},b.setLineWidth=function(e){"number"==typeof e&&(this.lineWidth=e=e<0?0:e,y(this._UUID_,"setLineWidth",[e]))},b.getLineWidth=function(){return this.lineWidth};b=D.prototype=new w;function k(e){this.path=e,this._UUID_=_.UUID("polygon"),h(this._UUID_,"polygon",[e])}b.constructor=D,b.setCenter=function(e){e instanceof m&&(this.center=e,y(this._UUID_,"setCenter",[e]))},b.getCenter=function(){return this.center},b.setRadius=function(e){"number"==typeof e&&0<=e&&(this.radius=e,y(this._UUID_,"setRadius",[e]))},b.getRadius=function(){return this.radius};b=k.prototype=new w;function U(e){this.path=e,this._UUID_=_.UUID("polyline"),h(this._UUID_,"polyline",[e])}b.constructor=k,b.setPath=function(e){this.path=e,y(this._UUID_,"setPath",[e])},b.getPath=function(){return this.path};b=U.prototype=new w;function T(e,t,n){this._UUID_=_.UUID("route"),this.startPoint=e,this.endPoint=t,this.pointCount=0,this.pointList=[],this.distance=0,this.routeTip="",void 0===n&&h(this._UUID_,"route",[e,t,n])}function N(){this.__state__=0,this.__type__=1,this.startPosition=null,this.endPosition=null,this.routeNumber=0,this.routeList=[]}function C(){this.__state__=0,this.__type__=0,this.totalNumber=0,this.currentNumber=0,this.pageNumber=0,this.pageIndex=0,this.poiList=[]}function E(e){var n=this;this._UUID_=_.UUID("search"),this.pageCapacity=10,this.map=e,this.onPoiSearchComplete=function(e,t){},this.onRouteSearchComplete=function(e,t){},d.pushCallback(this._UUID_,function(e,t){0==t.__type__?n.onPoiSearchComplete&&n.onPoiSearchComplete(t.__state__,t):1==t.__type__&&n.onRouteSearchComplete&&n.onRouteSearchComplete(t.__state__,t)}),h(this._UUID_,"search",[null])}b.constructor=U,b.setPath=function(e){this.path=e,y(this._UUID_,"setPath",[e])},b.getPath=function(){return this.path},(T.prototype=new x).constructor=T,N.prototype.getRoute=function(e){return 0<=e&&e<this.routeNumber?this.routeList[e]:null},C.prototype.getPosition=function(e){return 0<=e&&e<this.currentNumber?this.poiList[e]:null};b=E.prototype;function A(e,t,n,i){return new g(void 0,t,e,n,i)}b.setPageCapacity=function(e){this.pageCapacity=e,y(this._UUID_,"setPageCapacity",[e])},b.getPageCapacity=function(){return this.pageCapacity},b.poiSearchInCity=function(e,t,n){return"string"==typeof e&&"string"==typeof t&&(y(this._UUID_,"poiSearchInCity",[e,t,n]),!0)},b.poiSearchNearBy=function(e,t,n,i){return"string"==typeof e&&t instanceof m&&"number"==typeof n&&(y(this._UUID_,"poiSearchNearBy",[e,t,n,i]),!0)},b.poiSearchInbounds=function(e,t,n,i){return"string"==typeof e&&t instanceof m&&n instanceof m&&(y(this._UUID_,"poiSearchInbounds",[e,t,n,i]),!0)},b.setTransitPolicy=function(e){y(this._UUID_,"setTransitPolicy",[e])},b.transitSearch=function(e,t,n){return(e instanceof m||"string"==typeof e)&&(t instanceof m||"string"==typeof t)&&"string"==typeof n&&(y(this._UUID_,"transitSearch",[e,t,n]),!0)},b.setDrivingPolicy=function(e){y(this._UUID_,"setDrivingPolicy",[e])},b.drivingSearch=function(e,t,n,i){return(e instanceof m||"string"==typeof e)&&(n instanceof m||"string"==typeof n)&&"string"==typeof t&&"string"==typeof i&&(y(this._UUID_,"drivingSearch",[e,t,n,i]),!0)},b.walkingSearch=function(e,t,n,i){return(e instanceof m||"string"==typeof e)&&(n instanceof m||"string"==typeof n)&&"string"==typeof t&&"string"==typeof i&&(y(this._UUID_,"walkingSearch",[e,t,n,i]),!0)},n.setStyles=function(e){json_map=_.ANDROID==_.platform?s.exec(f,"setStyles",[_.stringify([this._UUID_,e])],null):s.exec(f,"setStyles",[this._UUID_,e],null)},l.maps={Map:g,openSysMap:function(e,t,n){e instanceof m&&n instanceof m&&a("map","openSysMap",[e,t,n])},MapType:{MAPTYPE_SATELLITE:"MAPTYPE_SATELLITE",MAPTYPE_NORMAL:"MAPTYPE_NORMAL"},Marker:S,Bubble:v,Point:m,Bounds:I,Circle:D,Polygon:k,Polyline:U,Position:function(e){this.point=e,this.address="",this.city="",this.name="",this.phone="",this.postcode=""},Route:T,Search:E,SearchPolicy:{TRANSIT_TIME_FIRST:"TRANSIT_TIME_FIRST",TRANSIT_TRANSFER_FIRST:"TRANSIT_TRANSFER_FIRST",TRANSIT_WALK_FIRST:"TRANSIT_WALK_FIRST",TRANSIT_FEE_FIRST:"TRANSIT_FEE_FIRST",DRIVING_TIME_FIRST:"DRIVING_TIME_FIRST",DRIVING_NO_EXPRESSWAY:"DRIVING_NO_EXPRESSWAY",DRIVING_FEE_FIRST:"DRIVING_FEE_FIRST"},__SearchRouteResult__:N,__SearchPoiResult__:C,__bridge__:d,create:A,getMapById:function(e){var t=_.ANDROID==_.platform?s.execSync(f,"getMapById",[_.stringify([e])],null):s.execSync(f,"getMapById",[e],null);if(t){var n=p[t.uuid];return n||(n=A(e,t.options,"no",t.uuid),p[t.uuid]=n),n}return null}}}),PlusObject.register("storage",function(e,t){var o=t.bridge,s="Storage";return{getLength:function(){return o.execSync2(s,"getLength",[null])},getAllKeys:function(){return o.execSync2(s,"getAllKeys",[null])},getAllKeysAsync:function(e,t){e&&"function"==typeof e&&(e=o.callbackId(e,"function"!=typeof t?null:function(e){t(e)}),o.exec(s,"getAllKeysAsync",[e]))},getItem:function(e){return"string"==typeof e&&o.execSync2(s,"getItem",[e],function(e){var t=e.indexOf(":");return"null"===e.substr(0,t)?null:e.substr(t+1)})},getItemAsync:function(e,t,n){"string"==typeof e&&t&&"function"==typeof t&&(t=o.callbackId(t,"function"!=typeof n?null:function(e){n(e)}),o.exec(s,"getItemAsync",[t,e]))},setItem:function(e,t){return"string"==typeof e&&"string"==typeof t&&o.execSync2(s,"setItem",[e,t])},setItemAsync:function(e,t,n,i){"string"==typeof e&&"string"==typeof t&&n&&"function"==typeof n&&(n=o.callbackId(n,"function"!=typeof i?null:function(e){i(e)}),o.exec(s,"setItemAsync",[n,e,t]))},removeItem:function(e){return"string"==typeof e&&o.execSync2(s,"removeItem",[e])},removeItemAsync:function(e,t,n){"string"==typeof e&&t&&"function"==typeof t&&(t=o.callbackId(t,"function"!=typeof n?null:function(e){n(e)}),o.exec(s,"removeItemAsync",[t,e]))},clear:function(){return o.execSync2(s,"clear",[null])},clearAsync:function(e,t){e&&"function"==typeof e&&(e=o.callbackId(e,"function"!=typeof t?null:function(e){t(e)}),o.exec(s,"clearAsync",[e]))},key:function(e){return"number"==typeof e&&o.execSync2(s,"key",[e])}}}),PlusObject.register("camera",function(e,i){var o,s=i.require("bridge"),r="Camera";function c(){this.index=1,this.__busy__=!1,this.supportedImageResolutions=[],this.supportedVideoResolutions=[],this.supportedImageFormats=[],this.supportedVideoFormats=[]}var t=c.prototype;return t.captureImage=function(t,n,e){var i,o=this;o.__busy__||(i=s.callbackId("function"!=typeof t?null:function(e){o.__busy__=!1,t(e)},"function"!=typeof n?null:function(e){o.__busy__=!1,n(e)}),(e=e||{}).index||(e.index=this.index),s.exec(r,"captureImage",[i,e]))},t.startVideoCapture=function(t,n,e){var i,o=this;o.__busy__||(i=s.callbackId("function"!=typeof t?null:function(e){o.__busy__=!1,t(e)},"function"!=typeof n?null:function(e){o.__busy__=!1,n(e)}),(e=e||{}).index||(e.index=this.index),s.exec(r,"startVideoCapture",[i,e]))},t.stopVideoCapture=function(){s.exec(r,"stopVideoCapture",[])},{getCamera:function(e){if(o)return o;if((o=new c).index=e,i.tools.ANDROID!=i.tools.platform)return(t=s.execSync(r,"getCamera",[o.__UUID__,e]))?(o.supportedImageFormats=t.supportedImageFormats,o.supportedVideoFormats=t.supportedVideoFormats,o.supportedImageResolutions=t.supportedImageResolutions,o.supportedVideoResolutions=t.supportedVideoResolutions):(o.supportedImageFormats=["png","jpg"],o.supportedImageResolutions=["640*480","1280*720","960*540","high","medium","low"],o.supportedVideoFormats=["mp4"],o.supportedVideoResolutions=["640*480","1280*720","960*540"]),o;var t,n=s.callbackId(function(e){o.supportedImageFormats=e.supportedImageFormats,o.supportedVideoFormats=e.supportedVideoFormats,o.supportedImageResolutions=e.supportedImageResolutions,o.supportedVideoResolutions=e.supportedVideoResolutions},null);return(t=s.execSync(r,"getCamera",[o.__UUID__,e,n]))&&(o.supportedImageFormats=t.supportedImageFormats,o.supportedVideoFormats=t.supportedVideoFormats,o.supportedImageResolutions=t.supportedImageResolutions,o.supportedVideoResolutions=t.supportedVideoResolutions),o}}}),PlusObject.register("nativeObj",function(e,o,t,n){var r="NativeObj",c=o.bridge,s=o.tools,a={},u={},i={},l={};function _(e,t,n){this.__id__=s.UUID("Bitmap"),this.id=e,this.type="bitmap",n||(u[this.__id__]=this,c.exec(r,"Bitmap",[this.__id__,e,t]))}function f(e){if(Array.isArray(e))for(var t,n=0;n<e.length;n++)(t=e[n])&&"input"==t.tag?t.inputStyles&&(t.inputStyles.onComplete&&"function"==typeof t.inputStyles.onComplete&&(t.inputStyles.__onCompleteCallBackId__=c.callbackId(t.inputStyles.onComplete)),t.inputStyles.onFocus&&"function"==typeof t.inputStyles.onFocus&&(t.inputStyles.__onFocusCallBackId__=c.callbackId(t.inputStyles.onFocus)),t.inputStyles.onBlur&&"function"==typeof t.inputStyles.onBlur&&(t.inputStyles.__onBlurCallBackId__=c.callbackId(t.inputStyles.onBlur))):t&&"richtext"==t.tag&&t.richTextStyles&&t.richTextStyles.onClick&&"function"==typeof t.richTextStyles.onClick&&(t.richTextStyles.__onClickCallBackId__=c.callbackId(t.richTextStyles.onClick))}function d(e,t,n,i,o){this.__id__=e,this.id=e,this.__uuid__=s.UUID("NativeView"),this.type="nativeView",this.IDENTITY=r,i||(f(n),c.exec(r,"View",[this.__id__,this.__uuid__,t,n,o]),a[this.__uuid__]=this)}function p(e,t){var n,i=null;for(n in l){var o=l[n];if(t){if(o.uid&&o.uid==e||o.uuid&&o.uuid==e){i=o;break}}else if(o.id==e){i=o;break}}return i}function h(e){var t=a[e.uuid];return t||((t=new(e.type&&"ImageSlider"==e.type?o.nativeObj.ImageSlider:i[e.type]||o.nativeObj.View)(e.id,e.styles,"",!0)).__uuid__=e.uuid,a[t.__uuid__]=t),t}return _.prototype.clear=function(){c.exec(r,"clear",[this.__id__]),this.__id__=void 0,u[this.__id__]&&delete u[this.__id__]},_.prototype.recycle=function(){c.exec(r,"bitmapRecycle",[this.__id__])},_.prototype.load=function(e,t,n){function i(e){"function"==typeof n&&n(e)}var o;this.__id__?(o=c.callbackId(function(){"function"==typeof t&&t()},i),c.exec(r,"load",[this.__id__,e,o])):i({code:-1,message:"Destroyed objects"})},_.prototype.loadBase64Data=function(e,t,n){function i(e){"function"==typeof n&&n(e)}var o;this.__id__?(o=c.callbackId(function(){"function"==typeof t&&t()},i),c.exec(r,"loadBase64Data",[this.__id__,e,o])):i({code:-1,message:"Destroyed objects"})},_.prototype.save=function(e,t,n,i){function o(e){"function"==typeof i&&i(e)}var s;this.__id__?(s=c.callbackId(function(e){"function"==typeof n&&(e={target:e.path,width:e.w,height:e.h,size:e.size},n(e))},o),c.exec(r,"save",[this.__id__,e,t,s])):o({code:-1,message:"Destroyed objects"})},_.prototype.__captureWebview=function(e,t,n,i){function o(e){"function"==typeof i&&i(e)}var s;this.__id__?(s=c.callbackId(function(){"function"==typeof n&&n()},o),c.exec(r,"captureWebview",[this.__id__,e,s,t])):o({code:-1,message:"Destroyed objects"})},_.prototype.toBase64Data=function(){return this.__id__?c.execSync(r,"toBase64Data",[this.__id__]):null},_.getItems=function(){for(var e=[],t=c.execSync(r,"getItems",[]),n=0;n<t.length;n++){var i,o=t[n].__id__,s=u[o];s||((i=new _(t[n].id,null,!0)).__id__=o,s=u[o]=i),e.push(s)}return e},_.getBitmapById=function(e){var t=c.execSync(r,"getBitmapById",[e]);if(t){var n=u[t.__id__];return n||((e=new _(t.id,null,!0)).__id__=t.__id__,n=u[t.__id__]=e),n}return null},d.prototype.setImages=function(e){c.exec(r,"setImages",[this.__id__,this.__uuid__,e])},d.prototype.currentImageIndex=function(){return c.execSync(r,"currentImageIndex",[this.__id__,this.__uuid__])},d.prototype.addImages=function(e){c.exec(r,"addImages",[this.__id__,this.__uuid__,e])},d.prototype.drawBitmap=function(e,t,n,i){c.exec(r,"drawBitmap",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawText=function(e,t,n,i){c.exec(r,"drawText",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawRichText=function(e,t,n,i){n&&n.onClick&&"function"==typeof n.onClick&&(n.__onClickCallBackId__=c.callbackId(n.onClick)),c.exec(r,"drawRichText",[this.__id__,this.__uuid__,e,t,n,i])},d.prototype.drawInput=function(e,t,n){t.onComplete&&"function"==typeof t.onComplete&&(t.__onCompleteCallBackId__=c.callbackId(t.onComplete)),t.onFocus&&"function"==typeof t.onFocus&&(t.__onFocusCallBackId__=c.callbackId(t.onFocus)),t.onBlur&&"function"==typeof t.onBlur&&(t.__onBlurCallBackId__=c.callbackId(t.onBlur)),c.exec(r,"drawInput",[this.__id__,this.__uuid__,e,t,n])},d.prototype.getInputValueById=function(e){return c.execSync(r,"getInputValueById",[this.__id__,this.__uuid__,e])},d.prototype.getInputFocusById=function(e){return c.execSync(r,"getInputFocusById",[this.__id__,this.__uuid__,e])},d.prototype.setInputFocusById=function(e,t){c.exec(r,"setInputFocusById",[this.__id__,this.__uuid__,e,t])},d.prototype.show=function(){c.exec(r,"show",[this.__id__,this.__uuid__])},d.prototype.setStyle=function(e){c.exec(r,"setStyle",[this.__id__,this.__uuid__,e])},d.prototype.hide=function(){c.exec(r,"hide",[this.__id__,this.__uuid__])},d.prototype.clear=function(){this.close()},d.prototype.close=function(){c.exec(r,"view_close",[this.__id__,this.__uuid__]),delete a[this.__uuid__]},d.prototype.animate=function(e,t){var n;t&&(n=c.callbackId(function(){"function"==typeof t&&t()})),c.exec(r,"view_animate",[this.__id__,this.__uuid__,e,n])},d.prototype.reset=function(){c.exec(r,"view_reset",[this.__id__,this.__uuid__])},d.prototype.restore=function(){c.exec(r,"view_restore",[this.__id__,this.__uuid__])},d.prototype.isVisible=function(){return c.execSync(r,"isVisible",[this.__id__,this.__uuid__])},d.prototype.drawRect=function(e,t,n){c.exec(r,"view_drawRect",[this.__id__,this.__uuid__,e,t,n])},d.prototype.interceptTouchEvent=function(e){c.exec(r,"interceptTouchEvent",[this.__id__,this.__uuid__,e])},d.prototype.addEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=c.callbackId(n)),c.exec(r,"addEventListener",[this.__id__,this.__uuid__,e,n])},d.prototype.setEventListener=function(e,t){var n,i=this;t&&(n=function(e){"function"==typeof t&&(e.target=i,t(e))},t.callback=n,n=c.callbackId(n)),c.exec(r,"setEventListener",[this.__id__,this.__uuid__,e,n])},d.prototype.setTouchEventRect=function(e){c.exec(r,"setTouchEventRect",[this.__id__,this.__uuid__,e])},d.getViewById=function(e){var t=c.execSync(r,"getViewById",[e]);return(t=t||p(e,!1))?h(t):null},d.__getViewByUidAndCreate=h,d.__getViewByUidFromCache=function(e){e=p(e,!0);return e?h(e):null},d.startAnimation=function(e,t,n,i){var o,s;e&&t&&(t=t instanceof d?{viewId:t.__uuid__}:{uuid:t.bitmap?t.bitmap.__id__:null,texts:{value:t.text,textStyles:t.textStyles,textRect:t.textRect}},n&&(s=n instanceof d?{viewId:n.__uuid__}:{uuid:n.bitmap?n.bitmap.__id__:null,texts:{value:n.text,textStyles:n.textStyles,textRect:n.textRect}}),i&&(o=c.callbackId(function(){"function"==typeof i&&i()})),c.exec(r,"startAnimation",[e,t,s,o]))},d.clearAnimation=function(e){c.exec(r,"clearAnimation",[e=e||"none"])},d.prototype.clearRect=function(e,t){c.exec(r,"view_clearRect",[this.__id__,this.__uuid__,e,t])},d.prototype.draw=function(e){f(e),c.exec(r,"view_draw",[this.__id__,this.__uuid__,e])},{Bitmap:_,View:d,ImageSlider:function(e,t,n,i){return(i=new d(e,t,n,i,"ImageSlider")).type="ImageSlider",i},__createNView:function(e,t,n,i){return(i=new o.nativeObj.View(t,n,i)).__uuid__=e,a[i.__uuid__]=i},__appendSubViewInfo:function(e){l[e.uuid]=e},__removeSubViewInfos:function(e){for(var t=0;t<e.length;t++)delete l[e[t]]},__regChildViews:function(e,t){e&&"function"==typeof t&&(i[e]=t)}}}),PlusObject.register("orientation",function(s,r,e,t){var n=(r=r).bridge,c=r.tools,i="Orientation",a=!1,u={},l=[],_=null,o=function(e,t,n,i,o,s){this.alpha=e,this.beta=t,this.gamma=n,this.magneticHeading=i,this.trueHeading=o,this.headingAccuracy=s},f=void 0,d=void 0,p=void 0;function h(e){var t=l.slice(0);_=new o(e.alpha,e.beta,e.gamma,f,d,p);for(var n=0,i=t.length;n<i;n++)t[n].win(_)}function y(){var e=n.callbackId(function(e){f=e.magneticHeading,d=e.trueHeading,p=e.headingAccuracy,h(e)},function(e){h(e)});n.exec(i,"start",[e]),a=!0}function g(e,t){return{win:e,fail:t}}function v(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(n.exec(i,"stop",[]),a=!1))}var b={getCurrentOrientation:function(t,n){var i=g(function(e){v(i),t(e)},function(e){v(i),n&&n(e)});l.push(i),a||y()},watchOrientation:function(e,t,n){var i=n&&n.frequency&&("number"==typeof n.frequency||n.frequency instanceof Number)?n.frequency:500,n=c.UUID("watch"),o=g(function(){},function(e){v(o),t&&t(e)});return l.push(o),u[n]={timer:(s.setInterval?s:r).setInterval(function(){_&&e(_)},i),listeners:o},a?_&&e(_):y(),n},clearWatch:function(e){e&&u[e]&&((s.clearInterval?s:r).clearInterval(u[e].timer),v(u[e].listeners),delete u[e])}};r.orientation=b}),PlusObject.register("nativeUI",function(e,r,t,n){var c=r.bridge,a="NativeUI",u=r.bridge,o=r.tools;function i(e){c.execSync(a,"setUiStyle",[e])}function s(e){this.onCancel=null,this.onConfirm=null,this.onChange=null;var t=this,n=u.callbackId(function(){"function"==typeof t.onCancel&&t.onCancel()}),i=u.callbackId(function(e){"function"==typeof t.onConfirm&&t.onConfirm(e)}),o=u.callbackId(function(e){"function"==typeof t.onChange&&t.onChange(e)});c.exec(a,"showPicker",[e,n,i,o])}function l(e,t){this.__uuid__=r.tools.UUID("WaitingView"),this.onclose=null;var n=this,i=u.callbackId(function(){"function"==typeof n.onclose&&n.onclose()});c.exec(a,"WaitingView",[this.__uuid__,[e,t,i]])}function _(e,t,n){var i;this.__uuid__=r.tools.UUID("NativeObj_"),n&&(i=u.callbackId(function(e){var t={};t.index=e,n(t)})),c.exec("NativeUI",e,[r.__HtMl_Id__,[t,i,this.__uuid__]])}return s.prototype.update=function(e){c.exec(a,"updatePicker",[e])},l.prototype.close=function(){c.exec(a,"WaitingView_close",[this.__uuid__])},l.prototype.setTitle=function(e){c.exec(a,"WaitingView_setTitle",[this.__uuid__,[e]])},_.prototype.close=function(){c.exec("NativeUI","_NativeObj_close",[this.__uuid__])},{pickTime:function(n,t,e){var i,o;n&&"function"==typeof n&&(i=!1,"object"==typeof e&&(o=e.time,"[object Date]"===Object.prototype.toString.call(o)&&(e.__hours=o.getHours(),e.__minutes=o.getMinutes(),i=!0)),o=u.callbackId("function"!=typeof n?null:function(e){var t=void 0!==e?new Date(e):null,e={};e.date=t,n(e)},"function"!=typeof t?null:function(e){t(e)}),c.exec(a,"pickTime",[r.__HtMl_Id__,[o,e]]),i&&(delete e.__hours,delete e.__minutes))},pickDate:function(n,t,e){var i;n&&"function"==typeof n&&(i={},e&&("[object Date]"===Object.prototype.toString.call(e.minDate)?(i.startYear=e.minDate.getFullYear(),i.startMonth=e.minDate.getMonth(),i.startDay=e.minDate.getDate()):o.isNumber(e.startYear)&&(i.startYear=e.startYear,i.startMonth=0,i.startDay=1),"[object Date]"===Object.prototype.toString.call(e.maxDate)?(i.endYear=e.maxDate.getFullYear(),i.endMonth=e.maxDate.getMonth(),i.endDay=e.maxDate.getDate()):o.isNumber(e.endYear)&&(i.endYear=e.endYear,i.endMonth=11,i.endDay=31),"[object Date]"===Object.prototype.toString.call(e.date)&&(i.setYear=e.date.getFullYear(),i.setMonth=e.date.getMonth(),i.setDay=e.date.getDate()),i.popover=e.popover,i.title=e.title),e=u.callbackId("function"!=typeof n?null:function(e){var t=void 0!==e?new Date(e):null,e={};e.date=t,n(e)},"function"!=typeof t?null:function(e){t(e)}),c.exec(a,"pickDate",[r.__HtMl_Id__,[e,i]]))},alert:function(e,t,n,i){var o;e&&(e="string"!=typeof e?e.toString():e,t&&(o=u.callbackId(function(e){t(e)})),c.exec(a,"alert",[r.__HtMl_Id__,[e,o,n,i]]))},confirm:function(e,n,t,i){var o;e&&(e="string"!=typeof e?e.toString():e,n&&(o=u.callbackId(function(e){var t={};t.index=e,n(t)})),c.exec(a,"confirm",[r.__HtMl_Id__,[e,o,t,i]]))},showWaiting:function(e,t){return new l(e,t)},prompt:function(e,t,n,i,o){var s;e&&(e="string"!=typeof e?e.toString():e,t&&(s=u.callbackId(function(e){e.value=e.message,t(e)})),c.exec(a,"prompt",[r.__HtMl_Id__,[e,s,n,i,o]]))},toast:function(e,t){e&&(e="string"!=typeof e?e.toString():e,c.exec(a,"toast",[r.__HtMl_Id__,[e,t]]))},closeToast:function(){c.exec(a,"closeToast",[r.__HtMl_Id__,[]])},showMenu:function(e,n,i){var t;e&&(e.onclick&&(e.__plus__onclickCallbackId=u.callbackId(e.onclick)),i&&(t=u.callbackId(function(e){var t={};t.index=e.index,t.target=n[e.index],i(t)})),c.exec(a,"showMenu",[r.__HtMl_Id__,[e,n,t]]))},hideMenu:function(){c.exec(a,"hideMenu",[r.__HtMl_Id__])},isTitlebarVisible:function(){return c.execSync(a,"isTitlebarVisible",[r.__HtMl_Id__])},setTitlebarVisible:function(e){return c.exec(a,"setTitlebarVisible",[r.__HtMl_Id__,[e]])},getTitlebarHeight:function(){return c.execSync(a,"getTitlebarHeight",[r.__HtMl_Id__])},actionSheet:function(e,t){return new _("actionSheet",e,t)},closeWaiting:function(){u.exec(a,"closeWaiting",[])},setUiStyle:i,setUIStyle:i,previewImage:function(e,t){var n=t,i=u.callbackId(function(e){"function"==typeof n.onLongPress&&n.onLongPress(e)});u.exec(a,"previewImage",[this.__uuid__,[e,t,i]])},closePreviewImage:function(){u.exec(a,"closePreviewImage",[this.__uuid__])},showPicker:function(e){return new s(e)}}}),PlusObject.register("navigator",function(plusContext,plus,require,param){var bridge=plus.bridge,T=plus.tools,_PLUSNAME="Navigator";return{closeSplashscreen:function(){bridge.exec(_PLUSNAME,"closeSplashscreen",[0])},updateSplashscreen:function(e){bridge.exec(_PLUSNAME,"updateSplashscreen",[e])},isFullscreen:function(){return bridge.execSync(_PLUSNAME,"isFullScreen",[0])},setFullscreen:function(e){bridge.exec(_PLUSNAME,"setFullscreen",[e])},isImmersedStatusbar:function(){return bridge.execSync(_PLUSNAME,"isImmersedStatusbar",[])},getStatusbarHeight:function(e){return this.__statusBarHeight__||(this.__statusBarHeight__=bridge.execSync(_PLUSNAME,"getStatusbarHeight",[])),this.__statusBarHeight__},setStatusBarBackground:function(e){bridge.exec(_PLUSNAME,"setStatusBarBackground",[e])},getStatusBarBackground:function(){return bridge.execSync(_PLUSNAME,"getStatusBarBackground",[])},setStatusBarStyle:function(e){bridge.exec(_PLUSNAME,"setStatusBarStyle",[e])},getStatusBarStyle:function(){return bridge.execSync(_PLUSNAME,"getStatusBarStyle",[])},getUiStyle:function(){return bridge.execSync(_PLUSNAME,"getUiStyle",[])},setUserAgent:function(e,t){bridge.execSync(_PLUSNAME,"setUserAgent",[e,t])},getUserAgent:function(){return bridge.execSync(_PLUSNAME,"getUserAgent",[],function(r){try{var reslut=eval(r);return null==reslut?null:r}catch(e){return r}return r})},removeCookie:function(e){bridge.exec(_PLUSNAME,"removeCookie",[e])},removeSessionCookie:function(e,t){bridge.exec(_PLUSNAME,"removeSessionCookie",[])},removeAllCookie:function(e,t){bridge.exec(_PLUSNAME,"removeAllCookie",[])},setCookie:function(e,t){bridge.exec(_PLUSNAME,"setCookie",[e,t])},getCookie:function(url){return bridge.execSync(_PLUSNAME,"getCookie",[url],function(r){try{var reslut=eval(r);return null==reslut?null:r}catch(e){return r}return r})},setLogs:function(e){bridge.exec(_PLUSNAME,"setLogs",[e])},isLogs:function(){return bridge.execSync(_PLUSNAME,"isLogs",[0])},createShortcut:function(e,t,n){n=bridge.callbackId(t,n);bridge.exec(_PLUSNAME,"createShortcut",[e,n])},hasShortcut:function(e,t){T.platform!=T.IOS&&(t=bridge.callbackId(t),bridge.exec(_PLUSNAME,"hasShortcut",[e,t]))},checkPermission:function(e){return bridge.execSync(_PLUSNAME,"checkPermission",[e])},requestPermission:function(e,t){t=bridge.callbackId(t);return bridge.exec(_PLUSNAME,"requestPermission",[e,t])},isBackground:function(){return bridge.execSync(_PLUSNAME,"isBackground",[])},hasNotchInScreen:function(){return bridge.execSync(_PLUSNAME,"hasNotchInScreen",[])},hasSplashscreen:function(){return bridge.execSync(_PLUSNAME,"hasSplashscreen",[])},hideSystemNavigation:function(){return bridge.exec(_PLUSNAME,"hideSystemNavigation",[])},showSystemNavigation:function(){return bridge.exec(_PLUSNAME,"showSystemNavigation",[])},getSafeAreaInsets:function(){return plus.tools.ANDROID==plus.tools.platform?{bottom:0,left:0,right:0,top:0,deviceBottom:0,deviceLeft:0,deviceRight:0,deviceTop:0}:bridge.execSync(_PLUSNAME,"getSafeAreaInsets",[])},getOrientation:function(){return bridge.execSync(_PLUSNAME,"getOrientation",[])},getUIStyle:function(){return bridge.execSync(_PLUSNAME,"getUiStyle",[])},isRoot:function(){return plus.tools.ANDROID!=plus.tools.platform&&bridge.execSync(_PLUSNAME,"isRoot",[])},isSimulator:function(){return bridge.execSync(_PLUSNAME,"isSimulator",[])},getSignature:function(){return bridge.execSync(_PLUSNAME,"getSignature",[])}}}),PlusObject.register("webview",function(e,c,t){var r=(c=c).bridge,a="UI",u="execMethod",l="syncExecMethod",_={},s=c.bridge,n=c.tools;function i(e,t,n){r.exec(a,u,[e.__IDENTITY__,t,[e.__uuid__,n]])}function o(e){this.__IDENTITY__=e,this.__uuid__=c.tools.UUID(e),this.id,c.obj.Callback.call(this)}function f(){return n.platform!=n.IOS&&r.execSync(a,l,[a,"defaultHardwareAccelerated",[]])}function d(e){if(e&&"string"==typeof e){var t,n=r.execSync(a,l,[a,"findWindowByName",[c.__HtMl_Id__,[e]]]);if(n){var i=_[n.uuid];return null==i&&((i=new c.webview.Webview(null,null,!0,n.extras)).__uuid__=n.uuid,i.id=n.id,r.exec(a,u,[a,"setcallbackid",[i.__uuid__,[i.__callback_id__]]]),_[i.__uuid__]=i),i}for(t in _){var o=_[t];if(o&&o.id===e)return o}return null}}function p(){var e,t=_[c.__HtMl_Id__];return null!=t&&void 0!==t||(e=r.execSync2(a,l,[a,"currentWebview",[c.__HtMl_Id__]]))&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=c.__HtMl_Id__,t.id=e.id,_[t.__uuid__]=t,r.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]])),t}o.prototype.getMetrics=function(n){n&&i(this,"getMetrics",[s.callbackId(function(e){var t={};t.canForward=e,n(t)}),c.__HtMl_Id__])},o.prototype.onCallback=function(e,t,n){"popGesture"==t?(t=n.private_args,t={target:c.webview._find__Window_By_UUID__(t.uuid,t.id,t.extras),type:n.type,progress:n.progress},"result"in n&&(t.result=n.result),n=t):(n=n||{}).target=this,e(n)},o.prototype.addEventListener=function(e,t,n){c.obj.Callback.prototype.addEventListener.apply(this,[e,t,n])&&i(this,"addEventListener",[e,c.__HtMl_Id__])},o.prototype.removeEventListener=function(e,t){c.obj.Callback.prototype.removeEventListener.apply(this,[e,t])&&i(this,"removeEventListener",[e,c.__HtMl_Id__])};var h={open:function(e,t,n,i,o,s,r){return(r=c.webview.create(e,t,n,r)).show(i,o,s),r},show:function(e,t,n,i,o){var s=null;if("string"==typeof e)s=d(e);else{if(!(e instanceof c.webview.Webview))return;s=e}s&&s.show(t,n,i,o)},hide:function(e,t,n,i){var o=null;if("string"==typeof e)o=d(e);else{if(!(e instanceof c.webview.Webview))return;o=e}o&&o.hide(t,n,i)},NView:o,createGroup:null,getWapLaunchWebview:function(){if(n.IOS==n.platform)return null;var e=r.execSync(a,l,[a,"getWapLaunchWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,r.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}return null},getLaunchWebview:function(){var e=r.execSync2(a,l,[a,"getLaunchWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,r.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}},getSecondWebview:function(){var e=r.execSync2(a,l,[a,"getSecondWebview",[]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,r.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}},getWebviewById:d,getTopWebview:function(){var e=r.execSync(a,l,[a,"getTopWebview",[c.__HtMl_Id__]]);if(e){var t=_[e.uuid];return null==t&&((t=new c.webview.Webview(null,null,!0,e.extras)).__uuid__=e.uuid,t.id=e.id,r.exec(a,u,[a,"setcallbackid",[t.__uuid__,[t.__callback_id__]]]),_[t.__uuid__]=t),t}return null},close:function(e,t,n){var i=null;if("string"==typeof e)i=d(e);else{if(!(e instanceof c.webview.Webview))return;i=e}i&&i.close(t,n)},create:function(e,t,n,i){return(n=n||{}).name=t,new c.webview.Webview(e,n,!1,i)},prefetchURL:function(e){r.exec(a,u,[a,"prefetchURL",[c.__HtMl_Id__,[e]]])},prefetchURLs:function(e){r.exec(a,u,[a,"prefetchURLs",[c.__HtMl_Id__,[e]]])},currentWebview:p,__currentWebview:p,postMessageToUniNView:function(e,t){var n=_[c.__HtMl_Id__];r.exec(a,u,[a,"postMessageToUniNView",[n.__uuid__,[e,t]]])},__callNativeModuleSync__:function(e,t){var n=_[c.__HtMl_Id__];return r.execSync2(a,l,[a,"__callNativeModuleSync",[n.__uuid__,[e,t]]])},all:function(){for(var e=r.execSync(a,l,[a,"enumWindow",[c.__HtMl_Id__]]),t=[],n={},i=0;i<e.length;i++){var o=e[i],s=_[o.uuid];s||((s=new c.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,s.id=o.id,r.exec(a,u,[a,"setcallbackid",[s.__uuid__,[s.__callback_id__]]])),t.push(s),n[s.__uuid__]=s}return _=n,t},getDisplayWebview:function(){var e=r.execSync(a,l,[a,"getDisplayWebview",[c.__HtMl_Id__]]),t=[];if(!e)return t;for(var n={},i=0;i<e.length;i++){var o=e[i],s=_[o.uuid];s?s.id||(s.id=o.id):((s=new c.webview.Webview(null,null,!0,o.extras)).__uuid__=o.uuid,s.id=o.id,r.exec(a,u,[a,"setcallbackid",[s.__uuid__,[s.__callback_id__]]])),t.push(s),n[s.__uuid__]=s}return _=n,t},defauleHardwareAccelerated:f,defaultHardwareAccelerated:f,exec:i,execSync:function(e,t,n){return r.execSync(a,l,[e.__IDENTITY__,t,[e.__uuid__,n]])},_find__Window_By_UUID__:function(e,t,n){if(e&&"string"==typeof e){var i=_[e];return i||((i=new c.webview.Webview(null,null,!0,n)).__uuid__=e,i.id__=t,i.id=t,r.exec(a,u,[a,"setcallbackid",[i.__uuid__,[i.__callback_id__]]]),_[e]=i),i}},__pushWindow__:function(e){_[e.__uuid__]=e},__popWindow__:function(e){delete _[e.__uuid__]},__JSON_Window_Stack:_,__Webview_LoadEvent_CallBack_:function(e){var t=_[e.WebviewID];t&&("onloading"==e.Event?null!=t.onloading&&t.onloading({target:t}):"onclose"==e.Event?(null!=t.onclose&&t.onclose({target:t}),delete _[e.WebviewID]):"onerror"==e.Event?null!=t.onerror&&t.onerror({target:t}):"onloaded"==e.Event&&null!=t.onloaded&&t.onloaded({target:t}))},startAnimation:function(e,t,n){var i,o;e&&e.view&&e.styles&&e.styles.toLeft&&("string"==typeof e.view||e.view instanceof c.webview.Webview)&&(e.view instanceof c.webview.Webview&&(e.view=e.view.__uuid__),t&&t.view&&("string"==typeof t.view||t.view instanceof c.webview.Webview)&&t.view instanceof c.webview.Webview&&(t.view=t.view.__uuid__),n&&"function"==typeof n&&(i=c.webview.currentWebview().__uuid__,o=s.callbackId(function(e){e.target=c.webview._find__Window_By_UUID__(e.target.uuid),n(e)})),r.exec(a,u,[a,"startAnimation",[c.__HtMl_Id__,[e,t,i,o]]]))}};return h.WebviewGroup=LoadWebviewMoudle(e,c,h),h.Webview=LoadWebviewMoudle(e,c,h),h}),PlusObject.register("cache",function(e,t,n,i){var o=t.bridge,s="Cache";t.cache={clear:function(t){var e=o.callbackId(function(e){t&&t()},null);o.exec(s,"clear",[e])},calculate:function(t){var e=o.callbackId(function(e){t&&t(e)},null);o.exec(s,"calculate",[e])},setMaxSize:function(e){o.exec(s,"setMaxSize",[e])}}}),PlusObject.register("contacts",function(e,t,n,i){function a(e){this.code=e||null}var u,l,_="Contacts",f=(t=t).bridge,d=t.tools;function o(e,t,n,i,o,s,r,c,a,u,l,_,f,d,p){this.id=e||null,this.rawId=p||null,this.target=0,this.displayName=t||null,this.name=n||null,this.nickname=i||null,this.phoneNumbers=o||null,this.emails=s||null,this.addresses=r||null,this.ims=c||null,this.organizations=a||null,this.birthday=u||null,this.note=l||null,this.photos=_||null,this.categories=f||null,this.urls=d||null}a.UNKNOWN_ERROR=0,a.INVALID_ARGUMENT_ERROR=1,a.TIMEOUT_ERROR=2,a.PENDING_OPERATION_ERROR=3,a.IO_ERROR=4,a.NOT_SUPPORTED_ERROR=5,a.PERMISSION_DENIED_ERROR=20;var s=o.prototype;function r(e){this.type=e}s.remove=function(e,t){var n=t&&function(e){t(new a(e))};null===this.id?n(a.UNKNOWN_ERROR):(n=f.callbackId(e,n),f.exec(_,"remove",[n,this.id,this.target],{cbid:n}))},s.clone=function(){var e=d.clone(this);function t(e){if(e)for(var t=e.length,n=0;n<t;++n)e[n].id=null}return e.id=null,t(e.phoneNumbers),t(e.emails),t(e.addresses),t(e.ims),t(e.organizations),t(e.categories),t(e.photos),t(e.urls),e},s.save=function(s,t){var r=this,c=function(e){t&&t(new a(e))},e=function(e){var t=e.birthday;if(null!==t){if(!d.isDate(t))try{t=new Date(t)}catch(e){t=null}d.isDate(t)&&(t=t.valueOf()),e.birthday=t}return e}(d.clone(this)),n=f.callbackId(function(e){if(e)try{var t=(0==r.target?u:l).create(e);s&&(i=function(e){var t=e.birthday;try{d.isDate(t)||(e.birthday=new Date(parseFloat(t)))}catch(e){console.log("Cordova Contact convertIn error: exception creating date.")}return e}(t),(o=r).id=i.id,n(i.phoneNumbers,o.phoneNumbers),n(i.emails,o.emails),n(i.addresses,o.addresses),n(i.ims,o.ims),n(i.organizations,o.organizations),n(i.categories,o.categories),n(i.photos,o.photos),n(i.urls,o.urls),s(r))}catch(e){console.log(e)}else c(a.UNKNOWN_ERROR);function n(e,t){if(e&&t)for(var n=e.length,i=0;i<n;++i)t[i].id=e[i].id}var i,o},c);f.exec(_,"save",[n,e,this.target],{cbid:n})};s=r.prototype;s.create=function(e){var t,n=new o;for(t in n.target=this.type,e)void 0!==n[t]&&e.hasOwnProperty(t)&&(n[t]=e[t]);return n},s.find=function(e,o,t,n){t=f.callbackId(function(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(u.create(e[n]));o(t)},t);f.exec(_,"search",[t,e,n],{cbid:t})};var c=t.contacts={getAddressBook:function(t,n,i){0===t&&1===t||(t=0);var e=f.callbackId(function(e){n&&(c.ADDRESSBOOK_PHONE==t?u=u||new r(0):l=l||new r(1),n(u))},function(e){i(new a(e))});f.exec(_,"getAddressBook",[e,t],{cbid:e})},ADDRESSBOOK_PHONE:0,ADDRESSBOOK_SIM:1}}),PlusObject.register("proximity",function(e,t){var s=t.bridge,r=t.tools,c="Proximity",a=!1,u={},l=[];function _(e){e=l.indexOf(e);-1<e&&(l.splice(e,1),0===l.length&&(s.exec(c,"stop",[]),a=!1))}var n={getCurrentProximity:function(t,n){var e=s.callbackId(function(e){r.IOS==r.platform&&(e=0==e?0:1/0),t&&t(e)},function(e){n&&n(e)});s.exec(c,"getCurrentProximity",[e])},watchProximity:function(t,n){var e,i=r.UUID("watch"),o={win:function(e){r.IOS==r.platform&&(e=0==e?0:1/0),t&&t(e)},fail:function(e){_(o),n&&n(e)}};return l.push(o),u[i]={listeners:o},a||(e=s.callbackId(function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].win(e)},function(e){for(var t=l.slice(0),n=0,i=t.length;n<i;n++)t[n].fail(e)}),s.exec(c,"start",[e]),a=!0),i},clearWatch:function(e){e&&u[e]&&(_(u[e].listeners),delete u[e])}};t.proximity=n}),PlusObject.register("net",function(e,t,n,i){var o=t.bridge,s=t.tools;function r(e,t,n,i){this.target=e,this.lengthComputable=t,this.loaded=n,this.total=i}function c(){}function a(){this.__init__(),this.__UUID__=s.UUID("xhr")}c.Timeout=0,c.Other=1,a.Uninitialized=0,a.Open=1,a.Sent=2,a.Receiving=3,a.Loaded=4,a.__F__="XMLHttpRequest";t=a.prototype;return t.__init__=function(){this.readyState=a.Uninitialized,this.responseText="",this.responseXML=null,this.status=a.Uninitialized,this.statusText=null,this.onreadystatechange,this.responseType=null,this.response=null,this.withCredentials=!0,this.timeout=12e4,this.__noParseResponseHeader__=null,this.__requestHeaders__={},this.__responseHeaders__={},this.__cacheReponseHeaders__={},this.__progessEvent__=new r(this,!1,0,0),Object.defineProperty(this.__progessEvent__,"target",{enumerable:!1})},t.abort=function(){this.readyState>a.Uninitialized&&("function"==typeof this.onabort&&this.onabort(this.__progessEvent__),this.__init__(),o.exec(a.__F__,"abort",[this.__UUID__]))},t.getAllResponseHeaders=function(){if(this.readyState>=a.Receiving){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+": "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__}return null},t.getResponseHeader=function(e){if("string"==typeof e&&this.readyState>=a.Receiving){var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t}return null},t.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&a.Open==this.readyState&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},t.open=function(e,t,n,i){a.Open!=this.readyState&&a.Loaded!=this.readyState||this.__init__(),a.Uninitialized==this.readyState&&(this.readyState=a.Open,o.exec(a.__F__,"open",[this.__UUID__,e,"string"==typeof(t=t)?0==(t=t.replace(/(^\s*)|(\s*$)/g,"")).indexOf("http://")||0==t.indexOf("https://")?t:t=0==t.indexOf("/")?location.origin+t:location.origin+location.pathname+t:"",n,i,this.timeout]),"function"==typeof this.onreadystatechange&&this.onreadystatechange())},t.overrideMimeType=function(e){o.exec(a.__F__,"overrideMimeType",[this.__UUID__,e])},t.send=function(e){var n=this;if(a.Open!=this.readyState)throw new Error("XMLHttpRequest not open");this.readyState=a.Sent,"function"==typeof this.onloadstart&&this.onloadstart(n.__progessEvent__);var t=o.callbackId(function(e){if(a.Receiving==e.readyState)a.Sent==n.readyState?(n.readyState=a.Receiving,n.status=e.status,n.statusText=e.statusText,n.__responseHeaders__=e.header,n.__progessEvent__.lengthComputable=e.lengthComputable,n.__progessEvent__.total=e.totalSize):a.Receiving==n.readyState&&(n.responseText=e.responseText,n.__progessEvent__.loaded=e.revSize),"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"function"==typeof n.onprogress&&n.onprogress(n.__progessEvent__);else if(a.Loaded==e.readyState){n.readyState=a.Loaded,e.status&&(n.status=e.status);try{n.responseText&&(t=new DOMParser,n.responseXML=t.parseFromString(n.responseText,"text/xml"))}catch(e){n.responseXML=null}try{var t;"document"==n.responseType?(t=new DOMParser,n.response=n.responseXML):"json"==n.responseType&&(n.response=JSON.parse(n.responseText))}catch(e){n.response=null}"function"==typeof n.onreadystatechange&&n.onreadystatechange(),e.error==c.Timeout?"function"==typeof n.ontimeout&&n.ontimeout(n.__progessEvent__):e.error==c.Other?"function"==typeof n.onerror&&n.onerror(n.__progessEvent__):"function"==typeof n.onload&&n.onload(n.__progessEvent__),"function"==typeof n.onloadend&&n.onloadend(n.__progessEvent__)}});o.exec(a.__F__,"send",[this.__UUID__,t,e,this.__requestHeaders__]),"function"==typeof this.onreadystatechange&&this.onreadystatechange()},{XMLHttpRequest:a}}),PlusObject.register("zip",function(e,t,n,i){var o=t.bridge,s="Zip";return{compressVideo:function(e,t,n){n=o.callbackId(function(e){t&&(e={tempFilePath:e.tempFilePath,size:e.size},t(e))},n);o.exec(s,"compressVideo",[e,n])},decompress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(s,"decompress",[e,t,i])},compress:function(e,t,n,i){i=o.callbackId(n,i);o.exec(s,"compress",[e,t,i])},compressImage:function(e,t,n){n=o.callbackId(function(e){t&&(e={target:e.path,width:e.w,height:e.h,size:e.size},t(e))},n);o.exec(s,"compressImage",[e,n])}}}),PlusObject.register("beacon",function(e,t,n,i){var o="iBeacon",s=t.bridge;t.ibeacon={startBeaconDiscovery:function(t){if("object"==typeof t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=s.callbackId(e,i),s.exec(o,"startBeaconDiscovery",[callbackID,t.uuids])}},stopBeaconDiscovery:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=s.callbackId(e,i),s.exec(o,"stopBeaconDiscovery",[callbackID])},getBeacons:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)};return callbackID=s.callbackId(e,i),s.exec(o,"getBeacons",[callbackID])},onBeaconUpdate:function(e){return callbackID=s.callbackId("function"!=typeof e?null:e),s.exec(o,"onBeaconUpdate",[callbackID])},onBeaconServiceChange:function(e){return callbackID=s.callbackId("function"!=typeof e?null:e),s.execSync(o,"onBeaconServiceChange",[callbackID])}}}),PlusObject.register("bluetooth",function(e,t,n,i){var o="Bluetooth",a=t.bridge;t.bluetooth={closeBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"closeBluetoothAdapter",[callbackID])},openBluetoothAdapter:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"openBluetoothAdapter",[callbackID])},getBluetoothAdapterState:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBluetoothAdapterState",[callbackID])},getBluetoothDevices:function(s){var r=this,c="function"!=typeof s.complete?function(){}:s.complete,e="function"!=typeof s.success?null:function(e){for(var t=e.devices,n=0;n<t.length;n++){var i=t[n];if(i.advertisData&&"string"==typeof i.advertisData&&"{}"!=i.advertisData&&(i.advertisData=r.string2ArrayBuffer(i.advertisData)),i.serviceData&&"{}"!=i.serviceData)for(var o in i.serviceData)"string"==typeof i.serviceData[o]&&""!=i.serviceData[o]&&(i.serviceData[o]=r.string2ArrayBuffer(i.serviceData[o]))}s.success(e),c(e)},t="function"!=typeof s.fail?null:function(e){s.fail(e),c(e)},t=a.callbackId(e,t);return a.exec(o,"getBluetoothDevices",[t])},getConnectedBluetoothDevices:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getConnectedBluetoothDevices",[callbackID,e])},startBluetoothDevicesDiscovery:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"startBluetoothDevicesDiscovery",[callbackID,e])},stopBluetoothDevicesDiscovery:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"stopBluetoothDevicesDiscovery",[callbackID])},onBluetoothAdapterStateChange:function(e){return callbackID=this.getCallbackIDByFunction(e),a.exec(o,"onBluetoothAdapterStateChange",[callbackID])},onBluetoothDeviceFound:function(s){var r=this;return callbackID=a.callbackId("function"!=typeof s?null:function(e){for(var t=e.devices,n=0;n<t.length;n++){var i=t[n];if(i.advertisData&&"string"==typeof i.advertisData&&"{}"!=i.advertisData&&(i.advertisData=r.string2ArrayBuffer(i.advertisData)),i.serviceData&&"{}"!=i.serviceData)for(var o in i.serviceData)"string"==typeof i.serviceData[o]&&""!=i.serviceData[o]&&(i.serviceData[o]=r.string2ArrayBuffer(i.serviceData[o]))}s(e)}),a.exec(o,"onBluetoothDeviceFound",[callbackID])},createBLEConnection:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"createBLEConnection",[callbackID,e])},closeBLEConnection:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"closeBLEConnection",[callbackID,e])},setBLEMTU:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"setBLEMTU",[callbackID,e])},getBLEDeviceRSSI:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceRSSI",[callbackID,e])},getBLEDeviceCharacteristics:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceCharacteristics",[callbackID,e])},getBLEDeviceServices:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"getBLEDeviceServices",[callbackID,e])},notifyBLECharacteristicValueChange:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"notifyBLECharacteristicValueChange",[callbackID,e])},onBLECharacteristicValueChange:function(t){var n=this;return callbackID=a.callbackId("function"!=typeof t?null:function(e){e.value&&"string"==typeof e.value&&(e.value=n.string2ArrayBuffer(e.value)),t(e)}),a.exec(o,"onBLECharacteristicValueChange",[callbackID])},onBLEConnectionStateChange:function(e){return callbackID=this.getCallbackIDByFunction(e),a.exec(o,"onBLEConnectionStateChange",[callbackID])},readBLECharacteristicValue:function(e){return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),a.exec(o,"readBLECharacteristicValue",[callbackID,e])},writeBLECharacteristicValue:function(e){if("string"!=typeof e.value)return callbackID=this.getCallbackIDByFunction(e.success,e.fail,e.complete),e.value=this.ab2hex(e.value),a.exec(o,"writeBLECharacteristicValue",[callbackID,e]);e.fail({code:10019,message:"Value cannot be a string"})},ab2hex:function(e){return Array.prototype.map.call(new Uint8Array(e),function(e){return("00"+e.toString(16)).slice(-2)}).join("")},string2ArrayBuffer:function(e){return new Uint8Array(e.match(/[\da-f]{2}/gi).map(function(e){return parseInt(e,16)})).buffer},getCallbackIDByFunction:function(t,n,i){i="function"!=typeof i?function(){}:i;return a.callbackId("function"!=typeof t?null:function(e){t(e),i(e)},"function"!=typeof n?null:function(e){n(e),i(e)})}}}),PlusObject.register("fingerprint",function(e,t,n,i){var o=(t=t).bridge,s="fingerprint";function r(e,t){this.code=e,this.message=t,this.UNSUPPORT=1,this.KEYGUARD_INSECURE=2,this.FINGERPRINT_UNENROLLED=3,this.AUTHENTICATE_MISMATCH=4,this.AUTHENTICATE_OVERLIMIT=5,this.CANCEL=6,this.UNKNOWN_ERROR=7}t.fingerprint={isSupport:function(){return o.execSync(s,"isSupport")},isEnrolledFingerprints:function(){return o.execSync(s,"isEnrolledFingerprints")},isKeyguardSecure:function(){return o.execSync(s,"isKeyguardSecure")},authenticate:function(t,n,e){callbackID=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(new r(e.code,e.message))}),o.exec(s,"authenticate",[callbackID,e])},cancel:function(){return o.exec(s,"cancel")}}}),PlusObject.register("payment",function(r,c,e,t){var a="Payment",u=c.bridge;function l(){function o(e){"object"==typeof e&&(e.errCode=e.code,e.errMsg=e.message||"")}this.id="",this.description="",this.serviceReady=!0,this.installService=function(){u.exec(a,"installService",[this.id])},this.appStoreReceipt=function(){return u.execSync(a,"appStoreReceipt",[this.id])},this.finishTransaction=function(e,t,n){"appleiap"!==this.id&&n({errorcode:"-3"});var i=u.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){o(e),n(e)});u.exec(a,"finishTransactionRequest",[this.id,i,e])},this.restoreCompletedTransactions=function(e,t,n){this.restoreComplateRequest(e,t,n)},this.restoreComplateRequest=function(e,t,n){"appleiap"!==this.id&&n({errorcode:"-3"});var i=u.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){o(e),n(e)});u.exec(a,"restoreComplateRequest",[this.id,i,e])},this.requestProduct=function(e,t,n){this.requestOrder(e,t,n)},this.requestOrder=function(e,t,n){var i;"appleiap"===this.id?(i=u.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){o(e),n(e)}),u.exec(a,"requestOrder",[this.id,i,e])):n({errorcode:"-3"})},this.isReadyToPay=function(e,t,n){var i;c.tools.ANDROID==c.tools.platform&&(i=u.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)}),u.exec(a,"isReadyToPay",[this.id,e,i]))}}var _={Channel:l,getChannels:function(s,t){var e=u.callbackId("function"!=typeof s?null:function(e){for(var t=[],n=e.length,i=0;i<n;i++){var o=new _.Channel;o.id=e[i].id,o.description=e[i].description,o.serviceReady=e[i].serviceReady,t[i]=o}s(t)},"function"!=typeof t?null:function(e){t(e)});u.exec(a,"getChannels",[e])},request:function(e,t,n,i){var o,s="function"!=typeof i?null:function(e){i(e)};e instanceof l?(o=u.callbackId("function"!=typeof n?null:function(e){n(e)},s),u.exec(a,"request",[e.id,t,o])):(r.setTimeout?r:c).setTimeout(function(){s({code:62e3})},0)}};c.payment=_}),PlusObject.register("messaging",function(e,t,n,i){var s=t.bridge,r="Messaging";function c(e){this.__hasPendingOperation__=!1,this.to=[],this.cc=[],this.bcc=[],this.subject="",this.body="",this.bodyType="text",this.silent=!1,this.attachment=[],this.type=e}c.prototype.addAttachment=function(e){"string"==typeof e&&this.attachment.push(e)},t.messaging={createMessage:function(e){return new c(e)},sendMessage:function(t,e,n){var i,o;t instanceof c&&(i="function"!=typeof e?null:function(){t.__hasPendingOperation__=!1,e()},o="function"!=typeof n?null:function(e){t.__hasPendingOperation__=!1,n(e)},t.__hasPendingOperation__?o({code:2,message:"sending"}):(t.__hasPendingOperation__=!0,o=s.callbackId(i,o),s.exec(r,"sendMessage",[o,t],{cbid:o})))},listenMessage:function(t,n){var e=s.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});s.exec(r,"listenMessage",[e],{cbid:e})},TYPE_SMS:1,TYPE_MMS:2,TYPE_EMAIL:3}}),PlusObject.register("downloader",function(e,t,n,i){var o=t.bridge,s=t.tools,r="Downloader",a=function(e,t){return void 0===e?t:e};function c(e,t,n){this.type=a(e,""),this.handles=[],this.capture=a(n,!1),"function"==typeof t&&this.handles.push(t)}function u(e,t,n){var i=this;i.id=s.UUID("dt"),i.url=a(e,""),i.downloadedSize=0,i.totalSize=0,i.options=t||{},i.filename=a(i.options.filename,""),i.method=a(i.options.method,"GET"),i.timeout=a(i.options.timeout,120),i.retry=a(i.options.retry,3),i.retryInterval=a(i.options.retryInterval,30),i.priority=a(i.options.priority,1),i.onCompleted=n||null,i.eventHandlers={},i.data=a(i.options.data,null),i.__requestHeaders__={},i.__responseHeaders__={},i.__noParseResponseHeader__=null,i.__cacheReponseHeaders__={}}c.prototype.fire=function(e){for(var t=0;t<this.handles.length;++t)this.handles[t].apply(this,arguments)};t=u.prototype;t.getFileName=function(){return this.filename},t.start=function(){o.exec(r,"start",[this.id,this.__requestHeaders__])},t.pause=function(){o.exec(r,"pause",[this.id])},t.resume=function(){o.exec(r,"resume",[this.id])},t.abort=function(){o.exec(r,"abort",[this.id])},t.getAllResponseHeaders=function(){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+" : "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__},t.getResponseHeader=function(e){if("string"!=typeof e)return"";var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t},t.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},t.addEventListener=function(e,t,n){var i;"string"==typeof e&&"function"==typeof t&&(i=e.toLowerCase(),void 0===this.eventHandlers[i]?this.eventHandlers[i]=new c(e,t,n):this.eventHandlers[i].handles.push(t))},t.__handlerEvt__=function(e){var t=this;t.filename=a(e.filename,t.filename),t.state=a(e.state,t.state),t.downloadedSize=a(e.downloadedSize,t.downloadedSize),t.totalSize=a(e.totalSize,t.totalSize),t.__responseHeaders__=a(e.headers,{});var n=this.eventHandlers.statechanged;n&&n.fire(t,e.status||null),4==t.state&&"function"==typeof t.onCompleted&&t.onCompleted(t,e.status||null)};var l={__taskList__:[],createDownload:function(e,t,n){if("string"!=typeof e)return null;n=new u(e,t,n);return l.__taskList__[n.id]=n,o.exec(r,"createDownload",[n]),n},enumerate:function(c,e){var t=o.callbackId(function(e){for(var t=[],n=e.length,i=0,o=l.__taskList__;i<n;i++){var s,r=e[i];r&&r.uuid&&((s=o[r.uuid])||((s=new u).id=r.uuid,o[s.id]=s),s.state=a(r.state,s.state),s.options=a(r.options,s.options),s.filename=a(r.filename,s.filename),s.url=a(r.url,s.url),s.downloadedSize=a(r.downloadedSize,s.downloadedSize),s.totalSize=a(r.totalSize,s.totalSize),s.__responseHeaders__=a(e.headers,s.__responseHeaders__),t.push(s))}"function"==typeof c&&c(t)});o.exec(r,"enumerate",[t,e])},clear:function(e){var t=-1e4;("number"==typeof e||e instanceof Number)&&(t=e),o.exec(r,"clear",[t])},startAll:function(){o.exec(r,"startAll",[0])},__handlerEvt__:function(e,t){var n=l.__taskList__[e];n&&(6==t.state&&delete l.__taskList__[e],n.__handlerEvt__(t))}};return l}),PlusObject.register("uploader",function(e,t,n,i){var o=t.bridge,s=t.tools,r=function(){return s.UUID("uploader")},a="Uploader",u=function(e,t){return void 0===e?t:e};function c(e,t,n){this.type=u(e,""),this.handles=[],this.capture=u(n,!1),"function"==typeof t&&this.handles.push(t)}function l(e,t,n){this.__UUID__=r(),this.url=u(e,""),this.options=t||{},this.uploadedSize=0,this.totalSize=0,this.responseText="",this.method=u(this.options.method,"GET"),this.chunkSize=u(this.options.chunkSize,0),this.timeout=u(this.options.timeout,120),this.retry=u(this.options.retry,3),this.retryInterval=u(this.options.retryInterval,30),this.priority=u(this.options.priority,1),this.onCompleted=n||null,this.eventHandlers={},this.__requestHeaders__={},this.__responseHeaders__={},this.__noParseResponseHeader__=null,this.__cacheReponseHeaders__={}}return c.prototype.fire=function(e){for(var t=0;t<this.handles.length;++t)this.handles[t].apply(this,arguments)},l.prototype.addFile=function(e,t){return"string"==typeof e&&"object"==typeof t&&(o.exec(a,"addFile",[this.__UUID__,e,t]),!0)},l.prototype.addData=function(e,t){return"string"==typeof e&&"string"==typeof t&&(o.exec(a,"addData",[this.__UUID__,e,t]),!0)},l.prototype.getAllResponseHeaders=function(){if(this.__noParseResponseHeader__)return this.__noParseResponseHeader__;var e,t="";for(e in this.__responseHeaders__)t=t+e+" : "+this.__responseHeaders__[e]+"\r\n";return this.__noParseResponseHeader__=t,this.__noParseResponseHeader__},l.prototype.getResponseHeader=function(e){if("string"!=typeof e)return"";var t=null;if(e=e.toLowerCase(),t=this.__cacheReponseHeaders__[e])return t;for(n in this.__responseHeaders__){var n,i=this.__responseHeaders__[n];e===(n=n.toLowerCase())&&(t=t?t+", "+i:i)}return this.__cacheReponseHeaders__[e]=t},l.prototype.setRequestHeader=function(e,t){var n;"string"==typeof e&&"string"==typeof t&&(n=this.__requestHeaders__[e],this.__requestHeaders__[e]=n?n+", "+t:t)},l.prototype.start=function(){o.exec(a,"start",[this.__UUID__,this.__requestHeaders__])},l.prototype.pause=function(){o.exec(a,"pause",[this.__UUID__])},l.prototype.resume=function(){o.exec(a,"resume",[this.__UUID__])},l.prototype.abort=function(){o.exec(a,"abort",[this.__UUID__])},l.prototype.addEventListener=function(e,t,n){var i;"string"==typeof e&&"function"==typeof t&&(i=e.toLowerCase(),void 0===this.eventHandlers[i]?this.eventHandlers[i]=new c(e,t,n):this.eventHandlers[i].handles.push(t))},l.prototype.__handlerEvt__=function(e){var t=this;t.state=u(e.state,t.state),t.uploadedSize=u(e.uploadedSize,t.uploadedSize),t.totalSize=u(e.totalSize,t.totalSize),t.__responseHeaders__=u(e.headers,{}),4==t.state&&"function"==typeof t.onCompleted&&(t.responseText=u(e.responseText,t.responseText),t.onCompleted(t,e.status||null));var n=this.eventHandlers.statechanged;n&&n.fire(t,void 0===e.status?null:e.status)},{__taskList__:{},createUpload:function(e,t,n){if("string"!=typeof e)return null;n=new l(e,t,n);return this.__taskList__[n.__UUID__]=n,o.exec(a,"createUpload",[n]),n},enumerate:function(r,e){var c=this.__taskList__,t=o.callbackId(function(e){for(var t=0;t<e.length;t++){var n,i=e[t];i&&i.uuid&&((n=c[i.uuid])||((n=new l).__UUID__=i.uuid,c[n.__UUID__]=n),n.state=u(i.state,n.state),n.options=u(i.options,n.options),n.url=u(i.url,n.url),n.uploadedSize=u(i.uploadedSize,n.uploadedSize),n.totalSize=u(i.totalSize,n.totalSize),n.responseText=u(i.responseText,n.responseText),n.__responseHeaders__=u(e.headers,n.__responseHeaders__))}var o,s=[];for(o in c)s.push(c[o]);"function"==typeof r&&r(s)});o.exec(a,"enumerate",[t])},clear:function(e){e="number"==typeof e?e:4;o.exec(a,"clear",[e])},startAll:function(){o.exec(a,"startAll",[0])},__handlerEvt__:function(e,t){e=this.__taskList__[e];e&&e.__handlerEvt__(t)}}}),PlusObject.register("io",function(r,c,e,t){var a=c.bridge,u=(c.tools,[]),l={NATIVEF:"File",exec:function(e,t,n,i){t=a.callbackId(e,t);a.exec(l.NATIVEF,n,[t,i])}};function _(e){this.code=e.code||null,this.message=e.message||""}function f(e){var t="unknown error";switch(e){case _.NOT_FOUND_ERR:t="file not found";break;case _.SECURITY_ERR:t="not authorized";break;case _.ABORT_ERR:t="cancel";break;case _.NOT_READABLE_ERR:t="not allowed to read";break;case _.ENCODING_ERR:t="Coding error";break;case _.NO_MODIFICATION_ALLOWED_ERR:t="no modification allowed";break;case _.INVALID_STATE_ERR:t="invalid state";break;case _.SYNTAX_ERR:t="syntax error";break;case _.INVALID_MODIFICATION_ERR:t="invalid modification";break;case _.QUOTA_EXCEEDED_ERR:t="execution error";break;case _.TYPE_MISMATCH_ERR:t="type mismatch";break;case _.PATH_EXISTS_ERR:t="the path exists"}return{code:e,message:t}}function i(e,t){t=t||{},this.type=e,this.bubbles=!1,this.cancelBubble=!1,this.cancelable=!1,this.lengthComputable=!1,this.loaded=t.loaded||0,this.total=t.total||0,this.target=t.target||null}function d(e,t,n,i,o){this.size=o||0,this.type=n||null,this.name=e||"",this.lastModifiedDate=new Date(i)||null,this.fullPath=t||null}_.NOT_FOUND_ERR=1,_.SECURITY_ERR=2,_.ABORT_ERR=3,_.NOT_READABLE_ERR=4,_.ENCODING_ERR=5,_.NO_MODIFICATION_ALLOWED_ERR=6,_.INVALID_STATE_ERR=7,_.SYNTAX_ERR=8,_.INVALID_MODIFICATION_ERR=9,_.QUOTA_EXCEEDED_ERR=10,_.TYPE_MISMATCH_ERR=11,_.PATH_EXISTS_ERR=12;var n=d.prototype;function o(e){this.modificationTime=void 0!==e?new Date(e):null,this.size=0,this.directoryCount=0,this.fileCount=0}function s(e,t,n,i,o,s){this.isFile=void 0!==e&&e,this.isDirectory=void 0!==t&&t,this.name=n||"",this.fullPath=i||"",this.fileSystem=o||null,this.__PURL__=s||"",this.__remoteURL__=s?"http://localhost:13131/"+s:""}n.slice=function(e,t,n){var i=0<this.size?this.size-1:0,o=0,s=i;if(arguments.length&&(o=e<0?Math.max(i+e,0):Math.min(i,e)),(s=2<=arguments.length?t<0?Math.max(i+t,0):Math.min(t,i):s)<o)return null;i=new d(this.name,this.fullPath,this.type,this.lastModifiedDate,s-o+1);return i.start=o,i.end=s,i},n.close=function(){};var p=s.prototype;function h(e,t,n,i){p.constructor.apply(this,[!0,!1,e,t,n,i])}function y(e,t,n,i){p.constructor.apply(this,[!1,!0,e,t,n,i])}p.getMetadata=function(n,t,e){l.exec("function"!=typeof n?null:function(e){var t=new o(e.lastModifiedDate);t.size=e.size,t.directoryCount=e.directoryCount,t.fileCount=e.fileCount,n(t)},"function"!=typeof t?null:function(e){t(new _(e))},"getMetadata",[this.fullPath,e])},p.setMetadata=function(e,t,n){l.exec(e,t,"setMetadata",[this.fullPath,n])},p.moveTo=function(e,t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var s,r=this;e?(s=this.fullPath,t=t||this.name,l.exec(function(e){if(e){if("function"==typeof n){e=new(e.isDirectory?y:h)(e.name,e.fullPath,r.fileSystem,e.remoteURL);try{n(e)}catch(e){}}}else o(f(_.NOT_FOUND_ERR))},o,"moveTo",[s,e.fullPath,t])):o(f(_.NOT_FOUND_ERR))},p.copyTo=function(e,t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var s,r=this;e?(s=this.fullPath,t=t||this.name,l.exec(function(e){if(e){if("function"==typeof n){e=e.isDirectory?new y(e.name,e.fullPath,e.fileSystem,r.remoteURL):new h(e.name,e.fullPath,r.fileSystem,e.remoteURL);try{n(e)}catch(e){}}}else o(f(_.NOT_FOUND_ERR))},o,"copyTo",[s,e.fullPath,t])):o(f(_.NOT_FOUND_ERR))},p.remove=function(e,t){l.exec(e,"function"!=typeof t?null:function(e){t(new _(e))},"remove",[this.fullPath])},p.toURL=function(){return this.__PURL__},p.toLocalURL=function(){return"file://"+this.fullPath},p.toRemoteURL=function(){return this.__remoteURL__},p.getParent=function(t,n){var i=this;l.exec("function"!=typeof t?null:function(e){e=new y(e.name,e.fullPath,i.fileSystem,e.remoteURL);t(e)},"function"!=typeof n?null:function(e){n(new _(e))},"getParent",[this.fullPath])},((h.prototype=new s).constructor=h).prototype.createWriter=function(t,n){this.file(function(e){e=new b(e);null===e.fileName||""===e.fileName?"function"==typeof n&&n(new _(f(_.INVALID_STATE_ERR))):"function"==typeof t&&t(e)},n)},h.prototype.file=function(t,n){l.exec("function"!=typeof t?null:function(e){e=new d(e.name,e.fullPath,e.type,e.lastModifiedDate,e.size);t(e)},"function"!=typeof n?null:function(e){n(new _(e))},"getFileMetadata",[this.fullPath])};n=new s;function g(e,t){this.path=e||null,this.__fileSystem__=t||null}function v(){this.fileName="",this.readyState=0,this.result=null,this.error=null,this.onloadstart=null,this.onprogress=null,this.onload=null,this.onabort=null,this.onerror=null,this.onloadend=null}(y.prototype=n).constructor=y,n.createReader=function(){return new g(this.fullPath,this.fileSystem)},n.getDirectory=function(e,t,n,i){var o=this;l.exec("function"!=typeof n?null:function(e){e=new y(e.name,e.fullPath,o.fileSystem,e.remoteURL);n(e)},"function"!=typeof i?null:function(e){i(new _(e))},"getDirectory",[this.fullPath,e,t])},n.removeRecursively=function(e,t){l.exec(e,"function"!=typeof t?null:function(e){t(new _(e))},"removeRecursively",[this.fullPath])},n.getFile=function(e,t,n,i){var o=this;l.exec("function"!=typeof n?null:function(e){e=new h(e.name,e.fullPath,o.fileSystem,e.remoteURL);n(e)},"function"!=typeof i?null:function(e){i(new _(e))},"getFile",[this.fullPath,e,t])},g.prototype.readEntries=function(o,t){var s=this,e="function"!=typeof o?null:function(e){for(var t=[],n=0;n<e.length;n++){var i=null;e[n].isDirectory?i=new y(e[n].name,e[n].fullPath,s.__fileSystem__,e[n].remoteURL):e[n].isFile&&(i=new h(e[n].name,e[n].fullPath,s.__fileSystem__,e[n].remoteURL)),t.push(i)}o(t)};l.exec(e,"function"!=typeof t?null:function(e){t(new _(e))},"readEntries",[this.path])},v.EMPTY=0,v.LOADING=1,v.DONE=2;n=v.prototype;function b(e){this.fileName="",this.readyState=0,this.result=null,this.length=0,e&&(this.fileName=e.fullPath||e,this.length=e.size||0),this.position=0,this.error=null,this.onwritestart=null,this.onprogress=null,this.onwrite=null,this.onabort=null,this.onsuccess=null,this.onerror=null,this.onwriteend=null}n.abort=function(){this.result=null,this.readyState!=v.DONE&&this.readyState!=v.EMPTY&&(this.readyState=v.DONE,"function"==typeof this.onabort&&this.onabort(new i("abort",{target:this})),"function"==typeof this.onloadend&&this.onloadend(new i("loadend",{target:this})))},n.readAsText=function(e,t){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==v.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=v.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var n=this;l.exec(function(e){n.readyState!==v.DONE&&(n.result=e,"function"==typeof n.onload&&n.onload(new i("load",{target:n})),n.readyState=v.DONE,"function"==typeof n.onloadend&&n.onloadend(new i("loadend",{target:n})))},function(e){n.readyState!==v.DONE&&(n.readyState=v.DONE,n.result=null,n.error=new _(e),"function"==typeof n.onerror&&n.onerror(new i("error",{target:n})),"function"==typeof n.onloadend&&n.onloadend(new i("loadend",{target:n})))},"readAsText",[this.fileName,t||"UTF-8",e.start,e.end])},n.readAsDataURL=function(e){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==v.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=v.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var t=this;l.exec(function(e){t.readyState!==v.DONE&&(t.readyState=v.DONE,t.result=e,"function"==typeof t.onload&&t.onload(new i("load",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},function(e){t.readyState!==v.DONE&&(t.readyState=v.DONE,t.result=null,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},"readAsDataURL",[this.fileName,e.start,e.end])},n.readAsBase64=function(e){if(this.fileName="",void 0===e.fullPath?this.fileName=e:this.fileName=e.fullPath,this.readyState==v.LOADING)throw new _(_.INVALID_STATE_ERR);this.readyState=v.LOADING,"function"==typeof this.onloadstart&&this.onloadstart(new i("loadstart",{target:this}));var t=this;l.exec(function(e){t.readyState!==v.DONE&&(t.readyState=v.DONE,t.result=e,"function"==typeof t.onload&&t.onload(new i("load",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},function(e){t.readyState!==v.DONE&&(t.readyState=v.DONE,t.result=null,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onloadend&&t.onloadend(new i("loadend",{target:t})))},"readAsBase64",[this.fileName,e.start,e.end])},n.readAsArrayBuffer=function(e){},b.INIT=0,b.WRITING=1,b.DONE=2;n=b.prototype;function I(e,t){this.name=e||null,this.root=null,t&&(this.root=new y(t.name,t.fullPath,this,t.remoteURL))}function m(t,e,n){var i="function"!=typeof t.complete?function(){}:t.complete,o="function"!=typeof t.success?i:function(e){t.success(e),i(e)},s="function"!=typeof t.fail?i:function(e){t.fail(e),i(e)};callbackID=a.callbackId(o,s),a.exec(l.NATIVEF,e,[callbackID,n()])}return n.abort=function(){if(this.readyState===b.DONE||this.readyState===b.INIT)throw new _(f(_.INVALID_STATE_ERR));this.error=new _(f(_.ABORT_ERR)),this.readyState=b.DONE,"function"==typeof this.onabort&&this.onabort(new i("abort",{target:this})),"function"==typeof this.onwriteend&&this.onwriteend(new i("writeend",{target:this}))},n.write=function(e){var t=this;if("string"!=typeof e)throw new _(_.TYPE_MISMATCH_ERR);if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING,"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:t})),l.exec(function(e){t.readyState!==b.DONE&&(t.position+=e,t.length+=e,t.readyState=b.DONE,"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onsuccess&&t.onsuccess(new i("success",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"write",[this.fileName,e,this.position])},n.writeAsBinary=function(e){var t=this;if("string"!=typeof e)throw new _(_.TYPE_MISMATCH_ERR);if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING,"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:t})),l.exec(function(e){t.readyState!==b.DONE&&(t.position+=e,t.length+=e,t.readyState=b.DONE,"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onsuccess&&t.onsuccess(new i("success",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"writeAsBinary",[this.fileName,e,this.position])},n.seek=function(e){if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);!e&&0!==e||(e<0?this.position=Math.max(e+this.length,0):e>this.length?this.position=this.length:this.position=e)},n.truncate=function(e){if(this.readyState===b.WRITING)throw new _(_.INVALID_STATE_ERR);this.readyState=b.WRITING;var t=this;"function"==typeof t.onwritestart&&t.onwritestart(new i("writestart",{target:this})),l.exec(function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.length=e,t.position=Math.min(t.position,e),"function"==typeof t.onwrite&&t.onwrite(new i("write",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},function(e){t.readyState!==b.DONE&&(t.readyState=b.DONE,t.error=new _(e),"function"==typeof t.onerror&&t.onerror(new i("error",{target:t})),"function"==typeof t.onwriteend&&t.onwriteend(new i("writeend",{target:t})))},"truncate",[this.fileName,e,this.position])},{FileSystem:I,DirectoryEntry:y,DirectoryReader:g,FileReader:v,FileWriter:b,requestFileSystem:function(t,n,i){function o(e){"function"==typeof i&&i(new _(e))}var s,e;t<1||4<t?o(f(_.SYNTAX_ERR)):(e=function(e){e?"function"==typeof n&&(s||(s=new I(e.name,e.root),u[t]=s),n(s)):o(f(_.NOT_FOUND_ERR))},(s=u[t])?(r.setTimeout?r:c).setTimeout(e(s),0):l.exec(e,o,"requestFileSystem",[t]))},resolveLocalFileSystemURL:function(e,n,t){function i(e){t&&t(new _(e))}"string"==typeof e?l.exec(function(e){var t;e?n&&((t=u[e.type])||(t=new I(e.fsName,e.fsRoot),u[e.type]=t),e=new(e.isDirectory?y:h)(e.name,e.fullPath,t,e.remoteURL),n(e)):i(f(_.NOT_FOUND_ERR))},i,"resolveLocalFileSystemURL",[e]):setTimeout(function(){i(f(_.ENCODING_ERR))},0)},convertLocalFileSystemURL:function(e){return a.execSync(l.NATIVEF,"convertLocalFileSystemURL",[e])},convertAbsoluteFileSystem:function(e){return a.execSync(l.NATIVEF,"convertAbsoluteFileSystem",[e])},getImageInfo:function(t){var n="function"!=typeof t.complete?function(){}:t.complete,e="function"!=typeof t.success?n:function(e){t.success(e),n(e)},i="function"!=typeof t.fail?n:function(e){t.fail(e),n(e)},o="string"!=typeof t.savePath?"":t.savePath;callbackID=a.callbackId(e,i),a.exec(l.NATIVEF,"getImageInfo",[callbackID,t.src,o])},getFileInfo:function(e){m(e,"getFileInfo",function(){return{filePath:e.filePath,digestAlgorithm:e.digestAlgorithm}})},getAudioInfo:function(e){m(e,"getAudioInfo",function(){return{filePath:e.filePath}})},getVideoInfo:function(e){m(e,"getVideoInfo",function(){return{filePath:e.filePath}})},chooseFile:function(e,t,n){callbackID=a.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)}),a.exec(l.NATIVEF,"chooseFile",[callbackID,e])},PRIVATE_WWW:1,PRIVATE_DOC:2,PUBLIC_DOCUMENTS:3,PUBLIC_DOWNLOADS:4}}),PlusObject.register("gallery",function(e,t,n,i){var s=t.bridge,r="Gallery",c=0,a=1;function u(e,t){this.code=e||null,this.message=t||""}u.BUSY=1;var l={__galleryStatus:c,onPickImageFinished:null,pick:function(n,t,e){var i,o;a!=l.__galleryStatus?(l.__galleryStatus=a,i=s.callbackId(function(e){var t;l.__galleryStatus=c,"function"==typeof n&&(e&&e.multiple?((t={}).files=e.files,n(t)):n(e.files[0]))},function(e){l.__galleryStatus=c,"function"==typeof t&&t(e)}),o=s.callbackId(function(){"function"==typeof e.onmaxed&&e.onmaxed()}),s.exec(r,"pick",[i,e,o],{cbid:i})):setTimeout(function(){"function"==typeof t&&t(new u(u.BUSY,"The album has been opened"))},0)},save:function(e,t,n){if("string"!=typeof e)return!1;var i=s.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});return s.exec(r,"save",[e,i],{cbid:i}),!0},compress:function(e,t,n){if("string"!=typeof e)return!1;var i=s.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)});return s.exec(r,"compress",[e,i],{cbid:i}),!0}};return l}),PlusObject.register("barcode",function(a,o,e,t){var u="barcode",l=(o=o).tools,_=o.bridge,s={};function n(e,t,n,i,o,s){var r=this;r.IDENTITY=u,r.onmarked=null,r.onerror=null,r.isClose=!1,r.__uuid__=l.UUID("bc");var c=r.callbackId=null;o=o||r.__uuid__,this.callbackId=_.callbackId(function(e){"function"==typeof r.onmarked&&r.onmarked(e.type,e.message,e.file)},function(e){"function"==typeof r.onerror&&r.onerror(e)}),a.document&&(div=document.getElementById(e),null!=div&&null!=div&&(div.addEventListener("resize",function(){var e=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight];_.exec(u,"resize",[e])},!1),c=[div.offsetLeft,div.offsetTop,div.offsetWidth,div.offsetHeight])),null!=s&&!s||_.exec(u,"Barcode",[this.__uuid__,this.callbackId,o,c,t,n,i])}var i=n.prototype;i.setStyle=function(e){this.isClose||_.exec(u,"setStyle",[this.__uuid__,e])},i.start=function(e){this.isClose||_.exec(u,"start",[this.__uuid__,e])},i.setFlash=function(e){this.isClose||_.exec(u,"setFlash",[this.__uuid__,e])},i.cancel=function(){this.isClose||_.exec(u,"cancel",[this.__uuid__])},i.close=function(){this.isClose||(_.exec(u,"close",[this.__uuid__]),this.isClose=!0)};i={Barcode:n,create:function(e,t,n,i){return e=new o.barcode.Barcode(null,t,n,i,e,!0),s[e.__uuid__]=e,s[e.__uuid__]},getBarcodeById:function(e){if(e&&"string"==typeof e){var t=_.execSync(u,"getBarcodeById",[e]);if(null!=t&&null!=t.uuid){if(s[t.uuid])return s[t.uuid];if(null==t)return null;e=new o.barcode.Barcode(null,t.filters,t.options,t.autoDecodeCharset,e,!1);return e.__uuid__=t.uuid,_.exec(u,"addCallBack",[e.__uuid__,e.callbackId]),s[e.__uuid__]=e}}},scan:function(e,t,n,i,o){var s=_.callbackId("function"!=typeof t?null:function(e){t(e.type,e.message,e.file,e.charSet)},"function"!=typeof n?null:function(e){n(e)});_.exec(u,"scan",[s,e,i,o])},QR:0,EAN13:1,EAN8:2,AZTEC:3,DATAMATRIX:4,UPCA:5,UPCE:6,CODABAR:7,CODE39:8,CODE93:9,CODE128:10,ITF:11,MAXICODE:12,PDF417:13,RSS14:14,RSSEXPANDED:15};return i}),PlusObject.register("audio",function(e,t,n,i){var o=t.bridge,s=t.tools,r="Audio",c="RecorderExecMethod",a="AudioExecMethod",u="AudioSyncExecMethod";t.audio={getRecorder:function(){var e={_Audio_UUID__:s.UUID("Record"),supportedFormats:["amr","3gp","aac"],supportedSamplerates:[44100,16e3,8e3],record:function(e,t,n){n=o.callbackId(t,n);o.exec(r,c,["record",[this._Audio_UUID__,n,e]])},stop:function(){o.exec(r,c,["stop",[this._Audio_UUID__]])},pause:function(){o.exec(r,c,["pause",[this._Audio_UUID__]])},resume:function(){o.exec(r,c,["resume",[this._Audio_UUID__]])}};return s.IOS==s.platform&&(e.supportedFormats=["wav","aac","amr","mp3"]),e},createPlayer:function(e){var t={_Player_Param:e,_Audio_Player_UUID_:s.UUID("Player"),play:function(e,t){t=o.callbackId(e,t);o.exec(r,a,["play",[this._Audio_Player_UUID_,t]])},pause:function(){o.exec(r,a,["pause",[this._Audio_Player_UUID_]])},resume:function(){o.exec(r,a,["resume",[this._Audio_Player_UUID_]])},stop:function(){o.exec(r,a,["stop",[this._Audio_Player_UUID_]])},seekTo:function(e){o.exec(r,a,["seekTo",[this._Audio_Player_UUID_,e]])},getDuration:function(){return o.execSync2(r,u,["getDuration",[this._Audio_Player_UUID_]])},getPosition:function(){return o.execSync2(r,u,["getPosition",[this._Audio_Player_UUID_]])},setRoute:function(e){o.exec(r,a,["setRoute",[this._Audio_Player_UUID_,e]])},setSessionCategory:function(e){o.exec(r,a,["setSessionCategory",[this._Audio_Player_UUID_,e]])},isPaused:function(){return o.execSync2(r,u,["getPaused",[this._Audio_Player_UUID_]])},getBuffered:function(){return o.execSync2(r,u,["getBuffered",[this._Audio_Player_UUID_]])},getStyles:function(e){return o.execSync2(r,u,["getStyles",[this._Audio_Player_UUID_,e]])},setStyles:function(e){o.exec(r,a,["setStyles",[this._Audio_Player_UUID_,e]])},addEventListener:function(e,t){t=o.callbackId(t);o.exec(r,a,["addEventListener",[this._Audio_Player_UUID_,e,t]])},removeEventListener:function(e){o.exec(r,a,["removeEventListener",[this._Audio_Player_UUID_,e]])},close:function(){o.exec(r,a,["close",[this._Audio_Player_UUID_]])},playbackRate:function(e){o.exec(r,a,["playbackRate",[this._Audio_Player_UUID_,e]])}},e={};return"string"==typeof t._Player_Param?e.src=t._Player_Param:e=t._Player_Param,o.execSync(r,u,["CreatePlayer",[t._Audio_Player_UUID_,e]]),t},ROUTE_SPEAKER:0,ROUTE_EARPIECE:1}}),PlusObject.register("push",function(e,o,t,n){var s=o.bridge,r=o.tools,c="Push";function i(){}i.prototype.setPushChannel=function(e){o.tools.ANDROID==o.tools.platform&&s.exec(c,"setPushChannel",[e])},i.prototype.getAllChannels=function(){return o.tools.ANDROID==o.tools.platform?s.execSync(c,"getAllChannels",[]):[]},o.push={__isUniPush__:n&&n.__isUniPush__,getClientInfo:function(){var e=this.__isUniPush__?f().getClientInfo():s.execSync2(c,"getClientInfo",[]);return e},getClientInfoAsync:function(t,n){var e;this.__isUniPush__?f().getClientInfoAsync(function(e){0==e.ret?"function"==typeof t&&t(e.payload):"function"==typeof n&&n(e.payload)}):(e=s.callbackId(function(e){"function"==typeof t&&t(e)},function(e){"function"==typeof n&&n(e)}),s.exec(c,"getClientInfoAsync",[e]))},createMessage:function(e,t,n){var i;r.platform==r.IOS?this.__isUniPush__?f().createMessage({content:e,payload:t,options:n}):s.exec(c,"createMessage",[e,t,n]):(n&&n.icon&&(n.icon=o.io.convertLocalFileSystemURL(n.icon)),n&&n.when&&(i=n.when,"[object Date]"===Object.prototype.toString.call(i)?n.when=i.getTime():"string"==typeof i&&(isNaN(parseInt(i))||(n.when=parseInt(i)))),e=new _(e,t,n),n=this.__isUniPush__?f().createMessage(e):s.execSync(c,"createMessage",[e]),e.__UUID__=n)},clear:function(){this.__isUniPush__?f().clear():s.exec(c,"clear",[])},addEventListener:function(e,t,n){var i;this.__isUniPush__?f().addPushEvent(o.__HtMl_Id__,e,t):(i=r.UUID(e),l.pushCallback_Push(i,t,n),s.exec(c,"addEventListener",[o.__HtMl_Id__,i,e]))},remove:function(e){this.__isUniPush__&&r.platform==r.ANDROID?f().remove(e.__UUID__):s.exec(c,"remove",[e.__UUID__])},getAllMessage:function(){return this.__isUniPush__&&r.platform==r.ANDROID?f().getAllMessage():s.execSync(c,"getAllMessage",[])},setAutoNotification:function(e){this.__isUniPush__&&r.platform==r.ANDROID?f().setAutoNotification(e):s.exec(c,"setAutoNotification",[e])},getChannelManager:function(){return new i}};var a,u,l=(a=[],{pushCallback_Push:function(e,t,n){a[e]={fun:t,nokeep:n}},execCallback_Push:function(e,t,n){a[e]&&a[e].fun&&a[e].fun(n)}});function _(e,t,n){this.__UUID__=null,this.message=e,this.Payload=t,this.options=n}function f(){return u||((u=o.weex.requireModule("UniPush")).initialize(),r.platform==r.ANDROID&&o.webview.currentWebview().addEventListener("close",function(){u.removePushEvent(o.__HtMl_Id__)})),u}o.push.__Mkey__Push__=l}),PlusObject.register("key",function(n,o){var s=(o=o).bridge,r="UI",i=o.tools,c="execMethod";return keyEvent={backbutton:"back",menubutton:"menu",searchbutton:"search",volumeupbutton:"volumeup",volumedownbutton:"volumedown",keyup:"keyup",keydown:"keydown",longpressed:"longpressed"},o.key={addEventListener:function(e,n,t){var i;e&&n&&"string"==typeof e&&"function"==typeof n&&(i=o.webview.__currentWebview(),o.obj.Callback.prototype.addEventListener.apply(i,[keyEvent[e],function(e){var t={};t.keycode=e.keyType,t.keyCode=e.keyCode,t.keyType=e.keyType,n(t)},t])&&(e=[keyEvent[e],o.__HtMl_Id__],s.exec(r,c,[i.__IDENTITY__,"addEventListener",[i.__uuid__,e]])))},removeEventListener:function(e,t){var n;e&&t&&"string"==typeof e&&"function"==typeof t&&(n=o.webview.__currentWebview(),o.obj.Callback.prototype.removeEventListener.apply(n,[keyEvent[e],t])&&(e=[keyEvent[e],o.__HtMl_Id__],n=o.webview.__currentWebview(),s.exec(r,c,[n.__IDENTITY__,"removeEventListener",[n.__uuid__,e]])))},setAssistantType:function(e){var t;i.platform==i.IOS?n.__keyboardAssist.setInputType(e):(t=[e,o.__HtMl_Id__],e=o.webview.currentWebview(),s.exec(r,c,[e.__IDENTITY__,"setAssistantType",[e.__uuid__,t]]))},hideSoftKeybord:function(){var e,t;i.platform==i.IOS?s.exec("Runtime","hideSoftKeybord"):(e=[o.__HtMl_Id__],t=o.webview.__currentWebview(),s.exec(r,c,[t.__IDENTITY__,"hideSoftKeybord",[t.__uuid__,e]]))},showSoftKeybord:function(){var e=[o.__HtMl_Id__],t=o.webview.__currentWebview();s.exec(r,c,[t.__IDENTITY__,"showSoftKeybord",[t.__uuid__,e]])},setVolumeButtonEnabled:setVolumeButtonEnabled=function(e){var t;i.ANDROID==i.platform&&(t=[e],e=o.webview.currentWebview(),s.exec(r,c,[e.__IDENTITY__,"setVolumeButtonEnabled",[e.__uuid__,t]]))}}}),PlusObject.register("oauth",function(e,n,t,i){var r="OAuth",c=n.bridge;function o(){this.id="",this.description="",this.nativeClient=!1,this.authResult=null,this.userInfo=null,this.appleInfo=null,this.univerifyInfo=null}function a(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)(function(e){var t;e.onclick&&"function"==typeof e.onclick&&(t=c.callbackId(function(){e.onclick(e)}),e.__cb__={id:t,htmlId:n.__HtMl_Id__})})(e[t])}o.prototype.getCheckBoxState=function(){if("univerify"==this.id)return c.execSync2(r,"getCheckBoxState",[this.id])},o.prototype.closeAuthView=function(){"univerify"==this.id&&c.exec(r,"closeAuthView",[this.id],{sid:this.id})},o.prototype.preLogin=function(t,n){var e;"univerify"==this.id?(e=c.callbackId("function"!=typeof t?null:function(e){t({})},"function"!=typeof n?null:function(e){n(e)}),c.exec(r,"preLogin",[this.id,e],{cbid:e,sid:this.id})):n({code:10012,message:"univerify only"})},o.prototype.login=function(n,t,e){var i;e&&"object"==typeof e&&(!(i=e.univerifyStyle)||"object"!=typeof i||(s=i.buttons)&&"object"==typeof s&&a(s.list));var o=this,s=c.callbackId("function"!=typeof n?null:function(e){var t={};(t.target=o).univerifyInfo=e.univerifyInfo,o.authResult=e.authResult,o.userInfo=e.userInfo,o.appleInfo=e.appleInfo,o.extra=e.extra,n(t)},"function"!=typeof t?null:function(e){t(e)});c.exec(r,"login",[this.id,s,e],{cbid:s,sid:this.id})},o.prototype.authorize=function(t,n,e){var i,o=this;"weixin"==o.id?(i=c.callbackId("function"!=typeof t?null:function(e){e.target=o,t(e)},"function"!=typeof n?null:function(e){n(e)}),c.exec(r,"authorize",[this.id,i,e],{cbid:i,sid:this.id})):n({code:10012,message:"WeChat only"})},o.prototype.logout=function(n,t){var i=this,e="function"!=typeof n?null:function(e){var t={};i.authResult=null,i.userInfo=null,i.appleInfo=null,i.extra=e.extra,t.target=i,n(t)},o="function"!=typeof t?null:function(e){t(e)};this.authResult=null,this.userInfo=null,this.appleInfo=null;o=c.callbackId(e,o);c.exec(r,"logout",[this.id,o],{cbid:o,sid:this.id})},o.prototype.getUserInfo=function(n,t){var i=this,e=c.callbackId("function"!=typeof n?null:function(e){var t={};i.authResult=e.authResult,i.userInfo=e.userInfo,i.appleInfo=e.appleInfo,i.extra=e.extra,t.target=i,n(t)},"function"!=typeof t?null:function(e){t(e)});c.exec(r,"getUserInfo",[this.id,e],{cbid:e,sid:this.id})},o.prototype.addPhoneNumber=function(n,t){var i=this,e=c.callbackId("function"!=typeof n?null:function(e){var t={};i.authResult=e.authResult,i.userInfo=e.userInfo,i.appleInfo=e.appleInfo,i.extra=e.extra,t.target=i,n(t)},"function"!=typeof t?null:function(e){t(e)});c.exec(r,"addPhoneNumber",[this.id,e],{cbid:e,sid:this.id})};var u={AuthService:o,getServices:function(s,t){var e=c.callbackId("function"!=typeof s?null:function(e){for(var t=[],n=e.length,i=0;i<n;i++){var o=new u.AuthService;o.id=e[i].id,o.description=e[i].description,o.authResult=e[i].authResult,o.userInfo=e[i].userInfo,o.appleInfo=e[i].appleInfo,o.univerifyInfo=e[i].univerifyInfo,o.nativeClient=e[i].nativeClient,t[i]=o}s(t)},"function"!=typeof t?null:function(e){t(e)});c.exec(r,"getServices",[e])}};n.oauth=u}),PlusObject.register("share",function(i,s,e,t){var r=s.bridge,c=s.tools,a="Share",u={};function l(e,t,n,i){this.id=e,this.description=t,this.authenticated=n,this.accessToken=i,this.nativeClient=!1}var n=l.prototype;function o(e,t){var o=this;o.__UUID__=c.UUID("Authorize"),o.__componentid__=e,o.display=t,o.onloaded=null,o.onauthenticated=null,o.onerror=null,o.__top__=0,o.__left__=0,o.__width__=0;o.__height__=0;t=i.document&&i.document.getElementById(o.__componentid__);t&&(o.__left__=t.offsetLeft,o.__top__=t.offsetTop,o.__width__=t.offsetWidth,o.__height__=t.offsetHeight);var n=function(e){"function"==typeof o.onerror&&o.onerror(e)},t=r.callbackId(function(i){"load"==i.evt?"function"==typeof o.onloaded&&o.onloaded():"auth"==i.evt&&"function"==typeof o.onauthenticated&&s.share.getServices(function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.id==i.type){n.authenticated=i.authenticated,n.accessToken=i.accessToken,o.onauthenticated(n);break}}},function(e){n(e)})},n);r.exec(a,"create",[o.__UUID__,t,o.display,o.__left__,o.__top__,o.__width__,o.__height__])}n.authorize=function(t,n,e){var i=this,o=r.callbackId("function"!=typeof t?null:function(e){i.authenticated=e.authenticated,i.accessToken=e.accessToken,t(i)},"function"!=typeof n?null:function(e){n(e)});r.exec(a,"authorize",[o,this.id,e])},n.forbid=function(){this.authenticated=!1,this.accessToken=null,r.exec(a,"forbid",[this.id])},n.send=function(e,t,n){var i=r.callbackId("function"!=typeof t?null:function(e){t()},"function"!=typeof n?null:function(e){n(e)});r.exec(a,"send",[i,this.id,e])},n.launchMiniProgram=function(e,t,n){var i=r.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});r.exec(a,"launchMiniProgram",[i,this.id,e])},n.openCustomerServiceChat=function(e,t,n){var i=r.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});r.exec(a,"openCustomerServiceChat",[i,this.id,e])},o.prototype.load=function(e){this.id=e,r.exec(a,"load",[this.__UUID__,e])},o.prototype.setVisible=function(e){r.exec(a,"setVisible",[this.__UUID__,e])};n={Authorize:o,getServices:function(s,t){var e="function"!=typeof s?null:function(e){for(var t=[],n=0;n<e.length;n++){var i,o=e[n];o.id&&((i=(i=u[o.id])||new l).id=o.id,i.description=o.description,i.authenticated=o.authenticated,i.accessToken=o.accessToken,i.nativeClient=o.nativeClient,u[o.id]=i,t.push(i))}s(t)},e=r.callbackId(e,"function"!=typeof t?null:function(e){t(e)});r.exec(a,"getServices",[e])},sendWithSystem:function(e,t,n){var i=r.callbackId("function"!=typeof t?null:function(e){t()},"function"!=typeof n?null:function(e){n(e)});r.exec(a,"sendWithSystem",[i,e])}};s.share=n}),PlusObject.register("speech",function(e,o,t,n){var r="Speech",c=o.bridge,i={startRecognize:function(e,t,n){var i,o=c.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)}),s={};e.onstart&&(i="function"!=typeof e.onstart?null:function(){e.onstart()},s.onstart=c.callbackId(i)),e.onend&&(i="function"!=typeof e.onend?null:function(){e.onend()},s.onend=c.callbackId(i)),c.exec(r,"startRecognize",[o,e,s])},stopRecognize:function(){c.exec(r,"stopRecognize",[])},addEventListener:function(e,t,n){var i;t&&(i=function(e){"function"==typeof t&&t(e)},t.listener=i,i=c.callbackId(i)),c.exec(r,"addEventListener",[e,i,o.__HtMl_Id__])}};o.speech=i}),PlusObject.register("ios",function(plusContext,plus){var bridge=plus.bridge,tools=plus.tools,_Server="Invocation",_importHash=[],_frameObjHash={},_currentFrameObj=null,iosTools={},classTemplate={};iosTools.undefObjectHash={};var jsbDef="";function JNBType(e,t){this.type=e,this.value=t}function JSBBaseObject(){this.__TYPE__="JSBObject",this.__UUID__=tools.UUID("JSBaseObject")}function JSImplements(e,t){e=__compatibilityNamespace(e);var o=this;this.__UUID__=tools.UUID("JSImplements"),this.callback=t,this.callbackId=bridge.callbackId(function(e){for(var t=e.arguments,n=[],i=0;i<t.length;i++)n.push(plus.ios.__Tool.New(t[i],!0));o.callback[e.method].apply(o,n)},null);var n,i=[];for(n in t)i.push(n);e=bridge.execSync2(_Server,"implements",[this.__UUID__,e,i,this.callbackId],null,!0);return plus.ios.__Tool.New(e,!0)}function JSBridge(){this.__Tool=iosTools,this.__JSBBaseObject=JSBBaseObject}plus.tools.IOS==plus.tools.platform?jsbDef+="plus.ios.":plus.tools.ANDROID==plus.tools.platform&&(jsbDef+="plus.android."),iosTools.process=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.warp(e[n]));return t},iosTools.attach=function(e,t){var n=this.undefObjectHash[e];if(n&&t){for(var i=0;i<n.length;i++)n[i].__proto__=t.prototype;delete this.undefObjectHash.className}},iosTools.New=function(e,t){var n=null;if(e){if("object"==e.type){var i,o=classTemplate.isImport(e.className);if(o)n=new o(t);else{if(e.superClassNames)for(var s=0;s<e.superClassNames.length&&!(o=classTemplate.isImport(e.superClassNames[s]));s++);o?n=new o(t):(n=new JSBBaseObject,(i=this.undefObjectHash[e.className])||(this.undefObjectHash[e.className]=i=[]),i.push(n))}return n.className=e.className,n.__UUID__=e.value,n}if("struct"==e.type)return new JNBType(e.type,e.value);if(Array.isArray(e.value))for(s=0;s<e.value.length;s++)e.value[s]=iosTools.New(e.value[s],t);return e.value}return null},iosTools.handleClassName=function(e){return e.replace("$",".")},iosTools.saveContent=function(e,t){bridge.execSync2(_Server,"__saveContent",[e,t],null,!0)},iosTools.warp=function(i){var e,t={};return i&&"JSBObject"==i.__TYPE__?(t.type="object",t.value=i.__UUID__):i instanceof JNBType?(t.type=i.type,t.value=i.value,0==i.type.indexOf("@block")&&(t.type=i.type,e=bridge.callbackId(function(e){i.value;for(var t=[],n=0;n<e.length;n++)t.push(plus.ios.__Tool.New(e[n],!0));i.value.apply(this,t)}),t.value=e,alert(t.value))):void 0===i||null==i?(t.type="null",t.value=i):"string"==typeof i||"String"==typeof i?(t.type="string",t.value=i):"number"==typeof i?(t.type="number",t.value=i):"boolean"==typeof i?(t.type="boolean",t.value=i):"function"==typeof i?(t.type="block",e=bridge.callbackId(function(e){for(var t=[],n=0;n<e.length;n++)t.push(plus.ios.__Tool.New(e[n],!0));i.apply(this,t)}),t.value=e):plus.tools.IOS==plus.tools.platform&&"object"==typeof i?(t.type="jsonObject",t.value=i):t=i,t},JNBType.prototype.constructor=JNBType,JSBBaseObject.prototype.plusSetAttribute=function(){var e=null;try{for(var t=[],n=1;n<arguments.length;n++)t.push(iosTools.warp(arguments[n]));e=plus.bridge.execSync2(_Server,"__plusSetAttribute",[this.__UUID__,arguments[0],t],null,!0),e=iosTools.New(e,!0)}catch(e){throw e}return e},JSBBaseObject.prototype.plusGetAttribute=function(e){var t=null;try{t=plus.bridge.execSync2(_Server,"__plusGetAttribute",[this.__UUID__,e],null,!0),t=plus.ios.__Tool.New(t,!0)}catch(e){throw e}return t},JSBBaseObject.prototype.importClass=function(){return plus.android.importClass(this)},JSBBaseObject.prototype.plusCallMethod=function(e){var t=null;try{var n,i="",o=[],s=0;for(n in e){if("string"!=typeof n)return;var r=e[n];if(0==s){if(i=n,void 0===r){s++;break}i+=":"}else i+=n+":";o.push(r),s++}if(0==s)return;o=plus.ios.__Tool.process(o),t=plus.bridge.execSync2(_Server,"__exec",[this.__UUID__,i,o],null,!0);t=plus.ios.__Tool.New(t,!0)}catch(e){throw e}return t},JSImplements.prototype=new JSBBaseObject,JSImplements.prototype.constructor=JSImplements,classTemplate.hashTable={},classTemplate.importClass=function(e,t){var n=this.isImport(e);if(n)return n;for(var i=this.newClassDefine(e,t),t=bridge.execSync2(_Server,"import",[e],null,!0),o=t.ClassMethod,s=0;s<o.length;s++)i+=this.AddMethodToClass(e,o[s],!0);for(var r=t.InstanceMethod,s=0;s<r.length;s++)i+=this.AddMethodToClass(e,r[s]);if(plus.tools.ANDROID==plus.tools.platform)for(var c=t.ClassConstKeys,a=t.ClassConstValues,s=0;s<c.length;s++)i+=this.AddStaticConstToClass(e,c[s],a[s]);return this.hashTable[e]=n=classTemplate.createClass(e,i),iosTools.attach(e,n),n},classTemplate.isImport=function(e){return classTemplate.hashTable[e]},classTemplate.newClassDefine=function(e,t){var n="",i=e;e=iosTools.handleClassName(e),t=t&&iosTools.handleClassName(t);for(var o=jsbDef+t,s=(e=jsbDef+e).split("."),r="plus",c=1;c<s.length-1;c++)n+="if(!"+(r=r+"."+s[c])+")",n+=r+"={};";return n+=r+"."+s[s.length-1]+"=",n+="function(nocreate) {            this.__UUID__ = plus.tools.UUID('JSB');            this.__TYPE__ = 'JSBObject';            var args = plus.ios.__Tool.process(arguments);            if ( nocreate && plus.tools.IOS == plus.tools.platform ) {} else {                plus.bridge.execSync2('"+_Server+"', '__Instance',[this.__UUID__, '"+i+"',args],null,true);            }        };",(t=t?o:"plus.ios.__JSBBaseObject")&&(n+=e+".prototype = new "+t+"('__super__constructor__');",n+=e+".prototype.constructor = "+e+";"),n},classTemplate.createClass=function(className,javasrcipt){className=iosTools.handleClassName(className);var newCls="(function(plus){"+javasrcipt+"return "+jsbDef+className+";})(plus);";return eval(newCls)},classTemplate.AddStaticConstToClass=function(e,t,n){var i;return e=iosTools.handleClassName(e),Array.isArray(n)&&0==n.length?(i=jsbDef+e+"."+t+"=[];",i+=jsbDef+e+".prototype."+t+"=[];"):(i=jsbDef+e+"."+t+"="+n+";",i+=jsbDef+e+".prototype."+t+"="+n+";"),i},classTemplate.AddMethodToClass=function(e,t,n){var i=e;e=iosTools.handleClassName(e);var o="";if(plus.tools.IOS==plus.tools.platform){var s=t.split(":"),r=s.length;if(0<r)for(var c=0;c<r;c++)o+=s[c];else o=s}else o=t;return e=n?jsbDef+e+"."+o:jsbDef+e+".prototype."+o,e+=" = function (){            var ret = null;            try {                var args = plus.ios.__Tool.process(arguments);",e+=n?"ret = plus.bridge.execSync2('"+_Server+"', '__execStatic', ['"+i+"', '"+t+"', args],null,true);":"ret = plus.bridge.execSync2('"+_Server+"', '__exec', [this.__UUID__, '"+t+"', args],null,true);",e+="ret = plus.ios.__Tool.New(ret, true);            } catch (e) {                throw e;            }            return ret;        };"},JSBridge.prototype.requestPermissions=function(e,t,n){Array.isArray(e)?(t=bridge.callbackId(t,n),bridge.exec(_Server,"requestPermissions",[t,e])):n({code:"-1",message:"Request permission must be array type"})},JSBridge.prototype.checkPermission=function(e,t,n){Array.isArray(e)?n():(n=bridge.callbackId(t,n),bridge.exec(_Server,"checkPermission",[n,e]))},JSBridge.prototype.importClass=function(e){var t,n;if((e=__compatibilityNamespace(e)).__TYPE__){if(!e.className)return;n=e.__UUID__,e=(t=e).className}var i=classTemplate.isImport(e);if(i)return i;var o=bridge.execSync2(_Server,"__inheritList",[e,n],null,!0);if(o){for(var s=o.length,r=s-1;0<=r;r--)i=r==s-1?classTemplate.importClass(o[r],null):classTemplate.importClass(o[r],o[r+1]);return t&&(t.__proto__=i.prototype),i}return null},JSBridge.prototype.invoke=function(e,t){for(var n=null,i=[],o=2;o<arguments.length;o++)i.push(plus.ios.__Tool.warp(arguments[o]));if("string"==typeof e)try{n=plus.bridge.execSync2(_Server,"__execStatic",[e,t,i],null,!0)}catch(e){throw e}else e&&"JSBObject"==e.__TYPE__?n=plus.bridge.execSync2(_Server,"__exec",[e.__UUID__,t,i],null,!0):null==e&&"string"==typeof t&&(n=plus.bridge.execSync2(_Server,"__execCFunction",[t,i],null,!0));return n=plus.ios.__Tool.New(n,!0)},JSBridge.prototype.autoCollection=function(e){e&&"JSBObject"==e.__TYPE__&&plus.bridge.execSync2(_Server,"__autoCollection",[e.__UUID__],null,!0)},JSBridge.prototype.setAttribute=function(e,t,n){"function"==typeof e||e&&"JSBObject"==e.__TYPE__&&e.plusSetAttribute(t,n)},JSBridge.prototype.getAttribute=function(e,t){return"function"!=typeof e&&e&&"JSBObject"==e.__TYPE__?e.plusGetAttribute(t):null},JSBridge.prototype.load=function(e){plus.bridge.execSync2(_Server,"__loadDylib",[e],null,!0)},JSBridge.prototype.newObject=function(e,t){var n=null;if("string"==typeof e){for(var i=[],o=1;o<arguments.length;o++)i.push(plus.ios.__Tool.warp(arguments[o]));n=plus.bridge.execSync2(_Server,"__newObject",[e,i],null,!0)}return(n=plus.ios.__Tool.New(n,!0))?n:new JNBType(e,t)},JSBridge.prototype.currentWebview=function(){var e;return _currentFrameObj||(e=plus.bridge.execSync2(_Server,"currentWebview",[],null,!0),_currentFrameObj=plus.ios.__Tool.New(e,!0)),_currentFrameObj},JSBridge.prototype.getWebviewById=function(e){if(e===plus.__HtMl_Id__)return this.currentWebview();var t=_frameObjHash[e];return t||(t=plus.bridge.execSync2(_Server,"getWebviewById",[e],null,!0),(t=plus.ios.__Tool.New(t,!0))&&(_frameObjHash[e]=t)),t},JSBridge.prototype.deleteObject=function(e){bridge.execSync2(_Server,"__release",[e.__UUID__],null,!0)},JSBridge.prototype.implements=function(e,t){return new JSImplements(e,t)};var __compatibilityNS={"io.dcloud.adapter.":"io.dcloud.common.adapter.","io.dcloud.android.content.":"io.dcloud.feature.internal.reflect.","io.dcloud.app.":"io.dcloud.common.app.","io.dcloud.constant.":"io.dcloud.common.constant.","io.dcloud.core.":"io.dcloud.common.core.","io.dcloud.DHInterface.":"io.dcloud.common.DHInterface.","io.dcloud.net.":"io.dcloud.common.util.net.","io.dcloud.permission.":"io.dcloud.common.core.permission.","io.dcloud.sdk.":"io.dcloud.feature.internal.sdk.","io.dcloud.splash.":"io.dcloud.feature.internal.splash.","io.dcloud.ui.":"io.dcloud.common.core.ui.","io.dcloud.util.":"io.dcloud.common.util."};function __compatibilityNamespace(e){if("string"!=typeof e||tools.platform==tools.IOS)return e;var t,n,i;for(i in __compatibilityNS)if(0==e.indexOf(i)){n=__compatibilityNS[t=i];break}return n&&e?e.replace(t,n):e}plus.ios=plus.android=new JSBridge,plus.ios.import=plus.ios.importClass,plus.tools.ANDROID==plus.tools.platform&&(plus.android.runtimeMainActivity=function(){if(plus.android.__runtimeMainActivity__)return plus.android.__runtimeMainActivity__;var t,e=plus.bridge.callbackId(function(e){t.onActivityResult&&t.onActivityResult(e[0],e[1],e[2])}),e=(t=plus.bridge.execSync2(_Server,"getContext",[e],null,!0)).className;return t.superClassNames=[],t=plus.ios.__Tool.New(t,!0),plus.android.importClass(e),plus.android.__runtimeMainActivity__=t})}),PlusObject.register("statistic",function(e,t,n,i){var o=t.bridge,s="Statistic";t.statistic={eventTrig:function(e,t){o.exec(s,"eventTrig",[e,t])},eventStart:function(e,t){o.exec(s,"eventStart",[e,t])},eventEnd:function(e,t){o.exec(s,"eventEnd",[e,t])},eventDuration:function(e,t,n){o.exec(s,"eventDuration",[e,t,n])}}}),PlusObject.register("sqlite",function(e,t,n,i){var o="Sqlite",s=t.bridge;t.sqlite={isOpenDatabase:function(e){return s.execSync(o,"isOpenDatabase",[e])},openDatabase:function(e){if(e&&e.name&&e.path)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),s.exec(o,"openDatabase",[callbackID,e.name,e.path])},closeDatabase:function(e){if(e&&e.name)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),s.exec(o,"closeDatabase",[callbackID,e.name])},transaction:function(e){if(e&&e.name&&e.operation)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),s.exec(o,"transaction",[callbackID,e.name,e.operation])},executeSql:function(e){if(e&&e.name&&e.sql)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),s.exec(o,"executeSql",[callbackID,e.name,e.sql])},selectSql:function(e){if(e&&e.name&&e.sql)return callbackID=this.getCallbackIDByFunction(e.success,e.fail),s.exec(o,"selectSql",[callbackID,e.name,e.sql])},getCallbackIDByFunction:function(t,n,e){return s.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)})}}}),PlusObject.register("ad",function(e,s,t,n){var o=(s=s).bridge,i=s.tools,r="Ad";function c(e,t,n,i,o){s.nativeObj.View.prototype.constructor.call(this,e,t,n,i,o),this.type="UniAdView"}var a=c.prototype;function u(){var r=this;this.__cbs__={},this.callbackId=o.callbackId(function(e){var t=e.evt,n=e.args,i=r.__cbs__[t];if(i)for(var o=i.length,s=0,s=0;s<o;s++)i[s](n)})}function l(e){this.__uuid__=i.UUID("RewardedVideoAd"),this.__cbs__=new u,o.exec(r,"RewardedVideoAd",[this.__uuid__,e,this.__cbs__.callbackId])}function _(e){this.__uuid__=i.UUID("FullScreenVideoAd"),this.__cbs__=new u,o.exec(r,"FullscreenVideoAd",[this.__uuid__,e,this.__cbs__.callbackId])}function f(e){this.__uuid__=i.UUID("InterstitialAd"),this.__cbs__=new u,o.exec(r,"InterstitialAd",[this.__uuid__,e,this.__cbs__.callbackId])}s.tools.extend(a,s.nativeObj.View.prototype),a.constructor=c,s.nativeObj.__regChildViews("UniAdView",c),c.prototype.bind=function(e){o.exec(r,"bind",[e&&e.__id,e&&e.__provider,this.__uuid__])},c.prototype.renderingBind=function(e){o.exec(r,"renderingBind",[e&&e.__id,e&&e.__provider,this.__uuid__])},c.prototype.changeDownloadStatus=function(){o.exec(r,"changeDownloadStatus",[this.__uuid__])},c.prototype.setDownloadListener=function(e){this.setEventListener("download",e)},c.prototype.setRenderingListener=function(e){this.setEventListener("render",e)},c.prototype.setDislikeListener=function(e){this.setEventListener("dislike",e)},c.prototype.setAdClickedListener=function(e){this.setEventListener("adClicked",e)},u.prototype.push=function(e,t){this.__cbs__[e]||(this.__cbs__[e]=[]),this.__cbs__[e].push(t)},u.prototype.pop=function(e,t){this.__cbs__[e]&&this.__cbs__[e].pop(t)},l.prototype.load=function(){o.exec(r,"load",[this.__uuid__])},l.prototype.show=function(){o.exec(r,"show",[this.__uuid__])},l.prototype.getProvider=function(){return o.execSync(r,"getProvider",[this.__uuid__])},l.prototype.destroy=function(){o.exec(r,"destroy",[this.__uuid__])},l.prototype.onLoad=function(e){this.__cbs__.push("load",e)},l.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},l.prototype.onError=function(e){this.__cbs__.push("error",e)},l.prototype.offError=function(e){this.__cbs__.pop("error",e)},l.prototype.onClose=function(e){this.__cbs__.push("close",e)},l.prototype.offClose=function(e){this.__cbs__.pop("close",e)},l.prototype.onVerify=function(e){this.__cbs__.push("verify",e)},l.prototype.offVerify=function(e){this.__cbs__.pop("verify",e)},l.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},l.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},_.prototype.load=function(){o.exec(r,"fullscreen_load",[this.__uuid__])},_.prototype.show=function(){o.exec(r,"fullscreen_show",[this.__uuid__])},_.prototype.getProvider=function(){return o.execSync(r,"fullscreen_getProvider",[this.__uuid__])},_.prototype.destroy=function(){o.exec(r,"fullscreen_destroy",[this.__uuid__])},_.prototype.onLoad=function(e){this.__cbs__.push("load",e)},_.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},_.prototype.onError=function(e){this.__cbs__.push("error",e)},_.prototype.offError=function(e){this.__cbs__.pop("error",e)},_.prototype.onClose=function(e){this.__cbs__.push("close",e)},_.prototype.offClose=function(e){this.__cbs__.pop("close",e)},_.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},_.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},f.prototype.load=function(){o.exec(r,"interstitial_load",[this.__uuid__])},f.prototype.show=function(){o.exec(r,"interstitial_show",[this.__uuid__])},f.prototype.getProvider=function(){return o.execSync(r,"interstitial_getProvider",[this.__uuid__])},f.prototype.destroy=function(){o.exec(r,"interstitial_destroy",[this.__uuid__])},f.prototype.onLoad=function(e){this.__cbs__.push("load",e)},f.prototype.offLoad=function(e){this.__cbs__.pop("load",e)},f.prototype.onError=function(e){this.__cbs__.push("error",e)},f.prototype.offError=function(e){this.__cbs__.pop("error",e)},f.prototype.onClose=function(e){this.__cbs__.push("close",e)},f.prototype.offClose=function(e){this.__cbs__.pop("close",e)},f.prototype.onAdClicked=function(e){this.__cbs__.push("adClicked",e)},f.prototype.offAdClicked=function(e){this.__cbs__.pop("adClicked",e)},s.ad={setPrivacyConfig:function(e){},getPersonalizedAd:function(){return o.execSync(r,"getPersonalizedAd",null)},setPersonalizedAd:function(e){o.exec(r,"setPersonalizedAd",[e])},setSplashAd:function(e,t,n){var i=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});o.exec(r,"setSplashAd",[e,i])},getSplashAd:function(){return o.execSync(r,"getSplashAd",null)},showContentPage:function(e,t,n){var i=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});o.exec(r,"showContentPage",[i,e])},getProviders:function(t,n){var e=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});o.exec(r,"getProviders",[e])},getAds:function(e,t,n){var i=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});o.exec(r,"getAds",[i,e])},getDrawAds:function(e,t,n){var i=o.callbackId("function"!=typeof t?null:function(e){t(e)},"function"!=typeof n?null:function(e){n(e)});o.exec(r,"getDrawAds",[i,e])},releaseAdData:function(e){o.exec(r,"releaseAdData",[e&&e.__id,e&&e.__provider])},measureAdHeight:function(e,t){return o.execSync(r,"measureAdHeight",[t&&t.__id,t&&t.__provider,e])},createAdView:function(e){return new c((e=e||{}).id,e,null,!1,"UniAdView")},createRewardedVideoAd:function(e){return new l(e=e||{})},createFullScreenVideoAd:function(e){return new _(e=e||{})},createInterstitialAd:function(e){return new f(e=e||{})}}});