cxybn/public/mobile/static/js/bundle-pages-invite_fans-invite_fans.f1b1c6ea.js
2023-10-23 16:11:09 +08:00

15 lines
82 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["bundle-pages-invite_fans-invite_fans"],{"047c":function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("8f7f"),r={name:"lime-painter-view",mixins:[(0,n.children)("painter"),(0,n.parent)("painter")],props:{css:[String,Object]},data:function(){return{type:"view",el:{css:{},views:[]}}}};e.default=r},"059f":function(t,e,i){"use strict";i.r(e);var n=i("184f"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},"08cb":function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a9e3"),i("a630"),i("3ca3");var n={props:{color:String,vertical:Boolean,type:{type:String,default:"spinner"},size:{type:Number,default:40},textSize:String},data:function(){return{array12:Array.from({length:12})}}};e.default=n},"091a":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'[data-v-13a5beb4]:host{font-size:0;line-height:1}.loading[data-v-13a5beb4]{display:inline-flex;align-items:center;justify-content:center;color:#c8c9cc}.loading__spinner[data-v-13a5beb4]{position:relative;box-sizing:border-box;width:%?45?%;max-width:100%;max-height:100%;height:%?45?%;-webkit-animation:rotate-data-v-13a5beb4 .8s linear infinite;animation:rotate-data-v-13a5beb4 .8s linear infinite}.loading__spinner--spinner[data-v-13a5beb4]{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.loading__spinner--circular[data-v-13a5beb4]{border:%?2?% solid transparent;border-top-color:initial;border-radius:100%}.loading__text[data-v-13a5beb4]{margin-left:%?16?%;color:#969799;font-size:%?28?%;line-height:%?40?%}.loading__text[data-v-13a5beb4]:empty{display:none}.loading--vertical[data-v-13a5beb4]{-webkit-flex-direction:column;flex-direction:column}.loading--vertical .loading__text[data-v-13a5beb4]{margin:%?16?% 0 0}.loading__dot[data-v-13a5beb4]{position:absolute;top:0;left:0;width:100%;height:100%}.loading__dot[data-v-13a5beb4]:before{display:block;width:%?4?%;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.loading__dot[data-v-13a5beb4]:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.loading__dot[data-v-13a5beb4]:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.loading__dot[data-v-13a5beb4]:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.loading__dot[data-v-13a5beb4]:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.loading__dot[data-v-13a5beb4]:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.loading__dot[data-v-13a5beb4]:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.loading__dot[data-v-13a5beb4]:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.loading__dot[data-v-13a5beb4]:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.loading__dot[data-v-13a5beb4]:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.loading__dot[data-v-13a5beb4]:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.loading__dot[data-v-13a5beb4]:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.loading__dot[data-v-13a5beb4]:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes rotate-data-v-13a5beb4{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotate-data-v-13a5beb4{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}',""]),t.exports=e},"0bb1":function(t,e,i){var n=i("ed9b");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("30b2922e",n,!0,{sourceMap:!1,shadowMode:!1})},1303:function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a9e3");var n=i("8f7f"),r={name:"lime-painter-text",mixins:[(0,n.children)("painter")],props:{css:[String,Object],text:[String,Number],replace:Object},data:function(){return{type:"text",el:{css:{},text:null}}}};e.default=r},"163e":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("l-painter",{attrs:{css:"width: 600rpx;height: 960rpx;",isCanvasToTempFilePath:!0,"custom-style":"position: fixed; left: 200%"},on:{success:function(e){arguments[0]=e=t.$handleEvent(e),t.handleSuccess.apply(void 0,arguments)}}},[i("l-painter-image",{attrs:{src:t.config.poster,css:"position:absolute; width: 600rpx;height: 960rpx;object-fit: cover; border-radius: 20rpx;"}}),i("l-painter-view",{attrs:{css:"position:absolute;background-color: #ffffff;width:100%;height: 240rpx;border-radius: 14rpx; bottom: 0;left: 0;padding-top: 30rpx;"}},[i("l-painter-view",{attrs:{css:"width: 330rpx; display: inline-block;padding-left: 30rpx;"}},[i("l-painter-view",[i("l-painter-image",{attrs:{src:t.config.avatar,css:"width: 80rpx; height: 80rpx; border-radius: 50%;"}}),i("l-painter-text",{attrs:{text:t.config.nickname,css:"margin-top: 10rpx; margin-left: 20rpx; color: #333333; font-size: 34rpx;line-clamp:1;font-weight: bold;width:220rpx;"}})],1),i("l-painter-view",{attrs:{css:"margin-top: 30rpx;line-height: 34rpx;"}},[i("l-painter-text",{attrs:{text:"邀请你一起来赚大钱",css:"color: #333333; font-size: 28rpx;"}})],1),i("l-painter-view",{attrs:{css:"margin-top: 20rpx;"}},[i("l-painter-text",{attrs:{text:"邀请码:"+t.config.code,css:"color: #FF2C3C; font-size: 28rpx;"}})],1)],1),i("l-painter-view",{attrs:{css:"display: inline-block;margin-top:10rpx;"}},[i("l-painter-view",{attrs:{css:"padding-left: 30rpx;"}},[i("l-painter-qrcode",{attrs:{css:"width: 180rpx; height: 180rpx;",text:t.config.link}})],1)],1)],1)],1)],1)},r=[]},"184f":function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a9e3");var r=n(i("2969")),a=n(i("bdcd")),o=n(i("82ff")),s=n(i("24cb")),d=n(i("4bd6")),c={name:"share-poster",components:{lPainter:r.default,lPainterImage:a.default,lPainterText:o.default,lPainterView:s.default,lPainterQrcode:d.default},props:{config:{type:Object,default:function(){return{}}},goodsId:{type:[Number,String],default:""},qrcode:{type:[String],default:""}},data:function(){return{}},methods:{handleSuccess:function(t){this.$emit("success",t)}}};e.default=c},"1fcb":function(t,e,i){"use strict";var n=i("90f9"),r=i.n(n);r.a},"24cb":function(t,e,i){"use strict";i.r(e);var n=i("4e8c"),r=i("ce67");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"1328a9e4",null,!1,n["a"],void 0);e["default"]=s.exports},"265b":function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("8f7f"),r={name:"lime-painter-image",mixins:[(0,n.children)("painter")],props:{css:[String,Object],src:String},data:function(){return{type:"image",el:{css:{},src:null}}}};e.default=r},"26b1":function(t,e,i){"use strict";var n=i("c891"),r=i.n(n);r.a},2969:function(t,e,i){"use strict";i.r(e);var n=i("3329"),r=i("ee1e");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);i("75d1");var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"64f1d435",null,!1,n["a"],void 0);e["default"]=s.exports},3329:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.canvasId&&t.size?i("v-uni-view",{staticClass:"lime-painter",style:t.size+t.customStyle},[t.use2dCanvas?i("v-uni-canvas",{staticClass:"lime-painter__canvas",style:t.size,attrs:{id:t.canvasId,type:"2d"}}):i("v-uni-canvas",{staticClass:"lime-painter__canvas",style:t.size,attrs:{"canvas-id":t.canvasId,id:t.canvasId,width:t.boardWidth*t.dpr,height:t.boardHeight*t.dpr}}),t._t("default")],2):t._e()},r=[]},"348e":function(t,e,i){"use strict";i.r(e);var n=i("163e"),r=i("059f");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"69a9857b",null,!1,n["a"],void 0);e["default"]=s.exports},"4ad4":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={invitePoster:i("348e").default,loadingView:i("dd2a").default},r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"pages"},[i("v-uni-view",{staticClass:"invite-fans column column-center"},[i("v-uni-image",{staticClass:"poster",attrs:{src:t.path,mode:"widthFix"}}),t.showPoster?i("invite-poster",{attrs:{config:{avatar:t.userInfo.avatar,nickname:t.userInfo.nickname,code:t.inviteCode,link:t.link,qrCode:t.qrCode,poster:t.poster}},on:{success:function(e){arguments[0]=e=t.$handleEvent(e),t.handleSuccess.apply(void 0,arguments)}}}):t._e(),i("v-uni-view",{staticClass:"bg-white footer flex1"},[i("v-uni-view",{staticStyle:{"margin-bottom":"40rpx"}},[i("v-uni-view",{staticClass:"mb10 sm lighter"},[t._v("我的邀请码")]),i("v-uni-view",{staticClass:"row row-between"},[i("v-uni-view",{staticClass:"font-size-44"},[t._v(t._s(t.inviteCode))]),i("v-uni-view",{staticClass:"sm mr30 copy-btn",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$copy(t.inviteCode||"")}}},[t._v("点击复制")])],1)],1),i("v-uni-button",{staticClass:"save-btn br60",attrs:{size:"lg"}},[t._v("长按保存到相册")])],1)],1),i("loading-view",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}]})],1)},a=[]},"4bd6":function(t,e,i){"use strict";i.r(e);var n=i("f80e"),r=i("a0b4");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"70de87fc",null,!1,n["a"],void 0);e["default"]=s.exports},"4e8c":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",[this._t("default")],2)},r=[]},"647b":function(t,e,i){"use strict";i.r(e);var n=i("6779"),r=i("68fa");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);i("1fcb");var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"13a5beb4",null,!1,n["a"],void 0);e["default"]=s.exports},6779:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{class:"loading "+(t.vertical?"loading--vertical":"")},[i("v-uni-view",{class:"loading__spinner loading__spinner--"+t.type,style:{color:t.color,width:t.size+"rpx",height:t.size+"rpx"}},t._l(t.array12,(function(e,n){return"spinner"===t.type?i("v-uni-view",{key:n,staticClass:"loading__dot"}):t._e()})),1),i("v-uni-view",{staticClass:"loading__text",style:{"font-size":t.textSize+"rpx",color:t.color}},[t._t("default")],2)],1)},r=[]},"68be":function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a9e3");var n={data:function(){return{}},props:{type:{type:String,default:"fixed"},backgroundColor:{type:String,default:"#fff"},color:{type:String},size:{type:Number,default:40}},methods:{}};e.default=n},"68fa":function(t,e,i){"use strict";i.r(e);var n=i("08cb"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},"6c57":function(t,e,i){var n=i("23e7"),r=i("da84");n({global:!0,forced:r.globalThis!==r},{globalThis:r})},"6cd1":function(t,e,i){(function(n){var r,a,o,s=i("7037").default;i("6c57"),i("d3b7"),i("a4d3"),i("e01a"),i("d28b"),i("3ca3"),i("ddb0"),i("d9e2"),i("d401"),i("14d9"),i("ac1f"),i("00b4"),i("acd8"),i("5319"),i("e9c4"),i("466d"),i("2ca0"),i("c975"),i("498a"),i("baa5"),i("7a82"),i("159b"),i("b64b"),i("d81d"),i("caad"),i("2532"),i("13d5"),i("fb6a"),i("cb29"),i("4de4"),i("07ac"),function(i,n){"object"==s(e)&&"undefined"!=typeof t?n(e):(a=[e],r=n,o="function"===typeof r?r.apply(e,a):r,void 0===o||(t.exports=o))}(0,(function(t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e,i=function(){return(i=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{d(n.next(t))}catch(t){a(t)}}function s(t){try{d(n.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}d((n=n.apply(t,e||[])).next())}))}function a(t,e){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!((r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var o={upx2px:function(t){return window.innerWidth/750*t},getSystemInfoSync:function(){return{screenWidth:window.innerWidth}},getImageInfo:function(t){var e=t.src,i=t.success,n=t.fail,r=new Image;r.onload=function(){i({width:this.naturalWidth,height:this.naturalHeight,path:this.src,src:e})},r.onerror=n,r.src=e}},d="object"==("undefined"===typeof swan?"undefined":s(swan))?"mp-baidu":"object"==("undefined"===typeof tt?"undefined":s(tt))?"mp-toutao":"object"==("undefined"===typeof plus?"undefined":s(plus))?"plus":"object"==("undefined"===typeof window?"undefined":s(window))?"undefined"==typeof uni||"undefined"!=typeof uni&&!(null===uni||void 0===uni?void 0:uni.addInterceptor)?"web":"h5":"mp-weixin",c="mp-weixin"==d?wx:"mp-toutao"==d?tt:"undefined"!=typeof uni?uni.upx2px?uni:Object.assign(uni,o):"undefined"!=typeof window?o:uni;if(!c.upx2px){var u=(null!==(e=c.getSystemInfoSync().screenWidth)&&void 0!==e?e:375)/750;c.upx2px=function(t){return u*t}}function l(t){return/^-?\d+(\.\d+)?$/.test(t)}function f(t,e,i){if("number"==typeof t)return t;if(l(t))return 1*t;if("string"==typeof t){var n=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g.exec(t);if(!t||!n)return 0;var r=n[3];t=parseFloat(t);var a=0;return"rpx"===r?a=c.upx2px(t):"px"===r?a=1*t:"%"===r&&e?a=t*f(e)/100:"em"===r&&e&&(a=t*f(e||14)),i?1*a.toFixed(2):Math.round(a)}return 0}function h(t){var e=this;return new Promise((function(i,o){return r(e,void 0,void 0,(function(){var e,r;return a(this,(function(a){switch(a.label){case 0:if(e=t,"plus"!=d&&!/^mp/.test(d)||!/data:image\/(\w+);base64,(.*)/.test(t))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,(s=t,new Promise((function(t,e){var i=/data:image\/(\w+);base64,(.*)/.exec(s)||[],r=i[1];if(i[2],/^mp/.test(d)){var a=c.getFileSystemManager();r||(n.error("ERROR_BASE64SRC_PARSE"),e(new Error("ERROR_BASE64SRC_PARSE")));var o=(new Date).getTime(),u=c.env.USER_DATA_PATH+"/"+o+"."+r;a.writeFile({filePath:u,data:s.replace(/^data:\S+\/\S+;base64,/,""),encoding:"base64",success:function(){t(u)},fail:function(t){n.error("获取base64图片失败",JSON.stringify(t)),e(t)}})}else if("plus"!=d)e(new Error("not support"));else{var l=s.split(",")[0].match(/data\:\S+\/(\S+);/);l?l=l[1]:e(new Error("base64 error"));var f=Date.now()+"."+l,h="_doc/uniapp_temp/"+f;if(!function(t,e){for(var i=t.split("."),n=e.split("."),r=!1,a=0;a<n.length;a++){var o=i[a]-n[a];if(0!==o){r=o>0;break}}return r}("Android"===plus.os.name?"1.9.9.80627":"1.9.9.80472",plus.runtime.innerVersion))return void plus.io.resolveLocalFileSystemURL("_doc",(function(i){i.getDirectory("uniapp_temp",{create:!0,exclusive:!1},(function(i){i.getFile(f,{create:!0,exclusive:!1},(function(i){i.createWriter((function(i){var n;i.onwrite=function(){t(h)},i.onerror=e,i.seek(0),i.writeAsBinary((n=s.split(","))[n.length-1])}),e)}),e)}),e)}),e);var v=new plus.nativeObj.Bitmap(f);v.loadBase64Data(s,(function(){v.save(h,{},(function(){v.clear(),t(h)}),(function(t){v.clear(),e(t)}))}),(function(t){v.clear(),e(t)}))}})))];case 2:return e=a.sent(),[3,4];case 3:return r=a.sent(),n.log(r),[3,4];case 4:return c.getImageInfo({src:e,success:function(t){return i(t)},fail:function(t){return o(t)}}),[2]}var s}))}))}))}function v(t){for(var e=[],i=[],n=0,r=t.substring(0,t.length-1).split("%,");n<r.length;n++){var a=r[n];e.push(a.substring(0,a.lastIndexOf(" ")).trim()),i.push(a.substring(a.lastIndexOf(" "),a.length)/100)}return{colors:e,percents:i}}function p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}var b=0,m={left:null,top:null,width:null,height:null},w=function(){function t(t,e,i,n){var r=this;p(this,"id",b++),p(this,"style",{left:null,top:null,width:null,height:null}),p(this,"computedStyle",{}),p(this,"children",{}),p(this,"layoutBox",g({},m)),p(this,"contentSize",g({},m,{maxLineHeight:0})),p(this,"clientSize",g({},m)),p(this,"borderSize",g({},m)),p(this,"offsetSize",g({},m)),this.ctx=n,this.root=i,e&&(this.parent=e),this.name=t.name||t.type,this.attributes=this.getAttributes(t);var a=this.getComputedStyle(t,null==e?void 0:e.computedStyle);this.isAbsolute="absolute"==a.position,this.isFixed="fixed"==a.position,Object.keys(a).forEach((function(t){Object.defineProperty(r.style,t,{configurable:!0,enumerable:!0,get:function(){return a[t]},set:function(e){a[t]=e}})}));var o={contentSize:g({},this.contentSize),clientSize:g({},this.clientSize),borderSize:g({},this.borderSize),offsetSize:g({},this.offsetSize)};Object.keys(o).forEach((function(t){Object.keys(r[t]).forEach((function(e){Object.defineProperty(r[t],e,{configurable:!0,enumerable:!0,get:function(){return o[t][e]},set:function(i){o[t][e]=i}})}))})),this.computedStyle=this.style}var e=t.prototype;return e.add=function(t){t.parent=this,this.children[t.id]=t},e.remove=function(t){var e=this;t?this.children[t.id]&&(t.remove(),delete this.children[t.id]):Object.keys(this.children).forEach((function(t){e.children[t].remove(),delete e.children[t]}))},e.getChildren=function(){var t=this;return Object.keys(this.children).map((function(e){return t.children[e]}))},e.getComputedStyle=function(t,e){var i=["color","fontSize","lineHeight","verticalAlign","fontWeight","textAlign"],n=t.css,r=void 0===n?{}:n,a=t.type,o=void 0===a?"view":a,d={};if(e)for(var c=0;c<i.length;c++){var u=i[c];(r[u]||e[u])&&(r[u]=r[u]||e[u])}for(var h=function(){var t=p[v],e=r[t];if(/^(box)?shadow$/i.test(t)){var i=e.split(" ").map((function(t){return/^\d/.test(t)?f(t):t}));return d.boxShadow=i,"continue"}if(/^border/i.test(t)&&!/radius$/i.test(t)){var n,a=t.match(/^border([BTRLa-z]+)?/)[0],c=t.match(/[W|S|C][a-z]+/),u=e.replace(/([\(,])\s+|\s+([\),])/g,"$1$2").split(" ").map((function(t){return/^\d/.test(t)?f(t,"",!0):t}));return d[a]=((n={})[a+"Width"]=(l(u[0])?u[0]:0)||1,n[a+"Style"]=u[1]||"solid",n[a+"Color"]=u[2]||"black",n),1==u.length&&c&&(d[a][a+c[0]]=u[0]),"continue"}if(/^background(color)?$/i.test(t))return d.backgroundColor=e,"continue";if(/^objectPosition$/i.test(t))return d[t]=e.split(" "),"continue";if(/padding|margin|radius/i.test(t)){var h=/radius$/i.test(t),g=h?"borderRadius":t.match(/[a-z]+/)[0],b=[0,0,0,0].map((function(t,e){return h?["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"][e]:[g+"Top",g+"Right",g+"Bottom",g+"Left"][e]}));if("padding"===t||"margin"===t||/^(border)?radius$/i.test(t)){var m,w=(null==e?void 0:e.split(" ").map((function(e){return/^\d+(rpx|px)?$/.test(e)?f(e):"margin"!=t&&/auto/.test(e)?0:e}),[]))||[0],x=h?"borderRadius":t,y=w[0],S=w[1],z=w[2],k=w[3];d[x]=((m={})[b[0]]="auto"==y?0:y,m[b[1]]=l(S)?S:y,m[b[2]]="auto"==(l(z)?z:y)?0:l(z)?z:y,m[b[3]]=l(k)?k:S||y,m)}else{var _;"object"==s(d[g])||(d[g]=((_={})[b[0]]=d[g]||0,_[b[1]]=d[g]||0,_[b[2]]=d[g]||0,_[b[3]]=d[g]||0,_)),d[g][t]="margin"==g&&"auto"==e||/%$/.test(e)?e:f(e)}return"continue"}if(/^transform$/i.test(t))return d[t]={},e.replace(/([a-zA-Z]+)\(([0-9,-\.%rpxdeg\s]+)\)/g,(function(e,i,n){var a=n.split(",").map((function(t){return t.replace(/(^\s*)|(\s*$)/g,"")})),o=function(t,e){return t.includes("deg")?1*t:e&&!/%$/.test(e)?f(t,e):t};i.includes("matrix")?d[t][i]=a.map((function(t){return 1*t})):i.includes("rotate")?d[t][i]=1*n.match(/^-?\d+(\.\d+)?/)[0]:/[X, Y]/.test(i)?d[t][i]=/[X]/.test(i)?o(a[0],r.width):o(a[0],r.height):(d[t][i+"X"]=o(a[0],r.width),d[t][i+"Y"]=o(a[1]||a[0],r.height))})),"continue";/^left|top$/i.test(t)&&!["absolute","fixed"].includes(r.position)?d[t]=0:d[t]=/^[\d\.]+(px|rpx)?$/.test(e)?f(e):/em$/.test(e)&&"text"==o?f(e,r.fontSize):e},v=0,p=Object.keys(r);v<p.length;v++)h();return d},e.setPosition=function(t,e){var i={left:"width",top:"height",right:"width",bottom:"height"};Object.keys(i).forEach((function(n){["right","bottom"].includes(n)&&void 0!==t.style[n]?t.style["right"==n?"left":"top"]=e[i[n]]-t.offsetSize[i[n]]-f(t.style[n],e[i[n]]):t.style[n]=f(t.style[n],e[i[n]])}))},e.getAttributes=function(t){var e=t.attributes||{};return(null!=t&&t.url||null!=t&&t.src)&&(e.src=e.src||t.url||(null==t?void 0:t.src)),t.replace&&(e.replace=t.replace),null!=t&&t.text&&(e.text=t.text),e},e.getOffsetSize=function(t,e,i){void 0===i&&(i="offsetSize");var n=e||{},r=n.margin,a=(r=void 0===r?{}:r).marginLeft,o=void 0===a?0:a,s=r.marginTop,d=void 0===s?0:s,c=r.marginRight,u=void 0===c?0:c,l=r.marginBottom,f=void 0===l?0:l,h=n.padding,v=(h=void 0===h?{}:h).paddingLeft,p=void 0===v?0:v,g=h.paddingTop,b=void 0===g?0:g,m=h.paddingRight,w=void 0===m?0:m,x=h.paddingBottom,y=void 0===x?0:x,S=n.border,z=(S=void 0===S?{}:S).borderWidth,k=void 0===z?0:z,_=n.borderTop,O=(_=void 0===_?{}:_).borderTopWidth,P=void 0===O?k:O,M=n.borderBottom,R=(M=void 0===M?{}:M).borderBottomWidth,B=void 0===R?k:R,C=n.borderRight,T=(C=void 0===C?{}:C).borderRightWidth,j=void 0===T?k:T,I=n.borderLeft,W=(I=void 0===I?{}:I).borderLeftWidth,L=void 0===W?k:W;return"contentSize"==i&&(this[i].left=t.left+o+p+L,this[i].top=t.top+d+b+P,this[i].width=t.width,this[i].height=t.height),"clientSize"==i&&(this[i].left=t.left+o+L,this[i].top=t.top+d+P,this[i].width=t.width+p+w,this[i].height=t.height+b+y),"borderSize"==i&&(this[i].left=t.left+o+L/2,this[i].top=t.top+d+P/2,this[i].width=t.width+p+w+L/2+j/2,this[i].height=t.height+b+y+B/2+P/2),"offsetSize"==i&&(this[i].left=t.left,this[i].top=t.top,this[i].width=t.width+p+w+L+j+o+u,this[i].height=t.height+b+y+B+P+f+d),this[i]},e.layoutBoxUpdate=function(t,e,i,n){if(void 0===i&&(i=""),"border-box"==(null==e?void 0:e.boxSizing)){var r=e||{},a=r.border,o=(a=void 0===a?{}:a).borderWidth,s=void 0===o?0:o,d=r.borderTop,c=(d=void 0===d?{}:d).borderTopWidth,u=void 0===c?s:c,l=r.borderBottom,f=(l=void 0===l?{}:l).borderBottomWidth,h=void 0===f?s:f,v=r.borderRight,p=(v=void 0===v?{}:v).borderRightWidth,g=void 0===p?s:p,b=r.borderLeft,m=(b=void 0===b?{}:b).borderLeftWidth,w=void 0===m?s:m,x=r.padding,y=(x=void 0===x?{}:x).paddingTop,S=void 0===y?0:y,z=x.paddingRight,k=void 0===z?0:z,_=x.paddingBottom,O=void 0===_?0:_,P=x.paddingLeft,M=void 0===P?0:P;"width"==i&&(t.width-=M+k+g+w),"height"!=i||n||(t.height-=S+O+u+h)}this.layoutBox.contentSize=this.getOffsetSize(t,e,"contentSize"),this.layoutBox.clientSize=this.getOffsetSize(t,e,"clientSize"),this.layoutBox.borderSize=this.getOffsetSize(t,e,"borderSize"),this.layoutBox.offsetSize=this.getOffsetSize(t,e,"offsetSize"),this.layoutBox=Object.assign({},this.layoutBox,this.layoutBox.borderSize)},e.getBoxPosition=function(t){var e=this.computedStyle,i=this.getChildren(),n=e.verticalAlign,r=e.left,a=void 0===r?0:r,o=e.top,s=void 0===o?0:o,d=g({},this.contentSize,{left:a,top:s}),c=this.contentSize.top-this.offsetSize.top,u=this.contentSize.left-this.offsetSize.left,l=0;if("bottom"==n&&this.contentSize.maxLineHeight?l=this.contentSize.maxLineHeight-this.contentSize.height:"middle"==n&&this.contentSize.maxLineHeight&&(l=(this.contentSize.maxLineHeight-this.contentSize.height)/2),d.top+=l,i.length){a+=u,s+=c;for(var f=null,h=null,v=!1,p=0;p<i.length;p++){var b=i[p];if(b.isAbsolute||b.isFixed)b.isAbsolute?(b.setPosition(b,d),b.style.left+=a,b.style.top+=s,b.getBoxPosition()):(b.setPosition(b,this.root),b.getBoxPosition());else if(0==p)b.style.left+=a,b.style.top+=s,b.getBoxPosition(),f=b,h=b;else{var m,w,x,y;(null==(m=h)?void 0:m.offsetSize.height)<(null==(w=f)?void 0:w.offsetSize.height)&&(h=f);var S,z,k,_,O=(null==(x=f)?void 0:x.offsetSize.left)+(null==(y=f)?void 0:y.offsetSize.width)+b.offsetSize.width>d.left+d.width+u;if(this.getBoxState(f,b)||O)b.style.left+=a,(null==(S=f)?void 0:S.offsetSize.height)>=(null==(z=h)?void 0:z.offsetSize.height)?b.style.top+=f.offsetSize.top+f.offsetSize.height||0:b.style.top+=(null==(k=h)?void 0:k.offsetSize.top)+(null==(_=h)?void 0:_.offsetSize.height)||0,b.getBoxPosition(),f=b,h=b,v=!0;else b.style.left+=f.offsetSize.left+f.offsetSize.width,b.style.top+=v?f.offsetSize.top:s,b.getBoxPosition(),f=b}}this.layoutBoxUpdate(d,e)}else this.layoutBoxUpdate(d,e);return this.layoutBox},e.setMaxLineHeight=function(t,e,i){for(var n=t;n>=0&&!e[n].contentSize.maxLineHeight;)e[n].contentSize.maxLineHeight=i,n--},e.getBoxState=function(t,e){return"view"==e.name&&"inline-block"!==e.style.display||"view"==(null==t?void 0:t.name)&&"inline-block"!==(null==t?void 0:t.style.display)||"block"==e.style.display||"block"==(null==t?void 0:t.style.display)},e.getBoxHieght=function(){var t,e=this,i=this.name,n=this.computedStyle,r=this.attributes,a=this.parent,o=this.getChildren(),s=n.top,d=n.bottom,c=n.height,u=void 0===c?0:c,l=n.fontSize,h=void 0===l?14:l,v=n.position,p=n.lineHeight,b=void 0===p?"1.4em":p;n.lineClamp;var m=g({},this.contentSize);if("image"==i&&null==u){var w=r.width,x=r.height;r.mode,m.height=Math.round(m.width*x/w)||0,this.layoutBoxUpdate(m,n,"height")}else if(u)if(o.length){var y=null,S=0;o.forEach((function(t,i){var n,r,a=i==o.length-1;t.getBoxHieght();var s=(null==(n=y)?void 0:n.offsetSize.left)+(null==(r=y)?void 0:r.offsetSize.width)+t.offsetSize.width>m.left+m.width,d=e.getBoxState(y,t);if(s||d){if(s){for(var c=i-1;c>=0&&!o[c].contentSize.maxLineHeight;)S<o[c].contentSize.height&&(S=o[c].contentSize.height),c--;e.setMaxLineHeight(i-1,o,S),S=0}}else if(a){for(var u=i;u>=0&&!o[u].contentSize.maxLineHeight;)S<o[u].contentSize.height&&(S=o[u].contentSize.height),u--;e.setMaxLineHeight(i,o,S),S=0}y=t}))}else this.layoutBoxUpdate(m,n,"height");else{var z=0;if(null!==s&&(this.isAbsolute||this.isFixed&&a.contentSize.height)){var k="absolute"==v?a.contentSize.height:this.root.height;z=k-(/%$/.test(s)?f(s,k):s)-(/%$/.test(d)?f(d,k):d)}if("text"==i)b=f(b,h),m.height=z||this.attributes.lines*b,this.layoutBoxUpdate(m,n,"height",!0);else if(o.length){var _=0,O=null,P=0;m.height=o.reduce((function(t,i,n){var r=n==o.length-1;if(i.isAbsolute||i.isFixed)return r?t+_:t;i.getBoxHieght();var a=e.getBoxState(O,i),s=P+i.offsetSize.width>m.width;if(s||a){var d,c,u=0;return s||O&&("view"!==(null==(d=O)?void 0:d.name)||"inline-block"==(null==(c=O)?void 0:c.style.display))?(r&&(e.setMaxLineHeight(n-1,o,_),_+=i.offsetSize.height),u=t+_,_=i.offsetSize.height,P=i.offsetSize.width,O=i,u):(P=0,_=0,t+i.offsetSize.height)}return P+=i.offsetSize.width,_=Math.max(_,i.offsetSize.height)||0,r?(e.setMaxLineHeight(n,o,_),t+_):(O=i,t)}),0),z&&(m.height=z),this.layoutBoxUpdate(m,n)}else z&&(m.height=z),this.layoutBoxUpdate(m,n,"height")}if(n.borderRadius&&null!=(t=this.borderSize)&&t.width)for(var M in n.borderRadius)Object.hasOwnProperty.call(n.borderRadius,M)&&(n.borderRadius[M]=f(n.borderRadius[M],this.borderSize.width));return this.layoutBox},e.contrastSize=function(t,e,i){var n=t;return i&&(n=Math.min(n,i)),e&&(n=Math.max(n,e)),n},e.measureText=function(t,e){var i=this.ctx.measureText(t);return{width:i.width,fontHeight:(i.actualBoundingBoxAscent||.7*e)+1}},e.getBoxWidth=function(){var t,e=this,i=this.name,n=this.computedStyle,r=this.attributes,a=this.parent,o=void 0===a?{}:a,s=this.ctx,d=this.getChildren(),c=n.left,u=void 0===c?0:c;n.top;var l=n.right,h=n.width,v=void 0===h?0:h,p=n.minWidth,g=n.maxWidth,b=n.height,m=void 0===b?0:b,w=n.fontSize,x=void 0===w?14:w,y=n.fontWeight,S=n.fontFamily,z=n.textStyle,k=n.position,_=n.display,O=n.lineClamp,P=n.padding,M=void 0===P?{}:P,R=n.margin,B=void 0===R?{}:R,C=n.border,T=(C=void 0===C?{}:C).borderWidth,j=void 0===T?0:T,I=n.borderRight,W=(I=void 0===I?{}:I).borderRightWidth,L=void 0===W?j:W,$=n.borderLeft,F=($=void 0===$?{}:$).borderLeftWidth,A=void 0===F?j:F;if(/%$/.test(v)&&o.contentSize.width&&(v=f(v,o.contentSize.width,!0)),/%$/.test(m)&&o.contentSize.height&&(m=f(m,o.contentSize.height)),/%$/.test(p)&&o.contentSize.width&&(p=f(p,o.contentSize.width,!0)),/%$/.test(g)&&o.contentSize.width&&(g=f(g,o.contentSize.width,!0)),n.padding&&null!=(t=o.contentSize)&&t.width)for(var H in n.padding)Object.hasOwnProperty.call(n.padding,H)&&(n.padding[H]=f(n.padding[H],o.contentSize.width));var E=M.paddingRight,N=void 0===E?0:E,U=M.paddingLeft,D=void 0===U?0:U;if(n.margin&&[n.margin.marginLeft,n.margin.marginRight].includes("auto"))if(v){var q=o.contentSize.width-v-N-D-A-L||0;n.margin.marginLeft==n.margin.marginRight?n.margin.marginLeft=n.margin.marginRight=q/2:"auto"==n.margin.marginLeft?n.margin.marginLeft=q:n.margin.marginRight=q}else n.margin.marginLeft=n.margin.marginRight=0;var J=B.marginRight,V=void 0===J?0:J,X=B.marginLeft,G={width:v,height:m,left:0,top:0},Q=D+N+A+L+(void 0===X?0:X)+V;if("text"==i&&!this.attributes.widths){var Y=r.text||"";s.save(),s.setFonts({fontFamily:S,fontSize:x,fontWeight:y,textStyle:z}),Y.split("\n").map((function(t){var i=t.split("").map((function(t){return e.measureText(t,x).width}));e.attributes.fontHeight=e.measureText(t,x).fontHeight,e.attributes.widths||(e.attributes.widths=[]),e.attributes.widths.push({widths:i,total:i.reduce((function(t,e){return t+e}),0)})})),s.restore()}if("image"==i&&null==v){var K=r.width,Z=r.height;G.width=this.contrastSize(Math.round(K*m/Z)||0,p,g),this.layoutBoxUpdate(G,n,"width")}else if(v)d.length?(this.layoutBoxUpdate(G,n,"width"),d.forEach((function(t){t.getBoxWidth()}))):this.layoutBoxUpdate(G,n,"width");else{var tt=0;if((this.isAbsolute||this.isFixed)&&o.contentSize.width){var et="absolute"==k?o.contentSize.width:this.root.width;tt=et-(/%$/.test(u)?f(u,et):u)-(/%$/.test(l)?f(l,et):l)}if("text"==i){var it=this.attributes.widths,nt=Math.max.apply(Math,it.map((function(t){return t.total})));o&&o.contentSize.width>0&&(nt>o.contentSize.width||"block"==_)&&!this.isAbsolute&&!this.isFixed&&(nt=o.contentSize.width-Q),G.width=tt||this.contrastSize(nt,p,g),this.layoutBoxUpdate(G,n,"width")}else if("view"!=i||!o||"inline-block"===_||this.isAbsolute||this.isFixed)if(d.length){for(var rt=0,at=null,ot=0;d.length>ot;){var st=d[ot],dt=ot==d.length-1,ct=this.getBoxState(at,st);if(!st.isFixed&&!st.isAbsolute)if(!at||ct){var ut=st.getBoxWidth();rt=Math.max(rt,ut.width)||0,at=st}else if(at.offsetSize.left+at.offsetSize.width+st.offsetSize.width<o.contentSize.width&&ot!==d.length-1)rt+=st.getBoxWidth().width,at=st;else{var lt=st.getBoxWidth();dt?rt+=lt.width:rt=o.contentSize.width,at=null}ot++}G.width=tt||this.contrastSize(Math.ceil(rt),p,g),d.forEach((function(t){"block"!=t.style.display||"text"!=t.name||t.isFixed||t.isAbsolute||t.style.width||(t.style.width=G.width,t.getBoxWidth())})),this.layoutBoxUpdate(G,n,"width")}else G.width=tt,this.layoutBoxUpdate(G,n,"width");else G.width=this.contrastSize(o.contentSize.width-Q,p,g),this.layoutBoxUpdate(G,n),d.length&&d.forEach((function(t){t.getBoxWidth()}))}if("text"==i&&!this.attributes.lines){var ft=this.attributes.widths.length;this.attributes.widths.forEach((function(t){return t.widths.reduce((function(t,e,i){return t+e>G.width?(ft++,e):t+e}),0)})),ft=O&&ft>O?O:ft,this.attributes.lines=ft}return this.layoutBox},e.layout=function(){return this.getBoxWidth(),this.getBoxHieght(),this.getBoxPosition(),this.offsetSize},t}(),x=function(){var t,e,i,r,a,o,s=[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],d=[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],c=[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],u=[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],l=[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],f=[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],h=[],v=[],p=[],g=[],b=[],m=2;function w(t,e){var i;t>e&&(i=t,t=e,e=i),i=e,i*=e,i+=e,i>>=1,g[i+=t]=1}function x(t,i){var n;for(p[t+e*i]=1,n=-2;n<2;n++)p[t+n+e*(i-2)]=1,p[t-2+e*(i+n+1)]=1,p[t+2+e*(i+n)]=1,p[t+n+1+e*(i+2)]=1;for(n=0;n<2;n++)w(t-1,i+n),w(t+1,i-n),w(t-n,i-1),w(t+n,i+1)}function y(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t}var S=[];function z(t,e,i,n){var r,a,o;for(r=0;r<n;r++)h[i+r]=0;for(r=0;r<e;r++){if(255!=(o=l[h[t+r]^h[i]]))for(a=1;a<n;a++)h[i+a-1]=h[i+a]^f[y(o+S[n-a])];else for(a=i;a<i+n;a++)h[a]=h[a+1];h[i+n-1]=255==o?0:f[y(o+S[0])]}}function k(t,e){var i;return t>e&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,g[i+=t]}function _(t){var i,n,r,a;switch(t){case 0:for(n=0;n<e;n++)for(i=0;i<e;i++)i+n&1||k(i,n)||(p[i+n*e]^=1);break;case 1:for(n=0;n<e;n++)for(i=0;i<e;i++)1&n||k(i,n)||(p[i+n*e]^=1);break;case 2:for(n=0;n<e;n++)for(r=0,i=0;i<e;i++,r++)3==r&&(r=0),r||k(i,n)||(p[i+n*e]^=1);break;case 3:for(a=0,n=0;n<e;n++,a++)for(3==a&&(a=0),r=a,i=0;i<e;i++,r++)3==r&&(r=0),r||k(i,n)||(p[i+n*e]^=1);break;case 4:for(n=0;n<e;n++)for(r=0,a=n>>1&1,i=0;i<e;i++,r++)3==r&&(r=0,a=!a),a||k(i,n)||(p[i+n*e]^=1);break;case 5:for(a=0,n=0;n<e;n++,a++)for(3==a&&(a=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+!(!r|!a)||k(i,n)||(p[i+n*e]^=1);break;case 6:for(a=0,n=0;n<e;n++,a++)for(3==a&&(a=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+(r&&r==a)&1||k(i,n)||(p[i+n*e]^=1);break;case 7:for(a=0,n=0;n<e;n++,a++)for(3==a&&(a=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(r&&r==a)+(i+n&1)&1||k(i,n)||(p[i+n*e]^=1)}}function O(t){var e,i=0;for(e=0;e<=t;e++)b[e]>=5&&(i+=3+b[e]-5);for(e=3;e<t-1;e+=2)b[e-2]==b[e+2]&&b[e+2]==b[e-1]&&b[e-1]==b[e+1]&&3*b[e-1]==b[e]&&(0==b[e-3]||e+3>t||3*b[e-3]>=4*b[e]||3*b[e+3]>=4*b[e])&&(i+=40);return i}function P(){var t,i,n,r,a,o=0,s=0;for(i=0;i<e-1;i++)for(t=0;t<e-1;t++)(p[t+e*i]&&p[t+1+e*i]&&p[t+e*(i+1)]&&p[t+1+e*(i+1)]||!(p[t+e*i]||p[t+1+e*i]||p[t+e*(i+1)]||p[t+1+e*(i+1)]))&&(o+=3);for(i=0;i<e;i++){for(b[0]=0,n=r=t=0;t<e;t++)(a=p[t+e*i])==r?b[n]++:b[++n]=1,s+=(r=a)?1:-1;o+=O(n)}s<0&&(s=-s);var d=s,c=0;for(d+=d<<2,d<<=1;d>e*e;)d-=e*e,c++;for(o+=10*c,t=0;t<e;t++){for(b[0]=0,n=r=i=0;i<e;i++)(a=p[t+e*i])==r?b[n]++:b[++n]=1,r=a;o+=O(n)}return o}var M=null;return{api:{get ecclevel(){return m},set ecclevel(t){m=t},get size(){return _size},set size(t){_size=t},get canvas(){return M},set canvas(t){M=t},getFrame:function(n){return function(n){var b,O,M,R,B,C,T,j;R=n.length,t=0;do{if(t++,M=4*(m-1)+16*(t-1),i=u[M++],r=u[M++],a=u[M++],o=u[M],R<=(M=a*(i+r)+r-3+(t<=9)))break}while(t<40);for(e=17+4*t,B=a+(a+o)*(i+r)+r,R=0;R<B;R++)v[R]=0;for(h=n.slice(0),R=0;R<e*e;R++)p[R]=0;for(R=0;R<(e*(e+1)+1)/2;R++)g[R]=0;for(R=0;R<3;R++){for(M=0,O=0,1==R&&(M=e-7),2==R&&(O=e-7),p[O+3+e*(M+3)]=1,b=0;b<6;b++)p[O+b+e*M]=1,p[O+e*(M+b+1)]=1,p[O+6+e*(M+b)]=1,p[O+b+1+e*(M+6)]=1;for(b=1;b<5;b++)w(O+b,M+1),w(O+1,M+b+1),w(O+5,M+b),w(O+b+1,M+5);for(b=2;b<4;b++)p[O+b+e*(M+2)]=1,p[O+2+e*(M+b+1)]=1,p[O+4+e*(M+b)]=1,p[O+b+1+e*(M+4)]=1}if(t>1)for(R=s[t],O=e-7;;){for(b=e-7;b>R-3&&(x(b,O),!(b<R));)b-=R;if(O<=R+9)break;x(6,O-=R),x(O,6)}for(p[8+e*(e-8)]=1,O=0;O<7;O++)w(7,O),w(e-8,O),w(7,O+e-7);for(b=0;b<8;b++)w(b,7),w(b+e-8,7),w(b,e-8);for(b=0;b<9;b++)w(b,8);for(b=0;b<8;b++)w(b+e-8,8),w(8,b);for(O=0;O<7;O++)w(8,O+e-7);for(b=0;b<e-14;b++)1&b?(w(8+b,6),w(6,8+b)):(p[8+b+6*e]=1,p[6+e*(8+b)]=1);if(t>6)for(R=d[t-7],M=17,b=0;b<6;b++)for(O=0;O<3;O++,M--)1&(M>11?t>>M-12:R>>M)?(p[5-b+e*(2-O+e-11)]=1,p[2-O+e-11+e*(5-b)]=1):(w(5-b,2-O+e-11),w(2-O+e-11,5-b));for(O=0;O<e;O++)for(b=0;b<=O;b++)p[b+e*O]&&w(b,O);for(B=h.length,C=0;C<B;C++)v[C]=h.charCodeAt(C);if(h=v.slice(0),B>=(b=a*(i+r)+r)-2&&(B=b-2,t>9&&B--),C=B,t>9){for(h[C+2]=0,h[C+3]=0;C--;)R=h[C],h[C+3]|=255&R<<4,h[C+2]=R>>4;h[2]|=255&B<<4,h[1]=B>>4,h[0]=64|B>>12}else{for(h[C+1]=0,h[C+2]=0;C--;)R=h[C],h[C+2]|=255&R<<4,h[C+1]=R>>4;h[1]|=255&B<<4,h[0]=64|B>>4}for(C=B+3-(t<10);C<b;)h[C++]=236,h[C++]=17;for(S[0]=1,C=0;C<o;C++){for(S[C+1]=1,T=C;T>0;T--)S[T]=S[T]?S[T-1]^f[y(l[S[T]]+C)]:S[T-1];S[0]=f[y(l[S[0]]+C)]}for(C=0;C<=o;C++)S[C]=l[S[C]];for(M=b,O=0,C=0;C<i;C++)z(O,a,M,o),O+=a,M+=o;for(C=0;C<r;C++)z(O,a+1,M,o),O+=a+1,M+=o;for(O=0,C=0;C<a;C++){for(T=0;T<i;T++)v[O++]=h[C+T*a];for(T=0;T<r;T++)v[O++]=h[i*a+C+T*(a+1)]}for(T=0;T<r;T++)v[O++]=h[i*a+C+T*(a+1)];for(C=0;C<o;C++)for(T=0;T<i+r;T++)v[O++]=h[b+C+T*o];for(h=v,b=O=e-1,M=B=1,j=(a+o)*(i+r)+r,C=0;C<j;C++)for(R=h[C],T=0;T<8;T++,R<<=1){128&R&&(p[b+e*O]=1);do{B?b--:(b++,M?0!=O?O--:(M=!M,6==(b-=2)&&(b--,O=9)):O!=e-1?O++:(M=!M,6==(b-=2)&&(b--,O-=8))),B=!B}while(k(b,O))}for(h=p.slice(0),R=0,O=3e4,M=0;M<8&&(_(M),(b=P())<O&&(O=b,R=M),7!=R);M++)p=h.slice(0);for(R!=M&&_(R),O=c[R+(m-1<<3)],M=0;M<8;M++,O>>=1)1&O&&(p[e-1-M+8*e]=1,M<6?p[8+e*M]=1:p[8+e*(M+1)]=1);for(M=0;M<7;M++,O>>=1)1&O&&(p[8+e*(e-7+M)]=1,M?p[6-M+8*e]=1:p[7+8*e]=1);return p}(n)},utf16to8:function(t){var e,i,n,r;for(e="",n=t.length,i=0;i<n;i++)(r=t.charCodeAt(i))>=1&&r<=127?e+=t.charAt(i):r>2047?(e+=String.fromCharCode(224|r>>12&15),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|r>>0&63)):(e+=String.fromCharCode(192|r>>6&31),e+=String.fromCharCode(128|r>>0&63));return e},draw:function(t,i,r,a,o){i.drawView(r,a);var s=i.ctx,d=r.contentSize,c=d.width,u=d.height;a.borderRadius,a.backgroundColor;var l=a.color,f=void 0===l?"#000000":l;a.border;var h=r.contentSize.left-r.borderSize.left,v=r.contentSize.top-r.borderSize.top;if(m=o||m,s){s.save(),i.setOpacity(a);var p=i.setTransform(r,a),g=p.x,b=p.y;g+=h,b+=v;var w=Math.min(c,u);t=this.utf16to8(t);var x=this.getFrame(t),y=w/e;s.setFillStyle(f);for(var S=0;S<e;S++)for(var z=0;z<e;z++)x[z*e+S]&&s.fillRect(g+y*S,b+y*z,y,y);s.restore(),i.setBorder(r,a)}else n.warn("No canvas provided to draw QR code in!")}}}}(),y=function(){function t(t,e){var n,r,a=this,o=t.id,s=t.context,c=t.canvas,u=t.pixelRatio,l=t.width,f=t.height;this.count=0,this.isDraw=!0,this.id=o,this.canvas=c,this.pixelRatio=1*u.toFixed(2),this.width=l,this.height=f,this.platform=d,this.isRate=!1,this.component=e,this.ctx=(r=this,(n=s).setFonts=function(t){var e=t.fontFamily,i=void 0===e?"sans-serif":e,a=t.fontSize,o=void 0===a?14:a,s=t.fontWeight,d=void 0===s?"normal":s,c=t.textStyle,u=void 0===c?"normal":c;"mp-toutao"==r.platform&&(d="bold"==d?"bold":"",u="italic"==u?"italic":""),n.font=u+" "+d+" "+o+"px "+i},n.draw?n:Object.assign(n,{setStrokeStyle:function(t){n.strokeStyle=t},setLineWidth:function(t){n.lineWidth=t},setLineCap:function(t){n.lineCap=t},setFillStyle:function(t){n.fillStyle=t},setFontSize:function(t){n.font=String(t)+"px sans-serif"},setGlobalAlpha:function(t){n.globalAlpha=t},setLineJoin:function(t){n.lineJoin=t},setTextAlign:function(t){n.textAlign=t},setMiterLimit:function(t){n.miterLimit=t},setShadow:function(t,e,i,r){n.shadowOffsetX=t,n.shadowOffsetY=e,n.shadowBlur=i,n.shadowColor=r},setTextBaseline:function(t){n.textBaseline=t},createCircularGradient:function(){},draw:function(){}})),this.sleep=1e3/30,this.progress=0,this.root={width:l,height:f,fontSizeRate:1};var h=i({},this.size);Object.defineProperty(this,"size",{configurable:!0,set:function(t){Object.keys(t).forEach((function(e){h[e]=t[e],a.root[e]=t[e]}))},get:function(){return h}}),this.init()}return t.prototype.init=function(){this.canvas.height&&(this.canvas.height=this.root.height*this.pixelRatio,this.canvas.width=this.root.width*this.pixelRatio,this.ctx.scale(this.pixelRatio,this.pixelRatio))},t.prototype.clear=function(){this.ctx.clearRect(0,0,this.root.width,this.root.height)},t.prototype.roundRect=function(t,e,i,n,r,a,o){if(void 0===a&&(a=!1),void 0===o&&(o=!1),!(r<0)){var s=this.ctx;if(s.beginPath(),r){var d=r||{},c=d.borderTopLeftRadius,u=void 0===c?r||0:c,l=d.borderTopRightRadius,f=void 0===l?r||0:l,h=d.borderBottomRightRadius,v=void 0===h?r||0:h,p=d.borderBottomLeftRadius,g=void 0===p?r||0:p;s.arc(t+i-v,e+n-v,v,0,.5*Math.PI),s.lineTo(t+g,e+n),s.arc(t+g,e+n-g,g,.5*Math.PI,Math.PI),s.lineTo(t,e+u),s.arc(t+u,e+u,u,Math.PI,1.5*Math.PI),s.lineTo(t+i-f,e),s.arc(t+i-f,e+f,f,1.5*Math.PI,2*Math.PI),s.lineTo(t+i,e+n-v)}else s.rect(t,e,i,n);s.closePath(),o&&s.stroke(),a&&s.fill()}},t.prototype.setTransform=function(t,e){var i=e.transform,n=e.transformOrigin,r=void 0===n?"center center":n,a=e.position,o=this.ctx,s=i||{},d=s.scaleX,c=void 0===d?1:d,u=s.scaleY,h=void 0===u?1:u,v=s.translateX,p=void 0===v?0:v,g=s.translateY,b=void 0===g?0:g,m=s.rotate,w=void 0===m?0:m,x=s.skewX,y=void 0===x?0:x,S=s.skewY,z=void 0===S?0:S,k=t.left,_=t.top,O=t.width,P=t.height;if(!["absolute","fixed"].includes(a))return{x:k,y:_,w:O,h:P};p=f(p,O)||0,b=f(b,P)||0;var M={top:f("0%",1),center:f("50%",1,!0),bottom:f("100%",1)},R={left:f("0%",1),center:f("50%",1,!0),right:f("100%",1)};r=r.split(" ").filter((function(t,e){return e<2})).reduce((function(t,e){if(/\d+/.test(e)){var i=f(e,1,!0)/(/px|rpx$/.test(e)?l(t.x)?P:O:1);return l(t.x)?Object.assign(t,{y:i}):Object.assign(t,{x:i})}return l(R[e])&&!l(t.x)?Object.assign(t,{x:R[e]}):Object.assign(t,{y:M[e]||.5})}),{}),o.scale(c,h);var B={x:O*(c>0?1:-1)*r.x+(k+p)/c,y:P*(h>0?1:-1)*r.y+(_+b)/h};return o.translate(B.x,B.y),w&&o.rotate(w*Math.PI/180),(y||z)&&o.transform(1,Math.tan(z*Math.PI/180),Math.tan(y*Math.PI/180),1,0,0),{x:-O*r.x,y:-P*r.y,w:O,h:P}},t.prototype.setBackground=function(t,e,i,n,r){var a=this.ctx;t&&"transparent"!=t?function(t){return!(!t||!t.startsWith("linear")&&!t.startsWith("radial"))}(t)?function(t,e,i,n,r,a){t.startsWith("linear")?function(t,e,i,n,r,a){for(var o=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var a=t.match(/([-]?\d{1,3})deg/),o=a&&a[1]?parseFloat(a[1]):0;if(o>=360&&(o-=360),o<0&&(o+=360),0===(o=Math.round(o)))return{x0:Math.round(e/2)+n,y0:i+r,x1:Math.round(e/2)+n,y1:r};if(180===o)return{x0:Math.round(e/2)+n,y0:r,x1:Math.round(e/2)+n,y1:i+r};if(90===o)return{x0:n,y0:Math.round(i/2)+r,x1:e+n,y1:Math.round(i/2)+r};if(270===o)return{x0:e+n,y0:Math.round(i/2)+r,x1:n,y1:Math.round(i/2)+r};var s=Math.round(180*Math.asin(e/Math.sqrt(Math.pow(e,2)+Math.pow(i,2)))/Math.PI);if(o===s)return{x0:n,y0:i+r,x1:e+n,y1:r};if(o===180-s)return{x0:n,y0:r,x1:e+n,y1:i+r};if(o===180+s)return{x0:e+n,y0:r,x1:n,y1:i+r};if(o===360-s)return{x0:e+n,y0:i+r,x1:n,y1:r};var d,c=0,u=0,l=0,f=0;if(o<s||o>180-s&&o<180||o>180&&o<180+s||o>360-s){var h=o*Math.PI/180,v=o<s||o>360-s?i/2:-i/2,p=Math.tan(h)*v,g=o<s||o>180-s&&o<180?e/2-p:-e/2-p;c=-(l=p+(d=Math.pow(Math.sin(h),2)*g)),u=-(f=v+d/Math.tan(h))}(o>s&&o<90||o>90&&o<90+s||o>180+s&&o<270||o>270&&o<360-s)&&(h=(90-o)*Math.PI/180,p=o>s&&o<90||o>90&&o<90+s?e/2:-e/2,v=Math.tan(h)*p,g=o>s&&o<90||o>270&&o<360-s?i/2-v:-i/2-v,c=-(l=p+(d=Math.pow(Math.sin(h),2)*g)/Math.tan(h)),u=-(f=v+d));return c=Math.round(c+e/2)+n,u=Math.round(i/2-u)+r,l=Math.round(l+e/2)+n,f=Math.round(i/2-f)+r,{x0:c,y0:u,x1:l,y1:f}}(r,t,e,i,n),s=o.x0,d=o.y0,c=o.x1,u=o.y1,l=a.createLinearGradient(s,d,c,u),f=r.match(/linear-gradient\((.+)\)/)[1],h=v(f.substring(f.indexOf(",")+1)),p=0;p<h.colors.length;p++)l.addColorStop(h.percents[p],h.colors[p]);a.setFillStyle(l)}(e,i,n,r,t,a):t.startsWith("radial")&&function(t,e,i,n,r,a){for(var o=v(r.match(/radial-gradient\((.+)\)/)[1]),s=Math.round(t/2)+i,d=Math.round(e/2)+n,c=a.createRadialGradient(s,d,0,s,d,Math.max(t,e)/2),u=0;u<o.colors.length;u++)c.addColorStop(o.percents[u],o.colors[u]);a.setFillStyle(c)}(e,i,n,r,t,a)}(t,e,i,n,r,a):a.setFillStyle(t):["mp-toutiao","mp-baidu"].includes(this.platform)?a.setFillStyle("transparent"):a.setFillStyle("rgba(0,0,0,0)")},t.prototype.setShadow=function(t){var e=t.boxShadow,i=void 0===e?[]:e,n=this.ctx;if(i.length){var r=i[0],a=i[1],o=i[2],s=i[3];n.setShadow(r,a,o,s)}},t.prototype.setBorder=function(t,e){var i=this,n=this.ctx,r=t.width,a=t.height,o=e.border,s=e.borderBottom,d=e.borderTop,c=e.borderRight,u=e.borderLeft,l=e.borderRadius,f=o||{},h=f.borderWidth,v=void 0===h?0:h,p=f.borderStyle,g=f.borderColor,b=s||{},m=b.borderBottomWidth,w=void 0===m?v:m,x=b.borderBottomStyle,y=void 0===x?p:x,S=b.borderBottomColor,z=void 0===S?g:S,k=d||{},_=k.borderTopWidth,O=void 0===_?v:_,P=k.borderTopStyle,M=void 0===P?p:P,R=k.borderTopColor,B=void 0===R?g:R,C=c||{},T=C.borderRightWidth,j=void 0===T?v:T,I=C.borderRightStyle,W=void 0===I?p:I,L=C.borderRightColor,$=void 0===L?g:L,F=u||{},A=F.borderLeftWidth,H=void 0===A?v:A,E=F.borderLeftStyle,N=void 0===E?p:E,U=F.borderLeftColor,D=void 0===U?g:U,q=l||{},J=q.borderTopLeftRadius,V=void 0===J?l||0:J,X=q.borderTopRightRadius,G=void 0===X?l||0:X,Q=q.borderBottomRightRadius,Y=void 0===Q?l||0:Q,K=q.borderBottomLeftRadius,Z=void 0===K?l||0:K;if(s||u||d||c||o){var tt=function(t,e,r){"dashed"==e?/mp/.test(i.platform)?n.setLineDash([Math.ceil(4*t/3),Math.ceil(4*t/3)]):n.setLineDash([Math.ceil(6*t),Math.ceil(6*t)]):"dotted"==e&&n.setLineDash([t,t]),n.setStrokeStyle(r)},et=function(t,e,i,r,a,o,s,d,c,u,l,f,h,v){n.save(),n.setLineWidth(f),tt(f,h,v),n.beginPath(),n.arc(t,e,s,Math.PI*c,Math.PI*u),n.lineTo(i,r),n.arc(a,o,d,Math.PI*u,Math.PI*l),n.stroke(),n.restore()};n.save(),this.setOpacity(e);var it=this.setTransform(t,e),nt=it.x,rt=it.y;o&&(n.setLineWidth(v),tt(v,p,g),this.roundRect(nt,rt,r,a,l,!1,!!g),n.restore()),s&&et(nt+r-Y,rt+a-Y,nt+Z,rt+a,nt+Z,rt+a-Z,Y,Z,.25,.5,.75,w,y,z),u&&et(nt+Z,rt+a-Z,nt,rt+V,nt+V,rt+V,Z,V,.75,1,1.25,H,N,D),d&&et(nt+V,rt+V,nt+r-G,rt,nt+r-G,rt+G,V,G,1.25,1.5,1.75,O,M,B),c&&et(nt+r-G,rt+G,nt+r,rt+a-Y,nt+r-Y,rt+a-Y,G,Y,1.75,2,.25,j,W,$)}},t.prototype.setOpacity=function(t){var e=t.opacity,i=void 0===e?1:e;this.ctx.setGlobalAlpha(i)},t.prototype.drawPattern=function(t,e,i){return r(this,void 0,void 0,(function(){var o=this;return a(this,(function(s){return[2,new Promise((function(s,d){var c=o,u=c.ctx,l=c.canvas,f=e.width,h=e.height,v=i||{},p=v.borderRadius,g=void 0===p?0:p,b=v.backgroundColor,m=void 0===b?"transparent":b,w=v.backgroundImage,x=v.backgroundRepeat,y=void 0===x?"repeat":x;u.save(),o.setOpacity(i);var S=o.setTransform(e,i),z=S.x,k=S.y;o.setShadow(i),o.setBackground(m,f,h,z,k),o.roundRect(z,k,f,h,g,!0,!1);var _=function(t){var n=u.createPattern(t.src,y);u.setFillStyle(n),o.roundRect(z,k,f,h,g,!0,!1),o.setBorder(e,i),u.restore(),s()};if(w)if(l.createImage||"web"==o.platform){var O=null;(O=l.createImage?l.createImage():new Image).onload=function(){t.src=O,_(t)},O.onerror=function(){return r(o,void 0,void 0,(function(){return a(this,(function(e){return n.log("createImage fail: "+JSON.stringify(t)),s(),[2]}))}))},O.src=t.path}else _(t)}))]}))}))},t.prototype.drawView=function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!0);var a=this.ctx,o=t.width,s=t.height,d=e||{},c=d.borderRadius,u=void 0===c?0:c,l=d.backgroundColor,f=void 0===l?"transparent":l;a.save(),this.setOpacity(e);var h=this.setTransform(t,e),v=h.x,p=h.y;r&&this.setShadow(e),i&&this.setBackground(f,o,s,v,p),this.roundRect(v,p,o,s,u,i,!1),a.restore(),n&&this.setBorder(t,e)},t.prototype.drawImage=function(t,e,i,o){return void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o=!0),r(this,void 0,void 0,(function(){var s=this;return a(this,(function(d){switch(d.label){case 0:return[4,new Promise((function(d,c){return r(s,void 0,void 0,(function(){var s,c,u,l,v,p,g,b,m,w,x,y,S,z,k,_,O,P,M,R,B,C,T,j,I,W,L,$=this;return a(this,(function(F){switch(F.label){case 0:return i.boxShadow&&this.drawView(e,Object.assign(i,{backgroundColor:i.backgroundColor||i.boxShadow&&(i.backgroundColor||"#ffffff")}),!0,!1,!0),c=(s=this).ctx,u=s.sleep,l=s.canvas,v=i.borderRadius,p=void 0===v?0:v,g=i.backgroundColor,b=void 0===g?"transparent":g,m=i.objectFit,w=void 0===m?"fill":m,x=i.objectPosition,y=e.width,S=e.height,z=e.left,k=e.top,c.save(),_=e.contentSize.left-e.borderSize.left,O=e.contentSize.top-e.borderSize.top,o||(this.setOpacity(i),P=this.setTransform(e,i),M=P.x,R=P.y,this.setBackground(b,y,S,z,k),z=M,k=R,this.roundRect(z,k,y,S,p,!!p,!1)),z+=_,k+=O,c.clip(),B=function(t){if("fill"!==w){var i=function(t,e,i){var n=t.objectFit,r=t.objectPosition,a=e.width/e.height,o=i.width/i.height,s=1;"contain"==n&&a>=o||"cover"==n&&a<o?s=e.height/i.height:("contain"==n&&a<o||"cover"==n&&a>=o)&&(s=e.width/i.width);var d=i.width*s,c=i.height*s,u=/^\d+px|rpx$/.test(null==r?void 0:r[0])?f(null==r?void 0:r[0],e.width):(e.width-d)*(/%$/.test(null==r?void 0:r[0])?f(null==r?void 0:r[0],1,!0):{left:0,center:.5,right:1}[(null==r?void 0:r[0])||"center"]),l=/^\d+px|rpx$/.test(null==r?void 0:r[1])?f(null==r?void 0:r[1],e.height):(e.height-c)*(/%$/.test(null==r?void 0:r[1])?f(null==r?void 0:r[1],1,!0):{top:0,center:.5,bottom:1}[(null==r?void 0:r[1])||"center"]),h=function(t,e){return[(t-u)/s,(e-l)/s]},v=h(0,0),p=v[0],g=v[1],b=h(e.width,e.height),m=b[0],w=b[1];return{sx:Math.max(p,0),sy:Math.max(g,0),sw:Math.min(m-p,i.width),sh:Math.min(w-g,i.height),dx:Math.max(u,0),dy:Math.max(l,0),dw:Math.min(d,e.width),dh:Math.min(c,e.height)}}({objectFit:w,objectPosition:x},e.contentSize,t),n=i.sx,r=i.sy,a=i.sh,o=i.sw,s=i.dx,d=i.dy,u=i.dh,l=i.dw;"mp-baidu"==$.platform?c.drawImage(t.src,s+z,d+k,l,u,n,r,o,a):c.drawImage(t.src,n,r,o,a,s+z,d+k,l,u)}else c.drawImage(t.src,z,k,y,S)},C=function(){c.restore(),$.drawView(e,i,!1,!0,!1),setTimeout(d,u)},T=function(t){if(l.createImage||"web"==$.platform){var e=null;(e=l.createImage?l.createImage():new Image).onload=function(){t.src=e,B(t),C()},e.onerror=function(){return r($,void 0,void 0,(function(){return a(this,(function(e){return n.log("createImage fail: "+JSON.stringify(t)),d(!0),[2]}))}))},e.src=t.path}else B(t),C()},"string"!=typeof t?[3,2]:[4,h(t)];case 1:return j=F.sent(),I=j.path,W=j.width,L=j.height,T({path:I,src:I,width:W,height:L}),[3,3];case 2:T(t),F.label=3;case 3:return[2]}}))}))}))];case 1:return d.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,i,n){this.drawView(e,i);var r=this.ctx,a=e.borderSize,o=e.contentSize,s=o.width,d=o.height,c=o.left-a.left,u=o.top-a.top,l=i.color,h=void 0===l?"#000000":l,v=i.lineHeight,p=void 0===v?"1.4em":v,g=i.fontSize,b=void 0===g?14:g,m=i.fontWeight,w=i.fontFamily,x=i.textStyle,y=i.textAlign,S=void 0===y?"left":y,z=i.verticalAlign,k=void 0===z?"middle":z;i.backgroundColor;var _=i.lineClamp,O=i.textDecoration;if(p=f(p,b),t){r.save(),this.setOpacity(i);var P=this.setTransform(e,i),M=P.x,R=P.y;switch(M+=c,R+=u,r.setFonts({fontFamily:w,fontSize:b,fontWeight:m,textStyle:x}),r.setTextBaseline("middle"),r.setTextAlign(S),r.setFillStyle(h),R+=b/2,S){case"left":break;case"center":M+=.5*s;break;case"right":M+=s}var B=n.lines*p,C=Math.ceil((d-B)/2);switch(C<0&&(C=0),k){case"top":break;case"middle":R+=C;break;case"bottom":R+=2*C}var T=(p-n.fontHeight)/2,j=function(t,e,i){var a=t;switch(S){case"left":t=t,a+=i;break;case"center":a=(t-=i/2)+i;break;case"right":a=t,t-=i}O&&(r.setLineWidth(b/13),r.beginPath(),e-=T,/\bunderline\b/.test(O)&&(r.moveTo(t,e-.5*n.fontHeight),r.lineTo(a,e-.5*n.fontHeight)),/\boverline\b/.test(O)&&(r.moveTo(t,e-1.5*n.fontHeight),r.lineTo(a,e-1.5*n.fontHeight)),/\bline-through\b/.test(O)&&(r.moveTo(t,e-n.fontHeight),r.lineTo(a,e-n.fontHeight)),r.closePath(),r.setStrokeStyle(h),r.stroke())};if(1==n.widths.lenght&&n.widths[0].total<=o.width)return r.fillText(t,M,R+T),j(M,R+=p,n.widths[0].total),r.restore(),void this.setBorder(e,i);for(var I=t.split(""),W=R,L=M,$="",F=0,A=0;A<=I.length;A++){var H=I[A]||"",E="\n"===H,N=""==H,U=$+(H=E?"":H),D=r.measureText(U).width;if(F>=_)break;if(L=M,(D=D)>o.width||E||N){if(F++,$=N&&D<=o.width?U:$,F===_&&D>s){for(;r.measureText($+"...").width>o.width&&!($.length<=1);)$=$.substring(0,$.length-1);$+="..."}if(r.fillText($,L,R+T),j(L,R+=p,D),$=H,R+p>W+d)break}else $=U}r.restore()}},t.prototype.source=function(t){var e;return r(this,void 0,void 0,(function(){var i,n;return a(this,(function(r){switch(r.label){case 0:if("{}"==JSON.stringify(t))return[2];if(!t.type)for(i in t.type="view",t.css=t.css||{},t)["views","children","type","css"].includes(i)||(t.css[i]=t[i],delete t[i]);return(null===(e=null==t?void 0:t.css)||void 0===e?void 0:e.width)||(t.css?t.css.width=this.root.width:t.css={width:this.root.width}),[4,this.create(t)];case 1:return n=r.sent(),this.size=n.layout(),this.node=n,[2,this.size]}}))}))},t.prototype.create=function(t,e){var i,o,s,d;return r(this,void 0,void 0,(function(){var r,c,u,l,f,v,p,g,b,m,x,y;return a(this,(function(a){switch(a.label){case 0:if("image"==t.type&&!t.src&&!t.url||"qrcode"==t.type&&!t.text)return[2];if("none"==(null===(i=null==t?void 0:t.css)||void 0===i?void 0:i.display))return n.error("element display none"),[2];a.label=1;case 1:return a.trys.push([1,4,,5]),"image"==t.type||"view"==t.type&&(null===(o=t.css)||void 0===o?void 0:o.backgroundImage)?(r=null,c=/url\((.+)\)/,t.css.backgroundImage&&(null===(s=c.exec(t.css.backgroundImage))||void 0===s?void 0:s[1])&&(r=null===(d=c.exec(t.css.backgroundImage))||void 0===d?void 0:d[1]),[4,h(t.src||r)]):[3,3];case 2:u=a.sent(),l=u.width,f=u.height,v=u.path,["mp-weixin","mp-baidu","mp-qq","mp-toutiao"].includes(this.platform)&&(v=/^\.|^\/(?=[^\/])/.test(t.src||r)?"/"+v:v),t.attributes=Object.assign(t.attributes||{},{width:l,height:f,path:v,src:v,naturalSrc:t.src||r}),a.label=3;case 3:return[3,5];case 4:return p=a.sent(),n.log(p),[2];case 5:if(this.count+=1,g=new w(t,e,this.root,this.ctx),!(b=t.views||t.children))return[3,9];m=0,a.label=6;case 6:return m<b.length?(x=b[m],[4,this.create(x,g)]):[3,9];case 7:(y=a.sent())&&g.add(y),a.label=8;case 8:return m++,[3,6];case 9:return[2,g]}}))}))},t.prototype.drawNode=function(t){return r(this,void 0,void 0,(function(){var e,i,n,r,o,s,d,c,u,l,f,h;return a(this,(function(a){switch(a.label){case 0:return e=t.layoutBox,i=t.computedStyle,n=t.attributes,r=t.name,o=t.children,s=t.attributes,d=s.src,c=s.text,"view"!==r?[3,4]:d?[4,this.drawPattern(n,e,i)]:[3,2];case 1:return a.sent(),[3,3];case 2:this.drawView(e,i),a.label=3;case 3:return[3,7];case 4:return"image"===r&&d?[4,this.drawImage(n,e,i,!1)]:[3,6];case 5:return a.sent(),[3,7];case 6:"text"===r?this.drawText(c,e,i,n):"qrcode"===r&&(null==x?void 0:x.api)&&x.api.draw(c,this,e,i),a.label=7;case 7:if(this.progress+=1,!o)return[2];u=Object.values?Object.values(o):Object.keys(o).map((function(t){return o[t]})),l=0,f=u,a.label=8;case 8:return l<f.length?(h=f[l],[4,this.drawNode(h)]):[3,11];case 9:a.sent(),a.label=10;case 10:return l++,[3,8];case 11:return[2]}}))}))},t.prototype.render=function(){return r(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this.init(),[4,(e=30,void 0===e&&(e=0),new Promise((function(t){return setTimeout(t,e)})))];case 1:return t.sent(),[4,this.drawNode(this.node)];case 2:return t.sent(),[2]}var e}))}))},t.prototype.listen=function(t,e){var i=this;if("progressChange"==t){var n=0;Object.defineProperty(this,"progress",{configurable:!0,set:function(t){n=t,e(t/i.count)},get:function(){return n||0}})}},t.prototype.save=function(t){try{var e=t||{},i=e.fileType,r=void 0===i?"png":i,a=e.quality,o=void 0===a?1:a;return this.canvas.toDataURL("image/"+r,o)}catch(t){return n.log("image cross domain"),t}},t}();"web"==d&&(window.Painter=y),t.Painter=y,Object.defineProperty(t,"__esModule",{value:!0})}))}).call(this,i("5a52")["default"])},"75d1":function(t,e,i){"use strict";var n=i("78fd"),r=i.n(n);r.a},7710:function(t,e,i){"use strict";i.r(e);var n=i("265b"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},"78fd":function(t,e,i){var n=i("dca1");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("568771b0",n,!0,{sourceMap:!1,shadowMode:!1})},"7a95":function(t,e,i){"use strict";(function(t){i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("99af");var r=n(i("5530")),a=n(i("c7eb")),o=n(i("1da1")),s=i("1478"),d=i("75c9"),c=i("a46d"),u=i("26cb"),l={data:function(){return{path:"",qrCode:"",loading:!0,showPoster:!1,poster:""}},onLoad:function(){var t=this;return(0,o.default)((0,a.default)().mark((function e(){return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.getPoster();case 2:t.showPoster=!0;case 3:case"end":return e.stop()}}),e)})))()},methods:{getPoster:function(){var t=this;return(0,o.default)((0,a.default)().mark((function e(){var i;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,c.apiDistributionPoster)();case 2:i=e.sent,t.poster=i.data.poster;case 4:case"end":return e.stop()}}),e)})))()},getMnpQrCode:function(){var e=this;(0,s.getShareMnQrcode)({id:"",url:"pages/index/index",type:0}).then((function(i){t.log("shareRes",i),e.qrCode=i.data.qr_code,e.showPoster=!0}))},saveImageToAlbum:function(){this.$toast({title:请长按图片保存})},handleSuccess:function(t){this.path=t,this.loading=!1}},computed:(0,r.default)((0,r.default)({},(0,u.mapGetters)(["inviteCode","userInfo"])),{},{link:function(){return"".concat(d.baseURL).concat(d.basePath,"?invite_code=").concat(this.inviteCode)}})};e.default=l}).call(this,i("5a52")["default"])},"82ff":function(t,e,i){"use strict";i.r(e);var n=i("9388"),r=i("e2d1");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"5f2f7706",null,!1,n["a"],void 0);e["default"]=s.exports},"8aeb":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={loading:i("647b").default},r=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{class:"loading "+("flex"==this.type?"flex":""),style:{backgroundColor:this.backgroundColor}},[e("loading",{attrs:{color:this.color,size:this.size}})],1)},a=[]},"8f7f":function(t,e,i){"use strict";var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.children=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.indexKey;return{inject:(0,o.default)({},t,{default:null}),watch:{el:{handler:function(t,e){JSON.stringify(t)!=JSON.stringify(e)&&this.bindRelation()},deep:!0,immediate:!0},src:{handler:function(t,e){t!=e&&this.bindRelation()},immediate:!0},text:{handler:function(t,e){t!=e&&this.bindRelation()},immediate:!0},css:{handler:function(t,e){t!=e&&(this.el.css="object"==(0,a.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(t)))||{})},immediate:!0},replace:{handler:function(t,e){JSON.stringify(t)!=JSON.stringify(e)&&this.bindRelation()},deep:!0,immediate:!0}},created:function(){var e=this;Object.defineProperty(this,"parent",{get:function(){return e[t]}}),Object.defineProperty(this,"index",{get:function(){var t,i;return e.bindRelation(),null===(t=e.parent)||void 0===t||null===(i=t.el.views)||void 0===i?void 0:i.indexOf(e.el)}}),this.el.type=this.type},beforeDestroy:function(){var t=this;this.parent&&(this.parent.el.views=this.parent.el.views.filter((function(e){return e._uid!==t._uid})))},methods:{bindRelation:function(){var t,e,i,n,a=this;(this.el._uid||(this.el._uid=this._uid),["text","qrcode"].includes(this.type))&&(this.el.text=(null===(t=this.$slots)||void 0===t||null===(e=t.default)||void 0===e||null===(i=e[0])||void 0===i?void 0:i.text)||(null===(n=this.text)||void 0===n?void 0:n.replace(/\\n/g,"\n")));if("text"==this.type&&this.replace&&(this.el.replace=this.replace),"image"==this.type&&(this.el.src=this.src),this.parent){var o=this.parent.el.views||[];-1!==o.indexOf(this.el)?this.parent.el.views=o.map((function(t){return t._uid==a._uid?a.el:t})):this.parent.el.views=[].concat((0,r.default)(o),[this.el])}}},mounted:function(){this.bindRelation()}}},e.parent=function(t){return{provide:function(){return(0,o.default)({},t,this)},data:function(){return{el:{css:{},views:[]}}},watch:{css:{handler:function(t){var e,i;this.canvasId&&(this.el.css="object"==(0,a.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(t)))||{},this.canvasWidth=(null===(e=this.el.css)||void 0===e?void 0:e.width)||this.canvasWidth,this.canvasHeight=(null===(i=this.el.css)||void 0===i?void 0:i.height)||this.canvasHeight)},immediate:!0}}}};var r=n(i("2909")),a=n(i("53ca")),o=n(i("ade3"));i("d81d"),i("4de4"),i("d3b7"),i("ac1f"),i("00b4"),i("5319"),i("e9c4"),i("7a82"),i("c975"),i("caad"),i("99af");i("f89a");var s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter((function(t){return t&&!/^[\n\s]+$/.test(t)})).map((function(t){var e,i,n=t.split(":");return(0,o.default)({},n[0].replace(/-([a-z])/g,(function(){return arguments[1].toUpperCase()})).replace(/\s+/g,""),(null===n||void 0===n||null===(e=n[1])||void 0===e||null===(i=e.replace(/^\s+/,""))||void 0===i?void 0:i.replace(/\s+$/,""))||"")}))}},"90f9":function(t,e,i){var n=i("091a");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("a155f2da",n,!0,{sourceMap:!1,shadowMode:!1})},9388:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-text",{staticStyle:{opacity:"0"}},[this._t("default")],2)},r=[]},"97ce":function(t,e,i){"use strict";i.r(e);var n=i("68be"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},a0b4:function(t,e,i){"use strict";i.r(e);var n=i("c337"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},a6e5:function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("c7eb")),a=n(i("1da1"));i("a9e3"),i("99af"),i("e9c4"),i("ac1f"),i("d3b7"),i("d9e2"),i("d401");var o=i("f89a"),s=i("8f7f"),d=i("6cd1"),c={name:"lime-painter",mixins:[(0,s.parent)("painter")],props:{board:Object,pathType:{type:String},fileType:{type:String,default:"png"},quality:{type:Number,default:1},css:[String,Object],width:[Number,String],height:[Number,String],pixelRatio:Number,customStyle:String,isCanvasToTempFilePath:Boolean,sleep:{type:Number,default:1e3/30},beforeDelay:{type:Number,default:100},afterDelay:{type:Number,default:100}},data:function(){return{use2dCanvas:!1,canvasHeight:150,canvasWidth:null,isDrawIng:!1,isPC:!1,inited:!1,name:"view",progress:0}},computed:{canvasId:function(){return"l-painter".concat(this._uid)},size:function(){if(this.boardWidth&&this.boardHeight)return"width:".concat(this.boardWidth,"px; height: ").concat(this.boardHeight,"px;")},dpr:function(){return this.pixelRatio||uni.getSystemInfoSync().pixelRatio},boardWidth:function(){var t,e=this.width,i=void 0===e?0:e,n=this.canvasWidth,r=void 0===n?0:n,a=(null===(t=this.board)||void 0===t?void 0:t.css)||this.board||{},s=a.width,d=void 0===s?0:s;return Math.max((0,o.toPx)(i||d),(0,o.toPx)(r))},boardHeight:function(){var t,e=this.height,i=void 0===e?0:e,n=this.canvasHeight,r=void 0===n?0:n,a=(null===(t=this.board)||void 0===t?void 0:t.css)||this.board||{},s=a.height,d=void 0===s?0:s;return Math.max((0,o.toPx)(i||d),(0,o.toPx)(r))}},watch:{canvasWidth:function(t){var e;!this.el.css||null!==(e=this.el.css)&&void 0!==e&&e.width||(this.el.css.width=t)},size:function(t){}},mounted:function(){var t=this;this.$nextTick((function(){setTimeout((function(){t.board?t.$watch("board",t.watchRender,{deep:!0,immediate:!0}):t.el.views.length&&t.$watch("el",t.watchRender,{deep:!0,immediate:!0})}),30)}))},methods:{watchRender:function(t){var e=this;return(0,a.default)((0,r.default)().mark((function i(){return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(e.progress=0,"{}"!==JSON.stringify(t)&&t){i.next=3;break}return i.abrupt("return");case 3:clearTimeout(e.rendertimer),e.rendertimer=setTimeout((function(){e.render(t)}),e.beforeDelay);case 5:case"end":return i.stop()}}),i)})))()},setFilePath:function(t,e){var i=this;return(0,a.default)((0,r.default)().mark((function n(){var a,s;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a=t,s=i.pathType,"base64"!=s||(0,o.isBase64)(t)){n.next=8;break}return n.next=5,(0,o.pathToBase64)(t);case 5:a=n.sent,n.next=12;break;case 8:if("url"!=s||!(0,o.isBase64)(t)){n.next=12;break}return n.next=11,(0,o.base64ToPath)(t);case 11:a=n.sent;case 12:return e&&i.$emit("success",a),n.abrupt("return",a);case 14:case"end":return n.stop()}}),n)})))()},getParentWeith:function(){var t=this;uni.createSelectorQuery().in(this).select(".lime-painter").boundingClientRect().exec((function(e){t.canvasWidth=Math.ceil(e[0].width),t.canvasHeight=e[0].height}))},update:function(t,e){var i=this;return(0,a.default)((0,r.default)().mark((function n(){return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i.painter=null,i.isDrawIng=!1,n.next=4,new Promise((function(t){return i.$nextTick(t)}));case 4:return n.next=6,(0,o.sleep)(200);case 6:return n.abrupt("return",i.render(t,e));case 7:case"end":return n.stop()}}),n)})))()},render:function(){var t=arguments,e=this;return(0,a.default)((0,r.default)().mark((function i(){var n,s,c,u,l,f,h,v,p,g,b,m,w;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(c=t.length>0&&void 0!==t[0]?t[0]:{},u=t.length>1&&void 0!==t[1]&&t[1],!e.isDrawIng){i.next=4;break}return i.abrupt("return",e.update(c,u));case 4:return e.isDrawIng=!0,"{}"!=JSON.stringify(c),i.next=8,e.getContext();case 8:if(l=i.sent,f=e.use2dCanvas,h=e.boardWidth,v=e.boardHeight,p=e.canvas,g=e.afterDelay,!f||p){i.next=12;break}return i.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 12:return e.boundary={top:0,left:0,width:h,height:v},e.painter||(e.painter=new d.Painter({context:l,canvas:p,width:h,height:v,pixelRatio:e.dpr},e)),e.painter.listen("progressChange",(function(t){e.$emit("progress",t)})),i.next=17,e.painter.source(c);case 17:return b=i.sent,m=b.width,w=b.height,e.canvasHeight=(0,o.toPx)(null===(n=e.el.css)||void 0===n?void 0:n.height)||w,e.canvasWidth=(0,o.toPx)(null===(s=e.el.css)||void 0===s?void 0:s.width)||m,e.boundary.height=e.canvasHeight,e.boundary.width=e.canvasWidth,i.next=26,(0,o.sleep)(e.sleep);case 26:return i.next=28,e.painter.render();case 28:return i.next=30,new Promise((function(t){return e.$nextTick(t)}));case 30:if(f||u){i.next=33;break}return i.next=33,e.canvasDraw();case 33:if(!g||!f){i.next=36;break}return i.next=36,(0,o.sleep)(g);case 36:return e.$emit("done"),e.isCanvasToTempFilePath&&!u&&e.isDrawIng&&e.canvasToTempFilePath().then(function(){var t=(0,a.default)((0,r.default)().mark((function t(i){return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("success",i.tempFilePath);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$emit("fail",new Error(JSON.stringify(t)))})),e.isDrawIng=!1,i.abrupt("return",Promise.resolve({ctx:l,draw:e.painter,node:e.node}));case 40:case"end":return i.stop()}}),i)})))()},custom:function(t){var e=this;return(0,a.default)((0,r.default)().mark((function i(){var n,a,o;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,e.render({},!0);case 2:return n=i.sent,a=n.ctx,o=n.draw,a.save(),i.next=8,t(a,o);case 8:return a.restore(),i.abrupt("return",Promise.resolve(!0));case 10:case"end":return i.stop()}}),i)})))()},single:function(){var t=arguments,e=this;return(0,a.default)((0,r.default)().mark((function i(){var n,a;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:{},i.next=3,e.render(n,!0);case 3:return a=i.sent,i.abrupt("return",Promise.resolve(a));case 5:case"end":return i.stop()}}),i)})))()},canvasDraw:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(i,n){return t.ctx.draw(e,(function(){return setTimeout((function(){return i()}),t.afterDelay)}))}))},getContext:function(){var t=this;return(0,a.default)((0,r.default)().mark((function e(){var i,n,a;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.ctx||!t.inited){e.next=2;break}return e.abrupt("return",Promise.resolve(t.ctx));case 2:return t.getParentWeith(),i=t.type,t.use2dCanvas,n=t.dpr,t.boardWidth,t.boardHeight,a=function(){return new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).boundingClientRect().exec((function(i){if(i){var r=uni.createCanvasContext(t.canvasId,t);t.inited||(t.inited=!0,t.use2dCanvas=!1,t.canvas=i),t.isPC&&r.scale(1/n,1/n),t.ctx=r,e(t.ctx)}}))}))},e.abrupt("return",a());case 8:return e.abrupt("return",new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).node().exec((function(n){var r=n[0].node;r||(t.use2dCanvas=!1,e(t.getContext()));var a=r.getContext(i);t.inited||(t.inited=!0,t.use2dCanvas=!0,t.canvas=r),t.ctx=a,e(t.ctx)}))})));case 9:case"end":return e.stop()}}),e)})))()},canvasToTempFilePath:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.use2dCanvas,n=this.canvasId,o=this.dpr,s=this.fileType,d=this.quality;return new Promise((function(c,u){var l=t.boundary||t,f=l.top,h=void 0===f?0:f,v=l.left,p=void 0===v?0:v,g=l.width,b=l.height,m=g*o,w=b*o,x=function(){var e=(0,a.default)((0,r.default)().mark((function e(i){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.setFilePath(i.tempFilePath);case 2:n=e.sent,c(Object.assign(i,{tempFilePath:n}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=Object.assign({x:p,y:h,width:g,height:b,destWidth:m,destHeight:w,canvasId:n,fileType:s,quality:d,success:x,fail:u},e);i&&(delete y.canvasId,y.canvas=t.canvas),uni.canvasToTempFilePath(y,t)}))}}};e.default=c},b695:function(t,e,i){"use strict";i.r(e);var n=i("4ad4"),r=i("b78b");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);i("c407");var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"912a3e06",null,!1,n["a"],void 0);e["default"]=s.exports},b78b:function(t,e,i){"use strict";i.r(e);var n=i("7a95"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},baa5:function(t,e,i){var n=i("23e7"),r=i("e58c");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},bdcd:function(t,e,i){"use strict";i.r(e);var n=i("e361"),r=i("7710");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"5024cd44",null,!1,n["a"],void 0);e["default"]=s.exports},c337:function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("8f7f"),r={name:"lime-painter-qrcode",mixins:[(0,n.children)("painter")],props:{css:[String,Object],text:String},data:function(){return{type:"qrcode",el:{css:{},text:null}}}};e.default=r},c407:function(t,e,i){"use strict";var n=i("0bb1"),r=i.n(n);r.a},c891:function(t,e,i){var n=i("e7f5");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("4f06").default;r("a7fe9f16",n,!0,{sourceMap:!1,shadowMode:!1})},cb29:function(t,e,i){var n=i("23e7"),r=i("81d5"),a=i("44d2");n({target:"Array",proto:!0},{fill:r}),a("fill")},ce67:function(t,e,i){"use strict";i.r(e);var n=i("047c"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},dca1:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".lime-painter[data-v-64f1d435], .lime-painter__canvas[data-v-64f1d435]{\nwidth:100%;\n}",""]),t.exports=e},dd2a:function(t,e,i){"use strict";i.r(e);var n=i("8aeb"),r=i("97ce");for(var a in r)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(a);i("26b1");var o=i("f0c5"),s=Object(o["a"])(r["default"],n["b"],n["c"],!1,null,"02ab9a7e",null,!1,n["a"],void 0);e["default"]=s.exports},e2d1:function(t,e,i){"use strict";i.r(e);var n=i("1303"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},e361:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view")},r=[]},e7f5:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".loading[data-v-02ab9a7e]{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999;display:flex;justify-content:center;align-items:center}.loading.flex[data-v-02ab9a7e]{position:static;flex:1;width:100%}",""]),t.exports=e},ed9b:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */uni-page-body[data-v-912a3e06]{padding:0}.invite-fans[data-v-912a3e06]{min-height:100vh;overflow:hidden}.invite-fans .poster[data-v-912a3e06]{width:%?600?%;margin:%?40?% 0}.invite-fans .footer[data-v-912a3e06]{padding:%?30?%;width:100%}.invite-fans .copy-btn[data-v-912a3e06]{color:#ff2c3c}.invite-fans .save-btn[data-v-912a3e06]{color:#fff;background-color:#ff2c3c}',""]),t.exports=e},ee1e:function(t,e,i){"use strict";i.r(e);var n=i("a6e5"),r=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=r.a},f80e:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view")},r=[]},f89a:function(t,e,i){"use strict";(function(t){i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=f,e.compareVersion=function(t,e){t=t.split("."),e=e.split(".");var i=Math.max(t.length,e.length);while(t.length<i)t.push("0");while(e.length<i)e.push("0");for(var n=0;n<i;n++){var r=parseInt(t[n],10),a=parseInt(e[n],10);if(r>a)return 1;if(r<a)return-1}return 0},e.getImageInfo=function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(){var n=(0,a.default)((0,r.default)().mark((function n(a,o){var l;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(/^\.|^\/(?=[^\/])/,!s.test(e)||!i){n.next=5;break}return n.next=4,h(e);case 4:e=n.sent;case 5:if(!d(e)){n.next=15;break}if(!c&&u[e]){n.next=14;break}return l=e,n.next=10,f(e);case 10:e=n.sent,u[l]=e,n.next=15;break;case 14:e=u[e];case 15:u[e]&&u[e].errMsg?a(u[e]):uni.getImageInfo({src:e,success:function(t){t.path=t.path.replace(/^\./,window.location.origin),t.naturalSrc=e,c?a(t):(u[e]=t,a(u[e]))},fail:function(i){a({path:e}),t.error("getImageInfo:fail ".concat(e," failed ").concat(JSON.stringify(i)))}});case 16:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}())},e.isBase64=void 0,e.isNumber=l,e.pathToBase64=h,e.sleep=function(t){return new Promise((function(e){return setTimeout(e,t)}))},e.toPx=function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"===typeof e)return e;if(l(e))return 1*e;if("string"===typeof e){var r=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g,a=r.exec(e);if(!e||!a)return 0;var o=a[3];e=parseFloat(e);var s=0;return"rpx"===o?s=uni.upx2px(e):"px"===o?s=1*e:"%"===o?s=e*t(i)/100:"em"===o&&(s=e*t(i||14)),n?1*s.toFixed(2):Math.round(s)}return 0};var r=n(i("c7eb")),a=n(i("1da1")),o=n(i("3835"));i("ac1f"),i("00b4"),i("d3b7"),i("caad"),i("acd8"),i("14d9"),i("e25e"),i("c19f"),i("ace4"),i("c975"),i("5cc6"),i("907a"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("986a"),i("1d02"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("b39a"),i("72f7"),i("5319"),i("d401"),i("81b2"),i("0eb6"),i("b7ef"),i("8bd4"),i("3ca3"),i("ddb0"),i("2b3d"),i("9861"),i("e9c4"),i("d9e2"),i("99af");var s=/^(http|\/\/)/,d=function(t){return/^data:image\/(\w+);base64/.test(t)};e.isBase64=d;var c=["devtools"].includes(uni.getSystemInfoSync().platform),u={};function l(t){return/^-?\d+(\.\d+)?$/.test(t)}function f(t){var e=/data:image\/(\w+);base64,(.*)/.exec(t)||[],i=(0,o.default)(e,3);i[1],i[2];return new Promise((function(e,i){for(var n=t.split(",")[0].split(":")[1].split(";")[0],r=atob(t.split(",")[1]),a=new ArrayBuffer(r.length),o=new Uint8Array(a),s=0;s<r.length;s++)o[s]=r.charCodeAt(s);e(URL.createObjectURL(new Blob([o],{type:n})))}))}function h(e){return/^data:/.test(e)?e:new Promise((function(i,n){var r=function(){var r=new Image;r.setAttribute("crossOrigin","Anonymous"),r.onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(r,0,0);var e=t.toDataURL("image/png");i(e),t.height=t.width=0},r.src=e,r.onerror=function(i){t.error("urlToBase64 error: ".concat(e),JSON.stringify(i)),n(new Error("urlToBase64 error"))}},a=function(e){var r=new FileReader;r.onload=function(t){i(t.target.result)},r.readAsDataURL(e),r.onerror=function(e){t.error("blobToBase64 error:",JSON.stringify(e)),n(new Error("blobToBase64 error"))}},o="function"===typeof FileReader;if(s.test(e)&&o){window.URL=window.URL||window.webkitURL;var d=new XMLHttpRequest;d.open("get",e,!0),d.timeout=2e3,d.responseType="blob",d.onload=function(){200==this.status?a(this.response):r()},d.onreadystatechange=function(){0===this.status&&t.error("图片跨域了,得后端处理咯")},d.send()}else/^blob/.test(e)&&o?a(e):r()}))}}).call(this,i("5a52")["default"])}}]);