You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
71 KiB
1 lines
71 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-channel-poster~user-pages-distribution-bind-technician~user-pages-distribution-poster"],{"015a":function(t,e,i){var n=i("4b5a");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=i("967d").default;r("72cf53b6",n,!0,{sourceMap:!1,shadowMode:!1})},1851:function(t,e,i){"use strict";var n=i("8bdb"),r=i("84d6"),o=i("1cb5");n({target:"Array",proto:!0},{fill:r}),o("fill")},"1ad6":function(t,e,i){"use strict";var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Painter=void 0;var r=n(i("fcf3"));i("bf0f"),i("01a2"),i("e39c"),i("844d"),i("18f7"),i("de6c"),i("7a76"),i("c9b5"),i("aa9c"),i("5c47"),i("0506"),i("e838"),i("9db6"),i("2c10"),i("5ef2"),i("0c26"),i("20f3"),i("6a54"),i("8a8d"),i("f7a5"),i("08eb"),i("4100"),i("2797"),i("473f"),i("dc8a"),i("fd3c"),i("aa77"),i("4626"),i("5ac7"),i("a1c1"),i("c223"),i("c1a3"),i("1851"),i("8f71"),i("d4b5"),i("22b6");var o=function(){return o=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},o.apply(this,arguments)};function a(t,e,i,n){return new(i||(i=Promise))((function(r,o){function a(t){try{h(n.next(t))}catch(t){o(t)}}function s(t){try{h(n.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(a,s)}h((n=n.apply(t,e||[])).next())}))}function s(t,e){var i,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!((r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var h,c,d={MP_WEIXIN:"mp-weixin",MP_QQ:"mp-qq",MP_ALIPAY:"mp-alipay",MP_BAIDU:"mp-baidu",MP_TOUTIAO:"mp-toutiao",MP_DINGDING:"mp-dingding",H5:"h5",WEB:"web",PLUS:"plus"},u=["contentSize","clientSize","borderSize","offsetSize"],l="view",f="text",p="image",v="qrcode",g="block",b={display:g,color:"#000000",lineHeight:"1.4em",fontSize:14,fontWeight:400,fontFamily:"sans-serif",lineCap:"butt",flexDirection:"row",flexWrap:"nowrap",textAlign:"left",alignItems:"flex-start",justifyContent:"flex-start",position:"static",transformOrigin:"center center"},m={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}},y="object"==("undefined"===typeof window?"undefined":(0,r.default)(window))?"undefined"==typeof uni||"undefined"!=typeof uni&&!uni.addInterceptor?d.WEB:d.H5:"object"==("undefined"===typeof swan?"undefined":(0,r.default)(swan))?d.MP_BAIDU:"object"==("undefined"===typeof tt?"undefined":(0,r.default)(tt))?d.MP_TOUTIAO:"object"==("undefined"===typeof plus?"undefined":(0,r.default)(plus))?d.PLUS:"object"==("undefined"===typeof wx?"undefined":(0,r.default)(wx))?d.MP_WEIXIN:void 0,x=y==d.MP_WEIXIN?wx:"undefined"!=typeof uni?uni.getImageInfo?{upx2px:function(t){return uni.upx2px(t)},getSystemInfoSync:function(){return uni.getSystemInfoSync()},getImageInfo:function(t){return uni.getImageInfo(t)},downloadFile:function(t){return uni.downloadFile(t)}}:Object.assign(uni,m):"undefined"!=typeof window?m:uni;if(!x.upx2px){var w=(null!==(c=x.getSystemInfoSync&&(null===(h=uni.getSystemInfoSync())||void 0===h?void 0:h.screenWidth))&&void 0!==c?c:375)/750;x.upx2px=function(t){return w*t}}function S(t){return/^-?\d+(\.\d+)?$/.test(t)}function P(t,e,i){if("number"==typeof t)return t;if(S(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 o=0;return"rpx"===r?o=x.upx2px(t):"px"===r?o=1*t:"%"===r&&e?o=t*P(e)/100:"em"===r&&e&&(o=t*P(e||14)),1*o.toFixed(2)}return 0}function z(t){return/%$/.test(t)}function k(t){for(var e=[],i=[],n=0,r=t.substring(0,t.length-1).split("%,");n<r.length;n++){var o=r[n];e.push(o.substring(0,o.lastIndexOf(" ")).trim()),i.push(o.substring(o.lastIndexOf(" "),o.length)/100)}return{colors:e,percents:i}}function I(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function M(){return M=Object.assign?Object.assign.bind():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},M.apply(this,arguments)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function W(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return B(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?B(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(t){return"number"==typeof t}function T(t){return"auto"===t||null===t}function j(t){return/%$/.test(t)}var C,F=0,L=function(){function t(){I(this,"elements",[]),I(this,"afterElements",[]),I(this,"beforeElements",[]),I(this,"ids",[]),I(this,"width",0),I(this,"height",0),I(this,"top",0),I(this,"left",0),I(this,"pre",null),I(this,"offsetX",0),I(this,"offsetY",0),F++,this.id=F}var e=t.prototype;return e.fixedBind=function(t,e){void 0===e&&(e=0),this.container=e?t.parent:t.root,this.container.fixedLine=this,this.fixedAdd(t)},e.fixedAdd=function(t){this.elements.push(t);var e=t.computedStyle.zIndex;(void 0===e?0:e)>=0?this.afterElements.push(t):this.beforeElements.push(t),this.refreshLayout()},e.bind=function(t){this.container=t.parent,this.container.line=null,this.container.lines?(this.container.lines.push(this),this.pre=this.getPreLine(),this.top=this.pre.top+this.pre.height,this.left=this.container.contentSize.left):(this.top=this.container.contentSize.top,this.left=this.container.contentSize.left,this.container.lines=[this]),this.isInline=t.isInline(),this.container.line=this,this.outerWidth=t.parent&&t.parent.contentSize.width?t.parent.contentSize.width:1/0,this.add(t)},e.getPreLine=function(){return this.container.lines[this.container.lines.length-2]},e.canIEnter=function(t){return!((100*t.offsetSize.width+100*this.width)/100>this.outerWidth)||(this.closeLine(),!1)},e.closeLine=function(){delete this.container.line},e.add=function(t){this.ids.push(t.id),this.elements.push(t),this.refreshWidthHeight(t)},e.refreshWidthHeight=function(t){t.offsetSize.height>this.height&&(this.height=t.offsetSize.height),this.width+=t.offsetSize.width||0,(this.container.lineMaxWidth||0)<this.width&&(this.container.lineMaxWidth=this.width)},e.refreshXAlign=function(){if(this.isInline){var t=this.container.contentSize.width-this.width,e=this.container.style.textAlign;"center"===e?t/=2:"left"===e&&(t=0),this.offsetX=t}},e.getOffsetY=function(t){if(!t||!t.style)return 0;var e=(t.style||{}).verticalAlign;return"bottom"===e?this.height-t.contentSize.height:"middle"===e?(this.height-t.contentSize.height)/2:0},e.layout=function(t,e){for(var i in this.refreshXAlign(),this.pre?(this.top=this.pre.top+this.pre.height+this.offsetY,this.left=e+this.offsetX):(this.top=Math.max(this.top,this.container.contentSize.top,t)+this.offsetY,this.left=Math.max(this.left,this.container.contentSize.left,e)+this.offsetX),this.elements){var n=this.elements[i],r=this.elements[i-1],o=this.getOffsetY(n);n.style.top=this.top+o,n.style.left=r?r.offsetSize.left+r.offsetSize.width:this.left,n.getBoxPosition2()}},e.refreshLayout=function(){this.afterElements=this.afterElements.sort((function(t,e){return t.computedStyle.zIndex-e.computedStyle.zIndex})),this.beforeElements=this.beforeElements.sort((function(t,e){return t.computedStyle.zIndex-e.computedStyle.zIndex}))},t}(),A=((C={})["row"]={width:"width",contentWidth:"width",x:"x",y:"y",contentX:"left",height:"height",contentHeight:"height"},C["column"]={width:"height",contentWidth:"height",x:"y",y:"x",contentX:"top",height:"width",contentHeight:"width"},C),_=function(t){var e,i;function n(){var e;return I(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e=t.call(this)||this),"outerWidth",0),e.exactValue=0,e.flexTotal=0,e.key=null,e}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,O(e,i);var r=n.prototype;return r.bind=function(t){console.warn("[painter] flex-box 功能未完善谨慎使用"),this.container=t.parent,this.container.line=this,this.container.lines?(this.container.lines.push(this),this.pre=this.getPreLine(),this.top=this.pre.top+this.pre.height,this.left=this.container.contentSize.left):(this.top=this.container.contentSize.top,this.left=this.container.contentSize.left,this.container.lines=[this]),t.parent&&(this.key=A[t.parent.style.flexDirection]),this.initHeight(t),this.outerWidth=t.parent&&t.parent.contentSize[this.key.contentWidth]?t.parent.contentSize[this.key.contentWidth]:1/0,this.add(t)},r.add=function(t){this.ids.push(t.id),R(t.style.flex)?this.flexTotal+=t.style.flex:R(t.style[this.key.width])&&(this.exactValue+=t.contentSize[this.key.width]),this.elements.push(t),this.refreshWidthHeight(t),t.next||this.closeLine()},r.closeLine=function(){this.calcFlex()},r.initHeight=function(t){this[this.key.height]=0},r.calcFlex=function(){var t=this,e=this.container.contentSize[this.key.contentWidth];this.elements.forEach((function(i){var n=i.style.width||0;R(i.style.flex)&&(n=i.style.flex/t.flexTotal*(e-t.exactValue)),i.computedStyle[t.key.width]=n,i.getBoxWidthHeight()}))},r.refreshWidthHeight=function(t){this.container.style.alignItems&&!t.style.alignSelf&&(t.style.alignSelf=this.container.style.alignItems),t.contentSize[this.key.height]>this[this.key.height]&&(this[this.key.height]=t.offsetSize[this.key.height]),this[this.key.width]+=t.offsetSize[this.key.width],(this.container.lineMaxWidth||0)<this[this.key.width]&&(this.container.lineMaxWidth=this[this.key.width])},r.refreshXAlign=function(){var t=this,e=this.elements.reduce((function(e,i){return e+i.offsetSize[t.key.width]}),0),i=this.outerWidth==1/0?0:this.outerWidth-Math.max(this[this.key.width],e);"center"===this.container.style.justifyContent?i/=2:"flex-start"===this.container.style.justifyContent&&(i=0),this.offsetX=i||0,this.refreshYAlign()},r.refreshYAlign=function(){if(1==this.container.lines.length)return 0;var t=this.container.lines.reduce((function(t,e){return t+e.height}),0);if("center"===this.container.style.alignItems){var e=(this.container.contentSize[this.key.contentHeight]-t)/(this.container.lines.length+1);this.container.lines.forEach((function(t){t.offsetY=e}))}if("flex-end"===this.container.style.alignItems){var i=this.container.contentSize[this.key.contentHeight]-t;this.container.lines[0].offsetY=i}},r.getOffsetY=function(t){return this.container.lines.length>1?0:"flex-end"===t.style.alignSelf?this.container.contentSize[this.key.contentHeight]-t.contentSize[this.key.height]:"center"===t.style.alignSelf?(this.container.contentSize[this.key.contentHeight]-t.contentSize[this.key.height])/2:0},n}(L),E=p,H=f,$=l,D=v,N="inline-block",U="absolute",Y="fixed",X=0,J={left:null,top:null,width:null,height:null},V=function(){function t(t,e,i,n){var r=this;I(this,"id",X++),I(this,"style",{left:null,top:null,width:null,height:null}),I(this,"computedStyle",{}),I(this,"originStyle",{}),I(this,"children",{}),I(this,"layoutBox",M({},J)),I(this,"contentSize",M({},J)),I(this,"clientSize",M({},J)),I(this,"borderSize",M({},J)),I(this,"offsetSize",M({},J)),this.ctx=n,this.root=i,e&&(this.parent=e),this.name=t.name||t.type,this.attributes=this.getAttributes(t);var o=this.getComputedStyle(t,null==e?void 0:e.computedStyle);this.isAbsolute=o.position==U,this.isFixed=o.position==Y,this.originStyle=o,Object.keys(o).forEach((function(t){Object.defineProperty(r.style,t,{configurable:!0,enumerable:!0,get:function(){return o[t]},set:function(e){o[t]=e}})}));var a={contentSize:M({},this.contentSize),clientSize:M({},this.clientSize),borderSize:M({},this.borderSize),offsetSize:M({},this.offsetSize)};Object.keys(a).forEach((function(t){Object.keys(r[t]).forEach((function(e){Object.defineProperty(r[t],e,{configurable:!0,enumerable:!0,get:function(){return a[t][e]},set:function(i){a[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.getChildren=function(){var t=this;return Object.keys(this.children).map((function(e){return t.children[e]}))},e.getLineRect=function(t,e){var i=e?e.lines:this.parent&&this.parent.lines;return i&&i.find((function(e){return e.ids.includes(t)}))||{width:0,height:0}},e.getComputedStyle=function(t,e){var i=["color","fontSize","lineHeight","verticalAlign","fontWeight","textAlign"],n=t.css,o=void 0===n?{}:n,a=t.type,s=void 0===a?$:a,h=M({},b);if([H,E,D].includes(s)&&!o.display&&(h.display=N),e)for(var c=0;c<i.length;c++){var d=i[c];(o[d]||e[d])&&(o[d]=o[d]||e[d])}for(var u=function(){var t=f[l],e=o[t];if(/-/.test(t)&&(t=t.replace(/-([a-z])/g,(function(t,e){return e.toUpperCase()})),h.key=e),/^(box|text)?shadow$/i.test(t)){var i=[];return e.replace(/((\d+(rpx|px)?\s+?){3})(.+)/,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];i=e[1].match(/\d+(rpx|px)?/g).map((function(t){return P(t)})).concat(e[4])})),/^text/.test(t)?h.textShadow=i:h.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]+/),d=e.replace(/([\(,])\s+|\s+([\),])/g,"$1$2").split(" ").map((function(t){return/^\d/.test(t)?P(t,""):t}));return h[a]=((n={})[a+"Width"]=S(d[0])?d[0]:0,n[a+"Style"]=d[1]||"solid",n[a+"Color"]=d[2]||"black",n),1==d.length&&c&&(h[a][a+c[0]]=d[0]),"continue"}if(/^background(color)?$/i.test(t))return h.backgroundColor=e,"continue";if(/^objectPosition$/i.test(t))return h[t]=e.split(" "),"continue";if(/padding|margin|radius/i.test(t)){var u=/radius$/i.test(t),p=u?"borderRadius":t.match(/[a-z]+/)[0],v=[0,0,0,0].map((function(t,e){return u?["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"][e]:[p+"Top",p+"Right",p+"Bottom",p+"Left"][e]})),g="margin";if("padding"===t||t===g||/^(border)?radius$/i.test(t)){var b,m=(null==e?void 0:e.split(" ").map((function(e){return/^\d+(rpx|px)?$/.test(e)?P(e):t!=g&&/auto/.test(e)?0:e}),[]))||[0],y=u?"borderRadius":t,x=m[0],w=m[1],z=m[2],k=m[3];h[y]=((b={})[v[0]]=T(x)?0:x,b[v[1]]=S(w)||T(w)?w:x,b[v[2]]=T(S(z)?z:x)?0:S(z)?z:x,b[v[3]]=S(k)?k:w||x,b)}else{var I;"object"==(0,r.default)(h[p])||(h[p]=((I={})[v[0]]=h[p]||0,I[v[1]]=h[p]||0,I[v[2]]=h[p]||0,I[v[3]]=h[p]||0,I)),h[p][t]=p==g&&T(e)||j(e)?e:P(e)}return"continue"}if(/^transform$/i.test(t))return h[t]={},e.replace(/([a-zA-Z]+)\(([0-9,-\.%rpxdeg\s]+)\)/g,(function(e,i,n){var r=n.split(",").map((function(t){return t.replace(/(^\s*)|(\s*$)/g,"")})),a=function(t,e){return t.includes("deg")?1*t:e&&!j(e)?P(t,e):t};i.includes("matrix")?h[t][i]=r.map((function(t){return 1*t})):i.includes("rotate")?h[t][i]=1*n.match(/^-?\d+(\.\d+)?/)[0]:/[X, Y]/.test(i)?h[t][i]=/[X]/.test(i)?a(r[0],o.width):a(r[0],o.height):(h[t][i+"X"]=a(r[0],o.width),h[t][i+"Y"]=a(r[1]||r[0],o.height))})),"continue";/^font$/i.test(t)&&console.warn("font 不支持简写"),/^left|top$/i.test(t)&&![U,Y].includes(o.position)?h[t]=0:h[t]=/^[\d\.]+(px|rpx)?$/.test(e)?P(e):/em$/.test(e)&&s==H?P(e,o.fontSize):e},l=0,f=Object.keys(o);l<f.length;l++)u();return h},e.setPosition=function(t,e){var i={left:"width",top:"height",right:"width",bottom:"height"};Object.keys(i).forEach((function(n){var r="right"==n?"left":"top";["right","bottom"].includes(n)&&void 0!==t.style[n]&&"number"!=typeof t.originStyle[r]?t.style[r]=e[i[n]]-t.offsetSize[i[n]]-P(t.style[n],e[i[n]]):t.style[n]=P(t.style[n],e[i[n]])}))},e.getAttributes=function(t){var e=t.attributes||{};return(t.url||t.src)&&(e.src=e.src||t.url||t.src),t.replace&&(e.replace=t.replace),t.text&&(e.text=t.text),e},e.getOffsetSize=function(t,e,i){void 0===i&&(i=u[3]);var n=e||{},r=n.margin,o=(r=void 0===r?{}:r).marginLeft,a=void 0===o?0:o,s=r.marginTop,h=void 0===s?0:s,c=r.marginRight,d=void 0===c?0:c,l=r.marginBottom,f=void 0===l?0:l,p=n.padding,v=(p=void 0===p?{}:p).paddingLeft,g=void 0===v?0:v,b=p.paddingTop,m=void 0===b?0:b,y=p.paddingRight,x=void 0===y?0:y,w=p.paddingBottom,S=void 0===w?0:w,P=n.border,z=(P=void 0===P?{}:P).borderWidth,k=void 0===z?0:z,I=n.borderTop,M=(I=void 0===I?{}:I).borderTopWidth,O=void 0===M?k:M,B=n.borderBottom,W=(B=void 0===B?{}:B).borderBottomWidth,R=void 0===W?k:W,T=n.borderRight,j=(T=void 0===T?{}:T).borderRightWidth,C=void 0===j?k:j,F=n.borderLeft,L=(F=void 0===F?{}:F).borderLeftWidth,A=void 0===L?k:L,_=a<0&&d<0?Math.abs(a+d):0,E=h<0&&f<0?Math.abs(h+f):0,H=a>=0&&d<0,$=h>=0&&f<0;return i==u[0]&&(this[i].left=t.left+a+g+A+(H?2*-d:0),this[i].top=t.top+h+m+O+($?2*-f:0),this[i].width=t.width+(this[i].widthAdd?0:_),this[i].height=t.height+(this[i].heightAdd?0:E),this[i].widthAdd=_,this[i].heightAdd=E),i==u[1]&&(this[i].left=t.left+a+A+(H<0?-d:0),this[i].top=t.top+h+O+($?-f:0),this[i].width=t.width+g+x,this[i].height=t.height+m+S),i==u[2]&&(this[i].left=t.left+a+A/2+(H<0?-d:0),this[i].top=t.top+h+O/2+($?-f:0),this[i].width=t.width+g+x+A/2+C/2,this[i].height=t.height+m+S+R/2+O/2),i==u[3]&&(this[i].left=t.left+(H<0?-d:0),this[i].top=t.top+($?-f:0),this[i].width=t.width+g+x+A+C+a+d,this[i].height=t.height+m+S+R+O+f+h),this[i]},e.layoutBoxUpdate=function(t,e,i,n){var r=this;if(void 0===i&&(i=-1),"border-box"==e.boxSizing){var o=e||{},a=o.border,s=(a=void 0===a?{}:a).borderWidth,h=void 0===s?0:s,c=o.borderTop,d=(c=void 0===c?{}:c).borderTopWidth,l=void 0===d?h:d,f=o.borderBottom,p=(f=void 0===f?{}:f).borderBottomWidth,v=void 0===p?h:p,g=o.borderRight,b=(g=void 0===g?{}:g).borderRightWidth,m=void 0===b?h:b,y=o.borderLeft,x=(y=void 0===y?{}:y).borderLeftWidth,w=void 0===x?h:x,S=o.padding,P=(S=void 0===S?{}:S).paddingTop,z=void 0===P?0:P,k=S.paddingRight,I=void 0===k?0:k,M=S.paddingBottom,O=void 0===M?0:M,B=S.paddingLeft,W=void 0===B?0:B;i||(t.width-=W+I+m+w),1!==i||n||(t.height-=z+O+l+v)}this.layoutBox&&(u.forEach((function(i){return r.layoutBox[i]=r.getOffsetSize(t,e,i)})),this.layoutBox=Object.assign({},this.layoutBox,this.layoutBox.borderSize))},e.getBoxPosition2=function(){var t=this.computedStyle,e=this.fixedLine,i=this.lines,n=t.left,r=void 0===n?0:n,o=t.top,a=void 0===o?0:o,s=t.padding||{},h=s.paddingBottom,c=void 0===h?0:h,d=s.paddingRight,u=void 0===d?0:d,l=M({},this.contentSize,{left:r,top:a}),f=this.contentSize.top-this.offsetSize.top,p=this.contentSize.left-this.offsetSize.left;if(this.root.fixedLine&&!this.root.isDone){this.root.isDone=!0;for(var v,g=W(this.root.fixedLine.elements);!(v=g()).done;){var b=v.value;b.setPosition(b,this.root.offsetSize),b.getBoxPosition2()}}if(e)for(var m,y=W(e.elements);!(m=y()).done;){var x=m.value;x.setPosition(x,l),x.style.left+=r+p+u,x.style.top+=a+f+c,x.getBoxPosition2()}if(i)for(var w,S=W(i);!(w=S()).done;)w.value.layout(l.top+f,l.left+p);return this.layoutBoxUpdate(l,t),this.layoutBox},e.getBoxState=function(t,e){return this.isBlock(t)||this.isBlock(e)},e.isBlock=function(t){return void 0===t&&(t=this),t&&"block"==t.style.display},e.isFlex=function(t){return void 0===t&&(t=this),t&&"flex"==t.style.display},e.isInFlow=function(){return!(this.isAbsolute||this.isFixed)},e.inFlexBox=function(t){return void 0===t&&(t=this),!!t.isInFlow()&&!!t.parent&&(!(!t.parent||"flex"!==t.parent.style.display)||void 0)},e.isInline=function(t){return void 0===t&&(t=this),t&&t.style.display==N},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),n=i.width,r=i.actualBoundingBoxAscent,o=i.actualBoundingBoxDescent;return{ascent:r,descent:o,width:n,fontHeight:r+o||.7*e+1}},e.getBoxWidthHeight=function(){var t,e=this,i=this.name,n=this.computedStyle,r=this.attributes,o=this.parent,a=void 0===o?{}:o,s=this.ctx,h=this.getChildren(),c=n.left,d=void 0===c?0:c,u=n.top,l=void 0===u?0:u,f=n.bottom,p=n.right,v=n.width,g=void 0===v?0:v,b=n.minWidth,m=n.maxWidth,y=n.minHeight,x=n.maxHeight,w=n.height,S=void 0===w?0:w,z=n.fontSize,k=void 0===z?14:z,I=n.fontWeight,M=n.fontFamily,O=n.fontStyle,B=n.position,W=n.lineClamp,R=n.lineHeight,T=n.padding,C=void 0===T?{}:T,F=n.margin,A=void 0===F?{}:F,D=n.border,N=(D=void 0===D?{}:D).borderWidth,Y=void 0===N?0:N,X=n.borderRight,J=(X=void 0===X?{}:X).borderRightWidth,V=void 0===J?Y:J,q=n.borderLeft,G=(q=void 0===q?{}:q).borderLeftWidth,Q=void 0===G?Y:G,K=a.contentSize&&a.contentSize.width,Z=a.contentSize&&a.contentSize.height;if(j(g)&&K&&(g=P(g,K)),j(g)&&!K&&(g=null),j(S)&&Z&&(S=P(S,Z)),j(S)&&!Z&&(S=null),j(b)&&K&&(b=P(b,K)),j(m)&&K&&(m=P(m,K)),j(y)&&Z&&(y=P(y,Z)),j(x)&&Z&&(x=P(x,Z)),n.padding&&null!=(t=a.contentSize)&&t.width)for(var tt in n.padding)Object.hasOwnProperty.call(n.padding,tt)&&(n.padding[tt]=P(n.padding[tt],K));var et=C.paddingRight,it=void 0===et?0:et,nt=C.paddingLeft,rt=void 0===nt?0:nt;if(n.margin&&[n.margin.marginLeft,n.margin.marginRight].includes("auto"))if(g){var ot=K&&K-g-it-rt-Q-V||0;n.margin.marginLeft==n.margin.marginRight?n.margin.marginLeft=n.margin.marginRight=ot/2:"auto"==n.margin.marginLeft?n.margin.marginLeft=ot:n.margin.marginRight=ot}else n.margin.marginLeft=n.margin.marginRight=0;var at=A.marginRight,st=void 0===at?0:at,ht=A.marginLeft,ct={width:g,height:S,left:0,top:0},dt=rt+it+Q+V+(void 0===ht?0:ht)+st;if(i==H&&!this.attributes.widths){var ut=r.text||"";s.save(),s.setFonts({fontFamily:M,fontSize:k,fontWeight:I,fontStyle:O});var lt=new Map;ut.split("\n").map((function(t){var i=t.split("").map((function(t){var i=lt.get(t);if(i)return i;var n=e.measureText(t,k).width;return lt.set(t,n),n})),n=e.measureText(t,k),r=n.fontHeight,o=n.ascent,a=n.descent;e.attributes.fontHeight=r,e.attributes.ascent=o,e.attributes.descent=a,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(i==E&&null==g){var ft=r.width,pt=r.height;ct.width=this.contrastSize(Math.round(ft*S/pt)||0,b,m),this.layoutBoxUpdate(ct,n,0)}if(i==H&&null==g){var vt=this.attributes.widths,gt=Math.max.apply(Math,vt.map((function(t){return t.total})));a&&K>0&&(gt>K||this.isBlock(this))&&!this.isAbsolute&&!this.isFixed&&(gt=K-dt),ct.width=this.contrastSize(gt,b,m),this.layoutBoxUpdate(ct,n,0)}if(i==H&&!this.attributes.lines){var bt=this.attributes.widths.length;this.attributes.widths.forEach((function(t){return t.widths.reduce((function(t,e,i){return t+e>ct.width?(bt++,e):t+e}),0)})),bt=W&&bt>W?W:bt,this.attributes.lines=bt}if(i==E&&null==S){var mt=r.width,yt=r.height;ct.height=this.contrastSize(P(ct.width*yt/mt)||0,y,x),this.layoutBoxUpdate(ct,n,1)}i==H&&null==S&&(R=P(R,k),ct.height=this.contrastSize(P(this.attributes.lines*R),y,x),this.layoutBoxUpdate(ct,n,1,!0)),a&&a.children&&K&&([$,H].includes(i)&&this.isFlex()||i==$&&this.isBlock(this)&&!this.isInFlow())&&(ct.width=this.contrastSize(K-dt,b,m),this.layoutBoxUpdate(ct,n)),g&&!j(g)&&(ct.width=this.contrastSize(g,b,m),this.layoutBoxUpdate(ct,n,0)),S&&!j(S)&&(ct.height=this.contrastSize(ct.height,y,x),this.layoutBoxUpdate(ct,n,1));var xt=0;if(h.length){var wt=null;h.forEach((function(t,i){t.getBoxWidthHeight();var r=h[i+1];if(r&&r.isInFlow()&&(t.next=r),t.isInFlow()&&!t.inFlexBox()){var o=e.getBoxState(wt,t);e.line&&e.line.canIEnter(t)&&!o?e.line.add(t):(new L).bind(t),wt=t}else t.inFlexBox()?e.line&&(e.line.canIEnter(t)||"nowrap"==n.flexWrap)?e.line.add(t):(new _).bind(t):t.isFixed?e.root.fixedLine?e.root.fixedLine.fixedAdd(t):(new L).fixedBind(t):e.fixedLine?e.fixedLine.fixedAdd(t):(new L).fixedBind(t,1)})),this.lines&&(xt=this.lines.reduce((function(t,e){return t+e.height}),0))}var St=0,Pt=0;if(!g&&(this.isAbsolute||this.isFixed)&&K){var zt=B==U?K:this.root.width,kt=zt-(j(d)?P(d,zt):d)-(j(p)?P(p,zt):p);St=n.left?kt:this.lineMaxWidth}if(!S&&(null!=l?l:this.isAbsolute||this.isFixed&&Z)){var It=B==U?Z:this.root.height,Mt=It-(j(l)?P(l,It):l)-(j(f)?P(f,It):f);Pt=n.top?Mt:0}if(g&&!j(g)||ct.width||(ct.width=St||this.contrastSize((this.isBlock(this)&&!this.isInFlow()?K||a.lineMaxWidth:this.lineMaxWidth)||this.lineMaxWidth,b,m),this.layoutBoxUpdate(ct,n,0)),S||!xt&&!Pt||(ct.height=Pt||this.contrastSize(xt,y,x),this.layoutBoxUpdate(ct,n)),n.borderRadius&&this.borderSize&&this.borderSize.width)for(var tt in n.borderRadius)Object.hasOwnProperty.call(n.borderRadius,tt)&&(n.borderRadius[tt]=P(n.borderRadius[tt],this.borderSize.width));return this.layoutBox},e.layout=function(){return this.getBoxWidthHeight(),this.root.offsetSize=this.offsetSize,this.getBoxPosition2(),this.offsetSize},t}(),q=function(){var t,e,i,n,r,o,a=[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],s=[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],h=[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],c=[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],d=[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],u=[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],l=[],f=[],p=[],v=[],g=[],b=2;function m(t,e){var i;t>e&&(i=t,t=e,e=i),i=e,i*=e,i+=e,i>>=1,v[i+=t]=1}function y(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++)m(t-1,i+n),m(t+1,i-n),m(t-n,i-1),m(t+n,i+1)}function x(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t}var w=[];function S(t,e,i,n){var r,o,a;for(r=0;r<n;r++)l[i+r]=0;for(r=0;r<e;r++){if(255!=(a=d[l[t+r]^l[i]]))for(o=1;o<n;o++)l[i+o-1]=l[i+o]^u[x(a+w[n-o])];else for(o=i;o<i+n;o++)l[o]=l[o+1];l[i+n-1]=255==a?0:u[x(a+w[0])]}}function P(t,e){var i;return t>e&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,v[i+=t]}function z(t){var i,n,r,o;switch(t){case 0:for(n=0;n<e;n++)for(i=0;i<e;i++)i+n&1||P(i,n)||(p[i+n*e]^=1);break;case 1:for(n=0;n<e;n++)for(i=0;i<e;i++)1&n||P(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||P(i,n)||(p[i+n*e]^=1);break;case 3:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=o,i=0;i<e;i++,r++)3==r&&(r=0),r||P(i,n)||(p[i+n*e]^=1);break;case 4:for(n=0;n<e;n++)for(r=0,o=n>>1&1,i=0;i<e;i++,r++)3==r&&(r=0,o=!o),o||P(i,n)||(p[i+n*e]^=1);break;case 5:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+!(!r|!o)||P(i,n)||(p[i+n*e]^=1);break;case 6:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(i&n&1)+(r&&r==o)&1||P(i,n)||(p[i+n*e]^=1);break;case 7:for(o=0,n=0;n<e;n++,o++)for(3==o&&(o=0),r=0,i=0;i<e;i++,r++)3==r&&(r=0),(r&&r==o)+(i+n&1)&1||P(i,n)||(p[i+n*e]^=1)}}function k(t){var e,i=0;for(e=0;e<=t;e++)g[e]>=5&&(i+=3+g[e]-5);for(e=3;e<t-1;e+=2)g[e-2]==g[e+2]&&g[e+2]==g[e-1]&&g[e-1]==g[e+1]&&3*g[e-1]==g[e]&&(0==g[e-3]||e+3>t||3*g[e-3]>=4*g[e]||3*g[e+3]>=4*g[e])&&(i+=40);return i}function I(){var t,i,n,r,o,a=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)]))&&(a+=3);for(i=0;i<e;i++){for(g[0]=0,n=r=t=0;t<e;t++)(o=p[t+e*i])==r?g[n]++:g[++n]=1,s+=(r=o)?1:-1;a+=k(n)}s<0&&(s=-s);var h=s,c=0;for(h+=h<<2,h<<=1;h>e*e;)h-=e*e,c++;for(a+=10*c,t=0;t<e;t++){for(g[0]=0,n=r=i=0;i<e;i++)(o=p[t+e*i])==r?g[n]++:g[++n]=1,r=o;a+=k(n)}return a}var M=null;return{api:{get ecclevel(){return b},set ecclevel(t){b=t},get size(){return _size},set size(t){_size=t},get canvas(){return M},set canvas(t){M=t},getFrame:function(g){return function(g){var k,M,O,B,W,R,T,j;B=g.length,t=0;do{if(t++,O=4*(b-1)+16*(t-1),i=c[O++],n=c[O++],r=c[O++],o=c[O],B<=(O=r*(i+n)+n-3+(t<=9)))break}while(t<40);for(e=17+4*t,W=r+(r+o)*(i+n)+n,B=0;B<W;B++)f[B]=0;for(l=g.slice(0),B=0;B<e*e;B++)p[B]=0;for(B=0;B<(e*(e+1)+1)/2;B++)v[B]=0;for(B=0;B<3;B++){for(O=0,M=0,1==B&&(O=e-7),2==B&&(M=e-7),p[M+3+e*(O+3)]=1,k=0;k<6;k++)p[M+k+e*O]=1,p[M+e*(O+k+1)]=1,p[M+6+e*(O+k)]=1,p[M+k+1+e*(O+6)]=1;for(k=1;k<5;k++)m(M+k,O+1),m(M+1,O+k+1),m(M+5,O+k),m(M+k+1,O+5);for(k=2;k<4;k++)p[M+k+e*(O+2)]=1,p[M+2+e*(O+k+1)]=1,p[M+4+e*(O+k)]=1,p[M+k+1+e*(O+4)]=1}if(t>1)for(B=a[t],M=e-7;;){for(k=e-7;k>B-3&&(y(k,M),!(k<B));)k-=B;if(M<=B+9)break;y(6,M-=B),y(M,6)}for(p[8+e*(e-8)]=1,M=0;M<7;M++)m(7,M),m(e-8,M),m(7,M+e-7);for(k=0;k<8;k++)m(k,7),m(k+e-8,7),m(k,e-8);for(k=0;k<9;k++)m(k,8);for(k=0;k<8;k++)m(k+e-8,8),m(8,k);for(M=0;M<7;M++)m(8,M+e-7);for(k=0;k<e-14;k++)1&k?(m(8+k,6),m(6,8+k)):(p[8+k+6*e]=1,p[6+e*(8+k)]=1);if(t>6)for(B=s[t-7],O=17,k=0;k<6;k++)for(M=0;M<3;M++,O--)1&(O>11?t>>O-12:B>>O)?(p[5-k+e*(2-M+e-11)]=1,p[2-M+e-11+e*(5-k)]=1):(m(5-k,2-M+e-11),m(2-M+e-11,5-k));for(M=0;M<e;M++)for(k=0;k<=M;k++)p[k+e*M]&&m(k,M);for(W=l.length,R=0;R<W;R++)f[R]=l.charCodeAt(R);if(l=f.slice(0),W>=(k=r*(i+n)+n)-2&&(W=k-2,t>9&&W--),R=W,t>9){for(l[R+2]=0,l[R+3]=0;R--;)B=l[R],l[R+3]|=255&B<<4,l[R+2]=B>>4;l[2]|=255&W<<4,l[1]=W>>4,l[0]=64|W>>12}else{for(l[R+1]=0,l[R+2]=0;R--;)B=l[R],l[R+2]|=255&B<<4,l[R+1]=B>>4;l[1]|=255&W<<4,l[0]=64|W>>4}for(R=W+3-(t<10);R<k;)l[R++]=236,l[R++]=17;for(w[0]=1,R=0;R<o;R++){for(w[R+1]=1,T=R;T>0;T--)w[T]=w[T]?w[T-1]^u[x(d[w[T]]+R)]:w[T-1];w[0]=u[x(d[w[0]]+R)]}for(R=0;R<=o;R++)w[R]=d[w[R]];for(O=k,M=0,R=0;R<i;R++)S(M,r,O,o),M+=r,O+=o;for(R=0;R<n;R++)S(M,r+1,O,o),M+=r+1,O+=o;for(M=0,R=0;R<r;R++){for(T=0;T<i;T++)f[M++]=l[R+T*r];for(T=0;T<n;T++)f[M++]=l[i*r+R+T*(r+1)]}for(T=0;T<n;T++)f[M++]=l[i*r+R+T*(r+1)];for(R=0;R<o;R++)for(T=0;T<i+n;T++)f[M++]=l[k+R+T*o];for(l=f,k=M=e-1,O=W=1,j=(r+o)*(i+n)+n,R=0;R<j;R++)for(B=l[R],T=0;T<8;T++,B<<=1){128&B&&(p[k+e*M]=1);do{W?k--:(k++,O?0!=M?M--:(O=!O,6==(k-=2)&&(k--,M=9)):M!=e-1?M++:(O=!O,6==(k-=2)&&(k--,M-=8))),W=!W}while(P(k,M))}for(l=p.slice(0),B=0,M=3e4,O=0;O<8&&(z(O),(k=I())<M&&(M=k,B=O),7!=B);O++)p=l.slice(0);for(B!=O&&z(B),M=h[B+(b-1<<3)],O=0;O<8;O++,M>>=1)1&M&&(p[e-1-O+8*e]=1,O<6?p[8+e*O]=1:p[8+e*(O+1)]=1);for(O=0;O<7;O++,M>>=1)1&M&&(p[8+e*(e-7+O)]=1,O?p[6-O+8*e]=1:p[7+8*e]=1);return p}(g)},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,n,r,o){i.drawView(n,r);var a=i.ctx,s=n.contentSize,h=s.width,c=s.height,d=s.left,u=s.top;r.borderRadius,r.backgroundColor;var l=r.color,f=void 0===l?"#000000":l;if(r.border,n.contentSize.left,n.borderSize.left,n.contentSize.top,n.borderSize.top,b=o||b,a){a.save(),i.setOpacity(r),i.setTransform(n,r);var p=Math.min(h,c);t=this.utf16to8(t);var v=this.getFrame(t),g=p/e;a.setFillStyle(f);for(var m=0;m<e;m++)for(var y=0;y<e;y++)v[y*e+m]&&a.fillRect(d+g*m,u+g*y,g,g);a.restore(),i.setBorder(n,r)}else console.warn("No canvas provided to draw QR code in!")}}}}(),G=f,Q=v,K=l,Z="middle",et=function(){function t(t,e){var i,n=this;this.v="1.9.3.4",this.id=null,this.pixelRatio=1,this.width=0,this.height=0,this.sleep=1e3/30,this.count=0,this.isRate=!1,this.isDraw=!0,this.isCache=!0,this.fixed="",this.useCORS=!1,this.imageBus=[],this.createImage=function(t,e){return new Promise((function(i,r){var o=null;o=n.canvas.createImage?n.canvas.createImage():new Image,e&&o.setAttribute("crossOrigin","Anonymous"),o.src=t,o.onload=function(){i({width:o.naturalWidth||o.width,height:o.naturalHeight||o.height,path:o,src:this.src})},o.onerror=function(t){r(t)}}))},this.options=t,Object.assign(this,t),this.component=e,this.ctx=((i=t.context).setFonts=function(t){var e=t.fontFamily,n=void 0===e?"sans-serif":e,r=t.fontSize,o=void 0===r?14:r,a=t.fontWeight,s=void 0===a?"normal":a,h=t.fontStyle,c=void 0===h?"normal":h;y==d.MP_TOUTIAO&&(s="bold"==s?"bold":"",c="italic"==c?"italic":""),i.font="".concat(c," ").concat(s," ").concat(Math.round(o),"px ").concat(n)},i.draw&&i.setFillStyle?i:Object.assign(i,{setStrokeStyle:function(t){i.strokeStyle=t},setLineWidth:function(t){i.lineWidth=t},setLineCap:function(t){i.lineCap=t},setFillStyle:function(t){i.fillStyle=t},setFontSize:function(t){i.font="".concat(String(t),"px sans-serif")},setGlobalAlpha:function(t){i.globalAlpha=t},setLineJoin:function(t){i.lineJoin=t},setTextAlign:function(t){i.textAlign=t},setMiterLimit:function(t){i.miterLimit=t},setShadow:function(t,e,n,r){i.shadowOffsetX=t,i.shadowOffsetY=e,i.shadowBlur=n,i.shadowColor=r},setTextBaseline:function(t){i.textBaseline=t},createCircularGradient:function(){},draw:function(){}})),this.progress=0,this.root={width:t.width,height:t.height,fontSizeRate:1,fixedLine:null},this.size=this.root,this.init();var r=0;Object.defineProperty(this,"progress",{configurable:!0,set:function(t){r=t,n.lifecycle("onProgress",t/n.count)},get:function(){return r||0}})}return t.prototype.lifecycle=function(t,e){this.options.listen&&this.options.listen[t]&&this.options.listen[t](e)},t.prototype.init=function(t){t&&(this.ctx=t),(this.canvas.height||d.WEB==y)&&(this.canvas.height=this.size.height*this.pixelRatio,this.canvas.width=this.size.width*this.pixelRatio,this.ctx.scale(this.pixelRatio,this.pixelRatio))},t.prototype.clear=function(){this.ctx.clearRect(0,0,this.size.width,this.size.height)},t.prototype.clipPath=function(t,e,i,n,r,o,a){void 0===o&&(o=!1),void 0===a&&(a=!1);var s=this.ctx;if(/polygon/.test(r)){var h=r.match(/-?\d+(rpx|px|%)?\s+-?\d+(rpx|px|%)?/g)||[];s.beginPath(),h.map((function(r){var o=r.split(" "),a=o[0],s=o[1];return[P(a,i)+t,P(s,n)+e]})).forEach((function(t,e){0==e?s.moveTo(t[0],t[1]):s.lineTo(t[0],t[1])})),s.closePath(),a&&s.stroke(),o&&s.fill()}},t.prototype.roundRect=function(t,e,i,n,r,o,a){if(void 0===o&&(o=!1),void 0===a&&(a=!1),!(r<0)){var s=this.ctx;if(s.beginPath(),r){var h=r||{},c=h.borderTopLeftRadius,d=void 0===c?r||0:c,u=h.borderTopRightRadius,l=void 0===u?r||0:u,f=h.borderBottomRightRadius,p=void 0===f?r||0:f,v=h.borderBottomLeftRadius,g=void 0===v?r||0:v;s.arc(t+i-p,e+n-p,p,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+d),s.arc(t+d,e+d,d,Math.PI,1.5*Math.PI),s.lineTo(t+i-l,e),s.arc(t+i-l,e+l,l,1.5*Math.PI,2*Math.PI),s.lineTo(t+i,e+n-p)}else s.rect(t,e,i,n);s.closePath(),a&&s.stroke(),o&&s.fill()}},t.prototype.setTransform=function(t,e){var i=e.transform,n=e.transformOrigin,r=this.ctx,o=i||{},a=o.scaleX,s=void 0===a?1:a,h=o.scaleY,c=void 0===h?1:h,d=o.translateX,u=void 0===d?0:d,l=o.translateY,f=void 0===l?0:l,p=o.rotate,v=void 0===p?0:p,g=o.skewX,b=void 0===g?0:g,m=o.skewY,y=void 0===m?0:m,x=t.left,w=t.top,z=t.width,k=t.height;u=P(u,z)||0,f=P(f,k)||0;var I={top:P("0%",1),center:P("50%",1),bottom:P("100%",1)},M={left:P("0%",1),center:P("50%",1),right:P("100%",1)};if(n=n.split(" ").filter((function(t,e){return e<2})).reduce((function(t,e){if(/\d+/.test(e)){var i=P(e,1)/(/px|rpx$/.test(e)?S(t.x)?k:z:1);return S(t.x)?Object.assign(t,{y:i}):Object.assign(t,{x:i})}return S(M[e])&&!S(t.x)?Object.assign(t,{x:M[e]}):Object.assign(t,{y:I[e]||.5})}),{}),(u||f)&&r.translate(u,f),(s||c)&&r.scale(s,c),v){var O=x+z*n.x,B=w+k*n.y;r.translate(O,B),r.rotate(v*Math.PI/180),r.translate(-O,-B)}(b||y)&&r.transform(1,Math.tan(y*Math.PI/180),Math.tan(b*Math.PI/180),1,0,0)},t.prototype.setBackground=function(t,e,i,n,r){var o=this.ctx;t&&"transparent"!=t?function(t){return!(!t||!t.startsWith("linear")&&!t.startsWith("radial"))}(t)?function(t,e,i,n,r,o){t.startsWith("linear")?function(t,e,i,n,r,o){for(var a=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var o=t.match(/([-]?\d{1,3})deg/),a=o&&o[1]?parseFloat(o[1]):0;if(a>=360&&(a-=360),a<0&&(a+=360),0===(a=Math.round(a)))return{x0:Math.round(e/2)+n,y0:i+r,x1:Math.round(e/2)+n,y1:r};if(180===a)return{x0:Math.round(e/2)+n,y0:r,x1:Math.round(e/2)+n,y1:i+r};if(90===a)return{x0:n,y0:Math.round(i/2)+r,x1:e+n,y1:Math.round(i/2)+r};if(270===a)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(a===s)return{x0:n,y0:i+r,x1:e+n,y1:r};if(a===180-s)return{x0:n,y0:r,x1:e+n,y1:i+r};if(a===180+s)return{x0:e+n,y0:r,x1:n,y1:i+r};if(a===360-s)return{x0:e+n,y0:i+r,x1:n,y1:r};var h,c=0,d=0,u=0,l=0;if(a<s||a>180-s&&a<180||a>180&&a<180+s||a>360-s){var f=a*Math.PI/180,p=a<s||a>360-s?i/2:-i/2,v=Math.tan(f)*p,g=a<s||a>180-s&&a<180?e/2-v:-e/2-v;c=-(u=v+(h=Math.pow(Math.sin(f),2)*g)),d=-(l=p+h/Math.tan(f))}(a>s&&a<90||a>90&&a<90+s||a>180+s&&a<270||a>270&&a<360-s)&&(f=(90-a)*Math.PI/180,v=a>s&&a<90||a>90&&a<90+s?e/2:-e/2,p=Math.tan(f)*v,g=a>s&&a<90||a>270&&a<360-s?i/2-p:-i/2-p,c=-(u=v+(h=Math.pow(Math.sin(f),2)*g)/Math.tan(f)),d=-(l=p+h));return c=Math.round(c+e/2)+n,d=Math.round(i/2-d)+r,u=Math.round(u+e/2)+n,l=Math.round(i/2-l)+r,{x0:c,y0:d,x1:u,y1:l}}(r,t,e,i,n),s=a.x0,h=a.y0,c=a.x1,d=a.y1,u=o.createLinearGradient(s,h,c,d),l=r.match(/linear-gradient\((.+)\)/)[1],f=k(l.substring(l.indexOf(",")+1)),p=0;p<f.colors.length;p++)u.addColorStop(f.percents[p],f.colors[p]);o.setFillStyle(u)}(e,i,n,r,t,o):t.startsWith("radial")&&function(t,e,i,n,r,o){for(var a=k(r.match(/radial-gradient\((.+)\)/)[1]),s=Math.round(t/2)+i,h=Math.round(e/2)+n,c=o.createRadialGradient(s,h,0,s,h,Math.max(t,e)/2),d=0;d<a.colors.length;d++)c.addColorStop(a.percents[d],a.colors[d]);o.setFillStyle(c)}(e,i,n,r,t,o)}(t,e,i,n,r,o):o.setFillStyle(t):[d.MP_TOUTIAO,d.MP_BAIDU].includes(y)?o.setFillStyle("rgba(0,0,0,0)"):o.setFillStyle("transparent")},t.prototype.setShadow=function(t){var e=t.boxShadow,i=void 0===e?[]:e,n=this.ctx;if(i.length){var r=i[0],o=i[1],a=i[2],s=i[3];n.setShadow(r,o,a,s)}},t.prototype.setBorder=function(t,e){var i=this.ctx,n=t.width,r=t.height,o=t.left,a=t.top,s=e.border,h=e.borderBottom,c=e.borderTop,d=e.borderRight,u=e.borderLeft,l=e.borderRadius,f=e.lineCap,p=s||{},v=p.borderWidth,g=void 0===v?0:v,b=p.borderStyle,m=p.borderColor,x=h||{},w=x.borderBottomWidth,S=void 0===w?g:w,P=x.borderBottomStyle,z=void 0===P?b:P,k=x.borderBottomColor,I=void 0===k?m:k,M=c||{},O=M.borderTopWidth,B=void 0===O?g:O,W=M.borderTopStyle,R=void 0===W?b:W,T=M.borderTopColor,j=void 0===T?m:T,C=d||{},F=C.borderRightWidth,L=void 0===F?g:F,A=C.borderRightStyle,_=void 0===A?b:A,E=C.borderRightColor,H=void 0===E?m:E,$=u||{},D=$.borderLeftWidth,N=void 0===D?g:D,U=$.borderLeftStyle,Y=void 0===U?b:U,X=$.borderLeftColor,J=void 0===X?m:X,V=l||{},q=V.borderTopLeftRadius,G=void 0===q?l||0:q,Q=V.borderTopRightRadius,K=void 0===Q?l||0:Q,Z=V.borderBottomRightRadius,tt=void 0===Z?l||0:Z,et=V.borderBottomLeftRadius,it=void 0===et?l||0:et;if(h||u||c||d||s){var nt=function(t,e,n){"dashed"==e?/mp/.test(y)?i.setLineDash([Math.ceil(4*t/3),Math.ceil(4*t/3)]):i.setLineDash([Math.ceil(6*t),Math.ceil(6*t)]):"dotted"==e&&i.setLineDash([t,t]),i.setStrokeStyle(n)},rt=function(t,e,n,r,o,a,s,h,c,d,u,l,p,v,g){i.save(),i.setLineCap(g?"square":f),i.setLineWidth(l),nt(l,p,v),i.beginPath(),i.arc(t,e,s,Math.PI*c,Math.PI*d),i.lineTo(n,r),i.arc(o,a,h,Math.PI*d,Math.PI*u),i.stroke(),i.restore()};if(i.save(),s&&!h&&!u&&!c&&!d)return i.setLineWidth(g),nt(g,b,m),this.roundRect(o,a,n,r,l,!1,!!m),void i.restore();S&&rt(o+n-tt,a+r-tt,o+it,a+r,o+it,a+r-it,tt,it,.25,.5,.75,S,z,I,N&&L),N&&rt(o+it,a+r-it,o,a+G,o+G,a+G,it,G,.75,1,1.25,N,Y,J,B&&S),B&&rt(o+G,a+G,o+n-K,a,o+n-K,a+K,G,K,1.25,1.5,1.75,B,R,j,N&&L),L&&rt(o+n-K,a+K,o+n,a+r-tt,o+n-tt,a+r-tt,K,tt,1.75,2,.25,L,_,H,B&&S)}},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 a(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){return[2,new Promise((function(r,o){n.drawView(e,i,!0,!1,!0);var a=n,s=a.ctx;a.canvas;var h=e.width,c=e.height,d=e.left,u=e.top,l=i||{},f=l.borderRadius,p=void 0===f?0:f,v=l.backgroundImage,g=l.backgroundRepeat,b=void 0===g?"repeat":g;v&&function(t){var o=s.createPattern(t.src,b);s.setFillStyle(o),n.roundRect(d,u,h,c,p,!0,!1),n.setBorder(e,i),r()}(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 o=this.ctx,a=t.width,s=t.height,h=t.left,c=t.top,d=e||{},u=d.borderRadius,l=void 0===u?0:u,f=d.backgroundColor,p=void 0===f?"transparent":f,v=d.overflow;e.opacity&&this.setOpacity(e),this.setTransform(t,e),r&&(o.save(),this.setShadow(e)),i&&this.setBackground(p,a,s,h,c),e.clipPath?this.clipPath(h,c,a,s,e.clipPath,i,!1):this.roundRect(h,c,a,s,l,i,!1),r&&o.restore(),n&&this.setBorder(t,e),"hidden"==v&&o.clip()},t.prototype.drawImage=function(t,e,i,n){return void 0===e&&(e={}),void 0===i&&(i={}),void 0===n&&(n=!0),a(this,void 0,void 0,(function(){var r=this;return s(this,(function(o){switch(o.label){case 0:return[4,new Promise((function(o,h){return a(r,void 0,void 0,(function(){var r,a,h,c,u,l,f,p,v,g,b,m,x,w,S,k,I,M,O,B,W,R=this;return s(this,(function(s){return r=this.ctx,a=i.borderRadius,h=void 0===a?0:a,c=i.backgroundColor,u=void 0===c?"transparent":c,l=i.objectFit,f=void 0===l?"fill":l,p=i.backgroundSize,v=void 0===p?"fill":p,g=i.objectPosition,b=i.backgroundPosition,m=i.boxShadow,i.backgroundImage&&(f=v,g=b),m&&this.drawView(e,Object.assign(i,{backgroundColor:u||m&&(u||"#ffffff")}),!0,!1,!0),x=e.width,w=e.height,S=e.left,k=e.top,r.save(),I=e.contentSize.left-e.borderSize.left,M=e.contentSize.top-e.borderSize.top,n||(this.setOpacity(i),this.setTransform(e,i),this.setBackground(u,x,w,S,k),this.roundRect(S,k,x,w,h,!!(h||!m&&u),!1)),S+=I,k+=M,r.clip(),O=function(t){if("fill"!==f){var i=function(t,e,i){var n=t.objectFit,r=t.objectPosition,o=e.width/e.height,a=i.width/i.height,s=1;"contain"==n&&o>=a||"cover"==n&&o<a?s=e.height/i.height:("contain"==n&&o<a||"cover"==n&&o>=a)&&(s=e.width/i.width);var h=i.width*s,c=i.height*s,d=r||[],u=d[0],l=d[1],f=/^\d+px|rpx$/.test(u)?P(u,e.width):(e.width-h)*(z(u)?P(u,1):{left:0,center:.5,right:1}[u||"center"]),p=/^\d+px|rpx$/.test(l)?P(l,e.height):(e.height-c)*(z(l)?P(l,1):{top:0,center:.5,bottom:1}[l||"center"]),v=function(t,e){return[(t-f)/s,(e-p)/s]},g=v(0,0),b=g[0],m=g[1],y=v(e.width,e.height),x=y[0],w=y[1];return{sx:Math.max(b,0),sy:Math.max(m,0),sw:Math.min(x-b,i.width),sh:Math.min(w-m,i.height),dx:Math.max(f,0),dy:Math.max(p,0),dw:Math.min(h,e.width),dh:Math.min(c,e.height)}}({objectFit:f,objectPosition:g},e.contentSize,t),n=i.sx,o=i.sy,a=i.sh,s=i.sw,h=i.dx,c=i.dy,u=i.dh,l=i.dw;y==d.MP_BAIDU?r.drawImage(t.src,h+S,c+k,l,u,n,o,s,a):r.drawImage(t.src,n,o,s,a,h+S,c+k,l,u)}else r.drawImage(t.src,S,k,x,w)},B=function(){r.restore(),R.drawView(e,i,!1,!0,!1),o(1)},W=function(t){O(t),B()},W(t),[2]}))}))}))];case 1:return o.sent(),[2]}}))}))},t.prototype.drawText=function(t,e,i,n){var r=this.ctx,o=e.borderSize,a=e.contentSize,s=e.left,h=e.top,c=a.width,d=a.height,u=a.left-o.left,l=a.top-o.top,f=i.color,p=void 0===f?"#000000":f,v=i.lineHeight,g=void 0===v?"1.4em":v,b=i.fontSize,m=void 0===b?14:b,y=i.fontWeight,x=i.fontFamily,w=i.fontStyle,S=i.textAlign,z=void 0===S?"left":S,k=i.verticalAlign,I=void 0===k?Z:k,M=i.backgroundColor,O=i.lineClamp,B=i.backgroundClip,W=i.textShadow,R=i.textDecoration;if(this.drawView(e,i,B!=G),g=P(g,m),t){switch(r.save(),this.setShadow({boxShadow:W}),s+=u,h+=l,r.setFonts({fontFamily:x,fontSize:m,fontWeight:y,fontStyle:w}),r.setTextBaseline(Z),r.setTextAlign(z),B?this.setBackground(M,c,d,s,h):r.setFillStyle(p),z){case"left":break;case"center":s+=.5*c;break;case"right":s+=c}var T=n.lines*g,j=Math.ceil((d-T)/2);switch(j<0&&(j=0),I){case"top":break;case Z:h+=j;break;case"bottom":h+=2*j}var C=n.fontHeight,F=n.descent,L=(g-C)/2,A=function(t){var e=r.measureText(t),i=e.actualBoundingBoxDescent,n=void 0===i?0:i,o=e.actualBoundingBoxAscent,a=void 0===o?0:o,s=n+a||.7*m+1;return"top"==I?{fix:a,height:s,lineY:g-s}:I==Z?{fix:g/2+n/4,height:s,lineY:(g-s)/2}:"bottom"==I?{fix:g-n,height:s,lineY:0}:{fix:0,height:0,lineY:0}},_=function(t,e,i){var o=t;switch(z){case"left":o+=i;break;case"center":o=(t-=i/2)+i;break;case"right":o=t,t-=i}if(R){r.setLineWidth(m/13),r.beginPath();var a=.1*n.fontHeight;/\bunderline\b/.test(R)&&(F||(e+=L/2),r.moveTo(t,e+a),r.lineTo(o,e+a)),/\boverline\b/.test(R)&&(F||(e-=L/2),r.moveTo(t,e-n.fontHeight-a),r.lineTo(o,e-n.fontHeight-a)),/\bline-through\b/.test(R)&&(r.moveTo(t,e-.5*n.fontHeight),r.lineTo(o,e-.5*n.fontHeight)),r.closePath(),r.setStrokeStyle(p),r.stroke()}};if(!n.widths||1==n.widths.length&&n.widths[0].total<=a.width){var E=A(t),H=E.fix,$=E.lineY;return r.fillText(t,s,h+H),_(s,(h+=g)-$,n&&n.widths&&n.widths[0].total||n.text),r.restore(),void this.setBorder(e,i)}for(var D=t.split(""),N=h,U=s,Y="",X=0,J=0;J<=D.length;J++){var V=D[J]||"",q="\n"===V,Q=""==V,K=Y+(V=q?"":V),tt=r.measureText(K).width;if(X>=O)break;if(U=s,tt>a.width||q||Q){if(X++,Y=Q&&tt<=a.width?K:Y,X===O&&tt>c){for(;r.measureText("".concat(Y,"...")).width>a.width&&!(Y.length<=1);)Y=Y.substring(0,Y.length-1);Y+="..."}var et=A(Y);if(H=et.fix,$=et.lineY,r.fillText(Y,U,h+H),_(U,(h+=g)-$,tt),Y=V,h>N+d)break}else Y=K}r.restore()}},t.prototype.source=function(t){var e;return a(this,void 0,void 0,(function(){var i,n,r,o=this;return s(this,(function(a){switch(a.label){case 0:if(this.node=null,i=+new Date,"{}"==JSON.stringify(t))return[2];if(!t.type)for(n in t.type=K,t.css=t.css||{},t)["views","children","type","css"].includes(n)||(t.css[n]=t[n],delete t[n]);return(null===(e=t.css)||void 0===e?void 0:e.width)||t.css||(t.css={}),[4,this.create(t)];case 1:return r=a.sent(),this.size=(null==r?void 0:r.layout())||{},this.node=r,this.onEffectFinished().then((function(t){return o.lifecycle("onEffectSuccess",t)})).catch((function(t){return o.lifecycle("onEffectFail",t)})),console.log("布局用时:"+(+new Date-i)+"ms"),[2,this.size]}}))}))},t.prototype.getImageInfo=function(t){return this.imageBus[t]||(this.imageBus[t]=this.createImage(t,this.useCORS)),this.imageBus[t]},t.prototype.create=function(t,e){var i,n;return a(this,void 0,void 0,(function(){var r,a,h,c,d,u,l,f,p,v,g,b,m,y,x,w,S;return s(this,(function(s){switch(s.label){case 0:if(r="image"==t.type,a=[G,Q].includes(t.type),h=t.css||{},c=h.backgroundImage,d=h.display,r&&!t.src&&!t.url||a&&!t.text)return[2];if("none"==d)return[2];if(a&&(t.text=String(t.text)),!(r||t.type==K&&c))return[3,4];u=r?t.src:"",l=/url\((.+)\)/,c&&(null===(i=l.exec(c))||void 0===i?void 0:i[1])&&(u=(null===(n=l.exec(c))||void 0===n?void 0:n[1])||""),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.getImageInfo(u)];case 2:return f=s.sent(),p=f.width,v=f.height,!(g=f.path)&&r?[2]:(g&&(t.attributes=Object.assign(t.attributes||{},{width:p,height:v,path:g,src:g,naturalSrc:u})),[3,4]);case 3:return b=s.sent(),t.type!=K?[2]:(this.lifecycle("onEffectFail",o(o({},b),{src:u})),[3,4]);case 4:if(this.count+=1,m=new V(t,e,this.root,this.ctx),!(y=t.views||t.children))return[3,8];x=0,s.label=5;case 5:return x<y.length?(w=y[x],[4,this.create(w,m)]):[3,8];case 6:(S=s.sent())&&m.add(S),s.label=7;case 7:return x++,[3,5];case 8:return[2,m]}}))}))},t.prototype.drawNode=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,(function(){var i,n,r,o,a,h,c,d,u,l,f,p,v,g,b,m,y,x,w,S;return s(this,(function(s){switch(s.label){case 0:return i=t.layoutBox,n=t.computedStyle,r=t.attributes,o=t.name,a=t.children,h=t.fixedLine,c=t.attributes,d=c.src,u=c.text,["fixed"].includes(n.position)&&!e?[2]:(this.ctx.save(),o!==K?[3,7]:d?n.backgroundRepeat?[4,this.drawPattern(r,i,n)]:[3,2]:[3,5]);case 1:return s.sent(),[3,4];case 2:return[4,this.drawImage(r,i,n,!1)];case 3:s.sent(),s.label=4;case 4:return[3,6];case 5:this.drawView(i,n),s.label=6;case 6:return[3,10];case 7:return"image"===o&&d?[4,this.drawImage(r,i,n,!1)]:[3,9];case 8:return s.sent(),[3,10];case 9:o===G?this.drawText(u,i,n,r):o===Q&&q.api&&q.api.draw(u,this,i,n),s.label=10;case 10:if(this.progress+=1,f=(l=h||{}).beforeElements,p=l.afterElements,!f)return[3,14];v=0,g=f,s.label=11;case 11:return v<g.length?(S=g[v],[4,this.drawNode(S)]):[3,14];case 12:s.sent(),s.label=13;case 13:return v++,[3,11];case 14:if(!a)return[3,18];b=Object.values?Object.values(a):Object.keys(a).map((function(t){return a[t]})),m=0,y=b,s.label=15;case 15:return m<y.length?"absolute"===(S=y[m]).computedStyle.position?[3,17]:[4,this.drawNode(S)]:[3,18];case 16:s.sent(),s.label=17;case 17:return m++,[3,15];case 18:if(!p)return[3,22];x=0,w=p,s.label=19;case 19:return x<w.length?(S=w[x],[4,this.drawNode(S)]):[3,22];case 20:s.sent(),s.label=21;case 21:return x++,[3,19];case 22:return this.ctx.restore(),[2]}}))}))},t.prototype.render=function(t){var e=this;return void 0===t&&(t=30),new Promise((function(i,n){return a(e,void 0,void 0,(function(){var e,r,o,a,h,c,d,u,l,f;return s(this,(function(s){switch(s.label){case 0:return e=+new Date,this.init(),[4,(p=t,void 0===p&&(p=0),new Promise((function(t){return setTimeout(t,p)})))];case 1:s.sent(),s.label=2;case 2:if(s.trys.push([2,14,,15]),!this.node)return[3,12];if(r=this.root.fixedLine||{},o=r.beforeElements,a=r.afterElements,!o)return[3,6];h=0,c=o,s.label=3;case 3:return h<c.length?(l=c[h],[4,this.drawNode(l,!0)]):[3,6];case 4:s.sent(),s.label=5;case 5:return h++,[3,3];case 6:return[4,this.drawNode(this.node)];case 7:if(s.sent(),!a)return[3,11];d=0,u=a,s.label=8;case 8:return d<u.length?(l=u[d],[4,this.drawNode(l,!0)]):[3,11];case 9:s.sent(),s.label=10;case 10:return d++,[3,8];case 11:return i(this.node),[3,13];case 12:this.lifecycle("onEffectFail","node is empty"),s.label=13;case 13:return[3,15];case 14:return f=s.sent(),this.lifecycle("onEffectFail",f),n(f),[3,15];case 15:return console.log("渲染用时:"+(+new Date-e-30)+"ms"),[2]}var p}))}))}))},t.prototype.onEffectFinished=function(){var t=this,e=Object.keys(this.imageBus).map((function(e){return t.imageBus[e]}));return Promise.all(e)},t.prototype.destroy=function(){this.node=[]},t.prototype.save=function(t){try{var e=t||{},i=e.fileType,n=void 0===i?"png":i,r=e.quality,o=void 0===r?1:r;return this.canvas.toDataURL("image/".concat(n),o)}catch(t){return this.lifecycle("onEffectFail","image cross domain"),t}},t}();e.default=e.Painter=et,d.WEB==y&&(window.Painter=et)},"1cbb":function(t,e,i){"use strict";i.r(e);var n=i("9046"),r=i("4f06");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("8057");var a=i("828b"),s=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,"85188b92",null,!1,n["a"],void 0);e["default"]=s.exports},"20f3":function(t,e,i){"use strict";var n=i("8bdb"),r=i("5145");n({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},"28dc":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.base64ToPath=function(t){var e=/^data:image\/(\w+);base64,/.exec(t)||[],i=(0,s.default)(e,2);i[1];return new Promise((function(e,i){for(var n=t.split(",")[0].split(":")[1].split(";")[0],r=atob(t.split(",")[1]),o=new ArrayBuffer(r.length),a=new Uint8Array(o),s=0;s<r.length;s++)a[s]=r.charCodeAt(s);e(URL.createObjectURL(new Blob([a],{type:n})))}))},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),o=parseInt(e[n],10);if(r>o)return 1;if(r<o)return-1}return 0},e.downloadFile=function(t){return t?new Promise((function(e,i){if(c[t])return i();c[t]=1,uni.downloadFile({url:t,success:function(t){e(t)},fail:function(t){i(t)}})})):Promise.reject({err:"no url"})},e.getImageInfo=function(t,e){return new Promise(function(){var i=(0,a.default)((0,r.default)().mark((function i(n,a){var s;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(s=t,!c[t]||!c[t].errMsg){i.next=5;break}n(c[t]),i.next=16;break;case 5:if(i.prev=5,!e){i.next=10;break}return i.next=9,u(t);case 9:s=i.sent;case 10:i.next=15;break;case 12:i.prev=12,i.t0=i["catch"](5),a((0,o.default)((0,o.default)({},i.t0),{},{src:s}));case 15:uni.getImageInfo({src:s,success:function(e){e.path=e.path.replace(/^\./,window.location.origin),h?n(e):(c[t]=e,n(c[t]))},fail:function(e){a({err:e,path:t})}});case 16:case"end":return i.stop()}}),i,null,[[5,12]])})));return function(t,e){return i.apply(this,arguments)}}())},e.isBase64=void 0,e.isNumber=d,e.networkReg=void 0,e.pathToBase64=u,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(d(e))return 1*e;if("string"===typeof e){var r=/^-?([0-9]+)?([.]{1}[0-9]+){0,1}(em|rpx|px|%)$/g,o=r.exec(e);if(!e||!o)return 0;var a=o[3];e=parseFloat(e);var s=0;return"rpx"===a?s=uni.upx2px(e):"px"===a?s=1*e:"%"===a?s=e*t(i)/100:"em"===a&&(s=e*t(i||14)),n?1*s.toFixed(2):Math.round(s)}return 0};var r=n(i("2634")),o=n(i("9b1b")),a=n(i("2fdc")),s=n(i("5de6"));i("5c47"),i("0506"),i("bf0f"),i("4626"),i("e838"),i("aa9c"),i("e966"),i("80e3"),i("4db2"),i("5ef2"),i("c976"),i("4d8f"),i("7b97"),i("668a"),i("c5b7"),i("8ff5"),i("2378"),i("641a"),i("64e0"),i("cce3"),i("efba"),i("d009"),i("bd7d"),i("7edd"),i("d798"),i("f547"),i("5e54"),i("b60a"),i("8c18"),i("12973"),i("f991"),i("198e"),i("8557"),i("63b1"),i("1954"),i("1cf1"),i("a1c1"),i("c9b5"),i("15d1"),i("d5c6"),i("5a56"),i("f074"),i("18f7"),i("de6c"),i("dc89"),i("2425");e.networkReg=/^(http|\/\/)/;e.isBase64=function(t){return/^data:image\/(\w+);base64/.test(t)};var h=["devtools"].includes(uni.getSystemInfoSync().platform),c={};function d(t){return/^-?\d+(\.\d+)?$/.test(t)}function u(t){return/^data:/.test(t)?t:new Promise((function(e,i){var n=new Image;n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){var t=document.createElement("canvas");t.width=this.naturalWidth,t.height=this.naturalHeight,t.getContext("2d").drawImage(n,0,0);var i=t.toDataURL("image/png");e(i),t.height=t.width=0},n.src=t+"?v="+Math.random(),n.onerror=function(t){i(t)}}))}},"30f7":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=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.")},i("7a76"),i("c9b5")},3695:function(t,e,i){"use strict";var n=i("f5bd").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,a.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,o.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;this._uid||(this._uid=this._.uid),Object.defineProperty(this,"parent",{get:function(){return e[t]||[]}}),Object.defineProperty(this,"index",{get:function(){e.bindRelation();var t=e.parent;t=void 0===t?{}:t;var i=t.el;i=void 0===i?{}:i;var n=i.views,r=void 0===n?[]:n;return r.indexOf(e.el)}}),this.el.type=this.type,this.bindRelation()},beforeDestroy:function(){this.removeEl()},methods:{removeEl:function(){var t=this;this.parent&&(this.parent.el.views=this.parent.el.views.filter((function(e){return e._uid!==t._uid})))},bindRelation:function(){var t=this;if(this.el._uid||(this.el._uid=this._uid),["text","qrcode"].includes(this.type)&&(this.el.text=this.$slots&&this.$slots.default&&this.$slots.default[0].text||"".concat(this.text||"").replace(/\\n/g,"\n")),"image"==this.type&&(this.el.src=this.src),this.parent){var e=this.parent.el.views||[];-1!==e.indexOf(this.el)?this.parent.el.views=e.map((function(e){return e._uid==t._uid?t.el:e})):this.parent.el.views=[].concat((0,r.default)(e),[this.el])}}},mounted:function(){}}},e.parent=function(t){return{provide:function(){return(0,a.default)({},t,this)},data:function(){return{el:{css:{},views:[]}}},watch:{css:{handler:function(t){this.canvasId&&(this.el.css=("object"==(0,o.default)(t)?t:t&&Object.assign.apply(Object,(0,r.default)(s(t))))||{},this.canvasWidth=this.el.css&&this.el.css.width||this.canvasWidth,this.canvasHeight=this.el.css&&this.el.css.height||this.canvasHeight)},immediate:!0}}}};var r=n(i("b7c7")),o=n(i("fcf3")),a=n(i("39d8"));i("fd3c"),i("8f71"),i("bf0f"),i("5c47"),i("0506"),i("f7a5"),i("5ef2"),i("a1c1"),i("d4b5"),i("6a54"),i("4626"),i("c223");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=t.slice(0,t.indexOf(":")),i=t.slice(t.indexOf(":")+1);return(0,a.default)({},e.replace(/-([a-z])/g,(function(){return arguments[1].toUpperCase()})).replace(/\s+/g,""),i.replace(/^\s+/,"").replace(/\s+$/,"")||"")}))}},"3e3c":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(i("2634")),o=n(i("2fdc"));i("c223"),i("dc8a"),i("d4b5"),i("bf0f"),i("5c47"),i("7a76"),i("c9b5"),i("a1c1");var a=i("3695"),s=n(i("b734")),h=i("28dc"),c=n(i("1ad6")),d={name:"lime-painter",mixins:[s.default,(0,a.parent)("painter"),{}],data:function(){return{use2dCanvas:!1,canvasHeight:150,canvasWidth:null,parentWidth:0,inited:!1,progress:0,firstRender:0,done:!1}},computed:{styles:function(){return"".concat(this.size).concat(this.customStyle||"",";")},canvasId:function(){return"l-painter".concat(this._uid||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=this.elements&&this.elements.css||this.elements||this,e=t.width,i=void 0===e?0:e,n=(0,h.toPx)(i||this.width);return n||Math.max(n,(0,h.toPx)(this.canvasWidth))},boardHeight:function(){var t=this.elements&&this.elements.css||this.elements||this,e=t.height,i=void 0===e?0:e,n=(0,h.toPx)(i||this.height);return n||Math.max(n,(0,h.toPx)(this.canvasHeight))},hasBoard:function(){return this.board&&Object.keys(this.board).length},elements:function(){return JSON.parse(JSON.stringify(this.hasBoard?this.board:this.el))}},watch:{},created:function(){var t=uni.getSystemInfoSync();t.SDKVersion,t.version,t.platform},mounted:function(){var t=this;return(0,o.default)((0,r.default)().mark((function e(){return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,h.sleep)(30);case 2:return e.next=4,t.getParentWeith();case 4:t.$nextTick((function(){setTimeout((function(){t.$watch("elements",t.watchRender,{deep:!0,immediate:!0})}),30)}));case 5:case"end":return e.stop()}}),e)})))()},methods:{watchRender:function(t,e){var i=this;return(0,o.default)((0,r.default)().mark((function n(){return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t&&t.views&&(i.firstRender?i.firstRender:t.views.length)&&Object.keys(t).length&&t!=e){n.next=2;break}return n.abrupt("return");case 2:i.firstRender=1,clearTimeout(i.rendertimer),i.rendertimer=setTimeout((function(){i.render(t)}),i.beforeDelay);case 5:case"end":return n.stop()}}),n)})))()},setFilePath:function(t,e){var i=this;return(0,o.default)((0,r.default)().mark((function n(){var o,a,s,c;return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=t,a=e||i,s=a.pathType,c=void 0===s?i.pathType:s,"base64"!=c||(0,h.isBase64)(t)){n.next=8;break}return n.next=5,(0,h.pathToBase64)(t);case 5:o=n.sent,n.next=12;break;case 8:if("url"!=c||!(0,h.isBase64)(t)){n.next=12;break}return n.next=11,(0,h.base64ToPath)(t);case 11:o=n.sent;case 12:return e&&e.isEmit&&i.$emit("success",o),n.abrupt("return",o);case 14:case"end":return n.stop()}}),n)})))()},getSize:function(t){var e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o,a,s;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.css||t,o=n.width,a=t.css||t,s=a.height,e.size){i.next=12;break}if(!o&&!s){i.next=10;break}return e.canvasWidth=o||e.canvasWidth,e.canvasHeight=s||e.canvasHeight,i.next=8,(0,h.sleep)(30);case 8:i.next=12;break;case 10:return i.next=12,e.getParentWeith();case 12:case"end":return i.stop()}}),i)})))()},canvasToTempFilePathSync:function(t){var e=this;this.stopWatch=this.$watch("done",(function(i){i&&(e.canvasToTempFilePath(t),e.stopWatch&&e.stopWatch())}),{immediate:!0})},getParentWeith:function(){var t=this;return new Promise((function(e){uni.createSelectorQuery().in(t).select(".lime-painter").boundingClientRect().exec((function(i){var n=i[0]||{},r=n.width,o=n.height;t.parentWidth=Math.ceil(r||0),t.canvasWidth=t.parentWidth||300,t.canvasHeight=o||t.canvasHeight||150,e(i[0])}))}))},render:function(){var t=arguments,e=this;return(0,o.default)((0,r.default)().mark((function i(){var n,o,a,s,d,u,l,f,p,v,g,b,m,y;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.length>0&&void 0!==t[0]?t[0]:{},Object.keys(n).length){i.next=3;break}return i.abrupt("return",console.error("空对象"));case 3:return e.progress=0,e.done=!1,i.next=7,e.getSize(n);case 7:return i.next=9,e.getContext();case 9:if(o=i.sent,a=e.use2dCanvas,s=e.boardWidth,d=e.boardHeight,u=e.canvas,l=e.afterDelay,!a||u){i.next=13;break}return i.abrupt("return",Promise.reject(new Error("render: fail canvas has not been created")));case 13:return e.boundary={top:0,left:0,width:s,height:d},e.painter=null,e.painter||(f=n.css||n,p=f.width,v=n.css||n,v.height,!p&&e.parentWidth&&Object.assign(n,{width:e.parentWidth}),g={context:o,canvas:u,width:s,height:d,pixelRatio:e.dpr,useCORS:e.useCORS,listen:{onProgress:function(t){e.progress=t,e.$emit("progress",t)},onEffectFail:function(t){e.$emit("faill",t)}}},a||(g.createImage=h.getImageInfo),e.painter=new c.default(g,e)),i.next=18,e.painter.source(JSON.parse(JSON.stringify(n)));case 18:return b=i.sent,m=b.width,y=b.height,e.boundary.height=e.canvasHeight=y,e.boundary.width=e.canvasWidth=m,i.next=25,(0,h.sleep)(e.sleep);case 25:return a||e.painter.init(e.ctx),i.next=28,e.painter.render();case 28:return i.next=30,new Promise((function(t){return e.$nextTick(t)}));case 30:if(a){i.next=33;break}return i.next=33,e.canvasDraw();case 33:if(!l||!a){i.next=36;break}return i.next=36,(0,h.sleep)(l);case 36:return e.$emit("done"),e.done=!0,e.isCanvasToTempFilePath&&e.canvasToTempFilePath().then((function(t){e.$emit("success",t.tempFilePath)})).catch((function(t){e.$emit("fail",new Error(JSON.stringify(t)))})),i.abrupt("return",Promise.resolve({ctx:o,draw:e.painter,node:e.node}));case 40: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,o.default)((0,r.default)().mark((function e(){var i,n,o;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.canvasWidth){e.next=4;break}return t.$emit("fail","painter no size"),console.error("painter no size: 请给画板或父级设置尺寸"),e.abrupt("return",Promise.reject());case 4:if(!t.ctx||!t.inited){e.next=6;break}return e.abrupt("return",Promise.resolve(t.ctx));case 6:if(i=t.type,n=t.use2dCanvas,t.dpr,t.boardWidth,t.boardHeight,o=function(){return new Promise((function(e){uni.createSelectorQuery().in(t).select("#".concat(t.canvasId)).boundingClientRect().exec((function(i){if(i){var n=uni.createCanvasContext(t.canvasId,t);t.inited||(t.inited=!0,t.use2dCanvas=!1,t.canvas=i),t.ctx=n,e(t.ctx)}}))}))},n){e.next=10;break}return e.abrupt("return",o());case 10: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 o=r.getContext(i);t.inited||(t.inited=!0,t.use2dCanvas=!0,t.canvas=r),t.ctx=o,e(t.ctx)}))})));case 11:case"end":return e.stop()}}),e)})))()},canvasToTempFilePath:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(){var i=(0,o.default)((0,r.default)().mark((function i(n,a){var s,h,c,d,u,l,f,p,v,g,b,m,y,x,w,S,P;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(s=t.use2dCanvas,h=t.canvasId,c=t.dpr,d=t.fileType,u=t.quality,l=function(){var e=(0,o.default)((0,r.default)().mark((function e(i){var o;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.setFilePath(i.tempFilePath||i);case 3:o=e.sent,n(Object.assign(i,{tempFilePath:o})),e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),t.$emit("fail",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),f=t.boundary||t,p=f.top,v=void 0===p?0:p,g=f.left,b=void 0===g?0:g,m=f.width,y=f.height,x=m*c,w=y*c,S=Object.assign({x:b,y:v,width:m,height:y,destWidth:x,destHeight:w,canvasId:h,fileType:d,quality:u,success:l,fail:a},e),!s){i.next=22;break}return i.prev=7,e.pathType||t.pathType||(e.pathType="url"),i.next=11,t.setFilePath(t.canvas.toDataURL("image/".concat(e.fileType||d).replace(/pg/,"peg"),e.quality||u),e);case 11:P=i.sent,e.success&&e.success({tempFilePath:P}),n({tempFilePath:P}),i.next=20;break;case 16:i.prev=16,i.t0=i["catch"](7),e.fail&&e.fail(i.t0),a(i.t0);case 20:i.next=23;break;case 22:uni.canvasToTempFilePath(S,t);case 23:case"end":return i.stop()}}),i,null,[[7,16]])})));return function(t,e){return i.apply(this,arguments)}}())}}};e.default=d},4733:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(Array.isArray(t))return(0,n.default)(t)};var n=function(t){return t&&t.__esModule?t:{default:t}}(i("8d0b"))},"4b5a":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,".lime-painter[data-v-85188b92],\n.lime-painter__canvas[data-v-85188b92]{\nwidth:100%;\n}",""]),t.exports=e},"4f06":function(t,e,i){"use strict";i.r(e);var n=i("3e3c"),r=i.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=r.a},8057:function(t,e,i){"use strict";var n=i("015a"),r=i.n(n);r.a},9046: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",{ref:"limepainter",staticClass:"lime-painter"},[t.canvasId&&t.size?i("v-uni-view",{style:t.styles},[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}})],1):t._e(),t._t("default")],2)},r=[]},b734:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n={props:{board:Object,pathType: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},useCORS:Boolean}};e.default=n},b7c7:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,n.default)(t)||(0,r.default)(t)||(0,o.default)(t)||(0,a.default)()};var n=s(i("4733")),r=s(i("d14d")),o=s(i("5d6b")),a=s(i("30f7"));function s(t){return t&&t.__esModule?t:{default:t}}}}]); |