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

2 lines
21 KiB
JavaScript

import regeneratorRuntime from "regenerator-runtime";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;arguments.length>r;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e,r,n,a,o,s){try{var u=t[o](s),i=u.value}catch(t){return void r(t)}u.done?e(i):Promise.resolve(i).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var s=t.apply(e,r);function u(t){n(s,a,o,u,i,"next",t)}function i(t){n(s,a,o,u,i,"throw",t)}u(void 0)}))}}function o(t,e){for(var r=0;e.length>r;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,i=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){i=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw o}}}}var c=[],h=[],l=[],f={allowAction:!0,routerParams:null,passedParams:null,current:{},afterNotNext:null,actionInfo:{navigateBack:null,switchTab:null},actionType:null},p=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,y=String.fromCharCode;function d(t){throw new RangeError(v[t])}function b(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function x(t,e,r){var n=0;for(t=r?g(t/700):t>>1,t+=g(t/e);t>455;n+=36)t=g(t/35);return g(n+36*t/(t+38))}function w(t){return function(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);var a=function(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}((t=t.replace(m,".")).split("."),e).join(".");return n+a}(t,(function(t){return p.test(t)?"xn--"+function(t){var e,r,n,a,o,s,u,i,c,h,l,f,p,m,v,w=[];for(f=(t=function(t){for(var e,r,n=[],a=0,o=t.length;o>a;)55296>(e=t.charCodeAt(a++))||e>56319||a>=o?n.push(e):56320==(64512&(r=t.charCodeAt(a++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),a--);return n}(t)).length,e=128,r=0,o=72,s=0;f>s;++s)128>(l=t[s])&&w.push(y(l));for(n=a=w.length,a&&w.push("-");f>n;){for(u=2147483647,s=0;f>s;++s)(l=t[s])>=e&&u>l&&(u=l);for(u-e>g((2147483647-r)/(p=n+1))&&d("overflow"),r+=(u-e)*p,e=u,s=0;f>s;++s)if(e>(l=t[s])&&++r>2147483647&&d("overflow"),l==e){for(i=r,c=36;(h=c>o?o+26>c?c-o:26:1)<=i;c+=36)w.push(y(b(h+(v=i-h)%(m=36-h),0))),i=g(v/m);w.push(y(b(i,0))),o=x(r,p,n==a),r=0,++n}++r,++e}return w.join("")}(t):t}))}function P(t){return null===t}function O(t){return"string"==typeof t}function j(t){return"object"==r(t)&&null!==t}function $(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function A(t){switch(r(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function C(t,e){if(t.map)return t.map(e);for(var r=[],n=0;t.length>n;n++)r.push(e(t[n],n));return r}var E=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e};function S(t,e,r,n){r=r||"=";var a={};if("string"!=typeof t||0===t.length)return a;var o=/\+/g;t=t.split(e=e||"&");var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var i=0;u>i;++i){var c,h,l,f,p=t[i].replace(o,"%20"),m=p.indexOf(r);0>m?(c=p,h=""):(c=p.substr(0,m),h=p.substr(m+1)),l=decodeURIComponent(c),f=decodeURIComponent(h),$(a,l)?k(a[l])?a[l].push(f):a[l]=[a[l],f]:a[l]=f}return a}var I=function(t,e){return K(t,!1,!0).resolve(e)};function R(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var q=/^([a-z0-9.+-]+:)/i,U=/:[0-9]*$/,T=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,N=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),L=["'"].concat(N),_=["%","/","?",";","#"].concat(L),V=["/","?","#"],B=/^[+a-z0-9A-Z_-]{0,63}$/,F=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,M={javascript:!0,"javascript:":!0},D={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function K(t,e,r){if(t&&j(t)&&t instanceof R)return t;var n=new R;return n.parse(t,e,r),n}function Z(t,e,n,a){if(!O(e))throw new TypeError("Parameter 'url' must be a string, not "+r(e));var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var i=e=u.join(s);if(i=i.trim(),!a&&1===e.split("#").length){var c=T.exec(i);if(c)return t.path=i,t.href=i,t.pathname=c[1],c[2]?(t.search=c[2],t.query=n?S(t.search.substr(1)):t.search.substr(1)):n&&(t.search="",t.query={}),t}var h,l,f,p=q.exec(i);if(p){var m=(p=p[0]).toLowerCase();t.protocol=m,i=i.substr(p.length)}if(a||p||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===i.substr(0,2);!v||p&&D[p]||(i=i.substr(2),t.slashes=!0)}if(!D[p]&&(v||p&&!z[p])){var g,y,d=-1;for(h=0;V.length>h;h++)-1===(l=i.indexOf(V[h]))||-1!==d&&l>=d||(d=l);for(-1!==(y=-1===d?i.lastIndexOf("@"):i.lastIndexOf("@",d))&&(g=i.slice(0,y),i=i.slice(y+1),t.auth=decodeURIComponent(g)),d=-1,h=0;_.length>h;h++)-1===(l=i.indexOf(_[h]))||-1!==d&&l>=d||(d=l);-1===d&&(d=i.length),t.host=i.slice(0,d),i=i.slice(d),G(t),t.hostname=t.hostname||"";var b="["===t.hostname[0]&&"]"===t.hostname[t.hostname.length-1];if(!b){var x=t.hostname.split(/\./);for(h=0,f=x.length;f>h;h++){var P=x[h];if(P&&!P.match(B)){for(var j="",$=0,k=P.length;k>$;$++)P.charCodeAt($)>127?j+="x":j+=P[$];if(!j.match(B)){var A=x.slice(0,h),C=x.slice(h+1),E=P.match(F);E&&(A.push(E[1]),C.unshift(E[2])),C.length&&(i="/"+C.join(".")+i),t.hostname=A.join(".");break}}}}t.hostname=t.hostname.length>255?"":t.hostname.toLowerCase(),b||(t.hostname=w(t.hostname)),t.host=(t.hostname||"")+(t.port?":"+t.port:""),t.href+=t.host,b&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!M[m])for(h=0,f=L.length;f>h;h++){var I=L[h];if(-1!==i.indexOf(I)){var R=encodeURIComponent(I);R===I&&(R=escape(I)),i=i.split(I).join(R)}}var U=i.indexOf("#");-1!==U&&(t.hash=i.substr(U),i=i.slice(0,U));var N=i.indexOf("?");return-1!==N?(t.search=i.substr(N),t.query=i.substr(N+1),n&&(t.query=S(t.query)),i=i.slice(0,N)):n&&(t.search="",t.query={}),i&&(t.pathname=i),z[m]&&t.hostname&&!t.pathname&&(t.pathname="/"),(t.pathname||t.search)&&(t.path=(t.pathname||"")+(t.search||"")),t.href=H(t),t}function H(t){var e=t.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var n,a,o,s=t.protocol||"",u=t.pathname||"",i=t.hash||"",c=!1,h="";t.host?c=e+t.host:t.hostname&&(c=e+(-1===t.hostname.indexOf(":")?t.hostname:"["+this.hostname+"]"),t.port&&(c+=":"+t.port)),t.query&&j(t.query)&&Object.keys(t.query).length&&(a=a||"&",o=o||"=",null===(n=t.query)&&(n=void 0),h="object"==r(n)?C(E(n),(function(t){var e=encodeURIComponent(A(t))+o;return k(n[t])?C(n[t],(function(t){return e+encodeURIComponent(A(t))})).join(a):e+encodeURIComponent(A(n[t]))})).join(a):"");var l=t.search||h&&"?"+h||"";return s&&":"!==s.substr(-1)&&(s+=":"),t.slashes||(!s||z[s])&&!1!==c?(c="//"+(c||""),u&&"/"!==u.charAt(0)&&(u="/"+u)):c||(c=""),i&&"#"!==i.charAt(0)&&(i="#"+i),l&&"?"!==l.charAt(0)&&(l="?"+l),s+c+(u=u.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(l=l.replace("#","%23"))+i}function G(t){var e=t.host,r=U.exec(e);r&&(":"!==(r=r[0])&&(t.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(t.hostname=e)}R.prototype.parse=function(t,e,r){return Z(this,t,e,r)},R.prototype.format=function(){return H(this)},R.prototype.resolve=function(t){return this.resolveObject(K(t,!1,!0)).format()},R.prototype.resolveObject=function(t){if(O(t)){var e=new R;e.parse(t,!1,!0),t=e}for(var r,n=new R,a=Object.keys(this),o=0;a.length>o;o++){var s=a[o];n[s]=this[s]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),i=0;u.length>i;i++){var c=u[i];"protocol"!==c&&(n[c]=t[c])}return z[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!z[t.protocol]){for(var h=Object.keys(t),l=0;h.length>l;l++){var f=h[l];n[f]=t[f]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||D[t.protocol])n.pathname=t.pathname;else{for(r=(t.pathname||"").split("/");r.length&&!(t.host=r.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==r[0]&&r.unshift(""),2>r.length&&r.unshift(""),n.pathname=r.join("/")}return n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,(n.pathname||n.search)&&(n.path=(n.pathname||"")+(n.search||"")),n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var p,m=n.pathname&&"/"===n.pathname.charAt(0),v=t.host||t.pathname&&"/"===t.pathname.charAt(0),g=v||m||n.host&&t.pathname,y=g,d=n.pathname&&n.pathname.split("/")||[],b=n.protocol&&!z[n.protocol];if(r=t.pathname&&t.pathname.split("/")||[],b&&(n.hostname="",n.port=null,n.host&&(""===d[0]?d[0]=n.host:d.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===r[0]?r[0]=t.host:r.unshift(t.host)),t.host=null),g=g&&(""===r[0]||""===d[0])),v)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,d=r;else if(r.length)d||(d=[]),d.pop(),d=d.concat(r),n.search=t.search,n.query=t.query;else if(null!=t.search)return b&&(n.hostname=n.host=d.shift(),(p=!(!n.host||0>=n.host.indexOf("@"))&&n.host.split("@"))&&(n.auth=p.shift(),n.host=n.hostname=p.shift())),n.search=t.search,n.query=t.query,P(n.pathname)&&P(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!d.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var x=d.slice(-1)[0],w=(n.host||t.host||d.length>1)&&("."===x||".."===x)||""===x,j=0,$=d.length;$>=0;$--)"."===(x=d[$])?d.splice($,1):".."===x?(d.splice($,1),j++):j&&(d.splice($,1),j--);if(!g&&!y)for(;j--;j)d.unshift("..");!g||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),w&&"/"!==d.join("/").substr(-1)&&d.push("");var k=""===d[0]||d[0]&&"/"===d[0].charAt(0);return b&&(n.hostname=n.host=k?"":d.length?d.shift():"",(p=!(!n.host||0>=n.host.indexOf("@"))&&n.host.split("@"))&&(n.auth=p.shift(),n.host=n.hostname=p.shift())),(g=g||n.host&&d.length)&&!k&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),P(n.pathname)&&P(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},R.prototype.parseHost=function(){return G(this)};var J=process.env.VUE_APP_PLATFORM;function Q(t){var e=t.$options;f.VUE3&&t.$&&(e=t.$),e.onLoad||(e.onLoad=[]),"function"==typeof e.onLoad&&(e.onLoad=[e.onShow]),0>e.onLoad.indexOf(Pt)&&e.onLoad.unshift(Pt),e.onShow||(e.onShow=[]),"function"==typeof e.onShow&&(e.onShow=[e.onShow]),0>e.onShow.indexOf(Ot)&&e.onShow.unshift(Ot)}function W(){var t=void 0;Object.defineProperty(gt(),"$vm",{get:function(){return t},set:function(e){Q(e);var r=getCurrentPages(),n=r[r.length-2];n&&Q(n.$vm),t=e}})}function X(t){it(t,"passedParams"),it(t,"routeParams")}function Y(t){var e=this,r=function(){for(var r=arguments.length,n=Array(r),a=0;r>a;a++)n[a]=arguments[a];Q(n[0]),t.apply(e,n)};return r.isInjected=!0,r}function tt(t){return et.apply(this,arguments)}function et(){return et=a(regeneratorRuntime.mark((function t(e){var r,n,a,o,s,u,i,c,h,l,p,m,v,g=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=function(){f.passedParams=s,f.routeParams=u},r=g.length>1&&void 0!==g[1]?g[1]:{},n=g.length>2?g[2]:void 0,a=gt(),o=!1,s=f.passedParams,u=f.routeParams,X(r),"navigateBack"!==n){t.next=30;break}if(h=getCurrentPages().length,(i=1===h?a:getCurrentPages()[h-2]).$vm&&i.$vm._$weex&&(o=!0),l=e.call(uni,r),!(o&&l instanceof Promise)){t.next=28;break}return f.allowAction=!0,t.prev=15,t.next=18,l;case 18:if(t.t0=t.sent.length,1!==t.t0){t.next=21;break}c();case 21:t.next=26;break;case 23:t.prev=23,t.t1=t.catch(15),c();case 26:t.next=29;break;case 28:return t.abrupt("return",c);case 29:return t.abrupt("return",l);case 30:return p=e.call(uni,r),m=gt(),["app-plus","app"].indexOf(J)>-1&&(f.VUE3?(v=m.__setup)&&(v.isInjected||(m.__setup=Y(v))):m.$vm||W()),t.abrupt("return",p);case 34:case"end":return t.stop()}}),t,null,[[15,23]])}))),et.apply(this,arguments)}var rt=!1;function nt(t,e){var r=t.indexOf(e);t.splice(r,1)}function at(t,e,r){return ot.apply(this,arguments)}function ot(){return(ot=a(regeneratorRuntime.mark((function t(e,r,n){var a,o,s,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=function(){f.afterNotNext=null,a=!1},a=!0,s=i(e),t.prev=3,s.s();case 5:if((u=s.n()).done){t.next=14;break}return c=u.value,t.next=9,c(r,n,o);case 9:if(!a){t.next=11;break}return t.abrupt("return",!1);case 11:a=!0;case 12:t.next=5;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(3),s.e(t.t0);case 19:return t.prev=19,s.f(),t.finish(19);case 22:return t.abrupt("return",!0);case 23:case"end":return t.stop()}}),t,null,[[3,16,19,22]])})))).apply(this,arguments)}function st(t,e,r){t.forEach((function(t){t(e,r)}))}function ut(t){var e=f[t];return f[t]=null,e}function it(t,n){return"object"===r(t[n])&&(f[n]=e({},t[n])),t}function ct(){var t=f.afterNotNext;f.afterNotNext=null,"function"==typeof t&&t()}function ht(t,e,r,n){return lt.apply(this,arguments)}function lt(){return(lt=a(regeneratorRuntime.mark((function t(e,r,n,a){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return wt.called=null,t.prev=1,t.next=4,e;case 4:if(1!==(o=t.sent).length){t.next=10;break}f.allowAction=!0,st(l,r,n),t.next=14;break;case 10:if("reLaunch"!==a||1!==getCurrentPages().length||vt()!==r.url||"h5"!==J){t.next=13;break}return dt(),t.abrupt("return",o);case 13:("navigateBack"===a&&1===getCurrentPages().length||["app-plus","app"].indexOf(J)>-1)&&(dt(),f.current=yt());case 14:return t.abrupt("return",o);case 17:return t.prev=17,t.t0=t.catch(1),f.allowAction=!0,st(l,r,n),t.abrupt("return",Error(t.t0));case 22:case"end":return t.stop()}}),t,null,[[1,17]])})))).apply(this,arguments)}function ft(t){var r=e({},t);return Object.keys(r).forEach((function(t){r[t]=decodeURIComponent(r[t])})),r}function pt(t){var e=[];return Object.keys(t).forEach((function(r){e.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),e.join("&")}function mt(t){var e;if(t){if("h5"===J){if(f.VUE3){var r=new URL(t.$page.fullPath,location.origin).searchParams,n={};return r.forEach((function(t,e){n[e]=t})),n}return t.$mp.query}return t.options||(null===(e=t.$page)||void 0===e?void 0:e.options)||{}}}function vt(){var t=getCurrentPages();return t[t.length-1].route}function gt(){var t=getCurrentPages();return t[t.length-1]}function yt(){var t=gt(),e=mt(t);return"h5"!==J&&(e=ft(e)),{url:vt(),routeParams:t.$routeParams,passedParams:t.$passedParams,query:e,search:pt(e)}}function dt(t){rt&&(f.allowAction=!0,t&&t()),rt=!1}function bt(t){var e=uni[t];uni[t]=function(r){return function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;try{vt()}catch(e){return t.call(uni,r)}var o=yt(),s=r.fail,u=r.success,i=r.complete;if(!f.allowAction){var h="动作被拦截,因为已经有一个正在执行的路由动作";return s||u||i?r.fail&&r.fail({errMsg:h}):[{errMsg:h}]}f.allowAction=!1,rt=!1;var p,m=vt(),v={},g="";if("navigateBack"===n){var y=r.delta,d=void 0===y?1:y,b=getCurrentPages().length-1-d;0>b&&(b=0),f.actionInfo.navigateBack=b,p=getCurrentPages()[b].route,g=pt(v=mt(getCurrentPages()[b])),"h5"!==J&&(v=ft(v))}else{var x=(p=I(m,r.url||"").replace(/^\/([^\/])/,"$1")).match(/([^?]+)\?([\s\S]*)/);p=x&&x[1]||p,x&&x[2]&&(g=x[2],x[2].split("&").forEach((function(t){if(t){var e=t.match(/^([^=]+)=([\s\S]*)$/);e&&e[2]?v[e[1]]=e[2]:v[t]=""}}))),v=ft(v)}"switchTab"===n&&(f.actionInfo.switchTab=p),f.actionType=n;var w,P={url:p,routeParams:r.routeParams,passedParams:r.passedParams,query:v,jumpType:n,search:g};return s||u||i?(r.fail=function(){var t;w instanceof Function&&w(),f.allowAction=!0;for(var r=arguments.length,n=Array(r),a=0;r>a;a++)n[a]=arguments[a];if(null!=n&&null!==(t=n[0])&&void 0!==t&&t.innerError||st(l,P,["app-plus","app"].indexOf(J)>-1?o:f.current),s)return s.apply(e,n)},"reLaunch"===n&&1===getCurrentPages().length&&vt()===P.url&&"h5"===J&&(r.success=function(){if(dt(),u){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];return u.apply(e,r)}}),("navigateBack"===n&&1===getCurrentPages().length||["app-plus","app"].indexOf(J)>-1)&&(r.success=function(){if(dt(),f.current=yt(),u){for(var t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];return u.apply(e,r)}}),void a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,at(c,P,["app-plus","app"].indexOf(J)>-1?o:f.current);case 2:if(e.sent){e.next=6;break}return r.fail({errMsg:"beforeEach中没有使用next",innerError:1}),ct(),e.abrupt("return");case 6:rt=!0,w=tt(t,r,n);case 8:case"end":return e.stop()}}),e)})))()):a(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,at(c,P,["app-plus","app"].indexOf(J)>-1?o:f.current);case 2:if(e.sent){e.next=6;break}return f.allowAction=!0,ct(),e.abrupt("return",[{errMsg:"beforeEach中没有使用next",innerError:1}]);case 6:return rt=!0,a=tt(t,r,n),e.abrupt("return",ht(a,P,["app-plus","app"].indexOf(J)>-1?o:f.current,n));case 9:case"end":return e.stop()}}),e)})))()}(e,r,t)}}function xt(t){try{gt(),t&&t()}catch(e){setTimeout((function(){xt(t)}),13)}}function wt(){var t=function(){dt((function(){!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt();"$routeParams"in t||(t.$routeParams=ut("routeParams")),t.$passedParams=ut("passedParams"),f.VUE3&&["app-plus","app"].indexOf(J)>-1&&(t.$page.$passedParams=t.$passedParams,"$routeParams"in t.$page||(t.$page.$routeParams=t.$routeParams)),t.$vm&&(t.$vm.$passedParams=t.$passedParams,"$routeParams"in t.$vm||(t.$vm.$routeParams=t.$routeParams))}()}));var t=yt();st(h,t,f.current),f.current=t};if(-1<["app-plus","app"].indexOf(J))xt(t);else{try{vt()}catch(t){return}this.globalData||t()}}function Pt(){wt.called||(wt.call(this),wt.called=!0,setTimeout((function(){wt.called=null})))}function Ot(){wt.called||(wt.call(this),wt.called=!0,setTimeout((function(){wt.called=null})))}var jt=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"beforeEach",value:function(t){return c.push(t),function(){nt(c,t)}}},{key:"afterEach",value:function(t){return h.push(t),function(){nt(h,t)}}},{key:"onError",value:function(t){return l.push(t),function(){nt(l,t)}}},{key:"afterNotNext",value:function(t){return f.afterNotNext=t,this}},{key:"install",value:function(t,e){return f.VUE3=3===parseInt(t.version),function(t,e){t.mixin({onLoad:Pt,onShow:function(){["app-plus","app"].indexOf(J)>-1&&setTimeout((function(){var t=getCurrentPages()[0];f.VUE3?t&&t.$page&&t.$page.meta.isNVue&&Q(t):t&&t.$vm&&t.$vm._$weex&&Q(t.$vm)})),Ot.apply(this)}}),bt("navigateTo"),bt("redirectTo"),bt("reLaunch"),bt("switchTab"),bt("navigateBack")}(t),this}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),$t=jt.beforeEach,kt=jt.afterEach,At=jt.onError,Ct=jt.afterNotNext;export default jt;export{kt as afterEach,Ct as afterNotNext,$t as beforeEach,At as onError};