(()=>{var t={331:function(t){t.exports=function(){"use strict";var t=function(){},e=Object.prototype.hasOwnProperty,n=Array.prototype.slice;function r(e,n){var r;return"function"==typeof Object.create?r=Object.create(e):(t.prototype=e,r=new t,t.prototype=null),n&&i(!0,r,n),r}function o(t,e,n,o){var a=this;return"string"!=typeof t&&(o=n,n=e,e=t,t=null),"function"!=typeof e&&(o=n,n=e,e=function(){return a.apply(this,arguments)}),i(!1,e,a,o),e.prototype=r(a.prototype,n),e.prototype.constructor=e,e.class_=t||a.class_,e.super_=a,e}function i(t,r,o){for(var i,a,c=0,s=(o=n.call(arguments,2)).length;c<s;c++)for(i in a=o[c])t&&!e.call(a,i)||(r[i]=a[i])}var a=o;function c(){}c.class_="Nevis",c.super_=Object,c.extend=a;var s=c,u=s.extend((function(t,e,n){this.qrious=t,this.element=e,this.element.qrious=t,this.enabled=Boolean(n)}),{draw:function(t){},getElement:function(){return this.enabled||(this.enabled=!0,this.render()),this.element},getModuleSize:function(t){var e=this.qrious,n=e.padding||0,r=Math.floor((e.size-2*n)/t.width);return Math.max(1,r)},getOffset:function(t){var e=this.qrious,n=e.padding;if(null!=n)return n;var r=this.getModuleSize(t),o=Math.floor((e.size-r*t.width)/2);return Math.max(0,o)},render:function(t){this.enabled&&(this.resize(),this.reset(),this.draw(t))},reset:function(){},resize:function(){}}),l=u.extend({draw:function(t){var e,n,r=this.qrious,o=this.getModuleSize(t),i=this.getOffset(t),a=this.element.getContext("2d");for(a.fillStyle=r.foreground,a.globalAlpha=r.foregroundAlpha,e=0;e<t.width;e++)for(n=0;n<t.width;n++)t.buffer[n*t.width+e]&&a.fillRect(o*e+i,o*n+i,o,o)},reset:function(){var t=this.qrious,e=this.element.getContext("2d"),n=t.size;e.lineWidth=1,e.clearRect(0,0,n,n),e.fillStyle=t.background,e.globalAlpha=t.backgroundAlpha,e.fillRect(0,0,n,n)},resize:function(){var t=this.element;t.width=t.height=this.qrious.size}}),f=s.extend(null,{BLOCK:[0,11,15,19,23,27,31,16,18,20,22,24,26,28,20,22,24,24,26,28,28,22,24,24,26,26,28,28,24,24,26,26,26,28,28,24,26,26,26,28,28]}),h=s.extend(null,{BLOCKS:[1,0,19,7,1,0,16,10,1,0,13,13,1,0,9,17,1,0,34,10,1,0,28,16,1,0,22,22,1,0,16,28,1,0,55,15,1,0,44,26,2,0,17,18,2,0,13,22,1,0,80,20,2,0,32,18,2,0,24,26,4,0,9,16,1,0,108,26,2,0,43,24,2,2,15,18,2,2,11,22,2,0,68,18,4,0,27,16,4,0,19,24,4,0,15,28,2,0,78,20,4,0,31,18,2,4,14,18,4,1,13,26,2,0,97,24,2,2,38,22,4,2,18,22,4,2,14,26,2,0,116,30,3,2,36,22,4,4,16,20,4,4,12,24,2,2,68,18,4,1,43,26,6,2,19,24,6,2,15,28,4,0,81,20,1,4,50,30,4,4,22,28,3,8,12,24,2,2,92,24,6,2,36,22,4,6,20,26,7,4,14,28,4,0,107,26,8,1,37,22,8,4,20,24,12,4,11,22,3,1,115,30,4,5,40,24,11,5,16,20,11,5,12,24,5,1,87,22,5,5,41,24,5,7,24,30,11,7,12,24,5,1,98,24,7,3,45,28,15,2,19,24,3,13,15,30,1,5,107,28,10,1,46,28,1,15,22,28,2,17,14,28,5,1,120,30,9,4,43,26,17,1,22,28,2,19,14,28,3,4,113,28,3,11,44,26,17,4,21,26,9,16,13,26,3,5,107,28,3,13,41,26,15,5,24,30,15,10,15,28,4,4,116,28,17,0,42,26,17,6,22,28,19,6,16,30,2,7,111,28,17,0,46,28,7,16,24,30,34,0,13,24,4,5,121,30,4,14,47,28,11,14,24,30,16,14,15,30,6,4,117,30,6,14,45,28,11,16,24,30,30,2,16,30,8,4,106,26,8,13,47,28,7,22,24,30,22,13,15,30,10,2,114,28,19,4,46,28,28,6,22,28,33,4,16,30,8,4,122,30,22,3,45,28,8,26,23,30,12,28,15,30,3,10,117,30,3,23,45,28,4,31,24,30,11,31,15,30,7,7,116,30,21,7,45,28,1,37,23,30,19,26,15,30,5,10,115,30,19,10,47,28,15,25,24,30,23,25,15,30,13,3,115,30,2,29,46,28,42,1,24,30,23,28,15,30,17,0,115,30,10,23,46,28,10,35,24,30,19,35,15,30,17,1,115,30,14,21,46,28,29,19,24,30,11,46,15,30,13,6,115,30,14,23,46,28,44,7,24,30,59,1,16,30,12,7,121,30,12,26,47,28,39,14,24,30,22,41,15,30,6,14,121,30,6,34,47,28,46,10,24,30,2,64,15,30,17,4,122,30,29,14,46,28,49,10,24,30,24,46,15,30,4,18,122,30,13,32,46,28,48,14,24,30,42,32,15,30,20,4,117,30,40,7,47,28,43,22,24,30,10,67,15,30,19,6,118,30,18,31,47,28,34,34,24,30,20,61,15,30],FINAL_FORMAT:[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107],LEVELS:{L:1,M:2,Q:3,H:4}}),d=s.extend(null,{EXPONENT:[1,2,4,8,16,32,64,128,29,58,116,232,205,135,19,38,76,152,45,90,180,117,234,201,143,3,6,12,24,48,96,192,157,39,78,156,37,74,148,53,106,212,181,119,238,193,159,35,70,140,5,10,20,40,80,160,93,186,105,210,185,111,222,161,95,190,97,194,153,47,94,188,101,202,137,15,30,60,120,240,253,231,211,187,107,214,177,127,254,225,223,163,91,182,113,226,217,175,67,134,17,34,68,136,13,26,52,104,208,189,103,206,129,31,62,124,248,237,199,147,59,118,236,197,151,51,102,204,133,23,46,92,184,109,218,169,79,158,33,66,132,21,42,84,168,77,154,41,82,164,85,170,73,146,57,114,228,213,183,115,230,209,191,99,198,145,63,126,252,229,215,179,123,246,241,255,227,219,171,75,150,49,98,196,149,55,110,220,165,87,174,65,130,25,50,100,200,141,7,14,28,56,112,224,221,167,83,166,81,162,89,178,121,242,249,239,195,155,43,86,172,69,138,9,18,36,72,144,61,122,244,245,247,243,251,235,203,139,11,22,44,88,176,125,250,233,207,131,27,54,108,216,173,71,142,0],LOG:[255,0,1,25,2,50,26,198,3,223,51,238,27,104,199,75,4,100,224,14,52,141,239,129,28,193,105,248,200,8,76,113,5,138,101,47,225,36,15,33,53,147,142,218,240,18,130,69,29,181,194,125,106,39,249,185,201,154,9,120,77,228,114,166,6,191,139,98,102,221,48,253,226,152,37,179,16,145,34,136,54,208,148,206,143,150,219,189,241,210,19,92,131,56,70,64,30,66,182,163,195,72,126,110,107,58,40,84,250,133,186,61,202,94,155,159,10,21,121,43,78,212,229,172,115,243,167,87,7,112,192,247,140,128,99,13,103,74,222,237,49,197,254,24,227,165,153,119,38,184,180,124,17,68,146,217,35,32,137,46,55,63,209,91,149,188,207,205,144,135,151,178,220,252,190,97,242,86,211,171,20,42,93,158,132,60,57,83,71,109,65,162,31,45,67,216,183,123,164,118,196,23,73,236,127,12,111,246,108,161,59,82,41,157,85,170,251,96,134,177,187,204,62,90,203,89,95,176,156,169,160,81,11,245,22,235,122,117,44,215,79,174,213,233,230,231,173,232,116,214,244,234,168,80,88,175]}),p=s.extend(null,{BLOCK:[3220,1468,2713,1235,3062,1890,2119,1549,2344,2936,1117,2583,1330,2470,1667,2249,2028,3780,481,4011,142,3098,831,3445,592,2517,1776,2234,1951,2827,1070,2660,1345,3177]}),v=s.extend((function(t){var e,n,r,o,i,a=t.value.length;for(this._badness=[],this._level=h.LEVELS[t.level],this._polynomial=[],this._value=t.value,this._version=0,this._stringBuffer=[];this._version<40&&(this._version++,r=4*(this._level-1)+16*(this._version-1),o=h.BLOCKS[r++],i=h.BLOCKS[r++],e=h.BLOCKS[r++],n=h.BLOCKS[r],!(a<=(r=e*(o+i)+i-3+(this._version<=9)))););this._dataBlock=e,this._eccBlock=n,this._neccBlock1=o,this._neccBlock2=i;var c=this.width=17+4*this._version;this.buffer=v._createArray(c*c),this._ecc=v._createArray(e+(e+n)*(o+i)+i),this._mask=v._createArray((c*(c+1)+1)/2),this._insertFinders(),this._insertAlignments(),this.buffer[8+c*(c-8)]=1,this._insertTimingGap(),this._reverseMask(),this._insertTimingRowAndColumn(),this._insertVersion(),this._syncMask(),this._convertBitStream(a),this._calculatePolynomial(),this._appendEccToData(),this._interleaveBlocks(),this._pack(),this._finish()}),{_addAlignment:function(t,e){var n,r=this.buffer,o=this.width;for(r[t+o*e]=1,n=-2;n<2;n++)r[t+n+o*(e-2)]=1,r[t-2+o*(e+n+1)]=1,r[t+2+o*(e+n)]=1,r[t+n+1+o*(e+2)]=1;for(n=0;n<2;n++)this._setMask(t-1,e+n),this._setMask(t+1,e-n),this._setMask(t-n,e-1),this._setMask(t+n,e+1)},_appendData:function(t,e,n,r){var o,i,a,c=this._polynomial,s=this._stringBuffer;for(i=0;i<r;i++)s[n+i]=0;for(i=0;i<e;i++){if(255!==(o=d.LOG[s[t+i]^s[n]]))for(a=1;a<r;a++)s[n+a-1]=s[n+a]^d.EXPONENT[v._modN(o+c[r-a])];else for(a=n;a<n+r;a++)s[a]=s[a+1];s[n+r-1]=255===o?0:d.EXPONENT[v._modN(o+c[0])]}},_appendEccToData:function(){var t,e=0,n=this._dataBlock,r=this._calculateMaxLength(),o=this._eccBlock;for(t=0;t<this._neccBlock1;t++)this._appendData(e,n,r,o),e+=n,r+=o;for(t=0;t<this._neccBlock2;t++)this._appendData(e,n+1,r,o),e+=n+1,r+=o},_applyMask:function(t){var e,n,r,o,i=this.buffer,a=this.width;switch(t){case 0:for(o=0;o<a;o++)for(r=0;r<a;r++)r+o&1||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 1:for(o=0;o<a;o++)for(r=0;r<a;r++)1&o||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 2:for(o=0;o<a;o++)for(e=0,r=0;r<a;r++,e++)3===e&&(e=0),e||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 3:for(n=0,o=0;o<a;o++,n++)for(3===n&&(n=0),e=n,r=0;r<a;r++,e++)3===e&&(e=0),e||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 4:for(o=0;o<a;o++)for(e=0,n=o>>1&1,r=0;r<a;r++,e++)3===e&&(e=0,n=!n),n||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 5:for(n=0,o=0;o<a;o++,n++)for(3===n&&(n=0),e=0,r=0;r<a;r++,e++)3===e&&(e=0),(r&o&1)+!(!e|!n)||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 6:for(n=0,o=0;o<a;o++,n++)for(3===n&&(n=0),e=0,r=0;r<a;r++,e++)3===e&&(e=0),(r&o&1)+(e&&e===n)&1||this._isMasked(r,o)||(i[r+o*a]^=1);break;case 7:for(n=0,o=0;o<a;o++,n++)for(3===n&&(n=0),e=0,r=0;r<a;r++,e++)3===e&&(e=0),(e&&e===n)+(r+o&1)&1||this._isMasked(r,o)||(i[r+o*a]^=1)}},_calculateMaxLength:function(){return this._dataBlock*(this._neccBlock1+this._neccBlock2)+this._neccBlock2},_calculatePolynomial:function(){var t,e,n=this._eccBlock,r=this._polynomial;for(r[0]=1,t=0;t<n;t++){for(r[t+1]=1,e=t;e>0;e--)r[e]=r[e]?r[e-1]^d.EXPONENT[v._modN(d.LOG[r[e]]+t)]:r[e-1];r[0]=d.EXPONENT[v._modN(d.LOG[r[0]]+t)]}for(t=0;t<=n;t++)r[t]=d.LOG[r[t]]},_checkBadness:function(){var t,e,n,r,o,i=0,a=this._badness,c=this.buffer,s=this.width;for(o=0;o<s-1;o++)for(r=0;r<s-1;r++)(c[r+s*o]&&c[r+1+s*o]&&c[r+s*(o+1)]&&c[r+1+s*(o+1)]||!(c[r+s*o]||c[r+1+s*o]||c[r+s*(o+1)]||c[r+1+s*(o+1)]))&&(i+=v.N2);var u=0;for(o=0;o<s;o++){for(n=0,a[0]=0,t=0,r=0;r<s;r++)t===(e=c[r+s*o])?a[n]++:a[++n]=1,u+=(t=e)?1:-1;i+=this._getBadness(n)}u<0&&(u=-u);var l=0,f=u;for(f+=f<<2,f<<=1;f>s*s;)f-=s*s,l++;for(i+=l*v.N4,r=0;r<s;r++){for(n=0,a[0]=0,t=0,o=0;o<s;o++)t===(e=c[r+s*o])?a[n]++:a[++n]=1,t=e;i+=this._getBadness(n)}return i},_convertBitStream:function(t){var e,n,r=this._ecc,o=this._version;for(n=0;n<t;n++)r[n]=this._value.charCodeAt(n);var i=this._stringBuffer=r.slice(),a=this._calculateMaxLength();t>=a-2&&(t=a-2,o>9&&t--);var c=t;if(o>9){for(i[c+2]=0,i[c+3]=0;c--;)e=i[c],i[c+3]|=255&e<<4,i[c+2]=e>>4;i[2]|=255&t<<4,i[1]=t>>4,i[0]=64|t>>12}else{for(i[c+1]=0,i[c+2]=0;c--;)e=i[c],i[c+2]|=255&e<<4,i[c+1]=e>>4;i[1]|=255&t<<4,i[0]=64|t>>4}for(c=t+3-(o<10);c<a;)i[c++]=236,i[c++]=17},_getBadness:function(t){var e,n=0,r=this._badness;for(e=0;e<=t;e++)r[e]>=5&&(n+=v.N1+r[e]-5);for(e=3;e<t-1;e+=2)r[e-2]===r[e+2]&&r[e+2]===r[e-1]&&r[e-1]===r[e+1]&&3*r[e-1]===r[e]&&(0===r[e-3]||e+3>t||3*r[e-3]>=4*r[e]||3*r[e+3]>=4*r[e])&&(n+=v.N3);return n},_finish:function(){var t,e;this._stringBuffer=this.buffer.slice();var n=0,r=3e4;for(e=0;e<8&&(this._applyMask(e),(t=this._checkBadness())<r&&(r=t,n=e),7!==n);e++)this.buffer=this._stringBuffer.slice();n!==e&&this._applyMask(n),r=h.FINAL_FORMAT[n+(this._level-1<<3)];var o=this.buffer,i=this.width;for(e=0;e<8;e++,r>>=1)1&r&&(o[i-1-e+8*i]=1,e<6?o[8+i*e]=1:o[8+i*(e+1)]=1);for(e=0;e<7;e++,r>>=1)1&r&&(o[8+i*(i-7+e)]=1,e?o[6-e+8*i]=1:o[7+8*i]=1)},_interleaveBlocks:function(){var t,e,n=this._dataBlock,r=this._ecc,o=this._eccBlock,i=0,a=this._calculateMaxLength(),c=this._neccBlock1,s=this._neccBlock2,u=this._stringBuffer;for(t=0;t<n;t++){for(e=0;e<c;e++)r[i++]=u[t+e*n];for(e=0;e<s;e++)r[i++]=u[c*n+t+e*(n+1)]}for(e=0;e<s;e++)r[i++]=u[c*n+t+e*(n+1)];for(t=0;t<o;t++)for(e=0;e<c+s;e++)r[i++]=u[a+t+e*o];this._stringBuffer=r},_insertAlignments:function(){var t,e,n,r=this._version,o=this.width;if(r>1)for(t=f.BLOCK[r],n=o-7;;){for(e=o-7;e>t-3&&(this._addAlignment(e,n),!(e<t));)e-=t;if(n<=t+9)break;n-=t,this._addAlignment(6,n),this._addAlignment(n,6)}},_insertFinders:function(){var t,e,n,r,o=this.buffer,i=this.width;for(t=0;t<3;t++){for(e=0,r=0,1===t&&(e=i-7),2===t&&(r=i-7),o[r+3+i*(e+3)]=1,n=0;n<6;n++)o[r+n+i*e]=1,o[r+i*(e+n+1)]=1,o[r+6+i*(e+n)]=1,o[r+n+1+i*(e+6)]=1;for(n=1;n<5;n++)this._setMask(r+n,e+1),this._setMask(r+1,e+n+1),this._setMask(r+5,e+n),this._setMask(r+n+1,e+5);for(n=2;n<4;n++)o[r+n+i*(e+2)]=1,o[r+2+i*(e+n+1)]=1,o[r+4+i*(e+n)]=1,o[r+n+1+i*(e+4)]=1}},_insertTimingGap:function(){var t,e,n=this.width;for(e=0;e<7;e++)this._setMask(7,e),this._setMask(n-8,e),this._setMask(7,e+n-7);for(t=0;t<8;t++)this._setMask(t,7),this._setMask(t+n-8,7),this._setMask(t,n-8)},_insertTimingRowAndColumn:function(){var t,e=this.buffer,n=this.width;for(t=0;t<n-14;t++)1&t?(this._setMask(8+t,6),this._setMask(6,8+t)):(e[8+t+6*n]=1,e[6+n*(8+t)]=1)},_insertVersion:function(){var t,e,n,r,o=this.buffer,i=this._version,a=this.width;if(i>6)for(t=p.BLOCK[i-7],e=17,n=0;n<6;n++)for(r=0;r<3;r++,e--)1&(e>11?i>>e-12:t>>e)?(o[5-n+a*(2-r+a-11)]=1,o[2-r+a-11+a*(5-n)]=1):(this._setMask(5-n,2-r+a-11),this._setMask(2-r+a-11,5-n))},_isMasked:function(t,e){var n=v._getMaskBit(t,e);return 1===this._mask[n]},_pack:function(){var t,e,n,r=1,o=1,i=this.width,a=i-1,c=i-1,s=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2;for(e=0;e<s;e++)for(t=this._stringBuffer[e],n=0;n<8;n++,t<<=1){128&t&&(this.buffer[a+i*c]=1);do{o?a--:(a++,r?0!==c?c--:(r=!r,6==(a-=2)&&(a--,c=9)):c!==i-1?c++:(r=!r,6==(a-=2)&&(a--,c-=8))),o=!o}while(this._isMasked(a,c))}},_reverseMask:function(){var t,e,n=this.width;for(t=0;t<9;t++)this._setMask(t,8);for(t=0;t<8;t++)this._setMask(t+n-8,8),this._setMask(8,t);for(e=0;e<7;e++)this._setMask(8,e+n-7)},_setMask:function(t,e){var n=v._getMaskBit(t,e);this._mask[n]=1},_syncMask:function(){var t,e,n=this.width;for(e=0;e<n;e++)for(t=0;t<=e;t++)this.buffer[t+n*e]&&this._setMask(t,e)}},{_createArray:function(t){var e,n=[];for(e=0;e<t;e++)n[e]=0;return n},_getMaskBit:function(t,e){var n;return t>e&&(n=t,t=e,e=n),n=e,n+=e*e,n>>=1,n+=t},_modN:function(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t},N1:3,N2:3,N3:40,N4:10}),g=v,m=u.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var t=this.element;t.width=t.height=this.qrious.size}}),w=s.extend((function(t,e,n,r){this.name=t,this.modifiable=Boolean(e),this.defaultValue=n,this._valueTransformer=r}),{transform:function(t){var e=this._valueTransformer;return"function"==typeof e?e(t,this):t}}),y=s.extend(null,{abs:function(t){return null!=t?Math.abs(t):null},hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},noop:function(){},toUpperCase:function(t){return null!=t?t.toUpperCase():null}}),b=s.extend((function(t){this.options={},t.forEach((function(t){this.options[t.name]=t}),this)}),{exists:function(t){return null!=this.options[t]},get:function(t,e){return b._get(this.options[t],e)},getAll:function(t){var e,n=this.options,r={};for(e in n)y.hasOwn(n,e)&&(r[e]=b._get(n[e],t));return r},init:function(t,e,n){var r,o;for(r in"function"!=typeof n&&(n=y.noop),this.options)y.hasOwn(this.options,r)&&(o=this.options[r],b._set(o,o.defaultValue,e),b._createAccessor(o,e,n));this._setAll(t,e,!0)},set:function(t,e,n){return this._set(t,e,n)},setAll:function(t,e){return this._setAll(t,e)},_set:function(t,e,n,r){var o=this.options[t];if(!o)throw new Error("Invalid option: "+t);if(!o.modifiable&&!r)throw new Error("Option cannot be modified: "+t);return b._set(o,e,n)},_setAll:function(t,e,n){if(!t)return!1;var r,o=!1;for(r in t)y.hasOwn(t,r)&&this._set(r,t[r],e,n)&&(o=!0);return o}},{_createAccessor:function(t,e,n){var r={get:function(){return b._get(t,e)}};t.modifiable&&(r.set=function(r){b._set(t,r,e)&&n(r,t)}),Object.defineProperty(e,t.name,r)},_get:function(t,e){return e["_"+t.name]},_set:function(t,e,n){var r="_"+t.name,o=n[r],i=t.transform(null!=e?e:t.defaultValue);return n[r]=i,i!==o}}),_=b,x=s.extend((function(){this._services={}}),{getService:function(t){var e=this._services[t];if(!e)throw new Error("Service is not being managed with name: "+t);return e},setService:function(t,e){if(this._services[t])throw new Error("Service is already managed with name: "+t);e&&(this._services[t]=e)}}),L=new _([new w("background",!0,"white"),new w("backgroundAlpha",!0,1,y.abs),new w("element"),new w("foreground",!0,"black"),new w("foregroundAlpha",!0,1,y.abs),new w("level",!0,"L",y.toUpperCase),new w("mime",!0,"image/png"),new w("padding",!0,null,y.abs),new w("size",!0,100,y.abs),new w("value",!0,"")]),k=new x,S=s.extend((function(t){L.init(t,this,this.update.bind(this));var e=L.get("element",this),n=k.getService("element"),r=e&&n.isCanvas(e)?e:n.createCanvas(),o=e&&n.isImage(e)?e:n.createImage();this._canvasRenderer=new l(this,r,!0),this._imageRenderer=new m(this,o,o===e),this.update()}),{get:function(){return L.getAll(this)},set:function(t){L.setAll(t,this)&&this.update()},toDataURL:function(t){return this.canvas.toDataURL(t||this.mime)},update:function(){var t=new g({level:this.level,value:this.value});this._canvasRenderer.render(t),this._imageRenderer.render(t)}},{use:function(t){k.setService(t.getName(),t)}});Object.defineProperties(S.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}});var E=S,O=s.extend({getName:function(){}}).extend({createCanvas:function(){},createImage:function(){},getName:function(){return"element"},isCanvas:function(t){},isImage:function(t){}}).extend({createCanvas:function(){return document.createElement("canvas")},createImage:function(){return document.createElement("img")},isCanvas:function(t){return t instanceof HTMLCanvasElement},isImage:function(t){return t instanceof HTMLImageElement}});return E.use(new O),E}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";function t(e){return t="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},t(e)}function e(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function r(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function c(t){e(a,o,i,c,s,"next",t)}function s(t){e(a,o,i,c,s,"throw",t)}c(void 0)}))}}const o=/mobile/i.test(navigator.userAgent),i=(/android/i.test(navigator.userAgent),/iPhone|iPad|iPod/i.test(navigator.userAgent),/MicroMessenger/i.test(navigator.userAgent));var a=function(t){var e=t.ver,n=t.dir+"assets/img/wb_svg.html?v="+e,r=t.pd_name?"wbInlineSVGdata_"+t.pd_name:"wbInlineSVGdata",o=t.pd_name?"wbInlineSVGrev_"+t.pd_name:"wbInlineSVGrev";if(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)return!0;var i,a,c="localStorage"in window&&null!==window.localStorage,s=function(){document.body.insertAdjacentHTML("afterbegin",a)},u=function(){document.body?s():document.addEventListener("DOMContentLoaded",s)};if(c&&localStorage.getItem(o)===e&&(a=localStorage.getItem(r)))return u(),!0;try{(i=new XMLHttpRequest).open("GET",n,!0),i.onload=function(){i.status>=200&&i.status<400&&(a='<div style="display:none;position:absolute;z-index:-1;">'+i.responseText+"</div>",u(),c&&(localStorage.setItem(r,a),localStorage.setItem(o,e)))},i.send()}catch(t){console.log(t)}};function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function u(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(){f=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),c=new O(r||[]);return o(a,"_invoke",{value:L(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d={};function p(){}function v(){}function g(){}var m={};u(m,a,(function(){return this}));var w=Object.getPrototypeOf,y=w&&w(w(A([])));y&&y!==n&&r.call(y,a)&&(m=y);var b=g.prototype=p.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,n){function i(o,a,c,s){var u=h(e[o],e,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&r.call(f,"__await")?n.resolve(f.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):n.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){i(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function L(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=k(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=h(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=h(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function A(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return v.prototype=g,o(b,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:v,configurable:!0}),v.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},_(x.prototype),u(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(b),u(b,s,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}var h={stringify:function(e){if("object"!=t(e))return"";var n=[];return Object.entries(e).forEach((function(t){var e=l(t,2),r=e[0],o=e[1];n.push("".concat(r,"=").concat(o))})),n.join("&")},getData:function(t){return r(f().mark((function e(){var n,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:h.stringify(t)},e.prev=1,e.next=4,fetch(wb_magicpost_cnf.ajax_url,n);case 4:return r=e.sent,e.abrupt("return",r.json());case 8:e.prev=8,e.t0=e.catch(1),Promise.reject(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()},saveData:function(t){return r(f().mark((function e(){var n,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:h.stringify(t)},e.prev=1,e.next=4,fetch(wb_magicpost_cnf.ajax_url,n);case 4:return r=e.sent,e.abrupt("return",r.json());case 8:e.prev=8,e.t0=e.catch(1),Promise.reject(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()},getText:function(t){return r(f().mark((function e(){var n,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:h.stringify(t)},e.prev=1,e.next=4,fetch(wb_magicpost_cnf.ajax_url,n);case 4:return r=e.sent,e.abrupt("return",r.text());case 8:e.prev=8,e.t0=e.catch(1),Promise.reject(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))()},getLocalStorage:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=localStorage.getItem(t);if(!n)return!1;try{return e?JSON.parse(n):JSON.parse(n).data}catch(e){localStorage.removeItem(t)}},setLocalStorage:function(t,e){var n={ver:(new Date).getTime(),data:e},r=JSON.stringify(n);localStorage.setItem(t,r)},on:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e;3===r.length&&(r=[[document.documentElement]].concat(u(r))),"String"===r[0].constructor.name?r[0]=u(document.querySelectorAll(r[0])):r[0].forEach?r[0]=u(r[0]):r[0]=[r[0]],"String"!==r[2].constructor.name&&(r[2].forEach?r[2]=u(r[2]):r[2]=[r[2]]);var o=l(r,4),i=o[0],a=o[1],c=o[2],s=o[3],f=a.split(" "),h=function(t){var e;"String"===c.constructor.name?e=t.target.closest(c):e=l(c.filter((function(e){return e===t.target||e.contains(t.target)})),1)[0];e&&(t.relatedElements=i,s.call(e,t,e))};return i.forEach((function(t){f.forEach((function(e){t.addEventListener(e,h,!0)}))})),h},closest:function(t,e){for(var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t&&!n.call(t,e);)t=t.parentElement;return t},i18n:function(t){return wb_magicpost_cnf.i18n[t]}},d=function(t){return function(t){for(var e=(new TextEncoder).encode(t),n=[],r=0;r<256;r++){for(var o=r,i=0;i<8;i++)o=1&o?3988292384^o>>>1:o>>>1;n[r]=o}for(var a=-1,c=0;c<e.length;c++)a=a>>>8^n[255&(a^e[c])];return(-1^a)>>>0}(t).toString(16).padStart(8,"0")},p=function(){return window.wb_i18n_magicpost||{}},v=function(t){return p()[d(t)]||"{".concat(t,"}")},g=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return(p()[d(t)]||"{".concat(t,"}")).replace(/%s/g,(function(){return n.shift()}))},m=h.on,w=h.setLocalStorage,y=h.getLocalStorage,b=(h.closest,h.getData),_=(h.saveData,document),x="getElementsByClassName",L=function(t){return _.querySelectorAll(t)},k="OK",S="Cancel",E=["dialog","toast","loading","iframe"],O={type:0,mask:!0,maskClose:!0,closebtn:!0,whenBtnClickClose:!0,fixed:!0,anim:"def"},A={extend:function(t,e){var n="object"==typeof e?JSON.parse(JSON.stringify(e)):JSON.parse(JSON.stringify(O));for(var r in t)n[r]=t[r];return n},timer:{},end:{},touch:function(t,e){t.addEventListener("click",(function(t){e.call(this,t)}),!1)}},j=0,T=["wbui"],q=function(t){this.config=A.extend(t),this.view()};q.prototype.view=function(){var t=this,e=t.config,n=_.createElement("div"),r="object"==typeof e.content,o="string"==typeof e.type?e.type:T[0]+"-"+E[e.type||0];t.id=n.id=T[0]+j,n.setAttribute("class",T[0]+" "+o),n.setAttribute("index",j);var i,a,c=(i="object"==typeof e.title,e.title?'<h3 class="wbui-title'+(i?" "+e.title[1]:"")+'">'+(i?e.title[0]:e.title)+"</h3>":""),s=(a="object"==typeof e.closebtn,e.closebtn?'<a class="wbui-close'+(a?" "+e.closetype[1]:"")+'"><i></i></a>':""),u=function(){"string"==typeof e.btn&&(e.btn=[e.btn]);var t,n=(e.btn||[]).length;return 0!==n&&e.btn?(t='<span yes type="1">'+e.btn[0]+"</span>",2===n&&(t='<span no type="0">'+e.btn[1]+"</span>"+t),'<div class="wbui-btn">'+t+"</div>"):""}();if(e.fixed||(e.top=e.hasOwnProperty("top")?e.top:100,e.style=e.style||"",e.style+=" top:"+(_.body.scrollTop+e.top)+"px"),2===e.type&&(e.content='<i></i><i class="wbui-load"></i><i></i><p>'+(e.content||"")+"</p>"),3===e.type){e.content=r?e.content:[e.content||"","auto"];e.content='<iframe scrolling="'+(e.content[1]||"auto")+'" allowtransparency="true" id="'+E[3]+j+'" name="'+E[3]+j+'" onload="this.className=\'\';" class="wbui-load" frameborder="0" src="'+e.content[0]+'"></iframe>'}if(e.skin&&(e.anim="fade"),"msg"===e.skin&&(e.mask=e.closebtn=!1,e.time=2),n.innerHTML=(e.mask?"<div "+("string"==typeof e.mask?'style="'+e.mask+'"':"")+' class="wbui-mask"></div>':"")+'<div class="wbui-main" '+(e.fixed?"":'style="position:static;"')+'><div class="wbui-section"><div class="wbui-child '+(e.skin?"wbui-"+e.skin+" ":"")+(e.className?e.className:"")+" "+(e.anim?"wbui-anim-"+e.anim:"")+'" '+(e.style?'style="'+e.style+'"':"")+">"+c+'<div class="wbui-cont">'+e.content+"</div>"+u+(e.closebtn?s:"")+"</div></div></div>",!e.type||2===e.type){var l=_[x](T[0]+E[e.type]);l.length>=1&&M.close(l[0].getAttribute("index"))}document.body.appendChild(n);var f=t.elem=L("#"+t.id)[0];e.success&&e.success(f),t.index=j++,t.action(e,f)},q.prototype.action=function(t,e){var n=this;t.time&&(A.timer[n.index]=setTimeout((function(){M.close(n.index)}),1e3*t.time));var r=function(){0==this.getAttribute("type")?(t.no&&t.no(),M.close(n.index)):(t.yes&&t.yes(n.index),t.whenBtnClickClose&&M.close(n.index))};if(t.btn)for(var o=e[x]("wbui-btn")[0].children,i=o.length,a=0;a<i;a++)A.touch(o[a],r);if(t.mask&&t.maskClose){var c=e[x]("wbui-mask")[0];A.touch(c,(function(){M.close(n.index,t.end)}))}if(t.closebtn){var s=e[x]("wbui-close")[0];A.touch(s,(function(){M.close(n.index,t.end)}))}t.end&&(A.end[n.index]=t.end)};const M={v:"1.0.5",index:j,open:function(t){return new q(t||{}).index},alert:function(t,e){var n="function"==typeof e,r=A.extend({content:t,btn:k});return r=n?A.extend({yes:e},r):A.extend(e,r),M.open(r)},confirm:function(t,e,n,r){var o="function"==typeof e,i=A.extend({content:t,btn:[k,S]});return i=o?A.extend({yes:e,no:n},i):A.extend(e,i),M.open(i)},toast:function(t,e){var n="function"==typeof e,r=A.extend({type:1,content:t,mask:0,closebtn:0,time:2});return r=n?A.extend({end:e},r):A.extend(e,r),M.open(r)},loading:function(t){var e="function"==typeof t,n=A.extend({type:2,content:0,mask:0,maskClose:0,closebtn:0});return n=e?A.extend({end:t},n):A.extend(t,n),M.open(n)},iframe:function(t,e,n,r){var o="function"==typeof e,i=A.extend({type:3,content:t,mask:0});return i=o?A.extend({yes:e,no:n},i):A.extend(e,i),M.open(i)},close:function(t){var e=L("#"+T[0]+t)[0];e&&(e.innerHTML="",_.body.removeChild(e),clearTimeout(A.timer[t]),delete A.timer[t],"function"==typeof A.end[t]&&A.end[t](),delete A.end[t])},closeAll:function(){for(var t=_[x](T[0]),e=0,n=t.length;e<n;e++)M.close(0|t[0].getAttribute("index"))}};function N(){N=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new E(r||[]);return o(a,"_invoke",{value:x(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h={};function d(){}function p(){}function v(){}var g={};u(g,a,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(O([])));w&&w!==n&&r.call(w,a)&&(g=w);var y=v.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(e,n){function i(o,a,c,s){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):n.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){i(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=L(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function L(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=v,o(y,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},e.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var I={sct:0,st:0,init:function(){var t=this;if(void 0!==window.wb_magicpost_cnf&&0!=wb_magicpost_cnf.dl_switch){var e=document.querySelector("#J_downloadBar");e&&window.addEventListener("scroll",(function(){clearTimeout(t.sct),t.sct=setTimeout((function(){t.st=document.documentElement.scrollTop,e.classList[t.st>200?"add":"remove"]("sb-active")}),200)})),h.on("click",".j-wbdlbtn-magicpost",(function(e,n){t.popupDialog(n)}))}},rendPop:function(t,e){return'<div class="wbdl-main" id="J_ppoDownloadMP">\n      <div class="dl-info">\n        <svg class="wb-icon wbsico-magicpost-confirm"><use xlink:href="#wbsico-magicpost-confirm"></use></svg>\n        <span>'.concat(v("密码"),'</span>\n        <b class="dl-psw">').concat(e,"</b><span>").concat(v("已复制"),'</span>\n      </div>\n      <a class="wb-btn wb-btn-outlined wb-btn-download j-copy-psw" href="').concat(t,'" data-clipboard-text="').concat(e,'" target="_blank" rel="nofollow">\n        <svg class="wb-icon-magicpost wbsico-magicpost-download"><use xlink:href="#wbsico-magicpost-download"></use></svg>\n        <span>').concat(v("前往下载页面"),'</span>\n      </a>\n    </div>\n    <div class="info-for-sp">\n      <span>').concat(v("低版本浏览器需手动复制密码再前往下载页面下载，谢谢"),"</span>\n    </div>")},popupDialog:function(t){var e=this,n=t.dataset.pid,o=t.dataset.rid,i=(document.querySelector("#WBDL_PSW"),function(){var t=r(N().mark((function t(e){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.clipboard.writeText(e);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),M.alert(v("该浏览器不支持自动复制，请手动复制密码再跳转链接"));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}());if(t.dataset["dl-url"]){var a=t.dataset["dl-url"],c=t.dataset["dl-pwd"],s=e.rendPop(a,c);return c?(i(c),M.open({content:s,type:"wbdl-dialog"})):window.open(a,"_blank"),!1}h.getData({action:"wb_mpdl_front",pid:n,rid:o}).then((function(n){switch(n.code){case 0:var r=n.data.url,o=n.data.pwd;if(""===r){M.alert(v("下载异常，请联系网站管理员修正下载链接"));break}if(t.setAttribute("dl-url",r),t.setAttribute("dl-pwd",o),o){var a=e.rendPop(r,o);i(o),M.open({content:a,type:"wbdl-dialog"})}else{t.setAttribute("href",r);var c=window.open(r);null!=c&&void 0!==c||M.open({content:'<div class="dl-info">'.concat(v("浏览器拦截了跳转，请重试。"),'\n                  <br><br>\n                  <a class="wb-btn wb-btn-outlined wb-btn-download" href="').concat(r,'" target="_blank" rel="nofollow">\n                    <svg class="wb-icon-magicpost wbsico-magicpost-download"><use xlink:href="#wbsico-magicpost-download"></use></svg><span>').concat(v("去下载"),"</span>\n                  </a>\n                </div>"),type:"wbdl-dialog"})}document.querySelector(".j-wbdl-count")&&void 0!==n.data.post_downs&&(document.querySelector(".j-wbdl-count").innerHTML=n.data.post_downs);break;case 1:default:M.alert(v("下载异常，请联系网站管理员"));break;case 2:M.alert(v("请先登录，谢谢"));break;case 3:M.toast(v("请先留下您的评论，谢谢"))}return!1}))}},P=n(331),B=n.n(P),C={dwqr_cnf:{},shareData:{},init:function(){if(void 0!==window.wb_magicpost_cnf&&0!=wb_magicpost_cnf.share_switch){var t=this;t.getCnf();var e=document.querySelector(".wbp-dwqr-sticky");e&&e.parentNode.classList.add("wbp-dwqr-wp");var n=document.querySelector(".j-dwqr-social-btn");n&&(o?t.shareMobile(n):t.sharePupop()),document.querySelector(".j-dwqr-like-btn")&&t.doLike(),document.querySelector(".j-dwqr-poster-btn")&&h.on("click",".j-dwqr-poster-btn",(function(e){t.doPoster(),e.stopPropagation()})),document.querySelector(".j-dwqr-donate-btn")&&h.on("click",".j-dwqr-donate-btn",(function(){t.doDonate()}))}},sharePupop:function(){var t=this;h.on("click",".j-dwqr-social-btn",(function(){h.getData({action:"dwqr_ajax",do:"get_social_items",pid:t.dwqr_cnf.pid}).then((function(e){t.shareData=e.data,M.open({title:v("分享到..."),content:e.html,className:"wbui-dwqr-share",success:function(){h.on("click",".share-logo-magicpost",(function(e,n){t.doSocialShare(n),e.stopPropagation()}))}})}))}))},shareMobile:function(t){navigator.share?t.addEventListener("click",(function(){navigator.share({title:document.title||"",url:window.location.href}).then((function(){return console.log("Share success")})).catch((function(t){return console.log("Share fail:",t)}))})):i?this.wxShareTips(t):this.sharePupop()},wxShareTips:function(t){var e=document.querySelector(".wb-wx-share-wp");if(!e){var n=document.title||v("页面标题");document.querySelector("body").insertAdjacentHTML("beforeend",'\n        <div class="wb-wx-share-wp">\n        <div class="wb-wst-inner">\n          <div class="wb-wst-hd">'.concat(v("点击右上角即可分享"),'</div>\n          <div class="wb-wst-img">\n            <div class="wb-wst-title">').concat(n,'</div>\n            <div class="wb-wst-close"></div>\n            <div class="wb-wst-points"><i></i><i></i><i></i></div>\n          </div>\n        </div>\n      </div>\n      ')),e=document.querySelector(".wb-wx-share-wp")}t.addEventListener("click",(function(){e.classList.add("active")})),e.addEventListener("click",(function(){e.classList.remove("active")}))},getCnf:function(t){var e=this;e.dwqr_cnf=wb_magicpost_cnf,h.getData({action:"dwqr_ajax",do:"get_cnf"}).then((function(n){e.dwqr_cnf=Object.assign(n.data,e.dwqr_cnf),t&&t()}))},doLike:function(t){var e=t||document.querySelector(".wb-btn-like"),n=this.dwqr_cnf.uid,r=this.dwqr_cnf.pid,o=n?"WB_MAGICPOST_LOCAL_DATA_"+n:"WB_MAGICPOST_LOCAL_DATA_VISITOR",i=h.getLocalStorage(o)||{};i&&void 0===i.post_liked_items&&(i.post_liked_items=[]);var a=i.post_liked_items;if(a.indexOf(r)>-1){var c=e.dataset.count;[].forEach.call(document.querySelectorAll(".j-dwqr-like-btn"),(function(t){var e=t.querySelector(".like-count");t.classList.add("active"),e&&(e.innerHTML=g("已赞(%s)",c))}))}h.on("click",".j-dwqr-like-btn",(function(t,e){e.classList.contains("active")||h.saveData({action:"dwqr_ajax",do:"like",pid:r}).then((function(t){if(t){var n=t>1?t>999?parseInt(t/1e3)+"k+":t:1;e.querySelector(".like-count").innerHTML=t>1?g("已赞(%s)",n):v("已赞"),e.classList.add("active"),a.push(r),h.setLocalStorage(o,i)}}))}))},doDonate:function(){h.getText({action:"dwqr_ajax",do:"get_donate_items",pid:this.dwqr_cnf.pid}).then((function(t){M.open({content:t,className:"wbui-dwqr-donate",success:function(){var t=document.querySelector(".wbui-dwqr-donate"),e=t.querySelectorAll(".tab-cont");h.on(t,"click",".tab-nav-item",(function(n,r){var o=r.dataset.index;t.querySelector(".tab-nav-item.current").classList.remove("current"),t.querySelector(".tab-cont.current").classList.remove("current"),r.classList.add("current"),e[o].classList.add("current")}))}})}))},doSocialShare:function(t){if("weixin"===t.dataset.cmd)M.open({title:v("微信扫码分享"),content:'<div class="qrbox" id="J_shareQrBox"><canvas width="200" id="J_shareQrImg"></canvas>\n            <p>'.concat(v("手机微信扫码后分享。"),"</p></div>"),className:"wbui-qrbox",success:function(){new(B())({element:document.getElementById("J_shareQrImg"),level:"H",size:200,value:e})}});else{var e=t.dataset.url;window.open(e,"_blank")}},doPoster:function(){var t=this,e=t.dwqr_cnf.pid,n='<div class="mobile-share-wrap"><div class="loading">'.concat(v("分享图片生成中..."),'</div></div><div class="poster-share-tips">').concat(v("请长按图片，将内容推荐给好友"),"</div>"),r=t.dwqr_cnf.poster_theme;M.open({type:"wbui-share-poster",content:n,success:function(){h.getData({action:"dwqr_ajax",do:"wb_share_poster",pid:e}).then((function(e){var n=e.data;n.callback=function(t){var e=document.querySelector(".mobile-share-wrap"),n=document.querySelector(".poster-share-tips");e&&(e.innerHTML='<img src="'+t+'">'),n&&/MicroMessenger/i.test(navigator.userAgent)&&(document.querySelector(".poster-share-tips").style.display="block")};var o=new(B())({value:n.url});n.qrcode=o.toDataURL(),n.head&&n.logo&&n.qrcode?t.canvas(n,r):M.alert(v("生成分享图片失败")+(n.head?"":v("- 头图读取异常"))+"<br>"+(n.logo?"":v("- logo读取异常"))+"<br>"+(n.qrcode?"":v("- QRCode读取异常")),(function(){M.closeAll()}))})).catch((function(t){console.log(t),M.alert(v("获取分享图片失败 - time out"),(function(){M.closeAll()}))}))}})},canvas:function(t,e){var n=this,r=document.createElement("canvas"),o=r.getContext("2d"),i=720,a=1100,c={};r.width=i,r.height=1e4;var s=0;o.fillStyle="#fff",o.fillRect(0,0,r.width,r.height);var u=function(t){var e=c.bgi;if(!e)return t&&t(),!1;var r=new Image;r.crossOrigin="anonymous",r.src=decodeURIComponent(n.dwqr_cnf.dir)+"assets/img/bgi/"+e,r.onerror=function(t){M.alert(v("生成分享图片失败 - 背景图读取异常"),(function(){M.closeAll()}))},r.onload=function(){o.drawImage(this,0,0,i,r.height,0,0,i,a),t&&t()}},l=function(e,n){var r=new Image;r.crossOrigin="anonymous",t.head.match(/^\/\//)&&(t.head=window.location.protocol+t.head),r.src=t.head,r.onerror=function(t){M.alert(v("生成分享图片失败 - 获取头图异常"),(function(){M.closeAll()}))},r.onload=function(){var t=parseInt(2*c.head_width/3),a=parseInt(2*r.width/3),s=0,u=r.width,l=r.height,f=c.head_width,h=t,d=(i-c.head_width)/2,p=c.padding_top;r.height===r.width?(d=parseInt((c.head_width-t)/2)+(i-c.head_width)/2+20,f=t-40,h=t-40,p=40+c.padding_top):r.height>a?l=a:r.height<a&&(u=parseInt(3*l/2),s=parseInt((r.width-u)/2)),e+=t+c.padding_top,o.drawImage(this,s,0,u,l,d,p,f,h),n&&n(e)}},f=function(e,n){o.stroke(),o.fillStyle="#666",o.textAlign="left",o.font="700 36px sans-serif",e+=80,e=m(document.createElement("div").innerText=t.title,c.padding_left,e,40,o),n&&n(e)},h=function(e,n){var r=document.createElement("div");r.innerHTML=t.excerpt,o.textAlign="left",o.fillStyle="#333",o.font="300 28px sans-serif",e+=30,e=m(r.innerHTML,c.padding_left,e,42,o),n&&n(e)},d=function(t,e){t+=40,o.lineWidth=1,o.beginPath(),o.strokeStyle="#ededed",o.moveTo(40,t),o.lineTo(680,t),o.stroke(),e&&e(t)},p=function(e,n){var r=new Image;r.crossOrigin="anonymous",t.logo.match(/^\/\//)&&(t.logo=window.location.protocol+t.logo),r.src=t.logo,r.onerror=function(t){M.alert(v("生成分享图片失败 - 获取logo图片异常"),(function(){M.closeAll()}))},r.onload=function(){e+=60;var t=400/r.width*r.height;t=t>100?100:t;var i=r.width/(r.height/t);t=(i=i>400?400:i)/r.width*r.height,o.drawImage(this,0,0,r.width,r.height,c.padding_left,e+(120-t)/2,i,t),n&&n(e,t)}},g=function(e,n,s){var u=new Image;u.src=t.qrcode,u.onerror=function(t){M.alert(v("生成分享图片失败 - 二维码生成异常"),(function(){M.closeAll()}))},u.onload=function(){var l=i-c.padding_left-120;o.drawImage(this,0,0,u.width,u.height,l,e,120,120/u.width*u.height);var f=120/u.width*u.height;e+=f>n?f:n,e=a;var h=o.getImageData(0,0,i,e);r.height=e,o.putImageData(h,0,0);var d=r.toDataURL("image/jpeg",1);t.callback(d),s&&s(e)}},m=function(t,e,n,r,o){for(var i=0,a=0,s=0;s<t.length;s++)(i+=o.measureText(t[s]).width)>c.main_width-20&&(o.fillText(t.substring(a,s),e,n),n+=r,i=0,a=s),s==t.length-1&&(o.fillText(t.substring(a,s+1),e,n),n+=r);return n};switch(e){case"1":c={bgi:"theme_1.jpg",padding_left:60,padding_top:60,head_width:600,main_width:600,with_content:1,with_domain:0},u((function(){o.fillStyle="#fff",o.fillRect(40,40,640,1020),l(s,(function(t){f(t,(function(t){h(t,(function(t){d(t,(function(t){p(t,(function(t,e){g(t,e)}))}))}))}))}))}));break;case"2":c={bgi:"theme_2.jpg",padding_left:60,padding_top:270,head_width:600,main_width:600,with_content:1,with_domain:0};var w=document.domain;u((function(){o.fillStyle="#fff",o.fillRect(40,c.padding_top-20,640,1080-c.padding_top),o.stroke(),o.fillStyle="#1FAFE9",o.textAlign="center",o.font="500 36px sans-serif",o.fillText(w,360,130,i),l(s,(function(t){f(t,(function(t){d(t,(function(t){p(t,(function(t,e){g(t,e)}))}))}))}))}));break;case"3":c={bgi:"theme_3.png",padding_left:60,padding_top:200,head_width:600,main_width:600,with_content:1,with_domain:0},u((function(){l(s,(function(t){f(t,(function(t){p(800,(function(t,e){g(t,e)}))}))}))}));break;case"4":c={padding_left:40,padding_top:0,head_width:i,main_width:640,with_content:0,with_domain:0},function(e,n){var r=new Image;r.crossOrigin="anonymous",t.head.match(/^\/\//)&&(t.head=window.location.protocol+t.head),r.src=t.head,r.onerror=function(t){M.alert(v("生成分享图片失败 - 获取头图异常"),(function(){M.closeAll()}))},r.onload=function(){var t=parseInt(c.head_width*a/i),s=parseInt(r.width*a/i),u=0,l=r.width,f=r.height,h=c.head_width,d=t,p=(i-c.head_width)/2,v=c.padding_top;r.height>=s?f=s:r.height<s&&(l=parseInt(f*i/a),u=parseInt((r.width-l)/2)),e+=t+c.padding_top,o.drawImage(this,u,0,l,f,p,v,h,d),n&&n(e)}}(s,(function(e){s=680,o.fillStyle="rgba(0,0,0,.7)",o.fillRect(0,s,i,a-s),s=680,o.stroke(),o.fillStyle="#fff",o.textAlign="left",o.font="500 36px sans-serif",s+=80,s=m(document.createElement("div").innerText=t.title,c.padding_left,s,40,o),s+=20,o.lineWidth=1,o.beginPath(),o.strokeStyle="rgba(255,255,255,.7)",o.moveTo(40,s),o.lineTo(680,s),o.stroke(),p(s,(function(t,e){g(t,e)}))}));break;default:c={padding_left:40,padding_top:0,head_width:i,main_width:640,with_content:1,with_domain:0},l(s,(function(t){f(t,(function(t){h(t,(function(t){d(t,(function(t){p(t,(function(t,e){g(t,e)}))}))}))}))}))}}},G={scTitleClass:"j-wbsc-title",sctName:"wb-sc-",itso:null,init:function(){var t=this,e=document.querySelector(".magicpost-toc-wp");if(e){var n=document.querySelector(".magicpost-toc-interaction"),r=t.getWpEle();t.setContentTitle(r,e),m(e,"click",".magicpost-toc-title",(function(){e.classList.toggle("toc-fold")})),n&&(t.itso=new IntersectionObserver((function(e){var r=n.offsetHeight,o=e[0].target,i=o.offsetTop;e[0].intersectionRatio<1&&n.scrollTo({top:i-r/2,behavior:"smooth"}),t.itso.unobserve(o)}),{root:n}))}},getWpEle:function(){var t=document.querySelector("#magicpostMarker");return t?t.parentElement:document.querySelector(".entry-content")},setContentTitle:function(t,e){var n=this;if(e.dataset.wbCt){var r=e.dataset.wbCt.split(""),o=t.querySelectorAll("h".concat(r[0]));if(Array.prototype.forEach.call(o,(function(t,e){t.classList.add(n.sctName+e,n.scTitleClass),t.hasAttribute("id")||t.setAttribute("id","toc-".concat(e))})),r[1]){var i=t.querySelectorAll("h".concat(r[1]));Array.prototype.forEach.call(i,(function(t,e){t.classList.add(n.sctName+"sub-"+e,n.scTitleClass),t.hasAttribute("id")||t.setAttribute("id","toc-s-".concat(e))}))}var a=t.querySelectorAll("."+n.scTitleClass);Array.prototype.forEach.call(a,(function(t,e){t.setAttribute("data-index",e)}));var c=document.querySelector(".magicpost-toc-interaction");if(c){var s=new IntersectionObserver((function(t){t.forEach((function(t){var e=t.target.dataset.index;t.intersectionRatio>0&&null!=e&&n.updateLift(e,c)}))}),{rootMargin:"-45% 0px"});Array.prototype.forEach.call(a,(function(t){s.observe(t)})),n.liftSideHandler(c)}}},liftSideHandler:function(t){var e=this;t.querySelectorAll(".mgp-toc-item")&&m(t,"click",".mgp-toc-item",(function(n,r){var o=r.querySelector(".mgp-toc-subtitle"),i=r.querySelector(".mgp-toc-title"),a=o?"sub-"+o.dataset.index:i.dataset.index,c=document.querySelector(".".concat(e.sctName).concat(a));if(c){var s=e.elemOffsetY(c)-80,u=t.querySelector(".current");u&&u.classList.remove("current"),r.classList.add("current"),window.scrollTo({top:s})}}))},updateLift:function(t,e){var n=e.querySelectorAll(".mgp-toc-item"),r=e.querySelector(".current"),o=n[t];r&&r.classList.remove("current"),o.classList.add("current"),this.itso&&this.itso.observe(o)},elemOffsetY:function(t){return t.offsetParent?t.offsetTop+this.elemOffsetY(t.offsetParent):t.offsetTop}};function D(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,D(r.key),r)}}var F=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);this.opt=Object.assign({},r);var o=e.dataset.wbatsTarget||this.opt.target;this.asTo=null,this.$target=document.querySelector(o),this.opt.onReady&&this.opt.onReady(),this.$target&&(e.addEventListener("click",(function(){n.active()})),this.inactive())}var e,n,r;return e=t,(n=[{key:"active",value:function(){var t=this,e=t.$target;t.opt.onActive&&t.opt.onActive(e),e.classList.add("wb-active"),t.asTo=setTimeout((function(){e.classList.add("wb-slide-in")}),50)}},{key:"inactive",value:function(){var t=this.$target,e=this;((...t)=>{let e=t;3===e.length&&(e=[[document.documentElement],...e]),"String"===e[0].constructor.name?e[0]=[...document.querySelectorAll(e[0])]:e[0].forEach?e[0]=[...e[0]]:e[0]=[e[0]],"String"!==e[2].constructor.name&&(e[2].forEach?e[2]=[...e[2]]:e[2]=[e[2]]);const[n,r,o,i]=e,a=r.split(" "),c=t=>{let e;"String"===o.constructor.name?e=t.target.closest(o):[e]=o.filter((e=>e===t.target||e.contains(t.target))),e&&(t.relatedElements=n,i.call(e,t,e))};n.forEach((t=>{a.forEach((e=>{t.addEventListener(e,c,!0)}))}))})(t,"click",".was-close, .was-mask",(function(){e.opt.onInactive&&e.opt.onInactive(t),t.classList.remove("wb-slide-in","wb-active")}))}}])&&R(e.prototype,n),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),H={st:0,sct:null,init:function(){var t=this,e=document.querySelectorAll("[data-wbats-target]");Array.prototype.forEach.call(e,(function(t){new F(t)}));var n=document.querySelector(".wb-act-share-nvt");n&&(navigator.share?n.addEventListener("click",(function(){navigator.share({title:document.title||"",url:window.location.href}).then((function(){return console.log("Share success")})).catch((function(t){return console.log("Share fail:",t)}))})):i?t.wxShareTips(n):new F(n,{target:".wb-ats-share"}));var r=document.querySelector(".header"),o=document.querySelector(".wb-tabbar"),a=document.documentElement.scrollHeight;window.addEventListener("scroll",(function(){clearTimeout(t.sct),t.sct=setTimeout((function(){var e=window.pageYOffset||document.documentElement.scrollTop;e+window.innerHeight>=a-1?o&&o.classList.remove("wb-hide"):(e>t.st?(r&&r.classList.add("wb-hide"),o&&o.classList.remove("wb-hide")):e<t.st&&(r&&r.classList.remove("wb-hide"),o&&o.classList.add("wb-hide")),t.st=e)}),200)}))},wxShareTips:function(t){var e=document.querySelector(".wb-wx-share-wp");if(!e){var n=document.title||wb_e("页面标题");document.querySelector("body").insertAdjacentHTML("beforeend",'\n        <div class="wb-wx-share-wp">\n        <div class="wb-wst-inner">\n          <div class="wb-wst-hd">'.concat(wb_e("点击右上角即可分享"),'</div>\n          <div class="wb-wst-img">\n            <div class="wb-wst-title">').concat(n,'</div>\n            <div class="wb-wst-close"></div>\n            <div class="wb-wst-points"><i></i><i></i><i></i></div>\n          </div>\n        </div>\n      </div>\n      ')),e=document.querySelector(".wb-wx-share-wp")}t.addEventListener("click",(function(){e.classList.add("active")})),e.addEventListener("click",(function(){e.classList.remove("active")}))}};function z(){z=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new E(r||[]);return o(a,"_invoke",{value:x(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h={};function d(){}function p(){}function v(){}var g={};u(g,a,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(O([])));w&&w!==n&&r.call(w,a)&&(g=w);var y=v.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(e,n){function i(o,a,c,s){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):n.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){i(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=L(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function L(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=v,o(y,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},e.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}var J=function(){var t=r(z().mark((function t(e){var n,r,o,i,a,c,s;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.pd_name,r=e.ver,o=e.locale,i="".concat(r,"_").concat(o),a=n?"WB_I18N_DATA_JS_"+n:"WB_I18N_JS_MAGICPOST",y(c=n?"WB_I18N_REV_JS_"+n:"WB_I18N_JS_MAGICPOST_REV")!=i){t.next=6;break}return t.abrupt("return",y(a));case 6:return t.next=8,b({action:"wb_magicpost_localize",op:"front"});case 8:if(!(s=t.sent)||s.code){t.next=13;break}return w(c,i),w(a,s.data),t.abrupt("return",s.data);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function V(){V=function(){return e};var e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new E(r||[]);return o(a,"_invoke",{value:x(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h={};function d(){}function p(){}function v(){}var g={};u(g,a,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(O([])));w&&w!==n&&r.call(w,a)&&(g=w);var y=v.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function _(e,n){function i(o,a,c,s){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==t(h)&&r.call(h,"__await")?n.resolve(h.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):n.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return i("throw",t,c,s)}))}s(u.arg)}var a;o(this,"_invoke",{value:function(t,e){function r(){return new n((function(n,r){i(t,e,n,r)}))}return a=a?a.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=L(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function L(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=v,o(y,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},e.awrap=function(t){return{__await:t}},b(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}document.addEventListener("DOMContentLoaded",r(V().mark((function t(){return V().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("undefined"!=typeof wb_magicpost_cnf){t.next=3;break}return console.log("--加载预设参数异常--"),t.abrupt("return");case 3:return a(wb_magicpost_cnf),t.next=6,J(wb_magicpost_cnf);case 6:window.wb_i18n_magicpost=t.sent,I.init(),C.init(),G.init(),o&&H.init();case 11:case"end":return t.stop()}}),t)}))))})()})();