@yunzhijia/qing
Version:
> qingjs是为了方便前端人员在云之家环境调用native代码的工具类,兼容新版桌面端、老版桌面端、移动端、微信
2 lines • 33.9 kB
JavaScript
/** Fri Sep 15 2023 13:31:58 GMT+0800 (中国标准时间) **/
(()=>{var e={686:()=>{"use strict";var e="JSON解析失败";var t="参数错误",n="鉴权失败",r="获取签名失败",o="签名信息错误";function i(i,a){function u(e,t,r){if(!(e&&e.appId&&e.timeStamp&&e.nonceStr&&e.signature))return r(o);var a={success:function(e){"string"==typeof e.success&&(e.success="true"===e.success),e.success?t&&t(e):r&&r(n)},error:function(e){r&&r(n)}};Object.assign(a,e),i.call("runtime.auth",a)}if("function"==typeof a.success)if(a.appId&&a.timeStamp&&a.nonceStr&&a.signature)u(a,a.success,a.error);else if(a.signUrl){var c=encodeURIComponent(location.href.split("#")[0]);/^file:/.test(location.href)&&(c=encodeURIComponent(location.href.replace(/file:\/\//,""))),function(t){var n,r=new XMLHttpRequest,o=/^(2\d{2}|304)$/;t.method||(t.method="GET"),t.error||(t.error=function(){}),t.success||(t.success=function(){}),r.open(t.method,t.url),r.onreadystatechange=function(){if(4===r.readyState)if(o.test(r.status))try{t.success(JSON.parse(r.responseText),r)}catch(n){t.error(e)}else t.error(r.responseText)},t.headers=t.headers||{},"json"===t.serializer?(n=JSON.stringify(t.data),t.headers["Content-type"]="application/json; charset=utf-8"):(n=function(e){var t=encodeURIComponent;return"string"!=typeof e&&e?Object.keys(e).map(function(n){return t(n)+"="+t(e[n])}).join("&"):e}(t.data),t.headers["Content-type"]="application/x-www-form-urlencoded; charset=utf-8"),t.headers&&Object.keys(t.headers).forEach(function(e){r.setRequestHeader(e,t.headers[e])}),r.send(n)}({url:a.signUrl.replace(/\?|$/,"?url="+c+"&").replace(/&$/,""),method:a.signMethod||"post",success:function(e){if(e&&e.success&&e.data){var t=e.data;"function"==typeof a.signFormat&&(t=a.signFormat(t)),u(t,a.success,a.error)}else a.error&&a.error(r)},error:function(e){a.error&&a.error(r)}})}else a.error&&a.error(t)}window.qing._simulate("getTicket",function(e){i(window.qing,e)},!0)},9500:(e,t,n)=>{"use strict";n.r(t);n(686),n(4127),n(7805)},7805:(e,t,n)=>{var r=window.qing,o=n(4987);r._simulate("storage.getItem",o.getItem),r._simulate("storage.setItem",o.setItem),r._simulate("storage.removeItem",o.removeItem),r._simulate("storage.clear",o.clear)},4987:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clear:()=>(function(e){var t=e.error||a,n=e.success||a;o().dropInstance({name:i,storeName:c(e)}).then(function(){n({success:!0})}).catch(function(e){t({success:!1,error:e})})}),getItem:()=>(function(e){var t=s(e),n=e.error||a,r=e.success||a;t.getItem(e.key).then(function(e){r({success:!0,data:e})}).catch(function(e){n({success:!1,error:e})})}),removeItem:()=>(function(e){var t=s(e),n=e.error||a,r=e.success||a;t.removeItem(e.key).then(function(){r({success:!0})}).catch(function(e){n({success:!1,error:e})})}),setItem:()=>(function(e){var t=s(e),n=e.error||a,r=e.success||a;t.setItem(e.key,e.data).then(function(){r({success:!0})}).catch(function(e){n({success:!1,error:e})})})});var r=n(9483),o=n.n(r),i="__web__stroage__",a=qing.utils.noop,u={},c=function(e){var t="shared";if(!e.shared){var n=location.pathname.split("/");t=n.length<3?"default":n[1]}return t},s=function(e){var t=c(e);return u[t]||(u[t]=o().createInstance({name:i,driver:[o().INDEXEDDB],storeName:t,size:524288e3}))}},4127:()=>{window.qing._simulate("toast",function(e){alert(e.msg)}),window.qing._simulate("ui.toast",function(e){return e.msg=e.message,delete e.message,{name:"toast",params:e}})},9165:(e,t,n)=>{"use strict";n.d(t,{Z:()=>(function(e,t){var n=document.createEvent("HTMLEvents");if(t)for(var r in t)n[r]=t[r];n.initEvent(e,!1,!1),document.dispatchEvent(n)})})},468:(e,t,n)=>{"use strict";n.d(t,{Z:()=>(function(e,t){var n=document,r=n.getElementsByTagName("head")[0],o=n.createElement("script");o.src=e,t&&(o.onload=function(){t()},o.onerror=t);r.appendChild(o),o=null,r=null})})},9483:(e,t,n)=>{!function(t){e.exports=function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c=void 0;if(!u&&c)return require(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return o(n||e)},f,f.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,r){(function(e){"use strict";var n,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(f),u=e.document.createTextNode("");a.observe(u,{characterData:!0}),n=function(){u.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){f(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(f,0)};else{var c=new e.MessageChannel;c.port1.onmessage=f,n=function(){c.port2.postMessage(0)}}var s=[];function f(){var e,t;r=!0;for(var n=s.length;n;){for(t=s,s=[],e=-1;++e<n;)t[e]();n=s.length}r=!1}t.exports=function(e){1!==s.push(e)||r||n()}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function o(){}var i={},a=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function s(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&v(this,e)}function f(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function l(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return i.reject(e,t)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function v(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}var a=h(function(){t(o,r)});"error"===a.status&&r(a.value)}function h(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=s,s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){if("function"!=typeof e&&this.state===u||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(o);if(this.state!==c){var r=this.state===u?e:t;l(n,r,this.outcome)}else this.queue.push(new f(n,e,t));return n},f.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},f.prototype.otherCallFulfilled=function(e){l(this.promise,this.onFulfilled,e)},f.prototype.callRejected=function(e){i.reject(this.promise,e)},f.prototype.otherCallRejected=function(e){l(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=h(d,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)v(e,r);else{e.state=u,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},s.resolve=function(e){if(e instanceof this)return e;return i.resolve(new this(o),e)},s.reject=function(e){var t=new this(o);return i.reject(t,e)},s.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var a=new Array(n),u=0,c=-1,s=new this(o);for(;++c<n;)f(e[c],c);return s;function f(e,o){t.resolve(e).then(function(e){a[o]=e,++u!==n||r||(r=!0,i.resolve(s,a))},function(e){r||(r=!0,i.reject(s,e))})}},s.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var a=-1,u=new this(o);for(;++a<n;)c(e[a]);return u;function c(e){t.resolve(e).then(function(e){r||(r=!0,i.resolve(u,e))},function(e){r||(r=!0,i.reject(u,e))})}}},{1:1}],3:[function(e,t,r){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var o=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,r=new n,o=0;o<e.length;o+=1)r.append(e[o]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var a=Promise;function u(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function s(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var l="local-forage-detect-blob-support",d=void 0,v={},h=Object.prototype.toString,p="readonly",y="readwrite";function m(e){return"boolean"==typeof d?a.resolve(d):function(e){return new a(function(t){var n=e.transaction(l,y),r=i([""]);n.objectStore(l).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}(e).then(function(e){return d=e})}function b(e){var t=v[e.name],n={};n.promise=new a(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function g(e){var t=v[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function _(e,t){var n=v[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function w(e,t){return new a(function(n,r){if(v[e.name]=v[e.name]||A(),e.db){if(!t)return n(e.db);b(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(l)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){n(a.result),g(e)}})}function I(e){return w(e,!1)}function S(e){return w(e,!0)}function E(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function N(e){var t=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}(atob(e.data));return i([t],{type:e.type})}function j(e){return e&&e.__local_forage_encoded_blob}function O(e){var t=this,n=t._initReady().then(function(){var e=v[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return c(n,e,e),n}function R(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),S(e)}).then(function(){return function(e){b(e);for(var t=v[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,I(e).then(function(t){return e.db=t,E(e)?S(e):t}).then(function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}).catch(function(t){throw _(e,t),t})}(e).then(function(){R(e,t,n,r-1)})}).catch(n);n(o)}}function A(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var D={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=v[n.name];o||(o=A(),v[n.name]=o);o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=O);var i=[];function u(){return a.resolve()}for(var c=0;c<o.forages.length;c++){var s=o.forages[c];s!==t&&i.push(s._initReady().catch(u))}var f=o.forages.slice(0);return a.all(i).then(function(){return n.db=o.db,I(n)}).then(function(e){return n.db=e,E(n,t._defaultConfig.version)?S(n):e}).then(function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<f.length;r++){var i=f[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}})},_support:function(){try{if(!o||!o.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){R(n._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=a.openCursor(),c=1;u.onsuccess=function(){var n=u.result;if(n){var r=n.value;j(r)&&(r=N(r));var o=e(r,n.key,c++);void 0!==o?t(o):n.continue()}else t()},u.onerror=function(){r(u.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r},getItem:function(e,t){var n=this;e=s(e);var r=new a(function(t,r){n.ready().then(function(){R(n._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=a.get(e);u.onsuccess=function(){var e=u.result;void 0===e&&(e=null),j(e)&&(e=N(e)),t(e)},u.onerror=function(){r(u.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r},setItem:function(e,t,n){var r=this;e=s(e);var o=new a(function(n,o){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===h.call(t)?m(i.db).then(function(e){return e?t:function(e){return new a(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}(t)}):t}).then(function(t){R(r._dbInfo,y,function(i,a){if(i)return o(i);try{var u=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var c=u.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;o(e)}}catch(e){o(e)}})}).catch(o)});return u(o,n),o},removeItem:function(e,t){var n=this;e=s(e);var r=new a(function(t,r){n.ready().then(function(){R(n._dbInfo,y,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=a.delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(u.error)},i.onabort=function(){var e=u.error?u.error:u.transaction.error;r(e)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r},clear:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){R(t._dbInfo,y,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),a=i.clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n},length:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){R(t._dbInfo,p,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),a=i.count();a.onsuccess=function(){e(a.result)},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n},key:function(e,t){var n=this,r=new a(function(t,r){e<0?t(null):n.ready().then(function(){R(n._dbInfo,p,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=!1,c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;n?0===e?t(n.key):u?t(n.key):(u=!0,n.advance(e)):t(null)},c.onerror=function(){r(c.error)}}catch(e){r(e)}})}).catch(r)});return u(r,t),r},keys:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){R(t._dbInfo,p,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),a=i.openKeyCursor(),u=[];a.onsuccess=function(){var t=a.result;t?(u.push(t.key),t.continue()):e(u)},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return u(n,e),n},dropInstance:function(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r;if(e.name){var i=e.name===n.name&&this._dbInfo.db,c=i?a.resolve(this._dbInfo.db):I(e).then(function(t){var n=v[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t});r=e.storeName?c.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;b(e);var r=v[e.name],i=r.forages;t.close();for(var u=0;u<i.length;u++){var c=i[u];c._dbInfo.db=null,c._dbInfo.version=n}var s=new a(function(t,r){var i=o.open(e.name,n);i.onerror=function(e){var t=i.result;t.close(),r(e)},i.onupgradeneeded=function(){var t=i.result;t.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}});return s.then(function(e){r.db=e;for(var t=0;t<i.length;t++){var n=i[t];n._dbInfo.db=e,g(n._dbInfo)}}).catch(function(t){throw(_(e,t)||a.resolve()).catch(function(){}),t})}}):c.then(function(t){b(e);var n=v[e.name],r=n.forages;t.close();for(var i=0;i<r.length;i++){var u=r[i];u._dbInfo.db=null}var c=new a(function(t,n){var r=o.deleteDatabase(e.name);r.onerror=r.onblocked=function(e){var t=r.result;t&&t.close(),n(e)},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}});return c.then(function(e){n.db=e;for(var t=0;t<r.length;t++){var o=r[t];g(o._dbInfo)}}).catch(function(t){throw(_(e,t)||a.resolve()).catch(function(){}),t})})}else r=a.reject("Invalid arguments");return u(r,t),r}};var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="~~local_forage_type~",k=/^~~local_forage_type~([^~]+)~/,B="__lfsc__:",C=B.length,F="arbf",L="blob",M="si08",P="ui08",z="uic8",q="si16",U="si32",W="ur16",H="ui32",J="fl32",K="fl64",Q=C+F.length,X=Object.prototype.toString;function G(e){var t,n,r,o,i,a=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var s=new ArrayBuffer(a),f=new Uint8Array(s);for(t=0;t<u;t+=4)n=x.indexOf(e[t]),r=x.indexOf(e[t+1]),o=x.indexOf(e[t+2]),i=x.indexOf(e[t+3]),f[c++]=n<<2|r>>4,f[c++]=(15&r)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return s}function V(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=x[n[t]>>2],r+=x[(3&n[t])<<4|n[t+1]>>4],r+=x[(15&n[t+1])<<2|n[t+2]>>6],r+=x[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var Z={serialize:function(e,t){var n="";e&&(n=X.call(e));if(e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===X.call(e.buffer))){var r,o=B;e instanceof ArrayBuffer?(r=e,o+=F):(r=e.buffer,"[object Int8Array]"===n?o+=M:"[object Uint8Array]"===n?o+=P:"[object Uint8ClampedArray]"===n?o+=z:"[object Int16Array]"===n?o+=q:"[object Uint16Array]"===n?o+=W:"[object Int32Array]"===n?o+=U:"[object Uint32Array]"===n?o+=H:"[object Float32Array]"===n?o+=J:"[object Float64Array]"===n?o+=K:t(new Error("Failed to get type for BinaryArray"))),t(o+V(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=T+e.type+"~"+V(this.result);t(B+L+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,C)!==B)return JSON.parse(e);var t,n=e.substring(Q),r=e.substring(C,Q);if(r===L&&k.test(n)){var o=n.match(k);t=o[1],n=n.substring(o[0].length)}var a=G(n);switch(r){case F:return a;case L:return i([a],{type:t});case M:return new Int8Array(a);case P:return new Uint8Array(a);case z:return new Uint8ClampedArray(a);case q:return new Int16Array(a);case W:return new Uint16Array(a);case U:return new Int32Array(a);case H:return new Uint32Array(a);case J:return new Float32Array(a);case K:return new Float64Array(a);default:throw new Error("Unkown type: "+r)}},stringToBuffer:G,bufferToString:V};function Y(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function $(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,u){u.rows.length?i(e,a):Y(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}var ee={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new a(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(o){Y(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=Z,o},_support:function(){return"function"==typeof openDatabase}(),iterate:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){$(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,u=0;u<a;u++){var c=i.item(u),s=c.value;if(s&&(s=o.serializer.deserialize(s)),void 0!==(s=e(s,c.key,u+1)))return void t(s)}t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r},getItem:function(e,t){var n=this;e=s(e);var r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){$(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r},setItem:function(e,t,n){return function e(t,n,r,o){var i=this;t=s(t);var c=new a(function(a,u){i.ready().then(function(){void 0===n&&(n=null);var c=n,s=i._dbInfo;s.serializer.serialize(n,function(n,f){f?u(f):s.db.transaction(function(e){$(e,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[t,n],function(){a(c)},function(e,t){u(t)})},function(n){if(n.code===n.QUOTA_ERR){if(o>0)return void a(e.apply(i,[t,c,r,o-1]));u(n)}})})}).catch(u)});u(c,r);return c}.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=s(e);var r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){$(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return u(r,t),r},clear:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){$(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return u(n,e),n},length:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){$(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n},key:function(e,t){var n=this,r=new a(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){$(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return u(r,t),r},keys:function(e){var t=this,n=new a(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){$(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})}).catch(n)});return u(n,e),n},dropInstance:function(e,t){t=f.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;r=e.name?new a(function(t){var r;r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(function(e){return new a(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})},function(e,t){n(t)})},function(e){n(e)})})}(r))}).then(function(e){return new a(function(t,n){e.db.transaction(function(r){function o(e){return new a(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var i=[],u=0,c=e.storeNames.length;u<c;u++)i.push(o(e.storeNames[u]));a.all(i).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):a.reject("Invalid arguments");return u(r,t),r}};function te(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function ne(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var re={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];if(t.keyPrefix=te(e,this._defaultConfig),!ne())return a.reject();return this._dbInfo=t,t.serializer=Z,a.resolve()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,u=0;u<i;u++){var c=localStorage.key(u);if(0===c.indexOf(r)){var s=localStorage.getItem(c);if(s&&(s=t.serializer.deserialize(s)),void 0!==(s=e(s,c.substring(o),a++)))return s}}});return u(r,t),r},getItem:function(e,t){var n=this;e=s(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return u(r,t),r},setItem:function(e,t,n){var r=this;e=s(e);var o=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new a(function(o,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}})})});return u(o,n),o},removeItem:function(e,t){var n=this;e=s(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return u(r,t),r},clear:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return u(n,e),n},length:function(e){var t=this.keys().then(function(e){return e.length});return u(t,e),t},key:function(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return u(r,t),r},keys:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return u(n,e),n},dropInstance:function(e,t){if(t=f.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,o=this;r=e.name?new a(function(t){e.storeName?t(te(e,o._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):a.reject("Invalid arguments");return u(r,t),r}},oe=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},ie=function(e,t){for(var n=e.length,r=0;r<n;){if(oe(e[r],t))return!0;r++}return!1},ae=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},ue={},ce={},se={INDEXEDDB:D,WEBSQL:ee,LOCALSTORAGE:re},fe=[se.INDEXEDDB._driver,se.WEBSQL._driver,se.LOCALSTORAGE._driver],le=["dropInstance"],de=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(le),ve={description:"",driver:fe.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function he(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function pe(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(ae(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ye=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),se)if(se.hasOwnProperty(n)){var r=se[n],o=r._driver;this[n]=o,ue[o]||this.defineDriver(r)}this._defaultConfig=pe({},ve),this._config=pe({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new a(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=de.concat("_initStorage"),c=0,s=i.length;c<s;c++){var f=i[c],l=!ie(le,f);if((l||e[f])&&"function"!=typeof e[f])return void n(o)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=a.reject(t);return u(n,arguments[arguments.length-1]),n}},n=0,r=le.length;n<r;n++){var o=le[n];e[o]||(e[o]=t(o))}}();var d=function(n){ue[r]&&console.info("Redefining LocalForage driver: "+r),ue[r]=e,ce[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}});return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=ue[e]?a.resolve(ue[e]):a.reject(new Error("Driver not found."));return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=a.resolve(Z);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;ae(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function u(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}var s=null!==this._driverSet?this._driverSet.catch(function(){return a.resolve()}):a.resolve();return this._driverSet=s.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var o=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(u).catch(n)}i();var c=new Error("No available storage method found.");r._driverSet=a.reject(c);return r._driverSet}()}}(o)})}).catch(function(){i();var e=new Error("No available storage method found.");return r._driverSet=a.reject(e),r._driverSet}),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!ce[e]},e.prototype._extend=function(e){pe(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=de.length;e<t;e++)he(this,de[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),me=new ye;t.exports=me},{3:3}]},{},[4])(4)}()}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(()=>{n.n=(e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t})})(),(()=>{n.d=((e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})})})(),(()=>{n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}()})(),(()=>{n.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t))})(),(()=>{n.r=(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})})(),(()=>{"use strict";var e=n(468),t=n(9165),r=window.qing;r.define("web",function(o,i){var a=window,u=function(e){if(setTimeout(function(){(0,t.Z)("QingWebJSLoaded")}),!e){var r=a._CloudHubWebJSBridge,i=setTimeout(u,100),u=function(){i=null};r.checkJsApi({jsApiList:["getPersonInfo"],success:function(){!function(){for(var e in i=null,n(9500),r)o[e]=r[e];o.call=r.emit}(),clearTimeout(i)}})}};a._CloudHubWebJSBridge?u():(0,e.Z)(r.assertHost+"/yzj-layout/header/jsbridge.js?"+r.utils.today,u)})})()})();