"use strict";function t(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function e(e){for(var o=1;ot.length)&&(e=t.length);for(var o=0,n=new Array(e);o1||-1!=o.indexOf(e[0])?e:[]}},{key:"splitHook",value:function(t){var e=this;t=t.replace("on",""),this.presetHooksName.sort((function(t,e){return e.length-t.length}));var o=new RegExp("("+this.presetHooksName.join("|")+")","g");return t.split(o).filter((function(t){return e.hook[t]}))}}]),t}(),b={"vue-h5":{hooksKey:"$options",initHook:"beforeCreate",supportComponent:!0,isPage(t){return t._compiled&&this.supportComponent}},"vue-miniprogram":{hooksKey:"$options",initHook:"beforeCreate",supportComponent:!0,isPage(){return this.supportComponent}},miniprogram:{name:"miniprogram",hooksKey:"",initHook:"onLoad",initHookApp:"onLaunch",initHookComponentAlipay:"didMount",initHookComponentAlipayInit:"onInit",initHookComponentWx:"created",initHookComponentLifetimes:"created",supportComponent:!0,isPage(){return this.supportComponent}}},H=b["vue-miniprogram"],j=function(t,o,n,i){function r(t,e,o){if(this.customHook){var n=this.customHook.hook,i=Object.keys(n).find((function(t){return n[t].name===o}));if(!n[i].hit)return void s.call(this,e,o)}a.call(this,e,"component",t,o)}function a(t,e,o,r){if(!this.customHook){var a=f(this,H.hooksKey);if(H.isPage(a)){!n.state&&i&&(n.state=this[i]||i);var c="component"===e;Object.defineProperty(this,"customHook",{value:new w({instance:this,options:t,pageHooks:c?o:a,instanceType:e,initHookName:r}),configurable:!0,enumerable:!1})}}}function c(t){return t.reduce((function(t,e){return(t[e]=function(t){s.call(this,t,e)})&&t}),{})}function s(t,e){if(("object"==typeof this.customHook||null==typeof this.customHook)&&this.customHook.customHookArr.length){t&&Object.keys(t).length>0&&(this.customHook.options=t);var o=this.customHook.hook,n=["beforeDestroy","destroyed","onUnload"].includes(e);for(var i in o){var r=o[i];r.name==e?r.cycleStart():r.destroy==e&&r.cycleEnd(),n&&r.unwatchFn&&r.unwatchFn()}n&&delete this.customHook}}t.mpvueVersion?H.initHook="onLoad":t.userAgentKey&&(H=b[t.userAgentKey]),h=n,d=o,t.mixin(e(e({},c(g)),{},{[H.initHook](t){a.call(this,t,"page",void 0,H.initHook)}},"miniprogram"===H.name?{[H.initHookApp](t){a.call(this,t,"app",void 0,H.initHookApp)},[H.initHookComponentWx](t,e){a.call(this,e,"component",t,H.initHookComponentWx)},[H.initHookComponentAlipayInit](t,e){a.call(this,e,"component",t,H.initHookComponentAlipayInit)},[H.initHookComponentAlipay](t,e){r.call(this,t,e,H.initHookComponentAlipay)},lifetimes:e(e({},c(y)),{},{[H.initHookComponentLifetimes](t,e){r.call(this,t,e,H.initHookComponentLifetimes)}}),pageLifetimes:e({},c(k))}:{}))},A=Object.freeze({__proto__:null,get BASE(){return H},install:j}),O={mixin(t){var e=this,o=App,n=Page,i=Component;App=function(n){e.mergeHook(t,n),o(n)},Page=function(o){e.mergeHook(t,o),n(o)},Component=function(o){e.mergeComponentHook(t,o);var n=e.mixinLifetimes(t,o);i(n)}},mergeHook(t,e){for(var o=function(){var t=a(i[n],2),o=t[0],r=t[1],c=e[o];e[o]=function(){for(var t=arguments.length,e=new Array(t),o=0;o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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 r,a=!0,s=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}(Object.entries(t).filter((function(t){return!n.includes(t[0])})));try{var r=function(){var t=a(o.value,2),n=t[0],i=t[1],r=e[n];e[n]=function(){for(var t=arguments.length,o=new Array(t),n=0;n