HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /volume1/@appstore/Spreadsheet/ui/mobile/document-viewer-mobile.js
(()=>{var t={6799:function(t,e){!function(t){"use strict";var e="undefined"!=typeof Uint8Array?Uint8Array:Array;function n(t){var e=t.charCodeAt(0);return 43===e||45===e?62:47===e||95===e?63:e<48?-1:e<58?e-48+26+26:e<91?e-65:e<123?e-97+26:void 0}t.toByteArray=function(t){if(t.length%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r,i,a,s,o,l,h=t.length;o="="===t.charAt(h-2)?2:+("="===t.charAt(h-1)),l=new e(3*t.length/4-o),a=o>0?t.length-4:t.length;var u=0;function c(t){l[u++]=t}for(r=0,i=0;r<a;r+=4,i+=3)c((0xff0000&(s=n(t.charAt(r))<<18|n(t.charAt(r+1))<<12|n(t.charAt(r+2))<<6|n(t.charAt(r+3))))>>16),c((65280&s)>>8),c(255&s);return 2===o?c(255&(s=n(t.charAt(r))<<2|n(t.charAt(r+1))>>4)):1===o&&(c((s=n(t.charAt(r))<<10|n(t.charAt(r+1))<<4|n(t.charAt(r+2))>>2)>>8&255),c(255&s)),l},t.fromByteArray=function(t){var e,n,r,i,a=t.length%3,s="";function o(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(n=0,i=t.length-a;n<i;n+=3)s+=o((e=r=(t[n]<<16)+(t[n+1]<<8)+t[n+2])>>18&63)+o(e>>12&63)+o(e>>6&63)+o(63&e);switch(a){case 1:s+=o((r=t[t.length-1])>>2),s+=o(r<<4&63),s+="==";break;case 2:s+=o((r=(t[t.length-2]<<8)+t[t.length-1])>>10),s+=o(r>>4&63),s+=o(r<<2&63),s+="="}return s}}(e)},44589:function(t,e,n){var r=n(13337),i={};for(var a in r)r.hasOwnProperty(a)&&(i[r[a]]=a);var s=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in s)if(s.hasOwnProperty(o)){if(!("channels"in s[o]))throw Error("missing channels property: "+o);if(!("labels"in s[o]))throw Error("missing channel labels property: "+o);if(s[o].labels.length!==s[o].channels)throw Error("channel and label counts mismatch: "+o);var l=s[o].channels,h=s[o].labels;delete s[o].channels,delete s[o].labels,Object.defineProperty(s[o],"channels",{value:l}),Object.defineProperty(s[o],"labels",{value:h})}s.rgb.hsl=function(t){var e,n,r=t[0]/255,i=t[1]/255,a=t[2]/255,s=Math.min(r,i,a),o=Math.max(r,i,a),l=o-s;return o===s?e=0:r===o?e=(i-a)/l:i===o?e=2+(a-r)/l:a===o&&(e=4+(r-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(s+o)/2,[e,100*(o===s?0:n<=.5?l/(o+s):l/(2-o-s)),100*n]},s.rgb.hsv=function(t){var e,n,r,i,a,s=t[0]/255,o=t[1]/255,l=t[2]/255,h=Math.max(s,o,l),u=h-Math.min(s,o,l),c=function(t){return(h-t)/6/u+.5};return 0===u?i=a=0:(a=u/h,e=c(s),n=c(o),r=c(l),s===h?i=r-n:o===h?i=1/3+e-r:l===h&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*h]},s.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[s.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},s.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255;return e=Math.min(1-n,1-r,1-i),[100*((1-n-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*e]},s.rgb.keyword=function(t){var e,n=i[t];if(n)return n;var a=1/0;for(var s in r)if(r.hasOwnProperty(s)){var o=r[s],l=Math.pow(t[0]-o[0],2)+Math.pow(t[1]-o[1],2)+Math.pow(t[2]-o[2],2);l<a&&(a=l,e=s)}return e},s.keyword.rgb=function(t){return r[t]},s.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},s.rgb.lab=function(t){var e=s.rgb.xyz(t),n=e[0],r=e[1],i=e[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},s.hsl.rgb=function(t){var e,n,r,i,a,s=t[0]/360,o=t[1]/100,l=t[2]/100;if(0===o)return[a=255*l,a,a];n=l<.5?l*(1+o):l+o-l*o,e=2*l-n,i=[0,0,0];for(var h=0;h<3;h++)(r=s+-(1/3*(h-1)))<0&&r++,r>1&&r--,a=6*r<1?e+(n-e)*6*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,i[h]=255*a;return i},s.hsl.hsv=function(t){var e,n=t[0],r=t[1]/100,i=t[2]/100,a=r,s=Math.max(i,.01);return i*=2,r*=i<=1?i:2-i,a*=s<=1?s:2-s,e=(i+r)/2,[n,100*(0===i?2*a/(s+a):2*r/(i+r)),100*e]},s.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,a=e-Math.floor(e),s=255*r*(1-n),o=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,l,s];case 1:return[o,r,s];case 2:return[s,r,l];case 3:return[s,o,r];case 4:return[l,s,r];case 5:return[r,s,o]}},s.hsv.hsl=function(t){var e,n,r,i=t[0],a=t[1]/100,s=t[2]/100,o=Math.max(s,.01);return r=(2-a)*s,e=(2-a)*o,[i,100*(n=(n=a*o/(e<=1?e:2-e))||0),100*(r/=2)]},s.hwb.rgb=function(t){var e,n,r,i,a,s,o,l=t[0]/360,h=t[1]/100,u=t[2]/100,c=h+u;switch(c>1&&(h/=c,u/=c),e=Math.floor(6*l),n=1-u,r=6*l-e,(1&e)!=0&&(r=1-r),i=h+r*(n-h),e){default:case 6:case 0:a=n,s=i,o=h;break;case 1:a=i,s=n,o=h;break;case 2:a=h,s=n,o=i;break;case 3:a=h,s=i,o=n;break;case 4:a=i,s=h,o=n;break;case 5:a=n,s=h,o=i}return[255*a,255*s,255*o]},s.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},s.xyz.rgb=function(t){var e,n,r,i=t[0]/100,a=t[1]/100,s=t[2]/100;return e=3.2406*i+-1.5372*a+-.4986*s,n=-.9689*i+1.8758*a+.0415*s,r=.0557*i+-.204*a+1.057*s,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},s.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return e/=95.047,n/=100,r/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},s.lab.xyz=function(t){var e,n,r,i=t[0],a=t[1],s=t[2];e=a/500+(n=(i+16)/116),r=n-s/200;var o=Math.pow(n,3),l=Math.pow(e,3),h=Math.pow(r,3);return n=(o>.008856?o:(n-16/116)/7.787)*100,[e=(l>.008856?l:(e-16/116)/7.787)*95.047,n,r=(h>.008856?h:(r-16/116)/7.787)*108.883]},s.lab.lch=function(t){var e,n=t[0],r=t[1],i=t[2];return(e=360*Math.atan2(i,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+i*i),e]},s.lch.lab=function(t){var e,n=t[0],r=t[1];return[n,r*Math.cos(e=t[2]/360*2*Math.PI),r*Math.sin(e)]},s.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],i=1 in arguments?arguments[1]:s.rgb.hsv(t)[2];if(0===(i=Math.round(i/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===i&&(a+=60),a},s.hsv.ansi16=function(t){return s.rgb.ansi16(s.hsv.rgb(t),t[2])},s.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},s.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=(~~(t>50)+1)*.5;return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},s.ansi256.rgb=function(t){if(t>=232){var e,n=(t-232)*10+8;return[n,n,n]}return[Math.floor((t-=16)/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},s.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},s.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},s.rgb.hcg=function(t){var e,n,r=t[0]/255,i=t[1]/255,a=t[2]/255,s=Math.max(Math.max(r,i),a),o=Math.min(Math.min(r,i),a),l=s-o;return e=l<1?o/(1-l):0,[360*((l<=0?0:s===r?(i-a)/l%6:s===i?2+(a-r)/l:4+(r-i)/l+4)/6%1),100*l,100*e]},s.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return(r=n<.5?2*e*n:2*e*(1-n))<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},s.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},s.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];var i=[0,0,0],a=e%1*6,s=a%1,o=1-s,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]},s.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},s.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},s.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],(n-e)*100,(1-n)*100]},s.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},s.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},s.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},s.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},s.gray.hsl=s.gray.hsv=function(t){return[0,0,t[0]]},s.gray.hwb=function(t){return[0,100,t[0]]},s.gray.cmyk=function(t){return[0,0,0,t[0]]},s.gray.lab=function(t){return[t[0],0,0]},s.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},18358:function(t,e,n){var r=n(44589),i=n(3314),a={};Object.keys(r).forEach(function(t){a[t]={},Object.defineProperty(a[t],"channels",{value:r[t].channels}),Object.defineProperty(a[t],"labels",{value:r[t].labels});var e=i(t);Object.keys(e).forEach(function(n){var r,i,s=e[n];a[t][n]=(r=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var e=s(t);if("object"==typeof e)for(var n=e.length,r=0;r<n;r++)e[r]=Math.round(e[r]);return e},"conversion"in s&&(r.conversion=s.conversion),r),a[t][n].raw=(i=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),s(t))},"conversion"in s&&(i.conversion=s.conversion),i)})}),t.exports=a},3314:function(t,e,n){var r=n(44589);t.exports=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(r),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),a=Object.keys(r[i]),s=a.length,o=0;o<s;o++){var l=a[o],h=e[l];-1===h.distance&&(h.distance=e[i].distance+1,h.parent=i,n.unshift(l))}return e}(t),n={},i=Object.keys(e),a=i.length,s=0;s<a;s++){var o=i[s];null!==e[o].parent&&(n[o]=function(t,e){for(var n=[e[t].parent,t],i=r[e[t].parent][t],a=e[t].parent;e[a].parent;)n.unshift(e[a].parent),i=function(t,e){return function(n){return e(t(n))}}(r[e[a].parent][a],i),a=e[a].parent;return i.conversion=n,i}(o,e))}return n}},13337:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},99419:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},2489:function(t,e,n){var r=n(99419),i=n(27933),a=Object.hasOwnProperty,s=Object.create(null);for(var o in r)a.call(r,o)&&(s[r[o]]=o);var l=t.exports={to:{},get:{}};function h(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}l.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=l.get.hsl(t),n="hsl";break;case"hwb":e=l.get.hwb(t),n="hwb";break;default:e=l.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},l.get.rgb=function(t){if(!t)return null;var e,n,i,s=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=0,i=e[2],e=e[1];n<3;n++){var o=2*n;s[n]=parseInt(e.slice(o,o+2),16)}i&&(s[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(n=0,i=(e=e[1])[3];n<3;n++)s[n]=parseInt(e[n]+e[n],16);i&&(s[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)s[n]=parseInt(e[n+1],0);e[4]&&(e[5]?s[3]=.01*parseFloat(e[4]):s[3]=parseFloat(e[4]))}else if(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)s[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?s[3]=.01*parseFloat(e[4]):s[3]=parseFloat(e[4]))}else if(!(e=t.match(/^(\w+)$/)))return null;else return"transparent"===e[1]?[0,0,0,0]:a.call(r,e[1])?((s=r[e[1]])[3]=1,s):null;for(n=0;n<3;n++)s[n]=h(s[n],0,255);return s[3]=h(s[3],0,1),s},l.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var t=i(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},l.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},l.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},l.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},l.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},l.to.keyword=function(t){return s[t.slice(0,3)]}},74654:function(t,e,n){"use strict";var r=n(2489),i=n(18358),a=[].slice,s=["keyword","gray","hex"],o={};Object.keys(i).forEach(function(t){o[a.call(i[t].labels).sort().join("")]=t});var l={};function h(t,e){if(!(this instanceof h))return new h(t,e);if(e&&e in s&&(e=null),e&&!(e in i))throw Error("Unknown model: "+e);if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof h)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if("string"==typeof t){var n,u,c=r.get(t);if(null===c)throw Error("Unable to parse color from string: "+t);this.model=c.model,u=i[this.model].channels,this.color=c.value.slice(0,u),this.valpha="number"==typeof c.value[u]?c.value[u]:1}else if(t.length){this.model=e||"rgb",u=i[this.model].channels;var p=a.call(t,0,u);this.color=d(p,u),this.valpha="number"==typeof t[u]?t[u]:1}else if("number"==typeof t)t&=0xffffff,this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var g=Object.keys(t);"alpha"in t&&(g.splice(g.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var f=g.sort().join("");if(!(f in o))throw Error("Unable to parse color from object: "+JSON.stringify(t));this.model=o[f];var y=i[this.model].labels,x=[];for(n=0;n<y.length;n++)x.push(t[y[n]]);this.color=d(x)}if(l[this.model])for(n=0,u=i[this.model].channels;n<u;n++){var m=l[this.model][n];m&&(this.color[n]=m(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function u(t,e,n){return(t=Array.isArray(t)?t:[t]).forEach(function(t){(l[t]||(l[t]=[]))[e]=n}),t=t[0],function(r){var i;return arguments.length?(n&&(r=n(r)),(i=this[t]()).color[e]=r):(i=this[t]().color[e],n&&(i=n(i))),i}}function c(t){return function(e){return Math.max(0,Math.min(t,e))}}function d(t,e){for(var n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}h.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in r.to?this:this.rgb(),n=1===(e=e.round("number"==typeof t?t:1)).valpha?e.color:e.color.concat(this.valpha);return r.to[e.model](n)},percentString:function(t){var e=this.rgb().round("number"==typeof t?t:1),n=1===e.valpha?e.color:e.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=i[this.model].channels,n=i[this.model].labels,r=0;r<e;r++)t[n[r]]=this.color[r];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round:function(t){var e;return t=Math.max(t||0,0),new h(this.color.map((e=t,function(t){return Number(t.toFixed(e))})).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new h(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:u("rgb",0,c(255)),green:u("rgb",1,c(255)),blue:u("rgb",2,c(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:u("hsl",1,c(100)),lightness:u("hsl",2,c(100)),saturationv:u("hsv",1,c(100)),value:u("hsv",2,c(100)),chroma:u("hcg",1,c(100)),gray:u("hcg",2,c(100)),white:u("hwb",1,c(100)),wblack:u("hwb",2,c(100)),cyan:u("cmyk",0,c(100)),magenta:u("cmyk",1,c(100)),yellow:u("cmyk",2,c(100)),black:u("cmyk",3,c(100)),x:u("xyz",0,c(100)),y:u("xyz",1,c(100)),z:u("xyz",2,c(100)),l:u("lab",0,c(100)),a:u("lab",1),b:u("lab",2),keyword:function(t){return arguments.length?new h(t):i[this.model].keyword(this.color)},hex:function(t){return arguments.length?new h(t):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity:function(){for(var t=this.rgb().color,e=[],n=0;n<t.length;n++){var r=t[n]/255;e[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return h.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),n=e.color[0];return n=(n=(n+t)%360)<0?360+n:n,e.color[0]=n,e},mix:function(t,e){if(!t||!t.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var n=t.rgb(),r=this.rgb(),i=void 0===e?.5:e,a=2*i-1,s=n.alpha()-r.alpha(),o=((a*s==-1?a:(a+s)/(1+a*s))+1)/2,l=1-o;return h.rgb(o*n.red()+l*r.red(),o*n.green()+l*r.green(),o*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(i).forEach(function(t){if(-1===s.indexOf(t)){var e=i[t].channels;h.prototype[t]=function(){if(this.model===t)return new h(this);if(arguments.length)return new h(arguments,t);var n,r="number"==typeof arguments[e]?e:this.valpha;return new h((Array.isArray(n=i[this.model][t].raw(this.color))?n:[n]).concat(r),t)},h[t]=function(n){return"number"==typeof n&&(n=d(a.call(arguments),e)),new h(n,t)}}}),t.exports=h},65969:function(t,e,n){var r=n(47475);!function(){for(var t in r){if(null==r||!r.hasOwnProperty(t)||"default"===t||"__esModule"===t)return;e[t]=r[t]}}();var i=n(83471);!function(){for(var t in i){if(null==i||!i.hasOwnProperty(t)||"default"===t||"__esModule"===t)return;e[t]=i[t]}}(),n(62295),n(26730),n(61723),n(92004),n(3683),n(13790),n(74719),n(59070),n(74698),n(36793),n(52161),n(83031),n(4193),n(79034),n(45753),n(62597),n(36231),n(57667),n(58199),n(21223),n(51309),n(96214),n(61756),n(76901),n(25761),n(69818),n(27017),n(57498),n(38189),n(39857),n(41891),n(96729),n(16348),n(13074),n(34870),n(86782),n(4781),n(35866),n(41293),n(65218),n(76356),n(41336),n(77658),n(76955)},33776:function(t,e,n){var r=n(66023),i={};function a(){this._coordinateSystems=[]}a.prototype={constructor:a,create:function(t,e){var n=[];r.each(i,function(r,i){var a=r.create(t,e);n=n.concat(a||[])}),this._coordinateSystems=n},update:function(t,e){r.each(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},a.register=function(t,e){i[t]=e},a.get=function(t){return i[t]},t.exports=a},13966:function(t,e,n){var r=n(66023),i=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];t.exports=function(t){r.each(i,function(e){this[e]=r.bind(t[e],t)},this)}},90353:function(t,e,n){var r=n(47475),i=n(66023);t.exports=function(t,e){i.each(e,function(e){e.update="updateView",r.registerAction(e,function(n,r){var i={};return r.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var r=t.getData();r.each(function(e){var n=r.getName(e);i[n]=t.isSelected(n)||!1})}),{name:n.name,selected:i}})})}},74911:function(t,e,n){var r=n(47475),i=n(66023),a=n(31616).updateCenterAndZoom;r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(e){var r=e.coordinateSystem;if("geo"===r.type){var s=a(r,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(s.center),e.setZoom&&e.setZoom(s.zoom),"series"===n&&i.each(e.seriesGroup,function(t){t.setCenter(s.center),t.setZoom(s.zoom)})}})})},31616:function(t,e){e.updateCenterAndZoom=function(t,e,n){var r=t.getZoom(),i=t.getCenter(),a=e.zoom,s=t.dataToPoint(i);if(null!=e.dx&&null!=e.dy){s[0]-=e.dx,s[1]-=e.dy;var i=t.pointToData(s);t.setCenter(i)}if(null!=a){if(n){var o=n.min||0;a=Math.max(Math.min(r*a,n.max||1/0),o)/r}t.scale[0]*=a,t.scale[1]*=a;var l=t.position,h=(e.originX-l[0])*(a-1),u=(e.originY-l[1])*(a-1);l[0]-=h,l[1]-=u,t.updateTransform();var i=t.pointToData(s);t.setCenter(i),t.setZoom(a*r)}return{center:t.getCenter(),zoom:t.getZoom()}}},61723:function(t,e,n){var r=n(47475),i=n(66023),a=n(42862),s=a.layout,o=a.largeLayout;n(34087),n(85976),n(56242),n(31372),r.registerLayout(i.curry(s,"bar")),r.registerLayout(o),r.registerVisual({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}})},85976:function(t,e,n){t.exports=n(84480).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}})},56242:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(76165),s=n(93928).setLabel,o=n(27611),l=n(61444),h=n(87205),u=["itemStyle","barBorderWidth"];i.extend(o.prototype,l);var c=r.extendChartView({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var r=t.get("coordinateSystem");return("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,r){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,n){var r,i=this.group,s=t.getData(),o=this._data,l=t.coordinateSystem,h=l.getBaseAxis();"cartesian2d"===l.type?r=h.isHorizontal():"polar"===l.type&&(r="angle"===h.dim);var u=t.isAnimationEnabled()?t:null;s.diff(o).add(function(e){if(s.hasValue(e)){var n=s.getItemModel(e),a=f[l.type](s,e,n),o=d[l.type](s,e,n,a,r,u);s.setItemGraphicEl(e,o),i.add(o),y(o,s,e,n,a,t,r,"polar"===l.type)}}).update(function(e,n){var h=o.getItemGraphicEl(n);if(!s.hasValue(e))return void i.remove(h);var c=s.getItemModel(e),p=f[l.type](s,e,c);h?a.updateProps(h,{shape:p},u,e):h=d[l.type](s,e,c,p,r,u,!0),s.setItemGraphicEl(e,h),i.add(h),y(h,s,e,c,p,t,r,"polar"===l.type)}).remove(function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===l.type?e&&p(t,u,e):e&&g(t,u,e)}).execute(),this._data=s},_renderLarge:function(t,e,n){this._clear(),m(t,this.group)},_incrementalRenderLarge:function(t,e){m(e,this.group,!0)},dispose:i.noop,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?g(e.dataIndex,t,e):p(e.dataIndex,t,e)}):e.removeAll(),this._data=null}}),d={cartesian2d:function(t,e,n,r,s,o,l){var h=new a.Rect({shape:i.extend({},r)});if(o){var u=h.shape,c=s?"height":"width",d={};u[c]=0,d[c]=r[c],a[l?"updateProps":"initProps"](h,{shape:d},o,e)}return h},polar:function(t,e,n,r,s,o,l){var h=r.startAngle<r.endAngle,u=new a.Sector({shape:i.defaults({clockwise:h},r)});if(o){var c=u.shape,d=s?"r":"endAngle",p={};c[d]=s?0:r.startAngle,p[d]=r[d],a[l?"updateProps":"initProps"](u,{shape:p},o,e)}return u}};function p(t,e,n){n.style.text=null,a.updateProps(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function g(t,e,n){n.style.text=null,a.updateProps(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}var f={cartesian2d:function(t,e,n){var r,i,a=t.getItemLayout(e),s=(r=n,i=a,Math.min(r.get(u)||0,Math.abs(i.width),Math.abs(i.height))),o=a.width>0?1:-1,l=a.height>0?1:-1;return{x:a.x+o*s/2,y:a.y+l*s/2,width:a.width-o*s,height:a.height-l*s}},polar:function(t,e,n){var r=t.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle}}};function y(t,e,n,r,o,l,h,u){var c=e.getItemVisual(n,"color"),d=e.getItemVisual(n,"opacity"),p=r.getModel("itemStyle"),g=r.getModel("emphasis.itemStyle").getBarItemStyle();u||t.setShape("r",p.get("barBorderRadius")||0),t.useStyle(i.defaults({fill:c,opacity:d},p.getBarItemStyle()));var f=r.getShallow("cursor");f&&t.attr("cursor",f);var y=h?o.height>0?"bottom":"top":o.width>0?"left":"right";u||s(t.style,g,r,c,l,n,y),a.setHoverStyle(t,g)}var x=h.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,r=this.__startPoint,i=this.__valueIdx,a=0;a<n.length;a+=2)r[this.__valueIdx]=n[a+i],t.moveTo(r[0],r[1]),t.lineTo(n[a],n[a+1])}});function m(t,e,n){var r,i,a,s,o,l=t.getData(),h=[],u=+!!l.getLayout("valueAxisHorizontal");h[1-u]=l.getLayout("valueAxisStart");var c=new x({shape:{points:l.getLayout("largePoints")},incremental:!!n,__startPoint:h,__valueIdx:u});e.add(c),r=c,i=t,s=(a=l).getVisual("borderColor")||a.getVisual("color"),o=i.getModel("itemStyle").getItemStyle(["color","borderColor"]),r.useStyle(o),r.style.fill=null,r.style.stroke=s,r.style.lineWidth=a.getLayout("barWidth")}t.exports=c},84480:function(t,e,n){var r=n(26626),i=n(6551);t.exports=r.extend({type:"series.__base_bar__",getInitialData:function(t,e){return i(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),r=this.getData(),i=r.getLayout("offset"),a=r.getLayout("size"),s=+!e.getBaseAxis().isHorizontal();return n[s]+=i+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}})},14624:function(t,e,n){var r=n(84480).extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,r.superApply(this,"getInitialData",arguments)}});t.exports=r},54687:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165),s=n(87557).createSymbol,o=n(98763),l=o.parsePercent,h=o.isNumeric,u=n(93928).setLabel,c=["itemStyle","borderWidth"],d=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],p=new a.Circle;function g(t,e,n,r){var a,s,o,u,d,g,y,x,m,v,b,w,M,_,A,S,C,I,P,T,k,D=t.getItemLayout(e),R=n.get("symbolRepeat"),N=n.get("symbolClip"),O=n.get("symbolPosition")||"start",j=(n.get("symbolRotate")||0)*Math.PI/180||0,E=n.get("symbolPatternSize")||2,V=n.isAnimationEnabled(),B={dataIndex:e,layout:D,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:N,symbolRepeat:R,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:E,rotation:j,animationModel:V?n:null,hoverAnimation:V&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};(function(t,e,n,r,a){var s,o=r.valueDim,l=t.get("symbolBoundingData"),h=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),u=h.toGlobalCoord(h.dataToCoord(0)),c=1-+(n[o.wh]<=0);if(i.isArray(l)){var d=[f(h,l[0])-u,f(h,l[1])-u];d[1]<d[0]&&d.reverse(),s=d[c]}else s=null!=l?f(h,l)-u:e?r.coordSysExtent[o.index][c]-u:n[o.wh];a.boundingLength=s,e&&(a.repeatCutLength=n[o.wh]),a.pxSign=s>0?1:s<0?-1:0})(n,R,D,r,B),a=t,s=e,o=D,u=R,d=0,g=B.boundingLength,y=B.pxSign,x=E,m=r,v=B,b=m.valueDim,M=Math.abs(o[(w=m.categoryDim).wh]),_=a.getItemVisual(s,"symbolSize"),i.isArray(_)?_=_.slice():(null==_&&(_="100%"),_=[_,_]),_[w.index]=l(_[w.index],M),_[b.index]=l(_[b.index],u?M:Math.abs(g)),v.symbolSize=_,A=v.symbolScale=[_[0]/x,_[1]/x],A[b.index]*=(m.isHorizontal?-1:1)*y,S=n,C=B.symbolScale,I=j,P=r,T=B,(k=S.get(c)||0)&&(p.attr({scale:C.slice(),rotation:I}),p.updateTransform(),k/=p.getLineScale(),k*=C[P.valueDim.index]),T.valueLineWidth=k;var z=B.symbolSize,F=n.get("symbolOffset");return i.isArray(F)&&(F=[l(F[0],z[0]),l(F[1],z[1])]),function(t,e,n,r,a,s,o,u,c,d,p,g){var f=p.categoryDim,y=p.valueDim,x=g.pxSign,m=Math.max(e[y.index]+u,0),v=m;if(r){var b=Math.abs(c),w=i.retrieve(t.get("symbolMargin"),"15%")+"",M=!1;w.lastIndexOf("!")===w.length-1&&(M=!0,w=w.slice(0,w.length-1));var _=Math.max(m+2*(w=l(w,e[y.index])),0),A=M?0:2*w,S=h(r),C=S?r:L((b+A)/_);w=(b-C*m)/2/(M?C:C-1),_=m+2*w,A=M?0:2*w,S||"fixed"===r||(C=d?L((Math.abs(d)+A)/_):0),v=C*_-A,g.repeatTimes=C,g.symbolMargin=w}var I=v/2*x,P=g.pathPosition=[];P[f.index]=n[f.wh]/2,P[y.index]="start"===o?I:"end"===o?c-I:c/2,s&&(P[0]+=s[0],P[1]+=s[1]);var T=g.bundlePosition=[];T[f.index]=n[f.xy],T[y.index]=n[y.xy];var k=g.barRectShape=i.extend({},n);k[y.wh]=x*Math.max(Math.abs(n[y.wh]),Math.abs(P[y.index]+I)),k[f.wh]=n[f.wh];var D=g.clipShape={};D[f.xy]=-n[f.xy],D[f.wh]=p.ecSize[f.wh],D[y.xy]=0,D[y.wh]=n[y.wh]}(n,z,D,R,0,F,O,B.valueLineWidth,B.boundingLength,B.repeatCutLength,r,B),B}function f(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function y(t){var e=t.symbolPatternSize,n=s(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function x(t,e,n,r){var i=t.__pictorialBundle,a=n.symbolSize,s=n.valueLineWidth,o=n.pathPosition,l=e.valueDim,h=n.repeatTimes||0,u=0,c=a[e.valueDim.index]+s+2*n.symbolMargin;for(P(t,function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?T(t,null,g(u),n,r):T(t,null,{scale:[0,0]},n,r,function(){i.remove(t)}),A(t,n),u++});u<h;u++){var d=y(n);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,i.add(d);var p=g(u);T(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},n,r),d.on("mouseover",f).on("mouseout",x),A(d,n)}function g(t){var e=o.slice(),r=n.pxSign,i=t;return("start"===n.symbolRepeatDirection?r>0:r<0)&&(i=h-1-t),e[l.index]=c*(i-h/2+.5)+o[l.index],{position:e,scale:n.symbolScale.slice(),rotation:n.rotation}}function f(){P(t,function(t){t.trigger("emphasis")})}function x(){P(t,function(t){t.trigger("normal")})}}function m(t,e,n,r){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?T(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,r):(a=t.__pictorialMainPath=y(n),i.add(a),T(a,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,r),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),A(a,n)}function v(t,e,n){var r=i.extend({},e.barRectShape),s=t.__pictorialBarRect;s?T(s,null,{shape:r},e,n):(s=t.__pictorialBarRect=new a.Rect({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(s))}function b(t,e,n,r){if(n.symbolClip){var s=t.__pictorialClipPath,o=i.extend({},n.clipShape),l=e.valueDim,h=n.animationModel,u=n.dataIndex;if(s)a.updateProps(s,{shape:o},h,u);else{o[l.wh]=0,s=new a.Rect({shape:o}),t.__pictorialBundle.setClipPath(s),t.__pictorialClipPath=s;var c={};c[l.wh]=n.clipShape[l.wh],a[r?"updateProps":"initProps"](s,{shape:c},h,u)}}}function w(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=M,n.isAnimationEnabled=_,n}function M(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function _(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function A(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:n.slice()},400,"elasticOut")})}function S(t,e,n,r){var i=new a.Group,s=new a.Group;return i.add(s),i.__pictorialBundle=s,s.attr("position",n.bundlePosition.slice()),n.symbolRepeat?x(i,e,n):m(i,e,n),v(i,n,r),b(i,e,n,r),i.__pictorialShapeStr=I(t,n),i.__pictorialSymbolMeta=n,i}function C(t,e,n,r){var s=r.__pictorialBarRect;s&&(s.style.text=null);var o=[];P(r,function(t){o.push(t)}),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),i.each(o,function(t){a.updateProps(t,{scale:[0,0]},n,e,function(){r.parent&&r.parent.remove(r)})}),t.setItemGraphicEl(e,null)}function I(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function P(t,e,n){i.each(t.__pictorialBundle.children(),function(r){r!==t.__pictorialBarRect&&e.call(n,r)})}function T(t,e,n,r,i,s){e&&t.attr(e),r.symbolClip&&!i?n&&t.attr(n):n&&a[i?"updateProps":"initProps"](t,n,r.animationModel,r.dataIndex,s)}function k(t,e,n){var r=n.color,s=n.dataIndex,o=n.itemModel,l=o.getModel("itemStyle").getItemStyle(["color"]),h=o.getModel("emphasis.itemStyle").getItemStyle(),c=o.getShallow("cursor");P(t,function(t){t.setColor(r),t.setStyle(i.defaults({fill:r,opacity:n.opacity},l)),a.setHoverStyle(t,h),c&&(t.cursor=c),t.z2=n.z2});var d={},p=e.valueDim.posDesc[+(n.boundingLength>0)],g=t.__pictorialBarRect;u(g.style,d,o,r,e.seriesModel,s,p),a.setHoverStyle(g,d)}function L(t){var e=Math.round(t);return 1e-4>Math.abs(t-e)?e:Math.ceil(t)}t.exports=r.extendChartView({type:"pictorialBar",render:function(t,e,n){var r=this.group,i=t.getData(),s=this._data,o=t.coordinateSystem,l=!!o.getBaseAxis().isHorizontal(),h=o.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:l,valueDim:d[+l],categoryDim:d[1-l]};return i.diff(s).add(function(t){if(i.hasValue(t)){var e=w(i,t),n=g(i,t,e,u),a=S(i,u,n);i.setItemGraphicEl(t,a),r.add(a),k(a,u,n)}}).update(function(t,e){var n,o,l,h,c,d,p=s.getItemGraphicEl(e);if(!i.hasValue(t))return void r.remove(p);var f=w(i,t),y=g(i,t,f,u),M=I(i,y);p&&M!==p.__pictorialShapeStr&&(r.remove(p),i.setItemGraphicEl(t,null),p=null),p?(n=p,o=u,h=(l=y).animationModel,c=l.dataIndex,d=n.__pictorialBundle,a.updateProps(d,{position:l.bundlePosition.slice()},h,c),l.symbolRepeat?x(n,o,l,!0):m(n,o,l,!0),v(n,l,!0),b(n,o,l,!0)):p=S(i,u,y,!0),i.setItemGraphicEl(t,p),p.__pictorialSymbolMeta=y,r.add(p),k(p,u,y)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&C(s,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=i,this.group},dispose:i.noop,remove:function(t,e){var n=this.group,r=this._data;t.get("animation")?r&&r.eachItemGraphicEl(function(e){C(r,e.dataIndex,t,e)}):n.removeAll()}})},61444:function(t,e,n){var r=n(24954)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getBarItemStyle:function(t){var e=r(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}}},93928:function(t,e,n){var r=n(76165),i=n(31750).getDefaultLabel;function a(t,e){"outside"===t.textPosition&&(t.textPosition=e)}e.setLabel=function(t,e,n,s,o,l,h){var u=n.getModel("label"),c=n.getModel("emphasis.label");r.setLabelStyle(t,e,u,c,{labelFetcher:o,labelDataIndex:l,defaultText:i(o.getData(),l),isRectText:!0,autoColor:s}),a(t),a(e)}},45753:function(t,e,n){var r=n(47475);n(6134),n(7662);var i=n(47459),a=n(76424);r.registerVisual(i),r.registerLayout(a)},6134:function(t,e,n){var r=n(66023),i=n(26626),a=n(90005).seriesModelMixin,s=i.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});r.mixin(s,a,!0),t.exports=s},7662:function(t,e,n){var r=n(66023),i=n(55756),a=n(76165),s=n(87205),o=["itemStyle"],l=["emphasis","itemStyle"],h=i.extend({type:"boxplot",render:function(t,e,n){var r=t.getData(),i=this.group,a=this._data;this._data||i.removeAll();var s=+("horizontal"===t.get("layout"));r.diff(a).add(function(t){if(r.hasValue(t)){var e=c(r.getItemLayout(t),r,t,s,!0);r.setItemGraphicEl(t,e),i.add(e)}}).update(function(t,e){var n=a.getItemGraphicEl(e);if(!r.hasValue(t))return void i.remove(n);var o=r.getItemLayout(t);n?d(o,n,r,t):n=c(o,r,t,s),i.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=r},remove:function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:r.noop}),u=s.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,r=0;for(t.moveTo(n[r][0],n[r][1]),r++;r<4;r++)t.lineTo(n[r][0],n[r][1]);for(t.closePath();r<n.length;r++)t.moveTo(n[r][0],n[r][1]),r++,t.lineTo(n[r][0],n[r][1])}});function c(t,e,n,i,a){var s,o,l,h=t.ends,c=new u({shape:{points:a?(s=h,o=i,l=t,r.map(s,function(t){return(t=t.slice())[o]=l.initBaseline,t})):h}});return d(t,c,e,n,a),c}function d(t,e,n,r,i){var s=n.hostModel;(0,a[i?"initProps":"updateProps"])(e,{shape:{points:t.ends}},s,r);var h=n.getItemModel(r),u=h.getModel(o),c=n.getItemVisual(r,"color"),d=u.getItemStyle(["borderColor"]);d.stroke=c,d.strokeNoScale=!0,e.useStyle(d),e.z2=100;var p=h.getModel(l).getItemStyle();a.setHoverStyle(e,p)}t.exports=h},76424:function(t,e,n){var r=n(66023),i=n(98763).parsePercent,a=r.each;t.exports=function(t){var e,n;a((e=[],n=[],t.eachSeriesByType("boxplot",function(t){var i=t.getBaseAxis(),a=r.indexOf(n,i);a<0&&(a=n.length,n[a]=i,e[a]={axis:i,seriesModels:[]}),e[a].seriesModels.push(t)}),e),function(t){var e=t.seriesModels;e.length&&(function(t){var e,n,s=t.axis,o=t.seriesModels,l=o.length,h=t.boxWidthList=[],u=t.boxOffsetList=[],c=[];if("category"===s.type)n=s.getBandWidth();else{var d=0;a(o,function(t){d=Math.max(d,t.getData().count())}),(e=s.getExtent())[1],e[0]}a(o,function(t){var e=t.get("boxWidth");r.isArray(e)||(e=[e,e]),c.push([i(e[0],n)||0,i(e[1],n)||0])});var p=.8*n-2,g=p/l*.3,f=(p-g*(l-1))/l,y=f/2-p/2;a(o,function(t,e){u.push(y),y+=g+f,h.push(Math.min(Math.max(f,c[e][0]),c[e][1]))})}(t),a(e,function(e,n){!function(t,e,n){var r=t.coordinateSystem,i=t.getData(),a=n/2,s=+("horizontal"!==t.get("layout")),o=1-s,l=["x","y"],h=i.mapDimension(l[s]),u=i.mapDimension(l[o],!0);if(null!=h&&!(u.length<5))for(var c=0;c<i.count();c++){var d=i.get(h,c),p=v(d,u[2],c),g=v(d,u[0],c),f=v(d,u[1],c),y=v(d,u[3],c),x=v(d,u[4],c),m=[];b(m,f,0),b(m,y,1),m.push(g,f,x,y),w(m,g),w(m,x),w(m,p),i.setItemLayout(c,{initBaseline:p[o],ends:m})}function v(t,n,a){var l,h=i.get(n,a),u=[];return u[s]=t,u[o]=h,isNaN(t)||isNaN(h)?l=[NaN,NaN]:(l=r.dataToPoint(u),l[s]+=e),l}function b(t,e,n){var r=e.slice(),i=e.slice();r[s]+=a,i[s]-=a,n?t.push(r,i):t.push(i,r)}function w(t,e){var n=e.slice(),r=e.slice();n[s]-=a,r[s]+=a,t.push(n,r)}}(e,t.boxOffsetList[n],t.boxWidthList[n])}))})}},47459:function(t){var e=["itemStyle","borderColor"];t.exports=function(t,n){var r=t.get("color");t.eachRawSeriesByType("boxplot",function(n){var i=r[n.seriesIndex%r.length],a=n.getData();a.setVisual({legendSymbol:"roundRect",color:n.get(e)||i}),t.isSeriesFiltered(n)||a.each(function(t){var n=a.getItemModel(t);a.setItemVisual(t,{color:n.get(e,!0)})})})}},62597:function(t,e,n){var r=n(47475);n(8016),n(518);var i=n(33450),a=n(19529),s=n(44642);r.registerPreprocessor(i),r.registerVisual(a),r.registerLayout(s)},8016:function(t,e,n){var r=n(66023),i=n(26626),a=n(90005).seriesModelMixin,s=i.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,n){var r=e.getItemLayout(t);return r&&n.rect(r.brushRect)}});r.mixin(s,a,!0),t.exports=s},518:function(t,e,n){var r=n(66023),i=n(55756),a=n(76165),s=n(87205),o=["itemStyle"],l=["emphasis","itemStyle"],h=["color","color0","borderColor","borderColor0"],u=i.extend({type:"candlestick",render:function(t,e,n){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,r){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e=t.getData(),n=this._data,r=this.group,i=e.getLayout("isSimpleBox");this._data||r.removeAll(),e.diff(n).add(function(n){if(e.hasValue(n)){var s,o=e.getItemLayout(n);s=d(o,n,!0),a.initProps(s,{shape:{points:o.ends}},t,n),p(s,e,n,i),r.add(s),e.setItemGraphicEl(n,s)}}).update(function(s,o){var l=n.getItemGraphicEl(o);if(!e.hasValue(s))return void r.remove(l);var h=e.getItemLayout(s);l?a.updateProps(l,{shape:{points:h.ends}},t,s):l=d(h,s),p(l,e,s,i),r.add(l),e.setItemGraphicEl(s,l)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=e},_renderLarge:function(t){this._clear(),f(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,r,i=e.getData(),a=i.getLayout("isSimpleBox");null!=(n=t.next());)p(r=d(i.getItemLayout(n),n),i,n,a),r.incremental=!0,this.group.add(r)},_incrementalRenderLarge:function(t,e){f(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:r.noop}),c=s.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))}});function d(t,e,n){var i,a,s=t.ends;return new c({shape:{points:n?(i=s,a=t,r.map(i,function(t){return(t=t.slice())[1]=a.initBaseline,t})):s},z2:100})}function p(t,e,n,r){var i=e.getItemModel(n),s=i.getModel(o),u=e.getItemVisual(n,"color"),c=e.getItemVisual(n,"borderColor")||u,d=s.getItemStyle(h);t.useStyle(d),t.style.strokeNoScale=!0,t.style.fill=u,t.style.stroke=c,t.__simpleBox=r;var p=i.getModel(l).getItemStyle();a.setHoverStyle(t,p)}var g=s.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var n=e.points,r=0;r<n.length;)if(this.__sign===n[r++]){var i=n[r++];t.moveTo(i,n[r++]),t.lineTo(i,n[r++])}else r+=3}});function f(t,e,n){var r=t.getData(),i=r.getLayout("largePoints"),a=new g({shape:{points:i},__sign:1});e.add(a);var s=new g({shape:{points:i},__sign:-1});e.add(s),y(1,a,t,r),y(-1,s,t,r),n&&(a.incremental=!0,s.incremental=!0)}function y(t,e,n,r){var i=t>0?"P":"N",a=r.getVisual("borderColor"+i)||r.getVisual("color"+i),s=n.getModel(o).getItemStyle(h);e.useStyle(s),e.style.fill=null,e.style.stroke=a}t.exports=u},44642:function(t,e,n){var r=n(76165).subPixelOptimize,i=n(85773),a=n(98763).parsePercent,s=n(66023).retrieve2,o="undefined"!=typeof Float32Array?Float32Array:Array;function l(t,e,n,r,i){var a;return n>r?-1:n<r?1:e>0?t.get(i,e-1)<=r?1:-1:1}t.exports={seriesType:"candlestick",plan:i(),reset:function(t){var e,n,i,h,u,c,d,p,g=t.coordinateSystem,f=t.getData(),y=(e=t,n=f,u="category"===(h=e.getBaseAxis()).type?h.getBandWidth():Math.abs((i=h.getExtent())[1]-i[0])/n.count(),c=a(s(e.get("barMaxWidth"),u),u),d=a(s(e.get("barMinWidth"),1),u),null!=(p=e.get("barWidth"))?a(p,u):Math.max(Math.min(u/2,c),d)),x=["x","y"],m=f.mapDimension("x"),v=f.mapDimension("y",!0),b=v[0],w=v[1],M=v[2],_=v[3];if(f.setLayout({candleWidth:y,isSimpleBox:y<=1.3}),null!=m&&!(v.length<4))return{progress:t.pipelineContext.large?function(t,e){for(var n,r,i=new o(5*t.count),a=0,s=[],h=[];null!=(r=t.next());){var u=e.get(m,r),c=e.get(b,r),d=e.get(w,r),p=e.get(M,r),f=e.get(_,r);if(isNaN(u)||isNaN(p)||isNaN(f)){i[a++]=NaN,a+=4;continue}i[a++]=l(e,r,c,d,w),s[0]=u,s[1]=p,n=g.dataToPoint(s,null,h),i[a++]=n?n[0]:NaN,i[a++]=n?n[1]:NaN,s[1]=f,n=g.dataToPoint(s,null,h),i[a++]=n?n[1]:NaN}e.setLayout("largePoints",i)}:function(t,e){for(var n;null!=(n=t.next());){var i=e.get(m,n),a=e.get(b,n),s=e.get(w,n),o=e.get(M,n),h=e.get(_,n),u=Math.min(a,s),c=Math.max(a,s),d=A(u,i),p=A(c,i),f=A(o,i),x=A(h,i),v=[];S(v,p,0),S(v,d,1),v.push(C(x),C(p),C(f),C(d)),e.setItemLayout(n,{sign:l(e,n,a,s,w),initBaseline:a>s?p[1]:d[1],ends:v,brushRect:function(t,e,n){var r=A(t,n),i=A(e,n);return r[0]-=y/2,i[0]-=y/2,{x:r[0],y:r[1],width:y,height:i[1]-r[1]}}(o,h,i)})}function A(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:g.dataToPoint(n)}function S(t,e,n){var i=e.slice(),a=e.slice();i[0]=r(i[0]+y/2,1,!1),a[0]=r(a[0]-y/2,1,!0),n?t.push(i,a):t.push(a,i)}function C(t){return t[0]=r(t[0],1),t}}}}}},19529:function(t,e,n){var r=n(85773),i=["itemStyle","borderColor"],a=["itemStyle","borderColor0"],s=["itemStyle","color"],o=["itemStyle","color0"];t.exports={seriesType:"candlestick",plan:r(),performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=t.pipelineContext.large;if(n.setVisual({legendSymbol:"roundRect",colorP:l(1,t),colorN:l(-1,t),borderColorP:h(1,t),borderColorN:h(-1,t)}),!e.isSeriesFiltered(t))return!r&&{progress:function(t,e){for(var n;null!=(n=t.next());){var r=e.getItemModel(n),i=e.getItemLayout(n).sign;e.setItemVisual(n,{color:l(i,r),borderColor:h(i,r)})}}};function l(t,e){return e.get(t>0?s:o)}function h(t,e){return e.get(t>0?i:a)}}}},33450:function(t,e,n){var r=n(66023);t.exports=function(t){t&&r.isArray(t.series)&&r.each(t.series,function(t){r.isObject(t)&&"k"===t.type&&(t.type="candlestick")})}},61756:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(76165),a=n(31750).getDefaultLabel,s=n(6551),o=n(42862).getLayoutOnAxis,l=n(13593),h=n(26626),u=n(55756),c=n(807),d=n(90777),p=n(34696),g=n(18398),f=n(61226),y=["itemStyle"],x=["emphasis","itemStyle"],m=["label"],v=["emphasis","label"],b={cartesian2d:c,geo:d,singleAxis:p,polar:g,calendar:f};function w(t,e,n,r,i){null==n[t]||i||(e[t]=n[t],n[t]=r[t])}function M(t,e,n,s){var l,h,u,c,d,p,g,f=t.get("renderItem"),w=t.coordinateSystem,M={};w&&(M=w.prepareCustoms?w.prepareCustoms():b[w.type](w));var _=r.defaults({getWidth:s.getWidth,getHeight:s.getHeight,getZr:s.getZr,getDevicePixelRatio:s.getDevicePixelRatio,value:function(t,n){return null==n&&(n=u),e.get(e.getDimension(t||0),n)},style:function(n,s){null==s&&(s=u),C(s);var o=c.getModel(y).getItemStyle();null!=g&&(o.fill=g);var l=e.getItemVisual(s,"opacity");return null!=l&&(o.opacity=l),i.setTextStyle(o,d,null,{autoColor:g,isRectText:!0}),o.text=d.getShallow("show")?r.retrieve2(t.getFormattedLabel(s,"normal"),a(e,s)):null,n&&r.extend(o,n),o},styleEmphasis:function(n,s){null==s&&(s=u),C(s);var o=c.getModel(x).getItemStyle();return i.setTextStyle(o,p,null,{isRectText:!0},!0),o.text=p.getShallow("show")?r.retrieve3(t.getFormattedLabel(s,"emphasis"),t.getFormattedLabel(s,"normal"),a(e,s)):null,n&&r.extend(o,n),o},visual:function(t,n){return null==n&&(n=u),e.getItemVisual(n,t)},barLayout:function(t){if(w.getBaseAxis){var e=w.getBaseAxis();return o(r.defaults({axis:e},t),s)}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(t){return i.getFont(t,n)}},M.api||{}),A={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:M.coordSys,dataInsideLength:e.count(),encode:(l=t.getData(),h={},r.each(l.dimensions,function(t,e){var n=l.getDimensionInfo(t);if(!n.isExtraCoord){var r=n.coordDim;(h[r]=h[r]||[])[n.coordDimIndex]=e}}),h)},S=!0;return function(t,n){return u=t,S=!0,f&&f(r.defaults({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:n?n.type:null},A),_)};function C(t){null==t&&(t=u),S&&(d=(c=e.getItemModel(t)).getModel(m),p=c.getModel(v),g=e.getItemVisual(t,"color"),S=!1)}}function _(t,e,n,r,i,a){return(t=A(t,e,n,r,i,a,!0))&&a.setItemGraphicEl(e,t),t}function A(t,e,n,a,s,o,h){var u,c=!n,d=(n=n||{}).type,p=n.shape,g=n.style;if(t&&(c||null!=d&&d!==t.__customGraphicType||"path"===d&&(u=p)&&(u.hasOwnProperty("pathData")||u.hasOwnProperty("d"))&&P(p)!==t.__customPathData||"image"===d&&T(g,"image")&&g.image!==t.__customImagePath||"text"===d&&T(p,"text")&&g.text!==t.__customText)&&(s.remove(t),t=null),!c){var f=!t;return t||(t=function(t){var e,n=t.type;if("path"===n){var r=t.shape,a=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,s=P(r);(e=i.makePath(s,null,a,r.layout||"center")).__customPathData=s}else"image"===n?(e=new i.Image({})).__customImagePath=t.style.image:"text"===n?(e=new i.Text({})).__customText=t.style.text:e=new i[n.charAt(0).toUpperCase()+n.slice(1)];return e.__customGraphicType=n,e.name=t.name,e}(n)),!function(t,e,n,a,s,o,l){var h={},u=n.style||{};if(n.shape&&(h.shape=r.clone(n.shape)),n.position&&(h.position=n.position.slice()),n.scale&&(h.scale=n.scale.slice()),n.origin&&(h.origin=n.origin.slice()),n.rotation&&(h.rotation=n.rotation),"image"===t.type&&n.style){var c=h.style={};r.each(["x","y","width","height"],function(e){w(e,c,u,t.style,o)})}if("text"===t.type&&n.style){var c=h.style={};r.each(["x","y"],function(e){w(e,c,u,t.style,o)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),o)){t.style.opacity=0;var d=u.opacity;null==d&&(d=1),i.initProps(t,{style:{opacity:d}},a,e)}o?t.attr(h):i.updateProps(t,h,a,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var p=n.styleEmphasis,g=!1===p;t.__cusHasEmphStl&&null==p||!t.__cusHasEmphStl&&g||(i.setElementHoverStyle(t,p),t.__cusHasEmphStl=!g),l&&i.setAsHoverStyleTrigger(t,!g)}(t,e,n,a,0,f,h),"group"===d&&function(t,e,n,r,i){var a,s=n.children,o=s?s.length:0,h=n.$mergeChildren,u="byName"===h||n.diffChildrenByName,c=!1===h;if(o||u||c){if(u){return new l((a={oldChildren:t.children()||[],newChildren:s||[],dataIndex:e,animatableModel:r,group:t,data:i}).oldChildren,a.newChildren,S,S,a).add(C).update(C).remove(I).execute()}c&&t.removeAll();for(var d=0;d<o;d++)s[d]&&A(t.childAt(d),e,s[d],r,t,i)}}(t,e,n,a,o),s.add(t),t}}function S(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function C(t,e){var n=this.context,r=null!=t?n.newChildren[t]:null;A(null!=e?n.oldChildren[e]:null,n.dataIndex,r,n.animatableModel,n.group,n.data)}function I(t){var e=this.context,n=e.oldChildren[t];n&&e.group.remove(n)}function P(t){return t&&(t.pathData||t.d)}function T(t,e){return t&&t.hasOwnProperty(e)}h.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return s(this.getSource(),this)},getDataParams:function(t,e,n){var r=h.prototype.getDataParams.apply(this,arguments);return n&&(r.info=n.info),r}}),u.extend({type:"custom",_data:null,render:function(t,e,n,r){var i=this._data,a=t.getData(),s=this.group,o=M(t,a,e,n);a.diff(i).add(function(e){_(null,e,o(e,r),t,s,a)}).update(function(e,n){_(i.getItemGraphicEl(n),e,o(e,r),t,s,a)}).remove(function(t){var e=i.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,n){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,r,i){var a=e.getData(),s=M(e,a,n,r);function o(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++)_(null,l,s(l,i),e,this.group,a).traverse(o)},dispose:r.noop,filterForExposedEvent:function(t,e,n,r){var i=e.element;if(null==i||n.name===i)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1}})},36231:function(t,e,n){var r=n(47475);n(72389),n(40766);var i=n(41314),a=n(64342);r.registerVisual(i("effectScatter","circle")),r.registerLayout(a("effectScatter"))},72389:function(t,e,n){var r=n(6551);t.exports=n(26626).extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return r(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}})},40766:function(t,e,n){var r=n(47475),i=n(67076),a=n(43156),s=n(36653),o=n(64342);t.exports=r.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new i(a)},render:function(t,e,n){var r=t.getData(),i=this._symbolDraw;i.updateData(r),this.group.add(i.group)},updateTransform:function(t,e,n){var r=t.getData();this.group.dirty();var i=o().reset(t);i.progress&&i.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=s.clone(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}})},83031:function(t,e,n){var r=n(47475);n(7956),n(84558);var i=n(34907),a=n(19770),s=n(6817);r.registerVisual(i("funnel")),r.registerLayout(a),r.registerProcessor(s("funnel"))},7956:function(t,e,n){var r=n(47475),i=n(71469),a=n(70018).defaultEmphasis,s=r.extendSeriesModel({type:"series.funnel",init:function(t){s.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return i(this,["value"])},_defaultLabelLine:function(t){a(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=s.superCall(this,"getDataParams",t),r=e.mapDimension("value"),i=e.getSum(r);return n.percent=i?+(e.get(r,t)/i*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});t.exports=s},84558:function(t,e,n){var r=n(76165),i=n(66023),a=n(55756);function s(t,e){r.Group.call(this);var n=new r.Polygon,i=new r.Polyline,a=new r.Text;function s(){i.ignore=i.hoverIgnore,a.ignore=a.hoverIgnore}function o(){i.ignore=i.normalIgnore,a.ignore=a.normalIgnore}this.add(n),this.add(i),this.add(a),this.updateData(t,e,!0),this.on("emphasis",s).on("normal",o).on("mouseover",s).on("mouseout",o)}var o=s.prototype,l=["itemStyle","opacity"];o.updateData=function(t,e,n){var a=this.childAt(0),s=t.hostModel,o=t.getItemModel(e),h=t.getItemLayout(e),u=t.getItemModel(e).get(l);u=null==u?1:u,a.useStyle({}),n?(a.setShape({points:h.points}),a.setStyle({opacity:0}),r.initProps(a,{style:{opacity:u}},s,e)):r.updateProps(a,{style:{opacity:u},shape:{points:h.points}},s,e);var c=o.getModel("itemStyle"),d=t.getItemVisual(e,"color");a.setStyle(i.defaults({lineJoin:"round",fill:d},c.getItemStyle(["opacity"]))),a.hoverStyle=c.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),r.setHoverStyle(this)},o._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),a=t.hostModel,s=t.getItemModel(e),o=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");r.updateProps(n,{shape:{points:o.linePoints||o.linePoints}},a,e),r.updateProps(i,{style:{x:o.x,y:o.y}},a,e),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var h=s.getModel("label"),u=s.getModel("emphasis.label"),c=s.getModel("labelLine"),d=s.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");r.setLabelStyle(i.style,i.hoverStyle={},h,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),n.setStyle({stroke:l}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle()},i.inherits(s,r.Group),t.exports=a.extend({type:"funnel",render:function(t,e,n){var r=t.getData(),i=this._data,a=this.group;r.diff(i).add(function(t){var e=new s(r,t);r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var n=i.getItemGraphicEl(e);n.updateData(r,t),a.add(n),r.setItemGraphicEl(t,n)}).remove(function(t){var e=i.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}})},19770:function(t,e,n){var r=n(68006),i=n(98763),a=i.parsePercent,s=i.linearMap;t.exports=function(t,e,n){t.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),o=t.get("sort"),l=r.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),h=function(t,e){for(var n=t.mapDimension("value"),r=t.mapArray(n,function(t){return t}),i=[],a="ascending"===e,s=0,o=t.count();s<o;s++)i[s]=s;return"function"==typeof e?i.sort(e):"none"!==e&&i.sort(function(t,e){return a?r[t]-r[e]:r[e]-r[t]}),i}(n,o),u=[a(t.get("minSize"),l.width),a(t.get("maxSize"),l.width)],c=n.getDataExtent(i),d=t.get("min"),p=t.get("max");null==d&&(d=Math.min(c[0],0)),null==p&&(p=c[1]);var g=t.get("funnelAlign"),f=t.get("gap"),y=(l.height-f*(n.count()-1))/n.count(),x=l.y,m=function(t,e){var r,a=s(n.get(i,t)||0,[d,p],u,!0);switch(g){case"left":r=l.x;break;case"center":r=l.x+(l.width-a)/2;break;case"right":r=l.x+l.width-a}return[[r,e],[r+a,e]]};"ascending"===o&&(y=-y,f=-f,x+=l.height,h=h.reverse());for(var v=0;v<h.length;v++){var b=h[v],w=h[v+1],M=n.getItemModel(b).get("itemStyle.height");null==M?M=y:(M=a(M,l.height),"ascending"===o&&(M=-M));var _=m(b,x),A=m(w,x+M);x+=M+f,n.setItemLayout(b,{points:_.concat(A.slice().reverse())})}n.each(function(t){var e=n.getItemModel(t),r=e.getModel("label").get("position"),i=e.getModel("labelLine"),a=n.getItemLayout(t),s=a.points,o="inner"===r||"inside"===r||"center"===r;if(o)h=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,u=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l="center",c=[[h,u],[h,u]];else{var l,h,u,c,d,p,g,f=i.get("length");"left"===r?(d=(s[3][0]+s[0][0])/2,p=(s[3][1]+s[0][1])/2,h=(g=d-f)-5,l="right"):(d=(s[1][0]+s[2][0])/2,p=(s[1][1]+s[2][1])/2,h=(g=d+f)+5,l="left");var y=p;c=[[d,p],[g,y]],u=y}a.label={linePoints:c,x:h,y:u,verticalAlign:"middle",textAlign:l,inside:o}})})}},52161:function(t,e,n){n(10026),n(93570)},10026:function(t,e,n){var r=n(71469),i=n(26626),a=n(66023);t.exports=i.extend({type:"series.gauge",getInitialData:function(t,e){var n=t.data||[];return a.isArray(n)||(n=[n]),t.data=n,r(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}})},93570:function(t,e,n){var r=n(25917),i=n(76165),a=n(55756),s=n(98763),o=s.parsePercent,l=s.round,h=s.linearMap;function u(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var c=2*Math.PI;t.exports=a.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var r,i,a=t.get("axisLine.lineStyle.color"),s=(r=t.get("center"),i=Math.min(n.getWidth(),n.getHeight()),{cx:o(r[0],n.getWidth()),cy:o(r[1],n.getHeight()),r:o(t.get("radius"),i/2)});this._renderMain(t,e,n,a,s)},dispose:function(){},_renderMain:function(t,e,n,r,a){for(var s=this.group,o=t.getModel("axisLine").getModel("lineStyle"),l=t.get("clockwise"),h=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,d=(u-h)%c,p=h,g=o.get("width"),f=0;f<r.length;f++){var u=h+d*Math.min(Math.max(r[f][0],0),1),y=new i.Sector({shape:{startAngle:p,endAngle:u,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-g,r:a.r},silent:!0});y.setStyle({fill:r[f][1]}),y.setStyle(o.getLineStyle(["color","borderWidth","borderColor"])),s.add(y),p=u}var x=function(t){if(t<=0)return r[0][1];for(var e=0;e<r.length;e++)if(r[e][0]>=t&&(0===e?0:r[e-1][0])<t)return r[e][1];return r[e-1][1]};if(!l){var m=h;h=u,u=m}this._renderTicks(t,e,n,x,a,h,u,l),this._renderPointer(t,e,n,x,a,h,u,l),this._renderTitle(t,e,n,x,a),this._renderDetail(t,e,n,x,a)},_renderTicks:function(t,e,n,r,a,s,h,c){for(var d=this.group,p=a.cx,g=a.cy,f=a.r,y=+t.get("min"),x=+t.get("max"),m=t.getModel("splitLine"),v=t.getModel("axisTick"),b=t.getModel("axisLabel"),w=t.get("splitNumber"),M=v.get("splitNumber"),_=o(m.get("length"),f),A=o(v.get("length"),f),S=s,C=(h-s)/w,I=C/M,P=m.getModel("lineStyle").getLineStyle(),T=v.getModel("lineStyle").getLineStyle(),k=0;k<=w;k++){var L=Math.cos(S),D=Math.sin(S);if(m.get("show")){var R=new i.Line({shape:{x1:L*f+p,y1:D*f+g,x2:L*(f-_)+p,y2:D*(f-_)+g},style:P,silent:!0});"auto"===P.stroke&&R.setStyle({stroke:r(k/w)}),d.add(R)}if(b.get("show")){var N=u(l(k/w*(x-y)+y),b.get("formatter")),O=b.get("distance"),j=r(k/w);d.add(new i.Text({style:i.setTextStyle({},b,{text:N,x:L*(f-_-O)+p,y:D*(f-_-O)+g,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:L<-.4?"left":L>.4?"right":"center"},{autoColor:j}),silent:!0}))}if(v.get("show")&&k!==w){for(var E=0;E<=M;E++){var L=Math.cos(S),D=Math.sin(S),V=new i.Line({shape:{x1:L*f+p,y1:D*f+g,x2:L*(f-A)+p,y2:D*(f-A)+g},silent:!0,style:T});"auto"===T.stroke&&V.setStyle({stroke:r((k+E/M)/w)}),d.add(V),S+=I}S-=I}else S+=C}},_renderPointer:function(t,e,n,a,s,l,u,c){var d=this.group,p=this._data;if(!t.get("pointer.show")){p&&p.eachItemGraphicEl(function(t){d.remove(t)});return}var g=[+t.get("min"),+t.get("max")],f=[l,u],y=t.getData(),x=y.mapDimension("value");y.diff(p).add(function(e){var n=new r({shape:{angle:l}});i.initProps(n,{shape:{angle:h(y.get(x,e),g,f,!0)}},t),d.add(n),y.setItemGraphicEl(e,n)}).update(function(e,n){var r=p.getItemGraphicEl(n);i.updateProps(r,{shape:{angle:h(y.get(x,e),g,f,!0)}},t),d.add(r),y.setItemGraphicEl(e,r)}).remove(function(t){var e=p.getItemGraphicEl(t);d.remove(e)}).execute(),y.eachItemGraphicEl(function(t,e){var n=y.getItemModel(e),r=n.getModel("pointer");t.setShape({x:s.cx,y:s.cy,width:o(r.get("width"),s.r),r:o(r.get("length"),s.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",a(h(y.get(x,e),g,[0,1],!0))),i.setHoverStyle(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=y},_renderTitle:function(t,e,n,r,a){var s=t.getData(),l=s.mapDimension("value"),u=t.getModel("title");if(u.get("show")){var c=u.get("offsetCenter"),d=a.cx+o(c[0],a.r),p=a.cy+o(c[1],a.r),g=+t.get("min"),f=+t.get("max"),y=r(h(t.getData().get(l,0),[g,f],[0,1],!0));this.group.add(new i.Text({silent:!0,style:i.setTextStyle({},u,{x:d,y:p,text:s.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:y,forceRich:!0})}))}},_renderDetail:function(t,e,n,r,a){var s=t.getModel("detail"),l=+t.get("min"),c=+t.get("max");if(s.get("show")){var d=s.get("offsetCenter"),p=a.cx+o(d[0],a.r),g=a.cy+o(d[1],a.r),f=o(s.get("width"),a.r),y=o(s.get("height"),a.r),x=t.getData(),m=x.get(x.mapDimension("value"),0),v=r(h(m,[l,c],[0,1],!0));this.group.add(new i.Text({silent:!0,style:i.setTextStyle({},s,{x:p,y:g,text:u(m,s.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(y)?null:y,textAlign:"center",textVerticalAlign:"middle"},{autoColor:v,forceRich:!0})}))}}})},25917:function(t,e,n){t.exports=n(87205).extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,r=Math.sin,i=e.r,a=e.width,s=e.angle,o=e.x-n(s)*a*(a>=i/3?1:2),l=e.y-r(s)*a*(a>=i/3?1:2);s=e.angle-Math.PI/2,t.moveTo(o,l),t.lineTo(e.x+n(s)*a,e.y+r(s)*a),t.lineTo(e.x+n(e.angle)*i,e.y+r(e.angle)*i),t.lineTo(e.x-n(s)*a,e.y-r(s)*a),t.lineTo(o,l)}})},36793:function(t,e,n){var r=n(47475);n(59506),n(31540),n(34187);var i=n(49832),a=n(41314),s=n(77851),o=n(14031),l=n(77889),h=n(67472),u=n(23189),c=n(60714);r.registerProcessor(i),r.registerVisual(a("graph","circle",null)),r.registerVisual(s),r.registerVisual(o),r.registerLayout(l),r.registerLayout(h),r.registerLayout(u),r.registerCoordinateSystem("graphView",{create:c})},59506:function(t,e,n){var r=n(47475),i=n(90942),a=n(66023),s=n(70018).defaultEmphasis,o=n(27611),l=n(20438).encodeHTML,h=n(89923),u=r.extendSeriesModel({type:"series.graph",init:function(t){u.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){u.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){u.superApply(this,"mergeDefaultAndTheme",arguments),s(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var n=t.edges||t.links||[],r=t.data||t.nodes||[],i=this;if(r&&n)return h(r,n,this,!0,function(t,n){t.wrapMethod("getItemModel",function(t){var e=i._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var r=i.getModel("edgeLabel"),a=new o({label:r.option},r.parentModel,e),s=i.getModel("emphasis.edgeLabel"),l=new o({emphasis:{label:s.option}},s.parentModel,e);function h(t){return(t=this.parsePath(t))&&"label"===t[0]?a:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}n.wrapMethod("getItemModel",function(t){return t.customizeGetParent(h),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return u.superApply(this,"formatTooltip",arguments);var r=this.getData(),i=this.getDataParams(t,n),a=r.graph.getEdgeByIndex(t),s=r.getName(a.node1.dataIndex),o=r.getName(a.node2.dataIndex),h=[];return null!=s&&h.push(s),null!=o&&h.push(o),h=l(h.join(" > ")),i.value&&(h+=" : "+l(i.value)),h},_updateCategoriesData:function(){var t=a.map(this.option.categories||[],function(t){return null!=t.value?t:a.extend({value:0},t)}),e=new i(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return u.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}});t.exports=u},31540:function(t,e,n){var r=n(47475),i=n(66023),a=n(67076),s=n(93275),o=n(84275),l=n(75398),h=n(56694).onIrrelevantElement,u=n(76165),c=n(61709),d="__focusNodeAdjacency",p="__unfocusNodeAdjacency",g=["itemStyle","opacity"],f=["lineStyle","opacity"];function y(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function x(t,e,n){var r=t.getGraphicEl(),i=y(t,e);null!=n&&(null==i&&(i=1),i*=n),r.downplay&&r.downplay(),r.traverse(function(t){if("group"!==t.type){var e=t.lineLabelOriginalOpacity;(null==e||null!=n)&&(e=i),t.setStyle("opacity",e)}})}function m(t,e){var n=y(t,e),r=t.getGraphicEl();r.highlight&&r.highlight(),r.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}t.exports=r.extendChartView({type:"graph",init:function(t,e){var n=new a,r=new s,i=this.group;this._controller=new o(e.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},render:function(t,e,n){var r=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var i=this._symbolDraw,a=this._lineDraw,s=this.group;if("view"===r.type){var o={position:r.position,scale:r.scale};this._firstRender?s.attr(o):u.updateProps(s,o,t)}c(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();i.updateData(l);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var g=t.forceLayout,f=t.get("force.layoutAnimation");g&&this._startForceLayoutIteration(g,f),l.eachItemGraphicEl(function(e,r){var i=l.getItemModel(r);e.off("drag").off("dragend");var a=i.get("draggable");a&&e.on("drag",function(){g&&(g.warmUp(),this._layouting||this._startForceLayoutIteration(g,f),g.setFixed(r),l.setItemLayout(r,e.position))},this).on("dragend",function(){g&&g.setUnfixed(r)},this),e.setDraggable(a&&g),e[d]&&e.off("mouseover",e[d]),e[p]&&e.off("mouseout",e[p]),i.get("focusNodeAdjacency")&&(e.on("mouseover",e[d]=function(){n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[p]=function(){n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))},this),l.graph.eachEdge(function(e){var r=e.getGraphicEl();r[d]&&r.off("mouseover",r[d]),r[p]&&r.off("mouseout",r[p]),e.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[d]=function(){n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),r.on("mouseout",r[p]=function(){n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))});var y="circular"===t.get("layout")&&t.get("circular.rotateLabel"),x=l.getLayout("cx"),m=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n=t.getSymbolPath();if(y){var r=l.getItemLayout(e),i=Math.atan2(r[1]-m,r[0]-x);i<0&&(i=2*Math.PI+i);var a=r[0]<x;a&&(i-=Math.PI);var s=a?"left":"right";n.setStyle({textRotation:-i,textPosition:s,textOrigin:"center"}),n.hoverStyle&&(n.hoverStyle.textPosition=s)}else n.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,n,r){var a=this._model.getData().graph,s=r.dataIndex,o=r.edgeDataIndex,l=a.getNodeByIndex(s),h=a.getEdgeByIndex(o);(l||h)&&(a.eachNode(function(t){x(t,g,.1)}),a.eachEdge(function(t){x(t,f,.1)}),l&&(m(l,g),i.each(l.edges,function(t){t.dataIndex<0||(m(t,f),m(t.node1,g),m(t.node2,g))})),h&&(m(h,f),m(h.node1,g),m(h.node2,g)))},unfocusNodeAdjacency:function(t,e,n,r){var i=this._model.getData().graph;i.eachNode(function(t){x(t,g)}),i.eachEdge(function(t){x(t,f)})},_startForceLayoutIteration:function(t,e){var n=this;!function r(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(r,16):r())})}()},_updateController:function(t,e,n){var r=this._controller,i=this._controllerHost,a=this.group;if(r.setPointerChecker(function(e,r,i){var s=a.getBoundingRect();return s.applyTransform(a.transform),s.contain(r,i)&&!h(e,n,t)}),"view"!==t.coordinateSystem.type)return void r.disable();r.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(e){l.updateViewOnPan(i,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})}).on("zoom",function(e){l.updateViewOnZoom(i,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(),c(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()},this)},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),n=this._getNodeGlobalScale(t),r=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",r)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,r=e.scale,i=r&&r[0]||1;return((e.getZoom()-1)*n+1)/i},updateLayout:function(t){c(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}})},61709:function(t,e,n){var r=n(30783),i=n(3265),a=[],s=[],o=[],l=r.quadraticAt,h=i.distSquare,u=Math.abs;function c(t,e,n){for(var r,i=t[0],c=t[1],d=t[2],p=1/0,g=n*n,f=.1,y=.1;y<=.9;y+=.1){a[0]=l(i[0],c[0],d[0],y),a[1]=l(i[1],c[1],d[1],y);var x=u(h(a,e)-g);x<p&&(p=x,r=y)}for(var m=0;m<32;m++){var v=r+f;s[0]=l(i[0],c[0],d[0],r),s[1]=l(i[1],c[1],d[1],r),o[0]=l(i[0],c[0],d[0],v),o[1]=l(i[1],c[1],d[1],v);var x=h(s,e)-g;if(.01>u(x))break;var b=h(o,e)-g;f/=2,x<0?b>=0?r+=f:r-=f:b>=0?r-=f:r+=f}return r}t.exports=function(t,e){var n=[],a=r.quadraticSubdivide,s=[[],[],[]],o=[[],[]],l=[];function h(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}e/=2,t.eachEdge(function(t,r){var u=t.getLayout(),d=t.getVisual("fromSymbol"),p=t.getVisual("toSymbol");!u.__original&&(u.__original=[i.clone(u[0]),i.clone(u[1])],u[2]&&u.__original.push(i.clone(u[2])));var g=u.__original;if(null!=u[2]){if(i.copy(s[0],g[0]),i.copy(s[1],g[2]),i.copy(s[2],g[1]),d&&"none"!==d){var f=h(t.node1),y=c(s,g[0],f*e);a(s[0][0],s[1][0],s[2][0],y,n),s[0][0]=n[3],s[1][0]=n[4],a(s[0][1],s[1][1],s[2][1],y,n),s[0][1]=n[3],s[1][1]=n[4]}if(p&&"none"!==p){var f=h(t.node2),y=c(s,g[1],f*e);a(s[0][0],s[1][0],s[2][0],y,n),s[1][0]=n[1],s[2][0]=n[2],a(s[0][1],s[1][1],s[2][1],y,n),s[1][1]=n[1],s[2][1]=n[2]}i.copy(u[0],s[0]),i.copy(u[1],s[2]),i.copy(u[2],s[1])}else{if(i.copy(o[0],g[0]),i.copy(o[1],g[1]),i.sub(l,o[1],o[0]),i.normalize(l,l),d&&"none"!==d){var f=h(t.node1);i.scaleAndAdd(o[0],o[0],l,f*e)}if(p&&"none"!==p){var f=h(t.node2);i.scaleAndAdd(o[1],o[1],l,-f*e)}i.copy(u[0],o[0]),i.copy(u[1],o[1])}})}},49832:function(t){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),r=t.getGraph().data,i=n.mapArray(n.getName);r.filterSelf(function(t){var n=r.getItemModel(t).getShallow("category");if(null!=n){"number"==typeof n&&(n=i[n]);for(var a=0;a<e.length;a++)if(!e[a].isSelected(n))return!1}return!0})},this)}},77851:function(t){t.exports=function(t){var e={};t.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),r=t.getData(),i={};n.each(function(r){var a=n.getName(r);i["ec-"+a]=r;var s=n.getItemModel(r).get("itemStyle.color")||t.getColorFromPalette(a,e);n.setItemVisual(r,"color",s)}),n.count()&&r.each(function(t){var e=r.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=i["ec-"+e]),r.getItemVisual(t,"color",!0)||r.setItemVisual(t,"color",n.getItemVisual(e,"color")))})})}},67472:function(t,e,n){var r=n(22260).circularLayout;t.exports=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&r(t)})}},22260:function(t,e,n){var r=n(3265);e.circularLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=e.getBoundingRect(),i=t.getData(),a=i.graph,s=0,o=i.getSum("value"),l=2*Math.PI/(o||i.count()),h=n.width/2+n.x,u=n.height/2+n.y,c=Math.min(n.width,n.height)/2;a.eachNode(function(t){var e=t.getValue("value");s+=l*(o?e:1)/2,t.setLayout([c*Math.cos(s)+h,c*Math.sin(s)+u]),s+=l*(o?e:1)/2}),i.setLayout({cx:h,cy:u}),a.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=r.clone(t.node1.getLayout()),a=r.clone(t.node2.getLayout()),s=(i[0]+a[0])/2,o=(i[1]+a[1])/2;+n&&(n*=3,e=[h*n+s*(1-n),u*n+o*(1-n)]),t.setLayout([i,a,e])})}}},60714:function(t,e,n){var r=n(3115),i=n(68006).getLayoutRect,a=n(91273);t.exports=function(t,e){var n=[];return t.eachSeriesByType("graph",function(t){var s=t.get("coordinateSystem");if(!s||"view"===s){var o,l=t.getData(),h=l.mapArray(function(t){var e=l.getItemModel(t);return[+e.get("x"),+e.get("y")]}),u=[],c=[];a.fromPoints(h,u,c),c[0]-u[0]==0&&(c[0]+=1,u[0]-=1),c[1]-u[1]==0&&(c[1]+=1,u[1]-=1);var d=(c[0]-u[0])/(c[1]-u[1]),p=((o=t.getBoxLayoutParams()).aspect=d,i(o,{width:e.getWidth(),height:e.getHeight()}));isNaN(d)&&(u=[p.x,p.y],c=[p.x+p.width,p.y+p.height]);var g=c[0]-u[0],f=c[1]-u[1],y=p.width,x=p.height,m=t.coordinateSystem=new r;m.zoomLimit=t.get("scaleLimit"),m.setBoundingRect(u[0],u[1],g,f),m.setViewRect(p.x,p.y,y,x),m.setCenter(t.get("center")),m.setZoom(t.get("zoom")),n.push(m)}}),n}},14031:function(t){function e(t){return t instanceof Array||(t=[t,t]),t}t.exports=function(t){t.eachSeriesByType("graph",function(t){var n=t.getGraph(),r=t.getEdgeData(),i=e(t.get("edgeSymbol")),a=e(t.get("edgeSymbolSize")),s="lineStyle.color".split("."),o="lineStyle.opacity".split(".");r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("color",t.get(s)),r.setVisual("opacity",t.get(o)),r.each(function(t){var i=r.getItemModel(t),a=n.getEdgeByIndex(t),l=e(i.getShallow("symbol",!0)),h=e(i.getShallow("symbolSize",!0)),u=i.get(s),c=i.get(o);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}l[0]&&a.setVisual("fromSymbol",l[0]),l[1]&&a.setVisual("toSymbol",l[1]),h[0]&&a.setVisual("fromSymbolSize",h[0]),h[1]&&a.setVisual("toSymbolSize",h[1]),a.setVisual("color",u),a.setVisual("opacity",c)})})}},88797:function(t,e,n){var r=n(3265),i=r.scaleAndAdd;e.forceLayout=function(t,e,n){for(var a=n.rect,s=a.width,o=a.height,l=[a.x+s/2,a.y+o/2],h=null==n.gravity?.1:n.gravity,u=0;u<t.length;u++){var c=t[u];c.p||(c.p=r.create(s*(Math.random()-.5)+l[0],o*(Math.random()-.5)+l[1])),c.pp=r.clone(c.p),c.edges=null}var d=.6;return{warmUp:function(){d=.5},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(n){for(var a=[],s=t.length,o=0;o<e.length;o++){var u=e[o],c=u.n1,p=u.n2;r.sub(a,p.p,c.p);var g=r.len(a)-u.d,f=p.w/(c.w+p.w);isNaN(f)&&(f=0),r.normalize(a,a),c.fixed||i(c.p,c.p,a,f*g*d),p.fixed||i(p.p,p.p,a,-(1-f)*g*d)}for(var o=0;o<s;o++){var y=t[o];y.fixed||(r.sub(a,l,y.p),i(y.p,y.p,a,h*d))}for(var o=0;o<s;o++)for(var c=t[o],x=o+1;x<s;x++){var p=t[x];r.sub(a,p.p,c.p);var g=r.len(a);0===g&&(r.set(a,Math.random()-.5,Math.random()-.5),g=1);var m=(c.rep+p.rep)/g/g;c.fixed||i(c.pp,c.pp,a,m),p.fixed||i(p.pp,p.pp,a,-m)}for(var v=[],o=0;o<s;o++){var y=t[o];y.fixed||(r.sub(v,y.p,y.pp),i(y.p,y.p,v,d),r.copy(y.pp,y.p))}d*=.992,n&&n(t,e,d<.01)}}}},23189:function(t,e,n){var r=n(88797).forceLayout,i=n(79486).simpleLayout,a=n(22260).circularLayout,s=n(98763).linearMap,o=n(3265),l=n(66023);t.exports=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var n=t.preservedPoints||{},h=t.getGraph(),u=h.data,c=h.edgeData,d=t.getModel("force"),p=d.get("initLayout");t.preservedPoints?u.each(function(t){var e=u.getId(t);u.setItemLayout(t,n[e]||[NaN,NaN])}):p&&"none"!==p?"circular"===p&&a(t):i(t);var g=u.getDataExtent("value"),f=c.getDataExtent("value"),y=d.get("repulsion"),x=d.get("edgeLength");l.isArray(y)||(y=[y,y]),l.isArray(x)||(x=[x,x]),x=[x[1],x[0]];var m=u.mapArray("value",function(t,e){var n=u.getItemLayout(e),r=s(t,g,y);return isNaN(r)&&(r=(y[0]+y[1])/2),{w:r,rep:r,fixed:u.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),v=c.mapArray("value",function(t,e){var n=h.getEdgeByIndex(e),r=s(t,f,x);return isNaN(r)&&(r=(x[0]+x[1])/2),{n1:m[n.node1.dataIndex],n2:m[n.node2.dataIndex],d:r,curveness:n.getModel().get("lineStyle.curveness")||0}}),e=t.coordinateSystem,b=r(m,v,{rect:e.getBoundingRect(),gravity:d.get("gravity")}),w=b.step;b.step=function(t){for(var e=0,r=m.length;e<r;e++)m[e].fixed&&o.copy(m[e].p,h.getNodeByIndex(e).getLayout());w(function(e,r,i){for(var a=0,s=e.length;a<s;a++)e[a].fixed||h.getNodeByIndex(a).setLayout(e[a].p),n[u.getId(a)]=e[a].p;for(var a=0,s=r.length;a<s;a++){var l=r[a],c=h.getEdgeByIndex(a),d=l.n1.p,p=l.n2.p,g=c.getLayout();(g=g?g.slice():[])[0]=g[0]||[],g[1]=g[1]||[],o.copy(g[0],d),o.copy(g[1],p),+l.curveness&&(g[2]=[(d[0]+p[0])/2-(d[1]-p[1])*l.curveness,(d[1]+p[1])/2-(p[0]-d[0])*l.curveness]),c.setLayout(g)}t&&t(i)})},t.forceLayout=b,t.preservedPoints=n,b.step()}else t.forceLayout=null})}},34187:function(t,e,n){var r=n(47475),i=n(31616).updateCenterAndZoom;n(81518),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",query:t},function(e){var n=i(e.coordinateSystem,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})})},77889:function(t,e,n){var r=n(66023).each,i=n(79486),a=i.simpleLayout,s=i.simpleLayoutEdge;t.exports=function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];r(n.dimensions,function(t){o=o.concat(i.mapDimension(t,!0))});for(var l=0;l<i.count();l++){for(var h=[],u=!1,c=0;c<o.length;c++){var d=i.get(o[c],l);isNaN(d)||(u=!0),h.push(d)}u?i.setItemLayout(l,n.dataToPoint(h)):i.setItemLayout(l,[NaN,NaN])}s(i.graph)}else e&&"none"!==e||a(t)})}},79486:function(t,e,n){var r=n(3265);function i(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=r.clone(t.node1.getLayout()),i=r.clone(t.node2.getLayout()),a=[n,i];+e&&a.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(a)})}e.simpleLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var n=t.getGraph();n.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),i(n)}},e.simpleLayoutEdge=i},58199:function(t,e,n){n(25889),n(66198)},88701:function(t,e,n){var r=n(66023);function i(){var t=r.createCanvas();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}i.prototype={update:function(t,e,n,r,i,a){var s=this._getBrush(),o=this._getGradient(t,i,"inRange"),l=this._getGradient(t,i,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=n;for(var p=0;p<d;++p){var g=t[p],f=g[0],y=g[1],x=r(g[2]);c.globalAlpha=x,c.drawImage(s,f-h,y-h)}if(!u.width||!u.height)return u;for(var m=c.getImageData(0,0,u.width,u.height),v=m.data,b=0,w=v.length,M=this.minOpacity,_=this.maxOpacity-M;b<w;){var x=v[b+3]/256,A=4*Math.floor(255*x);if(x>0){var S=a(x)?o:l;x>0&&(x=x*_+M),v[b++]=S[A],v[b++]=S[A+1],v[b++]=S[A+2],v[b++]=S[A+3]*x*256}else b+=4}return c.putImageData(m,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=r.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},_getGradient:function(t,e,n){for(var r=this._gradientPixels,i=r[n]||(r[n]=new Uint8ClampedArray(1024)),a=[0,0,0,0],s=0,o=0;o<256;o++)e[n](o/255,!0,a),i[s++]=a[0],i[s++]=a[1],i[s++]=a[2],i[s++]=a[3];return i}},t.exports=i},25889:function(t,e,n){var r=n(26626),i=n(6551),a=n(33776);t.exports=r.extend({type:"series.heatmap",getInitialData:function(t,e){return i(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=a.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}})},66198:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(76165),a=n(88701),s=n(66023);t.exports=r.extendChartView({type:"heatmap",render:function(t,e,n){e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(i=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var r,i,a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):"lng"===(r=a.dimensions)[0]&&"lat"===r[1]&&this._renderOnGeo(a,t,i,n)},incrementalPrepareRender:function(t,e,n){this.group.removeAll()},incrementalRender:function(t,e,n,r){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,r,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,r,a){var o=t.coordinateSystem;if("cartesian2d"===o.type){var l=o.getAxis("x"),h=o.getAxis("y");_=l.getBandWidth(),A=h.getBandWidth()}for(var u=this.group,c=t.getData(),d="itemStyle",p="emphasis.itemStyle",g="label",f="emphasis.label",y=t.getModel(d).getItemStyle(["color"]),x=t.getModel(p).getItemStyle(),m=t.getModel(g),v=t.getModel(f),b=o.type,w="cartesian2d"===b?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],M=n;M<r;M++){if("cartesian2d"===b){if(isNaN(c.get(w[2],M)))continue;var _,A,S,C=o.dataToPoint([c.get(w[0],M),c.get(w[1],M)]);S=new i.Rect({shape:{x:C[0]-_/2,y:C[1]-A/2,width:_,height:A},style:{fill:c.getItemVisual(M,"color"),opacity:c.getItemVisual(M,"opacity")}})}else{if(isNaN(c.get(w[1],M)))continue;S=new i.Rect({z2:1,shape:o.dataToRect([c.get(w[0],M)]).contentShape,style:{fill:c.getItemVisual(M,"color"),opacity:c.getItemVisual(M,"opacity")}})}var I=c.getItemModel(M);c.hasItemOption&&(y=I.getModel(d).getItemStyle(["color"]),x=I.getModel(p).getItemStyle(),m=I.getModel(g),v=I.getModel(f));var P=t.getRawValue(M),T="-";P&&null!=P[2]&&(T=P[2]),i.setLabelStyle(y,x,m,v,{labelFetcher:t,labelDataIndex:M,defaultText:T,isRectText:!0}),S.setStyle(y),i.setHoverStyle(S,c.hasItemOption?x:s.extend({},x)),S.incremental=a,a&&(S.useHoverLayer=!0),u.add(S),c.setItemGraphicEl(M,S)}},_renderOnGeo:function(t,e,n,r){var o,l,h,u,c,d,p,g=n.targetVisuals.inRange,f=n.targetVisuals.outOfRange,y=e.getData(),x=this._hmLayer||this._hmLayer||new a;x.blurSize=e.get("blurSize"),x.pointSize=e.get("pointSize"),x.minOpacity=e.get("minOpacity"),x.maxOpacity=e.get("maxOpacity");var m=t.getViewRect().clone(),v=t.getRoamTransform();m.applyTransform(v);var b=Math.max(m.x,0),w=Math.max(m.y,0),M=Math.min(m.width+m.x,r.getWidth()),_=Math.min(m.height+m.y,r.getHeight()),A=M-b,S=_-w,C=[y.mapDimension("lng"),y.mapDimension("lat"),y.mapDimension("value")],I=y.mapArray(C,function(e,n,r){var i=t.dataToPoint([e,n]);return i[0]-=b,i[1]-=w,i.push(r),i}),P=n.getExtent(),T="visualMap.continuous"===n.type?(o=n.option.range,l=P[1]-P[0],o=[(o[0]-P[0])/l,(o[1]-P[0])/l],function(t){return t>=o[0]&&t<=o[1]}):(h=n.getPieceList(),u=n.option.selected,c=P[1]-P[0],d=(h=s.map(h,function(t){return{interval:[(t.interval[0]-P[0])/c,(t.interval[1]-P[0])/c]}})).length,p=0,function(t){for(var e=p;e<d;e++){var n=h[e].interval;if(n[0]<=t&&t<=n[1]){p=e;break}}if(e===d)for(var e=p-1;e>=0;e--){var n=h[e].interval;if(n[0]<=t&&t<=n[1]){p=e;break}}return e>=0&&e<d&&u[e]});x.update(I,A,S,g.color.getNormalizer(),{inRange:g.color.getColorMapper(),outOfRange:f.color.getColorMapper()},T);var k=new i.Image({style:{width:A,height:S,x:b,y:w,image:x.canvas},silent:!0});this.group.add(k)},dispose:function(){}})},36397:function(t,e,n){var r=n(76165),i=n(7574),a=n(66023),s=n(87557).createSymbol,o=n(3265),l=n(30783);function h(t,e,n){r.Group.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}var u=h.prototype;u.createLine=function(t,e,n){return new i(t,e,n)},u._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),r=n.get("symbolSize"),i=n.get("symbol");a.isArray(r)||(r=[r,r]);var o=n.get("color")||t.getItemVisual(e,"color"),l=this.childAt(1);this._symbolType!==i&&(this.remove(l),(l=s(i,-.5,-.5,1,1,o)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",o),l.setStyle(n.getItemStyle(["color"])),l.attr("scale",r),l.setColor(o),l.attr("scale",r),this._symbolType=i,this._updateEffectAnimation(t,n,e))},u._updateEffectAnimation=function(t,e,n){var r=this.childAt(1);if(r){var i=this,s=t.getItemLayout(n),o=1e3*e.get("period"),l=e.get("loop"),h=e.get("constantSpeed"),u=a.retrieve(e.get("delay"),function(e){return e/t.count()*o/3}),c="function"==typeof u;if(r.ignore=!0,this.updateAnimationPoints(r,s),h>0&&(o=this.getLineLength(r)/h*1e3),o!==this._period||l!==this._loop){r.stopAnimation();var d=u;c&&(d=u(n)),r.__t>0&&(d=-o*r.__t),r.__t=0;var p=r.animate("",l).when(o,{__t:1}).delay(d).during(function(){i.updateSymbolPosition(r)});l||p.done(function(){i.remove(r)}),p.start()}this._period=o,this._loop=l}},u.getLineLength=function(t){return o.dist(t.__p1,t.__cp1)+o.dist(t.__cp1,t.__p2)},u.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},u.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},u.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,r=t.__cp1,i=t.__t,a=t.position,s=l.quadraticAt,o=l.quadraticDerivativeAt;a[0]=s(e[0],r[0],n[0],i),a[1]=s(e[1],r[1],n[1],i);var h=o(e[0],r[0],n[0],i);t.rotation=-Math.atan2(o(e[1],r[1],n[1],i),h)-Math.PI/2,t.ignore=!1},u.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},a.inherits(h,r.Group),t.exports=h},94479:function(t,e,n){var r=n(14385),i=n(66023),a=n(36397),s=n(3265);function o(t,e,n){a.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}var l=o.prototype;l.createLine=function(t,e,n){return new r(t,e,n)},l.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],r=0,i=1;i<e.length;i++){var a=e[i-1],o=e[i];r+=s.dist(a,o),n.push(r)}if(0!==r){for(var i=0;i<n.length;i++)n[i]/=r;this._offsets=n,this._length=r}},l.getLineLength=function(t){return this._length},l.updateSymbolPosition=function(t){var e,n=t.__t,r=this._points,i=this._offsets,a=r.length;if(i){var o=this._lastFrame;if(n<this._lastFramePercent){for(e=Math.min(o+1,a-1);e>=0&&!(i[e]<=n);e--);e=Math.min(e,a-2)}else{for(var e=o;e<a&&!(i[e]>n);e++);e=Math.min(e-1,a-2)}s.lerp(t.position,r[e],r[e+1],(n-i[e])/(i[e+1]-i[e]));var l=r[e+1][0]-r[e][0];t.rotation=-Math.atan2(r[e+1][1]-r[e][1],l)-Math.PI/2,this._lastFrame=e,this._lastFramePercent=n,t.ignore=!1}},i.inherits(o,a),t.exports=o},43156:function(t,e,n){var r=n(66023),i=n(87557).createSymbol,a=n(76165).Group,s=n(98763).parsePercent,o=n(25718);function l(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function h(t,e){a.call(this);var n=new o(t,e),r=new a;this.add(n),this.add(r),r.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}var u=h.prototype;u.stopEffectAnimation=function(){this.childAt(1).removeAll()},u.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,r=this.childAt(1),a=0;a<3;a++){var s=i(e,-1,-1,2,2,n);s.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*t.period+t.effectOffset;s.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),s.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),r.add(s)}l(r,t)},u.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),r=["symbolType","period","rippleScale"],i=0;i<r.length;i++){var a=r[i];if(e[a]!==t[a]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}l(n,t)},u.highlight=function(){this.trigger("emphasis")},u.downplay=function(){this.trigger("normal")},u.updateData=function(t,e){var n,i=t.hostModel;this.childAt(0).updateData(t,e);var a=this.childAt(1),o=t.getItemModel(e),l=t.getItemVisual(e,"symbol"),h=(n=t.getItemVisual(e,"symbolSize"),r.isArray(n)||(n=[+n,+n]),n),u=t.getItemVisual(e,"color");a.attr("scale",h),a.traverse(function(t){t.attr({fill:u})});var c=o.getShallow("symbolOffset");if(c){var d=a.position;d[0]=s(c[0],h[0]),d[1]=s(c[1],h[1])}a.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var p={};if(p.showEffectOn=i.get("showEffectOn"),p.rippleScale=o.get("rippleEffect.scale"),p.brushType=o.get("rippleEffect.brushType"),p.period=1e3*o.get("rippleEffect.period"),p.effectOffset=e/t.count(),p.z=o.getShallow("z")||0,p.zlevel=o.getShallow("zlevel")||0,p.symbolType=l,p.color=u,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===p.showEffectOn)this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p;else{this._effectCfg=null,this.stopEffectAnimation();var g=this.childAt(0),f=function(){g.highlight(),"render"!==p.showEffectOn&&this.startEffectAnimation(p)},y=function(){g.downplay(),"render"!==p.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",y,this).on("emphasis",f,this).on("normal",y,this)}this._effectCfg=p},u.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},r.inherits(h,a),t.exports=h},87300:function(t,e,n){var r=n(76165),i=n(55117),a=n(11846),s=n(5280),o=r.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,r=e.curveness;if(e.polyline)for(var i=0;i<n.length;){var a=n[i++];if(a>0){t.moveTo(n[i++],n[i++]);for(var s=1;s<a;s++)t.lineTo(n[i++],n[i++])}}else for(var i=0;i<n.length;){var o=n[i++],l=n[i++],h=n[i++],u=n[i++];if(t.moveTo(o,l),r>0){var c=(o+h)/2-(l-u)*r,d=(l+u)/2-(h-o)*r;t.quadraticCurveTo(c,d,h,u)}else t.lineTo(h,u)}},findDataIndex:function(t,e){var n=this.shape,r=n.segs,i=n.curveness;if(n.polyline)for(var o=0,l=0;l<r.length;){var h=r[l++];if(h>0)for(var u=r[l++],c=r[l++],d=1;d<h;d++){var p=r[l++],g=r[l++];if(a.containStroke(u,c,p,g))return o}o++}else for(var o=0,l=0;l<r.length;){var u=r[l++],c=r[l++],p=r[l++],g=r[l++];if(i>0){var f=(u+p)/2-(c-g)*i,y=(c+g)/2-(p-u)*i;if(s.containStroke(u,c,f,y,p,g))return o}else if(a.containStroke(u,c,p,g))return o;o++}return -1}});function l(){this.group=new r.Group}var h=l.prototype;h.isPersistent=function(){return!this._incremental},h.updateData=function(t){this.group.removeAll();var e=new o({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},h.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new i({silent:!0})),this.group.add(this._incremental)):this._incremental=null},h.incrementalUpdate=function(t,e){var n=new o;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},h.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},h._setCommon=function(t,e,n){var r=e.hostModel;t.setShape({polyline:r.get("polyline"),curveness:r.get("lineStyle.curveness")}),t.useStyle(r.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("color");i&&t.setStyle("stroke",i),t.setStyle("fill"),n||(t.seriesIndex=r.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(t.dataIndex=n+t.__startIndex)}))},h._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t.exports=l},30843:function(t,e,n){var r=n(76165),i=n(87557).createSymbol,a=n(55117),s=r.extendShape({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var n=e.points,r=e.size,i=this.symbolProxy,a=i.shape;if(!((t.getContext?t.getContext():t)&&r[0]<4))for(var s=0;s<n.length;){var o=n[s++],l=n[s++];isNaN(o)||isNaN(l)||(a.x=o-r[0]/2,a.y=l-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,r=e.size;if(r[0]<4){this.setTransform(t);for(var i=0;i<n.length;){var a=n[i++],s=n[i++];isNaN(a)||isNaN(s)||t.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),s=Math.max(i[1],4),o=r.length/2-1;o>=0;o--){var l=2*o,h=r[l]-a/2,u=r[l+1]-s/2;if(t>=h&&e>=u&&t<=h+a&&e<=u+s)return o}return -1}});function o(){this.group=new r.Group}var l=o.prototype;l.isPersistent=function(){return!this._incremental},l.updateData=function(t){this.group.removeAll();var e=new s({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},l.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var n=(t.endIndex-t.startIndex)*2,r=4*t.startIndex*2;e=new Float32Array(e.buffer,r,n)}t.setShape("points",e)})}},l.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new a({silent:!0})),this.group.add(this._incremental)):this._incremental=null},l.incrementalUpdate=function(t,e){var n;this._incremental?(n=new s,this._incremental.addDisplayable(n,!0)):((n=new s({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},l._setCommon=function(t,e,n){var r=e.hostModel,a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.symbolProxy=i(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var s=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(s?["color","shadowBlur","shadowColor"]:["color"]));var o=e.getVisual("color");o&&t.setColor(o),n||(t.seriesIndex=r.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(t.dataIndex=n+(t.startIndex||0))}))},l.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},l._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t.exports=o},7574:function(t,e,n){var r=n(66023),i=n(3265),a=n(87557),s=n(51819),o=n(76165),l=n(98763).round,h=["fromSymbol","toSymbol"];function u(t){return"_"+t+"Type"}function c(t,e,n){var i=e.getItemVisual(n,"color"),s=e.getItemVisual(n,t),o=e.getItemVisual(n,t+"Size");if(s&&"none"!==s){r.isArray(o)||(o=[o,o]);var l=a.createSymbol(s,-o[0]/2,-o[1]/2,o[0],o[1],i);return l.name=t,l}}function d(t,e){var n=e[0],r=e[1],i=e[2];t.x1=n[0],t.y1=n[1],t.x2=r[0],t.y2=r[1],t.percent=1,i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function p(t,e,n){o.Group.call(this),this._createLine(t,e,n)}var g=p.prototype;g.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var r=1,a=this.parent;a;)a.scale&&(r/=a.scale[0]),a=a.parent;var s=this.childOfName("line");if(this.__dirty||s.__dirty){var o=s.shape.percent,l=s.pointAt(0),h=s.pointAt(o),u=i.sub([],h,l);if(i.normalize(u,u),t){t.attr("position",l);var c=s.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),t.attr("scale",[r*o,r*o])}if(e){e.attr("position",h);var c=s.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*o,r*o])}if(!n.ignore){n.attr("position",h);var d,p,g,f=5*r;if("end"===n.__position)d=[u[0]*f+h[0],u[1]*f+h[1]],p=u[0]>.8?"left":u[0]<-.8?"right":"center",g=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var y=o/2,c=s.tangentAt(y),x=[c[1],-c[0]],m=s.pointAt(y);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]),d=[m[0]+x[0]*f,m[1]+x[1]*f],p="center",g="bottom";var v=-Math.atan2(c[1],c[0]);h[0]<l[0]&&(v=Math.PI+v),n.attr("rotation",v)}else d=[-u[0]*f+l[0],-u[1]*f+l[1]],p=u[0]>.8?"right":u[0]<-.8?"left":"center",g=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||p},position:d,scale:[r,r]})}}}},g._createLine=function(t,e,n){var i,a,l=t.hostModel,p=(i=t.getItemLayout(e),d((a=new s({name:"line"})).shape,i),a);p.shape.percent=0,o.initProps(p,{shape:{percent:1}},l,e),this.add(p);var g=new o.Text({name:"label",lineLabelOriginalOpacity:1});this.add(g),r.each(h,function(n){var r=c(n,t,e);this.add(r),this[u(n)]=t.getItemVisual(e,n)},this),this._updateCommonStl(t,e,n)},g.updateData=function(t,e,n){var i=t.hostModel,a=this.childOfName("line"),s=t.getItemLayout(e),l={shape:{}};d(l.shape,s),o.updateProps(a,l,i,e),r.each(h,function(n){var r=t.getItemVisual(e,n),i=u(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=c(n,t,e);this.add(a)}this[i]=r},this),this._updateCommonStl(t,e,n)},g._updateCommonStl=function(t,e,n){var i,a,s=t.hostModel,u=this.childOfName("line"),c=n&&n.lineStyle,d=n&&n.hoverLineStyle,p=n&&n.labelModel,g=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var f=t.getItemModel(e);c=f.getModel("lineStyle").getLineStyle(),d=f.getModel("emphasis.lineStyle").getLineStyle(),p=f.getModel("label"),g=f.getModel("emphasis.label")}var y=t.getItemVisual(e,"color"),x=r.retrieve3(t.getItemVisual(e,"opacity"),c.opacity,1);u.useStyle(r.defaults({strokeNoScale:!0,fill:"none",stroke:y,opacity:x},c)),u.hoverStyle=d,r.each(h,function(t){var e=this.childOfName(t);e&&(e.setColor(y),e.setStyle({opacity:x}))},this);var m=p.getShallow("show"),v=g.getShallow("show"),b=this.childOfName("label");if((m||v)&&(i=y||"#000",null==(a=s.getFormattedLabel(e,"normal",t.dataType)))){var w=s.getRawValue(e);a=null==w?t.getName(e):isFinite(w)?l(w):w}var M=m?a:null,_=v?r.retrieve2(s.getFormattedLabel(e,"emphasis",t.dataType),a):null,A=b.style;(null!=M||null!=_)&&(o.setTextStyle(b.style,p,{text:M},{autoColor:i}),b.__textAlign=A.textAlign,b.__verticalAlign=A.textVerticalAlign,b.__position=p.get("position")||"middle"),null!=_?b.hoverStyle={text:_,textFill:g.getTextColor(!0),fontStyle:g.getShallow("fontStyle"),fontWeight:g.getShallow("fontWeight"),fontSize:g.getShallow("fontSize"),fontFamily:g.getShallow("fontFamily")}:b.hoverStyle={text:null},b.ignore=!m&&!v,o.setHoverStyle(this)},g.highlight=function(){this.trigger("emphasis")},g.downplay=function(){this.trigger("normal")},g.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},g.setLinePoints=function(t){var e=this.childOfName("line");d(e.shape,t),e.dirty()},r.inherits(p,o.Group),t.exports=p},93275:function(t,e,n){var r=n(76165),i=n(7574);function a(t){this._ctor=t||i,this.group=new r.Group}var s=a.prototype;function o(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function l(t){return isNaN(t[0])||isNaN(t[1])}function h(t){return!l(t[0])&&!l(t[1])}s.isPersistent=function(){return!0},s.updateData=function(t){var e=this,n=e.group,r=e._lineData;e._lineData=t,r||n.removeAll();var i=o(t);t.diff(r).add(function(n){var r=e,a=t,s=n,o=i;if(h(a.getItemLayout(s))){var l=new r._ctor(a,s,o);a.setItemGraphicEl(s,l),r.group.add(l)}}).update(function(n,a){!function(t,e,n,r,i,a){var s=e.getItemGraphicEl(r);if(!h(n.getItemLayout(i)))return t.group.remove(s);s?s.updateData(n,i,a):s=new t._ctor(n,i,a),n.setItemGraphicEl(i,s),t.group.add(s)}(e,r,t,a,n,i)}).remove(function(t){n.remove(r.getItemGraphicEl(t))}).execute()},s.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},s.incrementalPrepareUpdate=function(t){this._seriesScope=o(t),this._lineData=null,this.group.removeAll()},s.incrementalUpdate=function(t,e){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var r=t.start;r<t.end;r++)if(h(e.getItemLayout(r))){var i=new this._ctor(e,r,this._seriesScope);i.traverse(n),this.group.add(i),e.setItemGraphicEl(r,i)}},s.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},s._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t.exports=a},51819:function(t,e,n){var r=n(76165),i=n(3265),a=r.Line.prototype,s=r.BezierCurve.prototype;function o(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}t.exports=r.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(o(e)?a:s).buildPath(t,e)},pointAt:function(t){return o(this.shape)?a.pointAt.call(this,t):s.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=o(e)?[e.x2-e.x1,e.y2-e.y1]:s.tangentAt.call(this,t);return i.normalize(n,n)}})},14385:function(t,e,n){var r=n(76165),i=n(66023);function a(t,e,n){r.Group.call(this),this._createPolyline(t,e,n)}var s=a.prototype;s._createPolyline=function(t,e,n){var i=t.getItemLayout(e),a=new r.Polyline({shape:{points:i}});this.add(a),this._updateCommonStl(t,e,n)},s.updateData=function(t,e,n){var i=t.hostModel,a=this.childAt(0),s={shape:{points:t.getItemLayout(e)}};r.updateProps(a,s,i,e),this._updateCommonStl(t,e,n)},s._updateCommonStl=function(t,e,n){var a=this.childAt(0),s=t.getItemModel(e),o=t.getItemVisual(e,"color"),l=n&&n.lineStyle,h=n&&n.hoverLineStyle;(!n||t.hasItemOption)&&(l=s.getModel("lineStyle").getLineStyle(),h=s.getModel("emphasis.lineStyle").getLineStyle()),a.useStyle(i.defaults({strokeNoScale:!0,fill:"none",stroke:o},l)),a.hoverStyle=h,r.setHoverStyle(this)},s.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},i.inherits(a,r.Group),t.exports=a},25718:function(t,e,n){var r=n(66023),i=n(87557).createSymbol,a=n(76165),s=n(98763).parsePercent,o=n(31750).getDefaultLabel;function l(t,e,n){a.Group.call(this),this.updateData(t,e,n)}var h=l.prototype,u=l.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function c(t){return[t[0]/2,t[1]/2]}function d(t,e){this.parent.drift(t,e)}h._createSymbol=function(t,e,n,r,a){this.removeAll();var s=i(t,-1,-1,2,2,e.getItemVisual(n,"color"),a);s.attr({z2:100,culling:!0,scale:c(r)}),s.drift=d,this._symbolType=t,this.add(s)},h.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},h.getSymbolPath=function(){return this.childAt(0)},h.getScale=function(){return this.childAt(0).scale},h.highlight=function(){this.childAt(0).trigger("emphasis")},h.downplay=function(){this.childAt(0).trigger("normal")},h.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},h.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},h.updateData=function(t,e,n){this.silent=!1;var r=t.getItemVisual(e,"symbol")||"circle",i=t.hostModel,s=u(t,e),o=r!==this._symbolType;if(o){var l=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(r,t,e,s,l)}else{var h=this.childAt(0);h.silent=!1,a.updateProps(h,{scale:c(s)},i,e)}if(this._updateCommon(t,e,s,n),o){var h=this.childAt(0),d=n&&n.fadeIn,p={scale:h.scale.slice()};d&&(p.style={opacity:h.style.opacity}),h.scale=[0,0],d&&(h.style.opacity=0),a.initProps(h,p,i,e)}this._seriesModel=i};var p=["itemStyle"],g=["emphasis","itemStyle"],f=["label"],y=["emphasis","label"];function x(){a.isInEmphasis(this)||v.call(this)}function m(){a.isInEmphasis(this)||b.call(this)}function v(){if(!this.incremental&&!this.useHoverLayer){var t=this.__symbolOriginalScale,e=t[1]/t[0];this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut")}}function b(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}h._updateCommon=function(t,e,n,i){var l=this.childAt(0),h=t.hostModel,u=t.getItemVisual(e,"color");"image"!==l.type&&l.useStyle({strokeNoScale:!0});var d=i&&i.itemStyle,w=i&&i.hoverItemStyle,M=i&&i.symbolRotate,_=i&&i.symbolOffset,A=i&&i.labelModel,S=i&&i.hoverLabelModel,C=i&&i.hoverAnimation,I=i&&i.cursorStyle;if(!i||t.hasItemOption){var P=i&&i.itemModel?i.itemModel:t.getItemModel(e);d=P.getModel(p).getItemStyle(["color"]),w=P.getModel(g).getItemStyle(),M=P.getShallow("symbolRotate"),_=P.getShallow("symbolOffset"),A=P.getModel(f),S=P.getModel(y),C=P.getShallow("hoverAnimation"),I=P.getShallow("cursor")}else w=r.extend({},w);var T=l.style;l.attr("rotation",(M||0)*Math.PI/180||0),_&&l.attr("position",[s(_[0],n[0]),s(_[1],n[1])]),I&&l.attr("cursor",I),l.setColor(u,i&&i.symbolInnerColor),l.setStyle(d);var k=t.getItemVisual(e,"opacity");null!=k&&(T.opacity=k);var L=t.getItemVisual(e,"liftZ"),D=l.__z2Origin;null!=L?null==D&&(l.__z2Origin=l.z2,l.z2+=L):null!=D&&(l.z2=D,l.__z2Origin=null);var R=i&&i.useNameLabel;a.setLabelStyle(T,w,A,S,{labelFetcher:h,labelDataIndex:e,defaultText:function(e,n){return R?t.getName(e):o(t,e)},isRectText:!0,autoColor:u}),l.off("mouseover").off("mouseout").off("emphasis").off("normal"),l.hoverStyle=w,a.setHoverStyle(l),l.__symbolOriginalScale=c(n),C&&h.isAnimationEnabled()&&l.on("mouseover",x).on("mouseout",m).on("emphasis",v).on("normal",b)},h.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),a.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},r.inherits(l,a.Group),t.exports=l},67076:function(t,e,n){var r=n(76165),i=n(25718),a=n(66023).isObject;function s(t){this.group=new r.Group,this._symbolCtor=t||i}var o=s.prototype;function l(t,e,n,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function h(t){return null==t||a(t)||(t={isIgnore:t}),t||{}}function u(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}o.updateData=function(t,e){e=h(e);var n=this.group,i=t.hostModel,a=this._data,s=this._symbolCtor,o=u(t);a||n.removeAll(),t.diff(a).add(function(r){var i=t.getItemLayout(r);if(l(t,i,r,e)){var a=new s(t,r,o);a.attr("position",i),t.setItemGraphicEl(r,a),n.add(a)}}).update(function(h,u){var c=a.getItemGraphicEl(u),d=t.getItemLayout(h);if(!l(t,d,h,e))return void n.remove(c);c?(c.updateData(t,h,o),r.updateProps(c,{position:d},i)):(c=new s(t,h)).attr("position",d),n.add(c),t.setItemGraphicEl(h,c)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},o.isPersistent=function(){return!0},o.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var r=t.getItemLayout(n);e.attr("position",r)})},o.incrementalPrepareUpdate=function(t){this._seriesScope=u(t),this._data=null,this.group.removeAll()},o.incrementalUpdate=function(t,e,n){function r(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}n=h(n);for(var i=t.start;i<t.end;i++){var a=e.getItemLayout(i);if(l(e,a,i,n)){var s=new this._symbolCtor(e,i,this._seriesScope);s.traverse(r),s.attr("position",a),this.group.add(s),e.setItemGraphicEl(i,s)}}},o.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()},t.exports=s},89923:function(t,e,n){var r=n(66023),i=n(90942),a=n(44185),s=n(22911),o=n(35047),l=n(33776),h=n(6551);t.exports=function(t,e,n,u,c){for(var d,p=new a(u),g=0;g<t.length;g++)p.addNode(r.retrieve(t[g].id,t[g].name,g),g);for(var f=[],y=[],x=0,g=0;g<e.length;g++){var m=e[g],v=m.source,b=m.target;p.addEdge(v,b,x)&&(y.push(m),f.push(r.retrieve(m.id,v+" > "+b)),x++)}var w=n.get("coordinateSystem");if("cartesian2d"===w||"polar"===w)d=h(t,n);else{var M=l.get(w),_=M&&"view"!==M.type&&M.dimensions||[];0>r.indexOf(_,"value")&&_.concat(["value"]),(d=new i(o(t,{coordDimensions:_}),n)).initData(t)}var A=new i(["value"],n);return A.initData(y,f),c&&c(d,A),s({mainData:d,struct:p,structAttr:"graph",datas:{node:d,edge:A},datasAttr:{node:"data",edge:"edgeData"}}),p.update(),p}},6551:function(t,e,n){var r=n(66023),i=n(90942),a=n(35047),s=n(38237).SOURCE_FORMAT_ORIGINAL,o=n(39116).getDimensionTypeByAxis,l=n(70018).getDataItemValue,h=n(33776),u=n(26774).getCoordSysDefineBySeries,c=n(36265),d=n(74733).enableDataStack;t.exports=function(t,e,n){n=n||{},c.isInstance(t)||(t=c.seriesDataToSource(t));var p,g,f,y=e.get("coordinateSystem"),x=h.get(y),m=u(e);m&&(p=r.map(m.coordSysDims,function(t){var e={name:t},n=m.axisMap.get(t);return n&&(e.type=o(n.get("type"))),e})),p||(p=x&&(x.getDimensionsInfo?x.getDimensionsInfo():x.dimensions.slice())||["x","y"]);var v=a(t,{coordDimensions:p,generateCoord:n.generateCoord});m&&r.each(v,function(t,e){var n=t.coordDim,r=m.categoryAxisMap.get(n);r&&(null==g&&(g=e),t.ordinalMeta=r.getOrdinalMeta()),null!=t.otherDims.itemName&&(f=!0)}),f||null==g||(v[g].otherDims.itemName=0);var b=d(e,v),w=new i(v,e);w.setCalculationInfo(b);var M=null!=g&&function(t){if(t.sourceFormat===s){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!r.isArray(l(e))}}(t)?function(t,e,n,r){return r===g?n:this.defaultDimValueGetter(t,e,n,r)}:null;return w.hasItemOption=!1,w.initData(t,null,M),w}},71469:function(t,e,n){var r=n(35047),i=n(90942),a=n(66023),s=a.extend,o=a.isArray;t.exports=function(t,e,n){e=o(e)&&{coordDimensions:e}||s({},e);var a=t.getSource(),l=new i(r(a,e),t);return l.initData(a,n),l}},85773:function(t,e,n){var r=n(70018).makeInner;t.exports=function(){var t=r();return function(e){var n=t(e),r=e.pipelineContext,i=n.large,a=n.progressiveRender,s=n.large=r.large,o=n.progressiveRender=r.progressiveRender;return!!(i^s||a^o)&&"reset"}}},81518:function(t,e,n){var r=n(47475);r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){})},31750:function(t,e,n){var r=n(89211).retrieveRawValue;e.getDefaultLabel=function(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return r(t,e,n[0]);if(i){for(var a=[],s=0;s<n.length;s++){var o=r(t,e,n[s]);a.push(o)}return a.join(" ")}}},38300:function(t,e,n){var r=n(66023);function i(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}e.retrieveTargetInfo=function(t,e,n){if(t&&r.indexOf(e,t.type)>=0){var i=n.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var s=t.targetNodeId;if(null!=s&&(a=i.getNodeById(s)))return{node:a}}},e.getPathToRoot=i,e.aboveViewRoot=function(t,e){var n=i(t);return r.indexOf(n,e)>=0},e.wrapTreePathInfo=function(t,e){for(var n=[];t;){var r=t.dataIndex;n.push({name:t.name,dataIndex:r,value:e.getRawValue(r)}),t=t.parentNode}return n.reverse(),n}},90005:function(t,e,n){var r=n(71469),i=n(66023),a=n(39116).getDimensionTypeByAxis;e.seriesModelMixin={_baseAxisDim:null,getInitialData:function(t,e){var n,s,o=e.getComponent("xAxis",this.get("xAxisIndex")),l=e.getComponent("yAxis",this.get("yAxisIndex")),h=o.get("type"),u=l.get("type");"category"===h?(t.layout="horizontal",n=o.getOrdinalMeta(),s=!0):"category"===u?(t.layout="vertical",n=l.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var c=["x","y"],d=+("horizontal"!==t.layout),p=this._baseAxisDim=c[d],g=c[1-d],f=[o,l],y=f[d].get("type"),x=f[1-d].get("type"),m=t.data;if(m&&s){var v=[];i.each(m,function(t,e){var n;t.value&&i.isArray(t.value)?(n=t.value.slice(),t.value.unshift(e)):i.isArray(t)?(n=t.slice(),t.unshift(e)):n=t,v.push(n)}),t.data=v}var b=this.defaultValueDimensions;return r(this,{coordDimensions:[{name:p,type:a(y),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:g,type:a(x),dimsDef:b.slice()}],dimensionsCount:b.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}}},26730:function(t,e,n){var r=n(47475);n(26420),n(7594);var i=n(41314),a=n(64342),s=n(45868);n(31372),r.registerVisual(i("line","circle","line")),r.registerLayout(a("line")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,s("line"))},26420:function(t,e,n){n(38603).__DEV__;var r=n(6551);t.exports=n(26626).extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return r(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}})},7594:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(67076),a=n(25718),s=n(82927),o=n(76165),l=n(70018),h=n(68742),u=h.Polyline,c=h.Polygon,d=n(55756),p=n(98763).round,g=n(14889),f=g.prepareDataCoordInfo,y=g.getStackedOnPoint;function x(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(r[0]!==i[0]||r[1]!==i[1])return}return!0}}function m(t){return"number"==typeof t?t:.5*!!t}function v(t){var e=t.getGlobalExtent();if(t.onBand){var n=t.getBandWidth()/2-1,r=e[1]>e[0]?1:-1;e[0]+=r*n,e[1]-=r*n}return e}function b(t,e,n,r){var i,a,s,l,h;return"polar"===t.type?(i=t.getAngleAxis(),(a=t.getRadiusAxis().getExtent().slice())[0]>a[1]&&a.reverse(),s=i.getExtent(),l=Math.PI/180,n&&(a[0]-=.5,a[1]+=.5),h=new o.Sector({shape:{cx:p(t.cx,1),cy:p(t.cy,1),r0:p(a[0],1),r:p(a[1],1),startAngle:-s[0]*l,endAngle:-s[1]*l,clockwise:i.inverse}}),e&&(h.shape.endAngle=-s[0]*l,o.initProps(h,{shape:{endAngle:-s[1]*l}},r)),h):function(t,e,n,r){var i=v(t.getAxis("x")),a=v(t.getAxis("y")),s=t.getBaseAxis().isHorizontal(),l=Math.min(i[0],i[1]),h=Math.min(a[0],a[1]),u=Math.max(i[0],i[1])-l,c=Math.max(a[0],a[1])-h;if(n)l-=.5,u+=.5,h-=.5,c+=.5;else{var d=r.get("lineStyle.width")||2,p=r.get("clipOverflow")?d/2:Math.max(u,c);s?(h-=p,c+=2*p):(l-=p,u+=2*p)}var g=new o.Rect({shape:{x:l,y:h,width:u,height:c}});return e&&(g.shape[s?"width":"height"]=0,o.initProps(g,{shape:{width:u,height:c}},r)),g}(t,e,n,r)}function w(t,e,n){for(var r=e.getBaseAxis(),i=+("x"!==r.dim&&"radius"!==r.dim),a=[],s=0;s<t.length-1;s++){var o=t[s+1],l=t[s];a.push(l);var h=[];switch(n){case"end":h[i]=o[i],h[1-i]=l[1-i],a.push(h);break;case"middle":var u=(l[i]+o[i])/2,c=[];h[i]=c[i]=u,h[1-i]=l[1-i],c[1-i]=o[1-i],a.push(h),a.push(c);break;default:h[i]=l[i],h[1-i]=o[1-i],a.push(h)}}return t[s]&&a.push(t[s]),a}t.exports=d.extend({type:"line",init:function(){var t=new o.Group,e=new i;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,s=this.group,l=t.getData(),h=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=l.mapArray(l.getItemLayout),d="polar"===i.type,p=this._coordSys,g=this._symbolDraw,v=this._polyline,M=this._polygon,_=this._lineGroup,A=t.get("animation"),S=!u.isEmpty(),C=u.get("origin"),I=f(i,l,C),P=function(t,e,n){if(!n.valueDim)return[];for(var r=[],i=0,a=e.count();i<a;i++)r.push(y(n,t,e,i));return r}(i,l,I),T=t.get("showSymbol"),k=T&&!d&&function(t,e,n){var i=t.get("showAllSymbol"),s="auto"===i;if(!i||s){var o=n.getAxesByScale("ordinal")[0];if(o&&!(s&&function(t,e){var n=t.getExtent(),r=Math.abs(n[1]-n[0])/t.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),s=Math.max(1,Math.round(i/5)),o=0;o<i;o+=s)if(1.5*a.getSymbolSize(e,o)[+!!t.isHorizontal()]>r)return!1;return!0}(o,e))){var l=e.mapDimension(o.dim),h={};return r.each(o.getViewLabels(),function(t){h[t.tickValue]=1}),function(t){return!h.hasOwnProperty(e.get(l,t))}}}}(t,l,i),L=this._data;L&&L.eachItemGraphicEl(function(t,e){t.__temp&&(s.remove(t),L.setItemGraphicEl(e,null))}),T||g.remove(),s.add(_);var D=!d&&t.get("step");v&&p.type===i.type&&D===this._step?(S&&!M?M=this._newPolygon(c,P,i,A):M&&!S&&(_.remove(M),M=this._polygon=null),_.setClipPath(b(i,!1,!1,t)),T&&g.updateData(l,{isIgnore:k,clipShape:b(i,!1,!0,t)}),l.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),x(this._stackedOnPoints,P)&&x(this._points,c)||(A?this._updateAnimation(l,P,i,n,D,C):(D&&(c=w(c,i,D),P=w(P,i,D)),v.setShape({points:c}),M&&M.setShape({points:c,stackedOnPoints:P})))):(T&&g.updateData(l,{isIgnore:k,clipShape:b(i,!1,!0,t)}),D&&(c=w(c,i,D),P=w(P,i,D)),v=this._newPolyline(c,i,A),S&&(M=this._newPolygon(c,P,i,A)),_.setClipPath(b(i,!0,!1,t)));var R=function(t,e){var n,i,a=t.getVisual("visualMeta");if(a&&a.length&&t.count()&&"cartesian2d"===e.type){for(var s=a.length-1;s>=0;s--){var l=a[s].dimension,h=t.dimensions[l],u=t.getDimensionInfo(h);if("x"===(n=u&&u.coordDim)||"y"===n){i=a[s];break}}if(i){var c=e.getAxis(n),d=r.map(i.stops,function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}}),p=d.length,g=i.outerColors.slice();p&&d[0].coord>d[p-1].coord&&(d.reverse(),g.reverse());var f=d[0].coord-10,y=d[p-1].coord+10,x=y-f;if(x<.001)return"transparent";r.each(d,function(t){t.offset=(t.coord-f)/x}),d.push({offset:p?d[p-1].offset:.5,color:g[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:g[0]||"transparent"});var m=new o.LinearGradient(0,0,0,0,d,!0);return m[n]=f,m[n+"2"]=y,m}}}(l,i)||l.getVisual("color");v.useStyle(r.defaults(h.getLineStyle(),{fill:"none",stroke:R,lineJoin:"bevel"}));var N=t.get("smooth");if(N=m(t.get("smooth")),v.setShape({smooth:N,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),M){var O=l.getCalculationInfo("stackedOnSeries"),j=0;M.useStyle(r.defaults(u.getAreaStyle(),{fill:R,opacity:.7,lineJoin:"bevel"})),O&&(j=m(O.get("smooth"))),M.setShape({smooth:N,stackedOnSmooth:j,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=l,this._coordSys=i,this._stackedOnPoints=P,this._points=c,this._step=D,this._valueOrigin=C},dispose:function(){},highlight:function(t,e,n,r){var i=t.getData(),s=l.queryDataIndex(i,r);if(s instanceof Array||null==s||!(s>=0))d.prototype.highlight.call(this,t,e,n,r);else{var o=i.getItemGraphicEl(s);if(!o){var h=i.getItemLayout(s);if(!h)return;(o=new a(i,s)).position=h,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(h[0])||isNaN(h[1]),o.__temp=!0,i.setItemGraphicEl(s,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}},downplay:function(t,e,n,r){var i=t.getData(),a=l.queryDataIndex(i,r);if(null!=a&&a>=0){var s=i.getItemGraphicEl(a);s&&(s.__temp?(i.setItemGraphicEl(a,null),this.group.remove(s)):s.downplay())}else d.prototype.downplay.call(this,t,e,n,r)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new u({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new c({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,r,i,a){var l=this._polyline,h=this._polygon,u=t.hostModel,c=s(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),d=c.current,p=c.stackedOnCurrent,g=c.next,f=c.stackedOnNext;i&&(d=w(c.current,n,i),p=w(c.stackedOnCurrent,n,i),g=w(c.next,n,i),f=w(c.stackedOnNext,n,i)),l.shape.__points=c.current,l.shape.points=d,o.updateProps(l,{shape:{points:g}},u),h&&(h.setShape({points:d,stackedOnPoints:p}),o.updateProps(h,{shape:{points:g,stackedOnPoints:f}},u));for(var y=[],x=c.status,m=0;m<x.length;m++)if("="===x[m].cmd){var v=t.getItemGraphicEl(x[m].idx1);v&&y.push({el:v,ptIdx:m})}l.animators&&l.animators.length&&l.animators[0].during(function(){for(var t=0;t<y.length;t++)y[t].el.attr("position",l.shape.__points[y[t].ptIdx])})},remove:function(t){var e=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,r){t.__temp&&(e.remove(t),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}})},14889:function(t,e,n){var r=n(74733).isDimensionStacked,i=n(66023).map;e.prepareDataCoordInfo=function(t,e,n){var a,s,o,l,h,u=t.getBaseAxis(),c=t.getOtherAxis(u),d=(a=c,s=n,o=0,l=a.scale.getExtent(),"start"===s?o=l[0]:"end"===s?o=l[1]:l[0]>0?o=l[0]:l[1]<0&&(o=l[1]),o),p=u.dim,g=c.dim,f=e.mapDimension(g),y=e.mapDimension(p),x=+("x"===g||"radius"===g),m=i(t.dimensions,function(t){return e.mapDimension(t)}),v=e.getCalculationInfo("stackResultDimension");return(h|=r(e,m[0]))&&(m[0]=v),(h|=r(e,m[1]))&&(m[1]=v),{dataDimsForPoint:m,valueStart:d,valueAxisDim:g,baseAxisDim:p,stacked:!!h,valueDim:f,baseDim:y,baseDataOffset:x,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}},e.getStackedOnPoint=function(t,e,n,r){var i=NaN;t.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,s=[];return s[a]=n.get(t.baseDim,r),s[1-a]=i,e.dataToPoint(s)}},82927:function(t,e,n){var r=n(14889),i=r.prepareDataCoordInfo,a=r.getStackedOnPoint;t.exports=function(t,e,n,r,s,o,l,h){for(var u,c=(u=[],e.diff(t).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),d=[],p=[],g=[],f=[],y=[],x=[],m=[],v=i(s,e,l),b=i(o,t,h),w=0;w<c.length;w++){var M=c[w],_=!0;switch(M.cmd){case"=":var A=t.getItemLayout(M.idx),S=e.getItemLayout(M.idx1);(isNaN(A[0])||isNaN(A[1]))&&(A=S.slice()),d.push(A),p.push(S),g.push(n[M.idx]),f.push(r[M.idx1]),m.push(e.getRawIndex(M.idx1));break;case"+":var C=M.idx;d.push(s.dataToPoint([e.get(v.dataDimsForPoint[0],C),e.get(v.dataDimsForPoint[1],C)])),p.push(e.getItemLayout(C).slice()),g.push(a(v,s,e,C)),f.push(r[C]),m.push(e.getRawIndex(C));break;case"-":var C=M.idx,I=t.getRawIndex(C);I!==C?(d.push(t.getItemLayout(C)),p.push(o.dataToPoint([t.get(b.dataDimsForPoint[0],C),t.get(b.dataDimsForPoint[1],C)])),g.push(n[C]),f.push(a(b,o,t,C)),m.push(I)):_=!1}_&&(y.push(M),x.push(x.length))}x.sort(function(t,e){return m[t]-m[e]});for(var P=[],T=[],k=[],L=[],D=[],w=0;w<x.length;w++){var C=x[w];P[w]=d[C],T[w]=p[C],k[w]=g[C],L[w]=f[C],D[w]=y[C]}return{current:P,next:T,stackedOnCurrent:k,stackedOnNext:L,status:D}}},68742:function(t,e,n){var r=n(87205),i=n(3265),a=n(13065),s=i.min,o=i.max,l=i.scaleAndAdd,h=i.copy,u=[],c=[],d=[];function p(t){return isNaN(t[0])||isNaN(t[1])}function g(t,e,n,r,i,a,s,o,l,h,u){return"none"!==h&&h?f.apply(this,arguments):y.apply(this,arguments)}function f(t,e,n,r,i,a,s,o,l,u,g){for(var f=0,y=n,x=0;x<r;x++){var m=e[y];if(y>=i||y<0)break;if(p(m)){if(g){y+=a;continue}break}if(y===n)t[a>0?"moveTo":"lineTo"](m[0],m[1]);else if(l>0){var v=e[f],b=+("y"===u),w=(m[b]-v[b])*l;h(c,v),c[b]=v[b]+w,h(d,m),d[b]=m[b]-w,t.bezierCurveTo(c[0],c[1],d[0],d[1],m[0],m[1])}else t.lineTo(m[0],m[1]);f=y,y+=a}return x}function y(t,e,n,r,a,g,f,y,x,m,v){for(var b=0,w=n,M=0;M<r;M++){var _=e[w];if(w>=a||w<0)break;if(p(_)){if(v){w+=g;continue}break}if(w===n)t[g>0?"moveTo":"lineTo"](_[0],_[1]),h(c,_);else if(x>0){var A=w+g,S=e[A];if(v)for(;S&&p(e[A]);)A+=g,S=e[A];var C=.5,I=e[b],S=e[A];if(!S||p(S))h(d,_);else{if(p(S)&&!v&&(S=_),i.sub(u,S,I),"x"===m||"y"===m){var P,T,k=+("x"!==m);P=Math.abs(_[k]-I[k]),T=Math.abs(_[k]-S[k])}else P=i.dist(_,I),T=i.dist(_,S);l(d,_,u,-x*(1-(C=T/(T+P))))}s(c,c,y),o(c,c,f),s(d,d,y),o(d,d,f),t.bezierCurveTo(c[0],c[1],d[0],d[1],_[0],_[1]),l(c,_,u,x*C)}else t.lineTo(_[0],_[1]);b=w,w+=g}return M}function x(t,e){var n=[1/0,1/0],r=[-1/0,-1/0];if(e)for(var i=0;i<t.length;i++){var a=t[i];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])}return{min:e?n:r,max:e?r:n}}var m=r.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:a(r.prototype.brush),buildPath:function(t,e){var n=e.points,r=0,i=n.length,a=x(n,e.smoothConstraint);if(e.connectNulls){for(;i>0&&p(n[i-1]);i--);for(;r<i&&p(n[r]);r++);}for(;r<i;)r+=g(t,n,r,i,i,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),v=r.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:a(r.prototype.brush),buildPath:function(t,e){var n=e.points,r=e.stackedOnPoints,i=0,a=n.length,s=e.smoothMonotone,o=x(n,e.smoothConstraint),l=x(r,e.smoothConstraint);if(e.connectNulls){for(;a>0&&p(n[a-1]);a--);for(;i<a&&p(n[i]);i++);}for(;i<a;){var h=g(t,n,i,a,a,1,o.min,o.max,e.smooth,s,e.connectNulls);g(t,r,i+h-1,h,a,-1,l.min,l.max,e.stackedOnSmooth,s,e.connectNulls),i+=h+1,t.closePath()}}});e.Polyline=m,e.Polygon=v},57667:function(t,e,n){var r=n(47475);n(93422),n(1792);var i=n(29329),a=n(76801);r.registerLayout(i),r.registerVisual(a)},93422:function(t,e,n){n(38603).__DEV__;var r=n(26626),i=n(90942),a=n(66023),s=a.concatArray,o=a.mergeAll,l=a.map,h=n(20438).encodeHTML;n(33776);var u="undefined"==typeof Uint32Array?Array:Uint32Array,c="undefined"==typeof Float64Array?Array:Float64Array;function d(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=l(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}var p=r.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],d(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),p.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],d(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}p.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=s(this._flatCoords,e.flatCoords),this._flatCoordsOffset=s(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],r=this._flatCoordsOffset[2*t+1],i=0;i<r;i++)e[i]=e[i]||[],e[i][0]=this._flatCoords[n+2*i],e[i][1]=this._flatCoords[n+2*i+1];return r}for(var a=this._getCoordsFromItemModel(t),i=0;i<a.length;i++)e[i]=e[i]||[],e[i][0]=a[i][0],e[i][1]=a[i][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"==typeof t[0]){for(var n=t.length,r=new u(n),i=new c(n),a=0,s=0,o=0,l=0;l<n;){o++;var h=t[l++];r[s++]=a+e,r[s++]=h;for(var d=0;d<h;d++){var p=t[l++],g=t[l++];i[a++]=p,i[a++]=g}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,s),flatCoords:i,count:o}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){var n=new i(["value"],this);return n.hasItemOption=!1,n.initData(t.data,[],function(t,e,r,i){if(t instanceof Array)return NaN;n.hasItemOption=!0;var a=t.value;if(null!=a)return a instanceof Array?a[i]:a}),n},formatTooltip:function(t){var e=this.getData().getItemModel(t),n=e.get("name");if(n)return n;var r=e.get("fromName"),i=e.get("toName"),a=[];return null!=r&&a.push(r),null!=i&&a.push(i),h(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});t.exports=p},1792:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(93275),a=n(36397),s=n(7574),o=n(14385),l=n(94479),h=n(87300),u=n(29329);t.exports=r.extendChartView({type:"lines",init:function(){},render:function(t,e,n){var r=t.getData(),i=this._updateLineDraw(r,t),a=t.get("zlevel"),s=t.get("effect.trailLength"),o=n.getZr(),l="svg"===o.painter.getType();l||o.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||o.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&s&&!l&&o.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)}),i.updateData(r),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,n){var r=t.getData();this._updateLineDraw(r,t).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var r=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var a=u.reset(t);a.progress&&a.progress({start:0,end:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,r=this._showEffect(e),u=!!e.get("polyline"),c=e.pipelineContext.large;return n&&r===this._hasEffet&&u===this._isPolyline&&c===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=c?new h:new i(u?r?l:o:r?a:s),this._hasEffet=r,this._isPolyline=u,this._isLargeDraw=c,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"!==e.painter.getType()&&null!=this._lastZlevel&&e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}})},29329:function(t,e,n){t.exports={seriesType:"lines",plan:n(85773)(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),r=t.pipelineContext.large;return{progress:function(i,a){var s=[];if(r){var o,l=i.end-i.start;if(n){for(var h=0,u=i.start;u<i.end;u++)h+=t.getLineCoordsCount(u);o=new Float32Array(l+2*h)}else o=new Float32Array(4*l);for(var c=0,d=[],u=i.start;u<i.end;u++){var p=t.getLineCoords(u,s);n&&(o[c++]=p);for(var g=0;g<p;g++)d=e.dataToPoint(s[g],!1,d),o[c++]=d[0],o[c++]=d[1]}a.setLayout("linesPoints",o)}else for(var u=i.start;u<i.end;u++){var f=a.getItemModel(u),p=t.getLineCoords(u,s),y=[];if(n)for(var x=0;x<p;x++)y.push(e.dataToPoint(s[x]));else{y[0]=e.dataToPoint(s[0]),y[1]=e.dataToPoint(s[1]);var m=f.get("lineStyle.curveness");+m&&(y[2]=[(y[0][0]+y[1][0])/2-(y[0][1]-y[1][1])*m,(y[0][1]+y[1][1])/2-(y[1][0]-y[0][0])*m])}a.setItemLayout(u,y)}}}}}},76801:function(t){function e(t){return t instanceof Array||(t=[t,t]),t}var n="lineStyle.opacity".split(".");t.exports={seriesType:"lines",reset:function(t,r,i){var a=e(t.get("symbol")),s=e(t.get("symbolSize")),o=t.getData();return o.setVisual("fromSymbol",a&&a[0]),o.setVisual("toSymbol",a&&a[1]),o.setVisual("fromSymbolSize",s&&s[0]),o.setVisual("toSymbolSize",s&&s[1]),o.setVisual("opacity",t.get(n)),{dataEach:o.hasItemOption?function(t,r){var i=t.getItemModel(r),a=e(i.getShallow("symbol",!0)),s=e(i.getShallow("symbolSize",!0)),o=i.get(n);a[0]&&t.setItemVisual(r,"fromSymbol",a[0]),a[1]&&t.setItemVisual(r,"toSymbol",a[1]),s[0]&&t.setItemVisual(r,"fromSymbolSize",s[0]),s[1]&&t.setItemVisual(r,"toSymbolSize",s[1]),t.setItemVisual(r,"opacity",o)}:null}}}},74719:function(t,e,n){var r=n(47475);n(23296),n(49024),n(74911),n(85605);var i=n(28037),a=n(76807),s=n(94388),o=n(11903),l=n(90353);r.registerLayout(i),r.registerVisual(a),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,s),r.registerPreprocessor(o),l("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}])},23296:function(t,e,n){var r=n(66023),i=n(71469),a=n(26626),s=n(20438),o=s.encodeHTML,l=s.addCommas,h=n(33601),u=n(89211).retrieveRawAttr,c=n(70351),d=a.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=i(this,["value"]),n=e.mapDimension("value"),a=r.createHashMap(),s=[],o=[],l=0,h=e.count();l<h;l++){var d=e.getName(l);a.set(d,!0),s.push({name:d,value:e.get(n,l),selected:u(e,l,"selected")})}var p=c.load(this.getMapType(),this.option.nameMap);return r.each(p.regions,function(t){var e=t.name;a.get(e)||(s.push({name:e}),o.push(e))}),this.updateSelectedMap(s),e.appendValues([],o),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),n=l(this.getRawValue(t)),r=e.getName(t),i=this.seriesGroup,a=[],s=0;s<i.length;s++){var h=i[s].originalData.indexOfName(r),u=e.mapDimension("value");isNaN(i[s].originalData.get(u,h))||a.push(o(i[s].name))}return a.join(", ")+"<br />"+o(r+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,r=n.getRegion(e);return r&&n.dataToPoint(r.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});r.mixin(d,h),t.exports=d},49024:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165),s=n(88142),o="__seriesMapHighDown",l="__seriesMapCallKey";function h(t){var e=this[o];e&&e.recordVersion===this[l]&&u(e,t)}function u(t,e){var n=t.circle,r=t.labelModel,i=t.hoverLabelModel,s=t.emphasisText,o=t.normalText;e?(n.style.extendFrom(a.setTextStyle({},i,{text:i.get("show")?s:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=a.Z2_EMPHASIS_LIFT):(a.setTextStyle(n.style,r,{text:r.get("show")?o:null,textPosition:r.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}t.exports=r.extendChartView({type:"map",render:function(t,e,n,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var i=this.group;if(i.removeAll(),!t.getHostGeoModel()){if(r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===t.id){var a=this._mapDraw;a&&i.add(a.group)}else if(t.needsDrawMap){var a=this._mapDraw||new s(n,!0);i.add(a.group),a.draw(t,e,n,this,r),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,n){var r=t.originalData,s=this.group;r.each(r.mapDimension("value"),function(e,n){if(!isNaN(e)){var c=r.getItemLayout(n);if(c&&c.point){var d=c.point,p=c.offset,g=new a.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:d[0]+9*p,cy:d[1],r:3},silent:!0,z2:8+(p?0:a.Z2_EMPHASIS_LIFT+1)});if(!p){var f=t.mainSeries.getData(),y=r.getName(n),x=f.indexOfName(y),m=r.getItemModel(n),v=m.getModel("label"),b=m.getModel("emphasis.label"),w=f.getItemGraphicEl(x),M=i.retrieve2(t.getFormattedLabel(x,"normal"),y),_=i.retrieve2(t.getFormattedLabel(x,"emphasis"),M),A=w[o],S=Math.random();if(!A){A=w[o]={};var C=i.curry(h,!0),I=i.curry(h,!1);w.on("mouseover",C).on("mouseout",I).on("emphasis",C).on("normal",I)}w[l]=S,i.extend(A,{recordVersion:S,circle:g,labelModel:v,hoverLabelModel:b,emphasisText:_,normalText:M}),u(A,!1)}s.add(g)}}})}})},11903:function(t,e,n){var r=n(66023);t.exports=function(t){var e=[];r.each(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,r.defaults(t,t.mapLocation))})}},94388:function(t,e,n){var r=n(66023);t.exports=function(t){var e={};t.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),r=n?"o"+n.id:"i"+t.getMapType();(e[r]=e[r]||[]).push(t)}),r.each(e,function(t,e){for(var n,i,a,s=(n=r.map(t,function(t){return t.getData()}),i=t[0].get("mapValueCalculation"),a={},r.each(n,function(t){t.each(t.mapDimension("value"),function(e,n){var r="ec-"+t.getName(n);a[r]=a[r]||[],isNaN(e)||a[r].push(e)})}),n[0].map(n[0].mapDimension("value"),function(t,e){for(var r,s="ec-"+n[0].getName(e),o=0,l=1/0,h=-1/0,u=a[s].length,c=0;c<u;c++)l=Math.min(l,a[s][c]),h=Math.max(h,a[s][c]),o+=a[s][c];return r="min"===i?l:"max"===i?h:"average"===i?o/u:o,0===u?NaN:r})),o=0;o<t.length;o++)t[o].originalData=t[o].getData();for(var o=0;o<t.length;o++)t[o].seriesGroup=t,t[o].needsDrawMap=0===o&&!t[o].getHostGeoModel(),t[o].setData(s.cloneShallow()),t[o].mainSeries=t[0]})}},28037:function(t,e,n){var r=n(66023);t.exports=function(t){var e={};t.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!e[i]){var a={};r.each(n.seriesGroup,function(e){var n=e.coordinateSystem,r=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&r.each(r.mapDimension("value"),function(t,e){var i=r.getName(e),s=n.getRegion(i);if(!(!s||isNaN(t))){var o=a[i]||0,l=n.dataToPoint(s.center);a[i]=o+1,r.setItemLayout(e,{point:l,offset:o})}})});var s=n.getData();s.each(function(t){var e=s.getName(t),n=s.getItemLayout(t)||{};n.showLabel=!a[e],s.setItemLayout(t,n)}),e[i]=!0}})}},76807:function(t){t.exports=function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),r=n.get("areaColor"),i=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:r,color:i})})}},4193:function(t,e,n){var r=n(47475);n(41891),n(11779),n(65134);var i=n(32106);r.registerVisual(i)},11779:function(t,e,n){var r=n(66023),i=r.each,a=r.createHashMap,s=n(26626),o=n(6551);t.exports=s.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var n=this.getSource();return function(t,e){if(!t.encodeDefine){var n=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(n){var r=t.encodeDefine=a();i(n.dimensions,function(t){var e=+t.replace("dim","");r.set(t,e)})}}}(n,this),o(n,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,n=this.getData(),r=[];return e.eachActiveState(n,function(e,i){t===e&&r.push(n.getRawIndex(i))}),r},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}})},65134:function(t,e,n){var r=n(76165);function i(t,e,n,r){for(var i=[],a=0;a<n.length;a++){var s,o=n[a],l=t.get(t.mapDimension(o),e);s=l,("category"===r.getAxis(o).type?null==s:null==s||isNaN(s))||i.push(r.dataToPoint(l,o))}return i}function a(t,e,n,a,s){var o=i(t,n,a,s),l=new r.Polyline({shape:{points:o},silent:!0,z2:10});return e.add(l),t.setItemGraphicEl(n,l),l}function s(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function o(t,e,n,r){var i=r.lineStyle;e.hasItemOption&&(i=e.getItemModel(n).getModel("lineStyle").getLineStyle()),t.useStyle(i);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(n,"color"),a.opacity=e.getItemVisual(n,"opacity"),r.smooth&&(t.shape.smooth=r.smooth)}t.exports=n(55756).extend({type:"parallel",init:function(){this._dataGroup=new r.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,n,l){var h=this._dataGroup,u=t.getData(),c=this._data,d=t.coordinateSystem,p=d.dimensions,g=s(t);if(u.diff(c).add(function(t){o(a(u,h,t,p,d),u,t,g)}).update(function(e,n){var a=c.getItemGraphicEl(n),s=i(u,e,p,d);u.setItemGraphicEl(e,a);var h=l&&!1===l.animation?null:t;r.updateProps(a,{shape:{points:s}},h,e),o(a,u,e,g)}).remove(function(t){var e=c.getItemGraphicEl(t);h.remove(e)}).execute(),!this._initialized){this._initialized=!0;var f,y,x,m,v,b,w,M=(f=d,y=t,x=function(){setTimeout(function(){h.removeClipPath()})},m=f.model,v=f.getRect(),b=new r.Rect({shape:{x:v.x,y:v.y,width:v.width,height:v.height}}),w="horizontal"===m.get("layout")?"width":"height",b.setShape(w,0),r.initProps(b,{shape:{width:v.width,height:v.height}},y,x),b);h.setClipPath(M)}this._data=u},incrementalPrepareRender:function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,n){for(var r=e.getData(),i=e.coordinateSystem,l=i.dimensions,h=s(e),u=t.start;u<t.end;u++){var c=a(r,this._dataGroup,u,l,i);c.incremental=!0,o(c,r,u,h)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}})},32106:function(t){var e=["lineStyle","normal","opacity"];t.exports={seriesType:"parallel",reset:function(t,n,r){var i=t.getModel("itemStyle"),a=t.getModel("lineStyle"),s=n.get("color"),o=a.get("color")||i.get("color")||s[t.seriesIndex%s.length],l=t.get("inactiveOpacity"),h=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),c=t.coordinateSystem,d=t.getData(),p={normal:u.opacity,active:h,inactive:l};return d.setVisual("color",o),{progress:function(t,n){c.eachActiveState(n,function(t,r){var i=p[t];if("normal"===t&&n.hasItemOption){var a=n.getItemModel(r).get(e,!0);null!=a&&(i=a)}n.setItemVisual(r,"opacity",i)},t.start,t.end)}}}}},21223:function(t,e,n){var r=n(47475),i=n(66023);n(34087),n(14624),n(54687);var a=n(42862).layout,s=n(41314);n(31372),r.registerLayout(i.curry(a,"pictorialBar")),r.registerVisual(s("pictorialBar","roundRect"))},92004:function(t,e,n){var r=n(47475),i=n(66023);n(8515),n(92737);var a=n(90353),s=n(34907),o=n(45202),l=n(6817);a("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),r.registerVisual(s("pie")),r.registerLayout(i.curry(o,"pie")),r.registerProcessor(l("pie"))},8515:function(t,e,n){var r=n(47475),i=n(71469),a=n(66023),s=n(70018),o=n(98763).getPercentWithPrecision,l=n(33601),h=n(89211).retrieveRawAttr,u=r.extendSeriesModel({type:"series.pie",init:function(t){u.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return i(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],r=0,i=t.count();r<i;r++)n.push({name:t.getName(r),value:t.get(e,r),selected:h(t,r,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=u.superCall(this,"getDataParams",t),r=[];return e.each(e.mapDimension("value"),function(t){r.push(t)}),n.percent=o(r,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){s.defaultEmphasis(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});a.mixin(u,l),t.exports=u},92737:function(t,e,n){var r=n(66023),i=n(76165),a=n(55756);function s(t,e,n,r){var i=e.getData(),a=this.dataIndex,s=i.getName(a),l=e.get("selectedOffset");r.dispatchAction({type:"pieToggleSelect",from:t,name:s,seriesId:e.id}),i.each(function(t){o(i.getItemGraphicEl(t),i.getItemLayout(t),e.isSelected(i.getName(t)),l,n)})}function o(t,e,n,r,i){var a=(e.startAngle+e.endAngle)/2,s=n?r:0,o=[Math.cos(a)*s,Math.sin(a)*s];i?t.animate().when(200,{position:o}).start("bounceOut"):t.attr("position",o)}function l(t,e){i.Group.call(this);var n=new i.Sector({z2:2}),r=new i.Polyline,a=new i.Text;function s(){r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore}function o(){r.ignore=r.normalIgnore,a.ignore=a.normalIgnore}this.add(n),this.add(r),this.add(a),this.updateData(t,e,!0),this.on("emphasis",s).on("normal",o).on("mouseover",s).on("mouseout",o)}var h=l.prototype;h.updateData=function(t,e,n){var a=this.childAt(0),s=t.hostModel,l=t.getItemModel(e),h=t.getItemLayout(e),u=r.extend({},h);u.label=null,n?(a.setShape(u),"scale"===s.getShallow("animationType")?(a.shape.r=h.r0,i.initProps(a,{shape:{r:h.r}},s,e)):(a.shape.endAngle=h.startAngle,i.updateProps(a,{shape:{endAngle:h.endAngle}},s,e))):i.updateProps(a,{shape:u},s,e);var c=t.getItemVisual(e,"color");a.useStyle(r.defaults({lineJoin:"bevel",fill:c},l.getModel("itemStyle").getItemStyle())),a.hoverStyle=l.getModel("emphasis.itemStyle").getItemStyle();var d=l.getShallow("cursor");function p(){a.stopAnimation(!0),a.animateTo({shape:{r:h.r+s.get("hoverOffset")}},300,"elasticOut")}function g(){a.stopAnimation(!0),a.animateTo({shape:{r:h.r}},300,"elasticOut")}d&&a.attr("cursor",d),o(this,t.getItemLayout(e),s.isSelected(null,e),s.get("selectedOffset"),s.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),l.get("hoverAnimation")&&s.isAnimationEnabled()&&a.on("mouseover",p).on("mouseout",g).on("emphasis",p).on("normal",g),this._updateLabel(t,e),i.setHoverStyle(this)},h._updateLabel=function(t,e){var n=this.childAt(1),r=this.childAt(2),a=t.hostModel,s=t.getItemModel(e),o=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");i.updateProps(n,{shape:{points:o.linePoints||[[o.x,o.y],[o.x,o.y],[o.x,o.y]]}},a,e),i.updateProps(r,{style:{x:o.x,y:o.y}},a,e),r.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var h=s.getModel("label"),u=s.getModel("emphasis.label"),c=s.getModel("labelLine"),d=s.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");i.setLabelStyle(r.style,r.hoverStyle={},h,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!d.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=d.getModel("lineStyle").getLineStyle();var p=c.get("smooth");p&&!0===p&&(p=.4),n.setShape({smooth:p})},r.inherits(l,i.Group),t.exports=a.extend({type:"pie",init:function(){var t=new i.Group;this._sectorGroup=t},render:function(t,e,n,i){if(!i||i.from!==this.uid){var a=t.getData(),o=this._data,h=this.group,u=e.get("animation"),c=!o,d=t.get("animationType"),p=r.curry(s,this.uid,t,u,n),g=t.get("selectedMode");if(a.diff(o).add(function(t){var e=new l(a,t);c&&"scale"!==d&&e.eachChild(function(t){t.stopAnimation(!0)}),g&&e.on("click",p),a.setItemGraphicEl(t,e),h.add(e)}).update(function(t,e){var n=o.getItemGraphicEl(e);n.updateData(a,t),n.off("click"),g&&n.on("click",p),h.add(n),a.setItemGraphicEl(t,n)}).remove(function(t){var e=o.getItemGraphicEl(t);h.remove(e)}).execute(),u&&c&&a.count()>0&&"scale"!==d){var f=a.getItemLayout(0),y=Math.max(n.getWidth(),n.getHeight())/2,x=r.bind(h.removeClipPath,h);h.setClipPath(this._createClipPath(f.cx,f.cy,y,f.startAngle,f.clockwise,x,t))}else h.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(t,e,n,r,a,s,o){var l=new i.Sector({shape:{cx:t,cy:e,r0:0,r:n,startAngle:r,endAngle:r,clockwise:a}});return i.initProps(l,{shape:{endAngle:r+(a?1:-1)*Math.PI*2}},o,s),l},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var r=t[0]-n.cx,i=t[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}}})},22621:function(t,e,n){var r=n(99280);function i(t,e,n,r,i,a,s){function o(e,n){for(var r=e;r>=0&&(t[r].y-=n,!(r>0)||!(t[r].y>t[r-1].y+t[r-1].height));r--);}function l(t,e,n,r,i,a){for(var s=e?Number.MAX_VALUE:0,o=0,l=t.length;o<l;o++){var h=Math.abs(t[o].y-r),u=t[o].len,c=t[o].len2,d=h<i+u?Math.sqrt((i+u+c)*(i+u+c)-h*h):Math.abs(t[o].x-n);e&&d>=s&&(d=s-10),!e&&d<=s&&(d=s+10),t[o].x=n+d*a,s=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],p=[],g=0;g<c;g++)(h=t[g].y-u)<0&&function(e,n,r,i){for(var a=e;a<n;a++)if(t[a].y+=r,a>e&&a+1<n&&t[a+1].y>t[a].y+t[a].height)return void o(a,r/2);o(n-1,r/2)}(g,c,-h,0),u=t[g].y+t[g].height;s-u<0&&o(c-1,u-s);for(var g=0;g<c;g++)t[g].y>=n?p.push(t[g]):d.push(t[g]);l(d,!1,e,n,r,i),l(p,!0,e,n,r,i)}function a(t){return"center"===t.position}t.exports=function(t,e,n,s){var o,l,h=t.getData(),u=[],c=!1;h.each(function(n){var i,a,s,d,p=h.getItemLayout(n),g=h.getItemModel(n),f=g.getModel("label"),y=f.get("position")||g.get("emphasis.label.position"),x=g.getModel("labelLine"),m=x.get("length"),v=x.get("length2"),b=(p.startAngle+p.endAngle)/2,w=Math.cos(b),M=Math.sin(b);o=p.cx,l=p.cy;var _="inside"===y||"inner"===y;if("center"===y)i=p.cx,a=p.cy,d="center";else{var A=(_?(p.r+p.r0)/2*w:p.r*w)+o,S=(_?(p.r+p.r0)/2*M:p.r*M)+l;if(i=A+3*w,a=S+3*M,!_){var C=A+w*(m+e-p.r),I=S+M*(m+e-p.r),P=C+(w<0?-1:1)*v;i=P+(w<0?-5:5),a=I,s=[[A,S],[C,I],[P,I]]}d=_?"center":w>0?"left":"right"}var T=f.getFont(),k=f.get("rotate")?w<0?-b+Math.PI:-b:0,L=t.getFormattedLabel(n,"normal")||h.getName(n),D=r.getBoundingRect(L,T,d,"top");c=!!k,p.label={x:i,y:a,position:y,height:D.height,len:m,len2:v,linePoints:s,textAlign:d,verticalAlign:"middle",rotation:k,inside:_},_||u.push(p.label)}),!c&&t.get("avoidLabelOverlap")&&function(t,e,n,r,s,o){for(var l=[],h=[],u=0;u<t.length;u++)a(t[u])||(t[u].x<e?l.push(t[u]):h.push(t[u]));i(h,e,n,r,1,s,o),i(l,e,n,r,-1,s,o);for(var u=0;u<t.length;u++)if(!a(t[u])){var c=t[u].linePoints;if(c){var d=c[1][0]-c[2][0];t[u].x<e?c[2][0]=t[u].x+3:c[2][0]=t[u].x-3,c[1][1]=c[2][1]=t[u].y,c[1][0]=c[2][0]+d}}}(u,o,l,e,n,s)}},45202:function(t,e,n){var r=n(98763),i=r.parsePercent,a=r.linearMap,s=n(22621),o=n(66023),l=2*Math.PI,h=Math.PI/180;t.exports=function(t,e,n,r){e.eachSeriesByType(t,function(t){var e=t.getData(),r=e.mapDimension("value"),u=t.get("center"),c=t.get("radius");o.isArray(c)||(c=[0,c]),o.isArray(u)||(u=[u,u]);var d=n.getWidth(),p=n.getHeight(),g=Math.min(d,p),f=i(u[0],d),y=i(u[1],p),x=i(c[0],g/2),m=i(c[1],g/2),v=-t.get("startAngle")*h,b=t.get("minAngle")*h,w=0;e.each(r,function(t){!isNaN(t)&&w++});var M=e.getSum(r),_=Math.PI/(M||w)*2,A=t.get("clockwise"),S=t.get("roseType"),C=t.get("stillShowZeroSum"),I=e.getDataExtent(r);I[0]=0;var P=l,T=0,k=v,L=A?1:-1;if(e.each(r,function(t,n){if(isNaN(t))return void e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:f,cy:y,r0:x,r:S?NaN:m});(r="area"!==S?0===M&&C?_:t*_:l/w)<b?(r=b,P-=b):T+=t;var r,i=k+L*r;e.setItemLayout(n,{angle:r,startAngle:k,endAngle:i,clockwise:A,cx:f,cy:y,r0:x,r:S?a(t,I,[x,m]):m}),k=i}),P<l&&w)if(P<=.001){var D=l/w;e.each(r,function(t,n){if(!isNaN(t)){var r=e.getItemLayout(n);r.angle=D,r.startAngle=v+L*n*D,r.endAngle=v+L*(n+1)*D}})}else _=P/T,k=v,e.each(r,function(t,n){if(!isNaN(t)){var r=e.getItemLayout(n),i=r.angle===b?b:t*_;r.startAngle=k,r.endAngle=k+L*i,k+=L*i}});s(t,m,d,p)})}},13790:function(t,e,n){var r=n(47475);n(27154),n(87681),n(59524);var i=n(34907),a=n(41314),s=n(29056),o=n(6817),l=n(93535);r.registerVisual(i("radar")),r.registerVisual(a("radar","circle")),r.registerLayout(s),r.registerProcessor(o("radar")),r.registerPreprocessor(l)},87681:function(t,e,n){var r=n(26626),i=n(71469),a=n(66023),s=n(20438).encodeHTML,o=r.extend({type:"series.radar",dependencies:["radar"],init:function(t){o.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){return i(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(t){var e=this.getData(),n=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(t);return s(""===r?this.name:r)+"<br/>"+a.map(n,function(n,r){var i=e.get(e.mapDimension(n.dim),t);return s(n.name+" : "+i)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});t.exports=o},59524:function(t,e,n){var r=n(47475),i=n(76165),a=n(66023),s=n(87557);t.exports=r.extendChartView({type:"radar",render:function(t,e,n){var r=t.coordinateSystem,o=this.group,l=t.getData(),h=this._data;function u(e,n,r,o,l,h){r.removeAll();for(var u=0;u<n.length-1;u++){var c=function(t,e){var n=t.getItemVisual(e,"symbol")||"circle",r=t.getItemVisual(e,"color");if("none"!==n){var i,o=(i=t.getItemVisual(e,"symbolSize"),a.isArray(i)||(i=[+i,+i]),i),l=s.createSymbol(n,-1,-1,2,2,r);return l.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),l}}(o,l);c&&(c.__dimIdx=u,e[u]?(c.attr("position",e[u]),i[h?"initProps":"updateProps"](c,{position:n[u]},t,l)):c.attr("position",n[u]),r.add(c))}}function c(t){return a.map(t,function(t){return[r.cx,r.cy]})}l.diff(h).add(function(e){var n=l.getItemLayout(e);if(n){var r=new i.Polygon,a=new i.Polyline,s={shape:{points:n}};r.shape.points=c(n),a.shape.points=c(n),i.initProps(r,s,t,e),i.initProps(a,s,t,e);var o=new i.Group,h=new i.Group;o.add(a),o.add(r),o.add(h),u(a.shape.points,n,h,l,e,!0),l.setItemGraphicEl(e,o)}}).update(function(e,n){var r=h.getItemGraphicEl(n),a=r.childAt(0),s=r.childAt(1),o=r.childAt(2),c={shape:{points:l.getItemLayout(e)}};c.shape.points&&(u(a.shape.points,c.shape.points,o,l,e,!1),i.updateProps(a,c,t),i.updateProps(s,c,t),l.setItemGraphicEl(e,r))}).remove(function(t){o.remove(h.getItemGraphicEl(t))}).execute(),l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e),r=t.childAt(0),s=t.childAt(1),h=t.childAt(2),u=l.getItemVisual(e,"color");o.add(t),r.useStyle(a.defaults(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),r.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var c=n.getModel("areaStyle"),d=n.getModel("emphasis.areaStyle"),p=c.isEmpty()&&c.parentModel.isEmpty(),g=d.isEmpty()&&d.parentModel.isEmpty();g=g&&p,s.ignore=p,s.useStyle(a.defaults(c.getAreaStyle(),{fill:u,opacity:.7})),s.hoverStyle=d.getAreaStyle();var f=n.getModel("itemStyle").getItemStyle(["color"]),y=n.getModel("emphasis.itemStyle").getItemStyle(),x=n.getModel("label"),m=n.getModel("emphasis.label");function v(){s.attr("ignore",g)}function b(){s.attr("ignore",p)}h.eachChild(function(t){t.setStyle(f),t.hoverStyle=a.clone(y),i.setLabelStyle(t.style,t.hoverStyle,x,m,{labelFetcher:l.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:l.get(l.dimensions[t.__dimIdx],e),autoColor:u,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",v).on("mouseover",v).on("normal",b).on("mouseout",b),i.setHoverStyle(t)}),this._data=l},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}})},93535:function(t,e,n){var r=n(66023);t.exports=function(t){var e=t.polar;if(e){r.isArray(e)||(e=[e]);var n=[];r.each(e,function(e,i){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],r.isArray(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):n.push(e)}),t.polar=n}r.each(t.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}},29056:function(t){t.exports=function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],r=t.coordinateSystem;if(r){for(var i=r.getIndicatorAxes(),a=0;a<i.length;a++)e.each(e.mapDimension(i[a].dim),s);e.each(function(t){n[t][0]&&n[t].push(n[t][0].slice()),e.setItemLayout(t,n[t])})}function s(t,e){n[e]=n[e]||[],n[e][a]=r.dataToPoint(t,a)}})}},79034:function(t,e,n){var r=n(47475);n(48564),n(12824),n(95260);var i=n(19594),a=n(43568);r.registerLayout(i),r.registerVisual(a)},48564:function(t,e,n){var r=n(26626),i=n(89923),a=n(20438).encodeHTML,s=r.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,n=t.data||t.nodes;if(n&&e)return i(n,e,this,!0).data},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){if("edge"===n){var r=this.getDataParams(t,n),i=r.data,o=i.source+" -- "+i.target;return r.value&&(o+=" : "+r.value),a(o)}return s.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}});t.exports=s},12824:function(t,e,n){var r=n(76165),i=n(47475),a=n(66023),s=["itemStyle","opacity"],o=["lineStyle","opacity"];function l(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function h(t,e,n){var r=t.getGraphicEl(),i=l(t,e);null!=n&&(null==i&&(i=1),i*=n),r.downplay&&r.downplay(),r.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function u(t,e){var n=l(t,e),r=t.getGraphicEl();r.highlight&&r.highlight(),r.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}var c=r.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var n=e.extent;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()}});t.exports=i.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,n){var i,a,s,o,l=this,h=t.getGraph(),u=this.group,d=t.layoutInfo,p=d.width,g=d.height,f=t.getData(),y=t.getData("edge"),x=t.get("orient");this._model=t,u.removeAll(),u.attr("position",[d.x,d.y]),h.eachEdge(function(e){var n,i,a,s,o,l,h,d,f=new c;f.dataIndex=e.dataIndex,f.seriesIndex=t.seriesIndex,f.dataType="edge";var m=e.getModel("lineStyle"),v=m.get("curveness"),b=e.node1.getLayout(),w=e.node1.getModel(),M=w.get("localX"),_=w.get("localY"),A=e.node2.getLayout(),S=e.node2.getModel(),C=S.get("localX"),I=S.get("localY"),P=e.getLayout();switch(f.shape.extent=Math.max(1,P.dy),f.shape.orient=x,"vertical"===x?(n=(null!=M?M*p:b.x)+P.sy,i=(null!=_?_*g:b.y)+b.dy,a=(null!=C?C*p:A.x)+P.ty,s=null!=I?I*g:A.y,o=n,l=i*(1-v)+s*v,h=a,d=i*v+s*(1-v)):(n=(null!=M?M*p:b.x)+b.dx,i=(null!=_?_*g:b.y)+P.sy,a=null!=C?C*p:A.x,s=(null!=I?I*g:A.y)+P.ty,o=n*(1-v)+a*v,l=i,h=n*v+a*(1-v),d=s),f.setShape({x1:n,y1:i,x2:a,y2:s,cpx1:o,cpy1:l,cpx2:h,cpy2:d}),f.setStyle(m.getItemStyle()),f.style.fill){case"source":f.style.fill=e.node1.getVisual("color");break;case"target":f.style.fill=e.node2.getVisual("color")}r.setHoverStyle(f,e.getModel("emphasis.lineStyle").getItemStyle()),u.add(f),y.setItemGraphicEl(e.dataIndex,f)}),h.eachNode(function(e){var n=e.getLayout(),i=e.getModel(),a=i.get("localX"),s=i.get("localY"),o=i.getModel("label"),l=i.getModel("emphasis.label"),h=new r.Rect({shape:{x:null!=a?a*p:n.x,y:null!=s?s*g:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle()}),c=e.getModel("emphasis.itemStyle").getItemStyle();r.setLabelStyle(h.style,c,o,l,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),h.setStyle("fill",e.getVisual("color")),r.setHoverStyle(h,c),u.add(h),f.setItemGraphicEl(e.dataIndex,h),h.dataType="node"}),f.eachItemGraphicEl(function(e,r){var i=f.getItemModel(r);i.get("draggable")&&(e.drift=function(e,i){l._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=i,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(r),localX:this.shape.x/p,localY:this.shape.y/g})},e.ondragend=function(){l._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),i.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){l._focusAdjacencyDisabled||n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){l._focusAdjacencyDisabled||n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),y.eachItemGraphicEl(function(e,r){y.getItemModel(r).get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){l._focusAdjacencyDisabled||n.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),e.off("mouseout").on("mouseout",function(){l._focusAdjacencyDisabled||n.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),!this._data&&t.get("animation")&&u.setClipPath((i=u.getBoundingRect(),a=t,s=function(){u.removeClipPath()},o=new r.Rect({shape:{x:i.x-10,y:i.y-10,width:0,height:i.height+20}}),r.initProps(o,{shape:{width:i.width+20,height:i.height+20}},a,s),o)),this._data=t.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,n,r){var i=this._model.getData(),l=i.graph,c=r.dataIndex,d=i.getItemModel(c),p=r.edgeDataIndex;if(null!=c||null!=p){var g=l.getNodeByIndex(c),f=l.getEdgeByIndex(p);if(l.eachNode(function(t){h(t,s,.1)}),l.eachEdge(function(t){h(t,o,.1)}),g){u(g,s);var y=d.get("focusNodeAdjacency");"outEdges"===y?a.each(g.outEdges,function(t){t.dataIndex<0||(u(t,o),u(t.node2,s))}):"inEdges"===y?a.each(g.inEdges,function(t){t.dataIndex<0||(u(t,o),u(t.node1,s))}):"allEdges"===y&&a.each(g.edges,function(t){t.dataIndex<0||(u(t,o),u(t.node1,s),u(t.node2,s))})}f&&(u(f,o),u(f.node1,s),u(f.node2,s))}},unfocusNodeAdjacency:function(t,e,n,r){var i=this._model.getGraph();i.eachNode(function(t){h(t,s)}),i.eachEdge(function(t){h(t,o)})}})},95260:function(t,e,n){var r=n(47475);n(81518),r.registerAction({type:"dragNode",event:"dragNode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})})},19594:function(t,e,n){var r=n(68006),i=n(66023),a=n(70018).groupData;function s(t,e,n,r,a){i.each(t,function(t){var i,s,o,l,h,u=0,c=t.length;if("vertical"===a){for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),o=0;o<c;o++)(s=u-(i=t[o]).getLayout().x)>0&&(l=i.getLayout().x+s,i.setLayout({x:l},!0)),u=i.getLayout().x+i.getLayout().dx+e;if((s=u-e-r)>0)for(l=i.getLayout().x-s,i.setLayout({x:l},!0),u=l,o=c-2;o>=0;--o)(s=(i=t[o]).getLayout().x+i.getLayout().dx+e-u)>0&&(l=i.getLayout().x-s,i.setLayout({x:l},!0)),u=i.getLayout().x}else{for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),o=0;o<c;o++)(s=u-(i=t[o]).getLayout().y)>0&&(h=i.getLayout().y+s,i.setLayout({y:h},!0)),u=i.getLayout().y+i.getLayout().dy+e;if((s=u-e-n)>0)for(h=i.getLayout().y-s,i.setLayout({y:h},!0),u=h,o=c-2;o>=0;--o)(s=(i=t[o]).getLayout().y+i.getLayout().dy+e-u)>0&&(h=i.getLayout().y-s,i.setLayout({y:h},!0)),u=i.getLayout().y}})}function o(t,e){return h(t.node2,e)*t.getValue()}function l(t,e){return h(t.node1,e)*t.getValue()}function h(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function u(t){return t.getValue()}function c(t,e,n){for(var r=0,i=t.length,a=-1;++a<i;){var s=+e.call(t,t[a],n);isNaN(s)||(r+=s)}return r}n(38603).__DEV__,t.exports=function(t,e,n){t.eachSeriesByType("sankey",function(t){var n,d,p,g,f,y,x,m,v,b,w,M,_,A=t.get("nodeWidth"),S=t.get("nodeGap"),C=(n=t,d=e,r.getLayoutRect(n.getBoxLayoutParams(),{width:d.getWidth(),height:d.getHeight()}));t.layoutInfo=C;var I=C.width,P=C.height,T=t.getGraph(),k=T.nodes,L=T.edges;p=k,i.each(p,function(t){var e=Math.max(c(t.outEdges,u),c(t.inEdges,u));t.setLayout({value:e},!0)});var D=0!==i.filter(k,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations");g=k,f=L,y=A,x=S,m=I,v=P,b=D,function(t,e,n,r,a,s){for(var o,l,h,u,c,d,p=[],g=[],f=[],y=[],x=0,m=0,v=0;v<e.length;v++)p[v]=1;for(v=0;v<t.length;v++)g[v]=t[v].inEdges.length,0===g[v]&&f.push(t[v]);for(;f.length;){for(var b=0;b<f.length;b++){var w=f[b];"vertical"===s?(w.setLayout({y:x},!0),w.setLayout({dy:n},!0)):(w.setLayout({x:x},!0),w.setLayout({dx:n},!0));for(var M=0;M<w.outEdges.length;M++){var _=w.outEdges[M];p[e.indexOf(_)]=0;var A=_.node2,S=t.indexOf(A);0==--g[S]&&y.push(A)}}++x,f=y,y=[]}for(v=0;v<p.length;v++);o=t,l=x,h=s,i.each(o,function(t){t.outEdges.length||("vertical"===h?t.setLayout({y:l-1},!0):t.setLayout({x:l-1},!0))}),u=t,c="vertical"===s?(a-n)/(x-1):(r-n)/(x-1),d=s,i.each(u,function(t){if("vertical"===d){var e=t.getLayout().y*c;t.setLayout({y:e},!0)}else{var n=t.getLayout().x*c;t.setLayout({x:n},!0)}})}(g,f,y,m,v,w=t.get("orient")),function(t,e,n,r,d,p,g){var f,y,x,m,v,b,w,M,_,A,S,C,I,P=(f=t,y=[],x="vertical"===g?"y":"x",(m=a(f,function(t){return t.getLayout()[x]})).keys.sort(function(t,e){return t-e}),i.each(m.keys,function(t){y.push(m.buckets.get(t))}),y);v=0,b=P,w=e,M=n,_=r,A=d,S=g,C=[],i.each(b,function(t){var e=t.length,n=0,r=0;i.each(t,function(t){n+=t.getLayout().value}),r="vertical"===S?(_-(e-1)*A)/n:(M-(e-1)*A)/n,C.push(r)}),C.sort(function(t,e){return t-e}),I=C[0],i.each(b,function(t){i.each(t,function(t,e){var n=t.getLayout().value*I;"vertical"===S?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),i.each(w,function(t){var e=+t.getValue()*I;t.setLayout({dy:e},!0)}),s(P,d,n,r,g);for(var T=1;p>0;p--)(function(t,e,n){i.each(t.slice().reverse(),function(t){i.each(t,function(t){if(t.outEdges.length){var r=c(t.outEdges,o,n)/c(t.outEdges,u,n);if("vertical"===n){var i=t.getLayout().x+(r-h(t,n))*e;t.setLayout({x:i},!0)}else{var a=t.getLayout().y+(r-h(t,n))*e;t.setLayout({y:a},!0)}}})})})(P,T*=.99,g),s(P,d,n,r,g),function(t,e,n){i.each(t,function(t){i.each(t,function(t){if(t.inEdges.length){var r=c(t.inEdges,l,n)/c(t.inEdges,u,n);if("vertical"===n){var i=t.getLayout().x+(r-h(t,n))*e;t.setLayout({x:i},!0)}else{var a=t.getLayout().y+(r-h(t,n))*e;t.setLayout({y:a},!0)}}})})}(P,T,g),s(P,d,n,r,g)}(g,f,v,m,x,b,w),M=g,_=w,i.each(M,function(t){"vertical"===_?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),i.each(M,function(t){var e=0,n=0;i.each(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),i.each(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})})}},43568:function(t,e,n){var r=n(95138),i=n(66023);t.exports=function(t,e){t.eachSeriesByType("sankey",function(t){var e=t.getGraph().nodes;if(e.length){var n=1/0,a=-1/0;i.each(e,function(t){var e=t.getLayout().value;e<n&&(n=e),e>a&&(a=e)}),i.each(e,function(e){var i=new r({type:"color",mappingMethod:"linear",dataExtent:[n,a],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",i);var s=e.getModel().get("itemStyle.color");null!=s&&e.setVisual("color",s)})}})}},3683:function(t,e,n){var r=n(47475);n(54837),n(85741);var i=n(41314),a=n(64342);n(31372),r.registerVisual(i("scatter","circle")),r.registerLayout(a("scatter"))},54837:function(t,e,n){var r=n(6551);t.exports=n(26626).extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return r(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}})},85741:function(t,e,n){var r=n(47475),i=n(67076),a=n(30843),s=n(64342);r.extendChartView({type:"scatter",render:function(t,e,n){var r=t.getData();this._updateSymbolDraw(r,t).updateData(r),this._finished=!0},incrementalPrepareRender:function(t,e,n){var r=t.getData();this._updateSymbolDraw(r,t).incrementalPrepareUpdate(r),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var r=t.getData();if(this.group.dirty(),!this._finished||r.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=s().reset(t);i.progress&&i.progress({start:0,end:r.count()},r),this._symbolDraw.updateLayout(r)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,r=e.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new a:new i,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}})},96214:function(t,e,n){var r=n(47475),i=n(66023);n(17426),n(14021),n(32401);var a=n(34907),s=n(3124),o=n(6817);r.registerVisual(i.curry(a,"sunburst")),r.registerLayout(i.curry(s,"sunburst")),r.registerProcessor(i.curry(o,"sunburst"))},61831:function(t,e,n){var r=n(66023),i=n(76165),a={NONE:"none",ANCESTOR:"ancestor",SELF:"self"};function s(t,e,n){i.Group.call(this);var r=new i.Sector({z2:2});r.seriesIndex=e.seriesIndex;var a=new i.Text({z2:4,silent:t.getModel("label").get("silent")});function s(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(r),this.add(a),this.updateData(!0,t,"normal",e,n),this.on("emphasis",s).on("normal",o).on("mouseover",s).on("mouseout",o)}var o=s.prototype;o.updateData=function(t,e,n,a,s){this.node=e,e.piece=this,a=a||this._seriesModel,s=s||this._ecModel;var o,l,h,u,c=this.childAt(0);c.dataIndex=e.dataIndex;var d=e.getModel(),p=e.getLayout(),g=r.extend({},p);g.label=null;var f=function(t,e,n){var i=t.getVisual("color"),a=t.getVisual("visualMeta");a&&0!==a.length||(i=null);var s=t.getModel("itemStyle").get("color");if(s);else{if(i)return i;if(0===t.depth)return n.option.color[0];var o=n.option.color.length;s=n.option.color[function(t){for(var e=t;e.depth>1;)e=e.parentNode;var n=t.getAncestors()[0];return r.indexOf(n.children,e)}(t)%o]}return s}(e,0,s);o=e,l=a,h=f,l.getData().setItemVisual(o.dataIndex,"color",h);var y=d.getModel("itemStyle").getItemStyle();if("normal"===n)u=y;else{var x=d.getModel(n+".itemStyle").getItemStyle();u=r.merge(x,y)}u=r.defaults({lineJoin:"bevel",fill:u.fill||f},u),t?(c.setShape(g),c.shape.r=p.r0,i.updateProps(c,{shape:{r:p.r}},a,e.dataIndex),c.useStyle(u)):"object"==typeof u.fill&&u.fill.type||"object"==typeof c.style.fill&&c.style.fill.type?(i.updateProps(c,{shape:g},a),c.useStyle(u)):i.updateProps(c,{shape:g,style:u},a),this._updateLabel(a,f,n);var m=d.getShallow("cursor");if(m&&c.attr("cursor",m),t){var v=a.getShallow("highlightPolicy");this._initEvents(c,e,a,v)}this._seriesModel=a||this._seriesModel,this._ecModel=s||this._ecModel},o.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(n){var r,i,s;n.piece&&(e.node===n?n.piece.updateData(!1,n,"emphasis"):(r=n,i=e.node,(s=t)!==a.NONE&&(s===a.SELF?r===i:s===a.ANCESTOR?r===i||r.isAncestorOf(i):r===i||r.isDescendantOf(i)))?n.piece.childAt(0).trigger("highlight"):t!==a.NONE&&n.piece.childAt(0).trigger("downplay"))})},o.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},o.onHighlight=function(){this.updateData(!1,this.node,"highlight")},o.onDownplay=function(){this.updateData(!1,this.node,"downplay")},o._updateLabel=function(t,e,n){var a,s=this.node.getModel(),o=s.getModel("label"),l="normal"===n||"emphasis"===n?o:s.getModel(n+".label"),h=s.getModel("emphasis.label"),u=r.retrieve(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);!1===S("show")&&(u="");var c=this.node.getLayout(),d=l.get("minAngle");null==d&&(d=o.get("minAngle")),d=d/180*Math.PI;var p=c.endAngle-c.startAngle;null!=d&&Math.abs(p)<d&&(u="");var g=this.childAt(1);i.setLabelStyle(g.style,g.hoverStyle||{},o,h,{defaultText:l.getShallow("show")?u:null,autoColor:e,useInsideStyle:!0});var f=(c.startAngle+c.endAngle)/2,y=Math.cos(f),x=Math.sin(f),m=S("position"),v=S("distance")||0,b=S("align");"outside"===m?(a=c.r+v,b=f>Math.PI/2?"right":"left"):b&&"center"!==b?"left"===b?(a=c.r0+v,f>Math.PI/2&&(b="right")):"right"===b&&(a=c.r-v,f>Math.PI/2&&(b="left")):(a=(c.r+c.r0)/2,b="center"),g.attr("style",{text:u,textAlign:b,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var w=a*y+c.cx,M=a*x+c.cy;g.attr("position",[w,M]);var _=S("rotate"),A=0;function S(t){var e=l.get(t);return null==e?o.get(t):e}"radial"===_?(A=-f)<-Math.PI/2&&(A+=Math.PI):"tangential"===_?(A=Math.PI/2-f)>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI):"number"==typeof _&&(A=_*Math.PI/180),g.attr("rotation",A)},o._initEvents=function(t,e,n,r){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var i=this,a=function(){i.onEmphasis(r)},s=function(){i.onNormal()};n.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",s).on("emphasis",a).on("normal",s).on("downplay",function(){i.onDownplay()}).on("highlight",function(){i.onHighlight()})},r.inherits(s,i.Group),t.exports=s},17426:function(t,e,n){var r=n(66023),i=n(26626),a=n(67935),s=n(38300).wrapTreePathInfo;t.exports=i.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var n={name:t.name,children:t.data};!function t(e){var n=0;r.each(e.children,function(e){t(e);var i=e.value;r.isArray(i)&&(i=i[0]),n+=i});var i=e.value;r.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),r.isArray(e.value)?e.value[0]=i:e.value=i}(n);var i=t.levels||[],s={};return s.levels=i,a.createTree(n,this,s).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=i.prototype.getDataParams.apply(this,arguments);return e.treePathInfo=s(this.getData().tree.getNodeByDataIndex(t),this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}})},14021:function(t,e,n){var r=n(66023),i=n(55756),a=n(61831),s=n(13593);t.exports=i.extend({type:"sunburst",init:function(){},render:function(t,e,n,i){var o=this;this.seriesModel=t,this.api=n,this.ecModel=e;var l=t.getData(),h=l.tree.root,u=t.getViewRoot(),c=this.group,d=t.get("renderLabelForZeroData"),p=[];if(u.eachNode(function(t){p.push(t)}),function(n,i){function o(t){return t.getId()}function u(r,s){!function(n,r){if(d||!n||n.getValue()||(n=null),n!==h&&r!==h){if(r&&r.piece){var i;n?(r.piece.updateData(!1,n,"normal",t,e),l.setItemGraphicEl(n.dataIndex,r.piece)):(i=r)&&i.piece&&(c.remove(i.piece),i.piece=null)}else if(n){var s=new a(n,t,e);c.add(s),l.setItemGraphicEl(n.dataIndex,s)}}}(null==r?null:n[r],null==s?null:i[s])}(0!==n.length||0!==i.length)&&new s(i,n,o,o).add(u).update(u).remove(r.curry(u,null)).execute()}(p,this._oldChildren||[]),function(n,r){if(r.depth>0){o.virtualPiece?o.virtualPiece.updateData(!1,n,"normal",t,e):(o.virtualPiece=new a(n,t,e),c.add(o.virtualPiece)),r.piece._onclickEvent&&r.piece.off("click",r.piece._onclickEvent);var i=function(t){o._rootToNode(r.parentNode)};r.piece._onclickEvent=i,o.virtualPiece.on("click",i)}else o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}(h,u),i&&i.highlight&&i.highlight.piece){var g=t.getShallow("highlightPolicy");i.highlight.piece.onEmphasis(g)}else if(i&&i.unhighlight){var f=this.virtualPiece;!f&&h.children.length&&(f=h.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece.childAt(0)===e.target){var i=r.getModel().get("nodeClick");if("rootToNode"===i)t._rootToNode(r);else if("link"===i){var a=r.getModel(),s=a.get("link");if(s){var o=a.get("target",!0)||"_blank";window.open(s,o)}}n=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var r=t[0]-n.cx,i=t[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}}})},32401:function(t,e,n){var r=n(47475),i=n(38300),a="sunburstRootToNode";r.registerAction({type:a,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){var r=i.retrieveTargetInfo(t,[a],e);if(r){var s=e.getViewRoot();s&&(t.direction=i.aboveViewRoot(s,r.node)?"rollUp":"drillDown"),e.resetViewRoot(r.node)}})});var s="sunburstHighlight";r.registerAction({type:s,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){var r=i.retrieveTargetInfo(t,[s],e);r&&(t.highlight=r.node)})}),r.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,n){t.unhighlight=!0})})},3124:function(t,e,n){var r=n(98763).parsePercent,i=n(66023),a=2*Math.PI,s=Math.PI/180;t.exports=function(t,e,n,o){e.eachSeriesByType(t,function(t){var e=t.get("center"),o=t.get("radius");i.isArray(o)||(o=[0,o]),i.isArray(e)||(e=[e,e]);var l=n.getWidth(),h=n.getHeight(),u=Math.min(l,h),c=r(e[0],l),d=r(e[1],h),p=r(o[0],u/2),g=r(o[1],u/2),f=-t.get("startAngle")*s,y=t.get("minAngle")*s,x=t.getData().tree.root,m=t.getViewRoot(),v=m.depth,b=t.get("sort");null!=b&&function t(e,n){var r=e.children||[];e.children=function(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var r=(t.getValue()-e.getValue())*(n?1:-1);return 0===r?(t.dataIndex-e.dataIndex)*(n?-1:1):r})}(r,n),r.length&&i.each(e.children,function(e){t(e,n)})}(m,b);var w=0;i.each(m.children,function(t){!isNaN(t.getValue())&&w++});var M=m.getValue(),_=Math.PI/(M||w)*2,A=m.depth>0,S=(g-p)/(m.height-(A?-1:1)||1),C=t.get("clockwise"),I=t.get("stillShowZeroSum"),P=a,T=0,k=C?1:-1,L=function(t,e){if(t){var n=e;if(t!==x){var a=t.getValue(),s=0===M&&I?_:a*_;s<y?(s=y,P-=y):T+=a,n=e+k*s;var o=t.depth-v-(A?-1:1),l=p+S*o,h=p+S*(o+1),g=t.getModel();null!=g.get("r0")&&(l=r(g.get("r0"),u/2)),null!=g.get("r")&&(h=r(g.get("r"),u/2)),t.setLayout({angle:s,startAngle:e,endAngle:n,clockwise:C,cx:c,cy:d,r0:l,r:h})}if(t.children&&t.children.length){var f=0;i.each(t.children,function(t){f+=L(t,e+f)})}return n-e}};if(A){var D=2*Math.PI;x.setLayout({angle:D,startAngle:f,endAngle:f+D,clockwise:C,cx:c,cy:d,r0:p,r:p+S})}L(m,f)})}},51309:function(t,e,n){var r=n(47475);n(96729),n(4796),n(11205);var i=n(95553),a=n(67952),s=n(6817);r.registerLayout(i),r.registerVisual(a),r.registerProcessor(s("themeRiver"))},4796:function(t,e,n){var r=n(26626),i=n(35047),a=n(39116).getDimensionTypeByAxis,s=n(90942),o=n(66023),l=n(70018).groupData,h=n(20438).encodeHTML,u=r.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){u.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,n=l(t,function(t){return t[2]}),r=[];n.buckets.each(function(t,e){r.push({name:e,dataList:t})});for(var i=r.length,a=-1,s=-1,o=0;o<i;++o){var h=r[o].dataList.length;h>a&&(a=h,s=o)}for(var u=0;u<i;++u)if(u!==s)for(var c=r[u].name,d=0;d<a;++d){for(var p=r[s].dataList[d][0],g=r[u].dataList.length,f=-1,y=0;y<g;++y)if(r[u].dataList[y][0]===p){f=y;break}-1===f&&(t[e]=[],t[e][0]=p,t[e][1]=0,t[e][2]=c,e++)}return t},getInitialData:function(t,e){for(var n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),r=o.filter(t.data,function(t){return void 0!==t[2]}),l=this.fixData(r||[]),h=[],u=this.nameMap=o.createHashMap(),c=0,d=0;d<l.length;++d)h.push(l[d][2]),!u.get(l[d][2])&&(u.set(l[d][2],c),c++);var p=new s(i(l,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:a(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),this);return p.initData(l),p},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),n=[],r=0;r<e;++r)n[r]=r;var i=t.mapDimension("single"),a=l(n,function(e){return t.get("name",e)}),s=[];return a.buckets.each(function(e,n){e.sort(function(e,n){return t.get(i,e)-t.get(i,n)}),s.push({name:n,indices:e})}),s},getAxisTooltipData:function(t,e,n){o.isArray(t)||(t=t?[t]:[]);for(var r,i=this.getData(),a=this.getLayerSeries(),s=[],l=a.length,h=0;h<l;++h){for(var u=Number.MAX_VALUE,c=-1,d=a[h].indices.length,p=0;p<d;++p){var g=i.get(t[0],a[h].indices[p]),f=Math.abs(g-e);f<=u&&(r=g,u=f,c=a[h].indices[p])}s.push(c)}return{dataIndices:s,nestestValue:r}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),r=e.get(e.mapDimension("value"),t);return(isNaN(r)||null==r)&&(r="-"),h(n+" : "+r)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});t.exports=u},11205:function(t,e,n){var r=n(47475),i=n(68742).Polygon,a=n(76165),s=n(66023),o=s.bind,l=s.extend,h=n(13593);t.exports=r.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,n){var r=t.getData(),s=this.group,u=t.getLayerSeries(),c=r.getLayout("layoutInfo"),d=c.rect,p=c.boundaryGap;function g(t){return t.name}s.attr("position",[0,d.y+p[0]]);var f=new h(this._layersSeries||[],u,g,g),y={};function x(e,n,o){var h,c,d,p=this._layers;if("remove"===e)return void s.remove(p[n]);for(var g=[],f=[],x=u[n].indices,m=0;m<x.length;m++){var v=r.getItemLayout(x[m]),b=v.x,w=v.y0,M=v.y;g.push([b,w]),f.push([b,w+M]),h=r.getItemVisual(x[m],"color")}var _=r.getItemLayout(x[0]),A=r.getItemModel(x[m-1]),S=A.getModel("label"),C=S.get("margin");if("add"===e){var I,P,T,k,L=y[n]=new a.Group;c=new i({shape:{points:g,stackedOnPoints:f,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),d=new a.Text({style:{x:_.x-C,y:_.y0+_.y/2}}),L.add(c),L.add(d),s.add(L),c.setClipPath((I=c.getBoundingRect(),P=t,T=function(){c.removeClipPath()},k=new a.Rect({shape:{x:I.x-10,y:I.y-10,width:0,height:I.height+20}}),a.initProps(k,{shape:{width:I.width+20,height:I.height+20}},P,T),k))}else{var L=p[o];c=L.childAt(0),d=L.childAt(1),s.add(L),y[n]=L,a.updateProps(c,{shape:{points:g,stackedOnPoints:f}},t),a.updateProps(d,{style:{x:_.x-C,y:_.y0+_.y/2}},t)}var D=A.getModel("emphasis.itemStyle"),R=A.getModel("itemStyle");a.setTextStyle(d.style,S,{text:S.get("show")?t.getFormattedLabel(x[m-1],"normal")||r.getName(x[m-1]):null,textVerticalAlign:"middle"}),c.setStyle(l({fill:h},R.getItemStyle(["color"]))),a.setHoverStyle(c,D.getItemStyle())}f.add(o(x,this,"add")).update(o(x,this,"update")).remove(o(x,this,"remove")).execute(),this._layersSeries=u,this._layers=y},dispose:function(){}})},95553:function(t,e,n){var r=n(66023),i=n(98763);function a(t,e,n){if(t.count())for(var i,a=e.coordinateSystem,s=e.getLayerSeries(),o=t.mapDimension("single"),l=t.mapDimension("value"),h=r.map(s,function(e){return r.map(e.indices,function(e){var n=a.dataToPoint(t.get(o,e));return n[1]=t.get(l,e),n})}),u=function(t){for(var e,n=t.length,r=t[0].length,i=[],a=[],s=0,o={},l=0;l<r;++l){for(var h=0,e=0;h<n;++h)e+=t[h][l][1];e>s&&(s=e),i.push(e)}for(var u=0;u<r;++u)a[u]=(s-i[u])/2;s=0;for(var c=0;c<r;++c){var d=i[c]+a[c];d>s&&(s=d)}return o.y0=a,o.max=s,o}(h),c=u.y0,d=n/u.max,p=s.length,g=s[0].indices.length,f=0;f<g;++f){i=c[f]*d,t.setItemLayout(s[0].indices[f],{layerIndex:0,x:h[0][f][0],y0:i,y:h[0][f][1]*d});for(var y=1;y<p;++y)i+=h[y-1][f][1]*d,t.setItemLayout(s[y].indices[f],{layerIndex:y,x:h[y][f][0],y0:i,y:h[y][f][1]*d})}}t.exports=function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,r={},s=n.getRect();r.rect=s;var o=t.get("boundaryGap"),l=n.getAxis();r.boundaryGap=o,"horizontal"===l.orient?(o[0]=i.parsePercent(o[0],s.height),o[1]=i.parsePercent(o[1],s.height),a(e,t,s.height-o[0]-o[1])):(o[0]=i.parsePercent(o[0],s.width),o[1]=i.parsePercent(o[1],s.width),a(e,t,s.width-o[0]-o[1])),e.setLayout("layoutInfo",r)})}},67952:function(t,e,n){var r=n(66023).createHashMap;t.exports=function(t){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.getRawData(),i=t.get("color"),a=r();e.each(function(t){a.set(e.getRawIndex(t),t)}),n.each(function(r){var s=n.getName(r),o=i[(t.nameMap.get(s)-1)%i.length];n.setItemVisual(r,"color",o);var l=a.get(r);null!=l&&e.setItemVisual(l,"color",o)})})}},59070:function(t,e,n){var r=n(47475);n(16242),n(93479),n(90951);var i=n(41314),a=n(94042);r.registerVisual(i("tree","circle")),r.registerLayout(a)},16242:function(t,e,n){var r=n(26626),i=n(67935),a=n(20438).encodeHTML;t.exports=r.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},r={};r.leaves=n;var a=i.createTree(e,this,r),s=0;a.eachNode("preorder",function(t){t.depth>s&&(s=t.depth)});var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:s;return a.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o}),a.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],r=e.getNodeByDataIndex(t),i=r.getValue(),s=r.name;r&&r!==n;)s=r.parentNode.name+"."+s,r=r.parentNode;return a(s+(isNaN(i)||null==i?"":" : "+i))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}})},93479:function(t,e,n){var r=n(66023),i=n(76165),a=n(25718),s=n(67217).radialCoordinate,o=n(47475),l=n(91273),h=n(3115),u=n(75398),c=n(84275),d=n(56694).onIrrelevantElement;function p(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function g(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function f(t,e,n,s,o,l){var h=!n,u=t.tree.getNodeByDataIndex(e),c=u.getModel(),l=g(u,c,l),d=t.tree.root,p=u.parentNode===d?u:u.parentNode||u,f=t.getItemGraphicEl(p.dataIndex),y=p.getLayout(),m=f?{x:f.position[0],y:f.position[1],rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:y,v=u.getLayout();h?(n=new a(t,e,l)).attr("position",[m.x,m.y]):n.updateData(t,e,l),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=v.rawX,n.__radialRawY=v.rawY,s.add(n),t.setItemGraphicEl(e,n),i.updateProps(n,{position:[v.x,v.y]},o);var b=n.getSymbolPath();if("radial"===l.layout){var w,M,_=d.children[0],A=_.getLayout(),S=_.children.length;if(v.x===A.x&&!0===u.isExpand){var C={};C.x=(_.children[0].getLayout().x+_.children[S-1].getLayout().x)/2,C.y=(_.children[0].getLayout().y+_.children[S-1].getLayout().y)/2,(w=Math.atan2(C.y-A.y,C.x-A.x))<0&&(w=2*Math.PI+w),(M=C.x<A.x)&&(w-=Math.PI)}else(w=Math.atan2(v.y-A.y,v.x-A.x))<0&&(w=2*Math.PI+w),0===u.children.length||0!==u.children.length&&!1===u.isExpand?(M=v.x<A.x)&&(w-=Math.PI):(M=v.x>A.x)||(w-=Math.PI);var I=M?"left":"right";b.setStyle({textPosition:I,textRotation:-w,textOrigin:"center",verticalAlign:"middle"})}if(u.parentNode&&u.parentNode!==d){var P=n.__edge;P||(P=n.__edge=new i.BezierCurve({shape:x(l,m,m),style:r.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),i.updateProps(P,{shape:x(l,y,v),style:{opacity:1}},o),s.add(P)}}function y(t,e,n,r,a,s){for(var o,l=t.tree.getNodeByDataIndex(e),h=t.tree.root,u=l.getModel(),s=g(l,u,s),c=l.parentNode===h?l:l.parentNode||l;null==(o=c.getLayout());)c=c.parentNode===h?c:c.parentNode||c;i.updateProps(n,{position:[o.x+1,o.y+1]},a,function(){r.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var d=n.__edge;d&&i.updateProps(d,{shape:x(s,o,o),style:{opacity:0}},a,function(){r.remove(d)})}function x(t,e,n){var r,i,a,o,l,h,u,c,d=t.orient;if("radial"===t.layout){l=e.rawX,u=e.rawY,h=n.rawX,c=n.rawY;var p=s(l,u),g=s(l,u+(c-u)*t.curvature),f=s(h,c+(u-c)*t.curvature),y=s(h,c);return{x1:p.x,y1:p.y,x2:y.x,y2:y.y,cpx1:g.x,cpy1:g.y,cpx2:f.x,cpy2:f.y}}return l=e.x,u=e.y,h=n.x,c=n.y,("LR"===d||"RL"===d)&&(r=l+(h-l)*t.curvature,i=u,a=h+(l-h)*t.curvature,o=c),("TB"===d||"BT"===d)&&(r=l,i=u+(c-u)*t.curvature,a=h,o=c+(u-c)*t.curvature),{x1:l,y1:u,x2:h,y2:c,cpx1:r,cpy1:i,cpx2:a,cpy2:o}}t.exports=o.extendChartView({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new i.Group,this._controller=new c(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,n,r){var i=t.getData(),a=t.layoutInfo,s=this._mainGroup,o=t.get("layout");"radial"===o?s.attr("position",[a.x+a.width/2,a.y+a.height/2]):s.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,n);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:o,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};i.diff(l).add(function(e){p(i,e)&&f(i,e,null,s,t,h)}).update(function(e,n){var r=l.getItemGraphicEl(n);if(!p(i,e)){r&&y(l,n,r,s,t,h);return}f(i,e,r,s,t,h)}).remove(function(e){var n=l.getItemGraphicEl(e);n&&y(l,e,n,s,t,h)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===h.expandAndCollapse&&i.eachItemGraphicEl(function(e,r){e.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:r})})}),this._data=i},_updateViewCoordSys:function(t){var e=t.getData(),n=[];e.each(function(t){var r=e.getItemLayout(t);!r||isNaN(r.x)||isNaN(r.y)||n.push([+r.x,+r.y])});var r=[],i=[];l.fromPoints(n,r,i),i[0]-r[0]==0&&(i[0]+=1,r[0]-=1),i[1]-r[1]==0&&(i[1]+=1,r[1]-=1);var a=t.coordinateSystem=new h;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(r[0],r[1],i[0]-r[0],i[1]-r[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,n){var r=this._controller,i=this._controllerHost,a=this.group;r.setPointerChecker(function(e,r,i){var s=a.getBoundingRect();return s.applyTransform(a.transform),s.contain(r,i)&&!d(e,n,t)}),r.enable(t.get("roam")),i.zoomLimit=t.get("scaleLimit"),i.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(e){u.updateViewOnPan(i,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){u.updateViewOnZoom(i,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),n=this._getNodeGlobalScale(t),r=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",r)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,r=e.scale,i=r&&r[0]||1;return((e.getZoom()-1)*n+1)/i},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}})},67217:function(t,e,n){var r=n(68006);function i(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function a(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function s(t,e){return t.parentNode===e.parentNode?1:2}e.init=function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,r=[t];e=r.pop();)if(n=e.children,e.isExpand&&n.length)for(var i=n.length,a=i-1;a>=0;a--){var s=n[a];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},r.push(s)}},e.firstWalk=function(t,e){var n=t.isExpand?t.children:[],r=t.parentNode.children,s=t.hierNode.i?r[t.hierNode.i-1]:null;if(n.length){!function(t){for(var e=t.children,n=e.length,r=0,i=0;--n>=0;){var a=e[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;s?(t.hierNode.prelim=s.hierNode.prelim+e(t,s),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else s&&(t.hierNode.prelim=s.hierNode.prelim+e(t,s));t.parentNode.hierNode.defaultAncestor=function(t,e,n,r){if(e){for(var s=t,o=t,l=o.parentNode.children[0],h=e,u=s.hierNode.modifier,c=o.hierNode.modifier,d=l.hierNode.modifier,p=h.hierNode.modifier;h=i(h),o=a(o),h&&o;){s=i(s),l=a(l),s.hierNode.ancestor=t;var g,f,y,x=h.hierNode.prelim+p-o.hierNode.prelim-c+r(h,o);x>0&&(function(t,e,n){var r=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=r}((g=h,f=t,y=n,g.hierNode.ancestor.parentNode===f.parentNode?g.hierNode.ancestor:y),t,x),c+=x,u+=x),p+=h.hierNode.modifier,c+=o.hierNode.modifier,u+=s.hierNode.modifier,d+=l.hierNode.modifier}h&&!i(s)&&(s.hierNode.thread=h,s.hierNode.modifier+=p-u),o&&!a(l)&&(l.hierNode.thread=o,l.hierNode.modifier+=c-d,n=t)}return n}(t,s,t.parentNode.hierNode.defaultAncestor||r[0],e)},e.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},e.separation=function(t){return arguments.length?t:s},e.radialCoordinate=function(t,e){var n={};return n.x=e*Math.cos(t-=Math.PI/2),n.y=e*Math.sin(t),n},e.getViewRect=function(t,e){return r.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}},71821:function(t,e){e.eachAfter=function(t,e,n){for(var r,i=[t],a=[];r=i.pop();)if(a.push(r),r.isExpand){var s=r.children;if(s.length)for(var o=0;o<s.length;o++)i.push(s[o])}for(;r=a.pop();)e(r,n)},e.eachBefore=function(t,e){for(var n,r=[t];n=r.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)r.push(i[a])}}},90951:function(t,e,n){var r=n(47475),i=n(31616).updateCenterAndZoom;r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=t.dataIndex,r=e.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var n=i(e.coordinateSystem,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})})},94042:function(t,e,n){var r=n(71821),i=r.eachAfter,a=r.eachBefore,s=n(67217),o=s.init,l=s.firstWalk,h=s.secondWalk,u=s.separation,c=s.radialCoordinate,d=s.getViewRect;t.exports=function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=d(t,e);t.layoutInfo=n;var r=t.get("layout"),s=0,p=0,g=null;"radial"===r?(s=2*Math.PI,p=Math.min(n.height,n.width)/2,g=u(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(s=n.width,p=n.height,g=u());var f=t.getData().tree.root,y=f.children[0];if(y){o(f),i(y,l,g),f.hierNode.modifier=-y.hierNode.prelim,a(y,h);var x=y,m=y,v=y;a(y,function(t){var e=t.getLayout().x;e<x.getLayout().x&&(x=t),e>m.getLayout().x&&(m=t),t.depth>v.depth&&(v=t)});var b=x===m?1:g(x,m)/2,w=b-x.getLayout().x,M=0,_=0,A=0,S=0;if("radial"===r)M=s/(m.getLayout().x+b+w),_=p/(v.depth-1||1),a(y,function(t){A=(t.getLayout().x+w)*M,S=(t.depth-1)*_;var e=c(A,S);t.setLayout({x:e.x,y:e.y,rawX:A,rawY:S},!0)});else{var C=t.getOrient();"RL"===C||"LR"===C?(_=p/(m.getLayout().x+b+w),M=s/(v.depth-1||1),a(y,function(t){S=(t.getLayout().x+w)*_,A="LR"===C?(t.depth-1)*M:s-(t.depth-1)*M,t.setLayout({x:A,y:S},!0)})):("TB"===C||"BT"===C)&&(M=s/(m.getLayout().x+b+w),_=p/(v.depth-1||1),a(y,function(t){A=(t.getLayout().x+w)*M,S="TB"===C?(t.depth-1)*_:p-(t.depth-1)*_,t.setLayout({x:A,y:S},!0)}))}}}(t,e)})}},74698:function(t,e,n){var r=n(47475);n(88566),n(30872),n(76527);var i=n(1058),a=n(13311);r.registerVisual(i),r.registerLayout(a)},68595:function(t,e,n){var r=n(76165),i=n(68006),a=n(66023),s=n(38300).wrapTreePathInfo;function o(t){this.group=new r.Group,t.add(this.group)}o.prototype={constructor:o,render:function(t,e,n,r){var a=t.getModel("breadcrumb"),s=this.group;if(s.removeAll(),a.get("show")&&n){var o=a.getModel("itemStyle"),l=o.getModel("textStyle"),h={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,l),this._renderContent(t,h,o,l,r),i.positionElement(s,h.pos,h.box)}},_prepare:function(t,e,n){for(var r=t;r;r=r.parentNode){var i=r.getModel().get("name"),a=Math.max(n.getTextRect(i).width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:r,text:i,width:a})}},_renderContent:function(t,e,n,o,l){for(var h=0,u=e.emptyItemWidth,c=t.get("breadcrumb.height"),d=i.getAvailableSize(e.pos,e.box),p=e.totalWidth,g=e.renderList,f=g.length-1;f>=0;f--){var y,x,m,v=g[f],b=v.node,w=v.width,M=v.text;p>d.width&&(p-=w-u,w=u,M=null);var _=new r.Polygon({shape:{points:function(t,e,n,r,i,a){var s=[[i?t:t-5,0],[t+n,e],[t+n,e+r],[i?t:t-5,e+r]];return a||s.splice(2,0,[t+n+5,e+r/2]),i||s.push([t,e+r/2]),s}(h,0,w,c,f===g.length-1,0===f)},style:a.defaults(n.getItemStyle(),{lineJoin:"bevel",text:M,textFill:o.getTextColor(),textFont:o.getFont()}),z:10,onclick:a.curry(l,b)});this.group.add(_),y=_,x=t,m=b,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:x.componentIndex,seriesIndex:x.componentIndex,seriesName:x.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:m&&m.dataIndex,name:m&&m.name},treePathInfo:m&&s(m,x)},h+=w+8}},remove:function(){this.group.removeAll()}},t.exports=o},88566:function(t,e,n){var r=n(66023),i=n(26626),a=n(67935),s=n(27611),o=n(20438),l=o.encodeHTML,h=o.addCommas,u=n(38300).wrapTreePathInfo;t.exports=i.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data};!function t(e){var n=0;r.each(e.children,function(e){t(e);var i=e.value;r.isArray(i)&&(i=i[0]),n+=i});var i=e.value;r.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=n),i<0&&(i=0),r.isArray(e.value)?e.value[0]=i:e.value=i}(n);var i=t.levels||[];i=t.levels=function(t,e){var n,i=e.get("color");if(i)return t=t||[],r.each(t,function(t){var e=new s(t),r=e.get("color");(e.get("itemStyle.color")||r&&"none"!==r)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}(i,e);var o={};return o.levels=i,a.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=r.isArray(n)?h(n[0]):h(n);return l(e.getName(t)+": "+i)},getDataParams:function(t){var e=i.prototype.getDataParams.apply(this,arguments);return e.treePathInfo=u(this.getData().tree.getNodeByDataIndex(t),this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},r.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=r.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}})},30872:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165),s=n(13593),o=n(38300),l=n(68595),h=n(84275),u=n(71497),c=n(36653),d=n(45617),p=n(24954),g=i.bind,f=a.Group,y=a.Rect,x=i.each,m=["label"],v=["emphasis","label"],b=["upperLabel"],w=["emphasis","upperLabel"],M=p([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),_=function(t){var e=M(t);return e.stroke=e.fill=e.lineWidth=null,e};function A(){return{nodeGroup:[],background:[],content:[]}}function S(t,e,n,r,s,o,l,h,u,c){if(l){var d=l.getLayout();if(d&&d.isInView){var p=d.width,g=d.height,x=d.borderWidth,A=d.invisible,S=l.getRawIndex(),C=h&&h.getRawIndex(),I=l.viewChildren,P=d.upperHeight,T=I&&I.length,k=l.getModel("itemStyle"),L=l.getModel("emphasis.itemStyle"),D=Z("nodeGroup",f);if(D){if(u.add(D),D.attr("position",[d.x||0,d.y||0]),D.__tmNodeWidth=p,D.__tmNodeHeight=g,d.isAboveViewRoot)return D;var R=Z("background",y,c,1);if(R&&(N=D,O=R,j=T&&d.upperHeight,O.dataIndex=l.dataIndex,O.seriesIndex=t.seriesIndex,O.setShape({x:0,y:0,width:p,height:g}),E=l.getVisual("borderColor",!0),V=L.get("borderColor"),q(O,function(){var t=_(k);t.fill=E;var e=M(L);if(e.fill=V,j){var n=p-2*x;U(t,e,E,n,P,{x:x,y:0,width:n,height:P})}else t.text=e.text=null;O.setStyle(t),a.setHoverStyle(O,e)}),N.add(O)),!T){var N,O,j,E,V,B,z,F,G,H,W=Z("content",y,c,2);W&&(B=D,(z=W).dataIndex=l.dataIndex,z.seriesIndex=t.seriesIndex,F=Math.max(p-2*x,0),G=Math.max(g-2*x,0),z.culling=!0,z.setShape({x:x,y:x,width:F,height:G}),H=l.getVisual("color",!0),q(z,function(){var t=_(k);t.fill=H;var e=M(L);U(t,e,H,F,G),z.setStyle(t),a.setHoverStyle(z,e)}),B.add(z))}return D}}}function q(t,e){A?t.invisible||o.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function U(e,n,r,s,o,h){var u=l.getModel(),c=i.retrieve(t.getFormattedLabel(l.dataIndex,"normal",null,null,h?"upperLabel":"label"),u.get("name"));if(!h&&d.isLeafRoot){var p=t.get("drillDownIcon",!0);c=p?p+" "+c:c}var g=u.getModel(h?b:m),f=u.getModel(h?w:v),y=g.getShallow("show");a.setLabelStyle(e,n,g,f,{defaultText:y?c:null,autoColor:r,isRectText:!0}),h&&(e.textRect=i.clone(h)),e.truncate=y&&g.get("ellipsis")?{outerWidth:s,outerHeight:o,minChar:2}:null}function Z(t,a,o,h){var u,c,d,p,g=null!=C&&n[t][C],f=s[t];return g?(n[t][C]=null,u=f,c=g,d=t,(u[S]={}).old="nodeGroup"===d?c.position.slice():i.extend({},c.shape)):A||((g=new a({z:((p=10*o+h)-1)/p})).__tmDepth=o,g.__tmStorageName=t,function(t,e,n){var i=t[S]={},a=l.parentNode;if(a&&(!r||"drillDown"===r.direction)){var o=0,h=0,u=s.background[a.getRawIndex()];!r&&u&&u.old&&(o=u.old.width,h=u.old.height),i.old="nodeGroup"===n?[0,h]:{x:o,y:h,width:0,height:0}}i.fadein="nodeGroup"!==n}(f,0,t)),e[t][S]=g}}t.exports=r.extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage=A(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,r){var a=e.findComponents({mainType:"series",subType:"treemap",query:r});if(!(0>i.indexOf(a,t))){this.seriesModel=t,this.api=n,this.ecModel=e;var s=o.retrieveTargetInfo(r,["treemapZoomToNode","treemapRootToNode"],t),l=r&&r.type,h=t.layoutInfo,u=!this._oldTree,c=this._storage,d="treemapRootToNode"===l&&s&&c?{rootNodeGroup:c.nodeGroup[s.node.getRawIndex()],direction:r.direction}:null,p=this._giveContainerGroup(h),g=this._doRender(p,t,d);u||l&&"treemapZoomToNode"!==l&&"treemapRootToNode"!==l?g.renderFinally():this._doAnimation(p,g,t,d),this._resetController(n),this._renderBreadcrumb(t,n,s)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new f,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){var r,a,o=e.getData().tree,l=this._oldTree,h=A(),u=A(),c=this._storage,d=[],p=i.curry(S,e,u,c,n,h,d);!function t(e,n,r,a,o){function l(t){return t.getId()}function h(i,s){var l=null!=i?e[i]:null,h=null!=s?n[s]:null,u=p(l,h,r,o);u&&t(l&&l.viewChildren||[],h&&h.viewChildren||[],u,a,o+1)}a?(n=e,x(e,function(t,e){t.isRemoved()||h(e,e)})):new s(n,e,l,l).add(h).update(h).remove(i.curry(h,null)).execute()}(o.root?[o.root]:[],l&&l.root?[l.root]:[],t,o===l||!l,0);var g=(r=c,a=A(),r&&x(r,function(t,e){var n=a[e];x(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),a);return this._oldTree=o,this._storage=u,{lastsForAnimation:h,willDeleteEls:g,renderFinally:function(){x(g,function(t){x(t,function(t){t.parent&&t.parent.remove(t)})}),x(d,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,n,r){if(n.get("animation")){var a=n.get("animationDurationUpdate"),s=n.get("animationEasing"),o=d.createWrap();x(e.willDeleteEls,function(t,e){x(t,function(t,n){if(!t.invisible){var i,l=t.parent;if(r&&"drillDown"===r.direction)i=l===r.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmWillDelete||(h=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),i="nodeGroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}i&&o.add(t,i,a,s)}})}),x(this._storage,function(t,n){x(t,function(t,r){var l=e.lastsForAnimation[n][r],h={};l&&("nodeGroup"===n?l.old&&(h.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(h.shape=i.extend({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),h.style={opacity:1}):1!==t.style.opacity&&(h.style={opacity:1})),o.add(t,h,a,s))})},this),this._state="animating",o.done(g(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new h(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",g(this._onPan,this)),e.on("zoom",g(this._onZoom,this)));var n=new u(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,r){return n.contain(e,r)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(e){var n=e.getLayout();n&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}}},_onZoom:function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;var a=new u(i.x,i.y,i.width,i.height),s=this.seriesModel.layoutInfo;e-=s.x,n-=s.y;var o=c.create();c.translate(o,o,[-e,-n]),c.scale(o,o,[t.scale,t.scale]),c.translate(o,o,[e,n]),a.applyTransform(o),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var n=this.findTarget(t.offsetX,t.offsetY);if(n){var r=n.node;if(r.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===e)this._zoomToNode(n);else if("link"===e){var i=r.hostTree.data.getItemModel(r.dataIndex),a=i.get("link",!0),s=i.get("target",!0)||"blank";a&&window.open(a,s)}}}}},this)},_renderBreadcrumb:function(t,e,n){!n&&((n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new l(this.group))).render(t,e,n.node,g(function(e){"animating"!==this._state&&(o.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=A(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(t,e),s=i.shape;if(!(s.x<=a[0])||!(a[0]<=s.x+s.width)||!(s.y<=a[1])||!(a[1]<=s.y+s.height))return!1;n={node:r,offsetX:a[0],offsetY:a[1]}}},this),n}})},76527:function(t,e,n){for(var r=n(47475),i=n(38300),a=function(){},s=["treemapZoomToNode","treemapRender","treemapMove"],o=0;o<s.length;o++)r.registerAction({type:s[o],update:"updateView"},a);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},function(e,n){var r=i.retrieveTargetInfo(t,["treemapZoomToNode","treemapRootToNode"],e);if(r){var a=e.getViewRoot();a&&(t.direction=i.aboveViewRoot(a,r.node)?"rollUp":"drillDown"),e.resetViewRoot(r.node)}})})},13311:function(t,e,n){var r=n(66023),i=n(71497),a=n(98763),s=a.parsePercent,o=a.MAX_SAFE_INTEGER,l=n(68006),h=n(38300),u=Math.max,c=Math.min,d=r.retrieve,p=r.each,g=["itemStyle","borderWidth"],f=["itemStyle","gapWidth"],y=["upperLabel","show"],x=["upperLabel","height"];function m(t,e,n,r,i){var a=+(e!==n.width),s=1-a,o=["x","y"],l=["width","height"],h=n[o[a]],d=e?t.area/e:0;(i||d>n[l[s]])&&(d=n[l[s]]);for(var p=0,g=t.length;p<g;p++){var f=t[p],y={},x=d?f.getLayout().area/d:0,m=y[l[s]]=u(d-2*r,0),v=n[o[a]]+n[l[a]]-h,b=p===g-1||v<x?v:x,w=y[l[a]]=u(b-2*r,0);y[o[s]]=n[o[s]]+c(r,m/2),y[o[a]]=h+c(r,w/2),h+=b,f.setLayout(y,!0)}n[o[s]]+=d,n[l[s]]-=d}function v(t){return t.get(y)?t.get(x):0}t.exports={seriesType:"treemap",reset:function(t,e,n,a){var y=n.getWidth(),x=n.getHeight(),b=t.option,w=l.getLayoutRect(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),M=b.size||[],_=s(d(w.width,M[0]),y),A=s(d(w.height,M[1]),x),S=a&&a.type,C=h.retrieveTargetInfo(a,["treemapZoomToNode","treemapRootToNode"],t),I="treemapRender"===S||"treemapMove"===S?a.rootRect:null,P=t.getViewRoot(),T=h.getPathToRoot(P);if("treemapMove"!==S){var k="treemapZoomToNode"===S?function(t,e,n,r,i){var a,s=(e||{}).node,l=[r,i];if(!s||s===n)return l;for(var h=r*i,u=h*t.option.zoomToNodeRatio;a=s.parentNode;){for(var c=0,d=a.children,p=0,f=d.length;p<f;p++)c+=d[p].getValue();var y=s.getValue();if(0===y)return l;u*=c/y;var x=a.getModel(),m=x.get(g),b=Math.max(m,v(x,m));(u+=4*m*m+(3*m+b)*Math.pow(u,.5))>o&&(u=o),s=a}u<h&&(u=h);var w=Math.pow(u/h,.5);return[r*w,i*w]}(t,C,P,_,A):I?[I.width,I.height]:[_,A],L=b.sort;L&&"asc"!==L&&"desc"!==L&&(L="desc");var D={squareRatio:b.squareRatio,sort:L,leafDepth:b.leafDepth};P.hostTree.clearLayouts();var R={x:0,y:0,width:k[0],height:k[1],area:k[0]*k[1]};P.setLayout(R),function t(e,n,i,a){if(!e.isRemoved()){var s,o,l=e.getLayout();s=l.width,o=l.height;var h=e.getModel(),d=h.get(g),y=h.get(f)/2,x=v(h),b=Math.max(d,x),w=d-y,M=b-y,h=e.getModel();e.setLayout({borderWidth:d,upperHeight:b,upperLabelHeight:x},!0);var _=(s=u(s-2*w,0))*(o=u(o-w-M,0)),A=function(t,e,n,i,a,s){var o,l,h=t.children||[],u=i.sort;"asc"!==u&&"desc"!==u&&(u=null);var c=null!=i.leafDepth&&i.leafDepth<=s;if(a&&!c)return t.viewChildren=[];o=h=r.filter(h,function(t){return!t.isRemoved()}),(l=u)&&o.sort(function(t,e){var n="asc"===l?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0===n?"asc"===l?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var d=function(t,e,n){for(var r,i=0,a=0,s=e.length;a<s;a++)i+=e[a].getValue();var o=t.get("visualDimension");if(e&&e.length)if("value"===o&&n)r=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&r.reverse();else{var r=[1/0,-1/0];p(e,function(t){var e=t.getValue(o);e<r[0]&&(r[0]=e),e>r[1]&&(r[1]=e)})}else r=[NaN,NaN];return{sum:i,dataExtent:r}}(e,h,u);if(0===d.sum||(d.sum=function(t,e,n,r,i){if(!r)return n;for(var a=t.get("visibleMin"),s=i.length,o=s,l=s-1;l>=0;l--){var h=i["asc"===r?s-l-1:l].getValue();h/n*e<a&&(o=l,n-=h)}return"asc"===r?i.splice(0,s-o):i.splice(o,s-o),n}(e,n,d.sum,u,h),0===d.sum))return t.viewChildren=[];for(var g=0,f=h.length;g<f;g++){var y=h[g].getValue()/d.sum*n;h[g].setLayout({area:y})}return c&&(h.length&&t.setLayout({isLeafRoot:!0},!0),h.length=0),t.viewChildren=h,t.setLayout({dataExtent:d.dataExtent},!0),h}(e,h,_,n,i,a);if(A.length){var S={x:w,y:M,width:s,height:o},C=c(s,o),I=1/0,P=[];P.area=0;for(var T=0,k=A.length;T<k;){var L=A[T];P.push(L),P.area+=L.getLayout().area;var D=function(t,e,n){for(var r,i=0,a=1/0,s=0,o=t.length;s<o;s++)(r=t[s].getLayout().area)&&(r<a&&(a=r),r>i&&(i=r));var l=t.area*t.area,h=e*e*n;return l?u(h*i/l,l/(h*a)):1/0}(P,C,n.squareRatio);D<=I?(T++,I=D):(P.area-=P.pop().getLayout().area,m(P,C,S,y,!1),C=c(S.width,S.height),P.length=P.area=0,I=1/0)}if(P.length&&m(P,C,S,y,!0),!i){var R=h.get("childrenVisibleMin");null!=R&&_<R&&(i=!0)}for(var T=0,k=A.length;T<k;T++)t(A[T],n,i,a+1)}}}(P,D,!1,0);var R=P.getLayout();p(T,function(t,e){var n=(T[e+1]||P).getValue();t.setLayout(r.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},R))})}var N=t.getData().tree.root;N.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var s=[a.width/2,a.height/2],o=i;o;){var l=o.getLayout();s[0]+=l.x,s[1]+=l.y,o=o.parentNode}return{x:t.width/2-s[0],y:t.height/2-s[1]}}(w,I,C),!0),t.setLayoutInfo(w),function t(e,n,r,a,s){var o=e.getLayout(),l=r[s],h=l&&l===e;if((!l||h)&&(s!==r.length||e===a)){e.setLayout({isInView:!0,invisible:!h&&!n.intersect(o),isAboveViewRoot:h},!0);var u=new i(n.x-o.x,n.y-o.y,n.width,n.height);p(e.viewChildren||[],function(e){t(e,u,r,a,s+1)})}}(N,new i(-w.x,-w.y,y,x),T,P,0)}}},1058:function(t,e,n){var r=n(95138),i=n(53453),a=n(66023),s=a.isArray,o="itemStyle";function l(t){var e=h(t,"color");if(e){var n=h(t,"colorAlpha"),r=h(t,"colorSaturation");return r&&(e=i.modifyHSL(e,null,null,r)),n&&(e=i.modifyAlpha(e,n)),e}}function h(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function u(t,e){var n=t.get(e);return s(n)&&n.length?{name:e,range:n}:null}t.exports={seriesType:"treemap",reset:function(t,e,n,s){var h=t.getData().tree,c=h.root,d=t.getModel(o);c.isRemoved()||function t(e,n,s,h,c,d){var p,g=e.getModel(),f=e.getLayout();if(f&&!f.invisible&&f.isInView){var y,x,m,v,b,w,M,_=e.getModel(o),A=(y=_,x=n,m=s[e.depth],v=h,b=a.extend({},x),a.each(["color","colorAlpha","colorSaturation"],function(t){var e=y.get(t,!0);null==e&&m&&(e=m[t]),null==e&&(e=x[t]),null==e&&(e=v.get(t)),null!=e&&(b[t]=e)}),b),S=_.get("borderColor"),C=_.get("borderColorSaturation");null!=C&&(w=C,S=null!=(M=p=l(A,e))?i.modifyHSL(M,null,null,w):null),e.setVisual("borderColor",S);var I=e.viewChildren;if(I&&I.length){var P=function(t,e,n,i,a,s){if(s&&s.length){var o=u(e,"color")||null!=a.color&&"none"!==a.color&&(u(e,"colorAlpha")||u(e,"colorSaturation"));if(o){var l=e.get("visualMin"),h=e.get("visualMax"),c=n.dataExtent.slice();null!=l&&l<c[0]&&(c[0]=l),null!=h&&h>c[1]&&(c[1]=h);var d=e.get("colorMappingBy"),p={type:o.name,dataExtent:c,visual:o.range};"color"===p.type&&("index"===d||"id"===d)?(p.mappingMethod="category",p.loop=!0):p.mappingMethod="linear";var g=new r(p);return g.__drColorMappingBy=d,g}}}(0,g,f,0,A,I);a.each(I,function(e,n){if(e.depth>=c.length||e===c[e.depth]){var r=function(t,e,n,r,i,s){var o=a.extend({},e);if(i){var l=i.type,h="color"===l&&i.__drColorMappingBy,u="index"===h?r:"id"===h?s.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));o[l]=i.mapValueToVisual(u)}return o}(g,A,e,n,P,d);t(e,r,s,h,c,d)}})}else p=l(A,e),e.setVisual("color",p)}}(c,{},a.map(h.levelModels,function(t){return t?t.get(o):null}),d,t.getViewRoot().getAncestors(),t)}}},66912:function(t,e,n){n(1748),n(86929)},95375:function(t,e,n){n(13452),n(73772)},86929:function(t,e,n){var r=n(66023),i=n(76165),a=n(27611),s=n(90516),o=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function l(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var r=t.coordToPoint([e[0],n]),i=t.coordToPoint([e[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function h(t){return+!t.getRadiusAxis().inverse}function u(t){var e=t[0],n=t[t.length-1];e&&n&&1e-4>Math.abs(Math.abs(e.coord-n.coord)-360)&&t.pop()}t.exports=s.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,a=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=r.map(n.getViewLabels(),function(t){var t=r.clone(t);return t.coord=n.dataToCoord(t.tickValue),t});u(l),u(s),r.each(o,function(e){t.get(e+".show")&&(!n.scale.isBlank()||"axisLine"===e)&&this["_"+e](t,i,s,a,l)},this)}},_axisLine:function(t,e,n,r){var a=t.getModel("axisLine.lineStyle"),s=new i.Circle({shape:{cx:e.cx,cy:e.cy,r:r[h(e)]},style:a.getLineStyle(),z2:1,silent:!0});s.style.fill=null,this.group.add(s)},_axisTick:function(t,e,n,a){var s=t.getModel("axisTick"),o=(s.get("inside")?-1:1)*s.get("length"),u=a[h(e)],c=r.map(n,function(t){return new i.Line({shape:l(e,[u,u+o],t.coord)})});this.group.add(i.mergePath(c,{style:r.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,n,s,o){var l=t.getCategories(!0),u=t.getModel("axisLabel"),c=u.get("margin");r.each(o,function(n,r){var o=u,d=n.tickValue,p=s[h(e)],g=e.coordToPoint([p+c,n.coord]),f=e.cx,y=e.cy,x=Math.abs(g[0]-f)/p<.3?"center":g[0]>f?"left":"right",m=Math.abs(g[1]-y)/p<.3?"middle":g[1]>y?"top":"bottom";l&&l[d]&&l[d].textStyle&&(o=new a(l[d].textStyle,u,u.ecModel));var v=new i.Text({silent:!0});this.group.add(v),i.setTextStyle(v.style,o,{x:g[0],y:g[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:x,textVerticalAlign:m})},this)},_splitLine:function(t,e,n,a){var s=t.getModel("splitLine").getModel("lineStyle"),o=s.get("color"),h=0;o=o instanceof Array?o:[o];for(var u=[],c=0;c<n.length;c++){var d=h++%o.length;u[d]=u[d]||[],u[d].push(new i.Line({shape:l(e,a,n[c].coord)}))}for(var c=0;c<u.length;c++)this.group.add(i.mergePath(u[c],{style:r.defaults({stroke:o[c%o.length]},s.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,n,a){if(n.length){var s=t.getModel("splitArea").getModel("areaStyle"),o=s.get("color"),l=0;o=o instanceof Array?o:[o];for(var h=[],u=Math.PI/180,c=-n[0].coord*u,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),g=t.get("clockwise"),f=1;f<n.length;f++){var y=l++%o.length;h[y]=h[y]||[],h[y].push(new i.Sector({shape:{cx:e.cx,cy:e.cy,r0:d,r:p,startAngle:c,endAngle:-n[f].coord*u,clockwise:g},silent:!0})),c=-n[f].coord*u}for(var f=0;f<h.length;f++)this.group.add(i.mergePath(h[f],{style:r.defaults({fill:o[f%o.length]},s.getAreaStyle()),silent:!0}))}}})},96972:function(t,e,n){var r=n(66023),i=r.retrieve,a=r.defaults,s=r.extend,o=r.each,l=n(20438),h=n(76165),u=n(27611),c=n(98763),d=c.isRadianAroundZero,p=c.remRadian,g=n(87557).createSymbol,f=n(36653),y=n(3265).applyTransform,x=n(16978).shouldShowAllLabels,m=Math.PI;function v(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}var b=function(t,e){this.opt=e,this.axisModel=t,a(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new h.Group;var n=new h.Group({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};b.prototype={constructor:b,hasBuilder:function(t){return!!w[t]},add:function(t){w[t].call(this)},getGroup:function(){return this.group}};var w={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),r=this._transform,i=[n[0],0],a=[n[1],0];r&&(y(i,i,r),y(a,a,r));var l=s({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new h.Line(h.subPixelOptimizeLine({anid:"line",shape:{x1:i[0],y1:i[1],x2:a[0],y2:a[1]},style:l,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var u=e.get("axisLine.symbol"),c=e.get("axisLine.symbolSize"),d=e.get("axisLine.symbolOffset")||0;if("number"==typeof d&&(d=[d,d]),null!=u){"string"==typeof u&&(u=[u,u]),("string"==typeof c||"number"==typeof c)&&(c=[c,c]);var p=c[0],f=c[1];o([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((i[0]-a[0])*(i[0]-a[0])+(i[1]-a[1])*(i[1]-a[1]))}],function(e,n){if("none"!==u[n]&&null!=u[n]){var r=g(u[n],-p/2,-f/2,p,f,l.stroke,!0),a=e.r+e.offset,s=[i[0]+a*Math.cos(t.rotation),i[1]-a*Math.sin(t.rotation)];r.attr({rotation:e.rotate,position:s,silent:!0,z2:11}),this.group.add(r)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var r=e.axis;if(!(!e.get("axisTick.show")||r.scale.isBlank())){for(var i=e.getModel("axisTick"),s=i.getModel("lineStyle"),o=i.get("length"),l=r.getTicksCoords(),u=[],c=[],d=t._transform,p=[],g=0;g<l.length;g++){var f=l[g].coord;u[0]=f,u[1]=0,c[0]=f,c[1]=n.tickDirection*o,d&&(y(u,u,d),y(c,c,d));var x=new h.Line(h.subPixelOptimizeLine({anid:"tick_"+l[g].tickValue,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:a(s.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(x),p.push(x)}return p}}(this,t,e),r=function(t,e,n){var r=e.axis;if(!(!i(n.axisLabelShow,e.get("axisLabel.show"))||r.scale.isBlank())){var a=e.getModel("axisLabel"),s=a.get("margin"),l=r.getViewLabels(),c=(i(n.labelRotate,a.get("rotate"))||0)*m/180,d=M(n.rotation,c,n.labelDirection),p=e.getCategories(!0),g=[],f=_(e),y=e.get("triggerEvent");return o(l,function(i,o){var l=i.tickValue,c=i.formattedLabel,x=i.rawLabel,m=a;p&&p[l]&&p[l].textStyle&&(m=new u(p[l].textStyle,a,e.ecModel));var b=m.getTextColor()||e.get("axisLine.lineStyle.color"),w=[r.dataToCoord(l),n.labelOffset+n.labelDirection*s],M=new h.Text({anid:"label_"+l,position:w,rotation:d.rotation,silent:f,z2:10});h.setTextStyle(M.style,m,{text:c,textAlign:m.getShallow("align",!0)||d.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||d.textVerticalAlign,textFill:"function"==typeof b?b("category"===r.type?x:"value"===r.type?l+"":l,o):b}),y&&(M.eventData=v(e),M.eventData.targetType="axisLabel",M.eventData.value=x),t._dumbGroup.add(M),M.updateTransform(),g.push(M),t.group.add(M),M.decomposeTransform()}),g}}(this,t,e);!function(t,e,n){if(!x(t.axis)){var r=t.get("axisLabel.showMinLabel"),i=t.get("axisLabel.showMaxLabel");n=n||[];var a=(e=e||[])[0],s=e[1],o=e[e.length-1],l=e[e.length-2],h=n[0],u=n[1],c=n[n.length-1],d=n[n.length-2];!1===r?(A(a),A(h)):S(a,s)&&(r?(A(s),A(u)):(A(a),A(h))),!1===i?(A(o),A(c)):S(l,o)&&(i?(A(l),A(d)):(A(o),A(c)))}}(t,r,n)},axisName:function(){var t,e,n=this.opt,r=this.axisModel,a=i(n.axisName,r.get("name"));if(a){var o,u,c,g,f,y,x,b,w,A=r.get("nameLocation"),S=n.nameDirection,I=r.getModel("nameTextStyle"),P=r.get("nameGap")||0,T=this.axisModel.axis.getExtent(),k=T[0]>T[1]?-1:1,L=["start"===A?T[0]-k*P:"end"===A?T[1]+k*P:(T[0]+T[1])/2,C(A)?n.labelOffset+S*P:0],D=r.get("nameRotate");null!=D&&(D=D*m/180),C(A)?t=M(n.rotation,null!=D?D:n.rotation,S):(o=n,u=A,c=D||0,g=T,x=p(c-o.rotation),b=g[0]>g[1],w="start"===u&&!b||"start"!==u&&b,d(x-m/2)?(y=w?"bottom":"top",f="center"):d(x-1.5*m)?(y=w?"top":"bottom",f="center"):(y="middle",f=x<1.5*m&&x>m/2?w?"left":"right":w?"right":"left"),t={rotation:x,textAlign:f,textVerticalAlign:y},null!=(e=n.axisNameAvailableWidth)&&(isFinite(e=Math.abs(e/Math.sin(t.rotation)))||(e=null)));var R=I.getFont(),N=r.get("nameTruncate",!0)||{},O=N.ellipsis,j=i(n.nameTruncateMaxWidth,N.maxWidth,e),E=null!=O&&null!=j?l.truncateText(a,j,R,O,{minChar:2,placeholder:N.placeholder}):a,V=r.get("tooltip",!0),B=r.mainType,z={componentType:B,name:a,$vars:["name"]};z[B+"Index"]=r.componentIndex;var F=new h.Text({anid:"name",__fullText:a,__truncatedText:E,position:L,rotation:t.rotation,silent:_(r),z2:1,tooltip:V&&V.show?s({content:a,formatter:function(){return a},formatterParams:z},V):null});h.setTextStyle(F.style,I,{text:E,textFont:R,textFill:I.getTextColor()||r.get("axisLine.lineStyle.color"),textAlign:t.textAlign,textVerticalAlign:t.textVerticalAlign}),r.get("triggerEvent")&&(F.eventData=v(r),F.eventData.targetType="axisName",F.eventData.name=a),this._dumbGroup.add(F),F.updateTransform(),this.group.add(F),F.decomposeTransform()}}},M=b.innerTextLayout=function(t,e,n){var r,i,a=p(e-t);return d(a)?(i=n>0?"top":"bottom",r="center"):d(a-m)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=a>0&&a<m?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:i}};function _(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function A(t){t&&(t.ignore=!0)}function S(t,e,n){var r=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(r&&i){var a=f.identity([]);return f.rotate(a,a,-t.rotation),r.applyTransform(f.mul([],a,t.getLocalTransform())),i.applyTransform(f.mul([],a,e.getLocalTransform())),r.intersect(i)}}function C(t){return"middle"===t||"center"===t}t.exports=b},90516:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(75475),a=r.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,r){this.axisPointerClass&&i.fixValue(t),a.superApply(this,"render",arguments),s(this,t,e,n,r,!0)},updateAxisPointer:function(t,e,n,r,i){s(this,t,e,n,r,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),a.superApply(this,"remove",arguments)},dispose:function(t,e){o(this,e),a.superApply(this,"dispose",arguments)}});function s(t,e,n,r,s,l){var h=a.getAxisPointerClass(t.axisPointerClass);if(h){var u=i.getAxisPointerModel(e);u?(t._axisPointer||(t._axisPointer=new h)).render(e,u,r,l):o(t,r)}}function o(t,e,n){var r=t._axisPointer;r&&r.dispose(e,n),t._axisPointer=null}var l=[];a.registerAxisPointerClass=function(t,e){l[t]=e},a.getAxisPointerClass=function(t){return t&&l[t]},t.exports=a},73772:function(t,e,n){var r=n(66023),i=n(76165),a=n(96972),s=n(90516),o=n(5592),l=["axisLine","axisTickLabel","axisName"],h=["splitArea","splitLine"],u=s.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,s){this.group.removeAll();var c=this._axisGroup;if(this._axisGroup=new i.Group,this.group.add(this._axisGroup),t.get("show")){var d=t.getCoordSysModel(),p=o.layout(d,t),g=new a(t,p);r.each(l,g.add,g),this._axisGroup.add(g.getGroup()),r.each(h,function(e){t.get(e+".show")&&this["_"+e](t,d)},this),i.groupTransition(c,this._axisGroup,t),u.superCall(this,"render",t,e,n,s)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitLine"),s=a.getModel("lineStyle"),o=s.get("color");o=r.isArray(o)?o:[o];for(var l=e.coordinateSystem.getRect(),h=n.isHorizontal(),u=0,c=n.getTicksCoords({tickModel:a}),d=[],p=[],g=s.getLineStyle(),f=0;f<c.length;f++){var y=n.toGlobalCoord(c[f].coord);h?(d[0]=y,d[1]=l.y,p[0]=y,p[1]=l.y+l.height):(d[0]=l.x,d[1]=y,p[0]=l.x+l.width,p[1]=y);var x=u++%o.length,m=c[f].tickValue;this._axisGroup.add(new i.Line(i.subPixelOptimizeLine({anid:null!=m?"line_"+c[f].tickValue:null,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:r.defaults({stroke:o[x]},g),silent:!0})))}}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitArea"),s=a.getModel("areaStyle"),o=s.get("color"),l=e.coordinateSystem.getRect(),h=n.getTicksCoords({tickModel:a,clamp:!0});if(h.length){var u=o.length,c=this._splitAreaColors,d=r.createHashMap(),p=0;if(c)for(var g=0;g<h.length;g++){var f=c.get(h[g].tickValue);if(null!=f){p=(f+(u-1)*g)%u;break}}var y=n.toGlobalCoord(h[0].coord),x=s.getAreaStyle();o=r.isArray(o)?o:[o];for(var g=1;g<h.length;g++){var m,v,b,w,M=n.toGlobalCoord(h[g].coord);n.isHorizontal()?(m=y,v=l.y,b=M-m,w=l.height,y=m+b):(m=l.x,v=y,b=l.width,w=M-v,y=v+w);var _=h[g-1].tickValue;null!=_&&d.set(_,p),this._axisGroup.add(new i.Rect({anid:null!=_?"area_"+_:null,shape:{x:m,y:v,width:b,height:w},style:r.defaults({fill:o[p]},x),silent:!0})),p=(p+1)%u}this._splitAreaColors=d}}}});u.extend({type:"xAxis"}),u.extend({type:"yAxis"})},43608:function(t,e,n){var r=n(47475),i=n(66023),a=n(96972),s=n(40844),o=n(58143),l=n(76165),h=["axisLine","axisTickLabel","axisName"],u=r.extendComponentView({type:"parallelAxis",init:function(t,e){u.superApply(this,"init",arguments),(this._brushController=new s(e.getZr())).on("brush",i.bind(this._onBrush,this))},render:function(t,e,n,r){var s,o,u;if(s=t,o=e,!(u=r)||"axisAreaSelect"!==u.type||o.findComponents({mainType:"parallelAxis",query:u})[0]!==s){this.axisModel=t,this.api=n,this.group.removeAll();var c=this._axisGroup;if(this._axisGroup=new l.Group,this.group.add(this._axisGroup),t.get("show")){var d,p=(d=t,e.getComponent("parallel",d.get("parallelIndex"))),g=p.coordinateSystem,f=t.getAreaSelectStyle(),y=f.width,x=t.axis.dim,m=g.getAxisLayout(x),v=i.extend({strokeContainThreshold:y},m),b=new a(t,v);i.each(h,b.add,b),this._axisGroup.add(b.getGroup()),this._refreshBrushController(v,f,t,p,y,n);var w=r&&!1===r.animation?null:t;l.groupTransition(c,this._axisGroup,w)}}},_refreshBrushController:function(t,e,n,r,a,s){var h,u,c=n.axis.getExtent(),d=c[1]-c[0],p=Math.min(30,.1*Math.abs(d)),g=l.BoundingRect.create({x:c[0],y:-a/2,width:d,height:a});g.x-=p,g.width+=2*p,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:o.makeRectPanelClipPath(g),isTargetByCursor:o.makeRectIsTargetByCursor(g,s,r),getLinearBrushOtherExtent:o.makeLinearBrushOtherExtent(g,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((u=(h=n).axis,i.map(h.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[u.dataToCoord(t[0],!0),u.dataToCoord(t[1],!0)]}})))},_onBrush:function(t,e){var n=this.axisModel,r=n.axis,a=i.map(t,function(t){return[r.coordToData(t.range[0],!0),r.coordToData(t.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});t.exports=u},74353:function(t,e,n){var r=n(66023),i=n(76165),a=n(96972),s=n(90516),o=["axisLine","axisTickLabel","axisName"],l=["splitLine","splitArea"];t.exports=s.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n,i,s,h=t.axis,u=h.polar,c=u.getAngleAxis(),d=h.getTicksCoords(),p=c.getExtent()[0],g=h.getExtent(),f=(n=u,i=t,s=p,{position:[n.cx,n.cy],rotation:s/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:i.getModel("axisLabel").get("rotate"),z2:1}),y=new a(t,f);r.each(o,y.add,y),this.group.add(y.getGroup()),r.each(l,function(e){t.get(e+".show")&&!h.scale.isBlank()&&this["_"+e](t,u,p,g,d)},this)}},_splitLine:function(t,e,n,a,s){var o=t.getModel("splitLine").getModel("lineStyle"),l=o.get("color"),h=0;l=l instanceof Array?l:[l];for(var u=[],c=0;c<s.length;c++){var d=h++%l.length;u[d]=u[d]||[],u[d].push(new i.Circle({shape:{cx:e.cx,cy:e.cy,r:s[c].coord},silent:!0}))}for(var c=0;c<u.length;c++)this.group.add(i.mergePath(u[c],{style:r.defaults({stroke:l[c%l.length],fill:null},o.getLineStyle()),silent:!0}))},_splitArea:function(t,e,n,a,s){if(s.length){var o=t.getModel("splitArea").getModel("areaStyle"),l=o.get("color"),h=0;l=l instanceof Array?l:[l];for(var u=[],c=s[0].coord,d=1;d<s.length;d++){var p=h++%l.length;u[p]=u[p]||[],u[p].push(new i.Sector({shape:{cx:e.cx,cy:e.cy,r0:c,r:s[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=s[d].coord}for(var d=0;d<u.length;d++)this.group.add(i.mergePath(u[d],{style:r.defaults({fill:l[d%l.length]},o.getAreaStyle()),silent:!0}))}}})},13389:function(t,e,n){var r=n(66023),i=n(96972),a=n(76165),s=n(42897),o=n(90516),l=["axisLine","axisTickLabel","axisName"],h="splitLine",u=o.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,a){var o=this.group;o.removeAll();var c=s.layout(t),d=new i(t,c);r.each(l,d.add,d),o.add(d.getGroup()),t.get(h+".show")&&this["_"+h](t),u.superCall(this,"render",t,e,n,a)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),i=r.get("width"),s=r.get("color");s=s instanceof Array?s:[s];for(var o=t.coordinateSystem.getRect(),l=e.isHorizontal(),h=[],u=0,c=e.getTicksCoords({tickModel:n}),d=[],p=[],g=0;g<c.length;++g){var f=e.toGlobalCoord(c[g].coord);l?(d[0]=f,d[1]=o.y,p[0]=f,p[1]=o.y+o.height):(d[0]=o.x,d[1]=f,p[0]=o.x+o.width,p[1]=f);var y=u++%s.length;h[y]=h[y]||[],h[y].push(new a.Line(a.subPixelOptimizeLine({shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:{lineWidth:i},silent:!0})))}for(var g=0;g<h.length;++g)this.group.add(a.mergePath(h[g],{style:{stroke:s[g%s.length],lineDash:r.getLineDash(i),lineWidth:i},silent:!0}))}}});t.exports=u},22947:function(t,e,n){var r=n(47475);r.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})})},57498:function(t,e,n){var r=n(47475),i=n(66023),a=n(75475),s=n(92782);n(54574),n(65328),n(46576),r.registerPreprocessor(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!i.isArray(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=a.collect(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},s)},54574:function(t,e,n){t.exports=n(47475).extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}})},65328:function(t,e,n){var r=n(47475),i=n(21774),a=r.extendComponentView({type:"axisPointer",render:function(t,e,n){var r=e.getComponent("tooltip"),a=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";i.register("axisPointer",n,function(t,e,n){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){i.unregister(e.getZr(),"axisPointer"),a.superApply(this._model,"remove",arguments)},dispose:function(t,e){i.unregister("axisPointer",e),a.superApply(this._model,"dispose",arguments)}});t.exports=a},4167:function(t,e,n){var r=n(66023),i=n(51938),a=n(76165),s=n(75475),o=n(3006),l=n(44050),h=(0,n(70018).makeInner)(),u=r.clone,c=r.bind;function d(){}function p(t,e,n,i){!function t(e,n){if(!(r.isObject(e)&&r.isObject(n)))return e===n;var i=!0;return r.each(n,function(n,r){i=i&&t(e[r],n)}),!!i}(h(n).lastProp,i)&&(h(n).lastProp=i,e?a.updateProps(n,i,t):(n.stopAnimation(),n.attr(i)))}function g(t,e){t[e.get("label.show")?"show":"hide"]()}function f(t){return{position:t.position.slice(),rotation:t.rotation||0}}function y(t,e,n){var r=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=i&&(t.zlevel=i),t.silent=n)})}d.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var s=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==s||this._lastStatus!==o){this._lastValue=s,this._lastStatus=o;var l=this._group,h=this._handle;if(!o||"hide"===o){l&&l.hide(),h&&h.hide();return}l&&l.show(),h&&h.show();var u={};this.makeElOption(u,s,t,e,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(t,e);if(l){var g=r.curry(p,e,d);this.updatePointerEl(l,u,g,e),this.updateLabelEl(l,u,g,e)}else l=this._group=new a.Group,this.createPointerEl(l,u,t,e),this.createLabelEl(l,u,t,e),n.getZr().add(l);y(l,e,!0),this._renderHandle(s)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),r=t.axis,i="category"===r.type,a=e.get("snap");if(!a&&!i)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(i&&r.getBandWidth()>o)return!0;if(a){var l=s.getAxisInfo(t).seriesDataCount,h=r.getExtent();return Math.abs(h[0]-h[1])/l>o}return!1}return!0===n},makeElOption:function(t,e,n,r,i){},createPointerEl:function(t,e,n,r){var i=e.pointer;if(i){var s=h(t).pointerEl=new a[i.type](u(e.pointer));t.add(s)}},createLabelEl:function(t,e,n,r){if(e.label){var i=h(t).labelEl=new a.Rect(u(e.label));t.add(i),g(i,r)}},updatePointerEl:function(t,e,n){var r=h(t).pointerEl;r&&(r.setStyle(e.pointer.style),n(r,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,r){var i=h(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{shape:e.label.shape,position:e.label.position}),g(i,r))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),s=this._handle,h=n.getModel("handle"),u=n.get("status");if(!h.get("show")||!u||"hide"===u){s&&i.remove(s),this._handle=null;return}this._handle||(e=!0,s=this._handle=a.createIcon(h.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){o.stop(t.event)},onmousedown:c(this._onHandleDragMove,this,0,0),drift:c(this._onHandleDragMove,this),ondragend:c(this._onHandleDragEnd,this)}),i.add(s)),y(s,n,!1),s.setStyle(h.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var d=h.get("size");r.isArray(d)||(d=[d,d]),s.attr("scale",[d[0]/2,d[1]/2]),l.createOrUpdate(this,"_doDispatchAxisPointer",h.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){p(this._axisPointerModel,!e&&this._moveAnimation,this._handle,f(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(f(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(f(r)),h(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,r=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),r&&e.remove(r),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}},d.prototype.constructor=d,i.enableClassExtend(d),t.exports=d},46576:function(t,e,n){var r=n(76165),i=n(4167),a=n(50272),s=n(5592),o=n(90516),l=i.extend({makeElOption:function(t,e,n,r,i){var o=n.axis,l=o.grid,c=r.get("type"),d=h(l,o).getOtherAxis(o).getGlobalExtent(),p=o.toGlobalCoord(o.dataToCoord(e,!0));if(c&&"none"!==c){var g=a.buildElStyle(r),f=u[c](o,p,d,g);f.style=g,t.graphicKey=f.type,t.pointer=f}var y=s.layout(l.model,n);a.buildCartesianSingleLabelElOption(e,t,y,n,r,i)},getHandleTransform:function(t,e,n){var r=s.layout(e.axis.grid.model,e,{labelInside:!1});return r.labelMargin=n.get("handle.margin"),{position:a.getTransformedPosition(e.axis,t,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,r){var i=n.axis,a=i.grid,s=i.getGlobalExtent(!0),o=h(a,i).getOtherAxis(i).getGlobalExtent(),l=+("x"!==i.dim),u=t.position;u[l]+=e[l],u[l]=Math.min(s[1],u[l]),u[l]=Math.max(s[0],u[l]);var c=(o[1]+o[0])/2,d=[c,c];return d[l]=u[l],{position:u,rotation:t.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function h(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var u={line:function(t,e,n,i){var s=a.makeLineShape([e,n[0]],[e,n[1]],c(t));return r.subPixelOptimizeLine({shape:s,style:i}),{type:"Line",shape:s}},shadow:function(t,e,n,r){var i=Math.max(1,t.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:a.makeRectShape([e-i/2,n[0]],[i,s],c(t))}}};function c(t){return+("x"!==t.dim)}o.registerAxisPointerClass("CartesianAxisPointer",l),t.exports=l},81745:function(t,e,n){var r=n(20438),i=n(4167),a=n(76165),s=n(50272),o=n(36653),l=n(96972),h=n(90516),u=i.extend({makeElOption:function(t,e,n,i,h){var u,d=n.axis;"angle"===d.dim&&(this.animationThreshold=Math.PI/18);var p=d.polar,g=p.getOtherAxis(d).getExtent();u=d["dataTo"+r.capitalFirst(d.dim)](e);var f=i.get("type");if(f&&"none"!==f){var y=s.buildElStyle(i),x=c[f](d,p,u,g,y);x.style=y,t.graphicKey=x.type,t.pointer=x}var m=function(t,e,n,r,i){var s,h,u,c=e.axis,d=c.dataToCoord(t),p=r.getAngleAxis().getExtent()[0];p=p/180*Math.PI;var g=r.getRadiusAxis().getExtent();if("radius"===c.dim){var f=o.create();o.rotate(f,f,p),o.translate(f,f,[r.cx,r.cy]),s=a.applyTransform([d,-i],f);var y=e.getModel("axisLabel").get("rotate")||0,x=l.innerTextLayout(p,y*Math.PI/180,-1);h=x.textAlign,u=x.textVerticalAlign}else{var m=g[1];s=r.coordToPoint([m+i,d]);var v=r.cx,b=r.cy;h=Math.abs(s[0]-v)/m<.3?"center":s[0]>v?"left":"right",u=Math.abs(s[1]-b)/m<.3?"middle":s[1]>b?"top":"bottom"}return{position:s,align:h,verticalAlign:u}}(e,n,0,p,i.get("label.margin"));s.buildLabelElOption(t,n,i,h,m)}}),c={line:function(t,e,n,r,i){return"angle"===t.dim?{type:"Line",shape:s.makeLineShape(e.coordToPoint([r[0],n]),e.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,r,i){var a=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:s.makeSectorShape(e.cx,e.cy,r[0],r[1],(-n-a/2)*o,(-n+a/2)*o)}:{type:"Sector",shape:s.makeSectorShape(e.cx,e.cy,n-a/2,n+a/2,0,2*Math.PI)}}};h.registerAxisPointerClass("PolarAxisPointer",u),t.exports=u},77858:function(t,e,n){var r=n(76165),i=n(4167),a=n(50272),s=n(42897),o=n(90516),l=["x","y"],h=["width","height"],u=i.extend({makeElOption:function(t,e,n,r,i){var o=n.axis,l=o.coordinateSystem,h=p(l,1-d(o)),u=l.dataToPoint(e)[0],g=r.get("type");if(g&&"none"!==g){var f=a.buildElStyle(r),y=c[g](o,u,h,f);y.style=f,t.graphicKey=y.type,t.pointer=y}var x=s.layout(n);a.buildCartesianSingleLabelElOption(e,t,x,n,r,i)},getHandleTransform:function(t,e,n){var r=s.layout(e,{labelInside:!1});return r.labelMargin=n.get("handle.margin"),{position:a.getTransformedPosition(e.axis,t,r),rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,r){var i=n.axis,a=i.coordinateSystem,s=d(i),o=p(a,s),l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var h=p(a,1-s),u=(h[1]+h[0])/2,c=[u,u];return c[s]=l[s],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),c={line:function(t,e,n,i){var s=a.makeLineShape([e,n[0]],[e,n[1]],d(t));return r.subPixelOptimizeLine({shape:s,style:i}),{type:"Line",shape:s}},shadow:function(t,e,n,r){var i=t.getBandWidth(),s=n[1]-n[0];return{type:"Rect",shape:a.makeRectShape([e-i/2,n[0]],[i,s],d(t))}}};function d(t){return+!t.isHorizontal()}function p(t,e){var n=t.getRect();return[n[l[e]],n[l[e]]+n[h[e]]]}o.registerAxisPointerClass("SingleAxisPointer",u),t.exports=u},92782:function(t,e,n){var r=n(66023),i=n(70018).makeInner,a=n(75475),s=n(28693),o=r.each,l=r.curry,h=i();function u(t,e,n,i,a){var s=t.axis;if(!s.scale.isBlank()&&s.containData(e)){if(!t.involveSeries)return void n.showPointer(t,e);var l,h,u,c,d,p,g,f,y=(l=e,c=(u=(h=t).axis).dim,d=l,p=[],g=Number.MAX_VALUE,f=-1,o(h.seriesModels,function(t,e){var n,r,i=t.getData().mapDimension(c,!0);if(t.getAxisTooltipData){var a=t.getAxisTooltipData(i,l,u);r=a.dataIndices,n=a.nestestValue}else{if(!(r=t.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;n=t.getData().get(i[0],r[0])}if(null!=n&&isFinite(n)){var s=l-n,h=Math.abs(s);h<=g&&((h<g||s>=0&&f<0)&&(g=h,f=s,d=n,p.length=0),o(r,function(e){p.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:p,snapToValue:d}),x=y.payloadBatch,m=y.snapToValue;x[0]&&null==a.seriesIndex&&r.extend(a,x[0]),!i&&t.snap&&s.containData(m)&&null!=m&&(e=m),n.showPointer(t,e,x,a),n.showTooltip(t,y,m)}}function c(t,e,n,r){t[e.key]={value:n,payloadBatch:r}}function d(t,e,n,r){var i=n.payloadBatch,s=e.axis,o=s.model,l=e.axisPointerModel;if(e.triggerTooltip&&i.length){var h=e.coordSys.model,u=a.makeKey(h),c=t.map[u];c||(c=t.map[u]={coordSysId:h.id,coordSysIndex:h.componentIndex,coordSysType:h.type,coordSysMainType:h.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:s.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:l.get("label.precision"),formatter:l.get("label.formatter")},seriesDataIndices:i.slice()})}}function p(t){var e=t.axis.model,n={},r=n.axisDim=t.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=e.componentIndex,n.axisName=n[r+"AxisName"]=e.name,n.axisId=n[r+"AxisId"]=e.id,n}function g(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}t.exports=function(t,e,n){var i=t.currTrigger,a=[t.x,t.y],f=t.dispatchAction||r.bind(n.dispatchAction,n),y=e.getComponent("axisPointer").coordSysAxesInfo;if(y){g(a)&&(a=s({seriesIndex:t.seriesIndex,dataIndex:t.dataIndex},e).point);var x,m,v,b,w,M,_,A,S,C,I,P,T=g(a),k=t.axesInfo,L=y.axesInfo,D="leave"===i||g(a),R={},N={},O={list:[],map:{}},j={showPointer:l(c,N),showTooltip:l(d,O)};o(y.coordSysMap,function(t,e){var n=T||t.containPoint(a);o(y.coordSysAxesInfo[e],function(t,e){var r=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var r=t[n];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}(k,t);if(!D&&n&&(!k||i)){var s=i&&i.value;null!=s||T||(s=r.pointToData(a)),null!=s&&u(t,s,j,!1,R)}})});var E={};return o(L,function(t,e){var n=t.linkGroup;n&&!N[e]&&o(n.axesInfo,function(e,r){var i=N[r];if(e!==t&&i){var a=i.value;n.mapper&&(a=t.axis.scale.parse(n.mapper(a,p(e),p(t)))),E[t.key]=a}})}),o(E,function(t,e){u(L[e],t,j,!0,R)}),x=N,m=L,v=R.axesInfo=[],o(m,function(t,e){var n=t.axisPointerModel.option,r=x[e];r?(t.useHandle||(n.status="show"),n.value=r.value,n.seriesDataIndices=(r.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&v.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,r){if(g(e)||!t.list.length)return r({type:"hideTip"});var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}(O,a,t,f),b=L,w=0,_=(M=n).getZr(),A="axisPointerLastHighlights",S=h(_)[A]||{},C=h(_)[A]={},o(b,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&o(n.seriesDataIndices,function(t){C[t.seriesIndex+" | "+t.dataIndex]=t})}),I=[],P=[],r.each(S,function(t,e){C[e]||P.push(t)}),r.each(C,function(t,e){S[e]||I.push(t)}),P.length&&M.dispatchAction({type:"downplay",escapeConnect:!0,batch:P}),I.length&&M.dispatchAction({type:"highlight",escapeConnect:!0,batch:I}),R}}},28693:function(t,e,n){var r=n(66023),i=n(70018);t.exports=function(t,e){var n,a=[],s=t.seriesIndex;if(null==s||!(n=e.getSeriesByIndex(s)))return{point:[]};var o=n.getData(),l=i.queryDataIndex(o,t);if(null==l||l<0||r.isArray(l))return{point:[]};var h=o.getItemGraphicEl(l),u=n.coordinateSystem;if(n.getTooltipPosition)a=n.getTooltipPosition(l)||[];else if(u&&u.dataToPoint)a=u.dataToPoint(o.getValues(r.map(u.dimensions,function(t){return o.mapDimension(t)}),l,!0))||[];else if(h){var c=h.getBoundingRect().clone();c.applyTransform(h.transform),a=[c.x+c.width/2,c.y+c.height/2]}return{point:a,el:h}}},21774:function(t,e,n){var r=n(66023),i=n(57674),a=(0,n(70018).makeInner)(),s=r.each;function o(t,e,n){t.handler("leave",null,n)}function l(t,e,n,r){e.handler(t,n,r)}e.register=function(t,e,n){if(!i.node){var h=e.getZr();a(h).records||(a(h).records={}),function(t,e){a(t).initialized||(a(t).initialized=!0,n("click",r.curry(l,"click")),n("mousemove",r.curry(l,"mousemove")),n("globalout",o));function n(n,r){t.on(n,function(n){var i,o,l,h,u,c,d,p,g=(i=e,o={showTip:[],hideTip:[]},{dispatchAction:l=function(t){var e=o[t.type];e?e.push(t):(t.dispatchAction=l,i.dispatchAction(t))},pendings:o});s(a(t).records,function(t){t&&r(t,n,g.dispatchAction)}),h=g.pendings,u=e,d=h.showTip.length,p=h.hideTip.length,d?c=h.showTip[d-1]:p&&(c=h.hideTip[p-1]),c&&(c.dispatchAction=null,u.dispatchAction(c))})}}(h,e),(a(h).records[t]||(a(h).records[t]={})).handler=n}},e.unregister=function(t,e){if(!i.node){var n=e.getZr();(a(n).records||{})[t]&&(a(n).records[t]=null)}}},75475:function(t,e,n){var r=n(66023),i=n(27611),a=r.each,s=r.curry;function o(t,e){return"all"===t||r.isArray(t)&&r.indexOf(t,e)>=0||t===e}function l(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[u(t)]}function h(t){return!!t.get("handle.show")}function u(t){return t.type+"||"+t.id}e.collect=function(t,e){var n,l,c,d,p,g,f,y={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return n=y,l=t,c=e,d=l.getComponent("tooltip"),g=(p=l.getComponent("axisPointer")).get("link",!0)||[],f=[],a(c.getCoordinateSystems(),function(t){if(t.axisPointerEnabled){var e=u(t.model),c=n.coordSysAxesInfo[e]={};n.coordSysMap[e]=t;var y=t.model.getModel("tooltip",d);if(a(t.getAxes(),s(b,!1,null)),t.getTooltipAxes&&d&&y.get("show")){var x="axis"===y.get("trigger"),m="cross"===y.get("axisPointer.type"),v=t.getTooltipAxes(y.get("axisPointer.axis"));(x||m)&&a(v.baseAxes,s(b,!m||"cross",x)),m&&a(v.otherAxes,s(b,"cross",!1))}}function b(e,s,d){var x=d.model.getModel("axisPointer",p),m=x.get("show");if(m&&("auto"!==m||e||h(x))){null==s&&(s=x.get("triggerTooltip"));var v=(x=e?function(t,e,n,s,o,l){var h=e.getModel("axisPointer"),u={};a(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){u[t]=r.clone(h.get(t))}),u.snap="category"!==t.type&&!!l,"cross"===h.get("type")&&(u.type="line");var c=u.label||(u.label={});if(null==c.show&&(c.show=!1),"cross"===o){var d=h.get("label.show");if(c.show=null==d||d,!l){var p=u.lineStyle=h.get("crossStyle");p&&r.defaults(c,p.textStyle)}}return t.model.getModel("axisPointer",new i(u,n,s))}(d,y,p,l,e,s):x).get("snap"),b=u(d.model),w=s||v||"category"===d.type,M=n.axesInfo[b]={key:b,axis:d,coordSys:t,axisPointerModel:x,triggerTooltip:s,involveSeries:w,snap:v,useHandle:h(x),seriesModels:[]};c[b]=M,n.seriesInvolved|=w;var _=function(t,e){for(var n=e.model,r=e.dim,i=0;i<t.length;i++){var a=t[i]||{};if(o(a[r+"AxisId"],n.id)||o(a[r+"AxisIndex"],n.componentIndex)||o(a[r+"AxisName"],n.name))return i}}(g,d);if(null!=_){var A=f[_]||(f[_]={axesInfo:{}});A.axesInfo[b]=M,A.mapper=g[_].mapper,M.linkGroup=A}}}}),y.seriesInvolved&&function(t,e){e.eachSeries(function(e){var n=e.coordinateSystem,r=e.get("tooltip.trigger",!0),i=e.get("tooltip.show",!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==e.get("axisPointer.show",!0)&&a(t.coordSysAxesInfo[u(n.model)],function(t){var r=t.axis;n.getAxis(r.dim)===r&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}(y,t),y},e.fixValue=function(t){var e=l(t);if(e){var n=e.axisPointerModel,r=e.axis.scale,i=n.option,a=n.get("status"),s=n.get("value");null!=s&&(s=r.parse(s));var o=h(n);null==a&&(i.status=o?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==s||s>u[1])&&(s=u[1]),s<u[0]&&(s=u[0]),i.value=s,o&&(i.status=e.axis.scale.isBlank()?"hide":"show")}},e.getAxisInfo=l,e.getAxisPointerModel=function(t){var e=l(t);return e&&e.axisPointerModel},e.makeKey=u},50272:function(t,e,n){var r=n(66023),i=n(76165),a=n(99280),s=n(20438),o=n(36653),l=n(16978),h=n(96972);function u(t,e,n,r,i){var o,l,h,u,d,p,g=c(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),f=n.getModel("label"),y=s.normalizeCssArray(f.get("padding")||0),x=f.getFont(),m=a.getBoundingRect(g,x),v=i.position,b=m.width+y[1]+y[3],w=m.height+y[0]+y[2],M=i.align;"right"===M&&(v[0]-=b),"center"===M&&(v[0]-=b/2);var _=i.verticalAlign;"bottom"===_&&(v[1]-=w),"middle"===_&&(v[1]-=w/2),o=v,l=b,h=w,d=(u=r).getWidth(),p=u.getHeight(),o[0]=Math.min(o[0]+l,d)-l,o[1]=Math.min(o[1]+h,p)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0);var A=f.get("backgroundColor");A&&"auto"!==A||(A=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:b,height:w,r:f.get("borderRadius")},position:v.slice(),style:{text:g,textFont:x,textFill:f.getTextColor(),textPosition:"inside",fill:A,stroke:f.get("borderColor")||"transparent",lineWidth:f.get("borderWidth")||0,shadowBlur:f.get("shadowBlur"),shadowColor:f.get("shadowColor"),shadowOffsetX:f.get("shadowOffsetX"),shadowOffsetY:f.get("shadowOffsetY")},z2:10}}function c(t,e,n,i,a){t=e.scale.parse(t);var s=e.scale.getLabel(t,{precision:a.precision}),o=a.formatter;if(o){var h={value:l.getAxisRawValue(e,t),seriesData:[]};r.each(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),r=t.dataIndexInside,i=e&&e.getDataParams(r);i&&h.seriesData.push(i)}),r.isString(o)?s=o.replace("{value}",s):r.isFunction(o)&&(s=o(h))}return s}function d(t,e,n){var r=o.create();return o.rotate(r,r,n.rotation),o.translate(r,r,n.position),i.applyTransform([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}e.buildElStyle=function(t){var e,n=t.get("type"),r=t.getModel(n+"Style");return"line"===n?(e=r.getLineStyle()).fill=null:"shadow"===n&&((e=r.getAreaStyle()).stroke=null),e},e.buildLabelElOption=u,e.getValueLabel=c,e.getTransformedPosition=d,e.buildCartesianSingleLabelElOption=function(t,e,n,r,i,a){var s=h.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get("label.margin"),u(e,r,i,a,{position:d(r.axis,t,n),align:s.textAlign,verticalAlign:s.textVerticalAlign})},e.makeLineShape=function(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}},e.makeRectShape=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},e.makeSectorShape=function(t,e,n,r,i,a){return{cx:t,cy:e,r0:n,r:r,startAngle:i,endAngle:a,clockwise:!0}}},16348:function(t,e,n){var r=n(47475),i=n(43635);n(69417),n(25519),n(93630),n(8320),n(50443),r.registerPreprocessor(i)},25519:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(49002),s=n(27611),o=["#ddd"];function l(t,e){return i.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new s(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}t.exports=r.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;e||a.replaceVisualOption(n,t,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:o},r.hasOwnProperty("liftZ")||(r.liftZ=5)},setAreas:function(t){t&&(this.areas=i.map(t,function(t){return l(this.option,t)},this))},setBrushOption:function(t){this.brushOption=l(this.option,t),this.brushType=this.brushOption.brushType}})},93630:function(t,e,n){var r=n(47475),i=n(66023),a=n(40844);function s(t,e,n,r){r&&r.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}t.exports=r.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new a(e.getZr())).on("brush",i.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,s.apply(this,arguments)},updateTransform:s,updateView:s,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i.clone(t),$from:n})}})},8320:function(t,e,n){var r=n(47475);r.registerAction({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},function(){})},43635:function(t,e,n){var r=n(66023),i=["rect","polygon","keep","clear"];t.exports=function(t,e){var n=t&&t.brush;if(r.isArray(n)||(n=n?[n]:[]),n.length){var a,s,o=[];r.each(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(o=o.concat(e))});var l=t&&t.toolbox;r.isArray(l)&&(l=l[0]),l||(t.toolbox=[l={feature:{}}]);var h=l.feature||(l.feature={}),u=h.brush||(h.brush={}),c=u.type||(u.type=[]);c.push.apply(c,o),a=c,s={},r.each(a,function(t){s[t]=1}),a.length=0,r.each(s,function(t,e){a.push(e)}),e&&!c.length&&c.push.apply(c,i)}}},86128:function(t,e,n){var r=n(76703),i=n(71497);function a(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,r){if(e){var i=r.range;return s(e[t],i)}},rect:function(r,i,a){if(r){var o=a.range,l=[r[e[t]],r[e[t]]+r[n[t]]];return l[1]<l[0]&&l.reverse(),s(l[0],o)||s(l[1],o)||s(o[0],l)||s(o[1],l)}}}}function s(t,e){return e[0]<=t&&t<=e[1]}function o(t,e,n,r,i){for(var a=0,s=i[i.length-1];a<i.length;a++){var o=i[a];if(function(t,e,n,r,i,a,s,o){var l,h=function(t,e,n,r){return t*r-e*n}(n-t,i-s,r-e,a-o);if((l=h)<=1e-6&&l>=-1e-6)return!1;var u=function(t,e,n,r){return t*r-e*n}(i-t,i-s,a-e,a-o)/h;if(u<0||u>1)return!1;var c=function(t,e,n,r){return t*r-e*n}(n-t,i-t,r-e,a-e)/h;return!(c<0)&&!(c>1)}(t,e,n,r,o[0],o[1],s[0],s[1]))return!0;s=o}}function l(t,e,n,r){return t*r-e*n}t.exports={lineX:a(0),lineY:a(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&r.contain(n.range,t[0],t[1])},rect:function(t,e,n){var a=n.range;if(!t||a.length<=1)return!1;var s=t.x,l=t.y,h=t.width,u=t.height,c=a[0];if(r.contain(a,s,l)||r.contain(a,s+h,l)||r.contain(a,s,l+u)||r.contain(a,s+h,l+u)||i.create(t).contain(c[0],c[1])||o(s,l,s+h,l,a)||o(s,l,s,l+u,a)||o(s+h,l,s+h,l+u,a)||o(s,l+u,s+h,l+u,a))return!0}}}},69417:function(t,e,n){var r=n(47475),i=n(66023),a=n(71497),s=n(49002),o=n(86128),l=n(44050),h=n(30170),u=["inBrush","outOfBrush"],c="__ecBrushSelect",d="__ecInBrushSelectEvent",p=r.PRIORITY.VISUAL.BRUSH;function g(t,e){if(!t.isDisposed()){var n=t.getZr();n[d]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[d]=!1}}function f(t,e,n,r){for(var i=0,a=e.length;i<a;i++){var s=e[i];if(t[s.brushType](r,n,s.selectors,s))return!0}}function y(t){var e=t.brushSelector;if(i.isString(e)){var n=[];return i.each(o,function(t,r){n[r]=function(n,r,i,a){var s=r.getItemLayout(n);return t[e](s,i,a)}}),n}if(i.isFunction(e)){var r={};return i.each(o,function(t,n){r[n]=e}),r}return e}r.registerLayout(p,function(t,e,n){t.eachComponent({mainType:"brush"},function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1}),(e.brushTargetManager=new h(e.option,t)).setInputRanges(e.areas,t)})}),r.registerVisual(p,function(t,e,n){var r,a,h=[];t.eachComponent({mainType:"brush"},function(e,n){var l={brushId:e.id,brushIndex:n,brushName:e.name,areas:i.clone(e.areas),selected:[]};h.push(l);var c=e.option,d=c.brushLink,p=[],g=[],m=[],v=0;n||(r=c.throttleType,a=c.throttleDelay);var b=i.map(e.areas,function(t){var e,n;return n=(e=i.defaults({boundingRect:x[t.brushType](t)},t)).selectors={},i.each(o[e.brushType],function(t,r){n[r]=function(r){return t(r,n,e)}}),e}),w=s.createVisualMappings(e.option,u,function(t){t.mappingMethod="fixed"});function M(t){return"all"===d||p[t]}function _(t){return!!t.length}i.isArray(d)&&i.each(d,function(t){p[t]=1}),t.eachSeries(function(n,r){var a,s,o,l=m[r]=[];"parallel"===n.subType?(a=n,s=r,o=a.coordinateSystem,v|=o.hasAxisBrushed(),M(s)&&o.eachActiveState(a.getData(),function(t,e){"active"===t&&(g[e]=1)})):function(n,r,a){var s,o,l,h=y(n);if(!(!h||(s=e,o=r,null!=(l=s.option.seriesIndex)&&"all"!==l&&(i.isArray(l)?0>i.indexOf(l,o):o!==l)))&&(i.each(b,function(r){h[r.brushType]&&e.brushTargetManager.controlSeries(r,n,t)&&a.push(r),v|=_(a)}),M(r)&&_(a))){var u=n.getData();u.each(function(t){f(h,a,u,t)&&(g[t]=1)})}}(n,r,l)}),t.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};l.selected.push(n);var r=y(t),i=m[e],a=t.getData(),o=M(e)?function(t){return g[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return f(r,i,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(M(e)?v:_(i))&&s.applyVisual(u,w,a,o)})}),function(t,e,n,r,i){if(i){var a=t.getZr();a[d]||(a[c]||(a[c]=g),l.createOrUpdate(a,c,n,e)(t,r))}}(e,r,a,h,n)});var x={lineX:i.noop,lineY:i.noop,rect:function(t){return m(t.range)},polygon:function(t){for(var e,n=t.range,r=0,i=n.length;r<i;r++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=n[r];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&m(e)}};function m(t){return new a(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}},13074:function(t,e,n){n(93779),n(82834),n(80697)},80697:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165),s=n(20438),o=n(98763),l={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},h={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};t.exports=r.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,n){var r=this.group;r.removeAll();var i=t.coordinateSystem,a=i.getRangeInfo(),s=i.getOrient();this._renderDayRect(t,a,r),this._renderLines(t,a,s,r),this._renderYearText(t,a,s,r),this._renderMonthText(t,s,r),this._renderWeekText(t,a,s,r)},_renderDayRect:function(t,e,n){for(var r=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),s=r.getCellWidth(),o=r.getCellHeight(),l=e.start.time;l<=e.end.time;l=r.getNextNDay(l,1).time){var h=r.dataToRect([l],!1).tl,u=new a.Rect({shape:{x:h[0],y:h[1],width:s,height:o},cursor:"default",style:i});n.add(u)}},_renderLines:function(t,e,n,r){var i=this,a=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),o=t.get("splitLine.show"),l=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=a.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=a.getDateInfo(c)}function d(e){i._firstDayOfMonth.push(a.getDateInfo(e)),i._firstDayPoints.push(a.dataToRect([e],!1).tl);var l=i._getLinePointsOfOneWeek(t,e,n);i._tlpoints.push(l[0]),i._blpoints.push(l[l.length-1]),o&&i._drawSplitline(l,s,r)}d(a.getNextNDay(e.end.time,1).formatedDate),o&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,n),s,r),o&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,n),s,r)},_getEdgesPoints:function(t,e,n){var r=[t[0].slice(),t[t.length-1].slice()],i=+("horizontal"!==n);return r[0][i]=r[0][i]-e/2,r[1][i]=r[1][i]+e/2,r},_drawSplitline:function(t,e,n){var r=new a.Polyline({z2:20,shape:{points:t},style:e});n.add(r)},_getLinePointsOfOneWeek:function(t,e,n){var r=t.coordinateSystem;e=r.getDateInfo(e);for(var i=[],a=0;a<7;a++){var s=r.getNextNDay(e.time,a),o=r.dataToRect([s.time],!1);i[2*s.day]=o.tl,i[2*s.day+1]=o["horizontal"===n?"bl":"tr"]}return i},_formatterLabel:function(t,e){return"string"==typeof t&&t?s.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,r,i){e=e.slice();var a=["center","bottom"];"bottom"===r?(e[1]+=i,a=["center","top"]):"left"===r?e[0]-=i:"right"===r?(e[0]+=i,a=["center","top"]):e[1]-=i;var s=0;return("left"===r||"right"===r)&&(s=Math.PI/2),{rotation:s,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,r){var i=t.getModel("yearLabel");if(i.get("show")){var s=i.get("margin"),o=i.get("position");o||(o="horizontal"!==n?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(l[0][0]+l[1][0])/2,u=(l[0][1]+l[1][1])/2,c=+("horizontal"!==n),d={top:[h,l[c][1]],bottom:[h,l[1-c][1]],left:[l[1-c][0],u],right:[l[c][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var g=i.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},y=this._formatterLabel(g,f),x=new a.Text({z2:30});a.setTextStyle(x.style,i,{text:y}),x.attr(this._yearTextPositionControl(x,d[o],n,o,s)),r.add(x)}},_monthTextPositionControl:function(t,e,n,r,i){var a="left",s="top",o=t[0],l=t[1];return"horizontal"===n?(l+=i,e&&(a="center"),"start"===r&&(s="bottom")):(o+=i,e&&(s="middle"),"start"===r&&(a="right")),{x:o,y:l,textAlign:a,textVerticalAlign:s}},_renderMonthText:function(t,e,n){var r=t.getModel("monthLabel");if(r.get("show")){var s=r.get("nameMap"),o=r.get("margin"),h=r.get("position"),u=r.get("align"),c=[this._tlpoints,this._blpoints];i.isString(s)&&(s=l[s.toUpperCase()]||[]);var d=+("start"!==h),p=+("horizontal"!==e);o="start"===h?-o:o;for(var g="center"===u,f=0;f<c[d].length-1;f++){var y=c[d][f].slice(),x=this._firstDayOfMonth[f];if(g){var m=this._firstDayPoints[f];y[p]=(m[p]+c[0][f+1][p])/2}var v=r.get("formatter"),b=s[+x.m-1],w={yyyy:x.y,yy:(x.y+"").slice(2),MM:x.m,M:+x.m,nameMap:b},M=this._formatterLabel(v,w),_=new a.Text({z2:30});i.extend(a.setTextStyle(_.style,r,{text:M}),this._monthTextPositionControl(y,g,e,h,o)),n.add(_)}}},_weekTextPositionControl:function(t,e,n,r,i){var a="center",s="middle",o=t[0],l=t[1],h="start"===n;return"horizontal"===e?(o=o+r+(h?1:-1)*i[0]/2,a=h?"right":"left"):(l=l+r+(h?1:-1)*i[1]/2,s=h?"bottom":"top"),{x:o,y:l,textAlign:a,textVerticalAlign:s}},_renderWeekText:function(t,e,n,r){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),d=s.get("margin"),p=l.getFirstDayOfWeek();i.isString(c)&&(c=h[c.toUpperCase()]||[]);var g=l.getNextNDay(e.end.time,7-e.lweek).time,f=[l.getCellWidth(),l.getCellHeight()];d=o.parsePercent(d,f[+("horizontal"!==n)]),"start"===u&&(g=l.getNextNDay(e.start.time,-(7+e.fweek)).time,d=-d);for(var y=0;y<7;y++){var x=l.getNextNDay(g,y),m=l.dataToRect([x.time],!1).center,v=y;v=Math.abs((y+p)%7);var b=new a.Text({z2:30});i.extend(a.setTextStyle(b.style,s,{text:c[v]}),this._weekTextPositionControl(m,n,u,d,f)),r.add(b)}}}})},86782:function(t,e,n){n(48663),n(94715),n(21390),n(15610),n(55373),n(8727),n(38532),n(58417),n(13554)},46896:function(t,e,n){var r=n(66023),i=n(98763),a=n(24154),s=r.each,o=i.asc,l=function(t,e,n,r){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=r,this._dataZoomModel=n};function h(t,e){var n=t.getAxisModel(),r=t._percentWindow,a=t._valueWindow;if(r){var s=i.getPixelPrecision(a,[0,500]);s=Math.min(s,20);var o=e||0===r[0]&&100===r[1];n.setRange(o?null:+a[0].toFixed(s),o?null:+a[1].toFixed(s))}}l.prototype={constructor:l,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(n){if(a.isCoordSupported(n.get("coordinateSystem"))){var r=this._dimName,i=e.queryComponents({mainType:r+"Axis",index:n.get(r+"AxisIndex"),id:n.get(r+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(n)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,n,r=this._dimName,i=this.ecModel,a=this.getAxisModel();return"x"===r||"y"===r?(e="gridIndex",t="x"===r?"y":"x"):(e="polarIndex",t="angle"===r?"radius":"angle"),i.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return r.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,n=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),a=[0,100],l=[t.start,t.end],h=[];return s(["startValue","endValue"],function(e){h.push(null!=t[e]?n.parse(t[e]):null)}),s([0,1],function(t){var s=h[t],o=l[t];"percent"===r[t]?(null==o&&(o=a[t]),s=n.parse(i.linearMap(o,a,e,!0))):o=i.linearMap(s,e,a,!0),h[t]=s,l[t]=o}),{valueWindow:o(h),percentWindow:o(l)}},reset:function(t){if(t===this._dataZoomModel){var e,n,r,a,o,l,u,c,d,p,g,f,y,x=this.getTargetSeriesModels();this._dataExtent=(e=this,n=this._dimName,r=[1/0,-1/0],s(x,function(t){var e=t.getData();e&&s(e.mapDimension(n,!0),function(t){var n=e.getApproximateExtent(t);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}),r[1]<r[0]&&(r=[NaN,NaN]),a=e,o=r,u=(l=a.getAxisModel()).getMin(!0),d=(c="category"===l.get("type"))&&l.getCategories().length,null!=u&&"dataMin"!==u&&"function"!=typeof u?o[0]=u:c&&(o[0]=d>0?0:NaN),null!=(p=l.getMax(!0))&&"dataMax"!==p&&"function"!=typeof p?o[1]=p:c&&(o[1]=d>0?d-1:NaN),!l.get("scale",!0)&&(o[0]>0&&(o[0]=0),o[1]<0&&(o[1]=0)),r);var m=this.calculateDataWindow(t.option);this._valueWindow=m.valueWindow,this._percentWindow=m.percentWindow,g=this,f=g._minMaxSpan={},y=g._dataZoomModel,s(["min","max"],function(t){f[t+"Span"]=y.get(t+"Span");var e=y.get(t+"ValueSpan");if(null!=e&&(f[t+"ValueSpan"]=e,null!=(e=g.getAxisModel().axis.scale.parse(e)))){var n=g._dataExtent;f[t+"Span"]=i.linearMap(n[0]+e,n,[0,100],!0)}}),h(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,h(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=t.get("filterMode"),a=this._valueWindow;"none"!==i&&s(r,function(t){var e=t.getData(),r=e.mapDimension(n,!0);r.length&&("weakFilter"===i?e.filterSelf(function(t){for(var n,i,s,o=0;o<r.length;o++){var l=e.get(r[o],t),h=!isNaN(l),u=l<a[0],c=l>a[1];if(h&&!u&&!c)return!0;h&&(s=!0),u&&(n=!0),c&&(i=!0)}return s&&n&&i}):s(r,function(n){if("empty"===i)t.setData(e.map(n,function(t){var e;return(e=t)>=a[0]&&e<=a[1]?t:NaN}));else{var r={};r[n]=a,e.selectRange(r)}}),s(r,function(t){e.setApproximateExtent(a,t)}))})}}},t.exports=l},94715:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(57674),s=n(70018),o=n(24154),l=n(46896),h=i.each,u=o.eachAxisDim;function c(t){var e={};return h(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}function d(t,e){var n=t._rangePropMode,r=t.get("rangeMode");h([["start","startValue"],["end","endValue"]],function(t,i){var a=null!=e[t[0]],s=null!=e[t[1]];a&&!s?n[i]="percent":!a&&s?n[i]="value":r?n[i]=r[i]:a&&(n[i]="percent")})}t.exports=r.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var r=c(t);this.mergeDefaultAndTheme(t,n),this.doInit(r)},mergeOption:function(t){var e=c(t);i.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;a.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),d(this,t),h([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,n,r,i){var a=this.dependentModels[e.axis][n],s=a.__dzAxisProxy||(a.__dzAxisProxy=new l(e.name,n,this,i));t[e.name+"_"+n]=s},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();u(function(e){var n=e.axisIndex;t[n]=s.normalizeToArray(t[n])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;u(function(n){null!=t[n.axisIndex]&&(e=!0)},this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),n=this.option,r=this.dependentModels;if(t){var a="vertical"===e?"y":"x";r[a+"Axis"].length?(n[a+"AxisIndex"]=[0],t=!1):h(r.singleAxis,function(r){t&&r.get("orient",!0)===e&&(n.singleAxisIndex=[r.componentIndex],t=!1)})}t&&u(function(e){if(t){var r=[],i=this.dependentModels[e.axis];if(i.length&&!r.length)for(var a=0,s=i.length;a<s;a++)"category"===i[a].get("type")&&r.push(a);n[e.axisIndex]=r,r.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&u(function(e){var r=n[e.axisIndex],a=t.get(e.axisIndex),s=t.get(e.axisId);a=t.ecModel.queryComponents({mainType:e.axis,index:a,id:s})[0].componentIndex,0>i.indexOf(r,a)&&r.push(a)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){t||(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var n=!0;return u(function(r){var i=t.get(r.axisIndex),a=this.dependentModels[r.axis][i];a&&a.get("type")===e||(n=!1)},this),n},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return u(function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}},this),t},eachTargetAxis:function(t,e){var n=this.ecModel;u(function(r){h(this.get(r.axisIndex),function(i){t.call(e,r,i,this,n)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t,e){var n=this.option;h([["start","startValue"],["end","endValue"]],function(e){(null!=t[e[0]]||null!=t[e[1]])&&(n[e[0]]=t[e[0]],n[e[1]]=t[e[1]])},this),e||d(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}})},21390:function(t,e,n){t.exports=n(11648).extend({type:"dataZoom",render:function(t,e,n,r){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,n={};return t.eachTargetAxis(function(t,r){var i=e.getComponent(t.axis,r);if(i){var a=i.getCoordSysModel();a&&function(t,e,n,r){for(var i,a=0;a<n.length;a++)if(n[a].model===t){i=n[a];break}i||n.push(i={model:t,axisModels:[],coordIndex:r}),i.axisModels.push(e)}(a,i,n[a.mainType]||(n[a.mainType]=[]),a.componentIndex)}},this),n}})},8727:function(t,e,n){t.exports=n(94715).extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}})},38532:function(t,e,n){var r=n(66023),i=n(21390),a=n(28542),s=n(47055),o=r.bind,l=i.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,n,i){l.superApply(this,"render",arguments),this._range=t.getPercentRange(),r.each(this.getTargetCoordInfo(),function(e,i){var a=r.map(e,function(t){return s.generateCoordId(t.model)});r.each(e,function(e){var l=e.model,u={};r.each(["pan","zoom","scrollMove"],function(t){u[t]=o(h[t],this,e,i)},this),s.register(n,{coordId:s.generateCoordId(l),allCoordIds:a,containsPoint:function(t,e,n){return l.coordinateSystem.containPoint([e,n])},dataZoomId:t.id,dataZoomModel:t,getRange:u})},this)},this)},dispose:function(){s.unregister(this.api,this.dataZoomModel.id),l.superApply(this,"dispose",arguments),this._range=null}}),h={zoom:function(t,e,n,r){var i=this._range,s=i.slice(),o=t.axisModels[0];if(o){var l=c[e](null,[r.originX,r.originY],o,n,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(s[1]-s[0])+s[0],u=Math.max(1/r.scale,0);s[0]=(s[0]-h)*u+h,s[1]=(s[1]-h)*u+h;var d=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(a(0,s,[0,100],0,d.minSpan,d.maxSpan),this._range=s,i[0]!==s[0]||i[1]!==s[1])return s}},pan:u(function(t,e,n,r,i,a){var s=c[r]([a.oldX,a.oldY],[a.newX,a.newY],e,i,n);return s.signal*(t[1]-t[0])*s.pixel/s.pixelLength}),scrollMove:u(function(t,e,n,r,i,a){return c[r]([0,0],[a.scrollDelta,a.scrollDelta],e,i,n).signal*(t[1]-t[0])*a.scrollDelta})};function u(t){return function(e,n,r,i){var s=this._range,o=s.slice(),l=e.axisModels[0];if(l&&(a(t(o,l,e,n,r,i),o,[0,100],"all"),this._range=o,s[0]!==o[0]||s[1]!==o[1]))return o}}var c={grid:function(t,e,n,r,i){var a=n.axis,s={},o=i.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s},polar:function(t,e,n,r,i){var a=n.axis,s={},o=i.model.coordinateSystem,l=o.getRadiusAxis().getExtent(),h=o.getAngleAxis().getExtent();return t=t?o.pointToCoord(t):[0,0],e=o.pointToCoord(e),"radiusAxis"===n.mainType?(s.pixel=e[0]-t[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=h[1]-h[0],s.pixelStart=h[0],s.signal=a.inverse?-1:1),s},singleAxis:function(t,e,n,r,i){var a=n.axis,s=i.model.coordinateSystem.getRect(),o={};return t=t||[0,0],"horizontal"===a.orient?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o}};t.exports=l},5781:function(t,e,n){t.exports=n(94715).extend({type:"dataZoom.select"})},82467:function(t,e,n){t.exports=n(21390).extend({type:"dataZoom.select"})},15610:function(t,e,n){t.exports=n(94715).extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}})},55373:function(t,e,n){var r=n(66023),i=n(3006),a=n(76165),s=n(44050),o=n(21390),l=n(98763),h=n(68006),u=n(28542),c=a.Rect,d=l.linearMap,p=l.asc,g=r.bind,f=r.each,y="horizontal",x="vertical",m=["line","bar","candlestick","scatter"],v=o.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,r){if(v.superApply(this,"render",arguments),s.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1===this.dataZoomModel.get("show"))return void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()},remove:function(){v.superApply(this,"remove",arguments),s.clear(this,"_dispatchZoomAction")},dispose:function(){v.superApply(this,"dispose",arguments),s.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new a.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},a=this._orient===y?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},s=h.getLayoutParams(t.option);r.each(["right","top","width","height"],function(t){"ph"===s[t]&&(s[t]=a[t])});var o=h.getLayoutRect(s,i,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===x&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),a=this._displayables.barGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n!==y||i?n===y&&i?{scale:s?[-1,1]:[-1,-1]}:n!==x||i?{scale:s?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:s?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:s?[1,1]:[1,-1]});var o=t.getBoundingRect([a]);t.attr("position",[e.x-o.x,e.y-o.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new c({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new c({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:r.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var n=this._size,i=e.series,s=i.getRawData(),o=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=o){var l=s.getDataExtent(o),h=(l[1]-l[0])*.3;l=[l[0]-h,l[1]+h];var u=[0,n[1]],c=[0,n[0]],p=[[n[0],0],[0,0]],g=[],f=c[1]/(s.count()-1),y=0,x=Math.round(s.count()/n[0]);s.each([o],function(e,n){if(x>0&&n%x){y+=f;return}var r=null==e||isNaN(e)||""===e,i=r?0:d(e,l,u,!0);r&&!t&&n?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!r&&t&&(p.push([y,0]),g.push([y,0])),p.push([y,i]),g.push([y,i]),y+=f,t=r});var m=this.dataZoomModel;this._displayables.barGroup.add(new a.Polygon({shape:{points:p},style:r.defaults({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new a.Polyline({shape:{points:g},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t,e=this.dataZoomModel,n=e.get("showDataShadow");if(!1!==n){var i=this.ecModel;return e.eachTargetAxis(function(a,s){var o=e.getAxisProxy(a.name,s).getTargetSeriesModels();r.each(o,function(e){if(!t&&!(!0!==n&&0>r.indexOf(m,e.get("type")))){var o,l=i.getComponent(a.axis,s).axis,h={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],u=e.coordinateSystem;null!=h&&u.getOtherAxis&&(o=u.getOtherAxis(l).inverse),h=e.getData().mapDimension(h),t={thisAxis:l,series:e,thisDim:a.name,otherDim:h,otherAxisInverse:o}}},this)},this),t}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],n=t.handleLabels=[],r=this._displayables.barGroup,s=this._size,o=this.dataZoomModel;r.add(t.filler=new c({draggable:!0,cursor:b(this._orient),drift:g(this._onDragMove,this,"all"),onmousemove:function(t){i.stop(t.event)},ondragstart:g(this._showDataInfo,this,!0),ondragend:g(this._onDragEnd,this),onmouseover:g(this._showDataInfo,this,!0),onmouseout:g(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),r.add(new c(a.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:s[0],height:s[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),f([0,1],function(t){var s=a.createIcon(o.get("handleIcon"),{cursor:b(this._orient),draggable:!0,drift:g(this._onDragMove,this,t),onmousemove:function(t){i.stop(t.event)},ondragend:g(this._onDragEnd,this),onmouseover:g(this._showDataInfo,this,!0),onmouseout:g(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),h=s.getBoundingRect();this._handleHeight=l.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=h.width/h.height*this._handleHeight,s.setStyle(o.getModel("handleStyle").getItemStyle());var u=o.get("handleColor");null!=u&&(s.style.fill=u),r.add(e[t]=s);var c=o.textStyleModel;this.group.add(n[t]=new a.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:c.getTextColor(),textFont:c.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[d(t[0],[0,100],e,!0),d(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];u(e,r,i,n.get("zoomLock")?"all":t,null!=a.minSpan?d(a.minSpan,s,i,!0):null,null!=a.maxSpan?d(a.maxSpan,s,i,!0):null);var o=this._range,l=this._range=p([d(r[0],i,s,!0),d(r[1],i,s,!0)]);return!o||o[0]!==l[0]||o[1]!==l[1]},_updateView:function(t){var e=this._displayables,n=this._handleEnds,r=p(n.slice()),i=this._size;f([0,1],function(t){var r=e.handles[t],a=this._handleHeight;r.attr({scale:[a/2,a/2],position:[n[t],i[1]/2-a/2]})},this),e.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,s=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var l=o.getAxisModel().axis,h=this._range,u=t?o.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:o.getDataValueWindow();s=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=p(this._handleEnds.slice());function d(t){var e=a.getTransform(n.handles[t].parent,this.group),o=a.transformDirection(0===t?"right":"left",e),l=this._handleWidth/2+5,h=a.applyTransform([c[t]+(0===t?-l:l),this._size[1]/2],e);r[t].setStyle({x:h[0],y:h[1],textVerticalAlign:i===y?"middle":o,textAlign:i===y?o:"center",text:s[t]})}d.call(this,0),d.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),a=n.get("labelPrecision");(null==a||"auto"===a)&&(a=e.getPixelPrecision());var s=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return r.isFunction(i)?i(t,s):r.isString(i)?i.replace("{value}",s):s},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;var r=this._displayables.barGroup.getLocalTransform(),i=a.applyTransform([e,n],r,!0),s=this._updateInterval(t,i[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),s&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0)&&!(n[0]>e[0])&&!(n[1]<0)&&!(n[1]>e[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval("all",n[0]-i);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(f(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}}),!t){var e=this.api.getWidth(),n=this.api.getHeight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});function b(t){return"vertical"===t?"ns-resize":"ew-resize"}t.exports=v},13554:function(t,e,n){var r=n(47475),i=n(66023),a=n(24154);r.registerAction("dataZoom",function(t,e){var n=a.createLinkedNodesFinder(i.bind(e.eachComponent,e,"dataZoom"),a.eachAxisDim,function(t,e){return t.get(e.axisIndex)}),r=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){r.push.apply(r,n(t).nodes)}),i.each(r,function(e,n){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})},58417:function(t,e,n){var r=n(47475),i=n(66023),a=i.createHashMap,s=i.each;r.registerProcessor({getTargetSeries:function(t){var e=a();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,r){s(r.getAxisProxy(t.name,n).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,r){r.getAxisProxy(t.name,n).reset(r,e)}),t.eachTargetAxis(function(t,n,r){r.getAxisProxy(t.name,n).filterData(r,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),r=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]},!0)})}})},24154:function(t,e,n){var r=n(66023),i=n(20438),a=["cartesian2d","polar","singleAxis"];function s(t,e){t=t.slice();var n=r.map(t,i.capitalFirst);e=(e||[]).slice();var a=r.map(e,i.capitalFirst);return function(i,s){r.each(t,function(t,r){for(var o={name:t,capital:n[r]},l=0;l<e.length;l++)o[e[l]]=t+a[l];i.call(s,o)})}}var o=s(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);e.isCoordSupported=function(t){return r.indexOf(a,t)>=0},e.createNameEach=s,e.eachAxisDim=o,e.createLinkedNodesFinder=function(t,e,n){return function(a){var s,o={nodes:[],records:{}};if(e(function(t){o.records[t.name]={}}),!a)return o;i(a,o);do s=!1,t(l);while(s);function l(t){var a,l,h,u,c;a=t,l=o,!(r.indexOf(l.nodes,a)>=0)&&(h=t,u=o,c=!1,e(function(t){r.each(n(h,t)||[],function(e){u.records[t.name][e]&&(c=!0)})}),c)&&(i(t,o),s=!0)}return o};function i(t,i){i.nodes.push(t),e(function(e){r.each(n(t,e)||[],function(t){i.records[e.name][t]=!0})})}}},18058:function(t,e,n){var r=n(66023).each,i="\0_ec_hist_store";function a(t){var e=t[i];return e||(e=t[i]=[{}]),e}e.push=function(t,e){var n=a(t);r(e,function(e,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(a){var s=a.getPercentRange();n[0][r]={dataZoomId:r,start:s[0],end:s[1]}}}}),n.push(e)},e.pop=function(t){var e=a(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return r(n,function(t,n){for(var r=e.length-1;r>=0;r--){var t=e[r][n];if(t){i[n]=t;break}}}),i},e.clear=function(t){t[i]=null},e.count=function(t){return a(t).length}},47055:function(t,e,n){var r=n(66023),i=n(84275),a=n(44050),s="\0_ec_dataZoom_roams";function o(t){var e=t.getZr();return e[s]||(e[s]={})}function l(t){r.each(t,function(e,n){e.count||(e.controller.dispose(),delete t[n])})}function h(t,e){t.dispatchAction({type:"dataZoom",batch:e})}e.register=function(t,e){var n,s,u,c,d,p,g,f,y=o(t),x=e.dataZoomId,m=e.coordId;r.each(y,function(t,n){var i=t.dataZoomInfos;i[x]&&0>r.indexOf(e.allCoordIds,m)&&(delete i[x],t.count--)}),l(y);var v=y[m];v||((v=y[m]={coordId:m,dataZoomInfos:{},count:0}).controller=(n=t,s=v,u=new i(n.getZr()),r.each(["pan","zoom","scrollMove"],function(t){u.on(t,function(e){var n=[];r.each(s.dataZoomInfos,function(r){if(e.isAvailableBehavior(r.dataZoomModel.option)){var i=(r.getRange||{})[t],a=i&&i(s.controller,e);!r.dataZoomModel.get("disabled",!0)&&a&&n.push({dataZoomId:r.dataZoomId,start:a[0],end:a[1]})}}),n.length&&s.dispatchAction(n)})}),u),v.dispatchAction=r.curry(h,t)),!v.dataZoomInfos[x]&&v.count++,v.dataZoomInfos[x]=e;var b=(c=v.dataZoomInfos,p="type_",g={type_true:2,type_move:1,type_false:0,type_undefined:-1},f=!0,r.each(c,function(t){var e=t.dataZoomModel,n=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");g[p+n]>g[p+d]&&(d=n),f&=e.get("preventDefaultMouseMove",!0)}),{controlType:d,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!f}});v.controller.enable(b.controlType,b.opt),v.controller.setPointerChecker(e.containsPoint),a.createOrUpdate(v,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")},e.unregister=function(t,e){var n=o(t);r.each(n,function(t){t.controller.dispose();var n=t.dataZoomInfos;n[e]&&(delete n[e],t.count--)}),l(n)},e.generateCoordId=function(t){return t.type+"\0_"+t.id}},48663:function(t,e,n){n(76056).registerSubTypeDefaulter("dataZoom",function(){return"slider"})},34683:function(t,e,n){n(48663),n(94715),n(21390),n(5781),n(82467),n(58417),n(13554)},62295:function(t,e,n){var r=n(76056),i=n(11648),a=n(4522).detectSourceFormat,s=n(38237).SERIES_LAYOUT_BY_COLUMN;r.extend({type:"dataset",defaultOption:{seriesLayoutBy:s,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){a(this)}}),i.extend({type:"dataset"})},39857:function(t,e,n){var r=n(47475),i=n(66023);function a(t,e){e.update="updateView",r.registerAction(e,function(e,n){var r={};return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name);var a=n.coordinateSystem;i.each(a.regions,function(t){r[t.name]=n.isSelected(t.name)||!1})}),{selected:r,name:e.name}})}n(10649),n(85605),n(89980),n(74911),a("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),a("select",{type:"geoSelect",event:"geoselected"}),a("unSelect",{type:"geoUnSelect",event:"geounselected"})},89980:function(t,e,n){var r=n(88142);t.exports=n(47475).extendComponentView({type:"geo",init:function(t,e){var n=new r(e,!0);this._mapDraw=n,this.group.add(n.group)},render:function(t,e,n,r){if(!r||"geoToggleSelect"!==r.type||r.from!==this.uid){var i=this._mapDraw;t.get("show")?i.draw(t,e,n,this,r):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}})},76901:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(70018),s=n(76165),o=n(68006);r.registerPreprocessor(function(t){var e=t.graphic;i.isArray(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var l=r.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,l.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,r=(e?n:t).elements,s=n.elements=e?[]:n.elements,l=[];this._flatten(r,l);var h=a.mappingToExists(s,l);a.makeIdAndName(h);var u=this._elOptionsToUpdate=[];i.each(h,function(t,e){var n,r,a,l,h,d,p,g,f=t.option;f&&(u.push(f),function(t,e){var n=t.exist;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var r=e.parentOption;r?e.parentId=r.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,f),n=s,r=e,a=f,l=i.extend({},a),h=n[r],"merge"===(d=a.$action||"merge")?h?(i.merge(h,l,!0),o.mergeLayoutParam(h,l,{ignoreSize:!0}),o.copyLayoutParams(a,h)):n[r]=l:"replace"===d?n[r]=l:"remove"===d&&h&&(n[r]=null),p=s[e],g=f,p&&(p.hv=g.hv=[c(g,["left","right"]),c(g,["top","bottom"])],"group"===p.type&&(null==p.width&&(p.width=g.width=0),null==p.height&&(p.height=g.height=0))))},this);for(var d=s.length-1;d>=0;d--)null==s[d]?s.splice(d,1):delete s[d].$action},_flatten:function(t,e,n){i.each(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var r=t.children;"group"===t.type&&r&&this._flatten(r,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function h(t,e,n,r){var i=n.type,a=new s[i.charAt(0).toUpperCase()+i.slice(1)](n);e.add(a),r.set(t,a),a.__ecGraphicId=t}function u(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){u(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function c(t,e){var n;return i.each(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}r.extendComponentView({type:"graphic",init:function(t,e){this._elMap=i.createHashMap(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,r=this.group;i.each(e,function(e){var a,s,l,c,d,p=e.$action,g=e.id,f=n.get(g),y=e.parentId,x=null!=y?n.get(y):r,m=e.style;"text"===e.type&&m&&(e.hv&&e.hv[1]&&(m.textVerticalAlign=m.textBaseline=null),!m.hasOwnProperty("textFill")&&m.fill&&(m.textFill=m.fill),!m.hasOwnProperty("textStroke")&&m.stroke&&(m.textStroke=m.stroke));var v=(a=e,a=i.extend({},a),i.each(["id","parentId","$action","hv","bounding"].concat(o.LOCATION_PARAMS),function(t){delete a[t]}),a);p&&"merge"!==p?"replace"===p?(u(f,n),h(g,x,v,n)):"remove"===p&&u(f,n):f?f.attr(v):h(g,x,v,n);var b=n.get(g);b&&(b.__ecGraphicWidth=e.width,b.__ecGraphicHeight=e.height,s=b,l=t,c=0,d=s.eventData,s.silent||s.ignore||d||(d=s.eventData={componentType:"graphic",componentIndex:l.componentIndex,name:s.name}),d&&(d.info=s.info))})}},_relocate:function(t,e){for(var n=t.option.elements,r=this.group,i=this._elMap,a=n.length-1;a>=0;a--){var s=n[a],l=i.get(s.id);if(l){var h=l.parent,u=h===r?{width:e.getWidth(),height:e.getHeight()}:{width:h.__ecGraphicWidth||0,height:h.__ecGraphicHeight||0};o.positionElement(l,s,u,null,{hv:s.hv,boundingMode:s.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){u(e,t)}),this._elMap=i.createHashMap()},dispose:function(){this._clear()}})},25761:function(t,e,n){n(31372),n(46576),n(57498)},31372:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165);n(34087),n(95375),r.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new a.Rect({shape:t.coordinateSystem.getRect(),style:i.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})},40844:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(56177),a=n(76165),s=n(75319),o=n(13593),l=r.curry,h=r.each,u=r.map,c=Math.min,d=Math.max,p=Math.pow,g="globalPan",f={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},y={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},x={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},m=0;function v(t){i.call(this),this._zr=t,this.group=new a.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+m++,this._handlers={},h(q,function(t,e){this._handlers[e]=r.bind(t,this)},this)}function b(t,e){var n=Z[e.brushType].createCover(t,e);return n.__brushOption=e,_(n,e),t.group.add(n),n}function w(t,e){var n=S(e);return n.endCreating&&(n.endCreating(t,e),_(e,e.__brushOption)),e}function M(t,e){var n=e.__brushOption;S(e).updateCoverShape(t,e,n.range,n)}function _(t,e){var n=e.z;null==n&&(n=1e4),t.traverse(function(t){t.z=n,t.z2=n})}function A(t,e){S(e).updateCommon(t,e),M(t,e)}function S(t){return Z[t.__brushOption.brushType]}function C(t,e,n){var r,i=t._panels;if(!i)return!0;var a=t._transform;return h(i,function(t){t.isTargetByCursor(e,n,a)&&(r=t)}),r}function I(t,e){var n=t._panels;if(!n)return!0;var r=e.__brushOption.panelId;return null==r||n[r]}function P(t){var e=t._covers,n=e.length;return h(e,function(e){t.group.remove(e)},t),e.length=0,!!n}function T(t,e){var n=u(t._covers,function(t){var e=t.__brushOption,n=r.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function k(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function L(t,e,n,r){var i=new a.Group;return i.add(new a.Rect({name:"main",style:O(n),silent:!0,draggable:!0,cursor:"move",drift:l(t,e,i,"nswe"),ondragend:l(T,e,{isEnd:!0})})),h(r,function(n){i.add(new a.Rect({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:l(t,e,i,n),ondragend:l(T,e,{isEnd:!0})}))}),i}function D(t,e,n,r){var i=r.brushStyle.lineWidth||0,a=d(i,6),s=n[0][0],o=n[1][0],l=s-i/2,h=o-i/2,u=n[0][1],c=n[1][1],p=u-a+i/2,g=c-a+i/2,f=u-s,y=c-o,x=f+i,m=y+i;N(t,e,"main",s,o,f,y),r.transformable&&(N(t,e,"w",l,h,a,m),N(t,e,"e",p,h,a,m),N(t,e,"n",l,h,x,a),N(t,e,"s",l,g,x,a),N(t,e,"nw",l,h,a,a),N(t,e,"ne",p,h,a,a),N(t,e,"sw",l,g,a,a),N(t,e,"se",p,g,a,a))}function R(t,e){var n=e.__brushOption,r=n.transformable,i=e.childAt(0);i.useStyle(O(n)),i.attr({silent:!r,cursor:r?"move":"default"}),h(["w","e","n","s","se","sw","ne","nw"],function(n){var i=e.childOfName(n),s=function t(e,n){if(n.length>1){var r=[t(e,(n=n.split(""))[0]),t(e,n[1])];return("e"===r[0]||"w"===r[0])&&r.reverse(),r.join("")}var r=a.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[n],a.getTransform(e.group));return({left:"w",right:"e",top:"n",bottom:"s"})[r]}(t,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?y[s]+"-resize":null})})}function N(t,e,n,r,i,a,s){var o,l,h,u=e.childOfName(n);u&&u.setShape((l=c((o=z(t,e,[[r,i],[r+a,i+s]]))[0][0],o[1][0]),{x:l,y:h=c(o[0][1],o[1][1]),width:d(o[0][0],o[1][0])-l,height:d(o[0][1],o[1][1])-h}))}function O(t){return r.defaults({strokeNoScale:!0},t.brushStyle)}function j(t,e,n,r){var i=[c(t,n),c(e,r)],a=[d(t,n),d(e,r)];return[[i[0],a[0]],[i[1],a[1]]]}function E(t,e,n,r,i,a,s,o){var l=r.__brushOption,u=t(l.range),c=B(n,a,s);h(i.split(""),function(t){var e=f[t];u[e[0]][e[1]]+=c[e[0]]}),l.range=e(j(u[0][0],u[1][0],u[0][1],u[1][1])),A(n,r),T(n,{isEnd:!1})}function V(t,e,n,r,i){var a=e.__brushOption.range,s=B(t,n,r);h(a,function(t){t[0]+=s[0],t[1]+=s[1]}),A(t,e),T(t,{isEnd:!1})}function B(t,e,n){var r=t.group,i=r.transformCoordToLocal(e,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function z(t,e,n){var i=I(t,e);return i&&!0!==i?i.clipPath(n,t._transform):r.clone(n)}function F(t){var e=t.event;e.preventDefault&&e.preventDefault()}function G(t,e,n){return t.childOfName("main").contain(e,n)}function H(t,e,n,i){var a,s=t._creatingCover,o=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var n=e[e.length-1],r=e[0],i=n[0]-r[0],a=n[1]-r[1];return p(i*i+a*a,.5)>6}(t)||s){if(o&&!s){"single"===l.brushMode&&P(t);var h=r.clone(l);h.brushType=W(h.brushType,o),h.panelId=!0===o?null:o.panelId,s=t._creatingCover=b(t,h),t._covers.push(s)}if(s){var u=Z[W(t._brushType,o)];s.__brushOption.range=u.getCreatingRange(z(t,s,t._track)),i&&(w(t,s),u.updateCommon(t,s)),M(t,s),a={isEnd:i}}}else i&&"single"===l.brushMode&&l.removeOnClick&&C(t,e,n)&&P(t)&&(a={isEnd:i,removeOnClick:!0});return a}function W(t,e){return"auto"===t?e.defaultBrushType:t}v.prototype={constructor:v,enableBrush:function(t){var e,n,i,a,o;return this._brushType&&(e=this,n=e._zr,s.release(n,g,e._uid),h(e._handlers,function(t,e){n.off(e,t)}),e._brushType=e._brushOption=null),t.brushType&&(i=this,a=t,o=i._zr,i._enableGlobalPan||s.take(o,g,i._uid),h(i._handlers,function(t,e){o.on(e,t)}),i._brushType=a.brushType,i._brushOption=r.merge(r.clone(x),a,!0)),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};r.each(t,function(t){e[t.panelId]=r.clone(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){h(this._covers,t,e)},updateCovers:function(t){t=r.map(t,function(t){return r.merge(r.clone(x),t,!0)});var e=this._covers,n=this._covers=[],i=this,a=this._creatingCover;return new o(e,t,function(t,e){return s(t.__brushOption,e)},s).add(l).update(l).remove(function(t){e[t]!==a&&i.group.remove(e[t])}).execute(),this;function s(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function l(r,s){var o=t[r];if(null!=s&&e[s]===a)n[r]=e[s];else{var l=n[r]=null!=s?(e[s].__brushOption=o,e[s]):w(i,b(i,o));A(i,l)}}},unmount:function(){return this.enableBrush(!1),P(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},r.mixin(v,i);var q={mousedown:function(t){if(this._dragging)U.call(this,t);else if(!t.target||!t.target.draggable){F(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=C(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(!function(t,e,n){if(t._brushType){var r=t._zr,i=t._covers,a=C(t,e,n);if(!t._dragging)for(var s=0;s<i.length;s++){var o=i[s].__brushOption;if(a&&(!0===a||o.panelId===a.panelId)&&Z[o.brushType].contain(i[s],n[0],n[1]))return}a&&r.setCursorStyle("crosshair")}}(this,t,e),this._dragging){F(t);var n=H(this,t,e,!1);n&&T(this,n)}},mouseup:U};function U(t){if(this._dragging){F(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),n=H(this,t,e,!0);this._dragging=!1,this._track=[],this._creatingCover=null,n&&T(this,n)}}var Z={lineX:$(0),lineY:$(1),rect:{createCover:function(t,e){return L(l(E,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=k(t);return j(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,r){D(t,e,n,r)},updateCommon:R,contain:G},polygon:{createCover:function(t,e){var n=new a.Group;return n.add(new a.Polyline({name:"main",style:O(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new a.Polygon({name:"main",draggable:!0,drift:l(V,t,e),ondragend:l(T,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,r){e.childAt(0).setShape({points:z(t,e,n)})},updateCommon:R,contain:G}};function $(t){return{createCover:function(e,n){return L(l(E,function(e){var n=[e,[0,100]];return t&&n.reverse(),n},function(e){return e[t]}),e,n,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var n=k(e);return[c(n[0][t],n[1][t]),d(n[0][t],n[1][t])]},updateCoverShape:function(e,n,r,i){var a,s=I(e,n);if(!0!==s&&s.getLinearBrushOtherExtent)a=s.getLinearBrushOtherExtent(t,e._transform);else{var o=e._zr;a=[0,[o.getWidth(),o.getHeight()][1-t]]}var l=[r,a];t&&l.reverse(),D(e,n,l,i)},updateCommon:R,contain:G}}t.exports=v},30170:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(76165),a=n(70018),s=n(58143),o=r.each,l=r.indexOf,h=r.curry,u=["dataToPoint","pointToData"],c=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function d(t,e,n){var r=this._targetInfoList=[],i={},a=f(e,t);o(y,function(t,e){(!n||!n.include||l(n.include,e)>=0)&&t(a,r,i)})}var p=d.prototype;function g(t){return t[0]>t[1]&&t.reverse(),t}function f(t,e){return a.parseFinder(t,e,{includeMainTypes:c})}p.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var r=v[t.brushType](0,n,e);t.__rangeOffset={offset:w[t.brushType](r.values,t.range,[1,1]),xyMinMax:r.xyMinMax}}})},p.matchOutputRanges=function(t,e,n){o(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&r.each(i.coordSyses,function(r){var i=v[t.brushType](1,r,t.range);n(t,i.values,r,e)})},this)},p.setInputRanges=function(t,e){o(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&!0!==n){t.panelId=n.panelId;var r,i,a,s,o,l=v[t.brushType](0,n.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?w[t.brushType](l.values,h.offset,(r=l.xyMinMax,i=h.xyMinMax,a=_(r),s=_(i),isNaN((o=[a[0]/s[0],a[1]/s[1]])[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}},this)},p.makePanelOpts=function(t,e){return r.map(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e&&e(n),clipPath:s.makeRectPanelClipPath(r),isTargetByCursor:s.makeRectIsTargetByCursor(r,t,n.coordSysModel),getLinearBrushOtherExtent:s.makeLinearBrushOtherExtent(r)}})},p.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&l(r.coordSyses,e.coordinateSystem)>=0},p.findTargetInfo=function(t,e){for(var n=this._targetInfoList,r=f(e,t),i=0;i<n.length;i++){var a=n[i],s=t.panelId;if(s){if(a.panelId===s)return a}else for(var i=0;i<x.length;i++)if(x[i](r,a))return a}return!0};var y={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,a=t.gridModels,s=r.createHashMap(),h={},u={};(n||i||a)&&(o(n,function(t){var e=t.axis.grid.model;s.set(e.id,e),h[e.id]=!0}),o(i,function(t){var e=t.axis.grid.model;s.set(e.id,e),u[e.id]=!0}),o(a,function(t){s.set(t.id,t),h[t.id]=!0,u[t.id]=!0}),s.each(function(t){var r=t.coordinateSystem,a=[];o(r.getCartesians(),function(t,e){(l(n,t.getAxis("x").model)>=0||l(i,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:m.grid,xAxisDeclared:h[t.id],yAxisDeclared:u[t.id]})}))},geo:function(t,e){o(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:m.geo})})}},x=[function(t,e){var n=t.xAxisModel,r=t.yAxisModel,i=t.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],m={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(i.getTransform(t)),e}},v={lineX:h(b,0),lineY:h(b,1),rect:function(t,e,n){var r=e[u[t]]([n[0][0],n[1][0]]),i=e[u[t]]([n[0][1],n[1][1]]),a=[g([r[0],i[0]]),g([r[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:r.map(n,function(n){var r=e[u[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}};function b(t,e,n,i){var a=n.getAxis(["x","y"][t]),s=g(r.map([0,1],function(t){return e?a.coordToData(a.toLocalCoord(i[t])):a.toGlobalCoord(a.dataToCoord(i[t]))})),o=[];return o[t]=s,o[1-t]=[NaN,NaN],{values:s,xyMinMax:o}}var w={lineX:h(M,0),lineY:h(M,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return r.map(t,function(t,r){return[t[0]-n[0]*e[r][0],t[1]-n[1]*e[r][1]]})}};function M(t,e,n,r){return[e[0]-r[t]*n[0],e[1]-r[t]*n[1]]}function _(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}t.exports=d},88142:function(t,e,n){var r=n(66023),i=n(84275),a=n(75398),s=n(56694).onIrrelevantElement,o=n(76165),l=n(70351),h=n(79426).getUID;function u(t,e){var n=t.getItemStyle(),r=t.get("areaColor");return null!=r&&(n.fill=r),n}function c(t,e){e.eachChild(function(e){r.each(e.__regions,function(n){e.trigger(t.isSelected(n.name)?"emphasis":"normal")})})}function d(t,e){var n=new o.Group;this.uid=h("ec_map_draw"),this._controller=new i(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new o.Group),n.add(this._backgroundGroup=new o.Group)}d.prototype={constructor:d,draw:function(t,e,n,i,a){var s,l="geo"===t.mainType,h=t.getData&&t.getData();l&&e.eachComponent({mainType:"series",subType:"map"},function(e){h||e.getHostGeoModel()!==t||(h=e.getData())});var d=t.coordinateSystem;this._updateBackground(d);var p=this._regionsGroup,g=this.group,f=d.scale,y={position:d.position,scale:f};!p.childAt(0)||a?g.attr(y):o.updateProps(g,y,t),p.removeAll();var x=["itemStyle"],m=["emphasis","itemStyle"],v=["label"],b=["emphasis","label"],w=r.createHashMap();r.each(d.regions,function(e){var n=w.get(e.name)||w.set(e.name,new o.Group),i=new o.CompoundPath({shape:{paths:[]}});n.add(i);var a=t.getRegionModel(e.name)||t,s=a.getModel(x),c=a.getModel(m),d=u(s,f),g=u(c,f),y=a.getModel(v),M=a.getModel(b);if(h){P=h.indexOfName(e.name);var _=h.getItemVisual(P,"color",!0);_&&(d.fill=_)}r.each(e.geometries,function(t){if("polygon"===t.type){i.shape.paths.push(new o.Polygon({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)i.shape.paths.push(new o.Polygon({shape:{points:t.interiors[e]}}))}}),i.setStyle(d),i.style.strokeNoScale=!0,i.culling=!0;var A=y.get("show"),S=M.get("show"),C=h&&isNaN(h.get(h.mapDimension("value"),P)),I=h&&h.getItemLayout(P);if(l||C&&(A||S)||I&&I.showLabel){var P,T,k=l?e.name:P;(!h||P>=0)&&(T=t);var L=new o.Text({position:e.center.slice(),scale:[1/f[0],1/f[1]],z2:10,silent:!0});o.setLabelStyle(L.style,L.hoverStyle={},y,M,{labelFetcher:T,labelDataIndex:k,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),n.add(L)}if(h)h.setItemGraphicEl(P,n);else{var a=t.getRegionModel(e.name);i.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:a&&a.option||{}}}(n.__regions||(n.__regions=[])).push(e),o.setHoverStyle(n,g,{hoverSilentOnTouch:!!t.get("selectedMode")}),p.add(n)}),this._updateController(t,e,n),s=this,p.off("click"),p.off("mousedown"),t.get("selectedMode")&&(p.on("mousedown",function(){s._mouseDownFlag=!0}),p.on("click",function(e){if(s._mouseDownFlag){s._mouseDownFlag=!1;for(var a=e.target;!a.__regions;)a=a.parent;if(a){var o={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:r.map(a.__regions,function(t){return{name:t.name,from:i.uid}})};o[t.mainType+"Id"]=t.id,n.dispatchAction(o),c(t,p)}}})),c(t,p)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&l.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&r.each(l.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,n){var i=t.coordinateSystem,o=this._controller,l=this._controllerHost;l.zoomLimit=t.get("scaleLimit"),l.zoom=i.getZoom(),o.enable(t.get("roam")||!1);var h=t.mainType;function u(){var e={type:"geoRoam",componentType:h};return e[h+"Id"]=t.id,e}o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,a.updateViewOnPan(l,t.dx,t.dy),n.dispatchAction(r.extend(u(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,a.updateViewOnZoom(l,t.scale,t.originX,t.originY),n.dispatchAction(r.extend(u(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setPointerChecker(function(e,r,a){return i.getViewRectAfterRoam().contain(r,a)&&!s(e,n,t)})}},t.exports=d},84275:function(t,e,n){var r=n(66023),i=n(56177),a=n(3006),s=n(75319);function o(t){this.pointerChecker,this._zr=t,this._opt={};var e=r.bind,n=e(l,this),a=e(h,this),s=e(u,this),o=e(c,this),p=e(d,this);i.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,i){this.disable(),this._opt=r.defaults(r.clone(i)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(!0===e||"move"===e||"pan"===e)&&(t.on("mousedown",n),t.on("mousemove",a),t.on("mouseup",s)),(!0===e||"scale"===e||"zoom"===e)&&(t.on("mousewheel",o),t.on("pinch",p))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",a),t.off("mouseup",s),t.off("mousewheel",o),t.off("pinch",p)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function l(t){if(!a.isMiddleOrRightButtonOnMouseUpDown(t)&&(!t.target||!t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function h(t){if(!(!this._dragging||!f("moveOnMouseMove",t,this._opt)||"pinch"===t.gestureEvent||s.isTaken(this._zr,"globalPan"))){var e=t.offsetX,n=t.offsetY,r=this._x,i=this._y;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&a.stop(t.event),g(this,"pan","moveOnMouseMove",t,{dx:e-r,dy:n-i,oldX:r,oldY:i,newX:e,newY:n})}}function u(t){a.isMiddleOrRightButtonOnMouseUpDown(t)||(this._dragging=!1)}function c(t){var e=f("zoomOnMouseWheel",t,this._opt),n=f("moveOnMouseWheel",t,this._opt),r=t.wheelDelta,i=Math.abs(r),a=t.offsetX,s=t.offsetY;if(0!==r&&(e||n)){if(e){var o=i>3?1.4:i>1?1.2:1.1;p(this,"zoom","zoomOnMouseWheel",t,{scale:r>0?o:1/o,originX:a,originY:s})}if(n){var l=Math.abs(r);p(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:s})}}}function d(t){if(!s.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;p(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function p(t,e,n,r,i){t.pointerChecker&&t.pointerChecker(r,i.originX,i.originY)&&(a.stop(r.event),g(t,e,n,r,i))}function g(t,e,n,i,a){a.isAvailableBehavior=r.bind(f,null,n,i),t.trigger(e,a)}function f(t,e,n){var i=n[t];return!t||i&&(!r.isString(i)||e.event[i+"Key"])}r.mixin(o,i),t.exports=o},58143:function(t,e,n){var r=n(71497),i=n(56694).onIrrelevantElement,a=n(76165);function s(t){return r.create(t)}e.makeRectPanelClipPath=function(t){return t=s(t),function(e,n){return a.clipPointsByRect(e,t)}},e.makeLinearBrushOtherExtent=function(t,e){return t=s(t),function(n){var r=null!=e?e:n,i=r?t.width:t.height,a=r?t.x:t.y;return[a,a+(i||0)]}},e.makeRectIsTargetByCursor=function(t,e,n){return t=s(t),function(r,a,s){return t.contain(a[0],a[1])&&!i(r,e,n)}}},56694:function(t,e){var n={axisPointer:1,tooltip:1,brush:1};e.onIrrelevantElement=function(t,e,r){var i=e.getComponentByElement(t.topTarget),a=i&&i.coordinateSystem;return i&&i!==r&&!n[i.mainType]&&a&&a.model!==r}},75319:function(t,e,n){var r=n(47475),i="\0_ec_interaction_mutex";function a(t){return t[i]||(t[i]={})}r.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),e.take=function(t,e,n){a(t)[e]=n},e.release=function(t,e,n){var r=a(t);r[e]===n&&(r[e]=null)},e.isTaken=function(t,e){return!!a(t)[e]}},81166:function(t,e,n){var r=n(68006),i=r.getLayoutRect,a=r.box,s=r.positionElement,o=n(20438),l=n(76165);e.layout=function(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),l={width:n.getWidth(),height:n.getHeight()},h=i(r,l,o);a(e.get("orient"),t,e.get("itemGap"),h.width,h.height),s(t,r,l,o)},e.makeBackground=function(t,e){var n=o.normalizeCssArray(e.get("padding")),r=e.getItemStyle(["color","opacity"]);r.fill=e.get("backgroundColor");var t=new l.Rect({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1});return t}},75398:function(t,e){e.updateViewOnPan=function(t,e,n){var r=t.target,i=r.position;i[0]+=e,i[1]+=n,r.dirty()},e.updateViewOnZoom=function(t,e,n,r){var i=t.target,a=t.zoomLimit,s=i.position,o=i.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var h=a.min||0;l=Math.max(Math.min(a.max||1/0,l),h)}var u=l/t.zoom;t.zoom=l,s[0]-=(n-s[0])*(u-1),s[1]-=(r-s[1])*(u-1),o[0]*=u,o[1]*=u,i.dirty()}},33601:function(t,e,n){var r=n(66023);t.exports={updateSelectedMap:function(t){this._targetList=r.isArray(t)?t.slice():[],this._selectTargetMap=r.reduce(t||[],function(t,e){return t.set(e.name,e),t},r.createHashMap())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}}},28542:function(t){function e(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function n(t,e){return Math.min(e[1],Math.max(e[0],t))}t.exports=function(t,r,i,a,s,o){r[0]=n(r[0],i),r[1]=n(r[1],i),t=t||0;var l=i[1]-i[0];null!=s&&(s=n(s,[0,l])),null!=o&&(o=Math.max(o,null!=s?s:0)),"all"===a&&(s=o=Math.abs(r[1]-r[0]),a=0);var h=e(r,a);r[a]+=t;var u=s||0,c=i.slice();h.sign<0?c[0]+=u:c[1]-=u,r[a]=n(r[a],c);var d=e(r,a);null!=s&&(d.sign!==h.sign||d.span<s)&&(r[1-a]=r[a]+h.sign*s);var d=e(r,a);return null!=o&&d.span>o&&(r[1-a]=r[a]+d.sign*o),r}},87536:function(t,e,n){var r=n(47475);n(49114),n(53597),n(25668);var i=n(98663),a=n(76056);r.registerProcessor(i),a.registerSubTypeDefaulter("legend",function(){return"plain"})},49114:function(t,e,n){var r=n(47475),i=n(66023),a=n(27611),s=n(70018).isNameSpecified,o=r.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){o.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var r=t[n].get("name");if(this.isSelected(r)){this.select(r),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(t){var e=[],n=[];t.eachRawSeries(function(r){var i,a=r.name;if(n.push(a),r.legendDataProvider){var o=r.legendDataProvider(),l=o.mapArray(o.getName);t.isSeriesFiltered(r)||(n=n.concat(l)),l.length?e=e.concat(l):i=!0}else i=!0;i&&s(r)&&e.push(r.name)}),this._availableNames=n;var r=this.get("data")||e,o=i.map(r,function(t){return("string"==typeof t||"number"==typeof t)&&(t={name:t}),new a(t,this,this.ecModel)},this);this._data=o},getData:function(){return this._data},select:function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;i.each(n,function(t){e[t.get("name")]=!1})}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&i.indexOf(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});t.exports=o},25668:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(87557).createSymbol,s=n(76165),o=n(81166).makeBackground,l=n(68006),h=i.curry,u=i.each,c=s.Group;function d(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function p(t,e,n,r){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:r})}function g(t,e,n,r){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:r})}t.exports=r.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new c),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(a,t,e,n);var s=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},u=t.get("padding"),c=l.getLayoutRect(s,h,u),d=this.layoutInner(t,a,c,r),p=l.getLayoutRect(i.defaults({width:d.width,height:d.height},s),h,u);this.group.attr("position",[p.x-d.x,p.y-d.y]),this.group.add(this._backgroundEl=o(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,r){var a=this.getContentGroup(),s=i.createHashMap(),o=e.get("selectedMode"),l=[];n.eachRawSeries(function(t){t.get("legendHoverLink")||l.push(t.id)}),u(e.getData(),function(i,u){var f=i.get("name");if(!this.newlineDisabled&&(""===f||"\n"===f))return void a.add(new c({newline:!0}));var y=n.getSeriesByName(f)[0];if(!s.get(f))if(y){var x=y.getData(),m=x.getVisual("color");"function"==typeof m&&(m=m(y.getDataParams(0)));var v=x.getVisual("legendSymbol")||"roundRect",b=x.getVisual("symbol");this._createItem(f,u,i,e,v,b,t,m,o).on("click",h(d,f,r)).on("mouseover",h(p,y.name,null,r,l)).on("mouseout",h(g,y.name,null,r,l)),s.set(f,!0)}else n.eachRawSeries(function(n){if(!s.get(f)&&n.legendDataProvider){var a=n.legendDataProvider(),c=a.indexOfName(f);if(!(c<0)){var y=a.getItemVisual(c,"color");this._createItem(f,u,i,e,"roundRect",null,t,y,o).on("click",h(d,f,r)).on("mouseover",h(p,null,f,r,l)).on("mouseout",h(g,null,f,r,l)),s.set(f,!0)}}},this)},this)},_createItem:function(t,e,n,r,o,l,h,u,d){var p=r.get("itemWidth"),g=r.get("itemHeight"),f=r.get("inactiveColor"),y=r.get("symbolKeepAspect"),x=r.isSelected(t),m=new c,v=n.getModel("textStyle"),b=n.get("icon"),w=n.getModel("tooltip"),M=w.parentModel;if(o=b||o,m.add(a(o,0,0,p,g,x?u:f,null==y||y)),!b&&l&&(l!==o||"none"===l)){var _=.8*g;"none"===l&&(l="circle"),m.add(a(l,(p-_)/2,(g-_)/2,_,_,x?u:f,null==y||y))}var A=r.get("formatter"),S=t;"string"==typeof A&&A?S=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(S=A(t)),m.add(new s.Text({style:s.setTextStyle({},v,{text:S,x:"left"===h?p+5:-5,y:g/2,textFill:x?v.getTextColor():f,textAlign:h,textVerticalAlign:"middle"})}));var C=new s.Rect({shape:m.getBoundingRect(),invisible:!0,tooltip:w.get("show")?i.extend({content:t,formatter:M.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:r.componentIndex,name:t,$vars:["name"]}},w.option):null});return m.add(C),m.eachChild(function(t){t.silent=!0}),C.silent=!d,this.getContentGroup().add(m),s.setHoverStyle(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,n){var r=this.getContentGroup();l.box(t.get("orient"),r,t.get("itemGap"),n.width,n.height);var i=r.getBoundingRect();return r.attr("position",[-i.x,-i.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}})},23511:function(t,e,n){var r=n(49114),i=n(68006),a=i.mergeLayoutParam,s=i.getLayoutParams,o=r.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,r){var i=s(t);o.superCall(this,"init",t,e,n,r),l(this,t,i)},mergeOption:function(t,e){o.superCall(this,"mergeOption",t,e),l(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function l(t,e,n){var r=t.getOrient(),i=[1,1];i[r.index]=0,a(e,n,{type:"box",ignoreSize:i})}t.exports=o},80403:function(t,e,n){var r=n(66023),i=n(76165),a=n(68006),s=n(25668),o=i.Group,l=["width","height"],h=["x","y"],u=s.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){u.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new o),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new o),this._showController},resetInner:function(){u.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,n,a){var s=this;u.superCall(this,"renderInner",t,e,n,a);var o=this._controllerGroup,l=e.get("pageIconSize",!0);r.isArray(l)||(l=[l,l]),c("pagePrev",0);var h=e.getModel("pageTextStyle");function c(t,n){var h=i.createIcon(e.get("pageIcons",!0)[e.getOrient().name][n],{onclick:r.bind(s._pageGo,s,t+"DataIndex",e,a)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});h.name=t,o.add(h)}o.add(new i.Text({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,n,s){var o=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup,d=t.getOrient().index,p=l[d],g=l[1-d],f=h[1-d];a.box(t.get("orient"),o,t.get("itemGap"),d?n.width:null,d?null:n.height),a.box("horizontal",c,t.get("pageButtonItemGap",!0));var y=o.getBoundingRect(),x=c.getBoundingRect(),m=this._showController=y[p]>n[p],v=[-y.x,-y.y];s||(v[d]=o.position[d]);var b=[0,0],w=[-x.x,-x.y],M=r.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));m&&("end"===t.get("pageButtonPosition",!0)?w[d]+=n[p]-x[p]:b[d]+=x[p]+M),w[1-d]+=y[g]/2-x[g]/2,o.attr("position",v),u.attr("position",b),c.attr("position",w);var _=(this.group.getBoundingRect(),{x:0,y:0});if(_[p]=m?n[p]:y[p],_[g]=Math.max(y[g],x[g]),_[f]=Math.min(0,x[f]+w[1-d]),u.__rectSize=n[p],m){var A={x:0,y:0};A[p]=Math.max(n[p]-x[p]-M,0),A[g]=_[g],u.setClipPath(new i.Rect({shape:A})),u.__rectSize=A[p]}else c.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(t);return null!=S.pageIndex&&i.updateProps(o,{position:S.contentPosition},!!m&&t),this._updatePageInfoView(t,S),_},_pageGo:function(t,e,n){var r=this._getPageInfo(e)[t];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;r.each(["pagePrev","pageNext"],function(r){var i=null!=e[r+"DataIndex"],a=n.childOfName(r);a&&(a.setStyle("fill",i?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=i?"pointer":"default")});var i=n.childOfName("pageText"),a=t.get("pageFormatter"),s=e.pageIndex,o=null!=s?s+1:0,l=e.pageCount;i&&a&&i.setStyle("text",r.isString(a)?a.replace("{current}",o).replace("{total}",l):a({current:o,total:l}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=t.getOrient().index,a=l[i],s=h[i],o=this._findTargetItemIndex(e),u=n.children(),c=u[o],d=u.length,p=+!!d,g={contentPosition:n.position.slice(),pageCount:p,pageIndex:p-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return g;var f=b(c);g.contentPosition[i]=-f.s;for(var y=o+1,x=f,m=f,v=null;y<=d;++y)(!(v=b(u[y]))&&m.e>x.s+r||v&&!w(v,x.s))&&(x=m.i>x.i?m:v)&&(null==g.pageNextDataIndex&&(g.pageNextDataIndex=x.i),++g.pageCount),m=v;for(var y=o-1,x=f,m=f,v=null;y>=-1;--y)(!(v=b(u[y]))||!w(m,v.s))&&x.i<m.i&&(m=x,null==g.pagePrevDataIndex&&(g.pagePrevDataIndex=x.i),++g.pageCount,++g.pageIndex),x=v;return g;function b(t){if(t){var e=t.getBoundingRect(),n=e[s]+t.position[i];return{s:n,e:n+e[a],i:t.__legendDataIndex}}}function w(t,e){return t.e>=e&&t.s<=e+r}},_findTargetItemIndex:function(t){var e,n=this.getContentGroup();return this._showController?n.eachChild(function(n,r){n.__legendDataIndex===t&&(e=r)}):e=0,e}});t.exports=u},53597:function(t,e,n){var r=n(47475),i=n(66023);function a(t,e,n){var r,a={},s="toggleSelected"===t;return n.eachComponent("legend",function(n){s&&null!=r?n[r?"select":"unSelect"](e.name):(n[t](e.name),r=n.isSelected(e.name));var o=n.getData();i.each(o,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var r=n.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&r:a[e]=r}})}),{name:e.name,selected:a}}r.registerAction("legendToggleSelect","legendselectchanged",i.curry(a,"toggleSelected")),r.registerAction("legendSelect","legendselected",i.curry(a,"select")),r.registerAction("legendUnSelect","legendunselected",i.curry(a,"unSelect"))},98663:function(t){t.exports=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}},36118:function(t,e,n){n(47475).registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})},69818:function(t,e,n){n(87536),n(23511),n(80403),n(36118)},65218:function(t,e,n){var r=n(47475);n(38349),n(32739),r.registerPreprocessor(function(t){t.markArea=t.markArea||{}})},41293:function(t,e,n){var r=n(47475);n(8326),n(9308),r.registerPreprocessor(function(t){t.markLine=t.markLine||{}})},35866:function(t,e,n){var r=n(47475);n(26982),n(99238),r.registerPreprocessor(function(t){t.markPoint=t.markPoint||{}})},38349:function(t,e,n){t.exports=n(93277).extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}})},32739:function(t,e,n){var r=n(66023),i=n(53453),a=n(90942),s=n(98763),o=n(76165),l=n(83976),h=n(40103),u=function(t,e,n,i){var a=l.dataTransform(t,i[0]),s=l.dataTransform(t,i[1]),o=r.retrieve,h=a.coord,u=s.coord;h[0]=o(h[0],-1/0),h[1]=o(h[1],-1/0),u[0]=o(u[0],1/0),u[1]=o(u[1],1/0);var c=r.mergeAll([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c};function c(t){return!isNaN(t)&&!isFinite(t)}function d(t,e,n,r){var i=1-t;return c(e[i])&&c(n[i])}function p(t,e){var n=e.coord[0],r=e.coord[1];return!!("cartesian2d"===t.type&&n&&r&&(d(1,n,r,t)||d(0,n,r,t)))||l.dataFilter(t,{coord:n,x:e.x0,y:e.y0})||l.dataFilter(t,{coord:r,x:e.x1,y:e.y1})}function g(t,e,n,r,i){var a,o=r.coordinateSystem,l=t.getItemModel(e),h=s.parsePercent(l.get(n[0]),i.getWidth()),u=s.parsePercent(l.get(n[1]),i.getHeight());if(isNaN(h)||isNaN(u)){if(r.getMarkerPosition)a=r.getMarkerPosition(t.getValues(n,e));else{var d=t.get(n[0],e),p=t.get(n[1],e),g=[d,p];o.clampData&&o.clampData(g,g),a=o.dataToPoint(g,!0)}if("cartesian2d"===o.type){var f=o.getAxis("x"),y=o.getAxis("y"),d=t.get(n[0],e),p=t.get(n[1],e);c(d)?a[0]=f.toGlobalCoord(f.getExtent()[+("x0"!==n[0])]):c(p)&&(a[1]=y.toGlobalCoord(y.getExtent()[+("y0"!==n[1])]))}isNaN(h)||(a[0]=h),isNaN(u)||(a[1]=u)}else a=[h,u];return a}var f=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];h.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var i=e.getData();i.each(function(e){var a=r.map(f,function(r){return g(i,e,r,t,n)});i.setItemLayout(e,a),i.getItemGraphicEl(e).setShape("points",a)})}},this)},renderSeries:function(t,e,n,s){var l,h,c,d,y,x,m,v=t.coordinateSystem,b=t.id,w=t.getData(),M=this.markerGroupMap,_=M.get(b)||M.set(b,{group:new o.Group});this.group.add(_.group),_.__keep=!0;var A=(l=v,h=t,c=e,l?(d=r.map(l&&l.dimensions,function(t){var e=h.getData(),n=e.getDimensionInfo(e.mapDimension(t))||{};return r.defaults({name:t},n)}),y=new a(r.map(["x0","y0","x1","y1"],function(t,e){return{name:t,type:d[e%2].type}}),c)):y=new a(d=[{name:"value",type:"float"}],c),x=r.map(c.get("data"),r.curry(u,h,l,c)),l&&(x=r.filter(x,r.curry(p,l))),m=l?function(t,e,n,r){return t.coord[Math.floor(r/2)][r%2]}:function(t){return t.value},y.initData(x,null,m),y.hasItemOption=!0,y);e.setData(A),A.each(function(e){A.setItemLayout(e,r.map(f,function(n){return g(A,e,n,t,s)})),A.setItemVisual(e,{color:w.getVisual("color")})}),A.diff(_.__data).add(function(t){var e=new o.Polygon({shape:{points:A.getItemLayout(t)}});A.setItemGraphicEl(t,e),_.group.add(e)}).update(function(t,n){var r=_.__data.getItemGraphicEl(n);o.updateProps(r,{shape:{points:A.getItemLayout(t)}},e,t),_.group.add(r),A.setItemGraphicEl(t,r)}).remove(function(t){var e=_.__data.getItemGraphicEl(t);_.group.remove(e)}).execute(),A.eachItemGraphicEl(function(t,n){var a=A.getItemModel(n),s=a.getModel("label"),l=a.getModel("emphasis.label"),h=A.getItemVisual(n,"color");t.useStyle(r.defaults(a.getModel("itemStyle").getItemStyle(),{fill:i.modifyAlpha(h,.4),stroke:h})),t.hoverStyle=a.getModel("emphasis.itemStyle").getItemStyle(),o.setLabelStyle(t.style,t.hoverStyle,s,l,{labelFetcher:e,labelDataIndex:n,defaultText:A.getName(n)||"",isRectText:!0,autoColor:h}),o.setHoverStyle(t,{}),t.dataModel=e}),_.__data=A,_.group.silent=e.get("silent")||t.get("silent")}})},8326:function(t,e,n){t.exports=n(93277).extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}})},9308:function(t,e,n){var r=n(66023),i=n(90942),a=n(98763),s=n(83976),o=n(93275),l=n(40103),h=function(t,e,n,i){var a=t.getData(),o=i.type;if(!r.isArray(i)&&("min"===o||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis)){if(null!=i.yAxis||null!=i.xAxis)l=null!=i.yAxis?"y":"x",e.getAxis(l),h=r.retrieve(i.yAxis,i.xAxis);else{var l,h,u=s.getAxisInfo(i,a,e,t);l=u.valueDataDim,u.valueAxis,h=s.numCalculate(a,l,o)}var c=+("x"!==l),d=1-c,p=r.clone(i),g={};p.type=null,p.coord=[],g.coord=[],p.coord[d]=-1/0,g.coord[d]=1/0;var f=n.get("precision");f>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(f,20))),p.coord[c]=g.coord[c]=h,i=[p,g,{type:o,valueIndex:i.valueIndex,value:h}]}return(i=[s.dataTransform(t,i[0]),s.dataTransform(t,i[1]),r.extend({},i[2])])[2].type=i[2].type||"",r.merge(i[2],i[0]),r.merge(i[2],i[1]),i};function u(t){return!isNaN(t)&&!isFinite(t)}function c(t,e,n,r){var i=1-t,a=r.dimensions[t];return u(e[i])&&u(n[i])&&e[t]===n[t]&&r.getAxis(a).containData(e[t])}function d(t,e){if("cartesian2d"===t.type){var n=e[0].coord,r=e[1].coord;if(n&&r&&(c(1,n,r,t)||c(0,n,r,t)))return!0}return s.dataFilter(t,e[0])&&s.dataFilter(t,e[1])}function p(t,e,n,r,i){var s,o=r.coordinateSystem,l=t.getItemModel(e),h=a.parsePercent(l.get("x"),i.getWidth()),c=a.parsePercent(l.get("y"),i.getHeight());if(isNaN(h)||isNaN(c)){if(r.getMarkerPosition)s=r.getMarkerPosition(t.getValues(t.dimensions,e));else{var d=o.dimensions,p=t.get(d[0],e),g=t.get(d[1],e);s=o.dataToPoint([p,g])}if("cartesian2d"===o.type){var f=o.getAxis("x"),y=o.getAxis("y"),d=o.dimensions;u(t.get(d[0],e))?s[0]=f.toGlobalCoord(f.getExtent()[+!n]):u(t.get(d[1],e))&&(s[1]=y.toGlobalCoord(y.getExtent()[+!n]))}isNaN(h)||(s[0]=h),isNaN(c)||(s[1]=c)}else s=[h,c];t.setItemLayout(e,s)}t.exports=l.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markLineModel;if(e){var r=e.getData(),i=e.__from,a=e.__to;i.each(function(e){p(i,e,!0,t,n),p(a,e,!1,t,n)}),r.each(function(t){r.setItemLayout(t,[i.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,n,a){var l,u,c,g,f,y,x,m,v,b=t.coordinateSystem,w=t.id,M=t.getData(),_=this.markerGroupMap,A=_.get(w)||_.set(w,new o);this.group.add(A.group);var S=(l=b,u=t,c=e,f=new i(g=l?r.map(l&&l.dimensions,function(t){var e=u.getData().getDimensionInfo(u.getData().mapDimension(t))||{};return r.defaults({name:t},e)}):[{name:"value",type:"float"}],c),y=new i(g,c),x=new i([],c),m=r.map(c.get("data"),r.curry(h,u,l,c)),l&&(m=r.filter(m,r.curry(d,l))),v=l?s.dimValueGetter:function(t){return t.value},f.initData(r.map(m,function(t){return t[0]}),null,v),y.initData(r.map(m,function(t){return t[1]}),null,v),x.initData(r.map(m,function(t){return t[2]})),x.hasItemOption=!0,{from:f,to:y,line:x}),C=S.from,I=S.to,P=S.line;e.__from=C,e.__to=I,e.setData(P);var T=e.get("symbol"),k=e.get("symbolSize");function L(e,n,r){var i=e.getItemModel(n);p(e,n,r,t,a),e.setItemVisual(n,{symbolSize:i.get("symbolSize")||k[+!r],symbol:i.get("symbol",!0)||T[+!r],color:i.get("itemStyle.color")||M.getVisual("color")})}r.isArray(T)||(T=[T,T]),"number"==typeof k&&(k=[k,k]),S.from.each(function(t){L(C,t,!0),L(I,t,!1)}),P.each(function(t){var e=P.getItemModel(t).get("lineStyle.color");P.setItemVisual(t,{color:e||C.getItemVisual(t,"color")}),P.setItemLayout(t,[C.getItemLayout(t),I.getItemLayout(t)]),P.setItemVisual(t,{fromSymbolSize:C.getItemVisual(t,"symbolSize"),fromSymbol:C.getItemVisual(t,"symbol"),toSymbolSize:I.getItemVisual(t,"symbolSize"),toSymbol:I.getItemVisual(t,"symbol")})}),A.updateData(P),S.line.eachItemGraphicEl(function(t,n){t.traverse(function(t){t.dataModel=e})}),A.__keep=!0,A.group.silent=e.get("silent")||t.get("silent")}})},26982:function(t,e,n){t.exports=n(93277).extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}})},99238:function(t,e,n){var r=n(66023),i=n(67076),a=n(98763),s=n(90942),o=n(83976);function l(t,e,n){var r=e.coordinateSystem;t.each(function(i){var s,o=t.getItemModel(i),l=a.parsePercent(o.get("x"),n.getWidth()),h=a.parsePercent(o.get("y"),n.getHeight());if(isNaN(l)||isNaN(h)){if(e.getMarkerPosition)s=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(r){var u=t.get(r.dimensions[0],i),c=t.get(r.dimensions[1],i);s=r.dataToPoint([u,c])}}else s=[l,h];isNaN(l)||(s[0]=l),isNaN(h)||(s[1]=h),t.setItemLayout(i,s)})}t.exports=n(40103).extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(l(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,n,a){var h,u,c,d,p,g=t.coordinateSystem,f=t.id,y=t.getData(),x=this.markerGroupMap,m=x.get(f)||x.set(f,new i),v=(h=g,u=t,c=e,d=new s(h?r.map(h&&h.dimensions,function(t){var e=u.getData().getDimensionInfo(u.getData().mapDimension(t))||{};return r.defaults({name:t},e)}):[{name:"value",type:"float"}],c),p=r.map(c.get("data"),r.curry(o.dataTransform,u)),h&&(p=r.filter(p,r.curry(o.dataFilter,h))),d.initData(p,null,h?o.dimValueGetter:function(t){return t.value}),d);e.setData(v),l(e.getData(),t,a),v.each(function(t){var n=v.getItemModel(t),r=n.getShallow("symbolSize");"function"==typeof r&&(r=r(e.getRawValue(t),e.getDataParams(t))),v.setItemVisual(t,{symbolSize:r,color:n.get("itemStyle.color")||y.getVisual("color"),symbol:n.getShallow("symbol")})}),m.updateData(v),this.group.add(m.group),v.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),m.__keep=!0,m.group.silent=e.get("silent")||t.get("silent")}})},93277:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(57674),s=n(70018),o=n(20438),l=n(9084),h=o.addCommas,u=o.encodeHTML;function c(t){s.defaultEmphasis(t,"label",["show"])}var d=r.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,r){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,r.createdBySelf,!0)},isAnimationEnabled:function(){if(a.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,n,r){var a=this.constructor,s=this.mainType+"Model";n||e.eachSeries(function(t){var n=t.get(this.mainType,!0),o=t[s];if(!n||!n.data){t[s]=null;return}o?o.mergeOption(n,e,!0):(r&&c(n),i.each(n.data,function(t){t instanceof Array?(c(t[0]),c(t[1])):c(t)}),o=new a(n,this,e),i.extend(o,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),t[s]=o},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),r=i.isArray(n)?i.map(n,h).join(", "):h(n),a=e.getName(t),s=u(this.name);return(null!=n||a)&&(s+="<br />"),a&&(s+=u(a),null!=n&&(s+=" : ")),null!=n&&(s+=u(r)),s},getData:function(){return this._data},setData:function(t){this._data=t}});i.mixin(d,l),t.exports=d},40103:function(t,e,n){var r=n(47475),i=n(66023);t.exports=r.extendComponentView({type:"marker",init:function(){this.markerGroupMap=i.createHashMap()},render:function(t,e,n){var r=this.markerGroupMap;r.each(function(t){t.__keep=!1});var i=this.type+"Model";e.eachSeries(function(t){var r=t[i];r&&this.renderSeries(t,r,e,n)},this),r.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}})},83976:function(t,e,n){var r=n(66023),i=n(98763),a=n(74733).isDimensionStacked,s=r.indexOf;function o(t,e,n,r,s,o){var l=[],h=a(e,r)?e.getCalculationInfo("stackResultDimension"):r,u=c(e,h,t),d=e.indicesOfNearest(h,u)[0];l[s]=e.get(n,d),l[o]=e.get(r,d);var p=i.getPrecision(e.get(r,d));return(p=Math.min(p,20))>=0&&(l[o]=+l[o].toFixed(p)),l}var l=r.curry,h={min:l(o,"min"),max:l(o,"max"),average:l(o,"average")};function u(t,e,n,r){var i={};return null!=t.valueIndex||null!=t.valueDim?(i.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=n.getAxis(function(t,e){var n=t.getData(),r=n.dimensions;e=n.getDimension(e);for(var i=0;i<r.length;i++){var a=n.getDimensionInfo(r[i]);if(a.name===e)return a.coordDim}}(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function c(t,e,n){if("average"===n){var r=0,i=0;return t.each(e,function(t,e){!isNaN(t)&&(r+=t,i++)}),r/i}return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)[+("max"===n)]}e.dataTransform=function(t,e){var n,i=t.getData(),a=t.coordinateSystem;if(e&&!(!isNaN(parseFloat((n=e).x))&&!isNaN(parseFloat(n.y)))&&!r.isArray(e.coord)&&a){var o=a.dimensions,l=u(e,i,a,t);if((e=r.clone(e)).type&&h[e.type]&&l.baseAxis&&l.valueAxis){var d=s(o,l.baseAxis.dim),p=s(o,l.valueAxis.dim);e.coord=h[e.type](i,l.baseDataDim,l.valueDataDim,d,p),e.value=e.coord[p]}else{for(var g=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],f=0;f<2;f++)h[g[f]]&&(g[f]=c(i,i.mapDimension(o[f]),g[f]));e.coord=g}}return e},e.getAxisInfo=u,e.dataFilter=function(t,e){return!t||!t.containData||!e.coord||!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))||t.containData(e.coord)},e.dimValueGetter=function(t,e,n,r){return r<2?t.coord&&t.coord[r]:t.value},e.numCalculate=c},41891:function(t,e,n){var r=n(47475),i=n(66023),a=n(44050),s=n(31879);n(54249),n(59314),n(89040),r.extendComponentView({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},i.each(o,function(t,e){n.getZr().on(e,this._handlers[e]=i.bind(t,this))},this)),a.createOrUpdate(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){i.each(this._handlers,function(t,n){e.getZr().off(n,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(i.extend({type:"parallelAxisExpand"},t))}});var o={mousedown:function(t){l(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(l(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&l(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r&&null})}}};function l(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}r.registerPreprocessor(s)},89040:function(t,e,n){n(54249),n(22947),n(43608)},38189:function(t,e,n){var r=n(47475),i=n(66023),a=n(19995);n(1748),n(66912),n(26514),n(57498),n(81745),r.registerLayout(i.curry(a,"bar")),r.extendComponentView({type:"polar"})},27154:function(t,e,n){n(80194),n(96274),n(99547)},99547:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(96972),s=n(76165),o=["axisLine","axisTickLabel","axisName"];t.exports=r.extendComponentView({type:"radar",render:function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),r=i.map(n,function(t){return new a(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})});i.each(r,function(t){i.each(o,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var r=t.get("shape"),a=t.getModel("splitLine"),o=t.getModel("splitArea"),l=a.getModel("lineStyle"),h=o.getModel("areaStyle"),u=a.get("show"),c=o.get("show"),d=l.get("color"),p=h.get("color");d=i.isArray(d)?d:[d],p=i.isArray(p)?p:[p];var g=[],f=[];if("circle"===r)for(var y=n[0].getTicksCoords(),x=e.cx,m=e.cy,v=0;v<y.length;v++){if(u){var b=P(g,d,v);g[b].push(new s.Circle({shape:{cx:x,cy:m,r:y[v].coord}}))}if(c&&v<y.length-1){var b=P(f,p,v);f[b].push(new s.Ring({shape:{cx:x,cy:m,r0:y[v].coord,r:y[v+1].coord}}))}}else for(var w,M=i.map(n,function(t,n){var r=t.getTicksCoords();return w=null==w?r.length-1:Math.min(r.length-1,w),i.map(r,function(t){return e.coordToPoint(t.coord,n)})}),_=[],v=0;v<=w;v++){for(var A=[],S=0;S<n.length;S++)A.push(M[S][v]);if(A[0]&&A.push(A[0].slice()),u){var b=P(g,d,v);g[b].push(new s.Polyline({shape:{points:A}}))}if(c&&_){var b=P(f,p,v-1);f[b].push(new s.Polygon({shape:{points:A.concat(_)}}))}_=A.slice().reverse()}var C=l.getLineStyle(),I=h.getAreaStyle();i.each(f,function(t,e){this.group.add(s.mergePath(t,{style:i.defaults({stroke:"none",fill:p[e%p.length]},I),silent:!0}))},this),i.each(g,function(t,e){this.group.add(s.mergePath(t,{style:i.defaults({fill:"none",stroke:d[e%d.length]},C),silent:!0}))},this)}function P(t,e,n){var r=n%e.length;return t[r]=t[r]||[],r}}})},26514:function(t,e,n){n(1748),n(74353)},96729:function(t,e,n){var r=n(47475);n(593),n(13389),n(11049),n(57498),n(77858),r.extendComponentView({type:"single"})},76356:function(t,e,n){var r=n(47475),i=n(81255);n(44368),n(23157),n(4753),n(93151),r.registerPreprocessor(i)},4753:function(t,e,n){var r=n(66023),i=n(29497),a=n(9084),s=i.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});r.mixin(s,a),t.exports=s},93151:function(t,e,n){var r=n(66023),i=n(71497),a=n(36653),s=n(76165),o=n(68006),l=n(92604),h=n(84588),u=n(87557).createSymbol,c=n(16978),d=n(98763),p=n(20438).encodeHTML,g=r.bind,f=r.each,y=Math.PI;function x(t,e,n,i,a,s){var o=e.get("color");a?(a.setColor(o),n.add(a),s&&s.onUpdate(a)):((a=u(t.get("symbol"),-1,-1,2,2,o)).setStyle("strokeNoScale",!0),n.add(a),s&&s.onCreate(a));var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),i=r.merge({rectHover:!0,z2:100},i,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,i.scale=h;var c=t.get("symbolOffset");if(c){var p=i.position=i.position||[0,0];p[0]+=d.parsePercent(c[0],h[0]),p[1]+=d.parsePercent(c[1],h[1])}var g=t.get("symbolRotate");return i.rotation=(g||0)*Math.PI/180||0,a.attr(i),a.updateTransform(),a}function m(t,e,n,r,i){if(!t.dragging){var a=r.getModel("checkpointStyle"),s=n.dataToCoord(r.getData().get(["value"],e));i||!a.get("animation",!0)?t.attr({position:[s,0]}):(t.stopAnimation(!0),t.animateTo({position:[s,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}t.exports=l.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,n,r){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),a=this._createGroup("mainGroup"),s=this._createGroup("labelGroup"),o=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return p(o.scale.getLabel(t))},f(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](i,a,o,t)},this),this._renderAxisLabel(i,s,o,t),this._position(i,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n,r,i,a,s,l,h=t.get("label.position"),u=t.get("orient"),c=(n=t,r=e,o.getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()},n.get("padding")));null==h||"auto"===h?h="horizontal"===u?c.y+c.height/2<e.getHeight()/2?"-":"+":c.x+c.width/2<e.getWidth()/2?"+":"-":isNaN(h)&&(h=({horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}})[u][h]);var d={horizontal:"center",vertical:h>=0||"+"===h?"left":"right"},p={horizontal:h>=0||"+"===h?"top":"bottom",vertical:"middle"},g="vertical"===u?c.height:c.width,f=t.getModel("controlStyle"),x=f.get("show",!0),m=x?f.get("itemSize"):0,v=x?f.get("itemGap"):0,b=m+v,w=t.get("label.rotate")||0;w=w*y/180;var M=f.get("position",!0),_=x&&f.get("showPlayBtn",!0),A=x&&f.get("showPrevBtn",!0),S=x&&f.get("showNextBtn",!0),C=0,I=g;return"left"===M||"bottom"===M?(_&&(i=[0,0],C+=b),A&&(a=[C,0],C+=b)):(_&&(i=[I-m,0],I-=b),A&&(a=[0,0],C+=b)),S&&(s=[I-m,0],I-=b),l=[C,I],t.get("inverse")&&l.reverse(),{viewRect:c,mainLength:g,orient:u,rotation:({horizontal:0,vertical:y/2})[u],labelRotation:w,labelPosOpt:h,labelAlign:t.get("label.align")||d[u],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||p[u],playPosition:i,prevBtnPosition:a,nextBtnPosition:s,axisExtent:l,controlSize:m,controlGap:v}},_position:function(t,e){var n=this._mainGroup,r=this._labelGroup,i=t.viewRect;if("vertical"===t.orient){var s=a.create(),o=i.x,l=i.y+i.height;a.translate(s,s,[-o,-l]),a.rotate(s,s,-y/2),a.translate(s,s,[o,l]),(i=i.clone()).applyTransform(s)}var h=m(i),u=m(n.getBoundingRect()),c=m(r.getBoundingRect()),d=n.position,p=r.position;p[0]=d[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var f=+("+"!==g);v(d,u,h,1,f),v(p,c,h,1,1-f)}else{var f=g>=0?0:1;v(d,u,h,1,f),p[1]=d[1]+g}function x(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,r,i){t[r]+=n[r][i]-e[r][i]}n.attr("position",d),r.attr("position",p),n.rotation=r.rotation=t.rotation,x(n),x(r)},_createAxis:function(t,e){var n=e.getData(),r=e.get("axisType"),i=c.createScaleByModel(e,r);i.getTicks=function(){return n.mapArray(["value"],function(t){return t})};var a=n.getDataExtent("value");i.setExtent(a[0],a[1]),i.niceTicks();var s=new h("value",i,t.axisExtent,r);return s.model=e,s},_createGroup:function(t){var e=this["_"+t]=new s.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,n,i){var a=n.getExtent();i.get("lineStyle.show")&&e.add(new s.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r.extend({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,n,r){var i=r.getData();f(n.scale.getTicks(),function(t){var a=n.dataToCoord(t),o=i.getItemModel(t),l=o.getModel("itemStyle"),h=o.getModel("emphasis.itemStyle"),u=x(o,l,e,{position:[a,0],onclick:g(this._changeTimeline,this,t)});s.setHoverStyle(u,h.getItemStyle()),o.get("tooltip")?(u.dataIndex=t,u.dataModel=r):u.dataIndex=u.dataModel=null},this)},_renderAxisLabel:function(t,e,n,r){if(n.getLabelModel().get("show")){var i=r.getData();f(n.getViewLabels(),function(r){var a=r.tickValue,o=i.getItemModel(a),l=o.getModel("label"),h=o.getModel("emphasis.label"),u=n.dataToCoord(r.tickValue),c=new s.Text({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:g(this._changeTimeline,this,a),silent:!1});s.setTextStyle(c.style,l,{text:r.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(c),s.setHoverStyle(c,s.setTextStyle({},h))},this)}},_renderControl:function(t,e,n,a){var o=t.controlSize,l=t.rotation,h=a.getModel("controlStyle").getItemStyle(),u=a.getModel("emphasis.controlStyle").getItemStyle(),c=[0,-o/2,o,o],d=a.getPlayState(),p=a.get("inverse",!0);function f(t,n,d,p){if(t){var g,f,y,x,m=(g=a,f=n,y=c,x={position:t,origin:[o/2,0],rotation:p?-l:0,rectHover:!0,style:h,onclick:d},s.makePath(g.get(f).replace(/^path:\/\//,""),r.clone(x||{}),new i(y[0],y[1],y[2],y[3]),"center"));e.add(m),s.setHoverStyle(m,u)}}f(t.nextBtnPosition,"controlStyle.nextIcon",g(this._changeTimeline,this,p?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",g(this._changeTimeline,this,p?"+":"-")),f(t.playPosition,"controlStyle."+(d?"stopIcon":"playIcon"),g(this._handlePlayClick,this,!d),!0)},_renderCurrentPointer:function(t,e,n,r){var i=r.getData(),a=r.getCurrentIndex(),s=i.getItemModel(a).getModel("checkpointStyle"),o=this;this._currentPointer=x(s,s,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=g(o._handlePointerDrag,o),t.ondragend=g(o._handlePointerDragend,o),m(t,a,n,r,!0)},onUpdate:function(t){m(t,a,n,r)}})},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],r=this._axis,i=d.asc(r.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var a=this._findNearestTick(n),s=this.model;(e||a!==s.getCurrentIndex()&&s.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(g(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return s.applyTransform(t,e,!0)},_findNearestTick:function(t){var e,n=this.model.getData(),r=1/0,i=this._axis;return n.each(["value"],function(n,a){var s=Math.abs(i.dataToCoord(n)-t);s<r&&(r=s,e=a)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}})},84588:function(t,e,n){var r=n(66023),i=n(11237),a=function(t,e,n,r){i.call(this,t,e,n),this.type=r||"value",this.model=null};a.prototype={constructor:a,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},r.inherits(a,i),t.exports=a},29497:function(t,e,n){var r=n(66023),i=n(76056),a=n(90942),s=n(70018),o=i.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){o.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,i=this._names=[];if("category"===n){var o=[];r.each(e,function(t,e){var n,a=s.getDataItemValue(t);r.isObject(t)?(n=r.clone(t)).value=e:n=e,o.push(n),!r.isString(a)&&(null==a||isNaN(a))&&(a=""),i.push(a+"")}),e=o}(this._data=new a([{name:"value",type:{category:"ordinal",time:"time"}[n]||"number"}],this)).initData(e,i)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});t.exports=o},92604:function(t,e,n){t.exports=n(11648).extend({type:"timeline"})},81255:function(t,e,n){var r=n(66023);function i(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},s=i.normal||(i.normal={}),o={normal:1,emphasis:1};r.each(i,function(t,e){o[e]||a(s,e)||(s[e]=t)}),n.label&&!a(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function a(t,e){return t.hasOwnProperty(e)}t.exports=function(t){var e=t&&t.timeline;r.isArray(e)||(e=e?[e]:[]),r.each(e,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};if(n[e]&&(t.axisType=n[e],delete t.type),i(t),a(t,"controlPosition")){var s=t.controlStyle||(t.controlStyle={});a(s,"position")||(s.position=t.controlPosition),"none"!==s.position||a(s,"show")||(s.show=!1,delete s.position),delete t.controlPosition}r.each(t.data||[],function(t){r.isObject(t)&&!r.isArray(t)&&(!a(t,"value")&&a(t,"name")&&(t.value=t.name),i(t))})}(t)})}},23157:function(t,e,n){var r=n(47475),i=n(66023);r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline"),i.defaults({currentIndex:n.option.currentIndex},t)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)})},44368:function(t,e,n){n(76056).registerSubTypeDefaulter("timeline",function(){return"slider"})},34870:function(t,e,n){var r=n(47475),i=n(76165),a=n(68006).getLayoutRect;r.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),r.extendComponentView({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var r=this.group,s=t.getModel("textStyle"),o=t.getModel("subtextStyle"),l=t.get("textAlign"),h=t.get("textBaseline"),u=new i.Text({style:i.setTextStyle({},s,{text:t.get("text"),textFill:s.getTextColor()},{disableBox:!0}),z2:10}),c=u.getBoundingRect(),d=t.get("subtext"),p=new i.Text({style:i.setTextStyle({},o,{text:d,textFill:o.getTextColor(),y:c.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),g=t.get("link"),f=t.get("sublink"),y=t.get("triggerEvent",!0);u.silent=!g&&!y,p.silent=!f&&!y,g&&u.on("click",function(){window.open(g,"_"+t.get("target"))}),f&&p.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),u.eventData=p.eventData=y?{componentType:"title",componentIndex:t.componentIndex}:null,r.add(u),d&&r.add(p);var x=r.getBoundingRect(),m=t.getBoxLayoutParams();m.width=x.width,m.height=x.height;var v=a(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||("middle"===(l=t.get("left")||t.get("right"))&&(l="center"),"right"===l?v.x+=v.width:"center"===l&&(v.x+=v.width/2)),h||("center"===(h=t.get("top")||t.get("bottom"))&&(h="middle"),"bottom"===h?v.y+=v.height:"middle"===h&&(v.y+=v.height/2),h=h||"top"),r.attr("position",[v.x,v.y]);var b={textAlign:l,textVerticalAlign:h};u.setStyle(b),p.setStyle(b),x=r.getBoundingRect();var w=v.margin,M=t.getItemStyle(["color","opacity"]);M.fill=t.get("backgroundColor");var _=new i.Rect({shape:{x:x.x-w[3],y:x.y-w[0],width:x.width+w[1]+w[3],height:x.height+w[0]+w[2],r:t.get("borderRadius")},style:M,silent:!0});i.subPixelOptimizeRect(_),r.add(_)}}})},41336:function(t,e,n){n(90224),n(5474),n(47611),n(98821),n(1029),n(98867),n(37173)},90224:function(t,e,n){var r=n(47475),i=n(66023),a=n(40412),s=r.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){s.superApply(this,"optionUpdated",arguments),i.each(this.option.feature,function(t,e){var n=a.get(e);n&&i.merge(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});t.exports=s},5474:function(t,e,n){var r=n(47475),i=n(66023),a=n(99280),s=n(40412),o=n(76165),l=n(27611),h=n(13593),u=n(81166);t.exports=r.extendComponentView({type:"toolbox",render:function(t,e,n,r){var c=this.group;if(c.removeAll(),t.get("show")){var d=+t.get("itemSize"),p=t.get("feature")||{},g=this._features||(this._features={}),f=[];i.each(p,function(t,e){f.push(e)}),new h(this._featureNames||[],f).add(y).update(y).remove(i.curry(y,null)).execute(),this._featureNames=f,u.layout(c,t,n),c.add(u.makeBackground(c.getBoundingRect(),t)),c.eachChild(function(t){var e=t.__title,r=t.hoverStyle;if(r&&e){var i=a.getBoundingRect(e,a.makeFont(r)),s=t.position[0]+c.position[0],o=t.position[1]+c.position[1]+d,l=!1;o+i.height>n.getHeight()&&(r.textPosition="top",l=!0);var h=l?-5-i.height:d+8;s+i.width/2>n.getWidth()?(r.textPosition=["100%",h],r.textAlign="right"):s-i.width/2<0&&(r.textPosition=[0,h],r.textAlign="left")}})}function y(a,h){var u,y=f[a],x=f[h],m=new l(p[y],t,t.ecModel);if(y&&!x){if(0===y.indexOf("my"))u={model:m,onclick:m.option.onclick,featureName:y};else{var v=s.get(y);if(!v)return;u=new v(m,e,n)}g[y]=u}else{if(!(u=g[x]))return;u.model=m,u.ecModel=e,u.api=n}if(!y&&x){u.dispose&&u.dispose(e,n);return}if(!m.get("show")||u.unusable){u.remove&&u.remove(e,n);return}(function(r,a,s){var l=r.getModel("iconStyle"),h=r.getModel("emphasis.iconStyle"),u=a.getIcons?a.getIcons():r.get("icon"),p=r.get("title")||{};if("string"==typeof u){var g=u,f=p;p={},(u={})[s]=g,p[s]=f}var y=r.iconPaths={};i.each(u,function(s,u){var g=o.createIcon(s,{},{x:-d/2,y:-d/2,width:d,height:d});g.setStyle(l.getItemStyle()),g.hoverStyle=h.getItemStyle(),o.setHoverStyle(g),t.get("showTitle")&&(g.__title=p[u],g.on("mouseover",function(){var t=h.getItemStyle();g.setStyle({text:p[u],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){g.setStyle({textFill:null})})),g.trigger(r.get("iconStatus."+u)||"normal"),c.add(g),g.on("click",i.bind(a.onclick,a,e,n,u)),y[u]=g})})(m,u,y),m.setIconStatus=function(t,e){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,r[t]&&r[t].trigger(e)},u.render&&u.render(m,e,n,r)}},updateView:function(t,e,n,r){i.each(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,r)})},remove:function(t,e){i.each(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){i.each(this._features,function(n){n.dispose&&n.dispose(t,e)})}})},50443:function(t,e,n){var r=n(66023),i=n(40412),a=n(66934).toolbox.brush;function s(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}s.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.clone(a.title)};var o=s.prototype;o.render=o.updateView=function(t,e,n){var i,a,s;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,a=t.brushOption.brushMode||"single",s|=t.areas.length}),this._brushType=i,this._brushMode=a,r.each(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?s:e===i)?"emphasis":"normal")})},o.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return r.each(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},o.onclick=function(t,e,n){var r=this._brushType,i=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},i.register("brush",s),t.exports=s},1029:function(t,e,n){var r=n(47475),i=n(66023),a=n(3006),s=n(66934),o=n(40412),l=s.toolbox.dataView,h=Array(60).join("-");function u(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var c=RegExp("[	]+","g");function d(t){this._dom=null,this.model=t}d.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i.clone(l.title),lang:i.clone(l.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},d.prototype.onclick=function(t,e){var n,r,s,o,l,d,p,g=e.getDom(),f=this.model;this._dom&&g.removeChild(this._dom);var y=document.createElement("div");y.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",y.style.backgroundColor=f.get("backgroundColor")||"#fff";var x=document.createElement("h4"),m=f.get("lang")||[];x.innerHTML=m[0]||f.get("title"),x.style.cssText="margin: 10px 20px;",x.style.color=f.get("textColor");var v=document.createElement("div"),b=document.createElement("textarea");v.style.cssText="display:block;width:100%;overflow:auto;";var w=f.get("optionToContent"),M=f.get("contentToOption"),_=(p=(n={},r=[],s=[],t.eachRawSeries(function(t){var e=t.coordinateSystem;if(e&&("cartesian2d"===e.type||"polar"===e.type)){var i=e.getBaseAxis();if("category"===i.type){var a=i.dim+"_"+i.index;n[a]||(n[a]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},s.push({axisDim:i.dim,axisIndex:i.index})),n[a].series.push(t)}else r.push(t)}else r.push(t)}),{seriesGroupByCategoryAxis:n,other:r,meta:s}),{value:i.filter([(o=p.seriesGroupByCategoryAxis,l=[],i.each(o,function(t,e){var n=t.categoryAxis,r=t.valueAxis.dim,a=[" "].concat(i.map(t.series,function(t){return t.name})),s=[n.model.getCategories()];i.each(t.series,function(t){s.push(t.getRawData().mapArray(r,function(t){return t}))});for(var o=[a.join("	")],h=0;h<s[0].length;h++){for(var u=[],c=0;c<s.length;c++)u.push(s[c][h]);o.push(u.join("	"))}l.push(o.join("\n"))}),l.join("\n\n"+h+"\n\n")),(d=p.other,i.map(d,function(t){var e=t.getRawData(),n=[t.name],r=[];return e.each(e.dimensions,function(){for(var t=arguments.length,i=arguments[t-1],a=e.getName(i),s=0;s<t-1;s++)r[s]=arguments[s];n.push((a?a+"	":"")+r.join("	"))}),n.join("\n")}).join("\n\n"+h+"\n\n"))],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+h+"\n\n"),meta:p.meta});if("function"==typeof w){var A=w(e.getOption());"string"==typeof A?v.innerHTML=A:i.isDom(A)&&v.appendChild(A)}else v.appendChild(b),b.readOnly=f.get("readOnly"),b.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",b.style.color=f.get("textColor"),b.style.borderColor=f.get("textareaBorderColor"),b.style.backgroundColor=f.get("textareaColor"),b.value=_.value;var S=_.meta,C=document.createElement("div");C.style.cssText="position:absolute;bottom:0;left:0;right:0;";var I="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",P=document.createElement("div"),T=document.createElement("div");I+=";background-color:"+f.get("buttonColor")+";color:"+f.get("buttonTextColor");var k=this;function L(){g.removeChild(y),k._dom=null}a.addEventListener(P,"click",L),a.addEventListener(T,"click",function(){var t,n,r,a;try{"function"==typeof M?t=M(v,e.getOption()):(n=b.value,r=n.split(RegExp("\n*"+h+"\n*","g")),a={series:[]},i.each(r,function(t,e){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf("	")>=0)return!0}(t)){var n=function(t){for(var e=t.split(/\n+/g),n=u(e.shift()).split(c),r=[],a=i.map(n,function(t){return{name:t,data:[]}}),s=0;s<e.length;s++){var o=u(e[s]).split(c);r.push(o.shift());for(var l=0;l<o.length;l++)a[l]&&(a[l].data[s]=o[l])}return{series:a,categories:r}}(t),r=S[e],s=r.axisDim+"Axis";r&&(a[s]=a[s]||[],a[s][r.axisIndex]={data:n.categories},a.series=a.series.concat(n.series))}else{var n=function(t){for(var e=t.split(/\n+/g),n=u(e.shift()),r=[],i=0;i<e.length;i++){var a,s=u(e[i]).split(c),o="",l=!1;isNaN(s[0])?(l=!0,o=s[0],s=s.slice(1),r[i]={name:o,value:[]},a=r[i].value):a=r[i]=[];for(var h=0;h<s.length;h++)a.push(+s[h]);1===a.length&&(l?r[i].value=a[0]:r[i]=a[0])}return{name:n,data:r}}(t);a.series.push(n)}}),t=a)}catch(t){throw L(),Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),L()}),P.innerHTML=m[1],T.innerHTML=m[2],T.style.cssText=I,P.style.cssText=I,f.get("readOnly")||C.appendChild(T),C.appendChild(P),a.addEventListener(b,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,n=this.selectionStart,r=this.selectionEnd;this.value=e.substring(0,n)+"	"+e.substring(r),this.selectionStart=this.selectionEnd=n+1,a.stop(t)}}),y.appendChild(x),y.appendChild(v),y.appendChild(C),v.style.height=g.clientHeight-80+"px",g.appendChild(y),this._dom=y},d.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},d.prototype.dispose=function(t,e){this.remove(t,e)},o.register("dataView",d),r.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];i.each(t.newOption.series,function(t){var r=e.getSeriesByName(t.name)[0];if(r){var a,s=r.get("data");n.push({name:t.name,data:(a=t.data,i.map(a,function(t,e){var n=s&&s[e];return i.isObject(n)&&!i.isArray(n)?(i.isObject(t)&&!i.isArray(t)&&(t=t.value),i.defaults({value:t},n)):t}))})}else n.push(i.extend({type:"scatter"},t))}),e.mergeOption(i.defaults({series:n},t.newOption))}),t.exports=d},98867:function(t,e,n){var r=n(47475),i=n(66023),a=n(40844),s=n(30170),o=n(18058),l=n(28542),h=n(66934),u=n(40412);n(34683);var c=h.toolbox.dataZoom,d=i.each;function p(t,e,n){(this._brushController=new a(n.getZr())).on("brush",i.bind(this._onBrush,this)).mount(),this._isZoomActive}p.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i.clone(c.title)};var g=p.prototype;g.render=function(t,e,n,r){var i,a,l,h,u,c,d,p,g;this.model=t,this.ecModel=e,this.api=n,i=t,a=e,l=this,h=r,u=n,c=l._isZoomActive,h&&"takeGlobalCursor"===h.type&&(c="dataZoomSelect"===h.key&&h.dataZoomSelectActive),l._isZoomActive=c,i.setIconStatus("zoom",c?"emphasis":"normal"),d=new s(y(i.option),a,{include:["grid"]}),l._brushController.setPanels(d.makePanelOpts(u,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!c&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}),p=t,g=e,p.setIconStatus("back",o.count(g)>1?"emphasis":"normal")},g.onclick=function(t,e,n){f[n].call(this)},g.remove=function(t,e){this._brushController.unmount()},g.dispose=function(t,e){this._brushController.dispose()};var f={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(o.pop(this.ecModel))}};function y(t){var e={};return i.each(["xAxisIndex","yAxisIndex"],function(n){e[n]=t[n],null==e[n]&&(e[n]="all"),(!1===e[n]||"none"===e[n])&&(e[n]=[])}),e}g._onBrush=function(t,e){if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new s(y(this.model.option),r,{include:["grid"]}).matchOutputRanges(t,r,function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}}),o.push(r,n),this._dispatchZoomAction(n)}function i(t,e,i){var a,s,o,h=e.getAxis(t),u=h.model,c=(a=t,s=u,r.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(a,s.componentIndex)&&(o=t)}),o),d=c.findRepresentativeAxisProxy(u).getMinMaxSpan();(null!=d.minValueSpan||null!=d.maxValueSpan)&&(i=l(0,i.slice(),h.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),c&&(n[c.id]={dataZoomId:c.id,startValue:i[0],endValue:i[1]})}},g._dispatchZoomAction=function(t){var e=[];d(t,function(t,n){e.push(i.clone(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},u.register("dataZoom",p),r.registerPreprocessor(function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);i.isArray(e)||(t.dataZoom=e=[e]);var n=t.toolbox;if(n&&(i.isArray(n)&&(n=n[0]),n&&n.feature)){var r=n.feature.dataZoom;a("xAxis",r),a("yAxis",r)}}function a(n,r){if(r){var a,s,o,l=n+"Index",h=r[l];null==h||"all"===h||i.isArray(h)||(h=!1===h||"none"===h?[]:[h]),a=n,s=function(t,r){if(null==h||"all"===h||-1!==i.indexOf(h,r)){var a={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+n+r};a[l]=r,e.push(a)}},o=t[a],i.isArray(o)||(o=o?[o]:[]),d(o,s)}}}),t.exports=p},98821:function(t,e,n){var r=n(47475),i=n(66023),a=n(66934),s=n(40412),o=a.toolbox.magicType;function l(t){this.model=t}l.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i.clone(o.title),option:{},seriesIndex:{}};var h=l.prototype;h.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return i.each(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var u={line:function(t,e,n,r){if("bar"===t)return i.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,e,n,r){if("line"===t)return i.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,e,n,r){if("line"===t||"bar"===t)return i.merge({id:e,stack:"__ec_magicType_stack__"},r.get("option.stack")||{},!0)},tiled:function(t,e,n,r){if("line"===t||"bar"===t)return i.merge({id:e,stack:""},r.get("option.tiled")||{},!0)}},c=[["line","bar"],["stack","tiled"]];h.onclick=function(t,e,n){var r=this.model,a=r.get("seriesIndex."+n);if(u[n]){var s={series:[]};i.each(c,function(t){i.indexOf(t,n)>=0&&i.each(t,function(t){r.setIconStatus(t,"normal")})}),r.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},function(e){var a=e.subType,o=e.id,l=u[n](a,o,e,r);l&&(i.defaults(l,e.option),s.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===n||"bar"===n)){var c=h.getAxesByScale("ordinal")[0];if(c){var d=c.dim+"Axis",p=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;s[d]=s[d]||[];for(var g=0;g<=p;g++)s[d][p]=s[d][p]||{};s[d][p].boundaryGap="bar"===n}}}),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:s})}},r.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),s.register("magicType",l),t.exports=l},37173:function(t,e,n){var r=n(47475),i=n(18058),a=n(66934),s=n(40412);function o(t){this.model=t}o.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:a.toolbox.restore.title},o.prototype.onclick=function(t,e,n){i.clear(t),e.dispatchAction({type:"restore",from:this.uid})},s.register("restore",o),r.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),t.exports=o},47611:function(t,e,n){var r=n(57674),i=n(66934),a=n(40412),s=i.toolbox.saveAsImage;function o(t){this.model=t}o.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:s.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:s.lang.slice()},o.prototype.unusable=!r.canvasSupported,o.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),s=n.get("type",!0)||"png";a.download=i+"."+s,a.target="_blank";var o=e.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(a.href=o,"function"!=typeof MouseEvent||r.browser.ie||r.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var l=atob(o.split(",")[1]),h=l.length,u=new Uint8Array(h);h--;)u[h]=l.charCodeAt(h);var c=new Blob([u]);window.navigator.msSaveOrOpenBlob(c,i+"."+s)}else{var d=n.get("lang"),p='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(d&&d[0]||"")+'" /></body>';window.open().document.write(p)}else{var g=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(g)}},a.register("saveAsImage",o),t.exports=o},40412:function(t,e){var n={};e.register=function(t,e){n[t]=e},e.get=function(t){return n[t]}},27017:function(t,e,n){var r=n(47475);n(57498),n(76115),n(2719),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})},4198:function(t,e,n){var r=n(66023),i=n(53453),a=n(3006),s=n(57674),o=n(20438),l=r.each,h=o.toCamelCase,u=["","-webkit-","-moz-","-o-"];function c(t,e){if(s.wxa)return null;var n=document.createElement("div"),r=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var i=this;n.onmouseenter=function(){i._enterable&&(clearTimeout(i._hideTimeout),i._show=!0),i._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!i._enterable){var n=r.handler;a.normalizeEvent(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){i._enterable&&i._show&&i.hideLater(i._hideDelay),i._inContent=!1}}c.prototype={constructor:c,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e,n,a,c,d,p,g,f,y,x,m=this.el;m.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(e=[],n=t.get("transitionDuration"),a=t.get("backgroundColor"),c=t.getModel("textStyle"),d=t.get("padding"),n&&e.push((g="left "+n+"s "+(p="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+n+"s "+p,r.map(u,function(t){return t+"transition:"+g}).join(";"))),a&&(s.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+i.toHex(a)),e.push("filter:alpha(opacity=70)"))),l(["width","color","radius"],function(n){var r="border-"+n,i=h(r),a=t.get(i);null!=a&&e.push(r+":"+a+("color"===n?"":"px"))}),e.push((f=[],y=c.get("fontSize"),(x=c.getTextColor())&&f.push("color:"+x),f.push("font:"+c.getFont()),y&&f.push("line-height:"+Math.round(3*y/2)+"px"),l(["decoration","align"],function(t){var e=c.get(t);e&&f.push("text-"+t+":"+e)}),f.join(";"))),null!=d&&e.push("padding:"+o.normalizeCssArray(d).join("px ")+"px"),e.join(";")+";")+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),m.style.display=m.innerHTML?"block":"none",m.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,r=this._zr;r&&r.painter&&(n=r.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var i=this.el.style;i.left=t+"px",i.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},t.exports=c},76115:function(t,e,n){t.exports=n(47475).extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}})},38947:function(t,e,n){var r=n(66023),i=n(77894);function a(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}a.prototype={constructor:a,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var r={},a=t,s="{marker",o=a.indexOf(s);o>=0;){var l=a.indexOf("|}"),h=a.substr(o+s.length,l-o-s.length);h.indexOf("sub")>-1?r["marker"+h]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[h],textOffset:[3,0]}:r["marker"+h]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[h]},o=(a=a.substr(l+1)).indexOf("{marker")}this.el=new i({style:{rich:r,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(r.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}},t.exports=a},2719:function(t,e,n){var r=n(47475),i=n(66023),a=n(57674),s=n(4198),o=n(38947),l=n(20438),h=n(98763),u=n(76165),c=n(28693),d=n(68006),p=n(27611),g=n(21774),f=n(16978),y=n(50272),x=n(70018).getTooltipRenderMode,m=i.bind,v=i.each,b=h.parsePercent,w=new u.Rect({shape:{x:-1,y:-1,width:2,height:2}});function M(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(p.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new p(n,e,e.ecModel))}return e}function _(t,e){return t.dispatchAction||i.bind(e.dispatchAction,e)}function A(t){return"center"===t||"middle"===t}t.exports=r.extendComponentView({type:"tooltip",init:function(t,e){if(!a.node){var n,r=t.getComponent("tooltip").get("renderMode");this._renderMode=x(r),"html"===this._renderMode?(n=new s(e.getDom(),e),this._newLine="<br/>"):(n=new o(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,n){if(!a.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var r=this._tooltipContent;r.update(),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");g.register("itemTooltip",this._api,m(function(e,n,r){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,r):"leave"===e&&this._hide(r))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY})})}},manuallyShowTip:function(t,e,n,r){if(r.from!==this.uid&&!a.node){var i=_(r,n);this._ticket="";var s=r.dataByCoordSys;if(r.tooltip&&null!=r.x&&null!=r.y)w.position=[r.x,r.y],w.update(),w.tooltip=r.tooltip,this._tryShow({offsetX:r.x,offsetY:r.y,target:w},i);else if(s)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,event:{},dataByCoordSys:r.dataByCoordSys,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,r))return;var o=c(r,e),l=o.point[0],h=o.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:r.position,target:o.el,event:{}},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target,event:{}},i))}},manuallyHideTip:function(t,e,n,r){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,r.from!==this.uid&&this._hide(_(r,n))},_manuallyAxisShowTip:function(t,e,n,r){var i=r.seriesIndex,a=r.dataIndex,s=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=a&&null!=s){var o=e.getSeriesByIndex(i);if(o){var t=M([o.getData().getItemModel(a),o,(o.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:a,position:r.position}),!0}}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=i.bind(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,r=this._tooltipModel,a=[e.offsetX,e.offsetY],s=[],o=[],h=M([e.tooltipOption,r]),u=this._renderMode,c=this._newLine,d={};v(t,function(t){v(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value,a=[];if(e&&null!=r){var h=y.getValueLabel(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);i.each(t.seriesDataIndices,function(s){var l=n.getSeriesByIndex(s.seriesIndex),c=s.dataIndexInside,p=l&&l.getDataParams(c);if(p.axisDim=t.axisDim,p.axisIndex=t.axisIndex,p.axisType=t.axisType,p.axisId=t.axisId,p.axisValue=f.getAxisRawValue(e.axis,r),p.axisValueLabel=h,p){o.push(p);var g,y=l.formatTooltip(c,!0,null,u);if(i.isObject(y)){g=y.html;var x=y.markers;i.merge(d,x)}else g=y;a.push(g)}}),"html"!==u?s.push(a.join(c)):s.push((h?l.encodeHTML(h)+c:"")+a.join(c))}})},this),s.reverse(),s=s.join(this._newLine+this._newLine);var p=e.position;this._showOrMove(h,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(h,p,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(h,s,o,Math.random(),a[0],a[1],p,void 0,d)})},_showSeriesItemTooltip:function(t,e,n){var r,a,s=this._ecModel,o=e.seriesIndex,l=s.getSeriesByIndex(o),h=e.dataModel||l,u=e.dataIndex,c=e.dataType,d=h.getData(),p=M([d.getItemModel(u),h,l&&(l.coordinateSystem||{}).model,this._tooltipModel]),g=p.get("trigger");if(null==g||"item"===g){var f=h.getDataParams(u,c),y=h.formatTooltip(u,!1,c,this._renderMode);i.isObject(y)?(r=y.html,a=y.markers):(r=y,a=null);var x="item_"+h.name+"_"+u;this._showOrMove(p,function(){this._showTooltipContent(p,r,f,x,t.offsetX,t.offsetY,t.position,t.target,a)}),n({type:"showTip",dataIndexInside:u,dataIndex:d.getRawIndex(u),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var r=e.tooltip;if("string"==typeof r){var i=r;r={content:i,formatter:i}}var a=new p(r,this._tooltipModel,this._ecModel),s=a.get("content"),o=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,s,a.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,r,i,a,s,o,h){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,c=t.get("formatter");s=s||t.get("position");var d=e;if(c&&"string"==typeof c)d=l.formatTpl(c,n,!0);else if("function"==typeof c){var p=m(function(e,r){e===this._ticket&&(u.setContent(r,h,t),this._updatePosition(t,s,i,a,u,n,o))},this);this._ticket=r,d=c(n,r,p)}u.setContent(d,h,t),u.show(t),this._updatePosition(t,s,i,a,u,n,o)}},_updatePosition:function(t,e,n,r,a,s,o){var l=this._api.getWidth(),h=this._api.getHeight();e=e||t.get("position");var u=a.getSize(),c=t.get("align"),p=t.get("verticalAlign"),g=o&&o.getBoundingRect().clone();if(o&&g.applyTransform(o.transform),"function"==typeof e&&(e=e([n,r],s,a.el,g,{viewSize:[l,h],contentSize:u.slice()})),i.isArray(e))n=b(e[0],l),r=b(e[1],h);else if(i.isObject(e)){e.width=u[0],e.height=u[1];var f=d.getLayoutRect(e,{width:l,height:h});n=f.x,r=f.y,c=null,p=null}else if("string"==typeof e&&o){var y=function(t,e,n){var r=n[0],i=n[1],a=0,s=0,o=e.width,l=e.height;switch(t){case"inside":a=e.x+o/2-r/2,s=e.y+l/2-i/2;break;case"top":a=e.x+o/2-r/2,s=e.y-i-5;break;case"bottom":a=e.x+o/2-r/2,s=e.y+l+5;break;case"left":a=e.x-r-5,s=e.y+l/2-i/2;break;case"right":a=e.x+o+5,s=e.y+l/2-i/2}return[a,s]}(e,g,u);n=y[0],r=y[1]}else{var x,m,v,w,M,_,S,C,I,P,y=(x=n,m=r,v=a,w=l,M=h,_=c?null:20,S=p?null:20,I=(C=v.getOuterSize()).width,P=C.height,null!=_&&(x+I+_>w?x-=I+_:x+=_),null!=S&&(m+P+S>M?m-=P+S:m+=S),[x,m]);n=y[0],r=y[1]}if(c&&(n-=A(c)?u[0]/2:"right"===c?u[0]:0),p&&(r-=A(p)?u[1]/2:"bottom"===p?u[1]:0),t.get("confine")){var T,k,L,D,R,N,O,j,y=(T=n,k=r,L=a,D=l,R=h,O=(N=L.getOuterSize()).width,j=N.height,T=Math.min(T+O,D)-O,k=Math.min(k+j,R)-j,[T=Math.max(T,0),k=Math.max(k,0)]);n=y[0],r=y[1]}a.moveTo(n,r)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&v(e,function(e,r){var i=e.dataByAxis||{},a=(t[r]||{}).dataByAxis||[];(n&=i.length===a.length)&&v(i,function(t,e){var r=a[e]||{},i=t.seriesDataIndices||[],s=r.seriesDataIndices||[];(n&=t.value===r.value&&t.axisType===r.axisType&&t.axisId===r.axisId&&i.length===s.length)&&v(i,function(t,e){var r=s[e];n&=t.seriesIndex===r.seriesIndex&&t.dataIndex===r.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){a.node||(this._tooltipContent.hide(),g.unregister("itemTooltip",e))}})},4781:function(t,e,n){n(34457),n(35991)},7744:function(t,e,n){var r=n(66023),i=n(56863),a=n(98763),s=i.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){s.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){s.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=20),(null==t[1]||isNaN(t[1]))&&(t[1]=140)},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):r.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){i.prototype.completeVisualOption.apply(this,arguments),r.each(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=a.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimension(i),function(e,n){t[0]<=e&&e<=t[1]&&r.push(n)},this),e.push({seriesId:n.id,dataIndex:r})},this),e},getVisualMeta:function(t){var e=o(this,"outOfRange",this.getExtent()),n=o(this,"inRange",this.option.range.slice()),r=[];function i(e,n){r.push({value:e,color:t(e,n)})}for(var a=0,s=0,l=n.length,h=e.length;s<h&&(!n.length||e[s]<=n[0]);s++)e[s]<n[a]&&i(e[s],"outOfRange");for(var u=1;a<l;a++,u=0)u&&r.length&&i(n[a],"outOfRange"),i(n[a],"inRange");for(var u=1;s<h;s++)(!n.length||n[n.length-1]<e[s])&&(u&&(r.length&&i(r[r.length-1].value,"outOfRange"),u=0),i(e[s],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}}});function o(t,e,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],a=[],s=0;s<=200&&i<n[1];s++)a.push(i),i+=r;return a.push(n[1]),a}t.exports=s},55941:function(t,e,n){var r=n(66023),i=n(53429),a=n(3006),s=n(8541),o=n(76165),l=n(98763),h=n(28542),u=n(86655),c=n(70018),d=l.linearMap,p=r.each,g=Math.min,f=Math.max,y=s.extend({type:"visualMap.continuous",init:function(){y.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){if(e){var r=e[1-n];r=null!=r?r+"":"";var i=this.visualMapModel,a=i.get("textGap"),s=i.itemSize,l=this._shapes.barGroup,h=this._applyTransform([s[0]/2,0===n?-a:s[1]+a],l),u=this._applyTransform(0===n?"bottom":"top",l),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new o.Text({style:{x:h[0],y:h[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:r,textFont:d.getFont(),textFill:d.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,a=this._orient,s=this._useHandle,o=u.getItemAlign(e,this.api,i),l=n.barGroup=this._createBarGroup(o);l.add(n.outOfRange=x()),l.add(n.inRange=x(null,s?v(this._orient):null,r.bind(this._dragHandle,this,"all",!1),r.bind(this._dragHandle,this,"all",!0)));var h=e.textStyleModel.getTextRect("国"),c=f(h.width,h.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(l,0,i,c,a,o),this._createHandle(l,1,i,c,a,o)),this._createIndicator(l,i,c,a),t.add(l)},_createHandle:function(t,e,n,i,s){var l,h,u=r.bind(this._dragHandle,this,e,!1),c=r.bind(this._dragHandle,this,e,!0),d=x((l=e,h=i,0===l?[[0,0],[h,0],[h,-h]]:[[0,0],[h,0],[h,h]]),v(this._orient),u,c);d.position[0]=n[0],t.add(d);var p=this.visualMapModel.textStyleModel,g=new o.Text({draggable:!0,drift:u,onmousemove:function(t){a.stop(t.event)},ondragend:c,style:{x:0,y:0,text:"",textFont:p.getFont(),textFill:p.getTextColor()}});this.group.add(g);var f=["horizontal"===s?i/2:1.5*i,"horizontal"===s?0===e?-(1.5*i):1.5*i:0===e?-i/2:i/2],y=this._shapes;y.handleThumbs[e]=d,y.handleLabelPoints[e]=f,y.handleLabels[e]=g},_createIndicator:function(t,e,n,r){var i=x([[0,0]],"move");i.position[0]=e[0],i.attr({invisible:!0,silent:!0}),t.add(i);var a=this.visualMapModel.textStyleModel,s=new o.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(s);var l=this._shapes;l.indicator=i,l.indicatorLabel=s,l.indicatorLabelPoint=["horizontal"===r?n/2:9,0]},_dragHandle:function(t,e,n,r){if(this._useHandle){if(this._dragging=!e,!e){var i=this._applyTransform([n,r],this._shapes.barGroup,!0);this._updateInterval(t,i[1]),this._updateView()}!this.visualMapModel.get("realtime")===e&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():m(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),r=[0,t.itemSize[1]];this._handleEnds=[d(e[0],n,r,!0),d(e[1],n,r,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];h(e,r,i,t,0);var a=n.getExtent();this._dataInterval=[d(r[0],i,a,!0),d(r[1],i,a,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),r=this._shapes,i=[0,e.itemSize[1]],a=t?i:this._handleEnds,s=this._createBarVisual(this._dataInterval,n,a,"inRange"),o=this._createBarVisual(n,n,i,"outOfRange");r.inRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),r.outOfRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),this._updateHandle(a,s)},_createBarVisual:function(t,e,n,r){var a={forceState:r,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,a),o=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)],l=this._createBarPoints(n,o);return{barColor:new i(0,0,0,1,s),barPoints:l,handlesColor:[s[0].color,s[s.length-1].color]}},_makeColorGradient:function(t,e){var n=[],r=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var i=1;i<100;i++){var a=t[0]+r*i;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:i/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new o.Group("horizontal"===e&&!n?{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2}:"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"===e&&!n?{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"left"===t?[1,1]:[-1,1]})},_updateHandle:function(t,e){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels;p([0,1],function(s){var l=i[s];l.setStyle("fill",e.handlesColor[s]),l.position[1]=t[s];var h=o.applyTransform(n.handleLabelPoints[s],o.getTransform(l,this.group));a[s].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[s]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===s?"bottom":"top":"left",n.barGroup)})},this)}},_showIndicator:function(t,e,n,r){var i=this.visualMapModel,a=i.getExtent(),s=i.itemSize,l=d(t,a,[0,s[1]],!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",(c=!!n,p=r,y=l,x=s[1],c?[[0,-g(p,f(y,0))],[6,0],[0,g(p,f(x-y,0))]]:[[0,0],[5,-5],[5,5]]));var c,p,y,x,m=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",m);var v=o.applyTransform(h.indicatorLabelPoint,o.getTransform(u,this.group)),b=h.indicatorLabel;b.attr("invisible",!1);var w=this._applyTransform("left",h.barGroup),M=this._orient;b.setStyle({text:(n||"")+i.formatValueText(e),textVerticalAlign:"horizontal"===M?w:"middle",textAlign:"horizontal"===M?"center":w,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var n=t.visualMapModel.itemSize,r=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);r[1]=g(f(0,r[1]),n[1]),t._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on("mouseout",function(){t._hovering=!1,t._dragging||t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i,a,s,o,l,h=[0,r[1]],p=n.getExtent();t=g(f(h[0],t),h[1]);var y=(i=n,a=p,s=h,o=6,(l=i.get("hoverLinkDataSize"))&&(o=d(l,a,s,!0)/2),o),x=[t-y,t+y],v=d(t,h,p,!0),b=[d(x[0],h,p,!0),d(x[1],h,p,!0)];x[0]<h[0]&&(b[0]=-1/0),x[1]>h[1]&&(b[1]=1/0),e&&(b[0]===-1/0?this._showIndicator(v,b[1],"< ",y):b[1]===1/0?this._showIndicator(v,b[0],"> ",y):this._showIndicator(v,v,"≈ ",y));var w=this._hoverLinkDataIndices,M=[];(e||m(n))&&(M=this._hoverLinkDataIndices=n.findTargetDataIndices(b));var _=c.compressBatches(w,M);this._dispatchHighDown("downplay",u.convertDataIndex(_[0])),this._dispatchHighDown("highlight",u.convertDataIndex(_[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,n=this.visualMapModel;if(e&&null!=e.dataIndex){var r=this.ecModel.getSeriesByIndex(e.seriesIndex);if(n.isTargetSeries(r)){var i=r.getData(e.dataType),a=i.get(n.getDataDimension(i),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",u.convertDataIndex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var a=o.getTransform(e,i?null:this.group);return o[r.isArray(t)?"applyTransform":"transformDirection"](t,a,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function x(t,e,n,r){return new o.Polygon({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){a.stop(t.event)},ondragend:r})}function m(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function v(t){return"vertical"===t?"ns-resize":"ew-resize"}t.exports=y},67320:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(56863),a=n(95138),s=n(61224),o=n(98763).reformIntervals,l=i.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){l.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();h[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=r.clone(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=r.map(this._pieceList,function(t){var t=r.clone(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var t=this.option,e={},n=a.listVisualTypes(),o=this.isCategory();function l(t,e,n){return t&&t[e]&&(r.isObject(t[e])?t[e].hasOwnProperty(n):t[e]===n)}r.each(t.pieces,function(t){r.each(n,function(n){t.hasOwnProperty(n)&&(e[n]=1)})}),r.each(e,function(e,n){var i=0;r.each(this.stateList,function(e){i|=l(t,e,n)||l(t.target,e,n)},this),i||r.each(this.stateList,function(e){(t[e]||(t[e]={}))[n]=s.get(n,"inRange"===e?"active":"inactive",o)})},this),i.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var n=this.option,i=this._pieceList,a=(e?n:t).selected||{};if(n.selected=a,r.each(i,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode){var s=!1;r.each(i,function(t,e){var n=this.getSelectedMapKey(t);a[n]&&(s?a[n]=!1:s=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=r.clone(t)},getValueState:function(t){var e=a.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimension(i),function(e,n){a.findPieceIndex(e,this._pieceList)===t&&r.push(n)},this),e.push({seriesId:n.id,dataIndex:r})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var s=a[0].interval[0];s!==-1/0&&a.unshift({interval:[-1/0,s]}),(s=a[a.length-1].interval[1])!==1/0&&a.push({interval:[s,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return r.each(a,function(t){var e=t.interval;e&&(e[0]>o&&l([o,e[0]],"outOfRange"),l(e.slice()),o=e[1])},this),{stops:e,outerColors:n}}function l(r,a){var s=i.getRepresentValue({interval:r});a||(a=i.getValueState(s));var o=t(s,a);r[0]===-1/0?n[0]=o:r[1]===1/0?n[1]=o:e.push({value:r[0],color:o},{value:r[1],color:o})}}}),h={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),a=t.splitNumber;t.splitNumber=a=Math.max(parseInt(a,10),1);for(var s=(i[1]-i[0])/a;+s.toFixed(n)!==s&&n<5;)n++;t.precision=n,s=+s.toFixed(n);var l=0;t.minOpen&&e.push({index:l++,interval:[-1/0,i[0]],close:[0,0]});for(var h=i[0],u=l+a;l<u;h+=s){var c=l===a-1?i[1]:h+s;e.push({index:l++,interval:[h,c],close:[1,1]})}t.maxOpen&&e.push({index:l++,interval:[i[1],1/0],close:[0,0]}),o(e),r.each(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;r.each(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),u(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;r.each(t.pieces,function(t,n){r.isObject(t)||(t={value:t});var i={text:"",index:n};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var s=i.value=t.value;i.interval=[s,s],i.close=[1,1]}else{for(var o=i.interval=[],l=i.close=[0,0],h=[1,0,1],u=[-1/0,1/0],c=[],d=0;d<2;d++){for(var p=[["gte","gt","min"],["lte","lt","max"]][d],g=0;g<3&&null==o[d];g++)o[d]=t[p[g]],l[d]=h[g],c[d]=2===g;null==o[d]&&(o[d]=u[d])}c[0]&&o[1]===1/0&&(l[0]=0),c[1]&&o[0]===-1/0&&(l[1]=0),o[0]===o[1]&&l[0]&&l[1]&&(i.value=o[0])}i.visual=a.retrieveVisuals(t),e.push(i)},this),u(t,e),o(e),r.each(e,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};function u(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}t.exports=l},11689:function(t,e,n){var r=n(66023),i=n(8541),a=n(76165),s=n(87557).createSymbol,o=n(68006),l=n(86655);t.exports=i.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,s=i.getFont(),l=i.getTextColor(),h=this._getItemAlign(),u=e.itemSize,c=this._getViewData(),d=c.endsText,p=r.retrieve(e.get("showLabel",!0),!d);d&&this._renderEndsText(t,d[0],u,p,h),r.each(c.viewPieceList,function(i){var o=i.piece,c=new a.Group;c.onclick=r.bind(this._onItemClick,this,o),this._enableHoverLink(c,i.indexInModelPieceList);var d=e.getRepresentValue(o);if(this._createItemSymbol(c,d,[0,0,u[0],u[1]]),p){var g=this.visualMapModel.getValueState(d);c.add(new a.Text({style:{x:"right"===h?-n:u[0]+n,y:u[1]/2,text:o.text,textVerticalAlign:"middle",textAlign:h,textFont:s,textFill:l,opacity:"outOfRange"===g?.5:1}}))}t.add(c)},this),d&&this._renderEndsText(t,d[1],u,p,h),o.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){t.on("mouseover",r.bind(n,this,"highlight")).on("mouseout",r.bind(n,this,"downplay"));function n(t){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:t,batch:l.convertDataIndex(n.findTargetDataIndices(e))})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return l.getItemAlign(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,r,i){if(e){var s=new a.Group,o=this.visualMapModel.textStyleModel;s.add(new a.Text({style:{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:r?i:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(s)}},_getViewData:function(){var t=this.visualMapModel,e=r.map(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),a=t.get("inverse");return("horizontal"===i?a:!a)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(s(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=r.clone(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[a]=!0,r.each(i,function(t,e){i[e]=e===a})):i[a]=!i[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}})},56863:function(t,e,n){var r=n(47475),i=n(66023),a=n(57674),s=n(61224),o=n(95138),l=n(49002),h=n(70018),u=n(98763),c=o.mapVisual,d=o.eachVisual,p=i.isArray,g=i.each,f=u.asc,y=u.linearMap,x=i.noop;t.exports=r.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;a.canvasSupported||(n.realtime=!1),e||l.replaceVisualOption(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=i.bind(t,this),this.controllerVisuals=l.createVisualMappings(this.option.controller,e,t),this.targetVisuals=l.createVisualMappings(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,n){e.push(n)}):e=h.normalizeToArray(t),e},eachTargetSeries:function(t,e){i.each(this.getTargetSeriesIndices(),function(n){t.call(e,this.ecModel.getSeriesByIndex(n))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},formatValueText:function(t,e,n){var r,a,s=this.option,o=s.precision,l=this.dataBound,h=s.formatter;if(n=n||["<",">"],i.isArray(t)&&(t=t.slice(),r=!0),a=e?t:r?[u(t[0]),u(t[1])]:u(t),i.isString(h))return h.replace("{value}",r?a[0]:a).replace("{value2}",r?a[1]:a);if(i.isFunction(h))return r?h(t[0],t[1]):h(t);if(!r)return a;if(t[0]===l[0])return n[0]+" "+a[1];if(t[1]===l[1])return n[1]+" "+a[0];return a[0]+" - "+a[1];function u(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(o,20))}},resetExtent:function(){var t=this.option,e=f([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var r=t.dimensions,i=r.length-1;i>=0;i--){var a=r[i];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},r=e.target||(e.target={}),a=e.controller||(e.controller={});i.merge(r,n),i.merge(a,n);var l=this.isCategory();function h(n){p(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},g(this.stateList,function(t){var e=n[t];if(i.isString(e)){var r=s.get(e,"active",l);r?(n[t]={},n[t][e]=r):delete n[t]}},this)}h.call(this,r),h.call(this,a),(function(t,e,n){var r=t[e],i=t[n];r&&!i&&(i=t[n]={},g(r,function(t,e){if(o.isValidType(e)){var n=s.get(e,"inactive",l);null!=n&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}).call(this,r,"inRange","outOfRange"),(function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");g(this.stateList,function(a){var s=this.itemSize,o=t[a];o||(o=t[a]={color:l?r:[r]}),null==o.symbol&&(o.symbol=e&&i.clone(e)||(l?"roundRect":["roundRect"])),null==o.symbolSize&&(o.symbolSize=n&&i.clone(n)||(l?s[0]:[s[0],s[0]])),o.symbol=c(o.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var h=o.symbolSize;if(null!=h){var u=-1/0;d(h,function(t){t>u&&(u=t)}),o.symbolSize=c(h,function(t){return y(t,[0,u],[0,s[0]],!0)})}},this)}).call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:x,getValueState:x,getVisualMeta:x})},8541:function(t,e,n){var r=n(47475),i=n(66023),a=n(76165),s=n(20438),o=n(68006),l=n(95138);t.exports=r.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,n,r){if(this.visualMapModel=t,!1===t.get("show"))return void this.group.removeAll();this.doRender.apply(this,arguments)},renderBackground:function(t){var e=this.visualMapModel,n=s.normalizeCssArray(e.get("padding")||0),r=t.getBoundingRect();t.add(new a.Rect({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,n){var r=(n=n||{}).forceState,a=this.visualMapModel,s={};function o(t){return s[t]}function h(t,e){s[t]=e}"symbol"===e&&(s.symbol=a.get("itemSymbol")),"color"===e&&(s.color=a.get("contentColor"));var u=a.controllerVisuals[r||a.getValueState(t)],c=l.prepareVisualTypes(u);return i.each(c,function(r){var i=u[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",i=u.__alphaForOpacity),l.dependsOn(r,e)&&i&&i.applyVisual(t,o,h)}),s[e]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;o.positionElement(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:i.noop})},86655:function(t,e,n){var r=n(66023),i=n(68006).getLayoutRect;e.getItemAlign=function(t,e,n){var r=t.option,a=r.align;if(null!=a&&"auto"!==a)return a;for(var s={width:e.getWidth(),height:e.getHeight()},o=+("horizontal"===r.orient),l=[["left","right","width"],["top","bottom","height"]],h=l[o],u=[0,null,10],c={},d=0;d<3;d++)c[l[1-o][d]]=u[d],c[h[d]]=2===d?n[0]:r[h[d]];var p=[["x","width",3],["y","height",0]][o],g=i(c,s,r.padding);return h[(g.margin[p[2]]||0)+g[p[0]]+.5*g[p[1]]<.5*s[p[1]]?0:1]},e.convertDataIndex=function(t){return r.each(t||[],function(e){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}},81485:function(t,e,n){var r=n(66023),i=r.each;function a(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}t.exports=function(t){var e=t&&t.visualMap;r.isArray(e)||(e=e?[e]:[]),i(e,function(t){if(t){a(t,"splitList")&&!a(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&r.isArray(e)&&i(e,function(t){r.isObject(t)&&(a(t,"start")&&!a(t,"min")&&(t.min=t.start),a(t,"end")&&!a(t,"max")&&(t.max=t.end))})}})}},62102:function(t,e,n){n(76056).registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})},74680:function(t,e,n){var r=n(47475),i=n(66023),a=n(49002),s=n(95138),o=r.PRIORITY.VISUAL.COMPONENT;function l(t,e,n,r){for(var i=e.targetVisuals[r],a=s.prepareVisualTypes(i),o={color:t.getData().getVisual("color")},l=0,h=a.length;l<h;l++){var u=a[l],c=i["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,p)}return o.color;function d(t){return o[t]}function p(t,e){o[t]=e}}r.registerVisual(o,{createOnAllSeries:!0,reset:function(t,e){var n=[];return e.eachComponent("visualMap",function(e){var r=t.pipelineContext;!e.isTargetSeries(t)||r&&r.large||n.push(a.incrementalApplyVisual(e.stateList,e.targetVisuals,i.bind(e.getValueState,e),e.getDataDimension(t.getData())))}),n}}),r.registerVisual(o,{createOnAllSeries:!0,reset:function(t,e){var n=t.getData(),r=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var a=e.getVisualMeta(i.bind(l,null,t,e))||{stops:[],outerColors:[]},s=e.getDataDimension(n),o=n.getDimensionInfo(s);null!=o&&(a.dimension=o.index,r.push(a))}}),t.getData().setVisual("visualMeta",r)}})},96267:function(t,e,n){n(47475).registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})})},34457:function(t,e,n){var r=n(47475),i=n(81485);n(62102),n(74680),n(7744),n(55941),n(96267),r.registerPreprocessor(i)},35991:function(t,e,n){var r=n(47475),i=n(81485);n(62102),n(74680),n(67320),n(11689),n(96267),r.registerPreprocessor(i)},38603:function(t,e,n){var r;"undefined"!=typeof window?r=window.__DEV__:void 0!==n.g&&(r=n.g.__DEV__),void 0===r&&(r=!0),e.__DEV__=r},11237:function(t,e,n){var r=n(66023),i=r.each,a=r.map,s=n(98763),o=s.linearMap,l=s.getPixelPrecision,h=n(81176),u=h.createAxisTicks,c=h.createAxisLabels,d=h.calculateCategoryInterval,p=[0,1],g=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function f(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}g.prototype={constructor:g,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=n&&t<=r},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return l(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&f(n=n.slice(),r.count()),o(t,p,n,e)},coordToData:function(t,e){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&f(n=n.slice(),r.count());var i=o(t,n,p,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=u(this,e),r=a(n.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),s=e.get("alignWithLabel");return function(t,e,n,r,a){var s,o=e.length;if(t.onBand&&!r&&o){var l,h,u,c,d,p,g,f,y=t.getExtent();if(1===o)e[0].coord=y[0],s=e[1]={coord:y[0]};else{var x=e[1].coord-e[0].coord;i(e,function(t){t.coord-=x/2;var e=e||0;e%2>0&&(t.coord-=x/((e+1)*2))}),s={coord:e[o-1].coord+x},e.push(s)}var m=y[0]>y[1];l=e[0].coord,h=y[0],(m?l>h:l<h)&&(a?e[0].coord=y[0]:e.shift()),a&&(u=y[0],c=e[0].coord,m?u>c:u<c)&&e.unshift({coord:y[0]}),d=y[1],p=s.coord,(m?d>p:d<p)&&(a?s.coord=y[1]:e.pop()),a&&(g=s.coord,f=y[1],m?g>f:g<f)&&e.push({coord:y[1]})}}(this,r,n.tickCategoryInterval,s,t.clamp),r},getViewLabels:function(){return c(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+ +!!this.onBand;return 0===n&&(n=1),Math.abs(Math.abs(t[1]-t[0]))/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return d(this)}},t.exports=g},3115:function(t,e,n){var r=n(66023),i=n(3265),a=n(36653),s=n(71497),o=n(53733),l=i.applyTransform;function h(){o.call(this)}function u(t){this.name=t,this.zoomLimit,o.call(this),this._roamTransformable=new h,this._rawTransformable=new h,this._center,this._zoom}function c(t,e,n,r){var i=n.seriesModel,a=i?i.coordinateSystem:null;return a===this?a[t](r):null}r.mixin(h,o),u.prototype={constructor:u,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,r){return this._rect=new s(t,e,n,r),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,r){this.transformTo(t,e,n,r),this._viewRect=new s(t,e,n,r)},transformTo:function(t,e,n,r){var i=this.getBoundingRect(),a=this._rawTransformable;a.transform=i.calculateTransform(new s(t,e,n,r)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),r=this.getCenter(),a=this.getZoom();r=i.applyTransform([],r,t),n=i.applyTransform([],n,t),e.origin=r,e.position=[n[0]-r[0],n[1]-r[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),a.copy(this.transform||(this.transform=[]),e.transform||a.create()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],a.invert(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,n){var r=e?this._rawTransform:this.transform;return n=n||[],r?l(n,t,r):i.copy(n,t)},pointToData:function(t){var e=this.invTransform;return e?l([],t,e):[t[0],t[1]]},convertToPixel:r.curry(c,"dataToPoint"),convertFromPixel:r.curry(c,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},r.mixin(u,o),t.exports=u},27780:function(t,e,n){var r=n(66023),i={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},a={};a.categoryAxis=r.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},i),a.valueAxis=r.merge({boundaryGap:[0,0],splitNumber:5},i),a.timeAxis=r.defaults({scale:!0,min:"dataMin",max:"dataMax"},a.valueAxis),a.logAxis=r.defaults({scale:!0,logBase:10},a.valueAxis),t.exports=a},16978:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(78309),a=n(74323),s=n(3029),o=n(98763),l=n(42862),h=l.prepareLayoutBarSeries,u=l.makeColumnLayout,c=l.retrieveColumnLayout,d=n(71497);function p(t,e){var n=t.type,i=e.getMin(),a=e.getMax(),s=null!=i,l=null!=a,d=t.getExtent();"ordinal"===n?g=e.getCategories().length:(f=e.get("boundaryGap"),r.isArray(f)||(f=[f||0,f||0]),"boolean"==typeof f[0]&&(f=[0,0]),f[0]=o.parsePercent(f[0],1),f[1]=o.parsePercent(f[1],1),y=d[1]-d[0]||Math.abs(d[0])),null==i&&(i="ordinal"===n?g?0:NaN:d[0]-f[0]*y),null==a&&(a="ordinal"===n?g?g-1:NaN:d[1]+f[1]*y),"dataMin"===i?i=d[0]:"function"==typeof i&&(i=i({min:d[0],max:d[1]})),"dataMax"===a?a=d[1]:"function"==typeof a&&(a=a({min:d[0],max:d[1]})),null!=i&&isFinite(i)||(i=NaN),null!=a&&isFinite(a)||(a=NaN),t.setBlank(r.eqNaN(i)||r.eqNaN(a)||"ordinal"===n&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(i>0&&a>0&&!s&&(i=0),i<0&&a<0&&!l&&(a=0));var p=e.ecModel;if(p&&"time"===n){var g,f,y,x,m=h("bar",p);if(r.each(m,function(t){x|=t.getBaseAxis()===e.axis}),x){var v=function(t,e,n,i){var a=n.axis.getExtent(),s=a[1]-a[0],o=c(i,n.axis);if(void 0===o)return{min:t,max:e};var l=1/0;r.each(o,function(t){l=Math.min(t.offset,l)});var h=-1/0;r.each(o,function(t){h=Math.max(t.offset+t.width,h)});var u=(l=Math.abs(l))+(h=Math.abs(h)),d=e-t,p=d/(1-(l+h)/s)-d;return e+=h/u*p,{min:t-=l/u*p,max:e}}(i,a,e,u(m));i=v.min,a=v.max}}return[i,a]}function g(t){var e,n=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(e,i){return null!=r&&(i=e-r),n(f(t,e),i)}:function(e){return t.scale.getLabel(e)}}function f(t,e){return"category"===t.type?t.scale.getLabel(e):e}function y(t){var e=t.get("interval");return null==e?"auto":e}n(68494),n(98990),e.getScaleExtent=p,e.niceScaleExtent=function(t,e){var n=p(t,e),r=null!=e.getMin(),i=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var s=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:r,fixMax:i,minInterval:"interval"===s||"time"===s?e.get("minInterval"):null,maxInterval:"interval"===s||"time"===s?e.get("maxInterval"):null});var o=e.get("interval");null!=o&&t.setInterval&&t.setInterval(o)},e.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new i(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new a;default:return(s.getClass(e)||a).create(t)}},e.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),n=e[0],r=e[1];return!(n>0&&r>0||n<0&&r<0)},e.makeLabelFormatter=g,e.getAxisRawValue=f,e.estimateLabelUnionRect=function(t){var e,n,r,i=t.model,a=t.scale;if(!(!i.get("axisLabel.show")||a.isBlank())){var s="category"===t.type,o=a.getExtent();n=s?a.count():(e=a.getTicks()).length;var l=t.getLabelModel(),h=g(t),u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var p=h(e?e[c]:o[0]+c),f=function(t,e){var n=e*Math.PI/180,r=t.plain(),i=r.width,a=r.height,s=i*Math.cos(n)+a*Math.sin(n),o=i*Math.sin(n)+a*Math.cos(n);return new d(r.x,r.y,s,o)}(l.getTextRect(p),l.get("rotate")||0);r?r.union(f):r=f}return r}},e.getOptionCategoryInterval=y,e.shouldShowAllLabels=function(t){return"category"===t.type&&0===y(t.getLabelModel())}},80390:function(t,e,n){var r=n(66023);t.exports={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!r.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!r.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:r.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}}},42626:function(t,e,n){var r=n(66023),i=n(27780),a=n(76056),s=n(68006),o=s.getLayoutParams,l=s.mergeLayoutParam,h=n(5298),u=["value","category","time","log"];t.exports=function(t,e,n,s){r.each(u,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,i){var s=this.layoutMode,h=s?o(e):{},u=i.getTheme();r.merge(e,u.get(a+"Axis")),r.merge(e,this.getDefaultOption()),e.type=n(t,e),s&&l(e,h,s)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=h.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r.mergeAll([{},i[a+"Axis"],s],!0)})}),a.registerSubTypeDefaulter(t+"Axis",r.curry(n,t))}},81176:function(t,e,n){var r=n(66023),i=n(99280),a=n(70018).makeInner,s=n(16978),o=s.makeLabelFormatter,l=s.getOptionCategoryInterval,h=s.shouldShowAllLabels,u=a();function c(t,e){var n,i,a,s,o=d(t,"labels"),h=l(e),c=p(o,h);return c||(r.isFunction(h)?a=y(t,h):(s="auto"===h?null!=(i=u(n=t).autoInterval)?i:u(n).autoInterval=n.calculateCategoryInterval():h,a=f(t,s)),g(o,h,{labels:a,labelCategoryInterval:s}))}function d(t,e){return u(t)[e]||(u(t)[e]=[])}function p(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function g(t,e,n){return t.push({key:e,value:n}),n}function f(t,e,n){var r=o(t),i=t.scale,a=i.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),c=a[0],d=i.count();0!==c&&u>1&&d/u>2&&(c=Math.round(Math.ceil(c/u)*u));var p=h(t),g=s.get("showMinLabel")||p,f=s.get("showMaxLabel")||p;g&&c!==a[0]&&x(a[0]);for(var y=c;y<=a[1];y+=u)x(y);function x(t){l.push(n?t:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:t})}return f&&y!==a[1]&&x(a[1]),l}function y(t,e,n){var i=t.scale,a=o(t),s=[];return r.each(i.getTicks(),function(t){var r=i.getLabel(t);e(t,r)&&s.push(n?t:{formattedLabel:a(t),rawLabel:r,tickValue:t})}),s}e.createAxisLabels=function(t){var e,n,i,a,s,l;return"category"===t.type?(n=(e=t).getLabelModel(),i=c(e,n),!n.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i):(s=(a=t).scale.getTicks(),l=o(a),{labels:r.map(s,function(t,e){return{formattedLabel:l(t,e),rawLabel:a.scale.getLabel(t),tickValue:t}})})},e.createAxisTicks=function(t,e){return"category"===t.type?function(t,e){var n,i,a=d(t,"ticks"),s=l(e),o=p(a,s);if(o)return o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),r.isFunction(s))n=y(t,s,!0);else if("auto"===s){var h=c(t,t.getLabelModel());i=h.labelCategoryInterval,n=r.map(h.labels,function(t){return t.tickValue})}else n=f(t,i=s,!0);return g(a,s,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}},e.calculateCategoryInterval=function(t){var e,n,r=(n=(e=t).getLabelModel(),{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),a=o(t),s=(r.axisRotate-r.labelRotate)/180*Math.PI,l=t.scale,h=l.getExtent(),c=l.count();if(h[1]-h[0]<1)return 0;var d=1;c>40&&(d=Math.max(1,Math.floor(c/40)));for(var p=h[0],g=t.dataToCoord(p+1)-t.dataToCoord(p),f=Math.abs(g*Math.cos(s)),y=Math.abs(g*Math.sin(s)),x=0,m=0;p<=h[1];p+=d){var v=0,b=0,w=i.getBoundingRect(a(p),r.font,"center","top");v=1.3*w.width,b=1.3*w.height,x=Math.max(x,v,7),m=Math.max(m,b,7)}var M=x/f,_=m/y;isNaN(M)&&(M=1/0),isNaN(_)&&(_=1/0);var A=Math.max(0,Math.floor(Math.min(M,_))),S=u(t.model),C=S.lastAutoInterval,I=S.lastTickCount;return null!=C&&null!=I&&1>=Math.abs(C-A)&&1>=Math.abs(I-c)&&C>A?A=C:(S.lastTickCount=c,S.lastAutoInterval=A),A}},93779:function(t,e,n){var r=n(66023),i=n(68006),a=n(98763),s=n(33776);function o(t,e,n){this._model=t}function l(t,e,n,r){var i=n.calendarModel,a=n.seriesModel,s=i?i.coordinateSystem:a?a.coordinateSystem:null;return s===this?s[t](r):null}o.prototype={constructor:o,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=a.parseDate(t)).getFullYear(),n=t.getMonth()+1;n=n<10?"0"+n:n;var r=t.getDate();r=r<10?"0"+r:r;var i=t.getDay();return{y:e,m:n,d:r,day:i=Math.abs((i+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+r,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],s=this._model.get("cellSize").slice(),o=this._model.getBoxLayoutParams(),l="horizontal"===this._orient?[n,7]:[7,n];r.each([0,1],function(t){c(s,t)&&(o[a[t]]=s[t]*l[t])});var h={width:e.getWidth(),height:e.getHeight()},u=this._rect=i.getLayoutRect(o,h);function c(t,e){return null!=t[e]&&"auto"!==t[e]}r.each([0,1],function(t){c(s,t)||(s[t]=u[a[t]]/l[t])}),this._sw=s[0],this._sh=s[1]},dataToPoint:function(t,e){r.isArray(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,a=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];var s=n.day,o=this._getRangeInfo([i.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,r):this._getDateByWeeksAndDay(e,n-1,r)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(r.isArray(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var n=this.getDateInfo(e),i=n.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[n.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var s=this._getRangeInfo(t);return s.start.time>s.end.time&&t.reverse(),t},_getRangeInfo:function(t){(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var e,n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,r=new Date(t[0].time),i=r.getDate(),a=t[1].date.getDate();if(r.setDate(i+n-1),r.getDate()!==a)for(var s=r.getTime()-t[1].time>0?1:-1;r.getDate()!==a&&(r.getTime()-t[1].time)*s>0;)n-=s,r.setDate(i+n-1);var o=Math.floor((n+t[0].day+6)/7),l=e?-o+1:o-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:o,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var r=this._getRangeInfo(n);if(t>r.weeks||0===t&&e<r.fweek||t===r.weeks&&e>r.lweek)return!1;var i=(t-1)*7-r.fweek+e,a=new Date(r.start.time);return a.setDate(r.start.d+i),this.getDateInfo(a)}},o.dimensions=o.prototype.dimensions,o.getDimensionsInfo=o.prototype.getDimensionsInfo,o.create=function(t,e){var n=[];return t.eachComponent("calendar",function(r){var i=new o(r,t,e);n.push(i),r.coordinateSystem=i}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},s.register("calendar",o),t.exports=o},82834:function(t,e,n){var r=n(66023),i=n(76056),a=n(68006),s=a.getLayoutParams,o=a.sizeCalculable,l=a.mergeLayoutParam,h=i.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,r){var i=s(t);h.superApply(this,"init",arguments),u(t,i)},mergeOption:function(t,e){h.superApply(this,"mergeOption",arguments),u(this.option,t)}});function u(t,e){var n=t.cellSize;r.isArray(n)?1===n.length&&(n[1]=n[0]):n=t.cellSize=[n,n];var i=r.map([0,1],function(t){return o(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});l(t,e,{type:"box",ignoreSize:i})}t.exports=h},61226:function(t){t.exports=function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},80919:function(t,e,n){var r=n(66023),i=n(11237),a=function(t,e,n,r,a){i.call(this,t,e,n),this.type=r||"value",this.position=a||"bottom"};a.prototype={constructor:a,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[+("x"!==this.dim)]),e)},toLocalCoord:null,toGlobalCoord:null},r.inherits(a,i),t.exports=a},13452:function(t,e,n){var r=n(66023),i=n(76056),a=n(42626),s=n(80390),o=i.extend({type:"cartesian2dAxis",axis:null,init:function(){o.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){o.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){o.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function l(t,e){return e.type||(e.data?"category":"value")}r.merge(o.prototype,s);var h={offset:0};a("x",o,l,h),a("y",o,l,h),t.exports=o},66795:function(t,e,n){var r=n(66023);function i(t){return this._axes[t]}var a=function(t){this._axes={},this._dimList=[],this.name=t||""};a.prototype={constructor:a,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return r.map(this._dimList,i,this)},getAxesByScale:function(t){return t=t.toLowerCase(),r.filter(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,r=t instanceof Array?[]:{},i=0;i<n.length;i++){var a=n[i],s=this._axes[a];r[a]=s[e](t[a])}return r}},t.exports=a},58477:function(t,e,n){var r=n(66023),i=n(66795);function a(t){i.call(this,t)}a.prototype={constructor:a,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var r=this.getAxis("x"),i=this.getAxis("y");return(n=n||[])[0]=r.toGlobalCoord(r.dataToCoord(t[0])),n[1]=i.toGlobalCoord(i.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),a=r.getExtent(),s=n.parse(t[0]),o=r.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),o),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),r=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=r.coordToData(r.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},r.inherits(a,i),t.exports=a},34087:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=r.isObject,a=r.each,s=r.map,o=r.indexOf;r.retrieve;var l=n(68006).getLayoutRect,h=n(16978),u=h.createScaleByModel,c=h.ifAxisCrossZero,d=h.niceScaleExtent,p=h.estimateLabelUnionRect,g=n(58477),f=n(80919),y=n(33776),x=n(74733).getStackedDimension;function m(t,e,n){return t.getCoordSysModel()===e}function v(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}n(74541);var b=v.prototype;function w(t,e,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,a=t[e],s=n.model,o=s.get("axisLine.onZero"),l=s.get("axisLine.onZeroAxisIndex");if(o){if(null!=l)M(a[l])&&(i=a[l]);else for(var h in a)if(a.hasOwnProperty(h)&&M(a[h])&&!r[u(a[h])]){i=a[h];break}i&&(r[u(i)]=!0)}function u(t){return t.dim+"_"+t.index}}function M(t){return t&&"category"!==t.type&&"time"!==t.type&&c(t)}b.type="grid",b.axisPointerEnabled=!0,b.getRect=function(){return this._rect},b.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),a(n.x,function(t){d(t.scale,t.model)}),a(n.y,function(t){d(t.scale,t.model)});var r={};a(n.x,function(t){w(n,"y",t,r)}),a(n.y,function(t){w(n,"x",t,r)}),this.resize(this.model,e)},b.resize=function(t,e,n){var r=l(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var i=this._axesList;function s(){a(i,function(t){var e,n,i,a,s=t.isHorizontal(),o=s?[0,r.width]:[0,r.height],l=+!!t.inverse;t.setExtent(o[l],o[1-l]),e=t,n=s?r.x:r.y,a=(i=e.getExtent())[0]+i[1],e.toGlobalCoord="x"===e.dim?function(t){return t+n}:function(t){return a-t+n},e.toLocalCoord="x"===e.dim?function(t){return t-n}:function(t){return a-t+n}})}s(),!n&&t.get("containLabel")&&(a(i,function(t){if(!t.model.get("axisLabel.inside")){var e=p(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),s())},b.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e){for(var r in n)if(n.hasOwnProperty(r))return n[r]}return n[e]}},b.getAxes=function(){return this._axesList.slice()},b.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}i(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var r=0,a=this._coordsList;r<a.length;r++)if(a[r].getAxis("x").index===t||a[r].getAxis("y").index===e)return a[r]},b.getCartesians=function(){return this._coordsList.slice()},b.convertToPixel=function(t,e,n){var r=this._findConvertTarget(t,e);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},b.convertFromPixel=function(t,e,n){var r=this._findConvertTarget(t,e);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},b._findConvertTarget=function(t,e){var n,r,i=e.seriesModel,a=e.xAxisModel||i&&i.getReferringComponents("xAxis")[0],s=e.yAxisModel||i&&i.getReferringComponents("yAxis")[0],l=e.gridModel,h=this._coordsList;return i?0>o(h,n=i.coordinateSystem)&&(n=null):a&&s?n=this.getCartesian(a.componentIndex,s.componentIndex):a?r=this.getAxis("x",a.componentIndex):s?r=this.getAxis("y",s.componentIndex):l&&l.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:r}},b.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},b._initCartesian=function(t,e,n){var r={left:!1,right:!1,top:!1,bottom:!1},i={x:{},y:{}},s={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}function o(n){return function(a,o){if(m(a,t,e)){var l=a.get("position");"x"===n?"top"!==l&&"bottom"!==l&&r[l="bottom"]&&(l="top"===l?"bottom":"top"):"left"!==l&&"right"!==l&&r[l="left"]&&(l="left"===l?"right":"left"),r[l]=!0;var h=new f(n,u(a),[0,0],a.get("type"),l),c="category"===h.type;h.onBand=c&&a.get("boundaryGap"),h.inverse=a.get("inverse"),a.axis=h,h.model=a,h.grid=this,h.index=o,this._axesList.push(h),i[n][o]=h,s[n]++}}}this._axesMap=i,a(i.x,function(e,n){a(i.y,function(r,i){var a="x"+n+"y"+i,s=new g(a);s.grid=this,s.model=t,this._coordsMap[a]=s,this._coordsList.push(s),s.addAxis(e),s.addAxis(r)},this)},this)},b._updateScale=function(t,e){function n(t,e,n){a(t.mapDimension(e.dim,!0),function(n){e.scale.unionExtentFromData(t,x(t,n))})}a(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(r){if(S(r)){var i=A(r,t),a=i[0],s=i[1];if(m(a,e,t)&&m(s,e,t)){var o=this.getCartesian(a.componentIndex,s.componentIndex),l=r.getData(),h=o.getAxis("x"),u=o.getAxis("y");"list"===l.type&&(n(l,h,r),n(l,u,r))}}},this)},b.getTooltipAxes=function(t){var e=[],n=[];return a(this.getCartesians(),function(r){var i=null!=t&&"auto"!==t?r.getAxis(t):r.getBaseAxis(),a=r.getOtherAxis(i);0>o(e,i)&&e.push(i),0>o(n,a)&&n.push(a)}),{baseAxes:e,otherAxes:n}};var _=["xAxis","yAxis"];function A(t,e){return s(_,function(e){return t.getReferringComponents(e)[0]})}function S(t){return"cartesian2d"===t.get("coordinateSystem")}v.create=function(t,e){var n=[];return t.eachComponent("grid",function(r,i){var a=new v(r,t,e);a.name="grid_"+i,a.resize(r,e,!0),r.coordinateSystem=a,n.push(a)}),t.eachSeries(function(e){if(S(e)){var n=A(e,t),r=n[0],i=n[1];e.coordinateSystem=r.getCoordSysModel().coordinateSystem.getCartesian(r.componentIndex,i.componentIndex)}}),n},v.dimensions=v.prototype.dimensions=g.prototype.dimensions,y.register("cartesian2d",v),t.exports=v},74541:function(t,e,n){n(13452),t.exports=n(76056).extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}})},5592:function(t,e,n){var r=n(66023);e.layout=function(t,e,n){n=n||{};var i=t.coordinateSystem,a=e.axis,s={},o=a.getAxesOnZeroOf()[0],l=a.position,h=o?"onZero":l,u=a.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},g=e.get("offset")||0,f="x"===u?[d[2]-g,d[3]+g]:[d[0]-g,d[1]+g];if(o){var y=o.toGlobalCoord(o.dataToCoord(0));f[p.onZero]=Math.max(Math.min(y,f[1]),f[0])}s.position=["y"===u?f[p[h]]:d[0],"x"===u?f[p[h]]:d[3]],s.rotation=Math.PI/2*+("x"!==u),s.labelDirection=s.tickDirection=s.nameDirection=({top:-1,bottom:1,left:-1,right:1})[l],s.labelOffset=o?f[p[l]]-f[p.onZero]:0,e.get("axisTick.inside")&&(s.tickDirection=-s.tickDirection),r.retrieve(n.labelInside,e.get("axisLabel.inside"))&&(s.labelDirection=-s.labelDirection);var x=e.get("axisLabel.rotate");return s.labelRotate="top"===h?-x:x,s.z2=1,s}},807:function(t,e,n){var r=n(66023);function i(t,e){return e=e||[0,0],r.map(["x","y"],function(n,r){var i=this.getAxis(n),a=e[r],s=t[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(a-s)-i.dataToCoord(a+s))},this)}t.exports=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:r.bind(i,t)}}}},61979:function(t,e,n){var r=n(66023),i=n(71497),a=n(3115),s=n(70351);function o(t,e,n,r){a.call(this,t),this.map=e;var i=s.load(e,n);this._nameCoordMap=i.nameCoordMap,this._regionsMap=i.regionsMap,this._invertLongitute=null==r||r,this.regions=i.regions,this._rect=i.boundingRect}function l(t,e,n,r){var i=n.geoModel,a=n.seriesModel,s=i?i.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return s===this?s[t](r):null}o.prototype={constructor:o,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},transformTo:function(t,e,n,r){var a=this.getBoundingRect(),s=this._invertLongitute;a=a.clone(),s&&(a.y=-a.y-a.height);var o=this._rawTransformable;if(o.transform=a.calculateTransform(new i(t,e,n,r)),o.decomposeTransform(),s){var l=o.scale;l[1]=-l[1]}o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,n){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return a.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:r.curry(l,"dataToPoint"),convertFromPixel:r.curry(l,"pointToData")},r.mixin(o,a),t.exports=o},10649:function(t,e,n){var r=n(66023),i=n(70018),a=n(76056),s=n(27611),o=n(33601),l=n(85605),h=a.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){a.prototype.init.apply(this,arguments),i.defaultEmphasis(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=l.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=r.reduce(t.regions||[],function(t,n){return n.name&&t.set(n.name,new s(n,e)),t},r.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new s(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label."+e+".formatter"),r={name:t};return"function"==typeof n?(r.status=e,n(r)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});r.mixin(h,o),t.exports=h},41504:function(t,e,n){var r=n(71497),i=n(91273),a=n(3265),s=n(76703);function o(t,e,n){if(this.name=t,this.geometries=e,n)n=[n[0],n[1]];else{var r=this.getBoundingRect();n=[r.x+r.width/2,r.y+r.height/2]}this.center=n}o.prototype={constructor:o,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],s=[-e,-e],o=[],l=[],h=this.geometries,u=0;u<h.length;u++)if("polygon"===h[u].type){var c=h[u].exterior;i.fromPoints(c,o,l),a.min(n,n,o),a.max(s,s,l)}return 0===u&&(n[0]=n[1]=s[0]=s[1]=0),this._rect=new r(n[0],n[1],s[0]-n[0],s[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var r=0,i=n.length;r<i;r++)if("polygon"===n[r].type){var a=n[r].exterior,o=n[r].interiors;if(s.contain(a,t[0],t[1])){for(var l=0;l<(o?o.length:0);l++)if(s.contain(o[l]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var s=this.getBoundingRect(),o=s.width/s.height;n?i||(i=n/o):n=o*i;for(var l=new r(t,e,n,i),h=s.calculateTransform(l),u=this.geometries,c=0;c<u.length;c++)if("polygon"===u[c].type){for(var d=u[c].exterior,p=u[c].interiors,g=0;g<d.length;g++)a.applyTransform(d[g],d[g],h);for(var f=0;f<(p?p.length:0);f++)for(var g=0;g<p[f].length;g++)a.applyTransform(p[f][g],p[f][g],h)}(s=this._rect).copy(l),this.center=[s.x+s.width/2,s.y+s.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new o(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}},t.exports=o},10003:function(t){var e=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];t.exports=function(t,n){"china"===t&&"台湾"===n.name&&n.geometries.push({type:"polygon",exterior:e[0]})}},8394:function(t){var e={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};t.exports=function(t,n){if("world"===t){var r=e[n.name];if(r){var i=n.center;i[0]=r[0],i[1]=r[1]}}}},34175:function(t,e,n){for(var r=n(66023),i=n(41504),a=[126,25],s=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],o=0;o<s.length;o++)for(var l=0;l<s[o].length;l++)s[o][l][0]/=10.5,s[o][l][1]/=-14,s[o][l][0]+=a[0],s[o][l][1]+=a[1];t.exports=function(t,e){"china"===t&&e.push(new i("南海诸岛",r.map(s,function(t){return{type:"polygon",exterior:t}}),a))}},79380:function(t){var e={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};t.exports=function(t,n){if("china"===t){var r=e[n.name];if(r){var i=n.center;i[0]+=r[0]/10.5,i[1]+=-r[1]/14}}}},85605:function(t,e,n){n(38603).__DEV__;var r=n(47475),i=n(66023),a=n(61979),s=n(68006),o=n(98763),l=n(70351),h=n(55725);function u(t,e){var n,r,i=t.get("boundingCoords");if(null!=i){var a=i[0],l=i[1];isNaN(a[0])||isNaN(a[1])||isNaN(l[0])||isNaN(l[1])||this.setBoundingRect(a[0],a[1],l[0]-a[0],l[1]-a[1])}var h=this.getBoundingRect(),u=t.get("layoutCenter"),c=t.get("layoutSize"),d=e.getWidth(),p=e.getHeight(),g=h.width/h.height*this.aspectScale,f=!1;if(u&&c&&(u=[o.parsePercent(u[0],d),o.parsePercent(u[1],p)],c=o.parsePercent(c,Math.min(d,p)),isNaN(u[0])||isNaN(u[1])||isNaN(c)||(f=!0)),f){var r={};g>1?(r.width=c,r.height=c/g):(r.height=c,r.width=c*g),r.y=u[1]-r.height/2,r.x=u[0]-r.width/2}else(n=t.getBoxLayoutParams()).aspect=g,r=s.getLayoutRect(n,{width:d,height:p});this.setViewRect(r.x,r.y,r.width,r.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function c(t,e){i.each(e.get("geoCoord"),function(e,n){t.addGeoCoord(n,e)})}var d={dimensions:a.prototype.dimensions,create:function(t,e){var n=[];t.eachComponent("geo",function(t,r){var i=t.get("map"),s=t.get("aspectScale"),o=!0,l=h.retrieveMap(i);l&&l[0]&&"svg"===l[0].type?(null==s&&(s=1),o=!1):null==s&&(s=.75);var d=new a(i+r,i,t.get("nameMap"),o);d.aspectScale=s,d.zoomLimit=t.get("scaleLimit"),n.push(d),c(d,t),t.coordinateSystem=d,d.model=t,d.resize=u,d.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}});var r={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}}),i.each(r,function(t,r){var s=i.map(t,function(t){return t.get("nameMap")}),o=new a(r,r,i.mergeAll(s));o.zoomLimit=i.retrieve.apply(null,i.map(t,function(t){return t.get("scaleLimit")})),n.push(o),o.resize=u,o.aspectScale=t[0].get("aspectScale"),o.resize(t[0],e),i.each(t,function(t){t.coordinateSystem=o,c(o,t)})}),n},getFilledRegions:function(t,e,n){for(var r=(t||[]).slice(),a=i.createHashMap(),s=0;s<r.length;s++)a.set(r[s].name,r[s]);var o=l.load(e,n);return i.each(o.regions,function(t){var e=t.name;a.get(e)||r.push({name:e})}),r}};r.registerCoordinateSystem("geo",d),t.exports=d},2045:function(t,e,n){var r=n(66023).each,i=n(75376),a=n(70018).makeInner,s=n(34175),o=n(79380),l=n(8394),h=n(10003),u=a();t.exports={load:function(t,e){var n,a=u(e).parsed;if(a)return a;var c=e.specialAreas||{},d=e.geoJSON;try{n=d?i(d):[]}catch(t){throw Error("Invalid geoJson format\n"+t.message)}return r(n,function(e){var n=e.name;o(t,e),l(t,e),h(t,e);var r=c[n];r&&e.transformTo(r.left,r.top,r.width,r.height)}),s(t,n),u(e).parsed={regions:n,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var r=t[n].getBoundingRect();(e=e||r.clone()).union(r)}return e}(n)}}}},97418:function(t,e,n){var r=n(42640),i=r.parseSVG,a=r.makeViewBoxTransform,s=n(35601),o=n(54668),l=n(66023),h=l.assert,u=l.createHashMap,c=n(71497),d=(0,n(70018).makeInner)();function p(t,e){var n,r,l=t.svgXML;try{r=(n=l&&i(l,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,h(null!=r)}catch(t){throw Error("Invalid svg format\n"+t.message)}var u=n.width,d=n.height,p=n.viewBoxRect;if(e||(e=null==u||null==d?r.getBoundingRect():new c(0,0,0,0),null!=u&&(e.width=u),null!=d&&(e.height=d)),p){var g=a(p,e.width,e.height),f=r;(r=new s).add(f),f.scale=g.scale,f.position=g.position}return r.setClipPath(new o({shape:e.plain()})),{root:r,boundingRect:e}}t.exports={load:function(t,e){var n=d(e).originRoot;if(n)return{root:n,boundingRect:d(e).boundingRect};var r=p(e);return d(e).originRoot=r.root,d(e).boundingRect=r.boundingRect,r},makeGraphic:function(t,e,n){var r=d(e),i=r.rootMap||(r.rootMap=u()),a=i.get(n);if(a)return a;var s=r.originRoot,o=r.boundingRect;return r.originRootHostKey?a=p(e,o).root:(r.originRootHostKey=n,a=s),i.set(n,a)},removeGraphic:function(t,e,n){var r=d(e),i=r.rootMap;i&&i.removeKey(n),n===r.originRootHostKey&&(r.originRootHostKey=null)}}},70351:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=r.each,a=r.createHashMap,s=n(55725),o=n(2045),l=n(97418),h=n(71497),u={geoJSON:o,svg:l};function c(t){return function(e,n){var r=d(e),a=[];return i(r,function(r){var i=u[r.type][t];i&&a.push(i(e,r,n))}),a}}function d(t){return s.retrieveMap(t)||[]}t.exports={load:function(t,e){var n,r=[],s=a(),o=a();return i(d(t),function(a){var l=u[a.type].load(t,a);i(l.regions,function(t){var n=t.name;e&&e.hasOwnProperty(n)&&(t=t.cloneShallow(n=e[n])),r.push(t),s.set(n,t),o.set(n,t.center)});var h=l.boundingRect;h&&(n?n.union(h):n=h.clone())}),{regions:r,regionsMap:s,nameCoordMap:o,boundingRect:n||new h(0,0,0,0)}},makeGraphic:c("makeGraphic"),removeGraphic:c("removeGraphic")}},55725:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=r.createHashMap,a=r.isString,s=r.isArray,o=r.each;r.assert;var l=n(42640).parseXML,h=i(),u={geoJSON:function(t){var e=t.source;t.geoJSON=a(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):Function("return ("+e+");")():e},svg:function(t){t.svgXML=l(t.source)}};t.exports={registerMap:function(t,e,n){var r;return s(e)?r=e:e.svg?r=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),r=[{type:"geoJSON",source:e,specialAreas:n}]),o(r,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,u[e])(t)}),h.set(t,r)},retrieveMap:function(t){return h.get(t)}}},75376:function(t,e,n){var r=n(66023),i=n(41504);function a(t,e,n){for(var r=[],i=e[0],a=e[1],s=0;s<t.length;s+=2){var o=t.charCodeAt(s)-64,l=t.charCodeAt(s+1)-64;l=l>>1^-(1&l),o=(o>>1^-(1&o))+i,l+=a,i=o,a=l,r.push([o/n,l/n])}return r}t.exports=function(t){return!function(t){if(t.UTF8Encoding){var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,r=0;r<n.length;r++)for(var i=n[r].geometry,s=i.coordinates,o=i.encodeOffsets,l=0;l<s.length;l++){var h=s[l];if("Polygon"===i.type)s[l]=a(h,o[l],e);else if("MultiPolygon"===i.type)for(var u=0;u<h.length;u++){var c=h[u];h[u]=a(c,o[l][u],e)}}t.UTF8Encoding=!1}}(t),r.map(r.filter(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,n=t.geometry,a=n.coordinates,s=[];"Polygon"===n.type&&s.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===n.type&&r.each(a,function(t){t[0]&&s.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new i(e.name,s,e.cp);return o.properties=e,o})}},90777:function(t,e,n){var r=n(66023);function i(t,e){return e=e||[0,0],r.map([0,1],function(n){var r=e[n],i=t[n]/2,a=[],s=[];return a[n]=r-i,s[n]=r+i,a[1-n]=s[1-n]=e[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(s)[n])},this)}t.exports=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:r.bind(i,t)}}}},33371:function(t,e,n){var r=n(66023),i=n(76056),a=n(24954),s=n(42626),o=n(98763),l=n(80390),h=i.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return a([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=r.clone(t);if(e)for(var n=e.length-1;n>=0;n--)o.asc(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var r=0,i=e.length;r<i;r++)if(e[r][0]<=t&&t<=e[r][1])return"active";return"inactive"}});r.merge(h.prototype,l),s("parallel",h,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),t.exports=h},19201:function(t,e,n){var r=n(66023),i=n(36653),a=n(68006),s=n(16978),o=n(97224),l=n(76165),h=n(98763),u=n(28542),c=r.each,d=Math.min,p=Math.max,g=Math.floor,f=Math.ceil,y=h.round,x=Math.PI;function m(t,e,n){this._axesMap=r.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function v(t,e){return d(p(t,e[0]),e[1])}m.prototype={type:"parallel",constructor:m,_init:function(t,e,n){var r=t.dimensions,i=t.parallelAxisIndex;c(r,function(t,n){var r=i[n],a=e.getComponent("parallelAxis",r),l=this._axesMap.set(t,new o(t,s.createScaleByModel(a),[0,0],a.get("type"),r)),h="category"===l.type;l.onBand=h&&a.get("boundaryGap"),l.inverse=a.get("inverse"),a.axis=l,l.model=a,l.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,r=e.layoutBase,i=e.pixelDimIndex,a=t[1-i],s=t[i];return a>=n&&a<=n+e.axisLength&&s>=r&&s<=r+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var r=n.getData();c(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(r,r.mapDimension(t)),s.niceScaleExtent(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=a.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,r=["x","y"],i=["width","height"],a=e.get("layout"),s=+("horizontal"!==a),o=n[i[s]],l=[0,o],h=this.dimensions.length,u=v(e.get("axisExpandWidth"),l),c=v(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&o>0,p=e.get("axisExpandWindow");p?(t=v(p[1]-p[0],l),p[1]=p[0]+t):(t=v(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||g(h/2))-t/2])[1]=p[0]+t);var x=(o-t)/(h-c);x<3&&(x=0);var m=[g(y(p[0]/u,1))+1,f(y(p[1]/u,1))-1],b=x/u*p[0];return{layout:a,pixelDimIndex:s,layoutBase:n[r[s]],layoutLength:o,axisBase:n[r[1-s]],axisLength:n[i[1-s]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:x,axisExpandWindow:p,axisCount:h,winInnerIndices:m,axisExpandWindow0Pos:b}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),a=r.layout;e.each(function(t){var e=[0,r.axisLength],n=+!!t.inverse;t.setExtent(e[n],e[1-n])}),c(n,function(e,n){var s=(r.axisExpandable?function(t,e){var n,r,i=e.layoutLength,a=e.axisExpandWidth,s=e.axisCount,o=e.axisCollapseWidth,l=e.winInnerIndices,h=o,u=!1;return t<l[0]?(n=t*o,r=o):t<=l[1]?(n=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],h=a,u=!0):(n=i-(s-1-t)*o,r=o),{position:n,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:r}}:function(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}})(n,r),o={horizontal:{x:s.position,y:r.axisLength},vertical:{x:0,y:s.position}},l=[o[a].x+t.x,o[a].y+t.y],h={horizontal:x/2,vertical:0}[a],u=i.create();i.rotate(u,u,h),i.translate(u,u,l),this._axesLayout[e]={position:l,rotation:h,transform:u,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var a,s=this._axesMap,o=this.dimensions,l=[],h=[];r.each(o,function(e){l.push(t.mapDimension(e)),h.push(s.get(e).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){if(u){a="active";for(var d=t.getValues(l,c),p=0,g=o.length;p<g;p++)if("inactive"===h[p].getActiveState(d[p])){a="inactive";break}}else a="normal";e(a,c)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,n=!1,r=0,i=t.length;r<i;r++)"normal"!==e.get(t[r]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(t,e){var n=this._axesLayout[e];return l.applyTransform([t,0],n.transform)},getAxisLayout:function(t){return r.clone(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e,n=this._makeLayoutInfo(),r=n.pixelDimIndex,i=n.axisExpandWindow.slice(),a=i[1]-i[0],s=[0,n.axisExpandWidth*(n.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var o=t[r]-n.layoutBase-n.axisExpandWindow0Pos,l="slide",h=n.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),g=null!=c[0];if(h)g&&h&&o<a*c[0]?(l="jump",e=o-a*c[2]):g&&h&&o>a*(1-c[0])?(l="jump",e=o-a*(1-c[2])):(e=o-a*c[1])>=0&&(e=o-a*(1-c[1]))<=0&&(e=0),(e*=n.axisExpandWidth/h)?u(e,i,s,"all"):l="none";else{var a=i[1]-i[0];(i=[p(0,s[1]*o/a-a/2)])[1]=d(s[1],i[0]+a),i[0]=i[1]-a}return{axisExpandWindow:i,behavior:l}}},t.exports=m},97224:function(t,e,n){var r=n(66023),i=n(11237),a=function(t,e,n,r,a){i.call(this,t,e,n),this.type=r||"value",this.axisIndex=a};a.prototype={constructor:a,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},r.inherits(a,i),t.exports=a},59314:function(t,e,n){var r=n(66023),i=n(76056);n(33371),t.exports=i.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){i.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&r.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},setAxisExpand:function(t){r.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=r.filter(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);r.each(n,function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})}})},54249:function(t,e,n){var r=n(19201);n(33776).register("parallel",{create:function(t,e){var n=[];return t.eachComponent("parallel",function(i,a){var s=new r(i,t,e);s.name="parallel_"+a,s.resize(i,e),i.coordinateSystem=s,s.model=i,n.push(s)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var n=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=n.coordinateSystem}}),n}})},31879:function(t,e,n){var r=n(66023),i=n(70018);t.exports=function(t){var e,n;(function(t){if(!t.parallel){var e=!1;r.each(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}})(t),e=t,n=i.normalizeToArray(e.parallelAxis),r.each(n,function(t){if(r.isObject(t)){var n=t.parallelIndex||0,a=i.normalizeToArray(e.parallel)[n];a&&a.parallelAxisDefault&&r.merge(t,a.parallelAxisDefault,!1)}})}},10224:function(t,e,n){var r=n(66023),i=n(99280),a=n(11237),s=(0,n(70018).makeInner)();function o(t,e){e=e||[0,360],a.call(this,"angle",t,e),this.type="category"}o.prototype={constructor:o,pointToData:function(t,e){return this.polar.pointToData(t,e)[+("radius"!==this.dim)]},dataToAngle:a.prototype.dataToCoord,angleToData:a.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),r=e.count();if(n[1]-n[0]<1)return 0;var a=n[0],o=Math.abs(this.dataToCoord(a+1)-this.dataToCoord(a)),l=Math.max(i.getBoundingRect(a,t.getFont(),"center","top").height,7)/o;isNaN(l)&&(l=1/0);var h=Math.max(0,Math.floor(l)),u=s(this.model),c=u.lastAutoInterval,d=u.lastTickCount;return null!=c&&null!=d&&1>=Math.abs(c-h)&&1>=Math.abs(d-r)&&c>h?h=c:(u.lastTickCount=r,u.lastAutoInterval=h),h}},r.inherits(o,a),t.exports=o},57634:function(t,e,n){var r=n(66023),i=n(76056),a=n(42626),s=n(80390),o=i.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});r.merge(o.prototype,s);function l(t,e){return e.type||(e.data?"category":"value")}a("angle",o,l,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),a("radius",o,l,{splitNumber:5})},89646:function(t,e,n){var r=n(94288),i=n(10224),a=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new r,this._angleAxis=new i,this._radiusAxis.polar=this._angleAxis.polar=this};a.prototype={type:"polar",axisPointerEnabled:!0,constructor:a,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===t&&e.push(n),r.scale.type===t&&e.push(r),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);r.inverse?a=s-360:s=a+360;var o=Math.sqrt(e*e+n*n);e/=o;for(var l=Math.atan2(-(n/=o),e)/Math.PI*180,h=l<a?1:-1;l<a||l>s;)l+=360*h;return[o,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]}},t.exports=a},12889:function(t,e,n){var r=n(47475);n(57634),t.exports=r.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}})},94288:function(t,e,n){var r=n(66023),i=n(11237);function a(t,e){i.call(this,"radius",t,e),this.type="category"}a.prototype={constructor:a,pointToData:function(t,e){return this.polar.pointToData(t,e)[+("radius"!==this.dim)]},dataToRadius:i.prototype.dataToCoord,radiusToData:i.prototype.coordToData},r.inherits(a,i),t.exports=a},1748:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(89646),a=n(98763).parsePercent,s=n(16978),o=s.createScaleByModel,l=s.niceScaleExtent,h=n(33776),u=n(74733).getStackedDimension;function c(t,e){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();r.each(e.mapDimension("radius",!0),function(t){a.scale.unionExtentFromData(e,u(e,t))}),r.each(e.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(e,u(e,t))})}}),l(i.scale,i.model),l(a.scale,a.model),"category"===i.type&&!i.onBand){var s=i.getExtent(),o=360/i.scale.count();i.inverse?s[1]+=o:s[1]-=o,i.setExtent(s[0],s[1])}}function d(t,e){if(t.type=e.get("type"),t.scale=o(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}n(12889);var p={dimensions:i.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,r){var s,o,l,h,u,p,g=new i(r);g.update=c;var f=g.getRadiusAxis(),y=g.getAngleAxis(),x=t.findAxisModel("radiusAxis"),m=t.findAxisModel("angleAxis");d(f,x),d(y,m),s=t.get("center"),o=e.getWidth(),l=e.getHeight(),g.cx=a(s[0],o),g.cy=a(s[1],l),h=g.getRadiusAxis(),u=Math.min(o,l)/2,p=a(t.get("radius"),u),h.inverse?h.setExtent(p,0):h.setExtent(0,p),n.push(g),t.coordinateSystem=g,g.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var n=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=n.coordinateSystem}}),n}};h.register("polar",p)},18398:function(t,e,n){var r=n(66023);function i(t,e){return r.map(["Radius","Angle"],function(n,r){var i=this["get"+n+"Axis"](),a=e[r],s=t[r]/2,o="dataTo"+n,l="category"===i.type?i.getBandWidth():Math.abs(i[o](a-s)-i[o](a+s));return"Angle"===n&&(l=l*Math.PI/180),l},this)}t.exports=function(t){var e=t.getRadiusAxis(),n=t.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:r.bind(function(r){var i=e.dataToRadius(r[0]),a=n.dataToAngle(r[1]),s=t.coordToPoint([i,a]);return s.push(i,a*Math.PI/180),s}),size:r.bind(i,t)}}}},66923:function(t,e,n){var r=n(66023),i=n(11237);function a(t,e,n){i.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}r.inherits(a,i),t.exports=a},80194:function(t,e,n){var r=n(66023),i=n(66923),a=n(74323),s=n(98763),o=n(16978),l=o.getScaleExtent,h=o.niceScaleExtent,u=n(33776);function c(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=r.map(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,r=new i(n,new a);return r.name=t.get("name"),r.model=t,t.axis=r,this.dimensions.push(n),r},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}c.prototype.getIndicatorAxes=function(){return this._indicatorAxes},c.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},c.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},c.prototype.pointToData=function(t){var e,n=t[0]-this.cx,r=t[1]-this.cy,i=Math.sqrt(n*n+r*r);n/=i;for(var a=Math.atan2(-(r/=i),n),s=1/0,o=-1,l=0;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(a-h.angle);u<s&&(e=h,o=l,s=u)}return[o,+(e&&e.coodToData(i))]},c.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),a=e.getHeight(),o=Math.min(i,a)/2;this.cx=s.parsePercent(n[0],i),this.cy=s.parsePercent(n[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var l=t.get("radius");("string"==typeof l||"number"==typeof l)&&(l=[0,l]),this.r0=s.parsePercent(l[0],o),this.r=s.parsePercent(l[1],o),r.each(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;t.angle=Math.atan2(Math.sin(n),Math.cos(n))},this)},c.prototype.update=function(t,e){var n=this._indicatorAxes,i=this._model;r.each(n,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e,a){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===i){var s=e.getData();r.each(n,function(t){t.scale.unionExtentFromData(s,s.mapDimension(t.dim))})}},this);var a=i.get("splitNumber");function o(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}r.each(n,function(t,e){var n,r,i=l(t.scale,t.model);h(t.scale,t.model);var u=t.model,c=t.scale,d=u.getMin(),p=u.getMax(),g=c.getInterval();if(null!=d&&null!=p)c.setExtent(+d,+p),c.setInterval((p-d)/a);else if(null!=d)do n=d+g*a,c.setExtent(+d,n),c.setInterval(g),g=o(g);while(n<i[1]&&isFinite(n)&&isFinite(i[1]));else if(null!=p)do r=p-g*a,c.setExtent(r,+p),c.setInterval(g),g=o(g);while(r>i[0]&&isFinite(r)&&isFinite(i[0]));else{c.getTicks().length-1>a&&(g=o(g));var f=Math.round((i[0]+i[1])/2/g)*g,y=Math.round(a/2);c.setExtent(s.round(f-y*g),s.round(f+(a-y)*g)),c.setInterval(g)}})},c.dimensions=[],c.create=function(t,e){var n=[];return t.eachComponent("radar",function(r){var i=new c(r,t,e);n.push(i),r.coordinateSystem=i}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("radarIndex")||0])}),n},u.register("radar",c),t.exports=c},96274:function(t,e,n){var r=n(47475),i=n(66023),a=n(27780),s=n(27611),o=n(80390),l=a.valueAxis;function h(t,e){return i.defaults({show:e},t)}t.exports=r.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),n=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),l=this.get("axisLabel"),h=this.get("name"),u=this.get("name.show"),c=this.get("name.formatter"),d=this.get("nameGap"),p=this.get("triggerEvent"),g=i.map(this.get("indicator")||[],function(g){null!=g.max&&g.max>0&&!g.min?g.min=0:null!=g.min&&g.min<0&&!g.max&&(g.max=0);var f=h;if(null!=g.color&&(f=i.defaults({color:g.color},h)),g=i.merge(i.clone(g),{boundaryGap:t,splitNumber:e,scale:n,axisLine:r,axisTick:a,axisLabel:l,name:g.text,nameLocation:"end",nameGap:d,nameTextStyle:f,triggerEvent:p},!1),u||(g.name=""),"string"==typeof c){var y=g.name;g.name=c.replace("{value}",null!=y?y:"")}else"function"==typeof c&&(g.name=c(g.name,g));var x=i.extend(new s(g,null,this.ecModel),o);return x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this.getIndicatorModels=function(){return g}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:i.merge({lineStyle:{color:"#bbb"}},l.axisLine),axisLabel:h(l.axisLabel,!1),axisTick:h(l.axisTick,!1),splitLine:h(l.splitLine,!0),splitArea:h(l.splitArea,!0),indicator:[]}})},11049:function(t,e,n){var r=n(66023),i=n(76056),a=n(42626),s=n(80390),o=i.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});r.merge(o.prototype,s),a("single",o,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}}),t.exports=o},85865:function(t,e,n){var r=n(87642),i=n(16978),a=n(68006).getLayoutRect,s=n(66023).each;function o(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}o.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:o,_init:function(t,e,n){var a=new r(this.dimension,i.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),s="category"===a.type;a.onBand=s&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();s(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),i.niceScaleExtent(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=a({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),r=n?[0,t.width]:[0,t.height],i=+!!e.reverse;e.setExtent(r[i],r[1-i]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),r=n[0]+n[1],i=t.isHorizontal();t.toGlobalCoord=i?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord=i?function(t){return t-e}:function(t){return r-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[+("horizontal"!==e.orient)]))]},dataToPoint:function(t){var e=this.getAxis(),n=this.getRect(),r=[],i=+("horizontal"!==e.orient);return t instanceof Array&&(t=t[0]),r[i]=e.toGlobalCoord(e.dataToCoord(+t)),r[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,r}},t.exports=o},87642:function(t,e,n){var r=n(66023),i=n(11237),a=function(t,e,n,r,a){i.call(this,t,e,n),this.type=r||"value",this.position=a||"bottom",this.orient=null};a.prototype={constructor:a,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},r.inherits(a,i),t.exports=a},34696:function(t,e,n){var r=n(66023);function i(t,e){var n=this.getAxis(),r=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}t.exports=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:r.bind(i,t)}}}},42897:function(t,e,n){var r=n(66023);e.layout=function(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,a={},s=i.position,o=i.orient,l=n.getRect(),h=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:h[2],bottom:h[3]},vertical:{left:h[0],right:h[1]}};a.position=["vertical"===o?u.vertical[s]:h[0],"horizontal"===o?u.horizontal[s]:h[3]],a.rotation=Math.PI/2*({horizontal:0,vertical:1})[o],a.labelDirection=a.tickDirection=a.nameDirection=({top:-1,bottom:1,right:1,left:-1})[s],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),r.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=e.rotate;return null==c&&(c=t.get("axisLabel.rotate")),a.labelRotation="top"===s?-c:c,a.z2=1,a}},593:function(t,e,n){var r=n(85865);n(33776).register("single",{create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(i,a){var s=new r(i,t,e);s.name="single_"+a,s.resize(i,e),i.coordinateSystem=s,n.push(s)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var n=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=n&&n.coordinateSystem}}),n},dimensions:r.prototype.dimensions})},13593:function(t){function e(t){return t}function n(t,n,r,i,a){this._old=t,this._new=n,this._oldKeyGetter=r||e,this._newKeyGetter=i||e,this.context=a}function r(t,e,n,r,i){for(var a=0;a<t.length;a++){var s="_ec_"+i[r](t[a],a),o=e[s];null==o?(n.push(s),e[s]=a):(o.length||(e[s]=o=[o]),o.push(a))}}n.prototype={constructor:n,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,n=this._new,i={},a=[],s=[];for(r(e,{},a,"_oldKeyGetter",this),r(n,i,s,"_newKeyGetter",this),t=0;t<e.length;t++){var o=a[t],l=i[o];if(null!=l){var h=l.length;h?(1===h&&(i[o]=null),l=l.unshift()):i[o]=null,this._update&&this._update(l,t)}else this._remove&&this._remove(t)}for(var t=0;t<s.length;t++){var o=s[t];if(i.hasOwnProperty(o)){var l=i[o];if(null==l)continue;if(l.length)for(var u=0,h=l.length;u<h;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}},t.exports=n},44185:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(51938).enableClassCheck;function a(t){return"_EC_"+t}var s=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},o=s.prototype;function l(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function h(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}o.type="graph",o.isDirected=function(){return this._directed},o.addNode=function(t,e){t=t||""+e;var n=this._nodesMap;if(!n[a(t)]){var r=new l(t,e);return r.hostGraph=this,this.nodes.push(r),n[a(t)]=r,r}},o.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},o.getNodeById=function(t){return this._nodesMap[a(t)]},o.addEdge=function(t,e,n){var r=this._nodesMap,i=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),l.isInstance(t)||(t=r[a(t)]),l.isInstance(e)||(e=r[a(e)]),t&&e){var s=t.id+"-"+e.id;if(!i[s]){var o=new h(t,e,n);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),i[s]=o,o}}},o.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},o.getEdge=function(t,e){l.isInstance(t)&&(t=t.id),l.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},o.eachNode=function(t,e){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&t.call(e,n[i],i)},o.eachEdge=function(t,e){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(e,n[i],i)},o.breadthFirstTraverse=function(t,e,n,r){if(l.isInstance(e)||(e=this._nodesMap[a(e)]),e){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",s=0;s<this.nodes.length;s++)this.nodes[s].__visited=!1;if(!t.call(r,e,null))for(var o=[e];o.length;)for(var h=o.shift(),u=h[i],s=0;s<u.length;s++){var c=u[s],d=c.node1===h?c.node2:c.node1;if(!d.__visited){if(t.call(r,d,h))return;o.push(d),d.__visited=!0}}}},o.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)n[t.getRawIndex(i)].dataIndex=i;e.filterSelf(function(t){var n=r[e.getRawIndex(t)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)r[e.getRawIndex(i)].dataIndex=i},o.clone=function(){for(var t=new s(this._directed),e=this.nodes,n=this.edges,r=0;r<e.length;r++)t.addNode(e[r].id,e[r].dataIndex);for(var r=0;r<n.length;r++){var i=n[r];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},l.prototype={constructor:l,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},h.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var u=function(t,e){return{getValue:function(n){var r=this[t][e];return r.get(r.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,n,r)},getVisual:function(n,r){return this[t][e].getItemVisual(this.dataIndex,n,r)},setLayout:function(n,r){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};r.mixin(l,u("hostGraph","data")),r.mixin(h,u("hostGraph","edgeData")),s.Node=l,s.Edge=h,i(l),i(h),t.exports=s},90942:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(27611),a=n(13593),s=n(36265),o=n(89211),l=o.defaultDimValueGetters,h=o.DefaultDataProvider,u=n(39116).summarizeDimensions,c=r.isObject,d="undefined",p={float:typeof Float64Array===d?Array:Float64Array,int:typeof Int32Array===d?Array:Int32Array,ordinal:Array,number:Array,time:Array},g=typeof Uint32Array===d?Array:Uint32Array,f=typeof Int32Array===d?Array:Int32Array,y=typeof Uint16Array===d?Array:Uint16Array;function x(t){return t._rawCount>65535?g:y}var m=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],v=["_extent","_approximateExtent","_rawExtent"];function b(t,e){r.each(m.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,r.each(v,function(n){t[n]=r.clone(e[n])}),t._calculationInfo=r.extend(e._calculationInfo)}var w=function(t,e){t=t||["x","y"];for(var n={},i=[],a={},s=0;s<t.length;s++){var o=t[s];r.isString(o)&&(o={name:o});var l=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=l,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(l),n[l]=o,o.index=s,o.createInvertedIndices&&(a[l]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=u(this),this._invertedIndicesMap=a,this._calculationInfo={}},M=w.prototype;function _(t,e,n,r,i){var a=p[e.type],s=r-1,o=e.name,l=t[o][s];if(l&&l.length<n){for(var h=new a(Math.min(i-s*n,n)),u=0;u<l.length;u++)h[u]=l[u];t[o][s]=h}for(var c=r*n;c<i;c+=n)t[o].push(new a(Math.min(i-c,n)))}function A(t){var e=t._invertedIndicesMap;r.each(e,function(n,r){var i=t._dimensionInfos[r].ordinalMeta;if(i){n=e[r]=new f(i.categories.length);for(var a=0;a<n.length;a++)n[a]=-1;for(var a=0;a<t._count;a++)n[t.get(r,a)]=a}})}function S(t,e,n){var r;if(null!=e){var i=t._chunkSize,a=Math.floor(n/i),s=t.dimensions[e],o=t._storage[s][a];if(o){r=o[n%i];var l=t._dimensionInfos[s].ordinalMeta;l&&l.categories.length&&(r=l.categories[r])}}return r}function C(t){return t}function I(t){return t<this._count&&t>=0?this._indices[t]:-1}function P(t,e){var n=t._idList[e];return null==n&&(n=S(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function T(t){return r.isArray(t)||(t=[t]),t}function k(t,e){var n=t.dimensions,i=new w(r.map(n,t.getDimensionInfo,t),t.hostModel);b(i,t);for(var a=i._storage={},s=t._storage,o=0;o<n.length;o++){var l=n[o];s[l]&&(r.indexOf(e,l)>=0?(a[l]=function(t){for(var e=Array(t.length),n=0;n<t.length;n++)e[n]=function(t){var e=t.constructor;return e===Array?t.slice():new e(t)}(t[n]);return e}(s[l]),i._rawExtent[l]=L(),i._extent[l]=null):a[l]=s[l])}return i}function L(){return[1/0,-1/0]}M.type="list",M.hasItemOption=!0,M.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},M.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},M.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},M.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var r=n.encode[t];return!0===e?(r||[]).slice():r&&r[e]},M.initData=function(t,e,n){(s.isInstance(t)||r.isArrayLike(t))&&(t=new h(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=l[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=l.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},M.getProvider=function(){return this._rawData},M.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var r=e.count();e.persistent||(r+=n),this._initDataFromProvider(n,r)},M.appendValues=function(t,e){for(var n=this._chunkSize,r=this._storage,i=this.dimensions,a=i.length,s=this._rawExtent,o=this.count(),l=o+Math.max(t.length,e?e.length:0),h=this._chunkCount,u=0;u<a;u++){var c=i[u];s[c]||(s[c]=L()),r[c]||(r[c]=[]),_(r,this._dimensionInfos[c],n,h,l),this._chunkCount=r[c].length}for(var d=Array(a),p=o;p<l;p++){for(var g=p-o,f=Math.floor(p/n),y=p%n,x=0;x<a;x++){var c=i[x],m=this._dimValueGetterArrayRows(t[g]||d,c,g,x);r[c][f][y]=m;var v=s[c];m<v[0]&&(v[0]=m),m>v[1]&&(v[1]=m)}e&&(this._nameList[p]=e[g])}this._rawCount=this._count=l,this._extent={},A(this)},M._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,r=this._chunkSize,i=this._rawData,a=this._storage,s=this.dimensions,o=s.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,g=0;g<o;g++){var f=s[g];c[f]||(c[f]=L());var y=l[f];0===y.otherDims.itemName&&(n=this._nameDimIdx=g),0===y.otherDims.itemId&&(this._idDimIdx=g),a[f]||(a[f]=[]),_(a,y,r,p,e),this._chunkCount=a[f].length}for(var x=Array(o),m=t;m<e;m++){x=i.getItem(m,x);for(var v=Math.floor(m/r),b=m%r,w=0;w<o;w++){var f=s[w],M=a[f][v],S=this._dimValueGetter(x,f,m,w);M[b]=S;var C=c[f];S<C[0]&&(C[0]=S),S>C[1]&&(C[1]=S)}if(!i.pure){var I=h[m];if(x&&null==I){if(null!=x.name)h[m]=I=x.name;else if(null!=n){var P=s[n],T=a[P][v];if(T){I=T[b];var k=l[P].ordinalMeta;k&&k.categories.length&&(I=k.categories[I])}}}var D=null==x?null:x.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(u[m]=D)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},A(this)}},M.count=function(){return this._count},M.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,r=this._count;if(n===Array){t=new n(r);for(var i=0;i<r;i++)t[i]=e[i]}else t=new n(e.buffer,0,r)}else for(var n=x(this),t=new n(this.count()),i=0;i<t.length;i++)t[i]=i;return t},M.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;var r=Math.floor((e=this.getRawIndex(e))/this._chunkSize),i=e%this._chunkSize;return n[t][r][i]},M.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var r=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return n[r][i]},M._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return this._storage[t][n][r]},M.getValues=function(t,e){var n=[];r.isArray(t)||(e=t,t=this.dimensions);for(var i=0,a=t.length;i<a;i++)n.push(this.get(t[i],e));return n},M.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,r=0,i=e.length;r<i;r++)if("ordinal"!==n[e[r]].type&&isNaN(this.get(e[r],t)))return!1;return!0},M.getDataExtent=function(t){t=this.getDimension(t);var e,n=this._storage[t],r=L();if(!n)return r;var i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(e=this._extent[t])return e.slice();for(var a=(e=r)[0],s=e[1],o=0;o<i;o++){var l=this._getFast(t,this.getRawIndex(o));l<a&&(a=l),l>s&&(s=l)}return e=[a,s],this._extent[t]=e,e},M.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},M.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},M.getCalculationInfo=function(t){return this._calculationInfo[t]},M.setCalculationInfo=function(t,e){c(t)?r.extend(this._calculationInfo,t):this._calculationInfo[t]=e},M.getSum=function(t){var e=this._storage[t],n=0;if(e)for(var r=0,i=this.count();r<i;r++){var a=this.get(t,r);isNaN(a)||(n+=a)}return n},M.getMedian=function(t){var e=[];this.each(t,function(t,n){isNaN(t)||e.push(t)});var n=[].concat(e).sort(function(t,e){return t-e}),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},M.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},M.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return -1},M.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return -1;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(e[a]<t)r=a+1;else{if(!(e[a]>t))return a;i=a-1}}return -1},M.indicesOfNearest=function(t,e,n){var r=this._storage[t],i=[];if(!r)return i;null==n&&(n=1/0);for(var a=Number.MAX_VALUE,s=-1,o=0,l=this.count();o<l;o++){var h=e-this.get(t,o),u=Math.abs(h);h<=n&&u<=a&&((u<a||h>=0&&s<0)&&(a=u,s=h,i.length=0),i.push(o))}return i},M.getRawIndex=C,M.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var r=this.dimensions[n];e.push(this.get(r,t))}return e},M.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||S(this,this._nameDimIdx,e)||""},M.getId=function(t){return P(this,this.getRawIndex(t))},M.each=function(t,e,n,i){"use strict";if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;for(var a=(t=r.map(T(t),this.getDimension,this)).length,s=0;s<this.count();s++)switch(a){case 0:e.call(n,s);break;case 1:e.call(n,this.get(t[0],s),s);break;case 2:e.call(n,this.get(t[0],s),this.get(t[1],s),s);break;default:for(var o=0,l=[];o<a;o++)l[o]=this.get(t[o],s);l[o]=s,e.apply(n,l)}}},M.filterSelf=function(t,e,n,i){"use strict";if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=r.map(T(t),this.getDimension,this);for(var a=this.count(),s=new(x(this))(a),o=[],l=t.length,h=0,u=t[0],c=0;c<a;c++){var d,p=this.getRawIndex(c);if(0===l)d=e.call(n,c);else if(1===l){var g=this._getFast(u,p);d=e.call(n,g,c)}else{for(var f=0;f<l;f++)o[f]=this._getFast(u,p);o[f]=c,d=e.apply(n,o)}d&&(s[h++]=p)}return h<a&&(this._indices=s),this._count=h,this._extent={},this.getRawIndex=this._indices?I:C,this}},M.selectRange=function(t){"use strict";if(this._count){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);var r=e.length;if(r){var i=this.count(),a=new(x(this))(i),s=0,o=e[0],l=t[o][0],h=t[o][1],u=!1;if(!this._indices){var c=0;if(1===r){for(var d=this._storage[e[0]],p=0;p<this._chunkCount;p++)for(var g=d[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),y=0;y<f;y++){var m=g[y];(m>=l&&m<=h||isNaN(m))&&(a[s++]=c),c++}u=!0}else if(2===r){for(var d=this._storage[o],v=this._storage[e[1]],b=t[e[1]][0],w=t[e[1]][1],p=0;p<this._chunkCount;p++)for(var g=d[p],M=v[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),y=0;y<f;y++){var m=g[y],_=M[y];(m>=l&&m<=h||isNaN(m))&&(_>=b&&_<=w||isNaN(_))&&(a[s++]=c),c++}u=!0}}if(!u)if(1===r)for(var y=0;y<i;y++){var A=this.getRawIndex(y),m=this._getFast(o,A);(m>=l&&m<=h||isNaN(m))&&(a[s++]=A)}else for(var y=0;y<i;y++){for(var S=!0,A=this.getRawIndex(y),p=0;p<r;p++){var P=e[p],m=this._getFast(n,A);(m<t[P][0]||m>t[P][1])&&(S=!1)}S&&(a[s++]=this.getRawIndex(y))}return s<i&&(this._indices=a),this._count=s,this._extent={},this.getRawIndex=this._indices?I:C,this}}},M.mapArray=function(t,e,n,r){"use strict";"function"==typeof t&&(r=n,n=e,e=t,t=[]),n=n||r||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},M.map=function(t,e,n,i){"use strict";n=n||i||this;var a=k(this,t=r.map(T(t),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?I:C;for(var s=a._storage,o=[],l=this._chunkSize,h=t.length,u=this.count(),c=[],d=a._rawExtent,p=0;p<u;p++){for(var g=0;g<h;g++)c[g]=this.get(t[g],p);c[h]=p;var f=e&&e.apply(n,c);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var y=this.getRawIndex(p),x=Math.floor(y/l),m=y%l,v=0;v<f.length;v++){var b=t[v],w=f[v],M=d[b],_=s[b];_&&(_[x][m]=w),w<M[0]&&(M[0]=w),w>M[1]&&(M[1]=w)}}}return a},M.downSample=function(t,e,n,r){for(var i=k(this,[t]),a=i._storage,s=[],o=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=i._rawExtent[t],d=new(x(this))(h),p=0,g=0;g<h;g+=o){o>h-g&&(s.length=o=h-g);for(var f=0;f<o;f++){var y=this.getRawIndex(g+f),m=Math.floor(y/u),v=y%u;s[f]=l[m][v]}var b=n(s),w=this.getRawIndex(Math.min(g+r(s,b)||0,h-1)),M=Math.floor(w/u),_=w%u;l[M][_]=b,b<c[0]&&(c[0]=b),b>c[1]&&(c[1]=b),d[p++]=w}return i._count=p,i._indices=d,i.getRawIndex=I,i},M.getItemModel=function(t){var e=this.hostModel;return new i(this.getRawDataItem(t),e,e&&e.ecModel)},M.diff=function(t){var e=this;return new a(t?t.getIndices():[],this.getIndices(),function(e){return P(t,e)},function(t){return P(e,t)})},M.getVisual=function(t){var e=this._visual;return e&&e[t]},M.setVisual=function(t,e){if(c(t)){for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);return}this._visual=this._visual||{},this._visual[t]=e},M.setLayout=function(t,e){if(c(t)){for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);return}this._layout[t]=e},M.getLayout=function(t){return this._layout[t]},M.getItemLayout=function(t){return this._itemLayouts[t]},M.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?r.extend(this._itemLayouts[t]||{},e):e},M.clearItemLayouts=function(){this._itemLayouts.length=0},M.getItemVisual=function(t,e,n){var r=this._itemVisuals[t],i=r&&r[e];return null!=i||n?i:this.getVisual(e)},M.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=r,c(e)){for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a],i[a]=!0);return}r[e]=n,i[e]=!0},M.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var D=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};M.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(D,e)),this._graphicEls[t]=e},M.getItemGraphicEl=function(t){return this._graphicEls[t]},M.eachItemGraphicEl=function(t,e){r.each(this._graphicEls,function(n,r){n&&t&&t.call(e,n,r)})},M.cloneShallow=function(t){if(t||(t=new w(r.map(this.dimensions,this.getDimensionInfo,this),this.hostModel)),t._storage=this._storage,b(t,this),this._indices){var e=this._indices.constructor;t._indices=new e(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?I:C,t},M.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(r.slice(arguments)))})},M.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],M.CHANGABLE_METHODS=["filterSelf","selectRange"],t.exports=w},5298:function(t,e,n){var r=n(66023),i=r.createHashMap,a=r.isObject,s=r.map;function o(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}o.createByAxisModel=function(t){var e=t.option,n=e.data,r=n&&s(n,u);return new o({categories:r,needCollect:!r,deduplication:!1!==e.dedplication})};var l=o.prototype;function h(t){return t._map||(t._map=i(t.categories))}function u(t){return a(t)&&null!=t.value?t.value:t+""}l.getOrdinal=function(t){return h(this).get(t)},l.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=h(this);return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.exports=o},36265:function(t,e,n){var r=n(66023),i=r.createHashMap,a=r.isTypedArray,s=n(51938).enableClassCheck,o=n(38237),l=o.SOURCE_FORMAT_ORIGINAL,h=o.SERIES_LAYOUT_BY_COLUMN,u=o.SOURCE_FORMAT_UNKNOWN,c=o.SOURCE_FORMAT_TYPED_ARRAY,d=o.SOURCE_FORMAT_KEYED_COLUMNS;function p(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===d?{}:[]),this.sourceFormat=t.sourceFormat||u,this.seriesLayoutBy=t.seriesLayoutBy||h,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&i(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}p.seriesDataToSource=function(t){return new p({data:t,sourceFormat:a(t)?c:l,fromDataset:!1})},s(p),t.exports=p},67935:function(t,e,n){var r=n(66023),i=n(27611),a=n(22911),s=n(90942),o=n(35047),l=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};function h(t,e,n){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=r.map(e||[],function(e){return new i(e,t,t.ecModel)}),this.leavesModel=new i(n||{},t,t.ecModel)}l.prototype={constructor:l,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),t=t||{},r.isString(t)&&(t={order:t});var i,a=t.order||"preorder",s=this[t.attr||"children"];"preorder"===a&&(i=e.call(n,this));for(var o=0;!i&&o<s.length;o++)s[o].eachNode(t,e,n);"postorder"===a&&e.call(n,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(t+1),r.height>e&&(e=r.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,r=n.length;e<r;e++){var i=n[e].getNodeById(t);if(i)return i}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,r=n.length;e<r;e++){var i=n[e].contains(t);if(i)return i}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,n=this.hostTree,r=n.data.getItemModel(this.dataIndex),i=this.getLevelModel();return i||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),r.getModel(t,(i||e||n.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},h.prototype={constructor:h,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,n=0,r=e.length;n<r;n++)e[n].dataIndex=-1;for(var n=0,r=t.count();n<r;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},h.createTree=function(t,e,n){var i=new h(e,n.levels,n.leaves),u=[],c=1;!function t(e,n){var a,s,o,h=e.value;c=Math.max(c,r.isArray(h)?h.length:1),u.push(e);var d=new l(e.name,i);n?(a=d,o=(s=n).children,a.parentNode!==s&&(o.push(a),a.parentNode=s)):i.root=d,i._nodes.push(d);var p=e.children;if(p)for(var g=0;g<p.length;g++)t(p[g],d)}(t),i.root.updateDepthAndHeight(0);var d=new s(o(u,{coordDimensions:["value"],dimensionsCount:c}),e);return d.initData(u),a({mainData:d,struct:i,structAttr:"tree"}),i.update(),i},t.exports=h},30456:function(t,e,n){var r=n(66023),i=r.createHashMap,a=r.each,s=r.isString,o=r.defaults,l=r.extend,h=r.isObject,u=r.clone,c=n(70018).normalizeToArray,d=n(4522).guessOrdinal,p=n(36265),g=n(39116).OTHER_DIMENSIONS;function f(t,e,n){if(n||null!=e.get(t)){for(var r=0;null!=e.get(t+r);)r++;t+=r}return e.set(t,!0),t}t.exports=function(t,e,n){p.isInstance(e)||(e=p.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var r,y,x,m,v,b=(n.dimsDef||[]).slice(),w=i(n.encodeDef),M=i(),_=i(),A=[],S=(r=e,y=t,x=b,m=n.dimCount,v=Math.max(r.dimensionsDetectCount||1,y.length,x.length,m||0),a(y,function(t){var e=t.dimsDef;e&&(v=Math.max(v,e.length))}),v),C=0;C<S;C++){var I=b[C]=l({},h(b[C])?b[C]:{name:b[C]}),P=I.name,T=A[C]={otherDims:{}};null!=P&&null==M.get(P)&&(T.name=T.displayName=P,M.set(P,C)),null!=I.type&&(T.type=I.type),null!=I.displayName&&(T.displayName=I.displayName)}w.each(function(t,e){if(1===(t=c(t).slice()).length&&t[0]<0)return void w.set(e,!1);var n=w.set(e,[]);a(t,function(t,r){s(t)&&(t=M.get(t)),null!=t&&t<S&&(n[r]=t,L(A[t],e,r))})});var k=0;function L(t,e,n){null!=g.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,_.set(e,!0))}a(t,function(t,e){if(s(t))i=t,t={};else{var t,n,r,i=t.name,l=t.ordinalMeta;t.ordinalMeta=null,(t=u(t)).ordinalMeta=l,n=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var d=w.get(i);if(!1!==d){var d=c(d);if(!d.length)for(var p=0;p<(n&&n.length||1);p++){for(;k<A.length&&null!=A[k].coordDim;)k++;k<A.length&&d.push(k++)}a(d,function(e,a){var s=A[e];if(L(o(s,t),i,a),null==s.name&&n){var l=n[a];h(l)||(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&o(s.otherDims,r)})}});var D=n.generateCoord,R=n.generateCoordCount,N=null!=R;R=D?R||1:0;for(var O=D||"value",j=0;j<S;j++){var T=A[j]=A[j]||{};null==T.coordDim&&(T.coordDim=f(O,_,N),T.coordDimIndex=0,(!D||R<=0)&&(T.isExtraCoord=!0),R--),null==T.name&&(T.name=f(T.coordDim,M)),null==T.type&&d(e,j,T.name)&&(T.type="ordinal")}return A}},35047:function(t,e,n){var r=n(30456);t.exports=function(t,e){return r((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}},89211:function(t,e,n){n(38603).__DEV__;var r=n(66023);r.isTypedArray;var i=r.extend;r.assert;var a=r.each,s=r.isObject,o=n(70018),l=o.getDataItemValue,h=o.isDataItemOption,u=n(98763).parseDate,c=n(36265),d=n(38237),p=d.SOURCE_FORMAT_TYPED_ARRAY,g=d.SOURCE_FORMAT_ARRAY_ROWS,f=d.SOURCE_FORMAT_ORIGINAL,y=d.SOURCE_FORMAT_OBJECT_ROWS;function x(t,e){c.isInstance(t)||(t=c.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,r=t.sourceFormat;r===p&&(this._offset=0,this._dimSize=e,this._data=n),i(this,v[r===g?r+"_"+t.seriesLayoutBy:r])}var m=x.prototype;m.pure=!1,m.persistent=!0,m.getSource=function(){return this._source};var v={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:M},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],n=this._data,r=0;r<n.length;r++){var i=n[r];e.push(i?i[t]:null)}return e},appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:b,getItem:w,appendData:M},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,r=0;r<n.length;r++){var i=this._data[n[r].name];e.push(i?i[t]:null)}return e},appendData:function(t){var e=this._data;a(t,function(t,n){for(var r=e[n]||(e[n]=[]),i=0;i<(t||[]).length;i++)r.push(t[i])})}},original:{count:b,getItem:w,appendData:M},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,r=0;r<this._dimSize;r++)e[r]=this._data[n+r];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function b(){return this._data.length}function w(t){return this._data[t]}function M(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var _={arrayRows:A,objectRows:function(t,e,n,r){return null!=n?t[r]:t},keyedColumns:A,original:function(t,e,n,r){var i=l(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:A};function A(t,e,n,r){return null!=n?t[n]:t}function S(t,e,n,r){return C(t[r],this._dimensionInfos[e])}function C(t,e){var n=e&&e.type;if("ordinal"===n){var r=e&&e.ordinalMeta;return r?r.parseAndCollect(t):t}return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+u(t)),null==t||""===t?NaN:+t}e.DefaultDataProvider=x,e.defaultDimValueGetters={arrayRows:S,objectRows:function(t,e,n,r){return C(t[e],this._dimensionInfos[e])},keyedColumns:S,original:function(t,e,n,r){var i=t&&(null==t.value?t:t.value);return!this._rawData.pure&&h(t)&&(this.hasItemOption=!0),C(i instanceof Array?i[r]:i,this._dimensionInfos[e])},typedArray:function(t,e,n,r){return t[r]}},e.retrieveRawValue=function(t,e,n){if(t){var r,i,a=t.getRawDataItem(e);if(null!=a){var s=t.getProvider().getSource().sourceFormat,o=t.getDimensionInfo(n);return o&&(r=o.name,i=o.index),_[s](a,e,i,r)}}},e.retrieveRawAttr=function(t,e,n){if(t){var r=t.getProvider().getSource().sourceFormat;if(r===f||r===y){var i=t.getRawDataItem(e);if(r!==f||s(i)||(i=null),i)return i[n]}}}},74733:function(t,e,n){var r=n(66023),i=r.each,a=r.isString;function s(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}e.enableDataStack=function(t,e,n){var r,s,o,l,h=(n=n||{}).byIndex,u=n.stackedCoordDimension,c=!!(t&&t.get("stack"));if(i(e,function(t,n){a(t)&&(e[n]=t={name:t}),c&&!t.isExtraCoord&&(h||r||!t.ordinalMeta||(r=t),s||"ordinal"===t.type||"time"===t.type||u&&u!==t.coordDim||(s=t))}),!s||h||r||(h=!0),s){o="__\0ecstackresult",l="__\0ecstackedover",r&&(r.createInvertedIndices=!0);var d=s.coordDim,p=s.type,g=0;i(e,function(t){t.coordDim===d&&g++}),e.push({name:o,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0}),g++,e.push({name:l,coordDim:l,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:s&&s.name,stackedByDimension:r&&r.name,isStackedByIndex:h,stackedOverDimension:l,stackResultDimension:o}},e.isDimensionStacked=s,e.getStackedDimension=function(t,e){return s(t,e)?t.getCalculationInfo("stackResultDimension"):e}},39116:function(t,e,n){var r=n(66023),i=r.each,a=r.createHashMap;r.assert,n(38603).__DEV__;var s=a(["tooltip","label","itemName","itemId","seriesName"]);e.OTHER_DIMENSIONS=s,e.summarizeDimensions=function(t){var e={},n=e.encode={},r=a(),o=[],l=[];i(t.dimensions,function(e){var i=t.getDimensionInfo(e),a=i.coordDim;if(a){var h,u=n[a];n.hasOwnProperty(a)||(u=n[a]=[]),u[i.coordDimIndex]=e,i.isExtraCoord||(r.set(a,1),"ordinal"!==(h=i.type)&&"time"!==h&&(o[0]=e)),i.defaultTooltip&&l.push(e)}s.each(function(t,e){var r=n[e];n.hasOwnProperty(e)||(r=n[e]=[]);var a=i.otherDims[e];null!=a&&!1!==a&&(r[a]=i.name)})});var h=[],u={};r.each(function(t,e){var r=n[e];u[e]=r[0],h=h.concat(r)}),e.dataDimsOnCoord=h,e.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(o=c.slice());var d=n.tooltip;return d&&d.length?l=d.slice():l.length||(l=o.slice()),n.defaultedLabel=o,n.defaultedTooltip=l,e},e.getDimensionTypeByAxis=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}},22911:function(t,e,n){var r=n(66023),i=r.each,a="\0__link_datas",s="\0__link_mainData";function o(t,e){var n;if(n=this,n[s]===n){var i=r.extend({},this[a]);i[this.dataType]=e,c(e,i,t)}else d(e,this.dataType,this[s],t);return e}function l(t,e){return t.struct&&t.struct.update(this),e}function h(t,e){return i(e[a],function(n,r){n!==e&&d(n.cloneShallow(),r,e,t)}),e}function u(t){var e=this[s];return null==t||null==e?e:e[a][t]}function c(t,e,n){t[a]={},i(e,function(e,r){d(e,r,t,n)})}function d(t,e,n,r){n[a][e]=t,t[s]=n,t.dataType=e,r.struct&&(t[r.structAttr]=r.struct,r.struct[r.datasAttr[e]]=t),t.getLinkedData=u}t.exports=function(t){var e=t.mainData,n=t.datas;n||(n={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,c(e,n,t),i(n,function(n){i(e.TRANSFERABLE_METHODS,function(e){n.wrapMethod(e,r.curry(o,t))})}),e.wrapMethod("cloneShallow",r.curry(h,t)),i(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,r.curry(l,t))}),r.assert(n[e.dataType]===e)}},4522:function(t,e,n){n(38603).__DEV__;var r=n(70018),i=r.makeInner,a=r.getDataItemValue,s=n(26774).getCoordSysDefineBySeries,o=n(66023),l=o.createHashMap,h=o.each,u=o.map,c=o.isArray,d=o.isString,p=o.isObject,g=o.isTypedArray,f=o.isArrayLike,y=o.extend;o.assert;var x=n(36265),m=n(38237),v=m.SOURCE_FORMAT_ORIGINAL,b=m.SOURCE_FORMAT_ARRAY_ROWS,w=m.SOURCE_FORMAT_OBJECT_ROWS,M=m.SOURCE_FORMAT_KEYED_COLUMNS,_=m.SOURCE_FORMAT_UNKNOWN,A=m.SOURCE_FORMAT_TYPED_ARRAY,S=m.SERIES_LAYOUT_BY_ROW,C=i();function I(t){if(t){var e=l();return u(t,function(t,n){if(null==(t=y({},p(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var r=e.get(t.name);return r?t.name+="-"+r.count++:e.set(t.name,{count:1}),t})}}function P(t,e,n,r){if(null==r&&(r=1/0),e===S)for(var i=0;i<n.length&&i<r;i++)t(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)t(a[i],i)}function T(t,e,n,r,i,s){var o,l;if(g(t))return!1;if(r&&(l=p(l=r[s])?l.name:l),e===b)if(n===S){for(var h=t[s],u=0;u<(h||[]).length&&u<5;u++)if(null!=(o=m(h[i+u])))return o}else for(var u=0;u<t.length&&u<5;u++){var f=t[i+u];if(f&&null!=(o=m(f[s])))return o}else if(e===w){if(!l)return;for(var u=0;u<t.length&&u<5;u++){var y=t[u];if(y&&null!=(o=m(y[l])))return o}}else if(e===M){if(!l)return;var h=t[l];if(!h||g(h))return!1;for(var u=0;u<h.length&&u<5;u++)if(null!=(o=m(h[u])))return o}else if(e===v)for(var u=0;u<t.length&&u<5;u++){var y=t[u],x=a(y);if(!c(x))return!1;if(null!=(o=m(x[s])))return o}function m(t){return(!(null!=t&&isFinite(t))||""===t)&&(!!d(t)&&"-"!==t||void 0)}return!1}e.detectSourceFormat=function(t){var e=t.option.source,n=_;if(g(e))n=A;else if(c(e)){0===e.length&&(n=b);for(var r=0,i=e.length;r<i;r++){var a=e[r];if(null!=a){if(c(a)){n=b;break}else if(p(a)){n=w;break}}}}else if(p(e)){for(var s in e)if(e.hasOwnProperty(s)&&f(e[s])){n=M;break}}else if(null!=e)throw Error("Invalid data");C(t).sourceFormat=n},e.getSource=function(t){return C(t).source},e.resetSourceDefaulter=function(t){C(t).datasetMap=l()},e.prepareSource=function(t){var e=t.option,n=e.data,r=g(n)?A:v,i=!1,o=e.seriesLayoutBy,u=e.sourceHeader,f=e.dimensions,y=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(y){var m=y.option;n=m.source,r=C(y).sourceFormat,i=!0,o=o||m.seriesLayoutBy,null==u&&(u=m.sourceHeader),f=f||m.dimensions}var _=function(t,e,n,r,i){if(!t)return{dimensionsDefine:I(i)};if(e===b)"auto"===r||null==r?P(function(t){null!=t&&"-"!==t&&(d(t)?null==o&&(o=1):o=0)},n,t,10):o=+!!r,i||1!==o||(i=[],P(function(t,e){i[e]=null!=t?t:""},n,t)),s=i?i.length:n===S?t.length:t[0]?t[0].length:null;else if(e===w)i||(i=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var r=[];return h(e,function(t,e){r.push(e)}),r}}(t),l=!0);else if(e===M)i||(i=[],l=!0,h(t,function(t,e){i.push(e)}));else if(e===v){var s,o,l,u,g=a(t[0]);s=c(g)&&g.length||1}return l&&h(i,function(t,e){(p(t)?t.name:t)==="name"&&(u=e)}),{startIndex:o,dimensionsDefine:I(i),dimensionsDetectCount:s,potentialNameDimIndex:u}}(n,r,o,u,f),k=e.encode;!k&&y&&(k=function(t,e,n,r,i,a){var o,u=s(t),c={},d=[],p=[],g=t.subType,f=l(["pie","map","funnel"]),y=l(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(u&&null!=y.get(g)){var x=C(t.ecModel).datasetMap,m=e.uid+"_"+i,v=x.get(m)||x.set(m,{categoryWayDim:1,valueWayDim:0});h(u.coordSysDims,function(t){if(null==u.firstCategoryDimIndex){var e=v.valueWayDim++;c[t]=e,p.push(e)}else if(u.categoryAxisMap.get(t))c[t]=0,d.push(0);else{var e=v.categoryWayDim++;c[t]=e,p.push(e)}})}else if(null!=f.get(g)){for(var b=0;b<5&&null==o;b++)T(n,r,i,a.dimensionsDefine,a.startIndex,b)||(o=b);if(null!=o){c.value=o;var w=a.potentialNameDimIndex||Math.max(o-1,0);p.push(w),d.push(w)}}return d.length&&(c.itemName=d),p.length&&(c.seriesName=p),c}(t,y,n,r,o,_)),C(t).source=new x({data:n,fromDataset:i,seriesLayoutBy:o,sourceFormat:r,dimensionsDefine:_.dimensionsDefine,startIndex:_.startIndex,dimensionsDetectCount:_.dimensionsDetectCount,encodeDefine:k})},e.guessOrdinal=function(t,e){return T(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}},38237:function(t,e){e.SOURCE_FORMAT_ORIGINAL="original",e.SOURCE_FORMAT_ARRAY_ROWS="arrayRows",e.SOURCE_FORMAT_OBJECT_ROWS="objectRows",e.SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",e.SOURCE_FORMAT_UNKNOWN="unknown",e.SOURCE_FORMAT_TYPED_ARRAY="typedArray",e.SERIES_LAYOUT_BY_COLUMN="column",e.SERIES_LAYOUT_BY_ROW="row"},47475:function(t,e,n){n(38603).__DEV__;var r=n(19206),i=n(66023),a=n(53453),s=n(57674),o=n(58265),l=n(56177),h=n(16438),u=n(13966),c=n(33776),d=n(53734),p=n(34357),g=n(45888),f=n(76056),y=n(26626),x=n(11648),m=n(55756),v=n(76165),b=n(70018),w=n(44050).throttle,M=n(75607),_=n(49151),A=n(28794),S=n(5328),C=n(96384),I=n(78956);n(62295);var P=n(55725),T=i.assert,k=i.each,L=i.isFunction,D=i.isObject,R=f.parseClassType,N="__flagInMainProcess",O="__optionUpdated",j=/^[a-zA-Z0-9_]+$/;function E(t){return function(e,n,r){e=e&&e.toLowerCase(),l.prototype[t].call(this,e,n,r)}}function V(){l.call(this)}function B(t,e,n){n=n||{},"string"==typeof e&&(e=th[e]),this.id,this.group,this._dom=t;var a,s,h,d,g=this._zr=r.init(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=w(i.bind(g.flush,g),17);var e=i.clone(e);e&&p(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new c;var f=this._api=(a=this,s=a._coordSysMgr,i.extend(new u(a),{getCoordinateSystems:i.bind(s.getCoordinateSystems,s),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));function y(t,e){return t.__prio-e.__prio}o(tl,y),o(ta,y),this._scheduler=new S(this,f,ta,tl),l.call(this,this._ecEventProcessor=new tn),this._messageCenter=new V,this._initEvents(),this.resize=i.bind(this.resize,this),this._pendingActions=[],g.animation.on("frame",this._onframe,this),h=g,d=this,h.on("rendered",function(){d.trigger("rendered"),!h.animation.isFinished()||d[O]||d._scheduler.unfinished||d._pendingActions.length||d.trigger("finished")}),i.setAsPrimitive(this)}V.prototype.on=E("on"),V.prototype.off=E("off"),V.prototype.one=E("one"),i.mixin(V,l);var z=B.prototype;function F(t,e,n){var r,i=this._model,a=this._coordSysMgr.getCoordinateSystems();e=b.parseFinder(i,e);for(var s=0;s<a.length;s++){var o=a[s];if(o[t]&&null!=(r=o[t](i,e,n)))return r}}z._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[O]){var e=this[O].silent;this[N]=!0,H(this),G.update.call(this),this[N]=!1,this[O]=!1,Z.call(this,e),$.call(this,e)}else if(t.unfinished){var n=1,r=this._model,i=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(r),t.performDataProcessorTasks(r),q(this,r),t.performVisualTasks(r),Q(this,this._model,i,"remain"),n-=+new Date-a}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},z.getDom=function(){return this._dom},z.getZr=function(){return this._zr},z.setOption=function(t,e,n){var r;if(D(e)&&(n=e.lazyUpdate,r=e.silent,e=e.notMerge),this[N]=!0,!this._model||e){var i=new d(this._api),a=this._theme,s=this._model=new h(null,null,a,i);s.scheduler=this._scheduler,s.init(null,null,a,i)}this._model.setOption(t,ts),n?(this[O]={silent:r},this[N]=!1):(H(this),G.update.call(this),this._zr.flush(),this[O]=!1,this[N]=!1,Z.call(this,r),$.call(this,r))},z.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z.getModel=function(){return this._model},z.getOption=function(){return this._model&&this._model.getOption()},z.getWidth=function(){return this._zr.getWidth()},z.getHeight=function(){return this._zr.getHeight()},z.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},z.getRenderedCanvas=function(t){if(s.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},z.getSvgDataUrl=function(){if(s.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return i.each(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},z.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,r=[],i=this;k(e,function(t){n.eachComponent({mainType:t},function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(r.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return k(r,function(t){t.group.ignore=!1}),a},z.getConnectedDataURL=function(t){if(s.canvasSupported){var e=this.group,n=Math.min,a=Math.max,o=1/0;if(!td[e])return this.getDataURL(t);var l=o,h=o,u=-o,c=-o,d=[],p=t&&t.pixelRatio||1;i.each(tc,function(r,s){if(r.group===e){var o=r.getRenderedCanvas(i.clone(t)),p=r.getDom().getBoundingClientRect();l=n(p.left,l),h=n(p.top,h),u=a(p.right,u),c=a(p.bottom,c),d.push({dom:o,left:p.left,top:p.top})}}),l*=p,h*=p,u*=p,c*=p;var g=u-l,f=c-h,y=i.createCanvas();y.width=g,y.height=f;var x=r.init(y);return k(d,function(t){var e=new v.Image({style:{x:t.left*p-l,y:t.top*p-h,image:t.dom}});x.add(e)}),x.refreshImmediately(),y.toDataURL("image/"+(t&&t.type||"png"))}},z.convertToPixel=i.curry(F,"convertToPixel"),z.convertFromPixel=i.curry(F,"convertFromPixel"),z.containPixel=function(t,e){var n,r=this._model;return t=b.parseFinder(r,t),i.each(t,function(t,r){r.indexOf("Models")>=0&&i.each(t,function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n|=!!i.containPoint(e);else if("seriesModels"===r){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n},z.getVisual=function(t,e){var n=this._model,r=(t=b.parseFinder(n,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=i?r.getItemVisual(i,e):r.getVisual(e)},z.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},z.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var G={prepareAndUpdate:function(t){H(this),G.update.call(this,t)},update:function(t){var e=this._model,n=this._api,r=this._zr,i=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),i.create(e,n),o.performDataProcessorTasks(e,t),q(this,e),i.update(e,n),Y(e),o.performVisualTasks(e,t),X(this,e,n,t);var l=e.get("backgroundColor")||"transparent";if(s.canvasSupported)r.setBackgroundColor(l);else{var h=a.parse(l);l=a.stringify(h,"rgb"),0===h[3]&&(l="transparent")}K(e,n)}},updateTransform:function(t){var e=this._model,n=this,r=this._api;if(e){var a=[];e.eachComponent(function(i,s){var o=n.getViewOfComponentModel(s);if(o&&o.__alive)if(o.updateTransform){var l=o.updateTransform(s,e,r,t);l&&l.update&&a.push(o)}else a.push(o)});var s=i.createHashMap();e.eachSeries(function(i){var a=n._chartsMap[i.__viewId];if(a.updateTransform){var o=a.updateTransform(i,e,r,t);o&&o.update&&s.set(i.uid,1)}else s.set(i.uid,1)}),Y(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:s}),Q(n,e,r,t,s),K(e,this._api)}},updateView:function(t){var e=this._model;e&&(m.markUpdateMethod(t,"updateView"),Y(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),X(this,this._model,this._api,t),K(e,this._api))},updateVisual:function(t){G.update.call(this,t)},updateLayout:function(t){G.update.call(this,t)}};function H(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),J(t,"component",e,n),J(t,"chart",e,n),n.plan()}function W(t,e,n,r,a){var s=t._model;if(!r)return void k(t._componentsViews.concat(t._chartsViews),u);var o={};o[r+"Id"]=n[r+"Id"],o[r+"Index"]=n[r+"Index"],o[r+"Name"]=n[r+"Name"];var l={mainType:r,query:o};a&&(l.subType=a);var h=n.excludeSeriesId;function u(r){r&&r.__alive&&r[e]&&r[e](r.__model,s,t._api,n)}null!=h&&(h=i.createHashMap(b.normalizeToArray(h))),s&&s.eachComponent(l,function(e){h&&null!=h.get(e.id)||u(t["series"===r?"_chartsMap":"_componentsMap"][e.__viewId])},t)}function q(t,e){var n=t._chartsMap,r=t._scheduler;e.eachSeries(function(t){r.updateStreamModes(t,n[t.__viewId])})}function U(t,e){var n,r=t.type,a=t.escapeConnect,s=tr[r],o=s.actionInfo,l=(o.update||"update").split(":"),h=l.pop();l=null!=l[0]&&R(l[0]),this[N]=!0;var u=[t],c=!1;t.batch&&(c=!0,u=i.map(t.batch,function(e){return(e=i.defaults(i.extend({},e),t)).batch=null,e}));var d=[],p="highlight"===r||"downplay"===r;k(u,function(t){(n=(n=s.action(t,this._model,this._api))||i.extend({},t)).type=o.event||n.type,d.push(n),p?W(this,h,t,"series"):l&&W(this,h,t,l.main,l.sub)},this),"none"===h||p||l||(this[O]?(H(this),G.update.call(this,t),this[O]=!1):G[h].call(this,t)),n=c?{type:o.event||r,escapeConnect:a,batch:d}:d[0],this[N]=!1,e||this._messageCenter.trigger(n.type,n)}function Z(t){for(var e=this._pendingActions;e.length;){var n=e.shift();U.call(this,n,t)}}function $(t){t||this.trigger("updated")}function J(t,e,n,r){for(var i="component"===e,a=i?t._componentsViews:t._chartsViews,s=i?t._componentsMap:t._chartsMap,o=t._zr,l=t._api,h=0;h<a.length;h++)a[h].__alive=!1;function u(t){var e="_ec_"+t.id+"_"+t.type,h=s[e];if(!h){var u=R(t.type);(h=new(i?x.getClass(u.main,u.sub):m.getClass(u.sub))).init(n,l),s[e]=h,a.push(h),o.add(h.group)}t.__viewId=h.__id=e,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},i||r.prepareView(h,t,n,l)}i?n.eachComponent(function(t,e){"series"!==t&&u(e)}):n.eachSeries(u);for(var h=0;h<a.length;){var c=a[h];c.__alive?h++:(i||c.renderTask.dispose(),o.remove(c.group),c.dispose(n,l),a.splice(h,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Y(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function X(t,e,n,r){var i,a,s,o,l;i=t,a=e,s=n,o=r,k((0,i._componentsViews),function(t){var e=t.__model;t.render(e,a,s,o),te(e,t)}),k(t._chartsViews,function(t){t.__alive=!1}),Q(t,e,n,r),k(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Q(t,e,n,r,i){var a,o,l,h,u,c=t._scheduler;e.eachSeries(function(e){var n,a,s,o=t._chartsMap[e.__viewId];o.__alive=!0;var l=o.renderTask;c.updatePayload(l,r),i&&i.get(e.uid)&&l.dirty(),u|=l.perform(c.getPerformArgs(l)),o.group.silent=!!e.get("silent"),te(e,o),n=e,a=o,s=n.get("blendMode")||null,a.group.traverse(function(t){t.isGroup||t.style.blend===s||t.setStyle("blend",s),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",s)})})}),c.unfinished|=u,a=t._zr,o=e,l=a.storage,h=0,l.traverse(function(t){!t.isGroup&&h++}),h>o.get("hoverLayerThreshold")&&!s.node&&l.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),_(t._zr.dom,e)}function K(t,e){k(to,function(n){n(t,e)})}z.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),r=t&&t.silent;this[N]=!0,n&&H(this),G.update.call(this),this[N]=!1,Z.call(this,r),$.call(this,r)}},z.showLoading=function(t,e){if(D(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),tu[t]){var n=tu[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},z.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},z.makeActionFromEvent=function(t){var e=i.extend({},t);return e.type=ti[t.type],e},z.dispatchAction=function(t,e){if((D(e)||(e={silent:!!e}),tr[t.type])&&this._model){if(this[N])return void this._pendingActions.push(t);U.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&s.browser.weChat&&this._throttledZrFlush(),Z.call(this,e.silent),$.call(this,e.silent)}},z.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},z.on=E("on"),z.off=E("off"),z.one=E("one");var tt=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function te(t,e){var n=t.get("z"),r=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r))})}function tn(){this.eventInfo}z._initEvents=function(){k(tt,function(t){var e=function(e){var n,r=this.getModel(),a=e.target;if("globalout"===t)n={};else if(a&&null!=a.dataIndex){var s=a.dataModel||r.getSeriesByIndex(a.seriesIndex);n=s&&s.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=i.extend({},a.eventData));if(n){var o=n.componentType,l=n.componentIndex;("markLine"===o||"markPoint"===o||"markArea"===o)&&(o="series",l=n.seriesIndex);var h=o&&null!=l&&r.getComponent(o,l),u=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:n,model:h,view:u},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),k(ti,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},z.isDisposed=function(){return this._disposed},z.clear=function(){this.setOption({series:[]},!0)},z.dispose=function(){if(!this._disposed){this._disposed=!0,b.setAttribute(this.getDom(),tf,"");var t=this._api,e=this._model;k(this._componentsViews,function(n){n.dispose(e,t)}),k(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete tc[this.id]}},i.mixin(B,l),tn.prototype={constructor:tn,normalizeQuery:function(t){var e={},n={},r={};if(i.isString(t)){var a=R(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var s=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};i.each(t,function(t,i){for(var a=!1,l=0;l<s.length;l++){var h=s[l],u=i.lastIndexOf(h);if(u>0&&u===i.length-h.length){var c=i.slice(0,u);"data"!==c&&(e.mainType=c,e[h.toLowerCase()]=t,a=!0)}}o.hasOwnProperty(i)&&(n[i]=t,a=!0),a||(r[i]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:r}},filter:function(t,e,n){var r=this.eventInfo;if(!r)return!0;var i=r.targetEl,a=r.packedEvent,s=r.model,o=r.view;if(!s||!o)return!0;var l=e.cptQuery,h=e.dataQuery;return u(l,s,"mainType")&&u(l,s,"subType")&&u(l,s,"index","componentIndex")&&u(l,s,"name")&&u(l,s,"id")&&u(h,a,"name")&&u(h,a,"dataIndex")&&u(h,a,"dataType")&&(!o.filterForExposedEvent||o.filterForExposedEvent(t,e.otherQuery,i,a));function u(t,e,n,r){return null==t[n]||e[r||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var tr={},ti={},ta=[],ts=[],to=[],tl=[],th={},tu={},tc={},td={},tp=new Date-0,tg=new Date-0,tf="_echarts_instance_";function ty(t){td[t]=!1}function tx(t){return tc[b.getAttribute(t,tf)]}function tm(t){ts.push(t)}function tv(t,e){tM(ta,t,e,1e3)}function tb(t,e,n){"function"==typeof e&&(n=e,e="");var r=D(t)?t.type:[t,t={event:e}][0];t.event=(t.event||r).toLowerCase(),e=t.event,T(j.test(r)&&j.test(e)),tr[r]||(tr[r]={action:n,actionInfo:t}),ti[e]=r}function tw(t,e){tM(tl,t,e,3e3,"visual")}function tM(t,e,n,r,i){(L(e)||D(e))&&(n=e,e=r);var a=S.wrapStageHandler(n,i);return a.__prio=e,a.__raw=n,t.push(a),a}tw(2e3,M),tm(p),tv(5e3,g),tu.default=A,tb({type:"highlight",event:"highlight",update:"highlight"},i.noop),tb({type:"downplay",event:"downplay",update:"downplay"},i.noop),th.light=C,th.dark=I,e.version="4.2.1",e.dependencies={zrender:"4.0.6"},e.PRIORITY={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},e.init=function(t,e,n){var r=tx(t);if(r)return r;var i=new B(t,e,n);i.id="ec_"+tp++,tc[i.id]=i,b.setAttribute(t,tf,i.id);var a="__connectUpdateStatus";function s(t,e){for(var n=0;n<t.length;n++)t[n][a]=e}return k(ti,function(t,e){i._messageCenter.on(e,function(t){if(td[i.group]&&0!==i[a]&&(!t||!t.escapeConnect)){var e=i.makeActionFromEvent(t),n=[];k(tc,function(t){t!==i&&t.group===i.group&&n.push(t)}),s(n,0),k(n,function(t){1!==t[a]&&t.dispatchAction(e)}),s(n,2)}})}),i},e.connect=function(t){if(i.isArray(t)){var e=t;t=null,k(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+tg++,k(e,function(e){e.group=t})}return td[t]=!0,t},e.disConnect=ty,e.disconnect=ty,e.dispose=function(t){"string"==typeof t?t=tc[t]:t instanceof B||(t=tx(t)),t instanceof B&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=tx,e.getInstanceById=function(t){return tc[t]},e.registerTheme=function(t,e){th[t]=e},e.registerPreprocessor=tm,e.registerProcessor=tv,e.registerPostUpdate=function(t){to.push(t)},e.registerAction=tb,e.registerCoordinateSystem=function(t,e){c.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=c.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){tM(tl,t,e,1e3,"layout")},e.registerVisual=tw,e.registerLoading=function(t,e){tu[t]=e},e.extendComponentModel=function(t){return f.extend(t)},e.extendComponentView=function(t){return x.extend(t)},e.extendSeriesModel=function(t){return y.extend(t)},e.extendChartView=function(t){return m.extend(t)},e.setCanvasCreator=function(t){i.$override("createCanvas",t)},e.registerMap=function(t,e,n){P.registerMap(t,e,n)},e.getMap=function(t){var e=P.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={};var t_=n(83471);for(var tA in t_)t_.hasOwnProperty(tA)&&(e[tA]=t_[tA])},83471:function(t,e,n){e.zrender=n(19206),e.matrix=n(36653),e.vector=n(3265);var r=n(66023);e.color=n(53453);var i=n(76165);e.number=n(98763),e.format=n(20438);var a=n(44050);a.throttle,e.throttle=a.throttle,e.helper=n(16129);var s=n(75376);e.parseGeoJSON=s,e.List=n(90942),e.Model=n(27611),e.Axis=n(11237),e.env=n(57674);var o={};r.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){o[t]=r[t]});var l={};r.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){l[t]=i[t]}),e.parseGeoJson=s,e.util=o,e.graphic=l},16129:function(t,e,n){var r=n(66023),i=n(6551),a=n(16978),s=n(80390),o=n(27611),l=n(68006);l.getLayoutRect,e.getLayoutRect=l.getLayoutRect;var h=n(74733),u=h.enableDataStack,c=h.isDimensionStacked,d=h.getStackedDimension;e.completeDimensions=n(30456),e.createDimensions=n(35047),e.createSymbol=n(87557).createSymbol,e.createList=function(t){return i(t.getSource(),t)},e.dataStack={isDimensionStacked:c,enableDataStack:u,getStackedDimension:d},e.createScale=function(t,e){var n=e;o.isInstance(e)||(n=new o(e),r.mixin(n,s));var i=a.createScaleByModel(n);return i.setExtent(t[0],t[1]),a.niceScaleExtent(i,n),i},e.mixinAxisModelCommonMethods=function(t){r.mixin(t,s)}},66934:function(t){t.exports={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}}},42862:function(t,e,n){var r=n(66023),i=n(98763).parsePercent,a=n(74733).isDimensionStacked,s=n(85773),o="__ec_stack_",l="undefined"!=typeof Float32Array?Float32Array:Array;function h(t){return t.get("stack")||o+t.seriesIndex}function u(t){return t.dim+t.index}function c(t,e){var n=[];return e.eachSeriesByType(t,function(t){y(t)&&!x(t)&&n.push(t)}),n}function d(t){var e=[];return r.each(t,function(t){var n=t.getData(),r=t.coordinateSystem.getBaseAxis(),a=r.getExtent(),s="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/n.count(),o=i(t.get("barWidth"),s),l=i(t.get("barMaxWidth"),s),c=t.get("barGap"),d=t.get("barCategoryGap");e.push({bandWidth:s,barWidth:o,barMaxWidth:l,barGap:c,barCategoryGap:d,axisKey:u(r),stackId:h(t)})}),p(e)}function p(t){var e={};r.each(t,function(t,n){var r=t.axisKey,i=t.bandWidth,a=e[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=a.stacks;e[r]=a;var o=t.stackId;!s[o]&&a.autoWidthCount++,s[o]=s[o]||{width:0,maxWidth:0};var l=t.barWidth;l&&!s[o].width&&(s[o].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var h=t.barMaxWidth;h&&(s[o].maxWidth=h);var u=t.barGap;null!=u&&(a.gap=u);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var n={};return r.each(e,function(t,e){n[e]={};var a,s=t.stacks,o=t.bandWidth,l=i(t.categoryGap,o),h=i(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,d=(u-l)/(c+(c-1)*h);d=Math.max(d,0),r.each(s,function(t,e){var n=t.maxWidth;n&&n<d&&(n=Math.min(n,u),t.width&&(n=Math.min(n,t.width)),u-=n,t.width=n,c--)}),d=Math.max(d=(u-l)/(c+(c-1)*h),0);var p=0;r.each(s,function(t,e){t.width||(t.width=d),a=t,p+=t.width*(1+h)}),a&&(p-=a.width*h);var g=-p/2;r.each(s,function(t,r){n[e][r]=n[e][r]||{offset:g,width:t.width},g+=t.width*(1+h)})}),n}function g(t,e,n){if(t&&e){var r=t[u(e)];return null!=r&&null!=n&&(r=r[h(n)]),r}}var f={seriesType:"bar",plan:s(),reset:function(t){if(y(t)&&x(t)){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=e.mapDimension(i.dim),s=e.mapDimension(r.dim),o=i.isHorizontal(),h=+!o,u=g(d([t]),r,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var c,d=new l(2*t.count),p=[],g=[],f=0;null!=(c=t.next());)g[h]=e.get(a,c),g[1-h]=e.get(s,c),p=n.dataToPoint(g,null,p),d[f++]=p[0],d[f++]=p[1];e.setLayout({largePoints:d,barWidth:u,valueAxisStart:m(r,i,!1),valueAxisHorizontal:o})}}}}};function y(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function x(t){return t.pipelineContext&&t.pipelineContext.large}function m(t,e,n){var r,i,a=e.getGlobalExtent();a[0]>a[1]?(r=a[1],i=a[0]):(r=a[0],i=a[1]);var s=e.toGlobalCoord(e.dataToCoord(0));return s<r&&(s=r),s>i&&(s=i),s}e.getLayoutOnAxis=function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var a=n.getBandWidth(),s=0;s<t.count||0;s++)e.push(r.defaults({bandWidth:a,axisKey:i,stackId:o+s},t));for(var l=p(e),h=[],s=0;s<t.count;s++){var u=l[i][o+s];u.offsetCenter=u.offset+u.width/2,h.push(u)}return h}},e.prepareLayoutBarSeries=c,e.makeColumnLayout=d,e.retrieveColumnLayout=g,e.layout=function(t,e){var n=c(t,e),i=d(n),s={},o={};r.each(n,function(t){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),l=h(t),c=i[u(r)][l],d=c.offset,p=c.width,g=n.getOtherAxis(r),f=t.get("barMinHeight")||0;s[l]=s[l]||[],o[l]=o[l]||[],e.setLayout({offset:d,size:p});for(var y=e.mapDimension(g.dim),x=e.mapDimension(r.dim),v=a(e,y),b=g.isHorizontal(),w=m(r,g,v),M=0,_=e.count();M<_;M++){var A,S,C,I,P=e.get(y,M),T=e.get(x,M);if(!isNaN(P)){var k=P>=0?"p":"n",L=w;if(v&&(s[l][T]||(s[l][T]={p:w,n:w}),L=s[l][T][k]),b){var D=n.dataToPoint([P,T]);A=L,S=D[1]+d,C=D[0]-w,I=p,Math.abs(C)<f&&(C=(C<0?-1:1)*f),v&&(s[l][T][k]+=C)}else{var D=n.dataToPoint([T,P]);A=D[0]+d,S=L,C=p,Math.abs(I=D[1]-w)<f&&(I=(I<=0?-1:1)*f),v&&(s[l][T][k]+=I)}e.setItemLayout(M,{x:A,y:S,width:C,height:I})}}},this)},e.largeLayout=f},19995:function(t,e,n){var r=n(66023),i=n(98763).parsePercent,a=n(74733).isDimensionStacked;function s(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}t.exports=function(t,e,n){n.getWidth(),n.getHeight();var o,l,h,u,c={},d=(o=r.filter(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}),h={},r.each(o,function(t,e){var n=t.getData(),r=t.coordinateSystem.getBaseAxis(),a=r.getExtent(),o="category"===r.type?r.getBandWidth():Math.abs(a[1]-a[0])/n.count(),l=h[r.dim]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;h[r.dim]=l;var c=s(t);!u[c]&&l.autoWidthCount++,u[c]=u[c]||{width:0,maxWidth:0};var d=i(t.get("barWidth"),o),p=i(t.get("barMaxWidth"),o),g=t.get("barGap"),f=t.get("barCategoryGap");d&&!u[c].width&&(d=Math.min(l.remainedWidth,d),u[c].width=d,l.remainedWidth-=d),p&&(u[c].maxWidth=p),null!=g&&(l.gap=g),null!=f&&(l.categoryGap=f)}),u={},r.each(h,function(t,e){u[e]={};var n,a=t.stacks,s=t.bandWidth,o=i(t.categoryGap,s),l=i(t.gap,1),h=t.remainedWidth,c=t.autoWidthCount,d=(h-o)/(c+(c-1)*l);d=Math.max(d,0),r.each(a,function(t,e){var n=t.maxWidth;n&&n<d&&(n=Math.min(n,h),t.width&&(n=Math.min(n,t.width)),h-=n,t.width=n,c--)}),d=Math.max(d=(h-o)/(c+(c-1)*l),0);var p=0;r.each(a,function(t,e){t.width||(t.width=d),n=t,p+=t.width*(1+l)}),n&&(p-=n.width*l);var g=-p/2;r.each(a,function(t,n){u[e][n]=u[e][n]||{offset:g,width:t.width},g+=t.width*(1+l)})}),u);e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),i=s(t),o=d[r.dim][i],l=o.offset,h=o.width,u=n.getOtherAxis(r),p=t.coordinateSystem.cx,g=t.coordinateSystem.cy,f=t.get("barMinHeight")||0,y=t.get("barMinAngle")||0;c[i]=c[i]||[];for(var x=e.mapDimension(u.dim),m=e.mapDimension(r.dim),v=a(e,x),b=u.getExtent()[0],w=0,M=e.count();w<M;w++){var _,A,S,C,I=e.get(x,w),P=e.get(m,w);if(!isNaN(I)){var T=I>=0?"p":"n",k=b;if(v&&(c[i][P]||(c[i][P]={p:b,n:b}),k=c[i][P][T]),"radius"===u.dim){var L=u.dataToRadius(I)-b,D=r.dataToAngle(P);Math.abs(L)<f&&(L=(L<0?-1:1)*f),_=k,A=k+L,C=(S=D-l)-h,v&&(c[i][P][T]=A)}else{var R=u.dataToAngle(I,!0)-b,N=r.dataToRadius(P);Math.abs(R)<y&&(R=(R<0?-1:1)*y),A=(_=N+l)+h,S=k,C=k+R,v&&(c[i][P][T]=C)}e.setItemLayout(w,{cx:p,cy:g,r0:_,r:A,startAngle:-S*Math.PI/180,endAngle:-C*Math.PI/180})}}}},this)}},64342:function(t,e,n){var r=n(66023).map,i=n(85773),a=n(74733).isDimensionStacked;t.exports=function(t){return{seriesType:t,plan:i(),reset:function(t){var e=t.getData(),n=t.coordinateSystem,i=t.pipelineContext.large;if(n){var s=r(n.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),o=s.length,l=e.getCalculationInfo("stackResultDimension");return a(e,s[0])&&(s[0]=l),a(e,s[1])&&(s[1]=l),o&&{progress:function(t,e){for(var r,a=t.end-t.start,l=i&&new Float32Array(a*o),h=t.start,u=0,c=[],d=[];h<t.end;h++){if(1===o){var p=e.get(s[0],h);r=!isNaN(p)&&n.dataToPoint(p,null,d)}else{var p=c[0]=e.get(s[0],h),g=c[1]=e.get(s[1],h);r=!isNaN(p)&&!isNaN(g)&&n.dataToPoint(c,null,d)}i?(l[u++]=r?r[0]:NaN,l[u++]=r?r[1]:NaN):e.setItemLayout(h,r&&r.slice()||[NaN,NaN])}i&&e.setLayout("symbolPoints",l)}}}}}}},28794:function(t,e,n){var r=n(66023),i=n(76165),a=Math.PI;t.exports=function(t,e){e=e||{},r.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new i.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),s=new i.Arc({shape:{startAngle:-a/2,endAngle:-a/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new i.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});s.animateShape(!0).when(1e3,{endAngle:3*a/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:3*a/2}).delay(300).start("circularInOut");var l=new i.Group;return l.add(s),l.add(o),l.add(n),l.resize=function(){var e=t.getWidth()/2,r=t.getHeight()/2;s.setShape({cx:e,cy:r});var i=s.shape.r;o.setShape({x:e-i,y:r-i,width:2*i,height:2*i}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},l.resize(),l}},76056:function(t,e,n){var r=n(66023),i=n(27611),a=n(79426),s=n(51938),o=s.enableClassManagement,l=s.parseClassType,h=n(70018).makeInner,u=n(68006),c=n(76627),d=h(),p=i.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,r){i.call(this,t,e,n,r),this.uid=a.getUID("ec_cpt_model")},init:function(t,e,n,r){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?u.getLayoutParams(t):{},a=e.getTheme();r.merge(t,a.get(this.mainType)),r.merge(t,this.getDefaultOption()),n&&u.mergeLayoutParam(t,i,n)},mergeOption:function(t,e){r.merge(this.option,t,!0);var n=this.layoutMode;n&&u.mergeLayoutParam(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=d(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var a={},s=e.length-1;s>=0;s--)a=r.merge(a,e[s],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});o(p,{registerWhenExtend:!0}),a.enableSubTypeDefaulter(p),a.enableTopologicalTravel(p,function(t){var e=[];return r.each(p.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=r.map(e,function(t){return l(t).main}),"dataset"!==t&&0>=r.indexOf(e,"dataset")&&e.unshift("dataset"),e}),r.mixin(p,c),t.exports=p},16438:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=r.each,a=r.filter,s=r.map,o=r.isArray,l=r.indexOf,h=r.isObject,u=r.isString,c=r.createHashMap,d=r.assert,p=r.clone,g=r.merge,f=r.extend,y=r.mixin,x=n(70018),m=n(27611),v=n(76056),b=n(11685),w=n(30698),M=n(4522).resetSourceDefaulter,_="\0_ec_inner",A=m.extend({init:function(t,e,n,r){n=n||{},this.option=null,this._theme=new m(n),this._optionManager=r},setOption:function(t,e){d(!(_ in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var r=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(r)):S.call(this,r),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=n.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var s=n.getMediaOption(this,this._api);s.length&&i(s,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,n=this._componentsMap,r=[];M(this),i(t,function(t,n){null!=t&&(v.hasClass(n)?n&&r.push(n):e[n]=null==e[n]?p(t):g(e[n],t,!0))}),v.topologicalTravel(r,v.getAllClassMainTypes(),function(r,a){var s,l,u,c=x.normalizeToArray(t[r]),p=x.mappingToExists(n.get(r),c);x.makeIdAndName(p),i(p,function(t,e){var n,i,a,s=t.option;h(s)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(n=r,i=s,a=t.exist,i.type?i.type:a?a.subType:v.determineSubType(n,i)))});var g=(s=n,o(l=a)||(l=l?[l]:[]),u={},i(l,function(t){u[t]=(s.get(t)||[]).slice()}),u);e[r]=[],n.set(r,[]),i(p,function(t,i){var a=t.exist,s=t.option;if(d(h(s)||a,"Empty component definition"),s){var o=v.getClass(r,t.keyInfo.subType,!0);if(a&&a instanceof o)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var l=f({dependentModels:g,componentIndex:i},t.keyInfo);f(a=new o(s,this,this,l),l),a.init(s,this,this,l),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);n.get(r)[i]=a,e[r][i]=a.option},this),"series"===r&&C(this,n.get("series"))},this),this._seriesIndicesMap=c(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=p(this.option);return i(t,function(e,n){if(v.hasClass(n)){for(var e=x.normalizeToArray(e),r=e.length-1;r>=0;r--)x.isIdInner(e[r])&&e.splice(r,1);t[n]=e}}),delete t[_],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e,n=t.mainType;if(!n)return[];var r=t.index,i=t.id,h=t.name,u=this._componentsMap.get(n);if(!u||!u.length)return[];if(null!=r)o(r)||(r=[r]),e=a(s(r,function(t){return u[t]}),function(t){return!!t});else if(null!=i){var c=o(i);e=a(u,function(t){return c&&l(i,t.id)>=0||!c&&t.id===i})}else if(null!=h){var d=o(h);e=a(u,function(t){return d&&l(h,t.name)>=0||!d&&t.name===h})}else e=u.slice();return I(e,t)},findComponents:function(t){var e,n,r,i,s,o=t.query,l=t.mainType,h=(e=o,n=l+"Index",r=l+"Id",i=l+"Name",e&&(null!=e[n]||null!=e[r]||null!=e[i])?{mainType:l,index:e[n],id:e[r],name:e[i]}:null);return s=I(h?this.queryComponents(h):this._componentsMap.get(l),t),t.filter?a(s,t.filter):s},eachComponent:function(t,e,n){var r=this._componentsMap;"function"==typeof t?(n=e,e=t,r.each(function(t,r){i(t,function(t,i){e.call(n,r,t,i)})})):u(t)?i(r.get(t),e,n):h(t)&&i(this.findComponents(t),e,n)},getSeriesByName:function(t){return a(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return a(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){i(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];t.call(e,r,n)},this)},eachRawSeries:function(t,e){i(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){i(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];i.subType===t&&e.call(n,i,r)},this)},eachRawSeriesByType:function(t,e,n){return i(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){C(this,a(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;C(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),v.topologicalTravel(n,v.getAllClassMainTypes(),function(n,r){i(e.get(n),function(e){"series"===n&&function(t,e){if(e){var n=e.seiresIndex,r=e.seriesId,i=e.seriesName;return null!=n&&t.componentIndex!==n||null!=r&&t.id!==r||null!=i&&t.name!==i}}(e,t)||e.restoreData()})})}});function S(t){var e,n;this.option={},this.option[_]=1,this._componentsMap=c({series:[]}),this._seriesIndices,this._seriesIndicesMap,e=this._theme.option,n=t.color&&!t.colorLayer,i(e,function(e,r){("colorLayer"!==r||!n)&&(v.hasClass(r)||("object"==typeof e?t[r]=t[r]?g(t[r],e,!1):p(e):null==t[r]&&(t[r]=e)))}),g(t,b,!1),this.mergeOption(t)}function C(t,e){t._seriesIndicesMap=c(t._seriesIndices=s(e,function(t){return t.componentIndex})||[])}function I(t,e){return e.hasOwnProperty("subType")?a(t,function(t){return t.subType===e.subType}):t}y(A,w),t.exports=A},27611:function(t,e,n){var r=n(66023),i=n(57674),a=n(70018).makeInner,s=n(51938),o=s.enableClassExtend,l=s.enableClassCheck,h=n(83909),u=n(69957),c=n(78055),d=n(157),p=r.mixin,g=a();function f(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function y(t,e,n){for(var r=0;r<e.length&&(!e[r]||null!=(t=t&&"object"==typeof t?t[e[r]]:null));r++);return null==t&&n&&(t=n.get(e)),t}function x(t,e){var n=g(t).getParent;return n?n.call(t,e):t.parentModel}f.prototype={constructor:f,init:null,mergeOption:function(t){r.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:y(this.option,this.parsePath(t),!e&&x(this,t))},getShallow:function(t,e){var n=this.option,r=null==n?n:n[t],i=!e&&x(this,t);return null==r&&i&&(r=i.getShallow(t)),r},getModel:function(t,e){var n;return new f(null==t?this.option:y(this.option,t=this.parsePath(t)),e=e||(n=x(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(r.clone(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){g(this).getParent=t},isAnimationEnabled:function(){if(!i.node){if(null!=this.option.animation)return!!this.option.animation;else if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},o(f),l(f),p(f,h),p(f,u),p(f,c),p(f,d),t.exports=f},53734:function(t,e,n){var r=n(66023),i=n(70018),a=n(76056),s=r.each,o=r.clone,l=r.map,h=r.merge,u=/^(min|max)?(.+)$/;function c(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function d(t,e,n){var i,a,o=[],l=[],h=t.timeline;return t.baseOption&&(a=t.baseOption),(h||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media&&(a=a||{},s(t.media,function(t){t&&t.option&&(t.query?l.push(t):i||(i=t))})),a||(a=t),a.timeline||(a.timeline=h),s([a].concat(o).concat(r.map(l,function(t){return t.option})),function(t){s(e,function(e){e(t,n)})}),{baseOption:a,timelineOptions:o,mediaDefault:i,mediaList:l}}c.prototype={constructor:c,setOption:function(t,e){t&&r.each(i.normalizeToArray(t.series),function(t){t&&t.data&&r.isTypedArray(t.data)&&r.setAsPrimitive(t.data)}),t=o(t,!0);var n,u,c=this._optionBackup,p=d.call(this,t,e,!c);this._newBaseOption=p.baseOption,c?(n=c.baseOption,s(u=(u=p.baseOption)||{},function(t,e){if(null!=t){var r=n[e];if(a.hasClass(e)){t=i.normalizeToArray(t),r=i.normalizeToArray(r);var s=i.mappingToExists(r,t);n[e]=l(s,function(t){return t.option&&t.exist?h(t.exist,t.option,!0):t.exist||t.option})}else n[e]=h(r,t,!0)}}),p.timelineOptions.length&&(c.timelineOptions=p.timelineOptions),p.mediaList.length&&(c.mediaList=p.mediaList),p.mediaDefault&&(c.mediaDefault=p.mediaDefault)):this._optionBackup=p},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=l(e.timelineOptions,o),this._mediaList=l(e.mediaList,o),this._mediaDefault=o(e.mediaDefault),this._currentMediaIndices=[],o(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var r=t.getComponent("timeline");r&&(e=o(n[r.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,n,i=this._api.getWidth(),a=this._api.getHeight(),s=this._mediaList,h=this._mediaDefault,c=[],d=[];if(!s.length&&!h)return d;for(var p=0,g=s.length;p<g;p++)(function(t,e,n){var i={width:e,height:n,aspectratio:e/n},a=!0;return r.each(t,function(t,e){var n=e.match(u);if(n&&n[1]&&n[2]){var r,s,o,l=n[1];r=i[n[2].toLowerCase()],s=t,("min"===(o=l)?r>=s:"max"===o?r<=s:r===s)||(a=!1)}}),a})(s[p].query,i,a)&&c.push(p);return!c.length&&h&&(c=[-1]),c.length&&(e=c,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(d=l(c,function(t){return o(-1===t?h.option:s[t].option)})),this._currentMediaIndices=c,d}},t.exports=c},26626:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=n(57674),a=n(20438),s=a.formatTime,o=a.encodeHTML,l=a.addCommas,h=a.getTooltipMarker,u=n(70018),c=n(76056),d=n(30698),p=n(9084),g=n(68006),f=g.getLayoutParams,y=g.mergeLayoutParam,x=n(68940).createTask,m=n(4522),v=m.prepareSource,b=m.getSource,w=n(89211).retrieveRawValue,M=u.makeInner(),_=c.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n,r){this.seriesIndex=this.componentIndex,this.dataTask=x({count:S,reset:C}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),v(this);var i=this.getInitialData(t,n);P(i,this),this.dataTask.context.data=i,M(this).dataBeforeProcessed=i,A(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?f(t):{},a=this.subType;c.hasClass(a)&&(a+="Series"),r.merge(t,e.getTheme().get(this.subType)),r.merge(t,this.getDefaultOption()),u.defaultEmphasis(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&y(t,i,n)},mergeOption:function(t,e){t=r.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&y(this.option,t,n),v(this);var i=this.getInitialData(t,e);P(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,M(this).dataBeforeProcessed=i,A(this)},fillDataTextStyle:function(t){if(t&&!r.isTypedArray(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&u.defaultEmphasis(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=k(this);if(!e)return M(this).data;var n=e.context.data;return null==t?n:n.getLinkedData(t)},setData:function(t){var e=k(this);if(e){var n=e.context;n.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),n.outputData=t,e!==this.dataTask&&(n.data=t)}M(this).data=t},getSource:function(){return b(this)},getRawData:function(){return M(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,n,i){var a,c=this,d="html"===(i=i||"html")?"<br/>":"\n",p="richText"===i,g={},f=0,y=this.getData(),x=y.mapDimension("defaultedTooltip",!0),m=x.length,v=this.getRawValue(t),b=r.isArray(v),M=y.getItemVisual(t,"color");r.isObject(M)&&M.colorStops&&(M=(M.colorStops[0]||{}).color),M=M||"transparent";var _=(m>1||b&&!m?function(n){var a=r.reduce(n,function(t,e,n){var r=y.getDimensionInfo(n);return t|(r&&!1!==r.tooltip&&null!=r.displayName)},0),u=[];function d(t,n){var r=y.getDimensionInfo(n);if(r&&!1!==r.otherDims.tooltip){var d=r.type,x="sub"+c.seriesIndex+"at"+f,m=h({color:M,type:"subItem",renderMode:i,markerId:x}),v="string"==typeof m?m:m.content,b=(a?v+o(r.displayName||"-")+": ":"")+o("ordinal"===d?t+"":"time"===d?e?"":s("yyyy/MM/dd hh:mm:ss",t):l(t));b&&u.push(b),p&&(g[x]=M,++f)}}x.length?r.each(x,function(e){d(w(y,t,e),e)}):r.each(n,d);var m=a?p?"\n":"<br/>":"",v=m+u.join(m||", ");return{renderMode:i,content:v,style:g}}(v):(a=m?w(y,t,x[0]):b?v[0]:v,{renderMode:i,content:o(l(a)),style:g})).content,A=c.seriesIndex+"at"+f,S=h({color:M,type:"item",renderMode:i,markerId:A});g[A]=M,++f;var C=y.getName(t),I=this.name;u.isNameSpecified(this)||(I=""),I=I?o(I)+(e?": ":d):"";var P="string"==typeof S?S:S.content;return{html:e?P+I+_:I+P+(C?o(C)+": "+_:_),markers:g}},isAnimationEnabled:function(){if(i.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var r=this.ecModel,i=d.getColorFromPalette.call(this,t,e,n);return i||(i=r.getColorFromPalette(t,e,n)),i},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function A(t){var e,n,i,a=t.name;u.isNameSpecified(t)||(t.name=(n=(e=t.getRawData()).mapDimension("seriesName",!0),i=[],r.each(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")||a))}function S(t){return t.model.getRawData().count()}function C(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),I}function I(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function P(t,e){r.each(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,r.curry(T,e))})}function T(t){var e=k(t);e&&e.setOutputEnd(this.count())}function k(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(t.uid))}return r}}r.mixin(_,p),r.mixin(_,d),t.exports=_},11685:function(t){var e="";"undefined"!=typeof navigator&&(e=navigator.platform||""),t.exports={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:e.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1}},69957:function(t,e,n){var r=n(24954)([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]);t.exports={getAreaStyle:function(t,e){return r(this,t,e)}}},76627:function(t){t.exports={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}},30698:function(t,e,n){var r=n(70018),i=r.makeInner,a=r.normalizeToArray,s=i();t.exports={clearColorPalette:function(){s(this).colorIdx=0,s(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var r=s(e=e||this),i=r.colorIdx||0,o=r.colorNameMap=r.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var l=a(this.get("color",!0)),h=this.get("colorLayer",!0),u=null!=n&&h?function(t,e){for(var n=t.length,r=0;r<n;r++)if(t[r].length>e)return t[r];return t[n-1]}(h,n):l;if((u=u||l)&&u.length){var c=u[i];return t&&(o[t]=c),r.colorIdx=(i+1)%u.length,c}}}},9084:function(t,e,n){var r=n(89211).retrieveRawValue,i=n(20438),a=i.getTooltipMarker,s=i.formatTpl,o=n(70018).getTooltipRenderMode,l=/\{@(.+?)\}/g;t.exports={getDataParams:function(t,e){var n=this.getData(e),r=this.getRawValue(t,e),i=n.getRawIndex(t),s=n.getName(t),l=n.getRawDataItem(t),h=n.getItemVisual(t,"color"),u=this.ecModel.getComponent("tooltip"),c=o(u&&u.get("renderMode")),d=this.mainType,p="series"===d;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:s,dataIndex:i,data:l,dataType:e,value:r,color:h,marker:a({color:h,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,n,i,a){e=e||"normal";var o=this.getData(n),h=o.getItemModel(t),u=this.getDataParams(t,n);null!=i&&u.value instanceof Array&&(u.value=u.value[i]);var c=h.get("normal"===e?[a||"label","formatter"]:[e,a||"label","formatter"]);return"function"==typeof c?(u.status=e,c(u)):"string"==typeof c?s(c,u).replace(l,function(e,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),r(o,t,n)}):void 0},getRawValue:function(t,e){return r(this.getData(e),t)},formatTooltip:function(){}}},157:function(t,e,n){var r=n(24954)([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]);t.exports={getItemStyle:function(t,e){var n=r(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}}},83909:function(t,e,n){var r=n(24954)([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);t.exports={getLineStyle:function(t){var e=r(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),r=4*t;return"solid"===e||null==e?null:"dashed"===e?[r,r]:[n,n]}}},24954:function(t,e,n){var r=n(66023);t.exports=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,n,i){for(var a={},s=0;s<t.length;s++){var o=t[s][1];if(!(n&&r.indexOf(n,o)>=0||i&&0>r.indexOf(i,o))){var l=e.getShallow(o);null!=l&&(a[t[s][0]]=l)}}return a}}},78055:function(t,e,n){var r=n(99280),i=n(76165),a=["textStyle","color"];t.exports={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(a):null)},getFont:function(){return i.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return r.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}}},26774:function(t,e,n){n(38603).__DEV__;var r=n(66023),i=r.createHashMap;r.retrieve;var a=r.each,s={cartesian2d:function(t,e,n,r){var i=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",i),n.set("y",a),o(i)&&(r.set("x",i),e.firstCategoryDimIndex=0),o(a)&&(r.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,r){var i=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",i),o(i)&&(r.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,n,r){var i=t.getReferringComponents("polar")[0],a=i.findAxisModel("radiusAxis"),s=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",s),o(a)&&(r.set("radius",a),e.firstCategoryDimIndex=0),o(s)&&(r.set("angle",s),e.firstCategoryDimIndex=1)},geo:function(t,e,n,r){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var i=t.ecModel,s=i.getComponent("parallel",t.get("parallelIndex")),l=e.coordSysDims=s.dimensions.slice();a(s.parallelAxisIndex,function(t,a){var s=i.getComponent("parallelAxis",t),h=l[a];n.set(h,s),o(s)&&null==e.firstCategoryDimIndex&&(r.set(h,s),e.firstCategoryDimIndex=a)})}};function o(t){return"category"===t.get("type")}e.getCoordSysDefineBySeries=function(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:i(),categoryAxisMap:i()},r=s[e];if(r)return r(t,n,n.axisMap,n.categoryAxisMap),n}},34357:function(t,e,n){var r=n(66023),i=r.each,a=r.isArray,s=r.isObject,o=n(17544),l=n(70018).normalizeToArray;function h(t){i(u,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var u=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],c=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];t.exports=function(t,e){o(t,e),t.series=l(t.series),i(t.series,function(t){if(s(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var n=function(t,e){e=e.split(",");for(var n=t,r=0;r<e.length&&null!=(n=n&&n[e[r]]);r++);return n}(t,"pointer.color");null!=n&&function(t,e,n,r){e=e.split(",");for(var i,a=t,s=0;s<e.length-1;s++)null==a[i=e[s]]&&(a[i]={}),a=a[i];null==a[e[s]]&&(a[e[s]]=n)}(t,"itemStyle.normal.color",n)}h(t)}}),t.dataRange&&(t.visualMap=t.dataRange),i(c,function(e){var n=t[e];n&&(a(n)||(n=[n]),i(n,function(t){h(t)}))})}},17544:function(t,e,n){var r=n(66023),i=n(70018),a=r.each,s=r.isObject,o=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function l(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=o.length;n<i;n++){var a=o[n],s=e.normal,l=e.emphasis;s&&s[a]&&(t[a]=t[a]||{},t[a].normal?r.merge(t[a].normal,s[a]):t[a].normal=s[a],s[a]=null),l&&l[a]&&(t[a]=t[a]||{},t[a].emphasis?r.merge(t[a].emphasis,l[a]):t[a].emphasis=l[a],l[a]=null)}}function h(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,a=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,r.defaults(t[e],i)):t[e]=i),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a)}}function u(t){h(t,"itemStyle"),h(t,"lineStyle"),h(t,"areaStyle"),h(t,"label"),h(t,"labelLine"),h(t,"upperLabel"),h(t,"edgeLabel")}function c(t,e){var n=s(t)&&t[e],r=s(n)&&n.textStyle;if(r)for(var a=0,o=i.TEXT_STYLE_OPTIONS.length;a<o;a++){var e=i.TEXT_STYLE_OPTIONS[a];r.hasOwnProperty(e)&&(n[e]=r[e])}}function d(t){t&&(u(t),c(t,"label"),t.emphasis&&c(t.emphasis,"label"))}function p(t){return r.isArray(t)?t:t?[t]:[]}function g(t){return(r.isArray(t)?t[0]:t)||{}}t.exports=function(t,e){a(p(t.series),function(t){s(t)&&function(t){if(s(t)){l(t),u(t),c(t,"label"),c(t,"upperLabel"),c(t,"edgeLabel"),t.emphasis&&(c(t.emphasis,"label"),c(t.emphasis,"upperLabel"),c(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(l(e),d(e));var n=t.markLine;n&&(l(n),d(n));var i=t.markArea;i&&d(i);var a=t.data;if("graph"===t.type){a=a||t.nodes;var o=t.links||t.edges;if(o&&!r.isTypedArray(o))for(var p=0;p<o.length;p++)d(o[p]);r.each(t.categories,function(t){u(t)})}if(a&&!r.isTypedArray(a))for(var p=0;p<a.length;p++)d(a[p]);var e=t.markPoint;if(e&&e.data)for(var g=e.data,p=0;p<g.length;p++)d(g[p]);var n=t.markLine;if(n&&n.data)for(var f=n.data,p=0;p<f.length;p++)r.isArray(f[p])?(d(f[p][0]),d(f[p][1])):d(f[p]);"gauge"===t.type?(c(t,"axisLabel"),c(t,"title"),c(t,"detail")):"treemap"===t.type?(h(t.breadcrumb,"itemStyle"),r.each(t.levels,function(t){u(t)})):"tree"===t.type&&u(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),a(n,function(e){a(p(t[e]),function(t){t&&(c(t,"axisLabel"),c(t.axisPointer,"label"))})}),a(p(t.parallel),function(t){var e=t&&t.parallelAxisDefault;c(e,"axisLabel"),c(e&&e.axisPointer,"label")}),a(p(t.calendar),function(t){h(t,"itemStyle"),c(t,"dayLabel"),c(t,"monthLabel"),c(t,"yearLabel")}),a(p(t.radar),function(t){c(t,"name")}),a(p(t.geo),function(t){s(t)&&(d(t),a(p(t.regions),function(t){d(t)}))}),a(p(t.timeline),function(t){d(t),h(t,"label"),h(t,"itemStyle"),h(t,"controlStyle",!0);var e=t.data;r.isArray(e)&&r.each(e,function(t){r.isObject(t)&&(h(t,"label"),h(t,"itemStyle"))})}),a(p(t.toolbox),function(t){h(t,"iconStyle"),a(t.feature,function(t){h(t,"iconStyle")})}),c(g(t.axisPointer),"label"),c(g(t.tooltip).axisPointer,"label")}},6817:function(t){t.exports=function(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var r=t.getData();r.filterSelf(function(t){for(var e=r.getName(t),i=0;i<n.length;i++)if(!n[i].isSelected(e))return!1;return!0})}}}}},45868:function(t){var e={average:function(t){for(var e=0,n=0,r=0;r<t.length;r++)!isNaN(t[r])&&(e+=t[r],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},n=function(t,e){return Math.round(t.length/2)};t.exports=function(t){return{seriesType:t,modifyOutputEnd:!0,reset:function(t,r,i){var a=t.getData(),s=t.get("sampling"),o=t.coordinateSystem;if("cartesian2d"===o.type&&s){var l,h=o.getBaseAxis(),u=o.getOtherAxis(h),c=h.getExtent(),d=c[1]-c[0],p=Math.round(a.count()/d);p>1&&("string"==typeof s?l=e[s]:"function"==typeof s&&(l=s),l&&t.setData(a.downSample(a.mapDimension(u.dim),1/p,l,n)))}}}}},45888:function(t,e,n){var r=n(66023),i=r.createHashMap,a=r.each;function s(t){a(t,function(e,n){var r=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],s=e.data,o=e.isStackedByIndex,l=s.map(a,function(a,l,h){var u,c,d=s.get(e.stackedDimension,h);if(isNaN(d))return i;o?c=s.getRawIndex(h):u=s.get(e.stackedByDimension,h);for(var p=NaN,g=n-1;g>=0;g--){var f=t[g];if(o||(c=f.data.rawIndexOf(f.stackedByDimension,u)),c>=0){var y=f.data.getByRawIndex(f.stackResultDimension,c);if(d>=0&&y>0||d<=0&&y<0){d+=y,p=y;break}}}return r[0]=d,r[1]=p,r});s.hostModel.setData(l),e.data=l})}t.exports=function(t){var e=i();t.eachSeries(function(t){var n=t.get("stack");if(n){var r=e.get(n)||e.set(n,[]),i=t.getData(),a={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(a)}}),e.each(s)}},74323:function(t,e,n){var r=n(98763),i=n(20438),a=n(3029),s=n(32683),o=r.round,l=a.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),l.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=s.getIntervalPrecision(t)},getTicks:function(){return s.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=r.getPrecisionSafe(t)||0:"auto"===n&&(n=this._intervalPrecision),t=o(t,n,!0),i.addCommas(t)},niceTicks:function(t,e,n){t=t||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var a=s.intervalScaleNiceTicks(r,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=o(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=o(Math.ceil(e[1]/r)*r))}});l.create=function(){return new l},t.exports=l},98990:function(t,e,n){var r=n(66023),i=n(3029),a=n(98763),s=n(74323),o=i.prototype,l=s.prototype,h=a.getPrecisionSafe,u=a.round,c=Math.floor,d=Math.ceil,p=Math.pow,g=Math.log,f=i.extend({type:"log",base:10,$constructor:function(){i.apply(this,arguments),this._originalScale=new s},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return r.map(l.getTicks.call(this),function(r){var i=a.round(p(this.base,r));return i=r===e[0]&&t.__fixMin?u(i,h(n[0])):i,i=r===e[1]&&t.__fixMax?u(i,h(n[1])):i},this)},getLabel:l.getLabel,scale:function(t){return t=o.scale.call(this,t),p(this.base,t)},setExtent:function(t,e){var n=this.base;t=g(t)/g(n),e=g(e)/g(n),l.setExtent.call(this,t,e)},getExtent:function(){var t,e,n=this.base,r=o.getExtent.call(this);r[0]=p(n,r[0]),r[1]=p(n,r[1]);var i=this._originalScale,a=i.getExtent();return i.__fixMin&&(r[0]=(t=r[0],u(t,h(a[0])))),i.__fixMax&&(r[1]=(e=r[1],u(e,h(a[1])))),r},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=g(t[0])/g(e),t[1]=g(t[1])/g(e),o.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(n!==1/0&&!(n<=0)){var r=a.quantity(n);for(t/n*r<=.5&&(r*=10);!isNaN(r)&&1>Math.abs(r)&&Math.abs(r)>0;)r*=10;var i=[a.round(d(e[0]/r)*r),a.round(c(e[1]/r)*r)];this._interval=r,this._niceExtent=i}},niceExtent:function(t){l.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});r.each(["contain","normalize"],function(t){f.prototype[t]=function(e){return e=g(e)/g(this.base),o[t].call(this,e)}}),f.create=function(){return new f},t.exports=f},78309:function(t,e,n){var r=n(66023),i=n(3029),a=n(5298),s=i.prototype,o=i.extend({type:"ordinal",init:function(t,e){(!t||r.isArray(t))&&(t=new a({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),s.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return s.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(s.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:r.noop,niceExtent:r.noop});o.create=function(){return new o},t.exports=o},3029:function(t,e,n){var r=n(51938);function i(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}i.prototype.parse=function(t){return t},i.prototype.getSetting=function(t){return this._setting[t]},i.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},i.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},i.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},i.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},i.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},i.prototype.getExtent=function(){return this._extent.slice()},i.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},i.prototype.isBlank=function(){return this._isBlank},i.prototype.setBlank=function(t){this._isBlank=t},i.prototype.getLabel=null,r.enableClassExtend(i),r.enableClassManagement(i,{registerWhenExtend:!0}),t.exports=i},68494:function(t,e,n){var r=n(66023),i=n(98763),a=n(20438),s=n(32683),o=n(74323),l=o.prototype,h=Math.ceil,u=Math.floor,c=function(t,e,n,r){for(;n<r;){var i=n+r>>>1;t[i][1]<e?n=i+1:r=i}return n},d=o.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return a.formatTime(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var n=new Date;e[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=i.round(u(e[0]/r)*r)),t.fixMax||(e[1]=i.round(h(e[1]/r)*r))},niceTicks:function(t,e,n){t=t||10;var r=this._extent,a=r[1]-r[0],o=a/t;null!=e&&o<e&&(o=e),null!=n&&o>n&&(o=n);var l=p.length,d=c(p,o,0,l),g=p[Math.min(d,l-1)],f=g[1];if("year"===g[0]){var y=a/f;f*=i.nice(y/t,!0)}var x=this.getSetting("useUTC")?0:60*new Date(+r[0]||+r[1]).getTimezoneOffset()*1e3,m=[Math.round(h((r[0]-x)/f)*f+x),Math.round(u((r[1]-x)/f)*f+x)];s.fixExtent(m,r),this._stepLvl=g,this._interval=f,this._niceExtent=m},parse:function(t){return+i.parseDate(t)}});r.each(["contain","normalize"],function(t){d.prototype[t]=function(e){return l[t].call(this,this.parse(e))}});var p=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];d.create=function(t){return new d({useUTC:t.ecModel.get("useUTC")})},t.exports=d},32683:function(t,e,n){var r=n(98763),i=r.round;function a(t){return r.getPrecisionSafe(t)+2}function s(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function o(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),s(t,0,e),s(t,1,e),t[0]>t[1]&&(t[0]=t[1])}e.intervalScaleNiceTicks=function(t,e,n,s){var l={},h=t[1]-t[0],u=l.interval=r.nice(h/e,!0);null!=n&&u<n&&(u=l.interval=n),null!=s&&u>s&&(u=l.interval=s);var c=l.intervalPrecision=a(u);return o(l.niceTickExtent=[i(Math.ceil(t[0]/u)*u,c),i(Math.floor(t[1]/u)*u,c)],t),l},e.getIntervalPrecision=a,e.fixExtent=o,e.intervalScaleGetTicks=function(t,e,n,r){var a=[];if(!t)return a;e[0]<n[0]&&a.push(e[0]);for(var s=n[0];s<=n[1]&&(a.push(s),(s=i(s+t,r))!==a[a.length-1]);)if(a.length>1e4)return[];return e[1]>(a.length?a[a.length-1]:n[1])&&a.push(e[1]),a}},5328:function(t,e,n){var r,i=n(66023),a=i.each,s=i.map,o=i.isFunction,l=i.createHashMap,h=i.noop,u=n(68940).createTask,c=n(79426).getUID,d=n(16438),p=n(13966),g=n(70018).normalizeToArray;function f(t,e,n,r){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice();this._allHandlers=n.concat(r),this._stageTaskMap=l()}var y=f.prototype;function x(t,e,n,r,i){var s;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}i=i||{},a(e,function(e,a){if(!i.visualType||i.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){o(i,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),m(u,r);var p=t.getPerformArgs(u,i.block);d.each(function(t){t.perform(p)}),s|=u.perform(p)}else h&&h.each(function(a,l){o(i,a)&&a.dirty();var h=t.getPerformArgs(a,i.block);h.skip=!e.performRawSeries&&n.isSeriesFiltered(a.context.model),m(a,r),s|=a.perform(h)})}}),t.unfinished|=s}y.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},y.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),r=n.context,i=!e&&n.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount,s=null!=a?Math.ceil(a/i):null;return{step:i,modBy:s,modDataCount:a}}},y.getPipeline=function(t){return this._pipelineMap.get(t)},y.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),r=t.getData().count(),i=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:i,modDataCount:s,large:a}},y.restorePipelines=function(t){var e=this,n=e._pipelineMap=l();t.eachSeries(function(t){var r=t.getProgressive(),i=t.uid;n.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),P(e,t,t.dataTask)})},y.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;a(this._allHandlers,function(r){var i=t.get(r.uid)||t.set(r.uid,[]);r.reset&&function(t,e,n,r,i){var a=n.seriesTaskMap||(n.seriesTaskMap=l()),s=e.seriesType,o=e.getTargetSeries;function h(n){var s=n.uid,o=a.get(s)||a.set(s,u({plan:_,reset:A,count:I}));o.context={model:n,ecModel:r,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},P(t,n,o)}e.createOnAllSeries?r.eachRawSeries(h):s?r.eachRawSeriesByType(s,h):o&&o(r,i).each(h);var c=t._pipelineMap;a.each(function(t,e){c.get(e)||(t.dispose(),a.removeKey(e))})}(this,r,i,e,n),r.overallReset&&function(t,e,n,r,i){var s=n.overallTask=n.overallTask||u({reset:v});s.context={ecModel:r,api:i,overallReset:e.overallReset,scheduler:t};var o=s.agentStubMap=s.agentStubMap||l(),h=e.seriesType,c=e.getTargetSeries,d=!0,p=e.modifyOutputEnd;function g(e){var n=e.uid,r=o.get(n);r||(r=o.set(n,u({reset:b,onDirty:M})),s.dirty()),r.context={model:e,overallProgress:d,modifyOutputEnd:p},r.agent=s,r.__block=d,P(t,e,r)}h?r.eachRawSeriesByType(h,g):c?c(r,i).each(g):(d=!1,a(r.getSeries(),g));var f=t._pipelineMap;o.each(function(t,e){f.get(e)||(t.dispose(),s.dirty(),o.removeKey(e))})}(this,r,i,e,n)},this)},y.prepareView=function(t,e,n,r){var i=t.renderTask,a=i.context;a.model=e,a.ecModel=n,a.api=r,i.__block=!t.incrementalPrepareRender,P(this,e,i)},y.performDataProcessorTasks=function(t,e){x(this,this._dataProcessorHandlers,t,e,{block:!0})},y.performVisualTasks=function(t,e,n){x(this,this._visualHandlers,t,e,n)},y.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},y.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var m=y.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function v(t){t.overallReset(t.ecModel,t.api,t.payload)}function b(t,e){return t.overallProgress&&w}function w(){this.agent.dirty(),this.getDownstream().dirty()}function M(){this.agent&&this.agent.dirty()}function _(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function A(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=g(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?s(e,function(t,e){return C(e)}):S}var S=C(0);function C(t){return function(e,n){var r=n.data,i=n.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(e,r)}}function I(t){return t.data.count()}function P(t,e,n){var r=e.uid,i=t._pipelineMap.get(r);i.head||(i.head=n),i.tail&&i.tail.pipe(n),i.tail=n,n.__idxInPipeline=i.count++,n.__pipeline=i}f.wrapStageHandler=function(t,e){return o(t)&&(t={overallReset:t,seriesType:function(t){r=null;try{t(T,k)}catch(t){}return r}(t)}),t.uid=c("stageHandler"),e&&(t.visualType=e),t};var T={},k={};function L(t,e){for(var n in e.prototype)t[n]=h}L(T,d),L(k,p),T.eachSeriesByType=T.eachRawSeriesByType=function(t){r=t},T.eachComponent=function(t){"series"===t.mainType&&t.subType&&(r=t.subType)},t.exports=f},68940:function(t,e,n){var r=n(66023);r.assert;var i=r.isArray;function a(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}n(38603).__DEV__;var s=a.prototype;s.perform=function(t){var e,n,r,a,s,o,h,u,c,d=this._upstream,p=t&&t.skip;if(this._dirty&&d){var g=this.context;g.data=g.outputData=d.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!p&&(u=this._plan(this.context));var f=((e=this._modBy)>=1||(e=1),e),y=this._modDataCount||0,x=((n=t&&t.modBy)>=1||(n=1),n),m=t&&t.modDataCount||0;(f!==x||y!==m)&&(u="reset"),(this._dirty||"reset"===u)&&(this._dirty=!1,r=this,a=p,r._dueIndex=r._outputDueEnd=r._dueEnd=0,r._settedOutputEnd=null,!a&&r._reset&&((s=r._reset(r.context))&&s.progress&&(o=s.forceFirstProgress,s=s.progress),i(s)&&!s.length&&(s=null)),r._progress=s,r._modBy=r._modDataCount=null,(h=r._downstream)&&h.dirty(),c=o),this._modBy=x,this._modDataCount=m;var v=t&&t.step;if(d?this._dueEnd=d._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var b=this._dueIndex,w=Math.min(null!=v?this._dueIndex+v:1/0,this._dueEnd);if(!p&&(c||b<w)){var M=this._progress;if(i(M))for(var _=0;_<M.length;_++)l(this,M[_],b,w,x,m);else l(this,M,b,w,x,m)}this._dueIndex=w;var A=null!=this._settedOutputEnd?this._settedOutputEnd:w;this._outputDueEnd=A}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var o=function(){var t,e,n,r,i,a={reset:function(l,h,u,c){e=l,t=h,n=u,i=Math.ceil((r=c)/n),a.next=n>1&&r>0?o:s}};return a;function s(){return e<t?e++:null}function o(){var a=e%i*n+Math.ceil(e/i),s=e>=t?null:a<r?a:e;return e++,s}}();function l(t,e,n,r,i,a){o.reset(n,r,i,a),t._callingProgress=e,t._callingProgress({start:n,end:r,count:r-n,next:o.next},t.context)}s.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},s.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},s.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},s.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},s.getUpstream=function(){return this._upstream},s.getDownstream=function(){return this._downstream},s.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},e.createTask=function(t){return new a(t)}},78956:function(t){var e="#eee",n=function(){return{axisLine:{lineStyle:{color:e}},axisTick:{lineStyle:{color:e}},axisLabel:{textStyle:{color:e}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:e}}}},r=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],i={color:r,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:e},crossStyle:{color:e}}},legend:{textStyle:{color:e}},textStyle:{color:e},title:{textStyle:{color:e}},toolbox:{iconStyle:{normal:{borderColor:e}}},dataZoom:{textStyle:{color:e}},visualMap:{textStyle:{color:e}},timeline:{lineStyle:{color:e},itemStyle:{normal:{color:r[1]}},label:{normal:{textStyle:{color:e}}},controlStyle:{normal:{color:e,borderColor:e}}},timeAxis:n(),logAxis:n(),valueAxis:n(),categoryAxis:n(),line:{symbol:"circle"},graph:{color:r},gauge:{title:{textStyle:{color:e}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};i.categoryAxis.splitLine.show=!1,t.exports=i},96384:function(t){var e=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];t.exports={color:e,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],e]}},45617:function(t,e,n){var r=n(66023);e.createWrap=function(){var t,e=[],n={};return{add:function(t,i,a,s,o){return r.isString(s)&&(o=s,s=0),!n[t.id]&&(n[t.id]=1,e.push({el:t,target:i,time:a,delay:s,easing:o}),!0)},done:function(e){return t=e,this},start:function(){for(var r=e.length,i=0,a=e.length;i<a;i++){var s=e[i];s.el.animateTo(s.target,s.time,s.delay,s.easing,o)}return this;function o(){--r||(e.length=0,n={},t&&t())}}}}},51938:function(t,e,n){n(38603).__DEV__;var r=n(66023),i="___EC__COMPONENT__CONTAINER___";function a(t){var e={main:"",sub:""};return t&&(e.main=(t=t.split("."))[0]||"",e.sub=t[1]||""),e}var s=0;function o(t,e){var n=r.slice(arguments,2);return this.superClass.prototype[e].apply(t,n)}function l(t,e,n){return this.superClass.prototype[e].apply(t,n)}e.parseClassType=a,e.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return r.extend(n.prototype,t),n.extend=this.extend,n.superCall=o,n.superApply=l,r.inherits(n,this),n.superClass=e,n}},e.enableClassCheck=function(t){var e=["__\0is_clz",s++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!!(t&&t[e])}},e.enableClassManagement=function(t,e){e=e||{};var n={};if(t.registerClass=function(t,e){if(e){var s,o,l;s=e,r.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(s),'componentType "'+s+'" illegal'),(e=a(e)).sub?e.sub!==i&&(((l=n[(o=e).main])&&l[i]||((l=n[o.main]={})[i]=!0),l)[e.sub]=t):n[e.main]=t}return t},t.getClass=function(t,e,r){var a=n[t];if(a&&a[i]&&(a=e?a[e]:null),r&&!a)throw Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=a(t);var e=[],s=n[t.main];return s&&s[i]?r.each(s,function(t,n){n!==i&&e.push(t)}):e.push(s),e},t.hasClass=function(t){return!!n[(t=a(t)).main]},t.getAllClassMainTypes=function(){var t=[];return r.each(n,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){var e=n[(t=a(t)).main];return e&&e[i]},t.parseClassType=a,e.registerWhenExtend){var s=t.extend;s&&(t.extend=function(e){var n=s.call(this,e);return t.registerClass(n,e.type)})}return t},e.setReadOnly=function(t,e){}},79426:function(t,e,n){var r=n(66023),i=n(51938).parseClassType,a=0;e.getUID=function(t){return[t||"",a++,Math.random().toFixed(5)].join("_")},e.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,n){e[(t=i(t)).main]=n},t.determineSubType=function(n,r){var a=r.type;if(!a){var s=i(n).main;t.hasSubTypes(n)&&e[s]&&(a=e[s](r))}return a},t},e.enableTopologicalTravel=function(t,e){t.topologicalTravel=function(t,i,a,s){if(t.length){var o,l,h,u=(o=i,l={},h=[],r.each(o,function(t){var i,a,s,u=n(l,t),c=(i=u.originalDeps=e(t),a=o,s=[],r.each(i,function(t){r.indexOf(a,t)>=0&&s.push(t)}),s);u.entryCount=c.length,0===u.entryCount&&h.push(t),r.each(c,function(e){0>r.indexOf(u.predecessor,e)&&u.predecessor.push(e);var i=n(l,e);0>r.indexOf(i.successor,e)&&i.successor.push(t)})}),{graph:l,noEntryList:h}),c=u.graph,d=u.noEntryList,p={};for(r.each(t,function(t){p[t]=!0});d.length;){var g=d.pop(),f=c[g],y=!!p[g];y&&(a.call(s,g,f.originalDeps.slice()),delete p[g]),r.each(f.successor,y?m:x)}r.each(p,function(){throw Error("Circle dependency may exists")})}function x(t){c[t].entryCount--,0===c[t].entryCount&&d.push(t)}function m(t){p[t]=!0,x(t)}};function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}}},20438:function(t,e,n){var r=n(66023),i=n(99280),a=n(98763),s=r.normalizeCssArray,o=/([&<>"'])/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function h(t){return null==t?"":(t+"").replace(o,function(t,e){return l[e]})}var u=["a","b","c","d","e","f","g"],c=function(t,e){return"{"+t+(null==e?"":e)+"}"};function d(t,e){return t+="","0000".substr(0,e-t.length)+t}var p=i.truncateText;e.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},e.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},e.normalizeCssArray=s,e.encodeHTML=h,e.formatTpl=function(t,e,n){r.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var a=e[0].$vars||[],s=0;s<a.length;s++){var o=u[s];t=t.replace(c(o),c(o,0))}for(var l=0;l<i;l++)for(var d=0;d<a.length;d++){var p=e[l][a[d]];t=t.replace(c(u[d],l),n?h(p):p)}return t},e.formatTplSimple=function(t,e,n){return r.each(e,function(e,r){t=t.replace("{"+r+"}",n?h(e):e)}),t},e.getTooltipMarker=function(t,e){var n=(t=r.isString(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,e=t.extraCssText,a=t.renderMode||"html",s=t.markerId||"X";return n?"html"===a?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+h(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+h(n)+";"+(e||"")+'"></span>':{renderMode:a,content:"{marker"+s+"|}  ",style:{color:n}}:""},e.formatTime=function(t,e,n){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var r=a.parseDate(e),i=n?"UTC":"",s=r["get"+i+"FullYear"](),o=r["get"+i+"Month"]()+1,l=r["get"+i+"Date"](),h=r["get"+i+"Hours"](),u=r["get"+i+"Minutes"](),c=r["get"+i+"Seconds"](),p=r["get"+i+"Milliseconds"]();return t=t.replace("MM",d(o,2)).replace("M",o).replace("yyyy",s).replace("yy",s%100).replace("dd",d(l,2)).replace("d",l).replace("hh",d(h,2)).replace("h",h).replace("mm",d(u,2)).replace("m",u).replace("ss",d(c,2)).replace("s",c).replace("SSS",d(p,3))},e.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},e.truncateText=p,e.getTextBoundingRect=function(t){return i.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},e.getTextRect=function(t,e,n,r,a,s,o,l){return i.getBoundingRect(t,e,n,r,a,l,s,o)}},76165:function(t,e,n){var r=n(66023),i=n(86022),a=n(53453),s=n(36653),o=n(3265),l=n(87205),h=n(53733),u=n(52728);e.Image=u,e.Group=n(35601),e.Text=n(77894),e.Circle=n(38035),e.Sector=n(10631),e.Ring=n(6609),e.Polygon=n(11960),e.Polyline=n(35243),e.Rect=n(54668),e.Line=n(52949),e.BezierCurve=n(27209),e.Arc=n(26072),e.CompoundPath=n(93549),e.LinearGradient=n(53429),e.RadialGradient=n(6963),e.BoundingRect=n(71497),e.IncrementalDisplayable=n(55117);var c=Math.round,d=Math.max,p=Math.min,g={};function f(t,e,n,r){var a=i.createFromString(t,e);return n&&("center"===r&&(n=y(n,a.getBoundingRect())),m(a,n)),a}function y(t,e){var n,r=e.width/e.height,i=t.height*r;return n=i<=t.width?t.height:(i=t.width)/r,{x:t.x+t.width/2-i/2,y:t.y+t.height/2-n/2,width:i,height:n}}var x=i.mergePath;function m(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}function v(t,e,n){var r=c(2*t);return(r+c(e))%2==0?r/2:(r+(n?1:-1))/2}function b(t){return null!=t&&"none"!==t}var w=r.createHashMap(),M=0;function _(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.useHoverLayer;t.__highlighted=n?"layer":"plain";var r=t.__zr;if(r||!n){var i=t,a=t.style;n&&(a=(i=r.addHover(t)).style),V(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e){t.__cachedNormalStl=t.__cachedNormalZ2=null;return}var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var r=t.style;for(var i in e)null!=e[i]&&(n[i]=r[i]);n.fill=r.fill,n.stroke=r.stroke}}(i),a.extendFrom(e),A(a,e,"fill"),A(a,e,"stroke"),E(a),n||(t.dirty(!1),t.z2+=1)}}}function A(t,e,n){!b(e[n])&&b(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=w.get(t);return!e&&(e=a.lift(t,-.1),M<1e4&&(w.set(t,e),M++)),e}(t[n]))}function S(t){var e=t.__highlighted;if(e){if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removeHover(t);else if(e){var n=t.style,r=t.__cachedNormalStl;r&&(V(n),t.setStyle(r),E(n));var i=t.__cachedNormalZ2;null!=i&&t.z2-i==1&&(t.z2=i)}}}function C(t,e){t.isGroup?t.traverse(function(t){t.isGroup||e(t)}):e(t)}function I(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,S(t),_(t))}function P(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||C(this,_)}function T(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||C(this,S)}function k(){this.__isEmphasisEntered=!0,C(this,_)}function L(){this.__isEmphasisEntered=!1,C(this,S)}function D(t,e){var n=!1===e;if(t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,!n||t.__hoverStyleTrigger){var r=n?"off":"on";t[r]("mouseover",P)[r]("mouseout",T),t[r]("emphasis",k)[r]("normal",L),t.__hoverStyleTrigger=!n}}function R(t,e,n,i,a){return N(t,e,i,a),n&&r.extend(t,n),t}function N(t,e,n,i){if((n=n||g).isRectText){var a,s=e.getShallow("position")||(i?null:"inside");"outside"===s&&(s="top"),t.textPosition=s,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=r.retrieve2(e.getShallow("distance"),i?null:5)}var l=e.ecModel,h=l&&l.option.textStyle,u=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||g).rich;if(n)for(var r in e=e||{},n)n.hasOwnProperty(r)&&(e[r]=1);t=t.parentModel}return e}(e);if(u){for(var c in a={},u)if(u.hasOwnProperty(c)){var d=e.getModel(["rich",c]);O(a[c]={},d,h,n,i)}}return t.rich=a,O(t,e,h,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function O(t,e,n,i,a,s){n=!a&&n||g,t.textFill=j(e.getShallow("color"),i)||n.color,t.textStroke=j(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=r.retrieve2(e.getShallow("textBorderWidth"),n.textBorderWidth),t.insideRawTextPosition=t.textPosition,a||(s&&(t.insideRollbackOpt=i,E(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),s&&i.disableBox||(t.textBackgroundColor=j(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=j(e.getShallow("borderColor"),i),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function j(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function E(t){var e,n=t.insideRollbackOpt;if(n&&null==t.textFill){var r=n.useInsideStyle,i=t.insideRawTextPosition,a=n.autoColor;!1!==r&&(!0===r||n.isRectText&&i&&"string"==typeof i&&i.indexOf("inside")>=0)?(e={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(e={textFill:null},t.textFill=a),e&&(t.insideRollback=e)}}function V(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function B(t,e,n,r,i,a){if("function"==typeof i&&(a=i,i=null),r&&r.isAnimationEnabled()){var s=t?"Update":"",o=r.getShallow("animationDuration"+s),l=r.getShallow("animationEasing"+s),h=r.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(i,r.getAnimationDelayParams?r.getAnimationDelayParams(e,i):null)),"function"==typeof o&&(o=o(i)),o>0?e.animateTo(n,o,h||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function z(t,e,n,r,i){B(!0,t,e,n,r,i)}function F(t,e,n){return e&&!r.isArrayLike(e)&&(e=h.getLocalTransform(e)),n&&(e=s.invert([],e)),o.applyTransform([],t,e)}e.Z2_EMPHASIS_LIFT=1,e.extendShape=function(t){return l.extend(t)},e.extendPath=function(t,e){return i.extendFromString(t,e)},e.makePath=f,e.makeImage=function(t,e,n){var r=new u({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var i={width:t.width,height:t.height};r.setStyle(y(e,i))}}});return r},e.mergePath=x,e.resizePath=m,e.subPixelOptimizeLine=function(t){var e=t.shape,n=t.style.lineWidth;return c(2*e.x1)===c(2*e.x2)&&(e.x1=e.x2=v(e.x1,n,!0)),c(2*e.y1)===c(2*e.y2)&&(e.y1=e.y2=v(e.y1,n,!0)),t},e.subPixelOptimizeRect=function(t){var e=t.shape,n=t.style.lineWidth,r=e.x,i=e.y,a=e.width,s=e.height;return e.x=v(e.x,n,!0),e.y=v(e.y,n,!0),e.width=Math.max(v(r+a,n,!1)-e.x,+(0!==a)),e.height=Math.max(v(i+s,n,!1)-e.y,+(0!==s)),t},e.subPixelOptimize=v,e.setElementHoverStyle=I,e.isInEmphasis=function(t){return t&&t.__isEmphasisEntered},e.setHoverStyle=function(t,e,n){t.isGroup?t.traverse(function(t){t.isGroup||I(t,t.hoverStyle||e)}):I(t,t.hoverStyle||e),D(t,n)},e.setAsHoverStyleTrigger=D,e.setLabelStyle=function(t,e,n,i,a,s,o){var l,h=(a=a||g).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,d=n.getShallow("show"),p=i.getShallow("show");(d||p)&&(h&&(l=h.getFormattedLabel(u,"normal",null,c)),null==l&&(l=r.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var f=d?l:null,y=p?r.retrieve2(h?h.getFormattedLabel(u,"emphasis",null,c):null,l):null;(null!=f||null!=y)&&(R(t,n,s,a),R(e,i,o,a,!0)),t.text=f,e.text=y},e.setTextStyle=R,e.setText=function(t,e,n){var r,i={isRectText:!0};!1===n?r=!0:i.autoColor=n,N(t,e,i,r)},e.getFont=function(t,e){var n=e||e.getModel("textStyle");return r.trim([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},e.updateProps=z,e.initProps=function(t,e,n,r,i){B(!1,t,e,n,r,i)},e.getTransform=function(t,e){for(var n=s.identity([]);t&&t!==e;)s.mul(n,t.getLocalTransform(),n),t=t.parent;return n},e.applyTransform=F,e.transformDirection=function(t,e,n){var r=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),i=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-r:"right"===t?r:0,"top"===t?-i:"bottom"===t?i:0];return Math.abs((a=F(a,e,n))[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},e.groupTransition=function(t,e,n,i){if(t&&e){var a,s=(a={},t.traverse(function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)}),a);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=s[t.anid];if(e){var r=l(t);t.attr(l(e)),z(t,r,n,t.dataIndex)}}})}function l(t){var e={position:o.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=r.extend({},t.shape)),e}},e.clipPointsByRect=function(t,e){return r.map(t,function(t){var n=t[0];n=p(n=d(n,e.x),e.x+e.width);var r=t[1];return[n,r=p(r=d(r,e.y),e.y+e.height)]})},e.clipRectByRect=function(t,e){var n=d(t.x,e.x),r=p(t.x+t.width,e.x+e.width),i=d(t.y,e.y),a=p(t.y+t.height,e.y+e.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}},e.createIcon=function(t,e,n){var i=(e=r.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),r.defaults(i,n),new u(e)):f(t.replace("path://",""),e,n,"center")}},68006:function(t,e,n){var r=n(66023),i=n(71497),a=n(98763).parsePercent,s=n(20438),o=r.each,l=["left","right","top","bottom","width","height"],h=[["width","left","right"],["height","top","bottom"]];function u(t,e,n,r,i){var a=0,s=0;null==r&&(r=1/0),null==i&&(i=1/0);var o=0;e.eachChild(function(l,h){var u,c,d=l.position,p=l.getBoundingRect(),g=e.childAt(h+1),f=g&&g.getBoundingRect();if("horizontal"===t){var y=p.width+(f?-f.x+p.x:0);(u=a+y)>r||l.newline?(a=0,u=y,s+=o+n,o=p.height):o=Math.max(o,p.height)}else{var x=p.height+(f?-f.y+p.y:0);(c=s+x)>i||l.newline?(a+=o+n,s=0,c=x,o=p.width):o=Math.max(o,p.width)}l.newline||(d[0]=a,d[1]=s,"horizontal"===t?a=u+n:s=c+n)})}var c=r.curry(u,"vertical"),d=r.curry(u,"horizontal");function p(t,e,n){n=s.normalizeCssArray(n||0);var r=e.width,o=e.height,l=a(t.left,r),h=a(t.top,o),u=a(t.right,r),c=a(t.bottom,o),d=a(t.width,r),p=a(t.height,o),g=n[2]+n[0],f=n[1]+n[3],y=t.aspect;switch(isNaN(d)&&(d=r-u-f-l),isNaN(p)&&(p=o-c-g-h),null!=y&&(isNaN(d)&&isNaN(p)&&(y>r/o?d=.8*r:p=.8*o),isNaN(d)&&(d=y*p),isNaN(p)&&(p=d/y)),isNaN(l)&&(l=r-u-d-f),isNaN(h)&&(h=o-c-p-g),t.left||t.right){case"center":l=r/2-d/2-n[3];break;case"right":l=r-d-f}switch(t.top||t.bottom){case"middle":case"center":h=o/2-p/2-n[0];break;case"bottom":h=o-p-g}l=l||0,h=h||0,isNaN(d)&&(d=r-f-l-(u||0)),isNaN(p)&&(p=o-g-h-(c||0));var x=new i(l+n[3],h+n[0],d,p);return x.margin=n,x}function g(t,e){return e&&t&&o(l,function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}e.LOCATION_PARAMS=l,e.HV_NAMES=h,e.box=u,e.vbox=c,e.hbox=d,e.getAvailableSize=function(t,e,n){var r=e.width,i=e.height,o=a(t.x,r),l=a(t.y,i),h=a(t.x2,r),u=a(t.y2,i);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=r),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=i),{width:Math.max(h-o-(n=s.normalizeCssArray(n||0))[1]-n[3],0),height:Math.max(u-l-n[0]-n[2],0)}},e.getLayoutRect=p,e.positionElement=function(t,e,n,a,s){var o,l=!s||!s.hv||s.hv[0],h=!s||!s.hv||s.hv[1],u=s&&s.boundingMode||"all";if(l||h){if("raw"===u)o="group"===t.type?new i(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(o=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(o=o.clone()).applyTransform(c)}e=p(r.defaults({width:o.width,height:o.height},e),n,a);var d=t.position,g=l?e.x-o.x:0,f=h?e.y-o.y:0;t.attr("position","raw"===u?[g,f]:[d[0]+g,d[1]+f])}},e.sizeCalculable=function(t,e){return null!=t[h[e][0]]||null!=t[h[e][1]]&&null!=t[h[e][2]]},e.mergeLayoutParam=function(t,e,n){r.isObject(n)||(n={});var i=n.ignoreSize;r.isArray(i)||(i=[i,i]);var a=l(h[0],0),s=l(h[1],1);function l(n,r){var a={},s=0,l={},h=0;if(o(n,function(e){l[e]=t[e]}),o(n,function(t){u(e,t)&&(a[t]=l[t]=e[t]),c(a,t)&&s++,c(l,t)&&h++}),i[r])return c(e,n[1])?l[n[2]]=null:c(e,n[2])&&(l[n[1]]=null),l;if(2===h||!s)return l;if(s>=2)return a;for(var d=0;d<n.length;d++){var p=n[d];if(!u(a,p)&&u(t,p)){a[p]=t[p];break}}return a}function u(t,e){return t.hasOwnProperty(e)}function c(t,e){return null!=t[e]&&"auto"!==t[e]}function d(t,e,n){o(t,function(t){e[t]=n[t]})}d(h[0],t,a),d(h[1],t,s)},e.getLayoutParams=function(t){return g({},t)},e.copyLayoutParams=g},70018:function(t,e,n){var r=n(66023),i=n(57674),a=r.each,s=r.isObject,o=r.isArray,l="series\0";function h(t){return t instanceof Array?t:null==t?[]:[t]}function u(t){return s(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var c=0;function d(t,e){return t&&t.hasOwnProperty(e)}e.normalizeToArray=h,e.defaultEmphasis=function(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}},e.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],e.getDataItemValue=function(t){return!s(t)||o(t)||t instanceof Date?t:t.value},e.isDataItemOption=function(t){return s(t)&&!(t instanceof Array)},e.mappingToExists=function(t,e){e=(e||[]).slice();var n=r.map(t||[],function(t,e){return{exist:t}});return a(e,function(t,r){if(s(t)){for(var i=0;i<n.length;i++)if(!n[i].option&&null!=t.id&&n[i].exist.id===t.id+""){n[i].option=t,e[r]=null;return}for(var i=0;i<n.length;i++){var a=n[i].exist;if(!n[i].option&&(null==a.id||null==t.id)&&null!=t.name&&!u(t)&&!u(a)&&a.name===t.name+""){n[i].option=t,e[r]=null;return}}}}),a(e,function(t,e){if(s(t)){for(var r=0;r<n.length;r++){var i=n[r].exist;if(!n[r].option&&!u(i)&&null==t.id){n[r].option=t;break}}r>=n.length&&n.push({option:t})}}),n},e.makeIdAndName=function(t){var e=r.createHashMap();a(t,function(t,n){var r=t.exist;r&&e.set(r.id,t)}),a(t,function(t,n){var i=t.option;r.assert(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),t.keyInfo||(t.keyInfo={})}),a(t,function(t,n){var r=t.exist,i=t.option,a=t.keyInfo;if(s(i)){if(a.name=null!=i.name?i.name+"":r?r.name:l+n,r)a.id=r.id;else if(null!=i.id)a.id=i.id+"";else{var o=0;do a.id="\0"+a.name+"\0"+o++;while(e.get(a.id))}e.set(a.id,t)}})},e.isNameSpecified=function(t){var e=t.name;return!!(e&&e.indexOf(l))},e.isIdInner=u,e.compressBatches=function(t,e){var n={},r={};return i(t||[],n),i(e||[],r,n),[a(n),a(r)];function i(t,e,n){for(var r=0,i=t.length;r<i;r++)for(var a=t[r].seriesId,s=h(t[r].dataIndex),o=n&&n[a],l=0,u=s.length;l<u;l++){var c=s[l];o&&o[c]?o[c]=null:(e[a]||(e[a]={}))[c]=1}}function a(t,e){var n=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)n.push(+r);else{var i=a(t[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}return n}},e.queryDataIndex=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?r.isArray(e.dataIndex)?r.map(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?r.isArray(e.name)?r.map(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0},e.makeInner=function(){var t="__\0ec_inner_"+c+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},e.parseFinder=function(t,e,n){if(r.isString(e)){var i={};i[e+"Index"]=0,e=i}var s=n&&n.defaultMainType;!s||d(e,s+"Index")||d(e,s+"Id")||d(e,s+"Name")||(e[s+"Index"]=0);var o={};return a(e,function(i,a){var i=e[a];if("dataIndex"===a||"dataIndexInside"===a){o[a]=i;return}var s=a.match(/^(\w+)(Index|Id|Name)$/)||[],l=s[1],h=(s[2]||"").toLowerCase();if(!(!l||!h||null==i||"index"===h&&"none"===i||n&&n.includeMainTypes&&0>r.indexOf(n.includeMainTypes,l))){var u={mainType:l};("index"!==h||"all"!==i)&&(u[h]=i);var c=t.queryComponents(u);o[l+"Models"]=c,o[l+"Model"]=c[0]}}),o},e.setAttribute=function(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n},e.getAttribute=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},e.getTooltipRenderMode=function(t){return"auto"===t?i.domSupported?"html":"richText":t||"html"},e.groupData=function(t,e){var n=r.createHashMap(),i=[];return r.each(t,function(t){var r=e(t);(n.get(r)||(i.push(r),n.set(r,[]))).push(t)}),{keys:i,buckets:n}}},98763:function(t,e,n){var r=n(66023),i=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(t){return Math.floor(Math.log(t)/Math.LN10)}e.linearMap=function(t,e,n,r){var i=e[1]-e[0],a=n[1]-n[0];if(0===i)return 0===a?n[0]:(n[0]+n[1])/2;if(r){if(i>0){if(t<=e[0])return n[0];else if(t>=e[1])return n[1]}else if(t>=e[0])return n[0];else if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/i*a+n[0]},e.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},e.round=function(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t},e.asc=function(t){return t.sort(function(t,e){return t-e}),t},e.getPrecision=function(t){if(isNaN(t*=1))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n},e.getPrecisionSafe=function(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var r=+e.slice(n+1);return r<0?-r:0}var i=e.indexOf(".");return i<0?0:e.length-1-i},e.getPixelPrecision=function(t,e){var n=Math.log,r=Math.LN10,i=Math.min(Math.max(-Math.floor(n(t[1]-t[0])/r)+Math.round(n(Math.abs(e[1]-e[0]))/r),0),20);return isFinite(i)?i:20},e.getPercentWithPrecision=function(t,e,n){if(!t[e])return 0;var i=r.reduce(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var a=Math.pow(10,n),s=r.map(t,function(t){return(isNaN(t)?0:t)/i*a*100}),o=100*a,l=r.map(s,function(t){return Math.floor(t)}),h=r.reduce(l,function(t,e){return t+e},0),u=r.map(s,function(t,e){return t-l[e]});h<o;){for(var c=Number.NEGATIVE_INFINITY,d=null,p=0,g=u.length;p<g;++p)u[p]>c&&(c=u[p],d=p);++l[d],u[d]=0,++h}return l[e]/a},e.MAX_SAFE_INTEGER=0x1fffffffffffff,e.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},e.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},e.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=i.exec(t);if(!e)return new Date(NaN);if(!e[8])return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0);var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return null==t?new Date(NaN):new Date(Math.round(t))},e.quantity=function(t){return Math.pow(10,a(t))},e.nice=function(t,e){var n,r=a(t),i=Math.pow(10,r),s=t/i;return t=(e?s<1.5?1:s<2.5?2:s<4?3:s<7?5:10:s<1?1:s<2?2:s<3?3:s<5?5:10)*i,r>=-20?+t.toFixed(r<0?-r:0):t},e.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],a=n-r;return a?i+a*(t[r]-i):i},e.reformIntervals=function(t){t.sort(function(t,e){return!function t(e,n,r){return e.interval[r]<n.interval[r]||e.interval[r]===n.interval[r]&&(e.close[r]-n.close[r]==(r?-1:1)||!r&&t(e,n,1))}(t,e,0)?1:-1});for(var e=-1/0,n=1,r=0;r<t.length;){for(var i=t[r].interval,a=t[r].close,s=0;s<2;s++)i[s]<=e&&(i[s]=e,a[s]=s?1:1-n),e=i[s],n=a[s];i[0]===i[1]&&a[0]*a[1]!=1?t.splice(r,1):r++}return t},e.isNumeric=function(t){return t-parseFloat(t)>=0}},87557:function(t,e,n){var r=n(66023),i=n(76165),a=n(71497),s=i.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=e.width/2,a=e.height/2;t.moveTo(n,r-a),t.lineTo(n+i,r+a),t.lineTo(n-i,r+a),t.closePath()}}),o=i.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=e.width/2,a=e.height/2;t.moveTo(n,r-a),t.lineTo(n+i,r),t.lineTo(n,r+a),t.lineTo(n-i,r),t.closePath()}}),l=i.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,r=e.y,i=e.width/5*3,a=Math.max(i,e.height),s=i/2,o=s*s/(a-s),l=r-a+s+o,h=Math.asin(o/s),u=Math.cos(h)*s,c=Math.sin(h),d=Math.cos(h),p=.6*s,g=.7*s;t.moveTo(n-u,l+o),t.arc(n,l,s,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*p,l+o+d*p,n,r-g,n,r),t.bezierCurveTo(n,r-g,n-u+c*p,l+o+d*p,n-u,l+o),t.closePath()}}),h=i.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,r=e.width,i=e.x,a=e.y,s=r/3*2;t.moveTo(i,a),t.lineTo(i+s,a+n),t.lineTo(i,a+n/4*3),t.lineTo(i-s,a+n),t.lineTo(i,a),t.closePath()}}),u={line:i.Line,rect:i.Rect,roundRect:i.Rect,square:i.Rect,circle:i.Circle,diamond:o,pin:l,arrow:h,triangle:s},c={line:function(t,e,n,r,i){i.x1=t,i.y1=e+r/2,i.x2=t+n,i.y2=e+r/2},rect:function(t,e,n,r,i){i.x=t,i.y=e,i.width=n,i.height=r},roundRect:function(t,e,n,r,i){i.x=t,i.y=e,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(t,e,n,r,i){var a=Math.min(n,r);i.x=t,i.y=e,i.width=a,i.height=a},circle:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.r=Math.min(n,r)/2},diamond:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.width=n,i.height=r},pin:function(t,e,n,r,i){i.x=t+n/2,i.y=e+r/2,i.width=n,i.height=r},arrow:function(t,e,n,r,i){i.x=t+n/2,i.y=e+r/2,i.width=n,i.height=r},triangle:function(t,e,n,r,i){i.cx=t+n/2,i.cy=e+r/2,i.width=n,i.height=r}},d={};r.each(u,function(t,e){d[e]=new t});var p=i.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var r=e.symbolType,i=d[r];"none"!==e.symbolType&&(i||(i=d[r="rect"]),c[r](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}});function g(t,e){if("image"!==this.type){var n=this.style,r=this.shape;r&&"line"===r.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}e.createSymbol=function(t,e,n,r,s,o,l){var h,u=0===t.indexOf("empty");return u&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(h=0===t.indexOf("image://")?i.makeImage(t.slice(8),new a(e,n,r,s),l?"center":"cover"):0===t.indexOf("path://")?i.makePath(t.slice(7),{},new a(e,n,r,s),l?"center":"cover"):new p({shape:{symbolType:t,x:e,y:n,width:r,height:s}})).__isEmptyBrush=u,h.setColor=g,h.setColor(o),h}},44050:function(t,e){var n="\0__throttleOriginMethod",r="\0__throttleRate",i="\0__throttleType";function a(t,e,n){var r,i,a,s,o,l=0,h=0,u=null;function c(){h=new Date().getTime(),u=null,t.apply(a,s||[])}e=e||0;var d=function(){r=new Date().getTime(),a=this,s=arguments;var t=o||e,d=o||n;o=null,i=r-(d?l:h)-t,clearTimeout(u),d?u=setTimeout(c,t):i>=0?c():u=setTimeout(c,-i),l=r};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){o=t},d}e.throttle=a,e.createOrUpdate=function(t,e,s,o){var l=t[e];if(l){var h=l[n]||l,u=l[i];if(l[r]!==s||u!==o){if(null==s||!o)return t[e]=h;(l=t[e]=a(h,s,"debounce"===o))[n]=h,l[i]=o,l[r]=s}return l}},e.clear=function(t,e){var r=t[e];r&&r[n]&&(t[e]=r[n])}},55756:function(t,e,n){var r=n(66023).each,i=n(35601),a=n(79426),s=n(51938),o=n(70018),l=n(68940).createTask,h=n(85773),u=o.makeInner(),c=h();function d(){this.group=new i,this.uid=a.getUID("viewChart"),this.renderTask=l({plan:y,reset:x}),this.renderTask.context={view:this}}d.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,r){},highlight:function(t,e,n,r){f(t.getData(),r,"emphasis")},downplay:function(t,e,n,r){f(t.getData(),r,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var p=d.prototype;function g(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)g(t.childAt(n),e)}function f(t,e,n){var i=o.queryDataIndex(t,e);null!=i?r(o.normalizeToArray(i),function(e){g(t.getItemGraphicEl(e),n)}):t.eachItemGraphicEl(function(t){g(t,n)})}function y(t){return c(t.model)}function x(t){var e=t.model,n=t.ecModel,r=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,s=t.view,o=i&&u(i).updateMethod,l=a?"incrementalPrepareRender":o&&s[o]?o:"render";return"render"!==l&&s[l](e,n,r,i),m[l]}p.updateView=p.updateLayout=p.updateVisual=function(t,e,n,r){this.render(t,e,n,r)},s.enableClassExtend(d,["dispose"]),s.enableClassManagement(d,{registerWhenExtend:!0}),d.markUpdateMethod=function(t,e){u(t).updateMethod=e};var m={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};t.exports=d},11648:function(t,e,n){var r=n(35601),i=n(79426),a=n(51938),s=function(){this.group=new r,this.uid=i.getUID("viewComponent")};s.prototype={constructor:s,init:function(t,e){},render:function(t,e,n,r){},dispose:function(){},filterForExposedEvent:null};var o=s.prototype;o.updateView=o.updateLayout=o.updateVisual=function(t,e,n,r){},a.enableClassExtend(s),a.enableClassManagement(s,{registerWhenExtend:!0}),t.exports=s},95138:function(t,e,n){var r=n(66023),i=n(53453),a=n(98763).linearMap,s=r.each,o=r.isObject,l=function(t){var e,n,i=t.mappingMethod,a=t.type,o=this.option=r.clone(t);this.type=a,this.mappingMethod=i,this._normalizeData=v[i];var l=h[a];this.applyVisual=l.applyVisual,this.getColorMapper=l.getColorMapper,this._doMap=l._doMap[i],"piecewise"===i?(u(o),n=(e=o).pieceList,e.hasSpecialVisual=!1,r.each(n,function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)})):"category"===i?o.categories?function(t){var e=t.categories,n=t.visual,i=t.categoryMap={};if(s(e,function(t,e){i[t]=e}),!r.isArray(n)){var a=[];r.isObject(n)?s(n,function(t,e){var n=i[e];a[null!=n?n:-1]=t}):a[-1]=n,n=m(t,a)}for(var o=e.length-1;o>=0;o--)null==n[o]&&(delete i[e[o]],e.pop())}(o):u(o,!0):(r.assert("linear"!==i||o.dataExtent),u(o))};l.prototype={constructor:l,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return r.bind(this._normalizeData,this)}};var h=l.visualHandlers={color:{applyVisual:p("color"),getColorMapper:function(){var t=this.option;return r.bind("category"===t.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),g.call(this,t)}:function(e,n,r){var a=!!r;return n||(e=this._normalizeData(e)),r=i.fastLerp(e,t.parsedVisual,r),a?r:i.stringify(r,"rgba")},this)},_doMap:{linear:function(t){return i.stringify(i.fastLerp(t,this.option.parsedVisual),"rgba")},category:g,piecewise:function(t,e){var n=x.call(this,e);return null==n&&(n=i.stringify(i.fastLerp(t,this.option.parsedVisual),"rgba")),n},fixed:f}},colorHue:c(function(t,e){return i.modifyHSL(t,e)}),colorSaturation:c(function(t,e){return i.modifyHSL(t,null,e)}),colorLightness:c(function(t,e){return i.modifyHSL(t,null,null,e)}),colorAlpha:c(function(t,e){return i.modifyAlpha(t,e)}),opacity:{applyVisual:p("opacity"),_doMap:y([0,1])},liftZ:{applyVisual:p("liftZ"),_doMap:{linear:f,category:f,piecewise:f,fixed:f}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(r.isString(i))n("symbol",i);else if(o(i))for(var a in i)i.hasOwnProperty(a)&&n(a,i[a])},_doMap:{linear:d,category:g,piecewise:function(t,e){var n=x.call(this,e);return null==n&&(n=d.call(this,t)),n},fixed:f}},symbolSize:{applyVisual:p("symbolSize"),_doMap:y([0,1])}};function u(t,e){var n=t.visual,i=[];r.isObject(n)?s(n,function(t){i.push(t)}):null!=n&&i.push(n),e||1!==i.length||({color:1,symbol:1}).hasOwnProperty(t.type)||(i[1]=i[0]),m(t,i)}function c(t){return{applyVisual:function(e,n,r){e=this.mapValueToVisual(e),r("color",t(n("color"),e))},_doMap:y([0,1])}}function d(t){var e=this.option.visual;return e[Math.round(a(t,[0,1],[0,e.length-1],!0))]||{}}function p(t){return function(e,n,r){r(t,this.mapValueToVisual(e))}}function g(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function f(){return this.option.visual[0]}function y(t){return{linear:function(e){return a(e,t,this.option.visual,!0)},category:g,piecewise:function(e,n){var r=x.call(this,n);return null==r&&(r=a(e,t,this.option.visual,!0)),r},fixed:f}}function x(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var r=l.findPieceIndex(t,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function m(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=r.map(e,function(t){return i.parse(t)})),e}var v={linear:function(t){return a(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=l.findPieceIndex(t,e,!0);if(null!=n)return a(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:r.noop};l.listVisualTypes=function(){var t=[];return r.each(h,function(e,n){t.push(n)}),t},l.addVisualHandler=function(t,e){h[t]=e},l.isValidType=function(t){return h.hasOwnProperty(t)},l.eachVisual=function(t,e,n){r.isObject(t)?r.each(t,e,n):e.call(n,t)},l.mapVisual=function(t,e,n){var i,a=r.isArray(t)?[]:r.isObject(t)?{}:(i=!0,null);return l.eachVisual(t,function(t,r){var s=e.call(n,t,r);i?a=s:a[r]=s}),a},l.retrieveVisuals=function(t){var e,n={};return t&&s(h,function(r,i){t.hasOwnProperty(i)&&(n[i]=t[i],e=!0)}),e?n:null},l.prepareVisualTypes=function(t){if(o(t)){var e=[];s(t,function(t,n){e.push(n)}),t=e}else{if(!r.isArray(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},l.dependsOn=function(t,e){return"color"===e?!!(t&&0===t.indexOf(e)):t===e},l.findPieceIndex=function(t,e,n){for(var r,i=1/0,a=0,s=e.length;a<s;a++){var o=e[a].value;if(null!=o){if(o===t||"string"==typeof o&&o===t+"")return a;n&&_(o,a)}}for(var a=0,s=e.length;a<s;a++){var l,h,u,c,d,p,g,f,y,x,m,v,b=e[a],w=b.interval,M=b.close;if(w){if(w[0]===-1/0){if(l=M[1],h=t,u=w[1],l?h<=u:h<u)return a}else if(w[1]===1/0){if(c=M[0],d=w[0],p=t,c?d<=p:d<p)return a}else{if(g=M[0],f=w[0],y=t,(g?f<=y:f<y)&&(x=M[1],m=t,v=w[1],x?m<=v:m<v))return a}n&&_(w[0],a),n&&_(w[1],a)}}if(n)return t===1/0?e.length-1:t===-1/0?0:r;function _(e,n){var a=Math.abs(e-t);a<i&&(i=a,r=n)}},t.exports=l},49151:function(t,e,n){var r=n(66023),i=n(66934),a=n(89211).retrieveRawValue;t.exports=function(t,e){var n,s=e.getModel("aria");if(s.get("show")){if(s.get("description"))return void t.setAttribute("aria-label",s.get("description"));var o=0;e.eachSeries(function(t,e){++o},this);var l=s.get("data.maxCount")||10,h=s.get("series.maxCount")||10,u=Math.min(o,h);if(!(o<1)){var c,d=((c=e.getModel("title").option)&&c.length&&(c=c[0]),c&&c.text);n=d?g(f("general.withTitle"),{title:d}):f("general.withoutTitle");var p=[];n+=g(f(o>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:o}),e.eachSeries(function(t,e){if(e<u){var n,r,s=t.get("name"),h="series."+(o>1?"multiple":"single")+".";r=g(r=f(s?h+"withName":h+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(n=t.subType,i.series.typeNames[n]||"自定义图")});var c=t.getData();window.data=c,c.count()>l?r+=g(f("data.partialData"),{displayCnt:l}):r+=f("data.allData");for(var d=[],y=0;y<c.count();y++)if(y<l){var x=c.getName(y),m=a(c,y);d.push(g(x?f("data.withName"):f("data.withoutName"),{name:x,value:m}))}r+=d.join(f("data.separator.middle"))+f("data.separator.end"),p.push(r)}}),n+=p.join(f("series.multiple.separator.middle"))+f("series.multiple.separator.end"),t.setAttribute("aria-label",n)}}function g(t,e){if("string"!=typeof t)return t;var n=t;return r.each(e,function(t,e){n=n.replace(RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function f(t){var e=s.get(t);if(null!=e)return e;for(var n=t.split("."),r=i.aria,a=0;a<n.length;++a)r=r[n[a]];return r}}},34907:function(t,e,n){var r=n(66023).createHashMap;t.exports=function(t){return{getTargetSeries:function(e){var n={},i=r();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t,e){var n=t.getRawData(),r={},i=t.getData();i.each(function(t){r[i.getRawIndex(t)]=t}),n.each(function(e){var a=r[e],s=null!=a&&i.getItemVisual(a,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var o=n.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(n.getName(e)||e+"",t.__paletteScope,n.count());n.setItemVisual(e,"color",o),null!=a&&i.setItemVisual(a,"color",o)}})}}}},75607:function(t,e,n){var r=n(47580);t.exports={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),a=t.get(i)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(n.setVisual("color",a),!e.isSeriesFiltered(t))return"function"!=typeof a||a instanceof r||n.each(function(e){n.setItemVisual(e,"color",a(t.getDataParams(e)))}),{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}}},41314:function(t){t.exports=function(t,e,n){return{seriesType:t,performRawSeries:!0,reset:function(t,r,i){var a=t.getData(),s=t.get("symbol")||e,o=t.get("symbolSize"),l=t.get("symbolKeepAspect");if(a.setVisual({legendSymbol:n||s,symbol:s,symbolSize:o,symbolKeepAspect:l}),!r.isSeriesFiltered(t)){var h="function"==typeof o;return{dataEach:a.hasItemOption||h?function(e,n){if("function"==typeof o){var r=t.getRawValue(n),i=t.getDataParams(n);e.setItemVisual(n,"symbolSize",o(r,i))}if(e.hasItemOption){var a=e.getItemModel(n),s=a.getShallow("symbol",!0),l=a.getShallow("symbolSize",!0),h=a.getShallow("symbolKeepAspect",!0);null!=s&&e.setItemVisual(n,"symbol",s),null!=l&&e.setItemVisual(n,"symbolSize",l),null!=h&&e.setItemVisual(n,"symbolKeepAspect",h)}}:null}}}}}},61224:function(t,e,n){var r=n(66023),i={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};t.exports={get:function(t,e,n){var a=r.clone((i[t]||{})[e]);return n&&r.isArray(a)?a[a.length-1]:a}}},49002:function(t,e,n){var r=n(66023),i=n(95138),a=r.each;function s(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}e.createVisualMappings=function(t,e,n){var s={};return a(e,function(e){var o,l=s[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);a(t[e],function(t,a){if(i.isValidType(a)){var s={type:a,visual:t};n&&n(s,e),l[a]=new i(s),"opacity"===a&&((s=r.clone(s)).type="colorAlpha",l.__hidden.__alphaForOpacity=new i(s))}})}),s},e.replaceVisualOption=function(t,e,n){var i;r.each(n,function(t){e.hasOwnProperty(t)&&s(e[t])&&(i=!0)}),i&&r.each(n,function(n){e.hasOwnProperty(n)&&s(e[n])?t[n]=r.clone(e[n]):delete t[n]})},e.applyVisual=function(t,e,n,a,s,o){var l,h={};function u(t){return n.getItemVisual(l,t)}function c(t,e){n.setItemVisual(l,t,e)}function d(t,r){l=null==o?t:r;var i=n.getRawDataItem(l);if(!i||!1!==i.visualMap)for(var d=a.call(s,t),p=e[d],g=h[d],f=0,y=g.length;f<y;f++){var x=g[f];p[x]&&p[x].applyVisual(t,u,c)}}r.each(t,function(t){var n=i.prepareVisualTypes(e[t]);h[t]=n}),null==o?n.each(d):n.each([o],d)},e.incrementalApplyVisual=function(t,e,n,a){var s={};return r.each(t,function(t){var n=i.prepareVisualTypes(e[t]);s[t]=n}),{progress:function(t,r){function i(t){return r.getItemVisual(l,t)}function o(t,e){r.setItemVisual(l,t,e)}for(null!=a&&(a=r.getDimension(a));null!=(l=t.next());){var l,h=r.getRawDataItem(l);if(!h||!1!==h.visualMap)for(var u=null!=a?r.get(a,l,!0):l,c=n(u),d=e[c],p=s[c],g=0,f=p.length;g<f;g++){var y=p[g];d[y]&&d[y].applyVisual(u,i,o)}}}}}},11312:function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,r,a,s){if("function"!=typeof r)throw TypeError("The listener must be a function");var o=new i(r,a||t,s),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1)),o.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},o.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,s=Array(a);i<a;i++)s[i]=r[i].fn;return s},o.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},o.prototype.emit=function(t,e,r,i,a,s){var o=n?n+t:t;if(!this._events[o])return!1;var l,h,u=this._events[o],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,r),!0;case 4:return u.fn.call(u.context,e,r,i),!0;case 5:return u.fn.call(u.context,e,r,i,a),!0;case 6:return u.fn.call(u.context,e,r,i,a,s),!0}for(h=1,l=Array(c-1);h<c;h++)l[h-1]=arguments[h];u.fn.apply(u.context,l)}else{var d,p=u.length;for(h=0;h<p;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),c){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,e);break;case 3:u[h].fn.call(u[h].context,e,r);break;case 4:u[h].fn.call(u[h].context,e,r,i);break;default:if(!l)for(d=1,l=Array(c-1);d<c;d++)l[d-1]=arguments[d];u[h].fn.apply(u[h].context,l)}}return!0},o.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},o.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},o.prototype.removeListener=function(t,e,r,i){var a=n?n+t:t;if(!this._events[a])return this;if(!e)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==e||i&&!o.once||r&&o.context!==r||s(this,a);else{for(var l=0,h=[],u=o.length;l<u;l++)(o[l].fn!==e||i&&!o[l].once||r&&o[l].context!==r)&&h.push(o[l]);h.length?this._events[a]=1===h.length?h[0]:h:s(this,a)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&s(this,e)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,t.exports=o},70777:function(t){t.exports&&(t.exports=function(){function t(t,e){void 0===e&&(e=0);var n=t.charCodeAt(e);if(55296<=n&&n<=56319&&e<t.length-1){var r=n,i=t.charCodeAt(e+1);return 56320<=i&&i<=57343?(r-55296)*1024+(i-56320)+65536:r}if(56320<=n&&n<=57343&&e>=1){var r=t.charCodeAt(e-1),i=n;return 55296<=r&&r<=56319?(r-55296)*1024+(i-56320)+65536:i}return n}function e(t){return 1536<=t&&t<=1541||1757==t||1807==t||2274==t||3406==t||69821==t||70082<=t&&t<=70083||72250==t||72326<=t&&t<=72329||73030==t?12:13==t?0:10==t?1:0<=t&&t<=9||11<=t&&t<=12||14<=t&&t<=31||127<=t&&t<=159||173==t||1564==t||6158==t||8203==t||8206<=t&&t<=8207||8232==t||8233==t||8234<=t&&t<=8238||8288<=t&&t<=8292||8293==t||8294<=t&&t<=8303||55296<=t&&t<=57343||65279==t||65520<=t&&t<=65528||65529<=t&&t<=65531||113824<=t&&t<=113827||119155<=t&&t<=119162||917504==t||917505==t||917506<=t&&t<=917535||917632<=t&&t<=917759||918e3<=t&&t<=921599?2:768<=t&&t<=879||1155<=t&&t<=1159||1160<=t&&t<=1161||1425<=t&&t<=1469||1471==t||1473<=t&&t<=1474||1476<=t&&t<=1477||1479==t||1552<=t&&t<=1562||1611<=t&&t<=1631||1648==t||1750<=t&&t<=1756||1759<=t&&t<=1764||1767<=t&&t<=1768||1770<=t&&t<=1773||1809==t||1840<=t&&t<=1866||1958<=t&&t<=1968||2027<=t&&t<=2035||2070<=t&&t<=2073||2075<=t&&t<=2083||2085<=t&&t<=2087||2089<=t&&t<=2093||2137<=t&&t<=2139||2260<=t&&t<=2273||2275<=t&&t<=2306||2362==t||2364==t||2369<=t&&t<=2376||2381==t||2385<=t&&t<=2391||2402<=t&&t<=2403||2433==t||2492==t||2494==t||2497<=t&&t<=2500||2509==t||2519==t||2530<=t&&t<=2531||2561<=t&&t<=2562||2620==t||2625<=t&&t<=2626||2631<=t&&t<=2632||2635<=t&&t<=2637||2641==t||2672<=t&&t<=2673||2677==t||2689<=t&&t<=2690||2748==t||2753<=t&&t<=2757||2759<=t&&t<=2760||2765==t||2786<=t&&t<=2787||2810<=t&&t<=2815||2817==t||2876==t||2878==t||2879==t||2881<=t&&t<=2884||2893==t||2902==t||2903==t||2914<=t&&t<=2915||2946==t||3006==t||3008==t||3021==t||3031==t||3072==t||3134<=t&&t<=3136||3142<=t&&t<=3144||3146<=t&&t<=3149||3157<=t&&t<=3158||3170<=t&&t<=3171||3201==t||3260==t||3263==t||3266==t||3270==t||3276<=t&&t<=3277||3285<=t&&t<=3286||3298<=t&&t<=3299||3328<=t&&t<=3329||3387<=t&&t<=3388||3390==t||3393<=t&&t<=3396||3405==t||3415==t||3426<=t&&t<=3427||3530==t||3535==t||3538<=t&&t<=3540||3542==t||3551==t||3633==t||3636<=t&&t<=3642||3655<=t&&t<=3662||3761==t||3764<=t&&t<=3769||3771<=t&&t<=3772||3784<=t&&t<=3789||3864<=t&&t<=3865||3893==t||3895==t||3897==t||3953<=t&&t<=3966||3968<=t&&t<=3972||3974<=t&&t<=3975||3981<=t&&t<=3991||3993<=t&&t<=4028||4038==t||4141<=t&&t<=4144||4146<=t&&t<=4151||4153<=t&&t<=4154||4157<=t&&t<=4158||4184<=t&&t<=4185||4190<=t&&t<=4192||4209<=t&&t<=4212||4226==t||4229<=t&&t<=4230||4237==t||4253==t||4957<=t&&t<=4959||5906<=t&&t<=5908||5938<=t&&t<=5940||5970<=t&&t<=5971||6002<=t&&t<=6003||6068<=t&&t<=6069||6071<=t&&t<=6077||6086==t||6089<=t&&t<=6099||6109==t||6155<=t&&t<=6157||6277<=t&&t<=6278||6313==t||6432<=t&&t<=6434||6439<=t&&t<=6440||6450==t||6457<=t&&t<=6459||6679<=t&&t<=6680||6683==t||6742==t||6744<=t&&t<=6750||6752==t||6754==t||6757<=t&&t<=6764||6771<=t&&t<=6780||6783==t||6832<=t&&t<=6845||6846==t||6912<=t&&t<=6915||6964==t||6966<=t&&t<=6970||6972==t||6978==t||7019<=t&&t<=7027||7040<=t&&t<=7041||7074<=t&&t<=7077||7080<=t&&t<=7081||7083<=t&&t<=7085||7142==t||7144<=t&&t<=7145||7149==t||7151<=t&&t<=7153||7212<=t&&t<=7219||7222<=t&&t<=7223||7376<=t&&t<=7378||7380<=t&&t<=7392||7394<=t&&t<=7400||7405==t||7412==t||7416<=t&&t<=7417||7616<=t&&t<=7673||7675<=t&&t<=7679||8204==t||8400<=t&&t<=8412||8413<=t&&t<=8416||8417==t||8418<=t&&t<=8420||8421<=t&&t<=8432||11503<=t&&t<=11505||11647==t||11744<=t&&t<=11775||12330<=t&&t<=12333||12334<=t&&t<=12335||12441<=t&&t<=12442||42607==t||42608<=t&&t<=42610||42612<=t&&t<=42621||42654<=t&&t<=42655||42736<=t&&t<=42737||43010==t||43014==t||43019==t||43045<=t&&t<=43046||43204<=t&&t<=43205||43232<=t&&t<=43249||43302<=t&&t<=43309||43335<=t&&t<=43345||43392<=t&&t<=43394||43443==t||43446<=t&&t<=43449||43452==t||43493==t||43561<=t&&t<=43566||43569<=t&&t<=43570||43573<=t&&t<=43574||43587==t||43596==t||43644==t||43696==t||43698<=t&&t<=43700||43703<=t&&t<=43704||43710<=t&&t<=43711||43713==t||43756<=t&&t<=43757||43766==t||44005==t||44008==t||44013==t||64286==t||65024<=t&&t<=65039||65056<=t&&t<=65071||65438<=t&&t<=65439||66045==t||66272==t||66422<=t&&t<=66426||68097<=t&&t<=68099||68101<=t&&t<=68102||68108<=t&&t<=68111||68152<=t&&t<=68154||68159==t||68325<=t&&t<=68326||69633==t||69688<=t&&t<=69702||69759<=t&&t<=69761||69811<=t&&t<=69814||69817<=t&&t<=69818||69888<=t&&t<=69890||69927<=t&&t<=69931||69933<=t&&t<=69940||70003==t||70016<=t&&t<=70017||70070<=t&&t<=70078||70090<=t&&t<=70092||70191<=t&&t<=70193||70196==t||70198<=t&&t<=70199||70206==t||70367==t||70371<=t&&t<=70378||70400<=t&&t<=70401||70460==t||70462==t||70464==t||70487==t||70502<=t&&t<=70508||70512<=t&&t<=70516||70712<=t&&t<=70719||70722<=t&&t<=70724||70726==t||70832==t||70835<=t&&t<=70840||70842==t||70845==t||70847<=t&&t<=70848||70850<=t&&t<=70851||71087==t||71090<=t&&t<=71093||71100<=t&&t<=71101||71103<=t&&t<=71104||71132<=t&&t<=71133||71219<=t&&t<=71226||71229==t||71231<=t&&t<=71232||71339==t||71341==t||71344<=t&&t<=71349||71351==t||71453<=t&&t<=71455||71458<=t&&t<=71461||71463<=t&&t<=71467||72193<=t&&t<=72198||72201<=t&&t<=72202||72243<=t&&t<=72248||72251<=t&&t<=72254||72263==t||72273<=t&&t<=72278||72281<=t&&t<=72283||72330<=t&&t<=72342||72344<=t&&t<=72345||72752<=t&&t<=72758||72760<=t&&t<=72765||72767==t||72850<=t&&t<=72871||72874<=t&&t<=72880||72882<=t&&t<=72883||72885<=t&&t<=72886||73009<=t&&t<=73014||73018==t||73020<=t&&t<=73021||73023<=t&&t<=73029||73031==t||92912<=t&&t<=92916||92976<=t&&t<=92982||94095<=t&&t<=94098||113821<=t&&t<=113822||119141==t||119143<=t&&t<=119145||119150<=t&&t<=119154||119163<=t&&t<=119170||119173<=t&&t<=119179||119210<=t&&t<=119213||119362<=t&&t<=119364||121344<=t&&t<=121398||121403<=t&&t<=121452||121461==t||121476==t||121499<=t&&t<=121503||121505<=t&&t<=121519||122880<=t&&t<=122886||122888<=t&&t<=122904||122907<=t&&t<=122913||122915<=t&&t<=122916||122918<=t&&t<=122922||125136<=t&&t<=125142||125252<=t&&t<=125258||917536<=t&&t<=917631||917760<=t&&t<=917999?3:127462<=t&&t<=127487?4:2307==t||2363==t||2366<=t&&t<=2368||2377<=t&&t<=2380||2382<=t&&t<=2383||2434<=t&&t<=2435||2495<=t&&t<=2496||2503<=t&&t<=2504||2507<=t&&t<=2508||2563==t||2622<=t&&t<=2624||2691==t||2750<=t&&t<=2752||2761==t||2763<=t&&t<=2764||2818<=t&&t<=2819||2880==t||2887<=t&&t<=2888||2891<=t&&t<=2892||3007==t||3009<=t&&t<=3010||3014<=t&&t<=3016||3018<=t&&t<=3020||3073<=t&&t<=3075||3137<=t&&t<=3140||3202<=t&&t<=3203||3262==t||3264<=t&&t<=3265||3267<=t&&t<=3268||3271<=t&&t<=3272||3274<=t&&t<=3275||3330<=t&&t<=3331||3391<=t&&t<=3392||3398<=t&&t<=3400||3402<=t&&t<=3404||3458<=t&&t<=3459||3536<=t&&t<=3537||3544<=t&&t<=3550||3570<=t&&t<=3571||3635==t||3763==t||3902<=t&&t<=3903||3967==t||4145==t||4155<=t&&t<=4156||4182<=t&&t<=4183||4228==t||6070==t||6078<=t&&t<=6085||6087<=t&&t<=6088||6435<=t&&t<=6438||6441<=t&&t<=6443||6448<=t&&t<=6449||6451<=t&&t<=6456||6681<=t&&t<=6682||6741==t||6743==t||6765<=t&&t<=6770||6916==t||6965==t||6971==t||6973<=t&&t<=6977||6979<=t&&t<=6980||7042==t||7073==t||7078<=t&&t<=7079||7082==t||7143==t||7146<=t&&t<=7148||7150==t||7154<=t&&t<=7155||7204<=t&&t<=7211||7220<=t&&t<=7221||7393==t||7410<=t&&t<=7411||7415==t||43043<=t&&t<=43044||43047==t||43136<=t&&t<=43137||43188<=t&&t<=43203||43346<=t&&t<=43347||43395==t||43444<=t&&t<=43445||43450<=t&&t<=43451||43453<=t&&t<=43456||43567<=t&&t<=43568||43571<=t&&t<=43572||43597==t||43755==t||43758<=t&&t<=43759||43765==t||44003<=t&&t<=44004||44006<=t&&t<=44007||44009<=t&&t<=44010||44012==t||69632==t||69634==t||69762==t||69808<=t&&t<=69810||69815<=t&&t<=69816||69932==t||70018==t||70067<=t&&t<=70069||70079<=t&&t<=70080||70188<=t&&t<=70190||70194<=t&&t<=70195||70197==t||70368<=t&&t<=70370||70402<=t&&t<=70403||70463==t||70465<=t&&t<=70468||70471<=t&&t<=70472||70475<=t&&t<=70477||70498<=t&&t<=70499||70709<=t&&t<=70711||70720<=t&&t<=70721||70725==t||70833<=t&&t<=70834||70841==t||70843<=t&&t<=70844||70846==t||70849==t||71088<=t&&t<=71089||71096<=t&&t<=71099||71102==t||71216<=t&&t<=71218||71227<=t&&t<=71228||71230==t||71340==t||71342<=t&&t<=71343||71350==t||71456<=t&&t<=71457||71462==t||72199<=t&&t<=72200||72249==t||72279<=t&&t<=72280||72343==t||72751==t||72766==t||72873==t||72881==t||72884==t||94033<=t&&t<=94078||119142==t||119149==t?5:4352<=t&&t<=4447||43360<=t&&t<=43388?6:4448<=t&&t<=4519||55216<=t&&t<=55238?7:4520<=t&&t<=4607||55243<=t&&t<=55291?8:44032==t||44060==t||44088==t||44116==t||44144==t||44172==t||44200==t||44228==t||44256==t||44284==t||44312==t||44340==t||44368==t||44396==t||44424==t||44452==t||44480==t||44508==t||44536==t||44564==t||44592==t||44620==t||44648==t||44676==t||44704==t||44732==t||44760==t||44788==t||44816==t||44844==t||44872==t||44900==t||44928==t||44956==t||44984==t||45012==t||45040==t||45068==t||45096==t||45124==t||45152==t||45180==t||45208==t||45236==t||45264==t||45292==t||45320==t||45348==t||45376==t||45404==t||45432==t||45460==t||45488==t||45516==t||45544==t||45572==t||45600==t||45628==t||45656==t||45684==t||45712==t||45740==t||45768==t||45796==t||45824==t||45852==t||45880==t||45908==t||45936==t||45964==t||45992==t||46020==t||46048==t||46076==t||46104==t||46132==t||46160==t||46188==t||46216==t||46244==t||46272==t||46300==t||46328==t||46356==t||46384==t||46412==t||46440==t||46468==t||46496==t||46524==t||46552==t||46580==t||46608==t||46636==t||46664==t||46692==t||46720==t||46748==t||46776==t||46804==t||46832==t||46860==t||46888==t||46916==t||46944==t||46972==t||47e3==t||47028==t||47056==t||47084==t||47112==t||47140==t||47168==t||47196==t||47224==t||47252==t||47280==t||47308==t||47336==t||47364==t||47392==t||47420==t||47448==t||47476==t||47504==t||47532==t||47560==t||47588==t||47616==t||47644==t||47672==t||47700==t||47728==t||47756==t||47784==t||47812==t||47840==t||47868==t||47896==t||47924==t||47952==t||47980==t||48008==t||48036==t||48064==t||48092==t||48120==t||48148==t||48176==t||48204==t||48232==t||48260==t||48288==t||48316==t||48344==t||48372==t||48400==t||48428==t||48456==t||48484==t||48512==t||48540==t||48568==t||48596==t||48624==t||48652==t||48680==t||48708==t||48736==t||48764==t||48792==t||48820==t||48848==t||48876==t||48904==t||48932==t||48960==t||48988==t||49016==t||49044==t||49072==t||49100==t||49128==t||49156==t||49184==t||49212==t||49240==t||49268==t||49296==t||49324==t||49352==t||49380==t||49408==t||49436==t||49464==t||49492==t||49520==t||49548==t||49576==t||49604==t||49632==t||49660==t||49688==t||49716==t||49744==t||49772==t||49800==t||49828==t||49856==t||49884==t||49912==t||49940==t||49968==t||49996==t||50024==t||50052==t||50080==t||50108==t||50136==t||50164==t||50192==t||50220==t||50248==t||50276==t||50304==t||50332==t||50360==t||50388==t||50416==t||50444==t||50472==t||50500==t||50528==t||50556==t||50584==t||50612==t||50640==t||50668==t||50696==t||50724==t||50752==t||50780==t||50808==t||50836==t||50864==t||50892==t||50920==t||50948==t||50976==t||51004==t||51032==t||51060==t||51088==t||51116==t||51144==t||51172==t||51200==t||51228==t||51256==t||51284==t||51312==t||51340==t||51368==t||51396==t||51424==t||51452==t||51480==t||51508==t||51536==t||51564==t||51592==t||51620==t||51648==t||51676==t||51704==t||51732==t||51760==t||51788==t||51816==t||51844==t||51872==t||51900==t||51928==t||51956==t||51984==t||52012==t||52040==t||52068==t||52096==t||52124==t||52152==t||52180==t||52208==t||52236==t||52264==t||52292==t||52320==t||52348==t||52376==t||52404==t||52432==t||52460==t||52488==t||52516==t||52544==t||52572==t||52600==t||52628==t||52656==t||52684==t||52712==t||52740==t||52768==t||52796==t||52824==t||52852==t||52880==t||52908==t||52936==t||52964==t||52992==t||53020==t||53048==t||53076==t||53104==t||53132==t||53160==t||53188==t||53216==t||53244==t||53272==t||53300==t||53328==t||53356==t||53384==t||53412==t||53440==t||53468==t||53496==t||53524==t||53552==t||53580==t||53608==t||53636==t||53664==t||53692==t||53720==t||53748==t||53776==t||53804==t||53832==t||53860==t||53888==t||53916==t||53944==t||53972==t||54e3==t||54028==t||54056==t||54084==t||54112==t||54140==t||54168==t||54196==t||54224==t||54252==t||54280==t||54308==t||54336==t||54364==t||54392==t||54420==t||54448==t||54476==t||54504==t||54532==t||54560==t||54588==t||54616==t||54644==t||54672==t||54700==t||54728==t||54756==t||54784==t||54812==t||54840==t||54868==t||54896==t||54924==t||54952==t||54980==t||55008==t||55036==t||55064==t||55092==t||55120==t||55148==t||55176==t?9:44033<=t&&t<=44059||44061<=t&&t<=44087||44089<=t&&t<=44115||44117<=t&&t<=44143||44145<=t&&t<=44171||44173<=t&&t<=44199||44201<=t&&t<=44227||44229<=t&&t<=44255||44257<=t&&t<=44283||44285<=t&&t<=44311||44313<=t&&t<=44339||44341<=t&&t<=44367||44369<=t&&t<=44395||44397<=t&&t<=44423||44425<=t&&t<=44451||44453<=t&&t<=44479||44481<=t&&t<=44507||44509<=t&&t<=44535||44537<=t&&t<=44563||44565<=t&&t<=44591||44593<=t&&t<=44619||44621<=t&&t<=44647||44649<=t&&t<=44675||44677<=t&&t<=44703||44705<=t&&t<=44731||44733<=t&&t<=44759||44761<=t&&t<=44787||44789<=t&&t<=44815||44817<=t&&t<=44843||44845<=t&&t<=44871||44873<=t&&t<=44899||44901<=t&&t<=44927||44929<=t&&t<=44955||44957<=t&&t<=44983||44985<=t&&t<=45011||45013<=t&&t<=45039||45041<=t&&t<=45067||45069<=t&&t<=45095||45097<=t&&t<=45123||45125<=t&&t<=45151||45153<=t&&t<=45179||45181<=t&&t<=45207||45209<=t&&t<=45235||45237<=t&&t<=45263||45265<=t&&t<=45291||45293<=t&&t<=45319||45321<=t&&t<=45347||45349<=t&&t<=45375||45377<=t&&t<=45403||45405<=t&&t<=45431||45433<=t&&t<=45459||45461<=t&&t<=45487||45489<=t&&t<=45515||45517<=t&&t<=45543||45545<=t&&t<=45571||45573<=t&&t<=45599||45601<=t&&t<=45627||45629<=t&&t<=45655||45657<=t&&t<=45683||45685<=t&&t<=45711||45713<=t&&t<=45739||45741<=t&&t<=45767||45769<=t&&t<=45795||45797<=t&&t<=45823||45825<=t&&t<=45851||45853<=t&&t<=45879||45881<=t&&t<=45907||45909<=t&&t<=45935||45937<=t&&t<=45963||45965<=t&&t<=45991||45993<=t&&t<=46019||46021<=t&&t<=46047||46049<=t&&t<=46075||46077<=t&&t<=46103||46105<=t&&t<=46131||46133<=t&&t<=46159||46161<=t&&t<=46187||46189<=t&&t<=46215||46217<=t&&t<=46243||46245<=t&&t<=46271||46273<=t&&t<=46299||46301<=t&&t<=46327||46329<=t&&t<=46355||46357<=t&&t<=46383||46385<=t&&t<=46411||46413<=t&&t<=46439||46441<=t&&t<=46467||46469<=t&&t<=46495||46497<=t&&t<=46523||46525<=t&&t<=46551||46553<=t&&t<=46579||46581<=t&&t<=46607||46609<=t&&t<=46635||46637<=t&&t<=46663||46665<=t&&t<=46691||46693<=t&&t<=46719||46721<=t&&t<=46747||46749<=t&&t<=46775||46777<=t&&t<=46803||46805<=t&&t<=46831||46833<=t&&t<=46859||46861<=t&&t<=46887||46889<=t&&t<=46915||46917<=t&&t<=46943||46945<=t&&t<=46971||46973<=t&&t<=46999||47001<=t&&t<=47027||47029<=t&&t<=47055||47057<=t&&t<=47083||47085<=t&&t<=47111||47113<=t&&t<=47139||47141<=t&&t<=47167||47169<=t&&t<=47195||47197<=t&&t<=47223||47225<=t&&t<=47251||47253<=t&&t<=47279||47281<=t&&t<=47307||47309<=t&&t<=47335||47337<=t&&t<=47363||47365<=t&&t<=47391||47393<=t&&t<=47419||47421<=t&&t<=47447||47449<=t&&t<=47475||47477<=t&&t<=47503||47505<=t&&t<=47531||47533<=t&&t<=47559||47561<=t&&t<=47587||47589<=t&&t<=47615||47617<=t&&t<=47643||47645<=t&&t<=47671||47673<=t&&t<=47699||47701<=t&&t<=47727||47729<=t&&t<=47755||47757<=t&&t<=47783||47785<=t&&t<=47811||47813<=t&&t<=47839||47841<=t&&t<=47867||47869<=t&&t<=47895||47897<=t&&t<=47923||47925<=t&&t<=47951||47953<=t&&t<=47979||47981<=t&&t<=48007||48009<=t&&t<=48035||48037<=t&&t<=48063||48065<=t&&t<=48091||48093<=t&&t<=48119||48121<=t&&t<=48147||48149<=t&&t<=48175||48177<=t&&t<=48203||48205<=t&&t<=48231||48233<=t&&t<=48259||48261<=t&&t<=48287||48289<=t&&t<=48315||48317<=t&&t<=48343||48345<=t&&t<=48371||48373<=t&&t<=48399||48401<=t&&t<=48427||48429<=t&&t<=48455||48457<=t&&t<=48483||48485<=t&&t<=48511||48513<=t&&t<=48539||48541<=t&&t<=48567||48569<=t&&t<=48595||48597<=t&&t<=48623||48625<=t&&t<=48651||48653<=t&&t<=48679||48681<=t&&t<=48707||48709<=t&&t<=48735||48737<=t&&t<=48763||48765<=t&&t<=48791||48793<=t&&t<=48819||48821<=t&&t<=48847||48849<=t&&t<=48875||48877<=t&&t<=48903||48905<=t&&t<=48931||48933<=t&&t<=48959||48961<=t&&t<=48987||48989<=t&&t<=49015||49017<=t&&t<=49043||49045<=t&&t<=49071||49073<=t&&t<=49099||49101<=t&&t<=49127||49129<=t&&t<=49155||49157<=t&&t<=49183||49185<=t&&t<=49211||49213<=t&&t<=49239||49241<=t&&t<=49267||49269<=t&&t<=49295||49297<=t&&t<=49323||49325<=t&&t<=49351||49353<=t&&t<=49379||49381<=t&&t<=49407||49409<=t&&t<=49435||49437<=t&&t<=49463||49465<=t&&t<=49491||49493<=t&&t<=49519||49521<=t&&t<=49547||49549<=t&&t<=49575||49577<=t&&t<=49603||49605<=t&&t<=49631||49633<=t&&t<=49659||49661<=t&&t<=49687||49689<=t&&t<=49715||49717<=t&&t<=49743||49745<=t&&t<=49771||49773<=t&&t<=49799||49801<=t&&t<=49827||49829<=t&&t<=49855||49857<=t&&t<=49883||49885<=t&&t<=49911||49913<=t&&t<=49939||49941<=t&&t<=49967||49969<=t&&t<=49995||49997<=t&&t<=50023||50025<=t&&t<=50051||50053<=t&&t<=50079||50081<=t&&t<=50107||50109<=t&&t<=50135||50137<=t&&t<=50163||50165<=t&&t<=50191||50193<=t&&t<=50219||50221<=t&&t<=50247||50249<=t&&t<=50275||50277<=t&&t<=50303||50305<=t&&t<=50331||50333<=t&&t<=50359||50361<=t&&t<=50387||50389<=t&&t<=50415||50417<=t&&t<=50443||50445<=t&&t<=50471||50473<=t&&t<=50499||50501<=t&&t<=50527||50529<=t&&t<=50555||50557<=t&&t<=50583||50585<=t&&t<=50611||50613<=t&&t<=50639||50641<=t&&t<=50667||50669<=t&&t<=50695||50697<=t&&t<=50723||50725<=t&&t<=50751||50753<=t&&t<=50779||50781<=t&&t<=50807||50809<=t&&t<=50835||50837<=t&&t<=50863||50865<=t&&t<=50891||50893<=t&&t<=50919||50921<=t&&t<=50947||50949<=t&&t<=50975||50977<=t&&t<=51003||51005<=t&&t<=51031||51033<=t&&t<=51059||51061<=t&&t<=51087||51089<=t&&t<=51115||51117<=t&&t<=51143||51145<=t&&t<=51171||51173<=t&&t<=51199||51201<=t&&t<=51227||51229<=t&&t<=51255||51257<=t&&t<=51283||51285<=t&&t<=51311||51313<=t&&t<=51339||51341<=t&&t<=51367||51369<=t&&t<=51395||51397<=t&&t<=51423||51425<=t&&t<=51451||51453<=t&&t<=51479||51481<=t&&t<=51507||51509<=t&&t<=51535||51537<=t&&t<=51563||51565<=t&&t<=51591||51593<=t&&t<=51619||51621<=t&&t<=51647||51649<=t&&t<=51675||51677<=t&&t<=51703||51705<=t&&t<=51731||51733<=t&&t<=51759||51761<=t&&t<=51787||51789<=t&&t<=51815||51817<=t&&t<=51843||51845<=t&&t<=51871||51873<=t&&t<=51899||51901<=t&&t<=51927||51929<=t&&t<=51955||51957<=t&&t<=51983||51985<=t&&t<=52011||52013<=t&&t<=52039||52041<=t&&t<=52067||52069<=t&&t<=52095||52097<=t&&t<=52123||52125<=t&&t<=52151||52153<=t&&t<=52179||52181<=t&&t<=52207||52209<=t&&t<=52235||52237<=t&&t<=52263||52265<=t&&t<=52291||52293<=t&&t<=52319||52321<=t&&t<=52347||52349<=t&&t<=52375||52377<=t&&t<=52403||52405<=t&&t<=52431||52433<=t&&t<=52459||52461<=t&&t<=52487||52489<=t&&t<=52515||52517<=t&&t<=52543||52545<=t&&t<=52571||52573<=t&&t<=52599||52601<=t&&t<=52627||52629<=t&&t<=52655||52657<=t&&t<=52683||52685<=t&&t<=52711||52713<=t&&t<=52739||52741<=t&&t<=52767||52769<=t&&t<=52795||52797<=t&&t<=52823||52825<=t&&t<=52851||52853<=t&&t<=52879||52881<=t&&t<=52907||52909<=t&&t<=52935||52937<=t&&t<=52963||52965<=t&&t<=52991||52993<=t&&t<=53019||53021<=t&&t<=53047||53049<=t&&t<=53075||53077<=t&&t<=53103||53105<=t&&t<=53131||53133<=t&&t<=53159||53161<=t&&t<=53187||53189<=t&&t<=53215||53217<=t&&t<=53243||53245<=t&&t<=53271||53273<=t&&t<=53299||53301<=t&&t<=53327||53329<=t&&t<=53355||53357<=t&&t<=53383||53385<=t&&t<=53411||53413<=t&&t<=53439||53441<=t&&t<=53467||53469<=t&&t<=53495||53497<=t&&t<=53523||53525<=t&&t<=53551||53553<=t&&t<=53579||53581<=t&&t<=53607||53609<=t&&t<=53635||53637<=t&&t<=53663||53665<=t&&t<=53691||53693<=t&&t<=53719||53721<=t&&t<=53747||53749<=t&&t<=53775||53777<=t&&t<=53803||53805<=t&&t<=53831||53833<=t&&t<=53859||53861<=t&&t<=53887||53889<=t&&t<=53915||53917<=t&&t<=53943||53945<=t&&t<=53971||53973<=t&&t<=53999||54001<=t&&t<=54027||54029<=t&&t<=54055||54057<=t&&t<=54083||54085<=t&&t<=54111||54113<=t&&t<=54139||54141<=t&&t<=54167||54169<=t&&t<=54195||54197<=t&&t<=54223||54225<=t&&t<=54251||54253<=t&&t<=54279||54281<=t&&t<=54307||54309<=t&&t<=54335||54337<=t&&t<=54363||54365<=t&&t<=54391||54393<=t&&t<=54419||54421<=t&&t<=54447||54449<=t&&t<=54475||54477<=t&&t<=54503||54505<=t&&t<=54531||54533<=t&&t<=54559||54561<=t&&t<=54587||54589<=t&&t<=54615||54617<=t&&t<=54643||54645<=t&&t<=54671||54673<=t&&t<=54699||54701<=t&&t<=54727||54729<=t&&t<=54755||54757<=t&&t<=54783||54785<=t&&t<=54811||54813<=t&&t<=54839||54841<=t&&t<=54867||54869<=t&&t<=54895||54897<=t&&t<=54923||54925<=t&&t<=54951||54953<=t&&t<=54979||54981<=t&&t<=55007||55009<=t&&t<=55035||55037<=t&&t<=55063||55065<=t&&t<=55091||55093<=t&&t<=55119||55121<=t&&t<=55147||55149<=t&&t<=55175||55177<=t&&t<=55203?10:9757==t||9977==t||9994<=t&&t<=9997||127877==t||127938<=t&&t<=127940||127943==t||127946<=t&&t<=127948||128066<=t&&t<=128067||128070<=t&&t<=128080||128110==t||128112<=t&&t<=128120||128124==t||128129<=t&&t<=128131||128133<=t&&t<=128135||128170==t||128372<=t&&t<=128373||128378==t||128400==t||128405<=t&&t<=128406||128581<=t&&t<=128583||128587<=t&&t<=128591||128675==t||128692<=t&&t<=128694||128704==t||128716==t||129304<=t&&t<=129308||129310<=t&&t<=129311||129318==t||129328<=t&&t<=129337||129341<=t&&t<=129342||129489<=t&&t<=129501?13:127995<=t&&t<=127999?14:8205==t?15:9792==t||9794==t||9877<=t&&t<=9878||9992==t||10084==t||127752==t||127806==t||127859==t||127891==t||127908==t||127912==t||127979==t||127981==t||128139==t||128187<=t&&t<=128188||128295==t||128300==t||128488==t||128640==t||128658==t?16:128102<=t&&t<=128105?17:11}return this.nextBreak=function(n,r){if(void 0===r&&(r=0),r<0)return 0;if(r>=n.length-1)return n.length;for(var i,a=e(t(n,r)),s=[],o=r+1;o<n.length;o++)if(i=o-1,!(55296<=n.charCodeAt(i)&&56319>=n.charCodeAt(i)&&56320<=n.charCodeAt(i+1)&&57343>=n.charCodeAt(i+1))){var l=e(t(n,o));if(function(t,e,n){var r=[t].concat(e).concat([n]),i=r[r.length-2],a=r.lastIndexOf(14);if(a>1&&r.slice(1,a).every(function(t){return 3==t})&&-1==[3,13,17].indexOf(t))return 2;var s=r.lastIndexOf(4);if(s>0&&r.slice(1,s).every(function(t){return 4==t})&&-1==[12,4].indexOf(i))if(r.filter(function(t){return 4==t}).length%2==1)return 3;else return 4;if(0==i&&1==n)return 0;if(2==i||0==i||1==i)if(14==n&&e.every(function(t){return 3==t}))return 2;else return 1;if(2==n||0==n||1==n)return 1;if(6==i&&(6==n||7==n||9==n||10==n))return 0;if((9==i||7==i)&&(7==n||8==n))return 0;else if((10==i||8==i)&&8==n)return 0;else if(3==n||15==n)return 0;else if(5==n)return 0;else if(12==i)return 0;var o=-1!=r.indexOf(3)?r.lastIndexOf(3)-1:r.length-2;return -1!=[13,17].indexOf(r[o])&&r.slice(o+1,-1).every(function(t){return 3==t})&&14==n||15==i&&-1!=[16,17].indexOf(n)?0:-1!=e.indexOf(4)?2:+(4!=i||4!=n)}(a,s,l))return o;s.push(l)}return n.length},this.splitGraphemes=function(t){for(var e,n=[],r=0;(e=this.nextBreak(t,r))<t.length;)n.push(t.slice(r,e)),r=e;return r<t.length&&n.push(t.slice(r)),n},this.iterateGraphemes=function(t){var e=0,n={next:(function(){var n,r;return(r=this.nextBreak(t,e))<t.length?(n=t.slice(e,r),e=r,{value:n,done:!1}):e<t.length?(n=t.slice(e),e=t.length,{value:n,done:!1}):{value:void 0,done:!0}}).bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return n}),n},this.countGraphemes=function(t){for(var e,n=0,r=0;(e=this.nextBreak(t,r))<t.length;)r=e,n++;return r<t.length&&n++,n},this})},48254:function(t){t.exports=function(t){return!!t&&"string"!=typeof t&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},81139:function(t){t.exports=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"]},27933:function(t,e,n){"use strict";var r=n(48254),i=Array.prototype.concat,a=Array.prototype.slice,s=t.exports=function(t){for(var e=[],n=0,s=t.length;n<s;n++){var o=t[n];r(o)?e=i.call(e,a.call(o)):e.push(o)}return e};s.wrap=function(t){return function(){return t(s(arguments))}}},85150:function(t,e,n){t.exports=n(81139)},96909:function(t){function e(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function n(t,n){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=n,this.destLen=0,this.ltree=new e,this.dtree=new e}var r,i=new e,a=new e,s=new Uint8Array(30),o=new Uint16Array(30),l=new Uint8Array(30),h=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new e,d=new Uint8Array(320);function p(t,e,n,r){var i,a;for(i=0;i<n;++i)t[i]=0;for(i=0;i<30-n;++i)t[i+n]=i/n|0;for(a=r,i=0;i<30;++i)e[i]=a,a+=1<<t[i]}var g=new Uint16Array(16);function f(t,e,n,r){var i,a;for(i=0;i<16;++i)t.table[i]=0;for(i=0;i<r;++i)t.table[e[n+i]]++;for(a=0,t.table[0]=0,i=0;i<16;++i)g[i]=a,a+=t.table[i];for(i=0;i<r;++i)e[n+i]&&(t.trans[g[e[n+i]]++]=i)}function y(t,e,n){if(!e)return n;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var r=t.tag&65535>>>16-e;return t.tag>>>=e,t.bitcount-=e,r+n}function x(t,e){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var n=0,r=0,i=0,a=t.tag;do r=2*r+(1&a),a>>>=1,++i,n+=e.table[i],r-=e.table[i];while(r>=0);return t.tag=a,t.bitcount-=i,e.trans[n+r]}function m(t,e,n){for(;;){var r,i,a,u,c=x(t,e);if(256===c)return 0;if(c<256)t.dest[t.destLen++]=c;else for(c-=257,r=y(t,s[c],o[c]),i=x(t,n),u=a=t.destLen-y(t,l[i],h[i]);u<a+r;++u)t.dest[t.destLen++]=t.dest[u]}}for(r=0;r<7;++r)i.table[r]=0;for(r=0,i.table[7]=24,i.table[8]=152,i.table[9]=112;r<24;++r)i.trans[r]=256+r;for(r=0;r<144;++r)i.trans[24+r]=r;for(r=0;r<8;++r)i.trans[168+r]=280+r;for(r=0;r<112;++r)i.trans[176+r]=144+r;for(r=0;r<5;++r)a.table[r]=0;for(r=0,a.table[5]=32;r<32;++r)a.trans[r]=r;p(s,o,4,3),p(l,h,2,1),s[28]=0,o[28]=258,t.exports=function(t,e){var r,s,o=new n(t,e);do{switch(r=function(t){t.bitcount--||(t.tag=t.source[t.sourceIndex++],t.bitcount=7);var e=1&t.tag;return t.tag>>>=1,e}(o),y(o,2,0)){case 0:s=function(t){for(var e,n,r;t.bitcount>8;)t.sourceIndex--,t.bitcount-=8;if((e=256*(e=t.source[t.sourceIndex+1])+t.source[t.sourceIndex])!==(65535&~(256*t.source[t.sourceIndex+3]+t.source[t.sourceIndex+2])))return -3;for(t.sourceIndex+=4,r=e;r;--r)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,0}(o);break;case 1:s=m(o,i,a);break;case 2:!function(t,e,n){for(s=0,r=y(t,5,257),i=y(t,5,1),a=y(t,4,4);s<19;++s)d[s]=0;for(s=0;s<a;++s){var r,i,a,s,o,l,h=y(t,3,0);d[u[s]]=h}for(f(c,d,0,19),o=0;o<r+i;){var p=x(t,c);switch(p){case 16:var g=d[o-1];for(l=y(t,2,3);l;--l)d[o++]=g;break;case 17:for(l=y(t,3,3);l;--l)d[o++]=0;break;case 18:for(l=y(t,7,11);l;--l)d[o++]=0;break;default:d[o++]=p}}f(e,d,0,r),f(n,d,r,i)}(o,o.ltree,o.dtree),s=m(o,o.ltree,o.dtree);break;default:s=-3}if(0!==s)throw Error("Data error")}while(!r);if(o.destLen<o.dest.length)if("function"==typeof o.dest.slice)return o.dest.slice(0,o.destLen);else return o.dest.subarray(0,o.destLen);return o.dest}},9981:function(t,e,n){let r=n(96909),{swap32LE:i}=n(92396),a=2112;t.exports=class{constructor(t){let e="function"==typeof t.readUInt32BE&&"function"==typeof t.slice;if(e||t instanceof Uint8Array){let n;if(e)this.highStart=t.readUInt32LE(0),this.errorValue=t.readUInt32LE(4),n=t.readUInt32LE(8),t=t.slice(12);else{let e=new DataView(t.buffer);this.highStart=e.getUint32(0,!0),this.errorValue=e.getUint32(4,!0),n=e.getUint32(8,!0),t=t.subarray(12)}t=r(t,new Uint8Array(n)),i(t=r(t,new Uint8Array(n))),this.data=new Uint32Array(t.buffer)}else({data:this.data,highStart:this.highStart,errorValue:this.errorValue}=t)}get(t){let e;return t<0||t>1114111?this.errorValue:t<55296||t>56319&&t<=65535?(e=(this.data[t>>5]<<2)+(31&t),this.data[e]):t<=65535?(e=(this.data[2048+(t-55296>>5)]<<2)+(31&t),this.data[e]):t<this.highStart?(e=this.data[a-32+(t>>11)],e=((e=this.data[e+(t>>5&63)])<<2)+(31&t),this.data[e]):this.data[this.data.length-4]}}},92396:function(t){let e=18===new Uint8Array(new Uint32Array([0x12345678]).buffer)[0],n=(t,e,n)=>{let r=t[e];t[e]=t[n],t[n]=r},r=t=>{let e=t.length;for(let r=0;r<e;r+=4)n(t,r,r+3),n(t,r+1,r+2)};t.exports={swap32LE:t=>{e&&r(t)}}},50329:function(t,e,n){var r=n(68609),i=n(56177),a=n(53733),s=n(54517),o=n(66023),l=function(t){a.call(this,t),i.call(this,t),s.call(this,t),this.id=t.id||r()};l.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(o.isObject(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},o.mixin(l,s),o.mixin(l,a),o.mixin(l,i),t.exports=l},95725:function(t,e,n){var r=n(66023),i=n(3265),a=n(93787),s=n(56177),o=n(3006),l=n(78963),h="silent";function u(t){o.stop(this.event)}function c(){}c.prototype.dispose=function(){};var d=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],p=function(t,e,n,r){s.call(this),this.storage=t,this.painter=e,this.painterRoot=r,n=n||new c,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,a.call(this),this.setHandlerProxy(n)};p.prototype={constructor:p,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(r.each(d,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,r=this._hovered,i=r.target;i&&!i.__zr&&(i=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=this.findHover(e,n),s=a.target,o=this.proxy;o.setCursor&&o.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==i&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do n=n&&n.parentNode;while(n&&9!==n.nodeType&&!(e=n===this.painterRoot));e||this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var r=(t=t||{}).target;if(!r||!r.silent){for(var i,a="on"+e,s={type:e,event:n,target:(i=t).target,topTarget:i.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:u};r&&(r[a]&&(s.cancelBubble=r[a].call(r,s)),r.trigger(e,s),r=r.parent,!s.cancelBubble););!s.cancelBubble&&(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,n){for(var r,i=this.storage.getDisplayList(),a={x:t,y:e},s=i.length-1;s>=0;s--)if(i[s]!==n&&!i[s].ignore&&(r=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var r,i=t;i;){if(i.clipPath&&!i.clipPath.contain(e,n))return!1;i.silent&&(r=!0),i=i.parent}return!r||h}return!1}(i[s],t,e))&&(a.topTarget||(a.topTarget=i[s]),r!==h)){a.target=i[s];break}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new l);var n=this._gestureMgr;"start"===e&&n.clear();var r=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),r){var i=r.type;t.gestureEvent=i,this.dispatchToElement({target:r.target},i,r.event)}}},r.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){p.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),r=n.target;if("mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||i.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),r.mixin(p,s),r.mixin(p,a),t.exports=p},92941:function(t,e,n){var r=n(66023),i=n(14152).devicePixelRatio,a=n(77157),s=n(51501);function o(){return!1}function l(t,e,n){var i=r.createCanvas(),a=e.getWidth(),s=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=s+"px",i.setAttribute("data-zr-dom-id",t)),i.width=a*n,i.height=s*n,i}var h=function(t,e,n){n=n||i,"string"==typeof t?a=l(t,e,n):r.isObject(t)&&(t=(a=t).id),this.id=t,this.dom=a;var a,s=a.style;s&&(a.onselectstart=o,s["-webkit-user-select"]="none",s["user-select"]="none",s["-webkit-touch-callout"]="none",s["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",s.padding=0,s.margin=0,s["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};h.prototype={constructor:h,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=l("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=t+"px",i.height=e+"px"),r.width=t*n,r.height=e*n,a&&(a.width=t*n,a.height=e*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,r=this.dom,i=this.ctx,o=r.width,l=r.height,e=e||this.clearColor,h=this.motionBlur&&!t,u=this.lastFrameAlpha,c=this.dpr;if(h&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/c,l/c)),i.clearRect(0,0,o,l),e&&"transparent"!==e&&(e.colorStops?(n=e.__canvasGradient||a.getGradient(i,e,{x:0,y:0,width:o,height:l}),e.__canvasGradient=n):e.image&&(n=s.prototype.getCanvasPattern.call(e,i)),i.save(),i.fillStyle=n||e,i.fillRect(0,0,o,l),i.restore()),h){var d=this.domBack;i.save(),i.globalAlpha=u,i.drawImage(d,0,0,o,l),i.restore()}}},t.exports=h},2837:function(t,e,n){var r=n(14152).devicePixelRatio,i=n(66023),a=n(94627),s=n(71497),o=n(58265),l=n(92941),h=n(51017),u=n(52728),c=n(57674);function d(t){return parseInt(t,10)}var p=new s(0,0,0,0),g=new s(0,0,0,0),f=function(t,e,n){this.type="canvas";var a=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=i.extend({},n||{}),this.dpr=n.devicePixelRatio||r,this._singleCanvas=a,this.root=t;var s=t.style;s&&(s["-webkit-tap-highlight-color"]="transparent",s["-webkit-user-select"]=s["user-select"]=s["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],h=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,a){var u=t.width,c=t.height;null!=n.width&&(u=n.width),null!=n.height&&(c=n.height),this.dpr=n.devicePixelRatio||1,t.width=u*this.dpr,t.height=c*this.dpr,this._width=u,this._height=c;var d=new l(t,this,this.dpr);d.__builtin__=!0,d.initContext(),h[314159]=d,d.zlevel=314159,o.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var p,g,f,y=this._domRoot=(p=this._width,g=this._height,(f=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+p+"px","height:"+g+"px","padding:0","margin:0","border-width:0"].join(";")+";",f);t.appendChild(y)}this._hoverlayer=null,this._hoverElements=[]};f.prototype={constructor:f,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var r=0;r<n.length;r++){var i=n[r],a=this._layers[i];if(!a.__builtin__&&a.refresh){var s=0===r?this._backgroundColor:null;a.refresh(s)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return n.__from=t,t.__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,r=i.indexOf(n,e);r>=0&&n.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n<e.length;n++){var r=e[n].__from;r&&(r.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){o(t,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(1e5));var r={};n.ctx.save();for(var i=0;i<e;){var a=t[i],s=a.__from;if(!(s&&s.__zr)){t.splice(i,1),s.__hoverMir=null,e--;continue}i++,s.invisible||(a.transform=s.transform,a.invTransform=s.invTransform,a.__clipPaths=s.__clipPaths,this._doPaintEl(a,n,!0,r))}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,n){if(this._redrawId===n){e=e||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var i=this;h(function(){i._paintList(t,e,n)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(r){r.virtual&&t.drawImage(r.dom,0,0,e,n)})},_doPaintList:function(t,e){for(var n=[],r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r],s=this._layers[a];s.__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var o=!0,l=0;l<n.length;l++){var s=n[l],h=s.ctx,u={};h.save();var d=e?s.__startIndex:s.__drawIndex,p=!e&&s.incremental&&Date.now,g=p&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(d===s.__startIndex){var y=t[d];y.incremental&&y.notClear&&!e||s.clear(!1,f)}-1===d&&(console.error("For some unknown reason. drawIndex is -1"),d=s.__startIndex);for(var x=d;x<s.__endIndex;x++){var m=t[x];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,p&&Date.now()-g>15)break}s.__drawIndex=x,s.__drawIndex<s.__endIndex&&(o=!1),u.prevElClipPaths&&h.restore(),h.restore()}return c.wxa&&i.each(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,n,r){var i,a,s=e.ctx,o=t.transform;if((e.__dirty||n)&&!t.invisible&&0!==t.style.opacity&&!(o&&!o[0]&&!o[3])&&!(t.culling&&(i=this._width,a=this._height,p.copy(t.getBoundingRect()),t.transform&&p.applyTransform(t.transform),g.width=i,g.height=a,!p.intersect(g)))){var l=t.__clipPaths;if((!r.prevElClipPaths||function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0}(l,r.prevElClipPaths))&&(r.prevElClipPaths&&(e.ctx.restore(),r.prevElClipPaths=null,r.prevEl=null),l)){s.save();for(var h=0;h<l.length;h++){var u=l[h];u.setTransform(s),s.beginPath(),u.buildPath(s,u.shape),s.clip(),u.restoreTransform(s)}r.prevElClipPaths=l}t.beforeBrush&&t.beforeBrush(s),t.brush(s,r.prevEl||null),r.prevEl=t,t.afterBrush&&t.afterBrush(s)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var n=this._layers[t];return n||((n=new l("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&i.merge(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n=this._layers,r=this._zlevelList,i=r.length,s=null,o=-1,l=this._domRoot;if(n[t])return void a("ZLevel "+t+" has been used already");if(!(e&&(e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh&&1)))return void a("Layer of zlevel "+t+" is not valid");if(i>0&&t>r[0]){for(o=0;o<i-1&&(!(r[o]<t)||!(r[o+1]>t));o++);s=n[r[o]]}if(r.splice(o+1,0,t),n[t]=e,!e.virtual)if(s){var h=s.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)},eachLayer:function(t,e){var n,r,i=this._zlevelList;for(r=0;r<i.length;r++)n=i[r],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){var n,r,i,a=this._zlevelList;for(i=0;i<a.length;i++)r=a[i],(n=this._layers[r]).__builtin__&&t.call(e,n,r)},eachOtherLayer:function(t,e){var n,r,i,a=this._zlevelList;for(i=0;i<a.length;i++)r=a[i],(n=this._layers[r]).__builtin__||t.call(e,n,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){var r=t[n];if(r.zlevel!==t[n-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}for(var i=null,s=0,n=0;n<t.length;n++){var o,r=t[n],l=r.zlevel;r.incremental?((o=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):o=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),o.__builtin__||a("ZLevel "+l+" has been used by unkown layer "+o.id),o!==i&&(o.__used=!0,o.__startIndex!==n&&(o.__dirty=!0),o.__startIndex=n,o.incremental?o.__drawIndex=-1:o.__drawIndex=n,e(n),i=o),r.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?i.merge(n[t],e,!0):n[t]=e;for(var r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];if(a===t||a===t+.01){var s=this._layers[a];i.merge(s,n[t],!0)}}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],n.splice(i.indexOf(n,t),1))},resize:function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var a in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);i.each(this._progressiveLayers,function(n){n.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new l("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,r=e.dom.height,i=e.ctx;this.eachLayer(function(t){t.__builtin__?i.drawImage(t.dom,0,0,n,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},s=this.storage.getDisplayList(!0),o=0;o<s.length;o++){var h=s[o];this._doPaintEl(h,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],r=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var s=this.root,o=document.defaultView.getComputedStyle(s);return(s[r]||d(o[n])||d(s.style[n]))-(d(o[i])||0)-(d(o[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),r=n.getContext("2d"),i=t.getBoundingRect(),a=t.style,s=a.shadowBlur*e,o=a.shadowOffsetX*e,l=a.shadowOffsetY*e,h=a.hasStroke()?a.lineWidth:0,c=Math.max(h/2,-o+s),d=Math.max(h/2,o+s),p=Math.max(h/2,-l+s),g=Math.max(h/2,l+s),f=i.width+c+d,y=i.height+p+g;n.width=f*e,n.height=y*e,r.scale(e,e),r.clearRect(0,0,f,y),r.dpr=e;var x={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[c-i.x,p-i.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(r);var m=new u({style:{x:0,y:0,image:n}});return null!=x.position&&(m.position=t.position=x.position),null!=x.rotation&&(m.rotation=t.rotation=x.rotation),null!=x.scale&&(m.scale=t.scale=x.scale),m}},t.exports=f},16949:function(t,e,n){var r=n(66023),i=n(57674),a=n(35601),s=n(58265);function o(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var l=function(){this._roots=[],this._displayList=[],this._displayListLen=0};l.prototype={constructor:l,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,r=0,a=e.length;r<a;r++)this._updateAndAddDisplayable(e[r],null,t);n.length=this._displayListLen,i.canvasSupported&&s(n,o)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var r=t.clipPath;if(r){e=e?e.slice():[];for(var i=r,a=t;i;)i.parent=a,i.updateTransform(),e.push(i),a=i,i=i.clipPath}if(t.isGroup){for(var s=t._children,o=0;o<s.length;o++){var l=s[o];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof a&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var n=this._roots[e];n instanceof a&&n.delChildrenFromStorage(this)}this._roots=[],this._displayList=[],this._displayListLen=0;return}if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var s=r.indexOf(this._roots,t);s>=0&&(this.delFromStorage(t),this._roots.splice(s,1),t instanceof a&&t.delChildrenFromStorage(this))},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:o},t.exports=l},72482:function(t,e,n){var r=n(66023),i=n(3006).Dispatcher,a=n(51017),s=n(76183),o=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,i.call(this)};o.prototype={constructor:o,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=r.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=new Date().getTime()-this._pausedTime,e=t-this._time,n=this._clips,r=n.length,i=[],a=[],s=0;s<r;s++){var o=n[s],l=o.step(t,e);l&&(i.push(l),a.push(o))}for(var s=0;s<r;)n[s]._needsRemove?(n[s]=n[r-1],n.pop(),r--):s++;r=i.length;for(var s=0;s<r;s++)a[s].fire(i[s]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,a(function e(){t._running&&(a(e),t._paused||t._update())})},start:function(){this._time=new Date().getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=new Date().getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=new Date().getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var n=new s(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},r.mixin(o,i),t.exports=o},76183:function(t,e,n){var r=n(98559),i=n(53453),a=n(66023).isArrayLike,s=Array.prototype.slice;function o(t,e){return t[e]}function l(t,e,n){t[e]=n}function h(t,e,n,r,i){var a=t.length;if(1===i)for(var s=0;s<a;s++)r[s]=(o=t[s],(e[s]-o)*n+o);else for(var o,l,h=a&&t[0].length,s=0;s<a;s++)for(var u=0;u<h;u++)r[s][u]=(l=t[s][u],(e[s][u]-l)*n+l)}function u(t,e,n){var r=t.length,i=e.length;if(r!==i)if(r>i)t.length=i;else for(var a=r;a<i;a++)t.push(1===n?e[a]:s.call(e[a]));for(var o=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===n)isNaN(t[a])&&(t[a]=e[a]);else for(var l=0;l<o;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function c(t,e,n,r,i,a,s,o,l){var h=t.length;if(1===l)for(var u=0;u<h;u++)o[u]=d(t[u],e[u],n[u],r[u],i,a,s);else for(var c=t[0].length,u=0;u<h;u++)for(var p=0;p<c;p++)o[u][p]=d(t[u][p],e[u][p],n[u][p],r[u][p],i,a,s)}function d(t,e,n,r,i,a,s){var o=(n-t)*.5,l=(r-e)*.5;return(2*(e-n)+o+l)*s+(-3*(e-n)-2*o-l)*a+o*i+e}function p(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var g=function(t,e,n,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||o,this._setter=r||l,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};g.prototype={when:function(t,e){var n=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!n[r]){n[r]=[];var i=this._getter(this._target,r);if(null==i)continue;0!==t&&n[r].push({time:0,value:function(t){if(a(t)){var e=t.length;if(a(t[0])){for(var n=[],r=0;r<e;r++)n.push(s.call(t[r]));return n}return s.call(t)}return t}(i)})}n[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){var n,s=this,o=0,l=function(){--o||s._doneCallback()};for(var g in this._tracks)if(this._tracks.hasOwnProperty(g)){var f=function(t,e,n,s,o,l){var g,f,y,x,m,v,b,w,M=t._getter,_=t._setter,A="spline"===e,S=s.length;if(S){var C=a(s[0].value),I=!1,P=!1,T=C?a((g=s[s.length-1].value)&&g[0])?2:1:0;s.sort(function(t,e){return t.time-e.time}),f=s[S-1].time;for(var k=[],L=[],D=s[0].value,R=!0,N=0;N<S;N++){k.push(s[N].time/f);var O=s[N].value;if(C&&function(t,e,n){if(t===e)return!0;var r=t.length;if(r!==e.length)return!1;if(1===n){for(var i=0;i<r;i++)if(t[i]!==e[i])return!1}else for(var a=t[0].length,i=0;i<r;i++)for(var s=0;s<a;s++)if(t[i][s]!==e[i][s])return!1;return!0}(O,D,T)||!C&&O===D||(R=!1),D=O,"string"==typeof O){var j=i.parse(O);j?(O=j,I=!0):P=!0}L.push(O)}if(l||!R){for(var E=L[S-1],N=0;N<S-1;N++)C?u(L[N],E,T):!isNaN(L[N])||isNaN(E)||P||I||(L[N]=E);C&&u(M(t._target,o),E,T);var V=0,B=0;if(I)var z=[0,0,0,0];var F=new r({target:t._target,life:f,loop:t._loop,delay:t._delay,onframe:function(t,e){if(e<0)a=0;else if(e<B){for(a=y=Math.min(V+1,S-1);a>=0&&!(k[a]<=e);a--);a=Math.min(a,S-2)}else{for(a=V;a<S&&!(k[a]>e);a++);a=Math.min(a-1,S-2)}V=a,B=e;var n,r,i,a,s,l=k[a+1]-k[a];if(0!==l)if(x=(e-k[a])/l,A)if(v=L[a],m=L[0===a?a:a-1],b=L[a>S-2?S-1:a+1],w=L[a>S-3?S-1:a+2],C)c(m,v,b,w,x,x*x,x*x*x,M(t,o),T);else{if(I)s=c(m,v,b,w,x,x*x,x*x*x,z,1),s=p(z);else{if(P)return x>.5?b:v;s=d(m,v,b,w,x,x*x,x*x*x)}_(t,o,s)}else if(C)h(L[a],L[a+1],x,M(t,o),T);else{if(I)h(L[a],L[a+1],x,z,1),s=p(z);else{if(P)return n=L[a],r=L[a+1],x>.5?r:n;i=L[a],s=(L[a+1]-i)*x+i}_(t,o,s)}},ondestroy:n});return e&&"spline"!==e&&(F.easing=e),F}}}(this,t,l,this._tracks[g],g,e);f&&(this._clipList.push(f),o++,this.animation&&this.animation.addClip(f),n=f)}if(n){var y=n.onframe;n.onframe=function(t,e){y(t,e);for(var n=0;n<s._onframeList.length;n++)s._onframeList[n](t,e)}}return o||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,r=0;r<e.length;r++){var i=e[r];t&&i.onframe(this._target,1),n&&n.removeClip(i)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}},t.exports=g},98559:function(t,e,n){var r=n(83375);function i(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}i.prototype={constructor:i,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused){this._pausedTime+=e;return}var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?r[i]:i,s="function"==typeof a?a(n):n;return(this.fire("frame",s),1===n)?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}},t.exports=i},83375:function(t){var e={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t-e)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1)?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)):n*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t-e)/.4)*.5+1},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){return(t*=2)<1?t*t*(3.5949095*t-2.5949095)*.5:.5*((t-=2)*t*(3.5949095*t+2.5949095)+2)},bounceIn:function(t){return 1-e.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*e.bounceIn(2*t):.5*e.bounceOut(2*t-1)+.5}};t.exports=e},51017:function(t){t.exports="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)}},14152:function(t,e){var n=1;"undefined"!=typeof window&&(n=Math.max(window.devicePixelRatio||1,1));var r=n;e.debugMode=0,e.devicePixelRatio=r},50649:function(t,e,n){var r=n(43431).normalizeRadian,i=2*Math.PI;e.containStroke=function(t,e,n,a,s,o,l,h,u){if(0===l)return!1;var c=Math.sqrt((h-=t)*h+(u-=e)*u);if(c-l>n||c+l<n)return!1;if(Math.abs(a-s)%i<1e-4)return!0;if(o){var d=a;a=r(s),s=r(d)}else a=r(a),s=r(s);a>s&&(s+=i);var p=Math.atan2(u,h);return p<0&&(p+=i),p>=a&&p<=s||p+i>=a&&p+i<=s}},16858:function(t,e,n){var r=n(30783);e.containStroke=function(t,e,n,i,a,s,o,l,h,u,c){return 0!==h&&(!(c>e+h)||!(c>i+h)||!(c>s+h)||!(c>l+h))&&(!(c<e-h)||!(c<i-h)||!(c<s-h)||!(c<l-h))&&(!(u>t+h)||!(u>n+h)||!(u>a+h)||!(u>o+h))&&(!(u<t-h)||!(u<n-h)||!(u<a-h)||!(u<o-h))&&r.cubicProjectPoint(t,e,n,i,a,s,o,l,u,c,null)<=h/2}},11846:function(t,e){e.containStroke=function(t,e,n,r,i,a,s){if(0===i)return!1;var o=0,l=t;if(s>e+i&&s>r+i||s<e-i&&s<r-i||a>t+i&&a>n+i||a<t-i&&a<n-i)return!1;if(t===n)return Math.abs(a-t)<=i/2;o=(e-r)/(t-n);var h=o*a-s+(l=(t*r-n*e)/(t-n));return h*h/(o*o+1)<=i/2*i/2}},83212:function(t,e,n){var r=n(12057),i=n(11846),a=n(16858),s=n(5280),o=n(50649),l=n(43431).normalizeRadian,h=n(30783),u=n(71696),c=r.CMD,d=2*Math.PI,p=[-1,-1,-1],g=[-1,-1];function f(t,e,n,r,f){for(var y=0,x=0,m=0,v=0,b=0,w=0;w<t.length;){var M=t[w++];switch(M===c.M&&w>1&&!n&&(y+=u(x,m,v,b,r,f)),1===w&&(x=t[w],m=t[w+1],v=x,b=m),M){case c.M:v=t[w++],b=t[w++],x=v,m=b;break;case c.L:if(n){if(i.containStroke(x,m,t[w],t[w+1],e,r,f))return!0}else y+=u(x,m,t[w],t[w+1],r,f)||0;x=t[w++],m=t[w++];break;case c.C:if(n){if(a.containStroke(x,m,t[w++],t[w++],t[w++],t[w++],t[w],t[w+1],e,r,f))return!0}else y+=function(t,e,n,r,i,a,s,o,l,u){if(u>e&&u>r&&u>a&&u>o||u<e&&u<r&&u<a&&u<o)return 0;var c=h.cubicRootAt(e,r,a,o,u,p);if(0===c)return 0;for(var d,f,y=0,x=-1,m=0;m<c;m++){var v=p[m],b=0===v||1===v?.5:1;h.cubicAt(t,n,i,s,v)<l||(x<0&&(x=h.cubicExtrema(e,r,a,o,g),g[1]<g[0]&&x>1&&function(){var t=g[0];g[0]=g[1],g[1]=t}(),d=h.cubicAt(e,r,a,o,g[0]),x>1&&(f=h.cubicAt(e,r,a,o,g[1]))),2===x?v<g[0]?y+=d<e?b:-b:v<g[1]?y+=f<d?b:-b:y+=o<f?b:-b:v<g[0]?y+=d<e?b:-b:y+=o<d?b:-b)}return y}(x,m,t[w++],t[w++],t[w++],t[w++],t[w],t[w+1],r,f)||0;x=t[w++],m=t[w++];break;case c.Q:if(n){if(s.containStroke(x,m,t[w++],t[w++],t[w],t[w+1],e,r,f))return!0}else y+=function(t,e,n,r,i,a,s,o){if(o>e&&o>r&&o>a||o<e&&o<r&&o<a)return 0;var l=h.quadraticRootAt(e,r,a,o,p);if(0===l)return 0;var u=h.quadraticExtremum(e,r,a);if(u>=0&&u<=1){for(var c=0,d=h.quadraticAt(e,r,a,u),g=0;g<l;g++){var f=0===p[g]||1===p[g]?.5:1,y=h.quadraticAt(t,n,i,p[g]);y<s||(p[g]<u?c+=d<e?f:-f:c+=a<d?f:-f)}return c}var f=0===p[0]||1===p[0]?.5:1,y=h.quadraticAt(t,n,i,p[0]);return y<s?0:a<e?f:-f}(x,m,t[w++],t[w++],t[w],t[w+1],r,f)||0;x=t[w++],m=t[w++];break;case c.A:var _=t[w++],A=t[w++],S=t[w++],C=t[w++],I=t[w++],P=t[w++];w+=1;var T=1-t[w++],k=Math.cos(I)*S+_,L=Math.sin(I)*C+A;w>1?y+=u(x,m,k,L,r,f):(v=k,b=L);var D=(r-_)*C/S+_;if(n){if(o.containStroke(_,A,C,I,I+P,T,e,D,f))return!0}else y+=function(t,e,n,r,i,a,s,o){if((o-=e)>n||o<-n)return 0;var h=Math.sqrt(n*n-o*o);p[0]=-h,p[1]=h;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u%d<1e-4){r=0,i=d;var c=a?1:-1;return s>=p[0]+t&&s<=p[1]+t?c:0}if(a){var h=r;r=l(i),i=l(h)}else r=l(r),i=l(i);r>i&&(i+=d);for(var g=0,f=0;f<2;f++){var y=p[f];if(y+t>s){var x=Math.atan2(o,y),c=a?1:-1;x<0&&(x=d+x),(x>=r&&x<=i||x+d>=r&&x+d<=i)&&(x>Math.PI/2&&x<1.5*Math.PI&&(c=-c),g+=c)}}return g}(_,A,C,I,I+P,T,D,f);x=Math.cos(I+P)*S+_,m=Math.sin(I+P)*C+A;break;case c.R:v=x=t[w++],b=m=t[w++];var R=t[w++],N=t[w++],k=v+R,L=b+N;if(n){if(i.containStroke(v,b,k,b,e,r,f)||i.containStroke(k,b,k,L,e,r,f)||i.containStroke(k,L,v,L,e,r,f)||i.containStroke(v,L,v,b,e,r,f))return!0}else y+=u(k,b,k,L,r,f),y+=u(v,L,v,b,r,f);break;case c.Z:if(n){if(i.containStroke(x,m,v,b,e,r,f))return!0}else y+=u(x,m,v,b,r,f);x=v,m=b}}return n||1e-4>Math.abs(m-b)||(y+=u(x,m,v,b,r,f)||0),0!==y}e.contain=function(t,e,n){return f(t,0,!1,e,n)},e.containStroke=function(t,e,n,r){return f(t,e,!0,n,r)}},76703:function(t,e,n){var r=n(71696);function i(t,e){return 1e-8>Math.abs(t-e)}e.contain=function(t,e,n){var a=0,s=t[0];if(!s)return!1;for(var o=1;o<t.length;o++){var l=t[o];a+=r(s[0],s[1],l[0],l[1],e,n),s=l}var h=t[0];return i(s[0],h[0])&&i(s[1],h[1])||(a+=r(s[0],s[1],h[0],h[1],e,n)),0!==a}},5280:function(t,e,n){var r=n(30783).quadraticProjectPoint;e.containStroke=function(t,e,n,i,a,s,o,l,h){return 0!==o&&(!(h>e+o)||!(h>i+o)||!(h>s+o))&&(!(h<e-o)||!(h<i-o)||!(h<s-o))&&(!(l>t+o)||!(l>n+o)||!(l>a+o))&&(!(l<t-o)||!(l<n-o)||!(l<a-o))&&r(t,e,n,i,a,s,l,h,null)<=o/2}},99280:function(t,e,n){var r=n(71497),i=n(21715),a=n(66023),s=a.getContext,o=a.extend,l=a.retrieve2,h=a.retrieve3,u=a.trim,c={},d=0,p=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,g="12px sans-serif",f={};function y(t,e){var n=t+":"+(e=e||g);if(c[n])return c[n];for(var r=(t+"").split("\n"),i=0,a=0,s=r.length;a<s;a++)i=Math.max(_(r[a],e).width,i);return d>5e3&&(d=0,c={}),d++,c[n]=i,i}function x(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function m(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function v(t,e,n,r,i){if(!e)return"";var a=(t+"").split("\n");i=b(e,n,r,i);for(var s=0,o=a.length;s<o;s++)a[s]=w(a[s],i);return a.join("\n")}function b(t,e,n,r){(r=o({},r)).font=e;var n=l(n,"...");r.maxIterations=l(r.maxIterations,2);var i=r.minChar=l(r.minChar,0);r.cnCharWidth=y("国",e);var a=r.ascCharWidth=y("a",e);r.placeholder=l(r.placeholder,"");for(var s=t=Math.max(0,t-1),h=0;h<i&&s>=a;h++)s-=a;var u=y(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function w(t,e){var n=e.containerWidth,r=e.font,i=e.contentWidth;if(!n)return"";var a=y(t,r);if(a<=n)return t;for(var s=0;;s++){if(a<=i||s>=e.maxIterations){t+=e.ellipsis;break}var o=0===s?function(t,e,n,r){for(var i=0,a=0,s=t.length;a<s&&i<e;a++){var o=t.charCodeAt(a);i+=0<=o&&o<=127?n:r}return a}(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;a=y(t=t.substr(0,o),r)}return""===t&&(t=e.placeholder),t}function M(t){return y("国",t)}function _(t,e){return f.measureText(t,e)}function A(t,e,n,r,i){null!=t&&(t+="");var a=l(r,M(e)),s=t?t.split("\n"):[],o=s.length*a,h=o;if(n&&(h+=n[0]+n[2]),t&&i){var u=i.outerHeight,c=i.outerWidth;if(null!=u&&h>u)t="",s=[];else if(null!=c)for(var d=b(c-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),p=0,g=s.length;p<g;p++)s[p]=w(s[p],d)}return{lines:s,height:o,outerHeight:h,lineHeight:a}}function S(t,e){var n,r={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return r;for(var a=p.lastIndex=0;null!=(n=p.exec(t));){var s=n.index;s>a&&C(r,t.substring(a,s)),C(r,n[2],n[1]),a=p.lastIndex}a<t.length&&C(r,t.substring(a,t.length));var o=r.lines,u=0,c=0,d=[],g=e.textPadding,f=e.truncate,x=f&&f.outerWidth,m=f&&f.outerHeight;g&&(null!=x&&(x-=g[1]+g[3]),null!=m&&(m-=g[0]+g[2]));for(var b=0;b<o.length;b++){for(var w=o[b],_=0,A=0,S=0;S<w.tokens.length;S++){var I=w.tokens[S],P=I.styleName&&e.rich[I.styleName]||{},T=I.textPadding=P.textPadding,k=I.font=P.font||e.font,L=I.textHeight=l(P.textHeight,M(k));if(T&&(L+=T[0]+T[2]),I.height=L,I.lineHeight=h(P.textLineHeight,e.textLineHeight,L),I.textAlign=P&&P.textAlign||e.textAlign,I.textVerticalAlign=P&&P.textVerticalAlign||"middle",null!=m&&u+I.lineHeight>m)return{lines:[],width:0,height:0};I.textWidth=y(I.text,k);var D=P.textWidth,R=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))I.percentWidth=D,d.push(I),D=0;else{if(R){D=I.textWidth;var N=P.textBackgroundColor,O=N&&N.image;O&&(O=i.findExistImage(O),i.isImageReady(O)&&(D=Math.max(D,O.width*L/O.height)))}var j=T?T[1]+T[3]:0;D+=j;var E=null!=x?x-A:null;null!=E&&E<D&&(!R||E<j?(I.text="",I.textWidth=D=0):(I.text=v(I.text,E-j,k,f.ellipsis,{minChar:f.minChar}),I.textWidth=y(I.text,k),D=I.textWidth+j))}A+=I.width=D,P&&(_=Math.max(_,I.lineHeight))}w.width=A,w.lineHeight=_,u+=_,c=Math.max(c,A)}r.outerWidth=r.width=l(e.textWidth,c),r.outerHeight=r.height=l(e.textHeight,u),g&&(r.outerWidth+=g[1]+g[3],r.outerHeight+=g[0]+g[2]);for(var b=0;b<d.length;b++){var I=d[b],V=I.percentWidth;I.width=parseInt(V,10)/100*c}return r}function C(t,e,n){for(var r=""===e,i=e.split("\n"),a=t.lines,s=0;s<i.length;s++){var o=i[s],l={styleName:n,text:o,isLineHolder:!o&&!r};if(s)a.push({tokens:[l]});else{var h=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(o||!u||r)&&h.push(l)}}}f.measureText=function(t,e){var n=s();return n.font=e||g,n.measureText(t)},e.DEFAULT_FONT=g,e.$override=function(t,e){f[t]=e},e.getWidth=y,e.getBoundingRect=function(t,e,n,i,a,s,o,l){var h,u,c,d,p,g,f,v,b,w,M,_,C,I,P,T;return o?(h=t,u=e,c=n,d=i,g=(p=S(h,{rich:o,truncate:l,font:u,textAlign:c,textPadding:a,textLineHeight:s})).outerWidth,f=p.outerHeight,new r(x(0,g,c),m(0,f,d),g,f)):(v=t,b=e,w=n,M=i,C=A(v,b,_=a,s,l),I=y(v,b),_&&(I+=_[1]+_[3]),P=C.outerHeight,(T=new r(x(0,I,w),m(0,P,M),I,P)).lineHeight=C.lineHeight,T)},e.adjustTextX=x,e.adjustTextY=m,e.adjustTextPositionOnRect=function(t,e,n){var r=e.x,i=e.y,a=e.height,s=e.width,o=a/2,l="left",h="top";switch(t){case"left":r-=n,i+=o,l="right",h="middle";break;case"right":r+=n+s,i+=o,h="middle";break;case"top":r+=s/2,i-=n,l="center",h="bottom";break;case"bottom":r+=s/2,i+=a+n,l="center";break;case"inside":r+=s/2,i+=o,l="center",h="middle";break;case"insideLeft":r+=n,i+=o,h="middle";break;case"insideRight":r+=s-n,i+=o,l="right",h="middle";break;case"insideTop":r+=s/2,i+=n,l="center";break;case"insideBottom":r+=s/2,i+=a-n,l="center",h="bottom";break;case"insideTopLeft":r+=n,i+=n;break;case"insideTopRight":r+=s-n,i+=n,l="right";break;case"insideBottomLeft":r+=n,i+=a-n,h="bottom";break;case"insideBottomRight":r+=s-n,i+=a-n,l="right",h="bottom"}return{x:r,y:i,textAlign:l,textVerticalAlign:h}},e.truncateText=v,e.getLineHeight=M,e.measureText=_,e.parsePlainText=A,e.parseRichText=S,e.makeFont=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&u(e)||t.textFont||t.font}},43431:function(t,e){var n=2*Math.PI;e.normalizeRadian=function(t){return(t%=n)<0&&(t+=n),t}},71696:function(t){t.exports=function(t,e,n,r,i,a){if(a>e&&a>r||a<e&&a<r||r===e)return 0;var s=r<e?1:-1,o=(a-e)/(r-e);(1===o||0===o)&&(s=r<e?.5:-.5);var l=o*(n-t)+t;return l===i?1/0:l>i?s:0}},35601:function(t,e,n){var r=n(66023),i=n(50329),a=n(71497),s=function(t){for(var e in t=t||{},i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};s.prototype={constructor:s,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var n=this._children,r=n.indexOf(e);r>=0&&(n.splice(r,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof s&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,a=r.indexOf(i,t);return a<0||(i.splice(a,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof s&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){var t,e,n=this._children,r=this.__storage;for(e=0;e<n.length;e++)t=n[e],r&&(r.delFromStorage(t),t instanceof s&&t.delChildrenFromStorage(r)),t.parent=null;return n.length=0,this},eachChild:function(t,e){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];t.call(e,i,r)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var r=this._children[n];t.call(e,r),"group"===r.type&&r.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof s&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof s&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new a(0,0,0,0),r=t||this._children,i=[],s=0;s<r.length;s++){var o=r[s];if(!o.ignore&&!o.invisible){var l=o.getBoundingRect(),h=o.getLocalTransform(i);h?(n.copy(l),n.applyTransform(h),(e=e||n.clone()).union(n)):(e=e||l.clone()).union(l)}}return e||n}},r.inherits(s,i),t.exports=s},71497:function(t,e,n){var r,i,a,s,o=n(3265),l=n(36653),h=o.applyTransform,u=Math.min,c=Math.max;function d(t,e,n,r){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=n,this.height=r}d.prototype={constructor:d,union:function(t){var e=u(t.x,this.x),n=u(t.y,this.y);this.width=c(t.x+t.width,this.x+this.width)-e,this.height=c(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(r=[],i=[],a=[],s=[],function(t){if(t){r[0]=a[0]=this.x,r[1]=s[1]=this.y,i[0]=s[0]=this.x+this.width,i[1]=a[1]=this.y+this.height,h(r,r,t),h(i,i,t),h(a,a,t),h(s,s,t),this.x=u(r[0],i[0],a[0],s[0]),this.y=u(r[1],i[1],a[1],s[1]);var e=c(r[0],i[0],a[0],s[0]),n=c(r[1],i[1],a[1],s[1]);this.width=e-this.x,this.height=n-this.y}}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,r=l.create();return l.translate(r,r,[-this.x,-this.y]),l.scale(r,r,[e,n]),l.translate(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof d||(t=d.create(t));var e=this.x,n=this.x+this.width,r=this.y,i=this.y+this.height,a=t.x,s=t.x+t.width,o=t.y,l=t.y+t.height;return!(n<a||s<e||i<o||l<r)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(t){return new d(t.x,t.y,t.width,t.height)},t.exports=d},78963:function(t,e,n){var r=n(3006),i=function(){this._track=[]};function a(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}i.prototype={constructor:i,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},s=0,o=i.length;s<o;s++){var l=i[s],h=r.clientToLocal(n,l,{});a.points.push([h.zrX,h.zrY]),a.touches.push(l)}this._track.push(a)}},_recognize:function(t){for(var e in s)if(s.hasOwnProperty(e)){var n=s[e](this._track,t);if(n)return n}}};var s={pinch:function(t,e){var n=t.length;if(n){var r=(t[n-1]||{}).points,i=(t[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var s=a(r)/a(i);isFinite(s)||(s=1),e.pinchScale=s;var o=[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};t.exports=i},4186:function(t){var e=function(){this.head=null,this.tail=null,this._len=0},n=e.prototype;n.insert=function(t){var e=new r(t);return this.insertEntry(e),e},n.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},n.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len},n.clear=function(){this.head=this.tail=null,this._len=0};var r=function(t){this.value=t,this.next,this.prev},i=function(t){this._list=new e,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},a=i.prototype;a.put=function(t,e){var n=this._list,i=this._map,a=null;if(null==i[t]){var s=n.len(),o=this._lastRemovedEntry;if(s>=this._maxSize&&s>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}o?o.value=e:o=new r(e),o.key=t,n.insertEntry(o),i[t]=o}return a},a.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},a.clear=function(){this._list.clear(),this._map={}},t.exports=i},12057:function(t,e,n){var r=n(30783),i=n(3265),a=n(91273),s=n(71497),o=n(14152).devicePixelRatio,l={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},h=[],u=[],c=[],d=[],p=Math.min,g=Math.max,f=Math.cos,y=Math.sin,x=Math.sqrt,m=Math.abs,v="undefined"!=typeof Float32Array,b=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};b.prototype={constructor:b,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=m(1/o/t)||0,this._uy=m(1/o/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(l.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=m(t-this._xi)>this._ux||m(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,r,i,a){return this.addData(l.C,t,e,n,r,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,r,i,a):this._ctx.bezierCurveTo(t,e,n,r,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(t,e,n,r){return this.addData(l.Q,t,e,n,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,r):this._ctx.quadraticCurveTo(t,e,n,r)),this._xi=n,this._yi=r,this},arc:function(t,e,n,r,i,a){return this.addData(l.A,t,e,n,n,r,i-r,0,+!a),this._ctx&&this._ctx.arc(t,e,n,r,i,a),this._xi=f(i)*n+t,this._yi=y(i)*n+e,this},arcTo:function(t,e,n,r,i){return this._ctx&&this._ctx.arcTo(t,e,n,r,i),this},rect:function(t,e,n,r){return this._ctx&&this._ctx.rect(t,e,n,r),this.addData(l.R,t,e,n,r),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;!(this.data&&this.data.length===e)&&v&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,r=this._len,i=0;i<e;i++)n+=t[i].len();v&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(var i=0;i<e;i++)for(var a=t[i].data,s=0;s<a.length;s++)this.data[r++]=a[s];this._len=r},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,r,i=this._dashSum,a=this._dashOffset,s=this._lineDash,o=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=x(u*u+c*c),f=l,y=h,m=s.length;for(u/=d,c/=d,a<0&&(a=i+a),a%=i,f-=a*u,y-=a*c;u>0&&f<=t||u<0&&f>=t||0===u&&(c>0&&y<=e||c<0&&y>=e);)f+=u*(n=s[r=this._dashIdx]),y+=c*n,this._dashIdx=(r+1)%m,u>0&&f<l||u<0&&f>l||c>0&&y<h||c<0&&y>h||o[r%2?"moveTo":"lineTo"](u>=0?p(f,t):g(f,t),c>=0?p(y,e):g(y,e));u=f-t,c=y-e,this._dashOffset=-x(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,a,s){var o,l,h,u,c,d=this._dashSum,p=this._dashOffset,g=this._lineDash,f=this._ctx,y=this._xi,m=this._yi,v=r.cubicAt,b=0,w=this._dashIdx,M=g.length,_=0;for(p<0&&(p=d+p),p%=d,o=0;o<1;o+=.1)b+=x((l=v(y,t,n,a,o+.1)-v(y,t,n,a,o))*l+(h=v(m,e,i,s,o+.1)-v(m,e,i,s,o))*h);for(;w<M&&!((_+=g[w])>p);w++);for(o=(_-p)/b;o<=1;)u=v(y,t,n,a,o),c=v(m,e,i,s,o),w%2?f.moveTo(u,c):f.lineTo(u,c),o+=g[w]/b,w=(w+1)%M;w%2!=0&&f.lineTo(a,s),l=a-u,h=s-c,this._dashOffset=-x(l*l+h*h)},_dashedQuadraticTo:function(t,e,n,r){var i=n,a=r;n=(n+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,r,i,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,v&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=d[0]=d[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,r=0,o=0,p=0;p<t.length;){var g=t[p++];switch(1===p&&(e=t[p],n=t[p+1],r=e,o=n),g){case l.M:r=t[p++],o=t[p++],e=r,n=o,c[0]=r,c[1]=o,d[0]=r,d[1]=o;break;case l.L:a.fromLine(e,n,t[p],t[p+1],c,d),e=t[p++],n=t[p++];break;case l.C:a.fromCubic(e,n,t[p++],t[p++],t[p++],t[p++],t[p],t[p+1],c,d),e=t[p++],n=t[p++];break;case l.Q:a.fromQuadratic(e,n,t[p++],t[p++],t[p],t[p+1],c,d),e=t[p++],n=t[p++];break;case l.A:var x=t[p++],m=t[p++],v=t[p++],b=t[p++],w=t[p++],M=t[p++]+w;p+=1;var _=1-t[p++];1===p&&(r=f(w)*v+x,o=y(w)*b+m),a.fromArc(x,m,v,b,w,M,_,c,d),e=f(M)*v+x,n=y(M)*b+m;break;case l.R:r=e=t[p++],o=n=t[p++];var A=t[p++],S=t[p++];a.fromLine(r,o,r+A,o+S,c,d);break;case l.Z:e=r,n=o}i.min(h,h,c),i.max(u,u,d)}return 0===p&&(h[0]=h[1]=u[0]=u[1]=0),new s(h[0],h[1],u[0]-h[0],u[1]-h[1])},rebuildPath:function(t){for(var e,n,r,i,a,s,o=this.data,h=this._ux,u=this._uy,c=this._len,d=0;d<c;){var p=o[d++];switch(1===d&&(r=o[d],i=o[d+1],e=r,n=i),p){case l.M:e=r=o[d++],n=i=o[d++],t.moveTo(r,i);break;case l.L:a=o[d++],s=o[d++],(m(a-r)>h||m(s-i)>u||d===c-1)&&(t.lineTo(a,s),r=a,i=s);break;case l.C:t.bezierCurveTo(o[d++],o[d++],o[d++],o[d++],o[d++],o[d++]),r=o[d-2],i=o[d-1];break;case l.Q:t.quadraticCurveTo(o[d++],o[d++],o[d++],o[d++]),r=o[d-2],i=o[d-1];break;case l.A:var g=o[d++],x=o[d++],v=o[d++],b=o[d++],w=o[d++],M=o[d++],_=o[d++],A=o[d++],S=v>b?v:b,C=v>b?1:v/b,I=v>b?b/v:1,P=w+M;Math.abs(v-b)>.001?(t.translate(g,x),t.rotate(_),t.scale(C,I),t.arc(0,0,S,w,P,1-A),t.scale(1/C,1/I),t.rotate(-_),t.translate(-g,-x)):t.arc(g,x,S,w,P,1-A),1===d&&(e=f(w)*v+g,n=y(w)*b+x),r=f(P)*v+g,i=y(P)*b+x;break;case l.R:e=r=o[d],n=i=o[d+1],t.rect(o[d++],o[d++],o[d++],o[d++]);break;case l.Z:t.closePath(),r=e,i=n}}}},b.CMD=l,t.exports=b},35786:function(t){function e(){}e.prototype={diff:function(t,e,n){n||(n=function(t,e){return t===e}),this.equals=n;var r=this;t=t.slice();var i=(e=e.slice()).length,a=t.length,s=1,o=i+a,l=[{newPos:-1,components:[]}],h=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=i&&h+1>=a){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}for(;s<=o;){var d=function(){for(var n=-1*s;n<=s;n+=2){var o,h,u=l[n-1],c=l[n+1],d=(c?c.newPos:0)-n;u&&(l[n-1]=void 0);var p=u&&u.newPos+1<i,g=c&&0<=d&&d<a;if(!p&&!g){l[n]=void 0;continue}if(!p||g&&u.newPos<c.newPos?(h={newPos:(o=c).newPos,components:o.components.slice(0)},r.pushComponent(h.components,void 0,!0)):(h=u,h.newPos++,r.pushComponent(h.components,!0,void 0)),d=r.extractCommon(h,e,t,n),h.newPos+1>=i&&d+1>=a)return function(t,e,n,r){for(var i=0,a=e.length,s=0,o=0;i<a;i++){var l=e[i];if(l.removed){for(var h=[],u=o;u<o+l.count;u++)h.push(u);l.indices=h,o+=l.count}else{for(var h=[],u=s;u<s+l.count;u++)h.push(u);l.indices=h,s+=l.count,l.added||(o+=l.count)}}return e}(0,h.components,0,0);l[n]=h}s++}();if(d)return d}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,a=n.length,s=t.newPos,o=s-r,l=0;s+1<i&&o+1<a&&this.equals(e[s+1],n[o+1]);)s++,o++,l++;return l&&t.components.push({count:l}),t.newPos=s,o},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var n=new e;t.exports=function(t,e,r){return n.diff(t,e,r)}},91273:function(t,e,n){var r=n(3265),i=n(30783),a=Math.min,s=Math.max,o=Math.sin,l=Math.cos,h=2*Math.PI,u=r.create(),c=r.create(),d=r.create(),p=[],g=[];e.fromPoints=function(t,e,n){if(0!==t.length){var r,i=t[0],o=i[0],l=i[0],h=i[1],u=i[1];for(r=1;r<t.length;r++)o=a(o,(i=t[r])[0]),l=s(l,i[0]),h=a(h,i[1]),u=s(u,i[1]);e[0]=o,e[1]=h,n[0]=l,n[1]=u}},e.fromLine=function(t,e,n,r,i,o){i[0]=a(t,n),i[1]=a(e,r),o[0]=s(t,n),o[1]=s(e,r)},e.fromCubic=function(t,e,n,r,o,l,h,u,c,d){var f,y=i.cubicExtrema,x=i.cubicAt,m=y(t,n,o,h,p);for(f=0,c[0]=1/0,c[1]=1/0,d[0]=-1/0,d[1]=-1/0;f<m;f++){var v=x(t,n,o,h,p[f]);c[0]=a(v,c[0]),d[0]=s(v,d[0])}for(f=0,m=y(e,r,l,u,g);f<m;f++){var b=x(e,r,l,u,g[f]);c[1]=a(b,c[1]),d[1]=s(b,d[1])}c[0]=a(t,c[0]),d[0]=s(t,d[0]),c[0]=a(h,c[0]),d[0]=s(h,d[0]),c[1]=a(e,c[1]),d[1]=s(e,d[1]),c[1]=a(u,c[1]),d[1]=s(u,d[1])},e.fromQuadratic=function(t,e,n,r,o,l,h,u){var c=i.quadraticExtremum,d=i.quadraticAt,p=s(a(c(t,n,o),1),0),g=s(a(c(e,r,l),1),0),f=d(t,n,o,p),y=d(e,r,l,g);h[0]=a(t,o,f),h[1]=a(e,l,y),u[0]=s(t,o,f),u[1]=s(e,l,y)},e.fromArc=function(t,e,n,i,a,s,p,g,f){var y=r.min,x=r.max,m=Math.abs(a-s);if(m%h<1e-4&&m>1e-4){g[0]=t-n,g[1]=e-i,f[0]=t+n,f[1]=e+i;return}if(u[0]=l(a)*n+t,u[1]=o(a)*i+e,c[0]=l(s)*n+t,c[1]=o(s)*i+e,y(g,u,c),x(f,u,c),(a%=h)<0&&(a+=h),(s%=h)<0&&(s+=h),a>s&&!p?s+=h:a<s&&p&&(a+=h),p){var v=s;s=a,a=v}for(var b=0;b<s;b+=Math.PI/2)b>a&&(d[0]=l(b)*n+t,d[1]=o(b)*i+e,y(g,d,g),x(f,d,f))}},30783:function(t,e,n){var r=n(3265),i=r.create,a=r.distSquare,s=Math.pow,o=Math.sqrt,l=o(3),h=1/3,u=i(),c=i(),d=i();function p(t){return t>-1e-8&&t<1e-8}function g(t){return t>1e-8||t<-1e-8}function f(t,e,n,r,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*r+3*a*n)}function y(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}e.cubicAt=f,e.cubicDerivativeAt=function(t,e,n,r,i){var a=1-i;return 3*(((e-t)*a+2*(n-e)*i)*a+(r-n)*i*i)},e.cubicRootAt=function(t,e,n,r,i,a){var u=r+3*(e-n)-t,c=3*(n-2*e+t),d=3*(e-t),g=t-i,f=c*c-3*u*d,y=c*d-9*u*g,x=d*d-3*c*g,m=0;if(p(f)&&p(y))if(p(c))a[0]=0;else{var v=-d/c;v>=0&&v<=1&&(a[m++]=v)}else{var b=y*y-4*f*x;if(p(b)){var w=y/f,v=-c/u+w,M=-w/2;v>=0&&v<=1&&(a[m++]=v),M>=0&&M<=1&&(a[m++]=M)}else if(b>0){var _=o(b),A=f*c+1.5*u*(-y+_),S=f*c+1.5*u*(-y-_),v=(-c-((A=A<0?-s(-A,h):s(A,h))+(S=S<0?-s(-S,h):s(S,h))))/(3*u);v>=0&&v<=1&&(a[m++]=v)}else{var C=Math.acos((2*f*c-3*u*y)/(2*o(f*f*f)))/3,I=o(f),P=Math.cos(C),v=(-c-2*I*P)/(3*u),M=(-c+I*(P+l*Math.sin(C)))/(3*u),T=(-c+I*(P-l*Math.sin(C)))/(3*u);v>=0&&v<=1&&(a[m++]=v),M>=0&&M<=1&&(a[m++]=M),T>=0&&T<=1&&(a[m++]=T)}}return m},e.cubicExtrema=function(t,e,n,r,i){var a=6*n-12*e+6*t,s=9*e+3*r-3*t-9*n,l=3*e-3*t,h=0;if(p(s)){if(g(a)){var u=-l/a;u>=0&&u<=1&&(i[h++]=u)}}else{var c=a*a-4*s*l;if(p(c))i[0]=-a/(2*s);else if(c>0){var d=o(c),u=(-a+d)/(2*s),f=(-a-d)/(2*s);u>=0&&u<=1&&(i[h++]=u),f>=0&&f<=1&&(i[h++]=f)}}return h},e.cubicSubdivide=function(t,e,n,r,i,a){var s=(e-t)*i+t,o=(n-e)*i+e,l=(r-n)*i+n,h=(o-s)*i+s,u=(l-o)*i+o,c=(u-h)*i+h;a[0]=t,a[1]=s,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=r},e.cubicProjectPoint=function(t,e,n,r,i,s,l,h,p,g,y){var x,m,v,b,w,M=.005,_=1/0;u[0]=p,u[1]=g;for(var A=0;A<1;A+=.05)c[0]=f(t,n,i,l,A),c[1]=f(e,r,s,h,A),(b=a(u,c))<_&&(x=A,_=b);_=1/0;for(var S=0;S<32&&!(M<1e-4);S++)m=x-M,v=x+M,c[0]=f(t,n,i,l,m),c[1]=f(e,r,s,h,m),b=a(c,u),m>=0&&b<_?(x=m,_=b):(d[0]=f(t,n,i,l,v),d[1]=f(e,r,s,h,v),w=a(d,u),v<=1&&w<_?(x=v,_=w):M*=.5);return y&&(y[0]=f(t,n,i,l,x),y[1]=f(e,r,s,h,x)),o(_)},e.quadraticAt=y,e.quadraticDerivativeAt=function(t,e,n,r){return 2*((1-r)*(e-t)+r*(n-e))},e.quadraticRootAt=function(t,e,n,r,i){var a=t-2*e+n,s=2*(e-t),l=t-r,h=0;if(p(a)){if(g(s)){var u=-l/s;u>=0&&u<=1&&(i[h++]=u)}}else{var c=s*s-4*a*l;if(p(c)){var u=-s/(2*a);u>=0&&u<=1&&(i[h++]=u)}else if(c>0){var d=o(c),u=(-s+d)/(2*a),f=(-s-d)/(2*a);u>=0&&u<=1&&(i[h++]=u),f>=0&&f<=1&&(i[h++]=f)}}return h},e.quadraticExtremum=function(t,e,n){var r=t+n-2*e;return 0===r?.5:(t-e)/r},e.quadraticSubdivide=function(t,e,n,r,i){var a=(e-t)*r+t,s=(n-e)*r+e,o=(s-a)*r+a;i[0]=t,i[1]=a,i[2]=o,i[3]=o,i[4]=s,i[5]=n},e.quadraticProjectPoint=function(t,e,n,r,i,s,l,h,p){var g,f=.005,x=1/0;u[0]=l,u[1]=h;for(var m=0;m<1;m+=.05){c[0]=y(t,n,i,m),c[1]=y(e,r,s,m);var v=a(u,c);v<x&&(g=m,x=v)}x=1/0;for(var b=0;b<32&&!(f<1e-4);b++){var w=g-f,M=g+f;c[0]=y(t,n,i,w),c[1]=y(e,r,s,w);var v=a(c,u);if(w>=0&&v<x)g=w,x=v;else{d[0]=y(t,n,i,M),d[1]=y(e,r,s,M);var _=a(d,u);M<=1&&_<x?(g=M,x=_):f*=.5}}return p&&(p[0]=y(t,n,i,g),p[1]=y(e,r,s,g)),o(x)}},57674:function(t){var e,n,r,i,a,s,o={};t.exports="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:(e=navigator.userAgent,n={},r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge\/([\d.]+)/),s=/micromessenger/i.test(e),r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1]),s&&(n.weChat=!0),{browser:n,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document})},3006:function(t,e,n){e.Dispatcher=n(56177);var r=n(57674),i="undefined"!=typeof window&&!!window.addEventListener,a=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function s(t,e,n,i){return n=n||{},i||!r.canvasSupported?o(t,e,n):r.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):o(t,e,n),n}function o(t,e,n){var r=t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0};n.zrX=e.clientX-r.left,n.zrY=e.clientY-r.top}var l=i?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};e.clientToLocal=s,e.normalizeEvent=function(t,e,n){if(null!=(e=e||window.event).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];i&&s(t,i,e,n)}else s(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&a.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e},e.addEventListener=function(t,e,n){i?t.addEventListener(e,n):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n){i?t.removeEventListener(e,n):t.detachEvent("on"+e,n)},e.stop=l,e.isMiddleOrRightButtonOnMouseUpDown=function(t){return 2===t.which||3===t.which},e.notLeftMouse=function(t){return t.which>1}},68609:function(t){var e=2311;t.exports=function(){return e++}},94627:function(t,e,n){var r=n(14152).debugMode,i=function(){};1===r?i=function(){for(var t in arguments)throw Error(arguments[t])}:r>1&&(i=function(){for(var t in arguments)console.log(arguments[t])}),t.exports=i},36653:function(t,e){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(){var t=new n(6);return i(t),t}function i(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}e.create=r,e.identity=i,e.copy=a,e.mul=function(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],s=e[1]*n[2]+e[3]*n[3],o=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=a,t[3]=s,t[4]=o,t[5]=l,t},e.translate=function(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t},e.rotate=function(t,e,n){var r=e[0],i=e[2],a=e[4],s=e[1],o=e[3],l=e[5],h=Math.sin(n),u=Math.cos(n);return t[0]=r*u+s*h,t[1]=-r*h+s*u,t[2]=i*u+o*h,t[3]=-i*h+u*o,t[4]=u*a+h*l,t[5]=u*l-h*a,t},e.scale=function(t,e,n){var r=n[0],i=n[1];return t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i,t},e.invert=function(t,e){var n=e[0],r=e[2],i=e[4],a=e[1],s=e[3],o=e[5],l=n*s-a*r;return l?(l=1/l,t[0]=s*l,t[1]=-a*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*o-s*i)*l,t[5]=(a*i-n*o)*l,t):null},e.clone=function(t){var e=r();return a(e,t),e}},58265:function(t){function e(t,e,n,r){var i=e+1;if(i===n)return 1;if(0>r(t[i++],t[e])){for(;i<n&&0>r(t[i],t[i-1]);)i++;var a=t,s=e,o=i;for(o--;s<o;){var l=a[s];a[s++]=a[o],a[o--]=l}}else for(;i<n&&r(t[i],t[i-1])>=0;)i++;return i-e}function n(t,e,n,r,i){for(r===e&&r++;r<n;r++){for(var a,s=t[r],o=e,l=r;o<l;)0>i(s,t[a=o+l>>>1])?l=a:o=a+1;var h=r-o;switch(h){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;h>0;)t[o+h]=t[o+h-1],h--}t[o]=s}}function r(t,e,n,r,i,a){var s=0,o=0,l=1;if(a(t,e[n+i])>0){for(o=r-i;l<o&&a(t,e[n+i+l])>0;)s=l,(l=(l<<1)+1)<=0&&(l=o);l>o&&(l=o),s+=i,l+=i}else{for(o=i+1;l<o&&0>=a(t,e[n+i-l]);)s=l,(l=(l<<1)+1)<=0&&(l=o);l>o&&(l=o);var h=s;s=i-l,l=i-h}for(s++;s<l;){var u=s+(l-s>>>1);a(t,e[n+u])>0?s=u+1:l=u}return l}function i(t,e,n,r,i,a){var s=0,o=0,l=1;if(0>a(t,e[n+i])){for(o=i+1;l<o&&0>a(t,e[n+i-l]);)s=l,(l=(l<<1)+1)<=0&&(l=o);l>o&&(l=o);var h=s;s=i-l,l=i-h}else{for(o=r-i;l<o&&a(t,e[n+i+l])>=0;)s=l,(l=(l<<1)+1)<=0&&(l=o);l>o&&(l=o),s+=i,l+=i}for(s++;s<l;){var u=s+(l-s>>>1);0>a(t,e[n+u])?l=u:s=u+1}return l}function a(t,e){var n,a,s=7,o=0,l=0;t.length;var h=[];function u(o){var u=n[o],c=a[o],d=n[o+1],p=a[o+1];a[o]=c+p,o===l-3&&(n[o+1]=n[o+2],a[o+1]=a[o+2]),l--;var g=i(t[d],t,u,c,0,e);u+=g,0!=(c-=g)&&0!==(p=r(t[u+c-1],t,d,p,p-1,e))&&(c<=p?function(n,a,o,l){var u,c,d,p=0;for(p=0;p<a;p++)h[p]=t[n+p];var g=0,f=o,y=n;if(t[y++]=t[f++],0==--l){for(p=0;p<a;p++)t[y+p]=h[g+p];return}if(1===a){for(p=0;p<l;p++)t[y+p]=t[f+p];t[y+l]=h[g];return}for(var x=s;;){u=0,c=0,d=!1;do if(0>e(t[f],h[g])){if(t[y++]=t[f++],c++,u=0,0==--l){d=!0;break}}else if(t[y++]=h[g++],u++,c=0,1==--a){d=!0;break}while((u|c)<x);if(d)break;do{if(0!==(u=i(t[f],h,g,a,0,e))){for(p=0;p<u;p++)t[y+p]=h[g+p];if(y+=u,g+=u,(a-=u)<=1){d=!0;break}}if(t[y++]=t[f++],0==--l){d=!0;break}if(0!==(c=r(h[g],t,f,l,0,e))){for(p=0;p<c;p++)t[y+p]=t[f+p];if(y+=c,f+=c,0==(l-=c)){d=!0;break}}if(t[y++]=h[g++],1==--a){d=!0;break}x--}while(u>=7||c>=7);if(d)break;x<0&&(x=0),x+=2}if((s=x)<1&&(s=1),1===a){for(p=0;p<l;p++)t[y+p]=t[f+p];t[y+l]=h[g]}else if(0===a)throw Error();else for(p=0;p<a;p++)t[y+p]=h[g+p]}(u,c,d,p):function(n,a,o,l){var u=0;for(u=0;u<l;u++)h[u]=t[o+u];var c=n+a-1,d=l-1,p=o+l-1,g=0,f=0;if(t[p--]=t[c--],0==--a){for(u=0,g=p-(l-1);u<l;u++)t[g+u]=h[u];return}if(1===l){for(p-=a,c-=a,f=p+1,g=c+1,u=a-1;u>=0;u--)t[f+u]=t[g+u];t[p]=h[d];return}for(var y=s;;){var x=0,m=0,v=!1;do if(0>e(h[d],t[c])){if(t[p--]=t[c--],x++,m=0,0==--a){v=!0;break}}else if(t[p--]=h[d--],m++,x=0,1==--l){v=!0;break}while((x|m)<y);if(v)break;do{if(0!=(x=a-i(h[d],t,n,a,a-1,e))){for(p-=x,c-=x,a-=x,f=p+1,g=c+1,u=x-1;u>=0;u--)t[f+u]=t[g+u];if(0===a){v=!0;break}}if(t[p--]=h[d--],1==--l){v=!0;break}if(0!=(m=l-r(t[c],h,0,l,l-1,e))){for(p-=m,d-=m,l-=m,f=p+1,g=d+1,u=0;u<m;u++)t[f+u]=h[g+u];if(l<=1){v=!0;break}}if(t[p--]=t[c--],0==--a){v=!0;break}y--}while(x>=7||m>=7);if(v)break;y<0&&(y=0),y+=2}if((s=y)<1&&(s=1),1===l){for(p-=a,c-=a,f=p+1,g=c+1,u=a-1;u>=0;u--)t[f+u]=t[g+u];t[p]=h[d]}else if(0===l)throw Error();else for(u=0,g=p-(l-1);u<l;u++)t[g+u]=h[u]}(u,c,d,p))}n=[],a=[],this.mergeRuns=function(){for(;l>1;){var t=l-2;if(t>=1&&a[t-1]<=a[t]+a[t+1]||t>=2&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;u(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&a[t-1]<a[t+1]&&t--,u(t)}},this.pushRun=function(t,e){n[l]=t,a[l]=e,l+=1}}t.exports=function(t,r,i,s){i||(i=0),s||(s=t.length);var o=s-i;if(!(o<2)){var l=0;if(o<32){l=e(t,i,s,r),n(t,i,s,i+l,r);return}var h=new a(t,r),u=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(o);do{if((l=e(t,i,s,r))<u){var c=o;c>u&&(c=u),n(t,i,i+c,i+l,r),l=c}h.pushRun(i,l),h.mergeRuns(),o-=l,i+=l}while(0!==o);h.forceMergeRuns()}}},66023:function(t,e){var n,r={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},i={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},a=Object.prototype.toString,s=Array.prototype,o=s.forEach,l=s.filter,h=s.slice,u=s.map,c=s.reduce,d={};function p(t){if(null==t||"object"!=typeof t)return t;var e=t,n=a.call(t);if("[object Array]"===n){if(!t[_]){e=[];for(var s=0,o=t.length;s<o;s++)e[s]=p(t[s])}}else if(i[n]){if(!t[_]){var l=t.constructor;if(t.constructor.from)e=l.from(t);else{e=new l(t.length);for(var s=0,o=t.length;s<o;s++)e[s]=p(t[s])}}}else if(!r[n]&&!t[_]&&!M(t))for(var h in e={},t)t.hasOwnProperty(h)&&(e[h]=p(t[h]));return e}function g(t,e,n){if(!b(e)||!b(t))return n?p(e):t;for(var r in e)if(e.hasOwnProperty(r)){var i=t[r],a=e[r];!(b(a)&&b(i))||v(a)||v(i)||M(a)||M(i)||w(a)||w(i)||a[_]||i[_]?!n&&r in t||(t[r]=p(e[r],!0)):g(i,a,n)}return t}function f(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r]);return t}var y=function(){return d.createCanvas()};function x(t,e,n){if(t&&e)if(t.forEach&&t.forEach===o)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function m(t,e){var n=h.call(arguments,2);return function(){return t.apply(e,n.concat(h.call(arguments)))}}function v(t){return"[object Array]"===a.call(t)}function b(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function w(t){return!!r[a.call(t)]}function M(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}d.createCanvas=function(){return document.createElement("canvas")};var _="__ec_primitive__";function A(t){var e=v(t);this.data={};var n=this;function r(t,r){e?n.set(t,r):n.set(r,t)}t instanceof A?t.each(r):t&&x(t,r)}A.prototype={constructor:A,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=m(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}},e.$override=function(t,e){"createCanvas"===t&&(n=null),d[t]=e},e.clone=p,e.merge=g,e.mergeAll=function(t,e){for(var n=t[0],r=1,i=t.length;r<i;r++)n=g(n,t[r],e);return n},e.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},e.defaults=f,e.createCanvas=y,e.getContext=function(){return n||(n=y().getContext("2d")),n},e.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n}return -1},e.inherits=function(t,e){var n=t.prototype;function r(){}for(var i in r.prototype=e.prototype,t.prototype=new r,n)t.prototype[i]=n[i];t.prototype.constructor=t,t.superClass=e},e.mixin=function(t,e,n){f(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)},e.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},e.each=x,e.map=function(t,e,n){if(t&&e)if(t.map&&t.map===u)return t.map(e,n);else{for(var r=[],i=0,a=t.length;i<a;i++)r.push(e.call(n,t[i],i,t));return r}},e.reduce=function(t,e,n,r){if(t&&e)if(t.reduce&&t.reduce===c)return t.reduce(e,n,r);else{for(var i=0,a=t.length;i<a;i++)n=e.call(r,n,t[i],i,t);return n}},e.filter=function(t,e,n){if(t&&e)if(t.filter&&t.filter===l)return t.filter(e,n);else{for(var r=[],i=0,a=t.length;i<a;i++)e.call(n,t[i],i,t)&&r.push(t[i]);return r}},e.find=function(t,e,n){if(t&&e){for(var r=0,i=t.length;r<i;r++)if(e.call(n,t[r],r,t))return t[r]}},e.bind=m,e.curry=function(t){var e=h.call(arguments,1);return function(){return t.apply(this,e.concat(h.call(arguments)))}},e.isArray=v,e.isFunction=function(t){return"function"==typeof t},e.isString=function(t){return"[object String]"===a.call(t)},e.isObject=b,e.isBuiltInObject=w,e.isTypedArray=function(t){return!!i[a.call(t)]},e.isDom=M,e.eqNaN=function(t){return t!=t},e.retrieve=function(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]},e.retrieve2=function(t,e){return null!=t?t:e},e.retrieve3=function(t,e,n){return null!=t?t:null!=e?e:n},e.slice=function(){return Function.call.apply(h,arguments)},e.normalizeCssArray=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},e.assert=function(t,e){if(!t)throw Error(e)},e.trim=function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},e.setAsPrimitive=function(t){t[_]=!0},e.isPrimitive=function(t){return t[_]},e.createHashMap=function(t){return new A(t)},e.concatArray=function(t,e){for(var n=new t.constructor(t.length+e.length),r=0;r<t.length;r++)n[r]=t[r];var i=t.length;for(r=0;r<e.length;r++)n[r+i]=e[r];return n},e.noop=function(){}},3265:function(t,e){var n="undefined"==typeof Float32Array?Array:Float32Array;function r(t){return Math.sqrt(i(t))}function i(t){return t[0]*t[0]+t[1]*t[1]}function a(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function s(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}e.create=function(t,e){var r=new n(2);return null==t&&(t=0),null==e&&(e=0),r[0]=t,r[1]=e,r},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new n(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},e.sub=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},e.len=r,e.length=r,e.lenSquare=i,e.lengthSquare=i,e.mul=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},e.div=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.normalize=function(t,e){var n=r(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t},e.distance=a,e.dist=a,e.distanceSquare=s,e.distSquare=s,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t},e.applyTransform=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},98158:function(t,e,n){var r=n(3006),i=r.addEventListener,a=r.removeEventListener,s=r.normalizeEvent,o=n(66023),l=n(56177),h=n(57674),u=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],c=["touchstart","touchend","touchmove"],d={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},p=o.map(u,function(t){var e=t.replace("mouse","pointer");return d[e]?e:t});function g(t){return"mousewheel"===t&&h.browser.firefox?"DOMMouseScroll":t}function f(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var y={mousemove:function(t){t=s(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=s(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=s(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),y.mousemove.call(this,t),y.mousedown.call(this,t),f(this)},touchmove:function(t){(t=s(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),y.mousemove.call(this,t),f(this)},touchend:function(t){(t=s(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),y.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&y.click.call(this,t),f(this)},pointerdown:function(t){y.mousedown.call(this,t)},pointermove:function(t){x(t)||y.mousemove.call(this,t)},pointerup:function(t){y.mouseup.call(this,t)},pointerout:function(t){x(t)||y.mouseout.call(this,t)}};function x(t){var e=t.pointerType;return"pen"===e||"touch"===e}function m(t){var e;function n(e,n){o.each(e,function(e){i(t,g(e),n._handlers[e])},n)}l.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},e=this,o.each(c,function(t){e._handlers[t]=o.bind(y[t],e)}),o.each(p,function(t){e._handlers[t]=o.bind(y[t],e)}),o.each(u,function(t){var n,r;e._handlers[t]=(n=y[t],r=e,function(){if(!r._touching)return n.apply(r,arguments)})}),h.pointerEventsSupported?n(p,this):(h.touchEventsSupported&&n(c,this),n(u,this))}o.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){y[t]=function(e){e=s(this.dom,e),this.trigger(t,e)}});var v=m.prototype;v.dispose=function(){for(var t=u.concat(c),e=0;e<t.length;e++){var n=t[e];a(this.dom,g(n),this._handlers[n])}},v.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},o.mixin(m,l),t.exports=m},93549:function(t,e,n){var r=n(87205);t.exports=r.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var n=e.paths||[],r=0;r<n.length;r++)n[r].buildPath(t,n[r].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),r.prototype.getBoundingRect.call(this)}})},85553:function(t,e,n){var r=n(66023),i=n(77157),a=n(50329),s=n(29695);function o(t){for(var e in t=t||{},a.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new i(t.style,this),this._rect=null,this.__clipPaths=[]}o.prototype={constructor:o,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?a.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new i(t,this),this.dirty(!1),this}},r.inherits(o,a),r.mixin(o,s),t.exports=o},47580:function(t){var e=function(t){this.colorStops=t||[]};e.prototype={constructor:e,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},t.exports=e},52728:function(t,e,n){var r=n(85553),i=n(71497),a=n(66023),s=n(21715);function o(t){r.call(this,t)}o.prototype={constructor:o,type:"image",brush:function(t,e){var n=this.style,r=n.image;n.bind(t,this,e);var i=this._image=s.createOrUpdateImage(r,this._image,this,this.onload);if(i&&s.isImageReady(i)){var a=n.x||0,o=n.y||0,l=n.width,h=n.height,u=i.width/i.height;if(null==l&&null!=h?l=h*u:null==h&&null!=l?h=l/u:null==l&&null==h&&(l=i.width,h=i.height),this.setTransform(t),n.sWidth&&n.sHeight){var c=n.sx||0,d=n.sy||0;t.drawImage(i,c,d,n.sWidth,n.sHeight,a,o,l,h)}else if(n.sx&&n.sy){var c=n.sx,d=n.sy,p=l-c,g=h-d;t.drawImage(i,c,d,p,g,a,o,l,h)}else t.drawImage(i,a,o,l,h);null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new i(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},a.inherits(o,r),t.exports=o},55117:function(t,e,n){var r=n(66023).inherits,i=n(85553),a=n(71497);function s(t){i.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}s.prototype.incremental=!0,s.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},s.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},s.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},s.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},s.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var e=this._displayables[t];e.parent=this,e.update(),e.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},s.prototype.brush=function(t,e){for(var n=this._cursor;n<this._displayables.length;n++){var r=this._displayables[n];r.beforeBrush&&r.beforeBrush(t),r.brush(t,n===this._cursor?null:this._displayables[n-1]),r.afterBrush&&r.afterBrush(t)}this._cursor=n;for(var n=0;n<this._temporaryDisplayables.length;n++){var r=this._temporaryDisplayables[n];r.beforeBrush&&r.beforeBrush(t),r.brush(t,0===n?null:this._temporaryDisplayables[n-1]),r.afterBrush&&r.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var o=[];s.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new a(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(o)),t.union(r)}this._rect=t}return this._rect},s.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,e))return!0}return!1},r(s,i),t.exports=s},53429:function(t,e,n){var r=n(66023),i=n(47580),a=function(t,e,n,r,a,s){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==r?0:r,this.type="linear",this.global=s||!1,i.call(this,a)};a.prototype={constructor:a},r.inherits(a,i),t.exports=a},87205:function(t,e,n){var r=n(85553),i=n(66023),a=n(12057),s=n(83212),o=n(51501).prototype.getCanvasPattern,l=Math.abs,h=new a(!0);function u(t){r.call(this,t),this.path=null}u.prototype={constructor:u,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var n,r=this.style,i=this.path||h,a=r.hasStroke(),s=r.hasFill(),l=r.fill,u=r.stroke,c=s&&!!l.colorStops,d=a&&!!u.colorStops,p=s&&!!l.image,g=a&&!!u.image;r.bind(t,this,e),this.setTransform(t),this.__dirty&&(c&&(n=n||this.getBoundingRect(),this._fillGradient=r.getGradient(t,l,n)),d&&(n=n||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,u,n))),c?t.fillStyle=this._fillGradient:p&&(t.fillStyle=o.call(l,t)),d?t.strokeStyle=this._strokeGradient:g&&(t.strokeStyle=o.call(u,t));var f=r.lineDash,y=r.lineDashOffset,x=!!t.setLineDash,m=this.getGlobalScale();if(i.setScale(m[0],m[1]),this.__dirtyPath||f&&!x&&a?(i.beginPath(t),f&&!x&&(i.setLineDash(f),i.setLineDashOffset(y)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),s)if(null!=r.fillOpacity){var v=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,i.fill(t),t.globalAlpha=v}else i.fill(t);if(f&&x&&(t.setLineDash(f),t.lineDashOffset=y),a)if(null!=r.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,i.stroke(t),t.globalAlpha=v}else i.stroke(t);f&&x&&t.setLineDash([]),null!=r.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new a},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var r=this.path;r||(r=this.path=new a),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){i.copy(t);var s=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(s=Math.max(s,this.strokeContainThreshold||4)),o>1e-10&&(i.width+=s/o,i.height+=s/o,i.x-=s/o/2,i.y-=s/o/2)}return i}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),i=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var a=this.path.data;if(i.hasStroke()){var o=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(i.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(i.isObject(t))for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&l(t[0]-1)>1e-10&&l(t[3]-1)>1e-10?Math.sqrt(l(t[0]*t[3]-t[2]*t[1])):1}},u.extend=function(t){var e=function(e){u.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var r=this.shape;for(var i in n)!r.hasOwnProperty(i)&&n.hasOwnProperty(i)&&(r[i]=n[i])}t.init&&t.init.call(this,e)};for(var n in i.inherits(e,u),t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},i.inherits(u,r),t.exports=u},51501:function(t){var e=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};e.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")},t.exports=e},6963:function(t,e,n){var r=n(66023),i=n(47580),a=function(t,e,n,r,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,i.call(this,r)};a.prototype={constructor:a},r.inherits(a,i),t.exports=a},77157:function(t,e,n){var r=n(34793),i=n(11677).ContextCachedBy,a=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],s=function(t){this.extendFrom(t,!1)};s.prototype={constructor:s,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var s=n&&n.style,o=!s||t.__attrCachedBy!==i.STYLE_BIND;t.__attrCachedBy=i.STYLE_BIND;for(var l=0;l<a.length;l++){var h=a[l],u=h[0];(o||this[u]!==s[u])&&(t[u]=r(t,u,this[u]||h[1]))}(o||this.fill!==s.fill)&&(t.fillStyle=this.fill),(o||this.stroke!==s.stroke)&&(t.strokeStyle=this.stroke),(o||this.opacity!==s.opacity)&&(t.globalAlpha=null==this.opacity?1:this.opacity),(o||this.blend!==s.blend)&&(t.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()&&(t.lineWidth=this.lineWidth/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1))},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var n in t)t.hasOwnProperty(n)&&(!0===e||(!1===e?!this.hasOwnProperty(n):null!=t[n]))&&(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var r=("radial"===e.type?function(t,e,n){var r=n.width,i=n.height,a=Math.min(r,i),s=null==e.x?.5:e.x,o=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(s=s*r+n.x,o=o*i+n.y,l*=a),t.createRadialGradient(s,o,0,s,o,l)}:function(t,e,n){var r=null==e.x?0:e.x,i=null==e.x2?1:e.x2,a=null==e.y?0:e.y,s=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,s=s*n.height+n.y),r=isNaN(r)?0:r,i=isNaN(i)?1:i,a=isNaN(a)?0:a,s=isNaN(s)?0:s,t.createLinearGradient(r,a,i,s)})(t,e,n),i=e.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}};for(var o=s.prototype,l=0;l<a.length;l++){var h=a[l];h[0]in o||(o[h[0]]=h[1])}s.getGradient=o.getGradient,t.exports=s},77894:function(t,e,n){var r=n(85553),i=n(66023),a=n(99280),s=n(93258),o=n(11677).ContextCachedBy,l=function(t){r.call(this,t)};l.prototype={constructor:l,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&s.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var r=n.text;if(null!=r&&(r+=""),!s.needDrawText(r,n)){t.__attrCachedBy=o.NONE;return}this.setTransform(t),s.renderText(this,t,r,n,null,e),this.restoreTransform(t)},getBoundingRect:function(){var t=this.style;if(this.__dirty&&s.normalizeTextStyle(t,!0),!this._rect){var e=t.text;null!=e?e+="":e="";var n=a.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(n.x+=t.x||0,n.y+=t.y||0,s.getStroke(t.textStroke,t.textStrokeWidth)){var r=t.textStrokeWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect}},i.inherits(l,r),t.exports=l},11677:function(t,e){e.ContextCachedBy={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},e.WILL_BE_RESTORED=9},13065:function(t,e,n){var r=n(57674),i=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];t.exports=function(t){return r.browser.ie&&r.browser.version>=11?function(){var e,n=this.__clipPaths,r=this.style;if(n)for(var a=0;a<n.length;a++){var s=n[a],o=s&&s.shape,l=s&&s.type;if(o&&("sector"===l&&o.startAngle===o.endAngle||"rect"===l&&(!o.width||!o.height))){for(var h=0;h<i.length;h++)i[h][2]=r[i[h][0]],r[i[h][0]]=i[h][1];e=!0;break}}if(t.apply(this,arguments),e)for(var h=0;h<i.length;h++)r[i[h][0]]=i[h][2]}:t}},34793:function(t){var e={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};t.exports=function(t,n,r){return e.hasOwnProperty(n)?r*t.dpr:r}},21715:function(t,e,n){var r=new(n(4186))(50);function i(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function a(t){return t&&t.width&&t.height}e.findExistImage=function(t){if("string"!=typeof t)return t;var e=r.get(t);return e&&e.image},e.createOrUpdateImage=function(t,e,n,s,o){if(!t)return e;if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var l=r.get(t),h={hostEl:n,cb:s,cbPayload:o};return l?a(e=l.image)||l.pending.push(h):((e=new Image).onload=e.onerror=i,r.put(t,e.__cachedImgObj={image:e,pending:[h]}),e.src=e.__zrImageSrc=t),e},e.isImageReady=a},30846:function(t,e,n){var r=n(73586),i=n(47073);e.buildPath=function(t,e,n){var a=e.points,s=e.smooth;if(a&&a.length>=2){if(s&&"spline"!==s){var o=i(a,s,n,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;h<(n?l:l-1);h++){var u=o[2*h],c=o[2*h+1],d=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],d[0],d[1])}}else{"spline"===s&&(a=r(a,n)),t.moveTo(a[0][0],a[0][1]);for(var h=1,p=a.length;h<p;h++)t.lineTo(a[h][0],a[h][1])}n&&t.closePath()}}},39094:function(t,e){e.buildPath=function(t,e){var n,r,i,a,s,o=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(o+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?n=r=i=a=c:c instanceof Array?1===c.length?n=r=i=a=c[0]:2===c.length?(n=i=c[0],r=a=c[1]):3===c.length?(n=c[0],r=a=c[1],i=c[2]):(n=c[0],r=c[1],i=c[2],a=c[3]):n=r=i=a=0,n+r>h&&(s=n+r,n*=h/s,r*=h/s),i+a>h&&(s=i+a,i*=h/s,a*=h/s),r+i>u&&(s=r+i,r*=u/s,i*=u/s),n+a>u&&(s=n+a,n*=u/s,a*=u/s),t.moveTo(o+n,l),t.lineTo(o+h-r,l),0!==r&&t.arc(o+h-r,l+r,r,-Math.PI/2,0),t.lineTo(o+h,l+u-i),0!==i&&t.arc(o+h-i,l+u-i,i,0,Math.PI/2),t.lineTo(o+a,l+u),0!==a&&t.arc(o+a,l+u-a,a,Math.PI/2,Math.PI),t.lineTo(o,l+n),0!==n&&t.arc(o+n,l+n,n,Math.PI,1.5*Math.PI)}},47073:function(t,e,n){var r=n(3265),i=r.min,a=r.max,s=r.scale,o=r.distance,l=r.add,h=r.clone,u=r.sub;t.exports=function(t,e,n,r){var c,d,p,g,f=[],y=[],x=[],m=[];if(r){p=[1/0,1/0],g=[-1/0,-1/0];for(var v=0,b=t.length;v<b;v++)i(p,p,t[v]),a(g,g,t[v]);i(p,p,r[0]),a(g,g,r[1])}for(var v=0,b=t.length;v<b;v++){var w=t[v];if(n)c=t[v?v-1:b-1],d=t[(v+1)%b];else if(0===v||v===b-1){f.push(h(t[v]));continue}else c=t[v-1],d=t[v+1];u(y,d,c),s(y,y,e);var M=o(w,c),_=o(w,d),A=M+_;0!==A&&(M/=A,_/=A),s(x,y,-M),s(m,y,_);var S=l([],w,x),C=l([],w,m);r&&(a(S,S,p),i(S,S,g),a(C,C,p),i(C,C,g)),f.push(S),f.push(C)}return n&&f.push(f.shift()),f}},73586:function(t,e,n){var r=n(3265).distance;function i(t,e,n,r,i,a,s){var o=(n-t)*.5,l=(r-e)*.5;return(2*(e-n)+o+l)*s+(-3*(e-n)-2*o-l)*a+o*i+e}t.exports=function(t,e){for(var n=t.length,a=[],s=0,o=1;o<n;o++)s+=r(t[o-1],t[o]);var l=s/2;l=l<n?n:l;for(var o=0;o<l;o++){var h,u,c,d=o/(l-1)*(e?n:n-1),p=Math.floor(d),g=d-p,f=t[p%n];e?(h=t[(p-1+n)%n],u=t[(p+1)%n],c=t[(p+2)%n]):(h=t[0===p?p:p-1],u=t[p>n-2?n-1:p+1],c=t[p>n-3?n-1:p+2]);var y=g*g,x=g*y;a.push([i(h[0],f[0],u[0],c[0],g,y,x),i(h[1],f[1],u[1],c[1],g,y,x)])}return a}},39950:function(t,e){var n=Math.round;function r(t,e,r){var i=n(2*t);return(i+n(e))%2==0?i/2:(i+(r?1:-1))/2}e.subPixelOptimizeLine=function(t,e,i){var a=i&&i.lineWidth;if(e&&a){var s=e.x1,o=e.x2,l=e.y1,h=e.y2;n(2*s)===n(2*o)?t.x1=t.x2=r(s,a,!0):(t.x1=s,t.x2=o),n(2*l)===n(2*h)?t.y1=t.y2=r(l,a,!0):(t.y1=l,t.y2=h)}},e.subPixelOptimizeRect=function(t,e,n){var i=n&&n.lineWidth;if(e&&i){var a=e.x,s=e.y,o=e.width,l=e.height;t.x=r(a,i,!0),t.y=r(s,i,!0),t.width=Math.max(r(a+o,i,!1)-t.x,+(0!==o)),t.height=Math.max(r(s+l,i,!1)-t.y,+(0!==l))}},e.subPixelOptimize=r},93258:function(t,e,n){var r=n(66023),i=r.retrieve2,a=r.retrieve3,s=r.each,o=r.normalizeCssArray,l=r.isString,h=r.isObject,u=n(99280),c=n(39094),d=n(21715),p=n(34793),g=n(11677),f=g.ContextCachedBy,y=g.WILL_BE_RESTORED,x=u.DEFAULT_FONT,m={left:1,right:1,center:1},v={top:1,bottom:1,middle:1},b=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function w(t){if(t){t.font=u.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||m[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||v[n]?n:"top",t.textPadding&&(t.textPadding=o(t.textPadding))}}function M(t,e,n,r,i){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(r=n.width/2+n.x,i=n.height/2+n.y):a&&(r=a[0]+n.x,i=a[1]+n.y),t.translate(r,i),t.rotate(-e.textRotation),t.translate(-r,-i)}}function _(t,e,n,r,s,o,l,h){var u=r.rich[n.styleName]||{};u.text=n.text;var c=n.textVerticalAlign,d=o+s/2;"top"===c?d=o+n.height/2:"bottom"===c&&(d=o+s-n.height/2),!n.isLineHolder&&A(u)&&S(t,e,u,"right"===h?l-n.width:"center"===h?l-n.width/2:l,d-n.height/2,n.width,n.height);var p=n.textPadding;p&&(l=D(l,h,p),d-=n.height/2-p[2]-n.textHeight/2),P(e,"shadowBlur",a(u.textShadowBlur,r.textShadowBlur,0)),P(e,"shadowColor",u.textShadowColor||r.textShadowColor||"transparent"),P(e,"shadowOffsetX",a(u.textShadowOffsetX,r.textShadowOffsetX,0)),P(e,"shadowOffsetY",a(u.textShadowOffsetY,r.textShadowOffsetY,0)),P(e,"textAlign",h),P(e,"textBaseline","middle"),P(e,"font",n.font||x);var g=T(u.textStroke||r.textStroke,y),f=k(u.textFill||r.textFill),y=i(u.textStrokeWidth,r.textStrokeWidth);g&&(P(e,"lineWidth",y),P(e,"strokeStyle",g),e.strokeText(n.text,l,d)),f&&(P(e,"fillStyle",f),e.fillText(n.text,l,d))}function A(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function S(t,e,n,r,i,a,s){var o=n.textBackgroundColor,u=n.textBorderWidth,p=n.textBorderColor,g=l(o);if(P(e,"shadowBlur",n.textBoxShadowBlur||0),P(e,"shadowColor",n.textBoxShadowColor||"transparent"),P(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),P(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),g||u&&p){e.beginPath();var f=n.textBorderRadius;f?c.buildPath(e,{x:r,y:i,width:a,height:s,r:f}):e.rect(r,i,a,s),e.closePath()}if(g)if(P(e,"fillStyle",o),null!=n.fillOpacity){var y=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=y}else e.fill();else if(h(o)){var x=o.image;(x=d.createOrUpdateImage(x,null,t,C,o))&&d.isImageReady(x)&&e.drawImage(x,r,i,a,s)}if(u&&p)if(P(e,"lineWidth",u),P(e,"strokeStyle",p),null!=n.strokeOpacity){var y=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=y}else e.stroke()}function C(t,e){e.image=t}function I(t,e,n){var r=e.x||0,i=e.y||0,a=e.textAlign,s=e.textVerticalAlign;if(n){var o=e.textPosition;if(o instanceof Array)r=n.x+L(o[0],n.width),i=n.y+L(o[1],n.height);else{var l=u.adjustTextPositionOnRect(o,n,e.textDistance);r=l.x,i=l.y,a=a||l.textAlign,s=s||l.textVerticalAlign}var h=e.textOffset;h&&(r+=h[0],i+=h[1])}return{baseX:r,baseY:i,textAlign:a,textVerticalAlign:s}}function P(t,e,n){return t[e]=p(t,e,n),t[e]}function T(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function k(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function L(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function D(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}e.normalizeTextStyle=function(t){return w(t),s(t.rich,w),t},e.renderText=function(t,e,n,r,i,a){var s,o,l,h,c,d;r.rich?(s=t,o=e,l=n,h=r,c=i,a!==y&&(o.__attrCachedBy=f.NONE),(d=s.__textCotentBlock)&&!s.__dirtyText||(d=s.__textCotentBlock=u.parseRichText(l,h)),function(t,e,n,r,i){var a=n.width,s=n.outerWidth,o=n.outerHeight,l=r.textPadding,h=I(o,r,i),c=h.baseX,d=h.baseY,p=h.textAlign,g=h.textVerticalAlign;M(e,r,i,c,d);var f=u.adjustTextX(c,s,p),y=u.adjustTextY(d,o,g),x=f,m=y;l&&(x+=l[3],m+=l[0]);var v=x+a;A(r)&&S(t,e,r,f,y,s,o);for(var b=0;b<n.lines.length;b++){for(var w,C=n.lines[b],P=C.tokens,T=P.length,k=C.lineHeight,L=C.width,D=0,R=x,N=v,O=T-1;D<T&&(!(w=P[D]).textAlign||"left"===w.textAlign);)_(t,e,w,r,k,m,R,"left"),L-=w.width,R+=w.width,D++;for(;O>=0&&"right"===(w=P[O]).textAlign;)_(t,e,w,r,k,m,N,"right"),L-=w.width,N-=w.width,O--;for(R+=(a-(R-x)-(v-N)-L)/2;D<=O;)_(t,e,w=P[D],r,k,m,R+w.width/2,"center"),R+=w.width,D++;m+=k}}(s,o,d,h,c)):function(t,e,n,r,i,a){"use strict";var s,o=A(r),l=!1,h=e.__attrCachedBy===f.PLAIN_TEXT;a!==y?(a&&(s=a.style,l=!o&&h&&s),e.__attrCachedBy=o?f.NONE:f.PLAIN_TEXT):h&&(e.__attrCachedBy=f.NONE);var c=r.font||x;l&&c===(s.font||x)||(e.font=c);var d=t.__computedFont;t.__styleFont!==c&&(t.__styleFont=c,d=t.__computedFont=e.font);var g=r.textPadding,m=r.textLineHeight,v=t.__textCotentBlock;(!v||t.__dirtyText)&&(v=t.__textCotentBlock=u.parsePlainText(n,d,g,m,r.truncate));var w=v.outerHeight,_=v.lines,C=v.lineHeight,P=I(w,r,i),L=P.baseX,R=P.baseY,N=P.textAlign||"left",O=P.textVerticalAlign;M(e,r,i,L,R);var j=u.adjustTextY(R,w,O),E=L,V=j;if(o||g){var B=u.getWidth(n,d);g&&(B+=g[1]+g[3]);var z=u.adjustTextX(L,B,N);o&&S(t,e,r,z,j,B,w),g&&(E=D(L,N,g),V+=g[0])}e.textAlign=N,e.textBaseline="middle",e.globalAlpha=r.opacity||1;for(var F=0;F<b.length;F++){var G=b[F],H=G[0],W=G[1],q=r[H];l&&q===s[H]||(e[W]=p(e,W,q||G[2]))}V+=C/2;var U=r.textStrokeWidth,Z=l?s.textStrokeWidth:null,$=!l||U!==Z,J=!l||$||r.textStroke!==s.textStroke,Y=T(r.textStroke,U),X=k(r.textFill);if(Y&&($&&(e.lineWidth=U),J&&(e.strokeStyle=Y)),X&&(!l||r.textFill!==s.textFill)&&(e.fillStyle=X),1===_.length)Y&&e.strokeText(_[0],E,V),X&&e.fillText(_[0],E,V);else for(var F=0;F<_.length;F++)Y&&e.strokeText(_[F],E,V),X&&e.fillText(_[F],E,V),V+=C}(t,e,n,r,i,a)},e.getStroke=T,e.getFill=k,e.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}},29695:function(t,e,n){var r=n(93258),i=n(71497),a=n(11677).WILL_BE_RESTORED,s=new i,o=function(){};o.prototype={constructor:o,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&r.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),r.needDrawText(i,n)){t.save();var o=this.transform;n.transformText?this.setTransform(t):o&&(s.copy(e),s.applyTransform(o),e=s),r.renderText(this,t,i,n,e,a),t.restore()}}},t.exports=o},26072:function(t,e,n){t.exports=n(87205).extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,o=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*i+n,h*i+r),t.arc(n,r,i,a,s,!o)}})},27209:function(t,e,n){var r=n(87205),i=n(3265),a=n(30783),s=a.quadraticSubdivide,o=a.cubicSubdivide,l=a.quadraticAt,h=a.cubicAt,u=a.quadraticDerivativeAt,c=a.cubicDerivativeAt,d=[];function p(t,e,n){var r=t.cpx2,i=t.cpy2;return null===r||null===i?[(n?c:h)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?c:h)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?u:l)(t.x1,t.cpx1,t.x2,e),(n?u:l)(t.y1,t.cpy1,t.y2,e)]}t.exports=r.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,l=e.cpx1,h=e.cpy1,u=e.cpx2,c=e.cpy2,p=e.percent;0!==p&&(t.moveTo(n,r),null==u||null==c?(p<1&&(s(n,l,i,p,d),l=d[1],i=d[2],s(r,h,a,p,d),h=d[1],a=d[2]),t.quadraticCurveTo(l,h,i,a)):(p<1&&(o(n,l,u,i,p,d),l=d[1],u=d[2],i=d[3],o(r,h,c,a,p,d),h=d[1],c=d[2],a=d[3]),t.bezierCurveTo(l,h,u,c,i,a)))},pointAt:function(t){return p(this.shape,t,!1)},tangentAt:function(t){var e=p(this.shape,t,!0);return i.normalize(e,e)}})},38035:function(t,e,n){t.exports=n(87205).extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})},60961:function(t,e,n){t.exports=n(87205).extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=e.rx,a=e.ry,s=.5522848*i,o=.5522848*a;t.moveTo(n-i,r),t.bezierCurveTo(n-i,r-o,n-s,r-a,n,r-a),t.bezierCurveTo(n+s,r-a,n+i,r-o,n+i,r),t.bezierCurveTo(n+i,r+o,n+s,r+a,n,r+a),t.bezierCurveTo(n-s,r+a,n-i,r+o,n-i,r),t.closePath()}})},52949:function(t,e,n){var r=n(87205),i=n(39950).subPixelOptimizeLine,a={};t.exports=r.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){this.subPixelOptimize?(i(a,e,this.style),n=a.x1,r=a.y1,s=a.x2,o=a.y2):(n=e.x1,r=e.y1,s=e.x2,o=e.y2);var n,r,s,o,l=e.percent;0!==l&&(t.moveTo(n,r),l<1&&(s=n*(1-l)+s*l,o=r*(1-l)+o*l),t.lineTo(s,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})},11960:function(t,e,n){var r=n(87205),i=n(30846);t.exports=r.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){i.buildPath(t,e,!0)}})},35243:function(t,e,n){var r=n(87205),i=n(30846);t.exports=r.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){i.buildPath(t,e,!1)}})},54668:function(t,e,n){var r=n(87205),i=n(39094),a=n(39950).subPixelOptimizeRect,s={};t.exports=r.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n,r,o,l;this.subPixelOptimize?(a(s,e,this.style),n=s.x,r=s.y,o=s.width,l=s.height,s.r=e.r,e=s):(n=e.x,r=e.y,o=e.width,l=e.height),e.r?i.buildPath(t,e):t.rect(n,r,o,l),t.closePath()}})},6609:function(t,e,n){t.exports=n(87205).extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,r=e.cy,i=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,i,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,i,!0)}})},10631:function(t,e,n){var r=n(87205),i=n(13065);t.exports=r.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:i(r.prototype.brush),buildPath:function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r0||0,0),a=Math.max(e.r,0),s=e.startAngle,o=e.endAngle,l=e.clockwise,h=Math.cos(s),u=Math.sin(s);t.moveTo(h*i+n,u*i+r),t.lineTo(h*a+n,u*a+r),t.arc(n,r,a,s,o,!l),t.lineTo(Math.cos(o)*i+n,Math.sin(o)*i+r),0!==i&&t.arc(n,r,i,o,s,l),t.closePath()}})},54517:function(t,e,n){var r=n(76183),i=n(94627),a=n(66023),s=a.isString,o=a.isFunction,l=a.isObject,h=a.isArrayLike,u=a.indexOf,c=function(){this.animators=[]};function d(t,e,n,r,i,a,u,c){s(r)?(a=i,i=r,r=0):o(i)?(a=i,i="linear",r=0):o(r)?(a=r,r=0):o(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),function t(e,n,r,i,a,s,o){var u={},c=0;for(var d in i)i.hasOwnProperty(d)&&(null!=r[d]?l(i[d])&&!h(i[d])?t(e,n?n+"."+d:d,r[d],i[d],a,s,o):(o?(u[d]=r[d],p(e,n,d,i[d])):u[d]=i[d],c++):null==i[d]||o||p(e,n,d,i[d]));c>0&&e.animate(n,!1).when(null==a?500:a,u).delay(s||0)}(t,"",t,e,n,r,c);var d=t.animators.slice(),g=d.length;function f(){--g||!a||a()}!g&&a&&a();for(var y=0;y<d.length;y++)d[y].done(f).start(i,u)}function p(t,e,n,r){if(e){var i={};i[e]={},i[e][n]=r,t.attr(i)}else t.attr(n,r)}c.prototype={constructor:c,animate:function(t,e){var n,a=!1,s=this,o=this.__zr;if(t){var l=t.split("."),h=s;a="shape"===l[0];for(var c=0,d=l.length;c<d;c++)h&&(h=h[l[c]]);h&&(n=h)}else n=s;if(!n)return void i('Property "'+t+'" is not existed in element '+s.id);var p=s.animators,g=new r(n,e);return g.during(function(t){s.dirty(a)}).done(function(){p.splice(u(p,g),1)}),p.push(g),o&&o.animation.addAnimator(g),g},stopAnimation:function(t){for(var e=this.animators,n=e.length,r=0;r<n;r++)e[r].stop(t);return e.length=0,this},animateTo:function(t,e,n,r,i,a){d(this,t,e,n,r,i,a)},animateFrom:function(t,e,n,r,i,a){d(this,t,e,n,r,i,a,!0)}},t.exports=c},93787:function(t){function e(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function n(t,e){return{target:t,topTarget:e&&e.topTarget}}e.prototype={constructor:e,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(n(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,i=t.offsetY,a=r-this._x,s=i-this._y;this._x=r,this._y=i,e.drift(a,s,t),this.dispatchToElement(n(e,t),"drag",t.event);var o=this.findHover(r,i,e).target,l=this._dropTarget;this._dropTarget=o,e!==o&&(l&&o!==l&&this.dispatchToElement(n(l,t),"dragleave",t.event),o&&o!==l&&this.dispatchToElement(n(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(n(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(n(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},t.exports=e},56177:function(t){var e=Array.prototype.slice,n=function(t){this._$handlers={},this._$eventProcessor=t};function r(t,e,n,r,i,a){var s,o,l=t._$handlers;if("function"==typeof n&&(i=r,r=n,n=null),!r||!e)return t;s=n,o=t._$eventProcessor,null!=s&&o&&o.normalizeQuery&&(s=o.normalizeQuery(s)),n=s,l[e]||(l[e]=[]);for(var h=0;h<l[e].length;h++)if(l[e][h].h===r)return t;var u={h:r,one:a,query:n,ctx:i||t,callAtLast:r.zrEventfulCallAtLast},c=l[e].length-1,d=l[e][c];return d&&d.callAtLast?l[e].splice(c,0,u):l[e].push(u),t}n.prototype={constructor:n,one:function(t,e,n,i){return r(this,t,e,n,i,!0)},on:function(t,e,n,i){return r(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var r=[],i=0,a=n[t].length;i<a;i++)n[t][i].h!==e&&r.push(n[t][i]);n[t]=r}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var n=this._$handlers[t],r=this._$eventProcessor;if(n){var i=arguments,a=i.length;a>3&&(i=e.call(i,1));for(var s=n.length,o=0;o<s;){var l=n[o];if(r&&r.filter&&null!=l.query&&!r.filter(t,l.query)){o++;continue}switch(a){case 1:l.h.call(l.ctx);break;case 2:l.h.call(l.ctx,i[1]);break;case 3:l.h.call(l.ctx,i[1],i[2]);break;default:l.h.apply(l.ctx,i)}l.one?(n.splice(o,1),s--):o++}}return r&&r.afterTrigger&&r.afterTrigger(t),this},triggerWithContext:function(t){var n=this._$handlers[t],r=this._$eventProcessor;if(n){var i=arguments,a=i.length;a>4&&(i=e.call(i,1,i.length-1));for(var s=i[i.length-1],o=n.length,l=0;l<o;){var h=n[l];if(r&&r.filter&&null!=h.query&&!r.filter(t,h.query)){l++;continue}switch(a){case 1:h.h.call(s);break;case 2:h.h.call(s,i[1]);break;case 3:h.h.call(s,i[1],i[2]);break;default:h.h.apply(s,i)}h.one?(n.splice(l,1),o--):l++}}return r&&r.afterTrigger&&r.afterTrigger(t),this}},t.exports=n},53733:function(t,e,n){var r=n(36653),i=n(3265),a=r.identity;function s(t){return t>5e-5||t<-5e-5}var o=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},l=o.prototype;l.transform=null,l.needLocalTransform=function(){return s(this.rotation)||s(this.position[0])||s(this.position[1])||s(this.scale[0]-1)||s(this.scale[1]-1)};var h=[];l.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(!(n||e)){i&&a(i);return}i=i||r.create(),n?this.getLocalTransform(i):a(i),e&&(n?r.mul(i,t.transform,i):r.copy(i,t.transform)),this.transform=i;var s=this.globalScaleRatio;if(null!=s&&1!==s){this.getGlobalScale(h);var o=h[0]<0?-1:1,l=h[1]<0?-1:1,u=((h[0]-o)*s+o)/h[0]||0,c=((h[1]-l)*s+l)/h[1]||0;i[0]*=u,i[1]*=u,i[2]*=c,i[3]*=c}this.invTransform=this.invTransform||r.create(),r.invert(this.invTransform,i)},l.getLocalTransform=function(t){return o.getLocalTransform(this,t)},l.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},l.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var u=[],c=r.create();l.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=this.position,i=this.scale;s(e-1)&&(e=Math.sqrt(e)),s(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),r[0]=t[4],r[1]=t[5],i[0]=e,i[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},l.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(r.mul(u,t.invTransform,e),e=u);var n=this.origin;n&&(n[0]||n[1])&&(c[4]=n[0],c[5]=n[1],r.mul(u,e,c),u[4]-=n[0],u[5]-=n[1],e=u),this.setLocalTransform(e)}},l.getGlobalScale=function(t){var e=this.transform;return(t=t||[],e)?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},l.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&i.applyTransform(n,n,r),n},l.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&i.applyTransform(n,n,r),n},o.getLocalTransform=function(t,e){a(e=e||[]);var n=t.origin,i=t.scale||[1,1],s=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),r.scale(e,e,i),s&&r.rotate(e,e,s),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e},t.exports=o},30516:function(t,e,n){var r=n(9471).createElement,i=n(66023),a=n(94627),s=n(87205),o=n(52728),l=n(77894),h=n(35786),u=n(83115),c=n(61719),d=n(73623),p=n(49875),g=p.path,f=p.image,y=p.text;function x(t){return parseInt(t,10)}function m(t,e){return e&&t&&e.parentNode!==t}function v(t,e,n){if(m(t,e)&&n){var r=n.nextSibling;r?t.insertBefore(e,r):t.appendChild(e)}}function b(t,e){if(m(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function w(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function M(t){return t.__textSvgEl}function _(t){return t.__svgEl}var A=function(t,e,n,a){this.root=t,this.storage=e,this._opts=n=i.extend({},n||{});var s=r("svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("version","1.1"),s.setAttribute("baseProfile","full"),s.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new u(a,s),this.clipPathManager=new c(a,s),this.shadowManager=new d(a,s);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=s,this._viewport=o,t.appendChild(o),o.appendChild(s),this.resize(n.width,n.height),this._visibleList=[]};A.prototype={constructor:A,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n,r=this._svgRoot,i=this._visibleList,a=t.length,u=[];for(e=0;e<a;e++){var c,d=t[e],p=(c=d)instanceof s?g:c instanceof o?f:c instanceof l?y:g,x=_(d)||M(d);d.invisible||(d.__dirty&&(p&&p.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke),this.shadowManager.update(x,d)),d.__dirty=!1),u.push(d))}var m=h(i,u);for(e=0;e<m.length;e++){var A=m[e];if(A.removed)for(var S=0;S<A.count;S++){var d=i[A.indices[S]],x=_(d),C=M(d);w(r,x),w(r,C)}}for(e=0;e<m.length;e++){var A=m[e];if(A.added)for(var S=0;S<A.count;S++){var d=u[A.indices[S]],x=_(d),C=M(d);n?v(r,x,n):b(r,x),x?v(r,C,x):n?v(r,C,n):b(r,C),v(r,C,x),n=C||x||n,this.gradientManager.addWithoutUpdate(x,d),this.shadowManager.addWithoutUpdate(n,d),this.clipPathManager.markUsed(d)}else if(!A.removed)for(var S=0;S<A.count;S++){var d=u[A.indices[S]];n=x=M(d)||_(d)||n,this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(x,d),this.shadowManager.markUsed(d),this.shadowManager.addWithoutUpdate(x,d),this.clipPathManager.markUsed(d)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=u},_getDefs:function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");if(0!==n.length)return n[0];if(!t)return null;var n=e.insertBefore(r("defs"),e.firstChild);return n.contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),n},resize:function(t,e){var n=this._viewport;n.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=n.style;i.width=t+"px",i.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],r=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var s=this.root,o=document.defaultView.getComputedStyle(s);return(s[r]||x(o[n])||x(s.style[n]))-(x(o[i])||0)-(x(o[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},i.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){A.prototype[t]=function(){a('In SVG mode painter not support method "'+t+'"')}}),t.exports=A},9471:function(t,e){e.createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},49875:function(t,e,n){var r=n(9471).createElement,i=n(12057),a=n(71497),s=n(36653),o=n(99280),l=n(93258),h=n(77894),u=i.CMD,c=Array.prototype.join,d="none",p=Math.round,g=Math.sin,f=Math.cos,y=Math.PI,x=2*Math.PI,m=180/y;function v(t){return p(1e4*t)/1e4}function b(t){return t<1e-4&&t>-1e-4}function w(t,e){e&&M(t,"transform","matrix("+c.call(e,",")+")")}function M(t,e,n){n&&("linear"===n.type||"radial"===n.type)||t.setAttribute(e,n)}function _(t,e,n,r){if(null!=(i=n?e.textFill:e.fill)&&i!==d){var i,a,s=n?e.textFill:e.fill;s="transparent"===s?d:s,"none"!==t.getAttribute("clip-path")&&s===d&&(s="rgba(0, 0, 0, 0.002)"),M(t,"fill",s),M(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else M(t,"fill",d);if(null!=(a=n?e.textStroke:e.stroke)&&a!==d){var o=n?e.textStroke:e.stroke;M(t,"stroke",o="transparent"===o?d:o),M(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?r.getLineScale():1)),M(t,"paint-order",n?"stroke":"fill"),M(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(M(t,"stroke-dasharray",e.lineDash.join(",")),M(t,"stroke-dashoffset",p(e.lineDashOffset||0))):M(t,"stroke-dasharray",""),e.lineCap&&M(t,"stroke-linecap",e.lineCap),e.lineJoin&&M(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&M(t,"stroke-miterlimit",e.miterLimit)}else M(t,"stroke",d)}var A={};A.brush=function(t){var e=t.style,n=t.__svgEl;n||(t.__svgEl=n=r("path")),t.path||t.createPathProxy();var i=t.path;if(t.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,t.buildPath(i,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],n=t.data,r=t.len(),i=0;i<r;){var a=n[i++],s="",o=0;switch(a){case u.M:s="M",o=2;break;case u.L:s="L",o=2;break;case u.Q:s="Q",o=4;break;case u.C:s="C",o=6;break;case u.A:var l=n[i++],h=n[i++],c=n[i++],d=n[i++],w=n[i++],M=n[i++],_=n[i++],A=n[i++],S=Math.abs(M),C=b(S-x)&&!b(S),I=!1;I=S>=x||!b(S)&&(M>-y&&M<0||M>y)==!!A;var P=v(l+c*f(w)),T=v(h+d*g(w));C&&(M=A?x-1e-4:-x+1e-4,I=!0,9===i&&e.push("M",P,T));var k=v(l+c*f(w+M)),L=v(h+d*g(w+M));e.push("A",v(c),v(d),p(_*m),+I,+A,k,L);break;case u.Z:s="Z";break;case u.R:var k=v(n[i++]),L=v(n[i++]),D=v(n[i++]),R=v(n[i++]);e.push("M",k,L,"L",k+D,L,"L",k+D,L+R,"L",k,L+R,"L",k,L)}s&&e.push(s);for(var N=0;N<o;N++)e.push(v(n[i++]))}return e.join(" ")}(i);0>a.indexOf("NaN")&&M(n,"d",a)}_(n,e,!1,t),w(n,t.transform),null!=e.text&&P(t,t.getBoundingRect())};var S={};S.brush=function(t){var e=t.style,n=e.image;if(n instanceof HTMLImageElement&&(n=n.src),n){var i,a,s=e.x||0,o=e.y||0,l=e.width,h=e.height,u=t.__svgEl;u||(t.__svgEl=u=r("image")),n!==t.__imageSrc&&(i=u,a=n,i.setAttributeNS("http://www.w3.org/1999/xlink","href",a),t.__imageSrc=n),M(u,"width",l),M(u,"height",h),M(u,"x",s),M(u,"y",o),w(u,t.transform),null!=e.text&&P(t,t.getBoundingRect())}};var C={},I=new a,P=function(t,e,n){var i,a,u=t.style;t.__dirty&&l.normalizeTextStyle(u,!0);var c=u.text;if(null!=c){c+="";var d=t.__textSvgEl;d||(t.__textSvgEl=d=r("text"));var p=u.textPosition,g=u.textDistance,f=u.textAlign||"left";"number"==typeof u.fontSize&&(u.fontSize+="px");var y=u.font||[u.fontStyle||"",u.fontWeight||"",u.fontSize||"",u.fontFamily||""].join(" ")||o.DEFAULT_FONT,x=T(u.textVerticalAlign),m=(n=o.getBoundingRect(c,y,f,x,u.textPadding,u.textLineHeight)).lineHeight;if(p instanceof Array)i=e.x+p[0],a=e.y+p[1];else{var v=o.adjustTextPositionOnRect(p,e,g);i=v.x,a=v.y,x=T(v.textVerticalAlign),f=v.textAlign}M(d,"alignment-baseline",x),y&&(d.style.font=y);var b=u.textPadding;if(M(d,"x",i),M(d,"y",a),_(d,u,!0,t),t instanceof h||t.style.transformText)w(d,t.transform);else{if(t.transform)I.copy(e),I.applyTransform(t.transform),e=I;else{var A=t.transformCoordToGlobal(e.x,e.y);e.x=A[0],e.y=A[1],t.transform=s.identity(s.create())}var S=u.textOrigin;"center"===S?(i=n.width/2+i,a=n.height/2+a):S&&(i=S[0]+i,a=S[1]+a);var C=-u.textRotation||0,P=s.create();s.rotate(P,P,C);var A=[t.transform[4],t.transform[5]];s.translate(P,P,A),w(d,P)}var k=c.split("\n"),L=k.length,D=f;"left"===D?(D="start",b&&(i+=b[3])):"right"===D?(D="end",b&&(i-=b[1])):"center"===D&&(D="middle",b&&(i+=(b[3]-b[1])/2));var R=0;if("after-edge"===x?(R=-n.height+m,b&&(R-=b[2])):"middle"===x?(R=(-n.height+m)/2,b&&(a+=(b[0]-b[2])/2)):b&&(R+=b[0]),t.__text!==c||t.__textFont!==y){var N=t.__tspanList||[];t.__tspanList=N;for(var O=0;O<L;O++){var j=N[O];j?j.innerHTML="":(j=N[O]=r("tspan"),d.appendChild(j),M(j,"alignment-baseline",x),M(j,"text-anchor",D)),M(j,"x",i),M(j,"y",a+O*m+R),j.appendChild(document.createTextNode(k[O]))}for(;O<N.length;O++)d.removeChild(N[O]);N.length=L,t.__text=c,t.__textFont=y}else if(t.__tspanList.length)for(var E=t.__tspanList.length,O=0;O<E;++O){var j=t.__tspanList[O];j&&(M(j,"x",i),M(j,"y",a+O*m+R))}}};function T(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}C.drawRectText=P,C.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],P(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},e.path=A,e.image=S,e.text=C},61719:function(t,e,n){var r=n(10206),i=n(66023),a=n(36653);function s(t,e){r.call(this,t,e,"clipPath","__clippath_in_use__")}i.inherits(s,r),s.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},s.prototype.updateDom=function(t,e,n){if(e&&e.length>0){var r,i,s=this.getDefs(!0),o=e[0],l=n?"_textDom":"_dom";o[l]?(i=o[l].getAttribute("id"),r=o[l],s.contains(r)||s.appendChild(r)):(i="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",i),s.appendChild(r),o[l]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);a.mul(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=u}else h.brush(o);var c=this.getSvgElement(o);r.innerHTML="",r.appendChild(c.cloneNode()),t.setAttribute("clip-path","url(#"+i+")"),e.length>1&&this.updateDom(r,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},s.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&i.each(t.__clipPaths,function(t){t._dom&&r.prototype.markUsed.call(e,t._dom),t._textDom&&r.prototype.markUsed.call(e,t._textDom)})},t.exports=s},10206:function(t,e,n){var r=n(9471).createElement,i=n(66023),a=n(87205),s=n(52728),o=n(77894),l=n(49875),h=l.path,u=l.image,c=l.text;function d(t,e,n,r,i){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=r,this._domName=i||"_dom",this.nextId=0}d.prototype.createElement=r,d.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0!==n.length?n[0]:t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),n):null},d.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var r=this.add(t);r&&(t[this._domName]=r)}}},d.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},d.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},d.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return i.each(this._tagNames,function(n){var r=t.getElementsByTagName(n);e=e.concat([].slice.call(r))}),e},d.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;i.each(t,function(t){t[e._markLabel]="0"})},d.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},d.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),n=this;i.each(e,function(e){"1"!==e[n._markLabel]&&t.removeChild(e)})}},d.prototype.getSvgProxy=function(t){return t instanceof a?h:t instanceof s?u:t instanceof o?c:h},d.prototype.getTextSvgElement=function(t){return t.__textSvgEl},d.prototype.getSvgElement=function(t){return t.__svgEl},t.exports=d},83115:function(t,e,n){var r=n(10206),i=n(66023),a=n(94627),s=n(53453);function o(t,e){r.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}i.inherits(o,r),o.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;i.each(["fill","stroke"],function(r){if(e.style[r]&&("linear"===e.style[r].type||"radial"===e.style[r].type)){var i,a=e.style[r],s=n.getDefs(!0);a._dom?(i=a._dom,s.contains(a._dom)||n.addDom(i)):i=n.add(a),n.markUsed(e);var o=i.getAttribute("id");t.setAttribute(r,"url(#"+o+")")}})}},o.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return a("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},o.prototype.update=function(t){var e=this;r.prototype.update.call(this,t,function(){var n=t.type,r=t._dom.tagName;"linear"===n&&"linearGradient"===r||"radial"===n&&"radialGradient"===r?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},o.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void a("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,r=0,i=n.length;r<i;++r){var o=this.createElement("stop");o.setAttribute("offset",100*n[r].offset+"%");var l=n[r].color;if(l.indexOf(!1)){var h=s.parse(l)[3],u=s.toHex(l);o.setAttribute("stop-color","#"+u),o.setAttribute("stop-opacity",h)}else o.setAttribute("stop-color",n[r].color);e.appendChild(o)}t._dom=e},o.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&r.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&r.prototype.markUsed.call(this,e._dom)}},t.exports=o},73623:function(t,e,n){var r=n(10206);function i(t,e){r.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function a(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}n(66023).inherits(i,r),i.prototype.addWithoutUpdate=function(t,e){if(e&&a(e.style)){var n,r=e.style;r._shadowDom?(n=r._shadowDom,this.getDefs(!0).contains(r._shadowDom)||this.addDom(n)):n=this.add(e),this.markUsed(e);var i=n.getAttribute("id");t.style.filter="url(#"+i+")"}},i.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},i.prototype.update=function(t,e){var n=e.style;if(a(n)){var i=this;r.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},i.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},i.prototype.updateDom=function(t,e){var n,r,i,a,s=e.getElementsByTagName("feDropShadow");s=0===s.length?this.createElement("feDropShadow"):s[0];var o=t.style,l=t.scale&&t.scale[0]||1,h=t.scale&&t.scale[1]||1;if(o.shadowBlur||o.shadowOffsetX||o.shadowOffsetY)n=o.shadowOffsetX||0,r=o.shadowOffsetY||0,i=o.shadowBlur,a=o.shadowColor;else{if(!o.textShadowBlur)return void this.removeDom(e,o);n=o.textShadowOffsetX||0,r=o.textShadowOffsetY||0,i=o.textShadowBlur,a=o.textShadowColor}s.setAttribute("dx",n/l),s.setAttribute("dy",r/h),s.setAttribute("flood-color",a);var u=i/2/l,c=i/2/h;s.setAttribute("stdDeviation",u+" "+c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(i/2*200)+"%"),e.setAttribute("height",Math.ceil(i/2*200)+"%"),e.appendChild(s),o._shadowDom=e},i.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&r.prototype.markUsed.call(this,e._shadowDom)},t.exports=i},76955:function(t,e,n){n(49875),(0,n(19206).registerPainter)("svg",n(30516))},53453:function(t,e,n){var r=n(4186),i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function a(t){return(t=Math.round(t))<0?0:t>255?255:t}function s(t){return t<0?0:t>1?1:t}function o(t){return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(t){return t.length&&"%"===t.charAt(t.length-1)?s(parseFloat(t)/100):s(parseFloat(t))}function h(t,e,n){return(n<0?n+=1:n>1&&(n-=1),6*n<1)?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function u(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var d=new r(20),p=null;function g(t,e){p&&c(p,e),p=d.put(t,p||e.slice())}function f(t,e){if(t){e=e||[];var n=d.get(t);if(n)return c(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in i)return c(e,i[r]),g(t,e),e;if("#"===r.charAt(0)){if(4===r.length){var a=parseInt(r.substr(1),16);return a>=0&&a<=4095?(u(e,(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,1),g(t,e),e):void u(e,0,0,0,1)}if(7===r.length){var a=parseInt(r.substr(1),16);return a>=0&&a<=0xffffff?(u(e,(0xff0000&a)>>16,(65280&a)>>8,255&a,1),g(t,e),e):void u(e,0,0,0,1)}return}var s=r.indexOf("("),h=r.indexOf(")");if(-1!==s&&h+1===r.length){var p=r.substr(0,s),f=r.substr(s+1,h-(s+1)).split(","),x=1;switch(p){case"rgba":if(4!==f.length)return void u(e,0,0,0,1);x=l(f.pop());case"rgb":if(3!==f.length)return void u(e,0,0,0,1);return u(e,o(f[0]),o(f[1]),o(f[2]),x),g(t,e),e;case"hsla":if(4!==f.length)return void u(e,0,0,0,1);return f[3]=l(f[3]),y(f,e),g(t,e),e;case"hsl":if(3!==f.length)return void u(e,0,0,0,1);return y(f,e),g(t,e),e;default:return}}u(e,0,0,0,1)}}function y(t,e){var n=(parseFloat(t[0])%360+360)%360/360,r=l(t[1]),i=l(t[2]),s=i<=.5?i*(r+1):i+r-i*r,o=2*i-s;return u(e=e||[],a(255*h(o,s,n+1/3)),a(255*h(o,s,n)),a(255*h(o,s,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var r,i,o,l,h=t*(e.length-1),u=Math.floor(h),c=Math.ceil(h),d=e[u],p=e[c],g=h-u;return n[0]=a((r=d[0],r+(p[0]-r)*g)),n[1]=a((i=d[1],i+(p[1]-i)*g)),n[2]=a((o=d[2],o+(p[2]-o)*g)),n[3]=s((l=d[3],l+(p[3]-l)*g)),n}}function m(t,e,n){if(e&&e.length&&t>=0&&t<=1){var r,i,o,l,h=t*(e.length-1),u=Math.floor(h),c=Math.ceil(h),d=f(e[u]),p=f(e[c]),g=h-u,y=v([a((r=d[0],r+(p[0]-r)*g)),a((i=d[1],i+(p[1]-i)*g)),a((o=d[2],o+(p[2]-o)*g)),s((l=d[3],l+(p[3]-l)*g))],"rgba");return n?{color:y,leftIndex:u,rightIndex:c,value:h}:y}}function v(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(n+=","+t[3]),e+"("+n+")"}}e.parse=f,e.lift=function(t,e){var n=f(t);if(n){for(var r=0;r<3;r++)e<0?n[r]=n[r]*(1-e)|0:n[r]=(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:t[r]<0&&(n[r]=0);return v(n,4===n.length?"rgba":"rgb")}},e.toHex=function(t){var e=f(t);if(e)return(0x1000000+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},e.fastLerp=x,e.fastMapToColor=x,e.lerp=m,e.mapToColor=m,e.modifyHSL=function(t,e,n,r){if(t=f(t)){var i;return t=function(t){if(t){var e,n,r=t[0]/255,i=t[1]/255,a=t[2]/255,s=Math.min(r,i,a),o=Math.max(r,i,a),l=o-s,h=(o+s)/2;if(0===l)e=0,n=0;else{n=h<.5?l/(o+s):l/(2-o-s);var u=((o-r)/6+l/2)/l,c=((o-i)/6+l/2)/l,d=((o-a)/6+l/2)/l;r===o?e=d-c:i===o?e=1/3+u-d:a===o&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,h];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(i=Math.round(i=e))<0?0:i>360?360:i),null!=n&&(t[1]=l(n)),null!=r&&(t[2]=l(r)),v(y(t),"rgba")}},e.modifyAlpha=function(t,e){if((t=f(t))&&null!=e)return t[3]=s(e),v(t,"rgba")},e.stringify=v},42640:function(t,e,n){var r=n(35601),i=n(52728),a=n(77894),s=n(38035),o=n(54668),l=n(60961),h=n(52949),u=n(87205),c=n(11960),d=n(35243),p=n(53429),g=n(77157),f=n(36653),y=n(86022).createFromString,x=n(66023),m=x.isString,v=x.extend,b=x.defaults,w=x.trim,M=x.each,_=/[\s,]+/;function A(t){for(m(t)&&(t=new DOMParser().parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function S(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}S.prototype.parse=function(t,e){e=e||{};var n,i,a=A(t);if(!a)throw Error("Illegal svg");var s=new r;this._root=s;var l=a.getAttribute("viewBox")||"",h=parseFloat(a.getAttribute("width")||e.width),u=parseFloat(a.getAttribute("height")||e.height);isNaN(h)&&(h=null),isNaN(u)&&(u=null),L(a,s,null,!0);for(var c=a.firstChild;c;)this._parseNode(c,s),c=c.nextSibling;if(l){var d=w(l).split(_);d.length>=4&&(n={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(n&&null!=h&&null!=u&&(i=j(n,h,u),!e.ignoreViewBox)){var p=s;(s=new r).add(p),p.scale=i.scale.slice(),p.position=i.position.slice()}return e.ignoreRootClip||null==h||null==u||s.setClipPath(new o({shape:{x:0,y:0,width:h,height:u}})),{root:s,width:h,height:u,viewBoxRect:n,viewBoxTransform:i}},S.prototype._parseNode=function(t,e){var n,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){var i=I[r];if(i){var a=i.call(this,t),s=t.getAttribute("id");s&&(this._defs[s]=a)}}else{var i=C[r];i&&(n=i.call(this,t,e),e.add(n))}for(var o=t.firstChild;o;)1===o.nodeType&&this._parseNode(o,n),3===o.nodeType&&this._isText&&this._parseText(o,n),o=o.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},S.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,r=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(r)}var i=new a({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});P(e,i),L(t,i,this._defs);var s=i.style.fontSize;s&&s<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=s/9,i.scale[1]*=s/9);var o=i.getBoundingRect();return this._textX+=o.width,e.add(i),i};var C={g:function(t,e){var n=new r;return P(e,n),L(t,n,this._defs),n},rect:function(t,e){var n=new o;return P(e,n),L(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new s;return P(e,n),L(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new h;return P(e,n),L(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new l;return P(e,n),L(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=T(n));var r=new c({shape:{points:n||[]}});return P(e,r),L(t,r,this._defs),r},polyline:function(t,e){var n=new u;P(e,n),L(t,n,this._defs);var r=t.getAttribute("points");return r&&(r=T(r)),new d({shape:{points:r||[]}})},image:function(t,e){var n=new i;return P(e,n),L(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,s=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(s);var o=new r;return P(e,o),L(t,o,this._defs),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=t.getAttribute("dx")||0,s=t.getAttribute("dy")||0,o=new r;return P(e,o),L(t,o,this._defs),this._textX+=a,this._textY+=s,o},path:function(t,e){var n=y(t.getAttribute("d")||"");return P(e,n),L(t,n,this._defs),n}},I={lineargradient:function(t){var e=new p(parseInt(t.getAttribute("x1")||0,10),parseInt(t.getAttribute("y1")||0,10),parseInt(t.getAttribute("x2")||10,10),parseInt(t.getAttribute("y2")||0,10));return function(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType){var r=n.getAttribute("offset");r=r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i=n.getAttribute("stop-color")||"#000000";e.addColorStop(r,i)}n=n.nextSibling}}(t,e),e},radialgradient:function(t){}};function P(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),b(e.__inheritedStyle,t.__inheritedStyle))}function T(t){for(var e=w(t).split(_),n=[],r=0;r<e.length;r+=2){var i=parseFloat(e[r]),a=parseFloat(e[r+1]);n.push([i,a])}return n}var k={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function L(t,e,n,r){var i=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){n=n.replace(/,/g," ");var r=null,i=[];n.replace(N,function(t,e,n){i.push(e,n)});for(var a=i.length-1;a>0;a-=2){var s=i[a],o=i[a-1];switch(r=r||f.create(),o){case"translate":s=w(s).split(_),f.translate(r,r,[parseFloat(s[0]),parseFloat(s[1]||0)]);break;case"scale":s=w(s).split(_),f.scale(r,r,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=w(s).split(_),f.rotate(r,r,parseFloat(s[0]));break;case"skew":s=w(s).split(_),console.warn("Skew transform is not supported yet");break;case"matrix":var s=w(s).split(_);r[0]=parseFloat(s[0]),r[1]=parseFloat(s[1]),r[2]=parseFloat(s[2]),r[3]=parseFloat(s[3]),r[4]=parseFloat(s[4]),r[5]=parseFloat(s[5])}}e.setLocalTransform(r)}}(t,e),v(i,function(t){var e,n=t.getAttribute("style"),r={};if(!n)return r;var i={};for(O.lastIndex=0;null!=(e=O.exec(n));)i[e[1]]=e[2];for(var a in k)k.hasOwnProperty(a)&&null!=i[a]&&(r[k[a]]=i[a]);return r}(t)),!r)){for(var s in k)if(k.hasOwnProperty(s)){var o=t.getAttribute(s);null!=o&&(i[k[s]]=o)}}var l=a?"textStroke":"stroke";e.style=e.style||new g;var h=e.style;null!=i.fill&&h.set(a?"textFill":"fill",R(i.fill,n)),null!=i.stroke&&h.set(l,R(i.stroke,n)),M(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=i[t]&&h.set("lineWidth"===t&&a?"textStrokeWidth":t,parseFloat(i[t]))}),i.textBaseline&&"auto"!==i.textBaseline||(i.textBaseline="alphabetic"),"alphabetic"===i.textBaseline&&(i.textBaseline="bottom"),"start"===i.textAlign&&(i.textAlign="left"),"end"===i.textAlign&&(i.textAlign="right"),M(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=i[t]&&h.set(t,i[t])}),i.lineDash&&(e.style.lineDash=w(i.lineDash).split(_)),h[l]&&"none"!==h[l]&&(e[l]=!0),e.__inheritedStyle=i}var D=/url\(\s*#(.*?)\)/;function R(t,e){var n=e&&t&&t.match(D);return n?e[w(n[1])]:t}var N=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,O=/([^\s:;]+)\s*:\s*([^:;]+)/g;function j(t,e,n){var r=Math.min(e/t.width,n/t.height),i=[-(t.x+t.width/2)*r+e/2,-(t.y+t.height/2)*r+n/2];return{scale:[r,r],position:i}}e.parseXML=A,e.makeViewBoxTransform=j,e.parseSVG=function(t,e){return new S().parse(t,e)}},86022:function(t,e,n){var r=n(87205),i=n(12057),a=n(2122),s=Math.sqrt,o=Math.sin,l=Math.cos,h=Math.PI,u=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},c=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(u(t)*u(e))},d=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(c(t,e))};function p(t,e,n,r,i,a,u,p,g,f,y){var x=h/180*g,m=l(x)*(t-n)/2+o(x)*(e-r)/2,v=-1*o(x)*(t-n)/2+l(x)*(e-r)/2,b=m*m/(u*u)+v*v/(p*p);b>1&&(u*=s(b),p*=s(b));var w=(i===a?-1:1)*s((u*u*(p*p)-u*u*(v*v)-p*p*(m*m))/(u*u*(v*v)+p*p*(m*m)))||0,M=w*u*v/p,_=-(w*p)*m/u,A=(t+n)/2+l(x)*M-o(x)*_,S=(e+r)/2+o(x)*M+l(x)*_,C=d([1,0],[(m-M)/u,(v-_)/p]),I=[(m-M)/u,(v-_)/p],P=[(-1*m-M)/u,(-1*v-_)/p],T=d(I,P);-1>=c(I,P)&&(T=h),c(I,P)>=1&&(T=0),0===a&&T>0&&(T-=2*h),1===a&&T<0&&(T+=2*h),y.addData(f,A,S,u,p,C,T,x,a)}var g=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,f=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function y(t,e){var n=function(t){if(!t)return new i;for(var e=0,n=0,r=0,a=0,s=new i,o=i.CMD,l=t.match(g),h=0;h<l.length;h++){for(var u=l[h],c=u.charAt(0),d=u.match(f)||[],y=d.length,x=0;x<y;x++)d[x]=parseFloat(d[x]);for(var m=0;m<y;){var v,b,w,M,_,A,S,C,I,P=e,T=n;switch(c){case"l":e+=d[m++],n+=d[m++],b=o.L,s.addData(b,e,n);break;case"L":e=d[m++],n=d[m++],b=o.L,s.addData(b,e,n);break;case"m":e+=d[m++],n+=d[m++],b=o.M,s.addData(b,e,n),r=e,a=n,c="l";break;case"M":e=d[m++],n=d[m++],b=o.M,s.addData(b,e,n),r=e,a=n,c="L";break;case"h":e+=d[m++],b=o.L,s.addData(b,e,n);break;case"H":e=d[m++],b=o.L,s.addData(b,e,n);break;case"v":n+=d[m++],b=o.L,s.addData(b,e,n);break;case"V":n=d[m++],b=o.L,s.addData(b,e,n);break;case"C":b=o.C,s.addData(b,d[m++],d[m++],d[m++],d[m++],d[m++],d[m++]),e=d[m-2],n=d[m-1];break;case"c":b=o.C,s.addData(b,d[m++]+e,d[m++]+n,d[m++]+e,d[m++]+n,d[m++]+e,d[m++]+n),e+=d[m-2],n+=d[m-1];break;case"S":w=e,M=n;var k=s.len(),L=s.data;v===o.C&&(w+=e-L[k-4],M+=n-L[k-3]),b=o.C,P=d[m++],T=d[m++],e=d[m++],n=d[m++],s.addData(b,w,M,P,T,e,n);break;case"s":w=e,M=n;var k=s.len(),L=s.data;v===o.C&&(w+=e-L[k-4],M+=n-L[k-3]),b=o.C,P=e+d[m++],T=n+d[m++],e+=d[m++],n+=d[m++],s.addData(b,w,M,P,T,e,n);break;case"Q":P=d[m++],T=d[m++],e=d[m++],n=d[m++],b=o.Q,s.addData(b,P,T,e,n);break;case"q":P=d[m++]+e,T=d[m++]+n,e+=d[m++],n+=d[m++],b=o.Q,s.addData(b,P,T,e,n);break;case"T":w=e,M=n;var k=s.len(),L=s.data;v===o.Q&&(w+=e-L[k-4],M+=n-L[k-3]),e=d[m++],n=d[m++],b=o.Q,s.addData(b,w,M,e,n);break;case"t":w=e,M=n;var k=s.len(),L=s.data;v===o.Q&&(w+=e-L[k-4],M+=n-L[k-3]),e+=d[m++],n+=d[m++],b=o.Q,s.addData(b,w,M,e,n);break;case"A":_=d[m++],A=d[m++],S=d[m++],C=d[m++],I=d[m++],P=e,T=n,e=d[m++],p(P,T,e,n=d[m++],C,I,_,A,S,b=o.A,s);break;case"a":_=d[m++],A=d[m++],S=d[m++],C=d[m++],I=d[m++],P=e,T=n,e+=d[m++],p(P,T,e,n+=d[m++],C,I,_,A,S,b=o.A,s)}}("z"===c||"Z"===c)&&(b=o.Z,s.addData(b),e=r,n=a),v=b}return s.toStatic(),s}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(n.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;n.rebuildPath(e)}},e.applyTransform=function(t){a(n,t),this.dirty(!0)},e}e.createFromString=function(t,e){return new r(y(t,e))},e.extendFromString=function(t,e){return r.extend(y(t,e))},e.mergePath=function(t,e){for(var n=[],i=t.length,a=0;a<i;a++){var s=t[a];s.path||s.createPathProxy(),s.__dirtyPath&&s.buildPath(s.path,s.shape,!0),n.push(s.path)}var o=new r(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},o}},2122:function(t,e,n){var r=n(12057),i=n(3265).applyTransform,a=r.CMD,s=[[],[],[]],o=Math.sqrt,l=Math.atan2;t.exports=function(t,e){var n,r,h,u,c,d,p=t.data,g=a.M,f=a.C,y=a.L,x=a.R,m=a.A,v=a.Q;for(h=0,u=0;h<p.length;){switch(n=p[h++],u=h,r=0,n){case g:case y:r=1;break;case f:r=3;break;case v:r=2;break;case m:var b=e[4],w=e[5],M=o(e[0]*e[0]+e[1]*e[1]),_=o(e[2]*e[2]+e[3]*e[3]),A=l(-e[1]/_,e[0]/M);p[h]*=M,p[h++]+=b,p[h]*=_,p[h++]+=w,p[h++]*=M,p[h++]*=_,p[h++]+=A,p[h++]+=A,h+=2,u=h;break;case x:d[0]=p[h++],d[1]=p[h++],i(d,d,e),p[u++]=d[0],p[u++]=d[1],d[0]+=p[h++],d[1]+=p[h++],i(d,d,e),p[u++]=d[0],p[u++]=d[1]}for(c=0;c<r;c++){var d=s[c];d[0]=p[h++],d[1]=p[h++],i(d,d,e),p[u++]=d[0],p[u++]=d[1]}}}},11004:function(t,e,n){var r=n(94627),i=n(93295),a=n(66023).each;function s(t){return parseInt(t,10)}function o(t,e){i.initVML(),this.root=t,this.storage=e;var n=document.createElement("div"),r=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",t.appendChild(n),this._vmlRoot=r,this._vmlViewport=n,this.resize();var a=e.delFromStorage,s=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(r)},e.addToStorage=function(t){t.onAdd&&t.onAdd(r),s.call(e,t)},this._firstPaint=!0}o.prototype={constructor:o,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,n=0;n<t.length;n++){var r=t[n];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(e),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(e),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,e),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var n=this._vmlViewport.style;n.width=t+"px",n.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||s(e.width))-s(e.paddingLeft)-s(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||s(e.height))-s(e.paddingTop)-s(e.paddingBottom)|0}},a(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){o.prototype[t]=function(){r('In IE8.0 VML mode painter not support method "'+t+'"')}}),t.exports=o},93295:function(t,e,n){var r,i=n(57674),a="urn:schemas-microsoft-com:vml",s="undefined"==typeof window?null:window,o=!1,l=s&&s.document;if(l&&!i.canvasSupported)try{l.namespaces.zrvml||l.namespaces.add("zrvml",a),r=function(t){return l.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){r=function(t){return l.createElement("<"+t+' xmlns="'+a+'" class="zrvml">')}}e.doc=l,e.createNode=function(t){return r(t)},e.initVML=function(){if(!o&&l){o=!0;var t=l.styleSheets;t.length<31?l.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}},35360:function(t,e,n){var r=n(57674),i=n(3265).applyTransform,a=n(71497),s=n(53453),o=n(99280),l=n(93258),h=n(29695),u=n(85553),c=n(52728),d=n(77894),p=n(87205),g=n(12057),f=n(47580),y=n(93295),x=g.CMD,m=Math.round,v=Math.sqrt,b=Math.abs,w=Math.cos,M=Math.sin,_=Math.max;if(!r.canvasSupported){var A,S="progid:DXImageTransform.Microsoft",C=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize="21600,21600",t.coordorigin="0,0"},I=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},P=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},T=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},k=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},L=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},D=function(t,e,n){var r=s.parse(e);isNaN(n*=1)&&(n=1),r&&(t.color=I(r[0],r[1],r[2]),t.opacity=n*r[3])},R=function(t){var e=s.parse(t);return[I(e[0],e[1],e[2]),e[3]]},N=function(t,e,n){var r=e.fill;if(null!=r)if(r instanceof f){var a,s=0,o=[0,0],l=0,h=1,u=n.getBoundingRect(),c=u.width,d=u.height;if("linear"===r.type){a="gradient";var p,g=n.transform,y=[r.x*c,r.y*d],x=[r.x2*c,r.y2*d];g&&(i(y,y,g),i(x,x,g)),(s=180*Math.atan2(x[0]-y[0],x[1]-y[1])/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial";var y=[r.x*c,r.y*d],g=n.transform,m=n.scale,v=c,b=d;o=[(y[0]-u.x)/v,(y[1]-u.y)/b],g&&i(y,y,g);var w=_(v/=21600*m[0],b/=21600*m[1]);l=0/w,h=2*r.r/w-l}var M=r.colorStops.slice();M.sort(function(t,e){return t.offset-e.offset});for(var A=M.length,S=[],C=[],I=0;I<A;I++){var P=M[I],T=R(P.color);C.push(P.offset*h+l+" "+T[0]),(0===I||I===A-1)&&S.push(T)}if(A>=2){var k=S[0][0],L=S[1][0],N=S[0][1]*e.opacity,O=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=s,t.color=k,t.color2=L,t.colors=C.join(","),t.opacity=O,t.opacity2=N}"radial"===a&&(t.focusposition=o.join(","))}else D(t,r,e.opacity)},O=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof f||D(t,e.stroke,e.opacity)},j=function(t,e,n,r){var i="fill"===e,a=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(i||!i&&n.lineWidth)?(t[i?"filled":"stroked"]="true",n[e]instanceof f&&T(t,a),a||(a=y.createNode(e)),i?N(a,n,r):O(a,n),P(t,a)):(t[i?"filled":"stroked"]="false",T(t,a))},E=[[],[],[]],V=function(t,e){var n=x.M,r=x.C,a=x.L,s=x.A,o=x.Q,l=[],h=t.data,u=t.len();for(d=0;d<u;){switch(c=h[d++],_="",b=0,c){case n:_=" m ",b=1,p=h[d++],g=h[d++],E[0][0]=p,E[0][1]=g;break;case a:_=" l ",b=1,p=h[d++],g=h[d++],E[0][0]=p,E[0][1]=g;break;case o:case r:var c,d,p,g,f,y,b=3,_=" c ",A=h[d++],S=h[d++],C=h[d++],I=h[d++];c===o?(f=C,y=I,C=(C+2*A)/3,I=(I+2*S)/3,A=(p+2*A)/3,S=(g+2*S)/3):(f=h[d++],y=h[d++]),E[0][0]=A,E[0][1]=S,E[1][0]=C,E[1][1]=I,E[2][0]=f,E[2][1]=y,p=f,g=y;break;case s:var P=0,T=0,k=1,L=1,D=0;e&&(P=e[4],T=e[5],k=v(e[0]*e[0]+e[1]*e[1]),L=v(e[2]*e[2]+e[3]*e[3]),D=Math.atan2(-e[1]/L,e[0]/k));var R=h[d++],N=h[d++],O=h[d++],j=h[d++],V=h[d++]+D,B=h[d++]+V+D;d++;var z=h[d++],F=R+w(V)*O,G=N+M(V)*j,A=R+w(B)*O,S=N+M(B)*j,H=z?" wa ":" at ";1e-4>Math.abs(F-A)&&(Math.abs(B-V)>.01?z&&(F+=.0125):1e-4>Math.abs(G-N)?z&&F<R||!z&&F>R?S-=.0125:S+=.0125:z&&G<N||!z&&G>N?A+=.0125:A-=.0125),l.push(H,m(((R-O)*k+P)*21600-10800),",",m(((N-j)*L+T)*21600-10800),",",m(((R+O)*k+P)*21600-10800),",",m(((N+j)*L+T)*21600-10800),",",m((F*k+P)*21600-10800),",",m((G*L+T)*21600-10800),",",m((A*k+P)*21600-10800),",",m((S*L+T)*21600-10800)),p=A,g=S;break;case x.R:var W=E[0],q=E[1];W[0]=h[d++],W[1]=h[d++],q[0]=W[0]+h[d++],q[1]=W[1]+h[d++],e&&(i(W,W,e),i(q,q,e)),W[0]=m(21600*W[0]-10800),q[0]=m(21600*q[0]-10800),W[1]=m(21600*W[1]-10800),q[1]=m(21600*q[1]-10800),l.push(" m ",W[0],",",W[1]," l ",q[0],",",W[1]," l ",q[0],",",q[1]," l ",W[0],",",q[1]);break;case x.Z:l.push(" x ")}if(b>0){l.push(_);for(var U=0;U<b;U++){var Z=E[U];e&&i(Z,Z,e),l.push(m(21600*Z[0]-10800),",",m(21600*Z[1]-10800),U<b-1?",":"")}}}return l.join("")};p.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(C(n=y.createNode("shape")),this._vmlEl=n),j(n,"fill",e,this),j(n,"stroke",e,this);var r=this.transform,i=null!=r,a=n.getElementsByTagName("stroke")[0];if(a){var s=e.lineWidth;i&&!e.strokeNoScale&&(s*=v(b(r[0]*r[3]-r[1]*r[2]))),a.weight=s+"px"}var o=this.path||(this.path=new g);this.__dirtyPath&&(o.beginPath(),o.subPixelOptimize=!1,this.buildPath(o,this.shape),o.toStatic(),this.__dirtyPath=!1),n.path=V(o,this.transform),n.style.zIndex=k(this.zlevel,this.z,this.z2),P(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},p.prototype.onRemove=function(t){T(t,this._vmlEl),this.removeRectText(t)},p.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)},c.prototype.brushVML=function(t){var e,n,r,a,s=this.style,o=s.image;if("object"==typeof(e=o)&&e.tagName&&"IMG"===e.tagName.toUpperCase()){var l=o.src;if(l===this._imageSrc)n=this._imageWidth,r=this._imageHeight;else{var h=o.runtimeStyle,u=h.width,c=h.height;h.width="auto",h.height="auto",n=o.width,r=o.height,h.width=u,h.height=c,this._imageSrc=l,this._imageWidth=n,this._imageHeight=r}o=l}else o===this._imageSrc&&(n=this._imageWidth,r=this._imageHeight);if(o){var d=s.x||0,p=s.y||0,g=s.width,f=s.height,x=s.sWidth,b=s.sHeight,w=s.sx||0,M=s.sy||0,A=this._vmlEl;A||(C(A=y.doc.createElement("div")),this._vmlEl=A);var I=A.style,T=!1,L=1,D=1;if(this.transform&&(L=v((a=this.transform)[0]*a[0]+a[1]*a[1]),D=v(a[2]*a[2]+a[3]*a[3]),T=a[1]||a[2]),T){var R=[d,p],N=[d+g,p],O=[d,p+f],j=[d+g,p+f];i(R,R,a),i(N,N,a),i(O,O,a),i(j,j,a);var E=_(R[0],N[0],O[0],j[0]),V=_(R[1],N[1],O[1],j[1]),B=[];B.push("M11=",a[0]/L,",","M12=",a[2]/D,",","M21=",a[1]/L,",","M22=",a[3]/D,",","Dx=",m(d*L+a[4]),",","Dy=",m(p*D+a[5])),I.padding="0 "+m(E)+"px "+m(V)+"px 0",I.filter=S+".Matrix("+B.join("")+", SizingMethod=clip)"}else a&&(d=d*L+a[4],p=p*D+a[5]),I.filter="",I.left=m(d)+"px",I.top=m(p)+"px";var z=this._imageEl,F=this._cropEl;z||(z=y.doc.createElement("div"),this._imageEl=z);var G=z.style;if(x&&b){if(n&&r)G.width=m(L*n*g/x)+"px",G.height=m(D*r*f/b)+"px";else{var H=new Image,W=this;H.onload=function(){H.onload=null,n=H.width,r=H.height,G.width=m(L*n*g/x)+"px",G.height=m(D*r*f/b)+"px",W._imageWidth=n,W._imageHeight=r,W._imageSrc=o},H.src=o}F||((F=y.doc.createElement("div")).style.overflow="hidden",this._cropEl=F);var q=F.style;q.width=m((g+w*g/x)*L),q.height=m((f+M*f/b)*D),q.filter=S+".Matrix(Dx="+-w*g/x*L+",Dy="+-M*f/b*D+")",F.parentNode||A.appendChild(F),z.parentNode!==F&&F.appendChild(z)}else G.width=m(L*g)+"px",G.height=m(D*f)+"px",A.appendChild(z),F&&F.parentNode&&(A.removeChild(F),this._cropEl=null);var U="",Z=s.opacity;Z<1&&(U+=".Alpha(opacity="+m(100*Z)+") "),G.filter=U+=S+".AlphaImageLoader(src="+o+", SizingMethod=scale)",A.style.zIndex=k(this.zlevel,this.z,this.z2),P(t,A),null!=s.text&&this.drawRectText(t,this.getBoundingRect())}},c.prototype.onRemove=function(t){T(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},c.prototype.onAdd=function(t){P(t,this._vmlEl),this.appendRectText(t)};var B="normal",z={},F=0,G=document.createElement("div"),H=function(t){var e=z[t];if(!e){F>100&&(F=0,z={});var n,r=G.style;try{r.font=t,n=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||B,variant:r.fontVariant||B,weight:r.fontWeight||B,size:0|parseFloat(r.fontSize||12),family:n||"Microsoft YaHei"},z[t]=e,F++}return e};o.$override("measureText",function(t,e){var n=y.doc;A||((A=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",y.doc.body.appendChild(A));try{A.style.font=e}catch(t){}return A.innerHTML="",A.appendChild(n.createTextNode(t)),{width:A.offsetWidth}});for(var W=new a,q=function(t,e,n,r){var a,s,h,u,c,d=this.style;this.__dirty&&l.normalizeTextStyle(d,!0);var p=d.text;if(null!=p&&(p+=""),p){if(d.rich){var g=o.parseRichText(p,d);p=[];for(var f=0;f<g.lines.length;f++){for(var x=g.lines[f].tokens,v=[],b=0;b<x.length;b++)v.push(x[b].text);p.push(v.join(""))}p=p.join("\n")}var w=d.textAlign,M=d.textVerticalAlign,_=H(d.font),A=_.style+" "+_.variant+" "+_.weight+" "+_.size+'px "'+_.family+'"';n=n||o.getBoundingRect(p,A,w,M,d.textPadding,d.textLineHeight);var S=this.transform;if(S&&!r&&(W.copy(e),W.applyTransform(S),e=W),r)a=e.x,s=e.y;else{var I=d.textPosition,T=d.textDistance;if(I instanceof Array)a=e.x+L(I[0],e.width),s=e.y+L(I[1],e.height),w=w||"left";else{var D=o.adjustTextPositionOnRect(I,e,T);a=D.x,s=D.y,w=w||D.textAlign,M=M||D.textVerticalAlign}}a=o.adjustTextX(a,n.width,w),s=o.adjustTextY(s,n.height,M)+n.height/2;var R=y.createNode,N=this._textVmlEl;N?u=(h=(c=N.firstChild).nextSibling).nextSibling:(N=R("line"),h=R("path"),u=R("textpath"),c=R("skew"),u.style["v-text-align"]="left",C(N),h.textpathok=!0,u.on=!0,N.from="0 0",N.to="1000 0.05",P(N,c),P(N,h),P(N,u),this._textVmlEl=N);var O=[a,s],E=N.style;S&&r?(i(O,O,S),c.on=!0,c.matrix=S[0].toFixed(3)+","+S[2].toFixed(3)+","+S[1].toFixed(3)+","+S[3].toFixed(3)+",0,0",c.offset=(m(O[0])||0)+","+(m(O[1])||0),c.origin="0 0",E.left="0px",E.top="0px"):(c.on=!1,E.left=m(a)+"px",E.top=m(s)+"px"),u.string=String(p).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{u.style.font=A}catch(t){}j(N,"fill",{fill:d.textFill,opacity:d.opacity},this),j(N,"stroke",{stroke:d.textStroke,opacity:d.opacity,lineDash:d.lineDash},this),N.style.zIndex=k(this.zlevel,this.z,this.z2),P(t,N)}},U=function(t){T(t,this._textVmlEl),this._textVmlEl=null},Z=function(t){P(t,this._textVmlEl)},$=[h,u,c,p,d],J=0;J<$.length;J++){var Y=$[J].prototype;Y.drawRectText=q,Y.removeRectText=U,Y.appendRectText=Z}d.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},d.prototype.onRemove=function(t){this.removeRectText(t)},d.prototype.onAdd=function(t){this.appendRectText(t)}}},77658:function(t,e,n){n(35360),(0,n(19206).registerPainter)("vml",n(11004))},19206:function(t,e,n){var r=n(68609),i=n(57674),a=n(66023),s=n(95725),o=n(16949),l=n(2837),h=n(72482),u=n(98158),c=!i.canvasSupported,d={canvas:l},p={},g=function(t,e,n){n=n||{},this.dom=e,this.id=t;var r=this,l=new o,p=n.renderer;if(c){if(!d.vml)throw Error("You need to require 'zrender/vml/vml' to support IE8");p="vml"}else p&&d[p]||(p="canvas");var g=new d[p](e,l,n,t);this.storage=l,this.painter=g;var f=i.node||i.worker?null:new u(g.getViewportRoot());this.handler=new s(l,g,f,g.root),this.animation=new h({stage:{update:a.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var y=l.delFromStorage,x=l.addToStorage;l.delFromStorage=function(t){y.call(l,t),t&&t.removeSelfFromZr(r)},l.addToStorage=function(t){x.call(l,t),t.addSelfToZr(r)}};g.prototype={constructor:g,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete p[t]}},e.version="4.0.7",e.init=function(t,e){var n=new g(r(),t,e);return p[n.id]=n,n},e.dispose=function(t){if(t)t.dispose();else{for(var e in p)p.hasOwnProperty(e)&&p[e].dispose();p={}}return this},e.getInstance=function(t){return p[t]},e.registerPainter=function(t,e){d[t]=e}},93318:function(t,e){"use strict";Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});let n=console},98510:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"BaseTaskQueue",{enumerable:!0,get:function(){return a}});let r=n(67562),i=()=>{};class a{constructor(t={}){let{concurrency:e=1/0,mode:n="auto"}=t;this.concurrency=Math.max(e,0),this.mode=n,this.runningCount=0,this.processingScheduled=!1}createTaskWrapper(t,e){void 0===e&&(e={});let{priority:n=0,signal:a,arg:s}=e,o=new r.TaskWrapper(t,s,n,a);if(a){let t=()=>{this._remove(o),o.abort()};a.addEventListener("abort",t),o.wait().catch(i).finally(()=>a.removeEventListener("abort",t))}return o}enqueue(t,e){let n=this.createTaskWrapper(t,e);return this._add(n),this.consumeAuto(),n.wait()}consume(){"manual-sync"===this.mode&&this.doConsumeSync()}getRunningCount(){return this.runningCount}getTotalCount(){return this.getWaitingCount()+this.getRunningCount()}isEmpty(){return 0===this.getWaitingCount()}isFullLoad(){return this.runningCount>=this.concurrency}isIdle(){return!this.isFullLoad()&&this.isEmpty()}stat(t){return{running:this.getRunningCount(),waiting:this.getWaitingCount(),queue:t?this.statQueue(t):void 0}}consumeAuto(){"auto"===this.mode&&this.doConsumeAsync()}doConsumeAsync(){this.processingScheduled||(this.processingScheduled=!0,setImmediate(()=>{this.processingScheduled=!1,this.doConsumeSync()}))}doConsumeSync(){for(;!this.isFullLoad()&&!this.isEmpty();){let t=this._pop();this.runningCount++,(t?t.execute().catch(i):Promise.resolve()).then(()=>this._onTaskDone())}}_onTaskDone(){this.runningCount--,this.consumeAuto()}}},10624:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={HibernationController:function(){return l},HibernationTaskQueue:function(){return c}};for(var i in r)Object.defineProperty(e,i,{enumerable:!0,get:r[i]});let a=n(98510),s=n(79450),o=AbortController;class l extends o{constructor(){super(),this.signal.sleeping=!0}wake(){let t=this.signal;!t.aborted&&t.sleeping&&(t.sleeping=!1,t.dispatchEvent(new Event("wake")))}sleep(){let t=this.signal;t.aborted||t.sleeping||(t.sleeping=!0,t.dispatchEvent(new Event("sleep")))}}function h(t){return{...t,concurrency:0,mode:"disabled"}}class u extends a.BaseTaskQueue{constructor(t){super(h(t)),this.set=new Set}consume(){}clear(){this.set.clear()}getWaitingCount(){return this.set.size}statQueue(t){return Array.from(this.set).map(e=>t(e.getFn(),e.getArg()))}_add(t){this.set.add(t)}_remove(t){this.set.delete(t)}_pop(){}}class c extends a.BaseTaskQueue{constructor(t=Object.create(null)){super(h(t)),this.activeQueue=new(t.activeConstructor||s.TaskQueue)(t),this.passiveQueue=new u(t)}enqueue(t,e){void 0===e&&(e={});let{signal:n}=e;return n?this.enqueuePassive(t,e):this.activeQueue.enqueue(t,e)}enqueueActive(t,e){let n=e.signal;return n?new Promise((r,i)=>{let a=new AbortController,s=()=>{a.abort(n.reason)},o=()=>{a.abort(n.reason),r(this.enqueuePassive(t,e))};n.addEventListener("abort",s),n.addEventListener("sleep",o),this.activeQueue.enqueue(t,{...e,signal:a.signal}).finally(()=>{n.removeEventListener("abort",s),n.removeEventListener("sleep",o)}).then(r,i)}):Promise.reject(Error("No signal."))}enqueuePassive(t,e){let n=e.signal;return n?new Promise((r,i)=>{let a=new AbortController,s=()=>{a.abort(n.reason)},o=()=>{a.abort(n.reason),r(this.enqueueActive(t,e))};n.addEventListener("abort",s),n.addEventListener("wake",o),this.passiveQueue.enqueue(t,{...e,signal:a.signal}).finally(()=>{n.removeEventListener("abort",s),n.removeEventListener("wake",o)}).then(r,i)}):Promise.reject(Error("No signal."))}consume(){this.activeQueue.consume()}clear(){this.activeQueue.clear(),this.passiveQueue.clear()}getWaitingCount(){return this.activeQueue.getWaitingCount()+this.passiveQueue.getTotalCount()}getRunningCount(){return this.activeQueue.getRunningCount()}isFullLoad(){return this.activeQueue.isFullLoad()}statQueue(t){return[...this.activeQueue.stat(t).queue||[],...this.passiveQueue.stat(t).queue||[]]}_add(t){}_remove(t){}_pop(){}}},39074:function(t,e,n){"use strict";function r(t,e){return Object.keys(t).forEach(function(n){"default"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})}),t}Object.defineProperty(e,"__esModule",{value:!0}),r(n(98510),e),r(n(79450),e),r(n(57550),e),r(n(23536),e),r(n(10624),e)},23536:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"PriorityTaskQueue",{enumerable:!0,get:function(){return i}});let r=n(79450);class i extends r.TaskQueue{_add(t){let e=function(t,e){let n=0,r=t.length;for(;n<r;){let i=n+r>>1;e(t[i])?n=i+1:r=i}return n}(this.queue,e=>e.getPriority()<t.getPriority());this.queue.splice(e,0,t)}_pop(){return this.queue.pop()}}},79450:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TaskQueue",{enumerable:!0,get:function(){return i}});let r=n(98510);class i extends r.BaseTaskQueue{constructor(t){super(t),this.queue=[]}clear(){this.queue.length=0}getWaitingCount(){return this.queue.length}statQueue(t){return this.queue.map(e=>t(e.getFn(),e.getArg()))}_add(t){this.queue.push(t)}_remove(t){let e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1)}_pop(){return this.queue.shift()}}},57550:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TaskStack",{enumerable:!0,get:function(){return i}});let r=n(79450);class i extends r.TaskQueue{_pop(){return this.queue.pop()}}},67562:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TaskWrapper",{enumerable:!0,get:function(){return r}});let n=()=>{};class r{constructor(t,e,r,i){this.fn=t,this.arg=e,this.priority=r,this.signal=i,this.executed=!1,this.resolver=n,this.rejecter=n,this.resultPromise=new Promise((t,e)=>{this.resolver=t,this.rejecter=e})}wait(){return this.resultPromise}execute(){if(!this.executed){let t;this.executed=!0;try{t=this.fn(this.arg)}catch(e){t=Promise.reject(e)}t.then(this.resolver,this.rejecter)}return this.wait()}abort(){if(this.signal){let t=Error("aborted",{cause:this.signal.reason});t.name="AbortError",this.rejecter(t)}}getPriority(){return this.priority}getFn(){return this.fn}getArg(){return this.arg}}},1970:function(t,e){"use strict";function n(t){return 1e-10>Math.abs(t)?0:t}function r(t,e){t=n(t);let r=Math.atan2(e=n(e),t);return r>=0?r:r+2*Math.PI}function i(t,e,i){let a=Math.cos(i),s=Math.sin(i);return 0===n(e)&&0===n(s)||0===n(t)&&0===n(a)?i:r(e*a,t*s)}function a(t,e,n,r,a,s){if(0===t&&0===e)return{x:r,y:a};let o=i(t,e,n),l=i(t,e,s);return{x:r-t*Math.cos(o)+t*Math.cos(l),y:a-e*Math.sin(o)+e*Math.sin(l)}}e.accentBorderCallout1={name:"accentBorderCallout1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentBorderCallout1.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=112500,e.adj4=-38333,e},e.accentBorderCallout1.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.accentBorderCallout1.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5},e.accentBorderCallout1._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.accentBorderCallout1.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentBorderCallout1.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentBorderCallout1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.accentBorderCallout2={name:"accentBorderCallout2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentBorderCallout2.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=112500,e.adj6=-46667,e},e.accentBorderCallout2.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6"],e.accentBorderCallout2.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5},e.accentBorderCallout2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.accentBorderCallout2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentBorderCallout2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentBorderCallout2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.accentBorderCallout3={name:"accentBorderCallout3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentBorderCallout3.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=1e5,e.adj6=-16667,e.adj7=112963,e.adj8=-8333,e},e.accentBorderCallout3.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6","adj7","adj8"],e.accentBorderCallout3.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5,t.y4=t.h*t.adj7/1e5,t.x4=t.w*t.adj8/1e5},e.accentBorderCallout3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.y4}),e.push(n),e},e.accentBorderCallout3.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentBorderCallout3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentBorderCallout3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.accentCallout1={name:"accentCallout1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentCallout1.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=112500,e.adj4=-38333,e},e.accentCallout1.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.accentCallout1.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5},e.accentCallout1._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.accentCallout1.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentCallout1.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentCallout1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.accentCallout2={name:"accentCallout2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentCallout2.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=112500,e.adj6=-46667,e},e.accentCallout2.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6"],e.accentCallout2.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5},e.accentCallout2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.accentCallout2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentCallout2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentCallout2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.accentCallout3={name:"accentCallout3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.accentCallout3.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=1e5,e.adj6=-16667,e.adj7=112963,e.adj8=-8333,e},e.accentCallout3.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6","adj7","adj8"],e.accentCallout3.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5,t.y4=t.h*t.adj7/1e5,t.x4=t.w*t.adj8/1e5},e.accentCallout3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.y4}),e.push(n),e},e.accentCallout3.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.accentCallout3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.accentCallout3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.arc={name:"arc",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.arc.getDefaultAdjustValues=t=>{let e={};return e.adj1=162e5,e.adj2=0,e},e.arc.getAdjustValueNames=()=>["adj1","adj2"],e.arc.updateShapeGuides=t=>{t.stAng=Math.max(0,Math.min(t.adj1,0x14996ff)),t.enAng=Math.max(0,Math.min(t.adj2,0x14996ff)),t.sw11=t.enAng+0-t.stAng,t.sw12=t.sw11+216e5-0,t.swAng=t.sw11>0?t.sw11:t.sw12,t.wt1=t.w/2*Math.sin(t.stAng*Math.PI/108e5),t.ht1=t.h/2*Math.cos(t.stAng*Math.PI/108e5),t.dx1=t.w/2*Math.cos(r(t.ht1,t.wt1)),t.dy1=t.h/2*Math.sin(r(t.ht1,t.wt1)),t.wt2=t.w/2*Math.sin(t.enAng*Math.PI/108e5),t.ht2=t.h/2*Math.cos(t.enAng*Math.PI/108e5),t.dx2=t.w/2*Math.cos(r(t.ht2,t.wt2)),t.dy2=t.h/2*Math.sin(r(t.ht2,t.wt2)),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.x2=(t.l+t.r)/2+t.dx2-0,t.y2=(t.t+t.b)/2+t.dy2-0,t.sw0=216e5-t.stAng,t.da1=t.swAng+0-t.sw0,t.g1=Math.max(t.x1,t.x2),t.ir=t.da1>0?t.r:t.g1,t.sw1=54e5-t.stAng,t.sw2=27e6-t.stAng,t.sw3=t.sw1>0?t.sw1:t.sw2,t.da2=t.swAng+0-t.sw3,t.g5=Math.max(t.y1,t.y2),t.ib=t.da2>0?t.b:t.g5,t.sw4=108e5-t.stAng,t.sw5=324e5-t.stAng,t.sw6=t.sw4>0?t.sw4:t.sw5,t.da3=t.swAng+0-t.sw6,t.g9=Math.min(t.x1,t.x2),t.il=t.da3>0?t.l:t.g9,t.sw7=162e5-t.stAng,t.sw8=378e5-t.stAng,t.sw9=t.sw7>0?t.sw7:t.sw8,t.da4=t.swAng+0-t.sw9,t.g13=Math.min(t.y1,t.y2),t.it=t.da4>0?t.t:t.g13,t.cang1=t.stAng+0-54e5,t.cang2=t.enAng+54e5-0,t.cang3=(t.cang1+t.cang2)/2},e.arc._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.arc.getConnections=t=>{let e=[],n;return(n={}).ang=t=>t.cang1,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>t.cang3,n.pos=t=>({x:(t.l+t.r)/2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>t.cang2,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.arc.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.arc.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.bentArrow={name:"bentArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=43750,e},e.bentArrow.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.bentArrow.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.a3=Math.max(0,Math.min(t.adj3,5e4)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw2=Math.min(t.w,t.h)*t.a2/1e5,t.th2=+t.th/2,t.dh2=t.aw2+0-t.th2,t.ah=Math.min(t.w,t.h)*t.a3/1e5,t.bw=t.r+0-t.ah,t.bh=t.b+0-t.dh2,t.bs=Math.min(t.bw,t.bh),t.maxAdj4=1e5*t.bs/Math.min(t.w,t.h),t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.bd=Math.min(t.w,t.h)*t.a4/1e5,t.bd3=t.bd+0-t.th,t.bd2=Math.max(t.bd3,0),t.x3=t.th+t.bd2-0,t.x4=t.r+0-t.ah,t.y3=t.dh2+t.th-0,t.y4=t.y3+t.dh2-0,t.y5=t.dh2+t.bd-0,t.y6=t.y3+t.bd2-0},e.bentArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.th,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y4}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.bd,y:t.t}),e.push(n),e},e.bentArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x4,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.th2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.aw2}),e.push(n),e},e.bentArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.bentArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.bd,l=t.bd,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.dh2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.aw2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.bd2,l=t.bd2,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.th,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.bentConnector2={name:"bentConnector2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentConnector2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.bentConnector2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.bentConnector3={name:"bentConnector3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentConnector3.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e},e.bentConnector3.getAdjustValueNames=()=>["adj1"],e.bentConnector3.updateShapeGuides=t=>{t.x1=t.w*t.adj1/1e5},e.bentConnector3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),e},e.bentConnector3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.bentConnector3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.bentConnector4={name:"bentConnector4",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentConnector4.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.bentConnector4.getAdjustValueNames=()=>["adj1","adj2"],e.bentConnector4.updateShapeGuides=t=>{t.x1=t.w*t.adj1/1e5,t.x2=(t.x1+t.r)/2,t.y2=t.h*t.adj2/1e5,t.y1=(t.t+t.y2)/2},e.bentConnector4._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.bentConnector4.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.bentConnector4.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.bentConnector5={name:"bentConnector5",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentConnector5.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e.adj3=5e4,e},e.bentConnector5.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.bentConnector5.updateShapeGuides=t=>{t.x1=t.w*t.adj1/1e5,t.x3=t.w*t.adj3/1e5,t.x2=(t.x1+t.x3)/2,t.y2=t.h*t.adj2/1e5,t.y1=(t.t+t.y2)/2,t.y3=(t.b+t.y2)/2},e.bentConnector5._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.bentConnector5.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.bentConnector5.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.bentUpArrow={name:"bentUpArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bentUpArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e},e.bentUpArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.bentUpArrow.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.a3=Math.max(0,Math.min(t.adj3,5e4)),t.y1=Math.min(t.w,t.h)*t.a3/1e5,t.dx1=Math.min(t.w,t.h)*t.a2/5e4,t.x1=t.r+0-t.dx1,t.dx3=Math.min(t.w,t.h)*t.a2/1e5,t.x3=t.r+0-t.dx3,t.dx2=Math.min(t.w,t.h)*t.a1/2e5,t.x2=t.x3+0-t.dx2,t.x4=t.x3+t.dx2-0,t.dy2=Math.min(t.w,t.h)*t.a1/1e5,t.y2=t.b+0-t.dy2,t.x0=+t.x4/2,t.y3=(t.y2+t.b)/2,t.y15=(t.y1+t.b)/2},e.bentUpArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y1}),e.push(n),e},e.bentUpArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x0,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y15}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.bentUpArrow.getTextRect=t=>({l:t.l,t:t.y2,r:t.x4,b:t.b}),e.bentUpArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.bevel={name:"bevel",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bevel.getDefaultAdjustValues=t=>{let e={};return e.adj=12500,e},e.bevel.getAdjustValueNames=()=>["adj"],e.bevel.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1},e.bevel._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.bevel.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.x1}),e.push(n),e},e.bevel.getTextRect=t=>({l:t.x1,t:t.x1,r:t.x2,b:t.y2}),e.bevel.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"lightenLess"}),n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darkenLess"}),n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"lighten"}),n=[],r={action:"M",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darken"}),n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"M",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"M",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.blockArc={name:"blockArc",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.blockArc.getDefaultAdjustValues=t=>{let e={};return e.adj1=108e5,e.adj2=0,e.adj3=25e3,e},e.blockArc.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.blockArc.updateShapeGuides=t=>{t.stAng=Math.max(0,Math.min(t.adj1,0x14996ff)),t.istAng=Math.max(0,Math.min(t.adj2,0x14996ff)),t.a3=Math.max(0,Math.min(t.adj3,5e4)),t.sw11=t.istAng+0-t.stAng,t.sw12=t.sw11+216e5-0,t.swAng=t.sw11>0?t.sw11:t.sw12,t.iswAng=0-t.swAng,t.wt1=t.w/2*Math.sin(t.stAng*Math.PI/108e5),t.ht1=t.h/2*Math.cos(t.stAng*Math.PI/108e5),t.wt3=t.w/2*Math.sin(t.istAng*Math.PI/108e5),t.ht3=t.h/2*Math.cos(t.istAng*Math.PI/108e5),t.dx1=t.w/2*Math.cos(r(t.ht1,t.wt1)),t.dy1=t.h/2*Math.sin(r(t.ht1,t.wt1)),t.dx3=t.w/2*Math.cos(r(t.ht3,t.wt3)),t.dy3=t.h/2*Math.sin(r(t.ht3,t.wt3)),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.x3=(t.l+t.r)/2+t.dx3-0,t.y3=(t.t+t.b)/2+t.dy3-0,t.dr=Math.min(t.w,t.h)*t.a3/1e5,t.iwd2=t.w/2+0-t.dr,t.ihd2=t.h/2+0-t.dr,t.wt2=t.iwd2*Math.sin(t.istAng*Math.PI/108e5),t.ht2=t.ihd2*Math.cos(t.istAng*Math.PI/108e5),t.wt4=t.iwd2*Math.sin(t.stAng*Math.PI/108e5),t.ht4=t.ihd2*Math.cos(t.stAng*Math.PI/108e5),t.dx2=t.iwd2*Math.cos(r(t.ht2,t.wt2)),t.dy2=t.ihd2*Math.sin(r(t.ht2,t.wt2)),t.dx4=t.iwd2*Math.cos(r(t.ht4,t.wt4)),t.dy4=t.ihd2*Math.sin(r(t.ht4,t.wt4)),t.x2=(t.l+t.r)/2+t.dx2-0,t.y2=(t.t+t.b)/2+t.dy2-0,t.x4=(t.l+t.r)/2+t.dx4-0,t.y4=(t.t+t.b)/2+t.dy4-0,t.sw0=216e5-t.stAng,t.da1=t.swAng+0-t.sw0,t.g1=Math.max(t.x1,t.x2),t.g2=Math.max(t.x3,t.x4),t.g3=Math.max(t.g1,t.g2),t.ir=t.da1>0?t.r:t.g3,t.sw1=54e5-t.stAng,t.sw2=27e6-t.stAng,t.sw3=t.sw1>0?t.sw1:t.sw2,t.da2=t.swAng+0-t.sw3,t.g5=Math.max(t.y1,t.y2),t.g6=Math.max(t.y3,t.y4),t.g7=Math.max(t.g5,t.g6),t.ib=t.da2>0?t.b:t.g7,t.sw4=108e5-t.stAng,t.sw5=324e5-t.stAng,t.sw6=t.sw4>0?t.sw4:t.sw5,t.da3=t.swAng+0-t.sw6,t.g9=Math.min(t.x1,t.x2),t.g10=Math.min(t.x3,t.x4),t.g11=Math.min(t.g9,t.g10),t.il=t.da3>0?t.l:t.g11,t.sw7=162e5-t.stAng,t.sw8=378e5-t.stAng,t.sw9=t.sw7>0?t.sw7:t.sw8,t.da4=t.swAng+0-t.sw9,t.g13=Math.min(t.y1,t.y2),t.g14=Math.min(t.y3,t.y4),t.g15=Math.min(t.g13,t.g14),t.it=t.da4>0?t.t:t.g15,t.x5=(t.x1+t.x4)/2,t.y5=(t.y1+t.y4)/2,t.x6=(t.x3+t.x2)/2,t.y6=(t.y3+t.y2)/2,t.cang1=t.stAng+0-54e5,t.cang2=t.istAng+54e5-0,t.cang3=(t.cang1+t.cang2)/2},e.blockArc._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.blockArc.getConnections=t=>{let e=[],n;return(n={}).ang=t=>t.cang1,n.pos=t=>({x:t.x5,y:t.y5}),e.push(n),(n={}).ang=t=>t.cang2,n.pos=t=>({x:t.x6,y:t.y6}),e.push(n),(n={}).ang=t=>t.cang3,n.pos=t=>({x:(t.l+t.r)/2,y:(t.t+t.b)/2}),e.push(n),e},e.blockArc.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.blockArc.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=t.istAng,u=t.iswAng%216e5,(d=0!==t.iswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.borderCallout1={name:"borderCallout1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.borderCallout1.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=112500,e.adj4=-38333,e},e.borderCallout1.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.borderCallout1.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5},e.borderCallout1._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.borderCallout1.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.borderCallout1.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.borderCallout1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.borderCallout2={name:"borderCallout2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.borderCallout2.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=112500,e.adj6=-46667,e},e.borderCallout2.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6"],e.borderCallout2.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5},e.borderCallout2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.borderCallout2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.borderCallout2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.borderCallout2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.borderCallout3={name:"borderCallout3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.borderCallout3.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=1e5,e.adj6=-16667,e.adj7=112963,e.adj8=-8333,e},e.borderCallout3.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6","adj7","adj8"],e.borderCallout3.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5,t.y4=t.h*t.adj7/1e5,t.x4=t.w*t.adj8/1e5},e.borderCallout3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.y4}),e.push(n),e},e.borderCallout3.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.borderCallout3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.borderCallout3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.bracePair={name:"bracePair",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bracePair.getDefaultAdjustValues=t=>{let e={};return e.adj=8333,e},e.bracePair.getAdjustValueNames=()=>["adj"],e.bracePair.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,25e3)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=Math.min(t.w,t.h)*t.a/5e4,t.x3=t.r+0-t.x2,t.x4=t.r+0-t.x1,t.y2=(t.t+t.b)/2+0-t.x1,t.y3=(t.t+t.b)/2+t.x1-0,t.y4=t.b+0-t.x1,t.it=29289*t.x1/1e5,t.il=t.x1+t.it-0,t.ir=t.r+0-t.il,t.ib=t.b+0-t.it},e.bracePair._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.x1}),e.push(n),e},e.bracePair.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.bracePair.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.bracePair.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.bracketPair={name:"bracketPair",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.bracketPair.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.bracketPair.getAdjustValueNames=()=>["adj"],e.bracketPair.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1,t.il=29289*t.x1/1e5,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.bracketPair._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.x1}),e.push(n),e},e.bracketPair.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.bracketPair.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.bracketPair.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.callout1={name:"callout1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.callout1.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=112500,e.adj4=-38333,e},e.callout1.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.callout1.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5},e.callout1._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.callout1.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.callout1.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.callout1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.callout2={name:"callout2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.callout2.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=112500,e.adj6=-46667,e},e.callout2.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6"],e.callout2.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5},e.callout2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.callout2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.callout2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.callout2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.callout3={name:"callout3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.callout3.getDefaultAdjustValues=t=>{let e={};return e.adj1=18750,e.adj2=-8333,e.adj3=18750,e.adj4=-16667,e.adj5=1e5,e.adj6=-16667,e.adj7=112963,e.adj8=-8333,e},e.callout3.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5","adj6","adj7","adj8"],e.callout3.updateShapeGuides=t=>{t.y1=t.h*t.adj1/1e5,t.x1=t.w*t.adj2/1e5,t.y2=t.h*t.adj3/1e5,t.x2=t.w*t.adj4/1e5,t.y3=t.h*t.adj5/1e5,t.x3=t.w*t.adj6/1e5,t.y4=t.h*t.adj7/1e5,t.x4=t.w*t.adj8/1e5},e.callout3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.y4}),e.push(n),e},e.callout3.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.callout3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.callout3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.can={name:"can",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.can.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.can.getAdjustValueNames=()=>["adj"],e.can.updateShapeGuides=t=>{t.maxAdj=5e4*t.h/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.y1=Math.min(t.w,t.h)*t.a/2e5,t.y2=t.y1+t.y1-0,t.y3=t.b+0-t.y1},e.can._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),e},e.can.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.can.getTextRect=t=>({l:t.l,t:t.y2,r:t.r,b:t.y3}),e.can.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"lighten"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.chevron={name:"chevron",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.chevron.getDefaultAdjustValues=t=>{let e={};return e.adj=5e4,e},e.chevron.getAdjustValueNames=()=>["adj"],e.chevron.updateShapeGuides=t=>{t.maxAdj=1e5*t.w/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.x3=+t.x2/2,t.dx=t.x2+0-t.x1,t.il=t.dx>0?t.x1:t.l,t.ir=t.dx>0?t.x2:t.r},e.chevron._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.chevron.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.chevron.getTextRect=t=>({l:t.il,t:t.t,r:t.ir,b:t.b}),e.chevron.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.chord={name:"chord",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.chord.getDefaultAdjustValues=t=>{let e={};return e.adj1=27e5,e.adj2=162e5,e},e.chord.getAdjustValueNames=()=>["adj1","adj2"],e.chord.updateShapeGuides=t=>{t.stAng=Math.max(0,Math.min(t.adj1,0x14996ff)),t.enAng=Math.max(0,Math.min(t.adj2,0x14996ff)),t.sw1=t.enAng+0-t.stAng,t.sw2=t.sw1+216e5-0,t.swAng=t.sw1>0?t.sw1:t.sw2,t.wt1=t.w/2*Math.sin(t.stAng*Math.PI/108e5),t.ht1=t.h/2*Math.cos(t.stAng*Math.PI/108e5),t.dx1=t.w/2*Math.cos(r(t.ht1,t.wt1)),t.dy1=t.h/2*Math.sin(r(t.ht1,t.wt1)),t.wt2=t.w/2*Math.sin(t.enAng*Math.PI/108e5),t.ht2=t.h/2*Math.cos(t.enAng*Math.PI/108e5),t.dx2=t.w/2*Math.cos(r(t.ht2,t.wt2)),t.dy2=t.h/2*Math.sin(r(t.ht2,t.wt2)),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.x2=(t.l+t.r)/2+t.dx2-0,t.y2=(t.t+t.b)/2+t.dy2-0,t.x3=(t.x1+t.x2)/2,t.y3=(t.y1+t.y2)/2,t.midAng0=+t.swAng/2,t.midAng=t.stAng+t.midAng0-108e5,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.chord._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.chord.getConnections=t=>{let e=[],n;return(n={}).ang=t=>t.stAng,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>t.enAng,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>t.midAng,n.pos=t=>({x:t.x3,y:t.y3}),e.push(n),e},e.chord.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.chord.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.circularArrow={name:"circularArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.circularArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=12500,e.adj2=1142319,e.adj3=0x13828d1,e.adj4=108e5,e.adj5=12500,e},e.circularArrow.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5"],e.circularArrow.updateShapeGuides=t=>{t.a5=Math.max(0,Math.min(t.adj5,25e3)),t.maxAdj1=2*t.a5/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.enAng=Math.max(1,Math.min(t.adj3,0x14996ff)),t.stAng=Math.max(0,Math.min(t.adj4,0x14996ff)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.thh=Math.min(t.w,t.h)*t.a5/1e5,t.th2=+t.th/2,t.rw1=t.w/2+t.th2-t.thh,t.rh1=t.h/2+t.th2-t.thh,t.rw2=t.rw1+0-t.th,t.rh2=t.rh1+0-t.th,t.rw3=t.rw2+t.th2-0,t.rh3=t.rh2+t.th2-0,t.wtH=t.rw3*Math.sin(t.enAng*Math.PI/108e5),t.htH=t.rh3*Math.cos(t.enAng*Math.PI/108e5),t.dxH=t.rw3*Math.cos(r(t.htH,t.wtH)),t.dyH=t.rh3*Math.sin(r(t.htH,t.wtH)),t.xH=(t.l+t.r)/2+t.dxH-0,t.yH=(t.t+t.b)/2+t.dyH-0,t.rI=Math.min(t.rw2,t.rh2),t.u1=t.dxH*t.dxH/1,t.u2=t.dyH*t.dyH/1,t.u3=t.rI*t.rI/1,t.u4=t.u1+0-t.u3,t.u5=t.u2+0-t.u3,t.u6=t.u4*t.u5/t.u1,t.u7=+t.u6/t.u2,t.u8=1-t.u7,t.u9=Math.sqrt(t.u8),t.u10=+t.u4/t.dxH,t.u11=+t.u10/t.dyH,t.u12=(1+t.u9)/t.u11,t.u13=108e5*r(1,t.u12)/Math.PI,t.u14=t.u13+216e5-0,t.u15=t.u13>0?t.u13:t.u14,t.u16=t.u15+0-t.enAng,t.u17=t.u16+216e5-0,t.u18=t.u16>0?t.u16:t.u17,t.u19=t.u18+0-108e5,t.u20=t.u18+0-216e5,t.u21=t.u19>0?t.u20:t.u18,t.maxAng=Math.abs(t.u21),t.aAng=Math.max(0,Math.min(t.adj2,t.maxAng)),t.ptAng=t.enAng+t.aAng-0,t.wtA=t.rw3*Math.sin(t.ptAng*Math.PI/108e5),t.htA=t.rh3*Math.cos(t.ptAng*Math.PI/108e5),t.dxA=t.rw3*Math.cos(r(t.htA,t.wtA)),t.dyA=t.rh3*Math.sin(r(t.htA,t.wtA)),t.xA=(t.l+t.r)/2+t.dxA-0,t.yA=(t.t+t.b)/2+t.dyA-0,t.wtE=t.rw1*Math.sin(t.stAng*Math.PI/108e5),t.htE=t.rh1*Math.cos(t.stAng*Math.PI/108e5),t.dxE=t.rw1*Math.cos(r(t.htE,t.wtE)),t.dyE=t.rh1*Math.sin(r(t.htE,t.wtE)),t.xE=(t.l+t.r)/2+t.dxE-0,t.yE=(t.t+t.b)/2+t.dyE-0,t.dxG=t.thh*Math.cos(t.ptAng*Math.PI/108e5),t.dyG=t.thh*Math.sin(t.ptAng*Math.PI/108e5),t.xG=t.xH+t.dxG-0,t.yG=t.yH+t.dyG-0,t.dxB=t.thh*Math.cos(t.ptAng*Math.PI/108e5),t.dyB=t.thh*Math.sin(t.ptAng*Math.PI/108e5),t.xB=t.xH+0-t.dxB,t.yB=t.yH+0-t.dyB,t.sx1=t.xB+0-(t.l+t.r)/2,t.sy1=t.yB+0-(t.t+t.b)/2,t.sx2=t.xG+0-(t.l+t.r)/2,t.sy2=t.yG+0-(t.t+t.b)/2,t.rO=Math.min(t.rw1,t.rh1),t.x1O=t.sx1*t.rO/t.rw1,t.y1O=t.sy1*t.rO/t.rh1,t.x2O=t.sx2*t.rO/t.rw1,t.y2O=t.sy2*t.rO/t.rh1,t.dxO=t.x2O+0-t.x1O,t.dyO=t.y2O+0-t.y1O,t.dO=Math.sqrt(Math.pow(t.dxO,2)+Math.pow(t.dyO,2)+0),t.q1=t.x1O*t.y2O/1,t.q2=t.x2O*t.y1O/1,t.DO=t.q1+0-t.q2,t.q3=t.rO*t.rO/1,t.q4=t.dO*t.dO/1,t.q5=t.q3*t.q4/1,t.q6=t.DO*t.DO/1,t.q7=t.q5+0-t.q6,t.q8=Math.max(t.q7,0),t.sdelO=Math.sqrt(t.q8),t.ndyO=-1*t.dyO/1,t.sdyO=t.ndyO>0?-1:1,t.q9=t.sdyO*t.dxO/1,t.q10=t.q9*t.sdelO/1,t.q11=t.DO*t.dyO/1,t.dxF1=(t.q11+t.q10)/t.q4,t.q12=t.q11+0-t.q10,t.dxF2=+t.q12/t.q4,t.adyO=Math.abs(t.dyO),t.q13=t.adyO*t.sdelO/1,t.q14=-(t.DO*t.dxO/1),t.dyF1=(t.q14+t.q13)/t.q4,t.q15=t.q14+0-t.q13,t.dyF2=+t.q15/t.q4,t.q16=t.x2O+0-t.dxF1,t.q17=t.x2O+0-t.dxF2,t.q18=t.y2O+0-t.dyF1,t.q19=t.y2O+0-t.dyF2,t.q20=Math.sqrt(Math.pow(t.q16,2)+Math.pow(t.q18,2)+0),t.q21=Math.sqrt(Math.pow(t.q17,2)+Math.pow(t.q19,2)+0),t.q22=t.q21+0-t.q20,t.dxF=t.q22>0?t.dxF1:t.dxF2,t.dyF=t.q22>0?t.dyF1:t.dyF2,t.sdxF=t.dxF*t.rw1/t.rO,t.sdyF=t.dyF*t.rh1/t.rO,t.xF=(t.l+t.r)/2+t.sdxF-0,t.yF=(t.t+t.b)/2+t.sdyF-0,t.x1I=t.sx1*t.rI/t.rw2,t.y1I=t.sy1*t.rI/t.rh2,t.x2I=t.sx2*t.rI/t.rw2,t.y2I=t.sy2*t.rI/t.rh2,t.dxI=t.x2I+0-t.x1I,t.dyI=t.y2I+0-t.y1I,t.dI=Math.sqrt(Math.pow(t.dxI,2)+Math.pow(t.dyI,2)+0),t.v1=t.x1I*t.y2I/1,t.v2=t.x2I*t.y1I/1,t.DI=t.v1+0-t.v2,t.v3=t.rI*t.rI/1,t.v4=t.dI*t.dI/1,t.v5=t.v3*t.v4/1,t.v6=t.DI*t.DI/1,t.v7=t.v5+0-t.v6,t.v8=Math.max(t.v7,0),t.sdelI=Math.sqrt(t.v8),t.v9=t.sdyO*t.dxI/1,t.v10=t.v9*t.sdelI/1,t.v11=t.DI*t.dyI/1,t.dxC1=(t.v11+t.v10)/t.v4,t.v12=t.v11+0-t.v10,t.dxC2=+t.v12/t.v4,t.adyI=Math.abs(t.dyI),t.v13=t.adyI*t.sdelI/1,t.v14=-(t.DI*t.dxI/1),t.dyC1=(t.v14+t.v13)/t.v4,t.v15=t.v14+0-t.v13,t.dyC2=+t.v15/t.v4,t.v16=t.x1I+0-t.dxC1,t.v17=t.x1I+0-t.dxC2,t.v18=t.y1I+0-t.dyC1,t.v19=t.y1I+0-t.dyC2,t.v20=Math.sqrt(Math.pow(t.v16,2)+Math.pow(t.v18,2)+0),t.v21=Math.sqrt(Math.pow(t.v17,2)+Math.pow(t.v19,2)+0),t.v22=t.v21+0-t.v20,t.dxC=t.v22>0?t.dxC1:t.dxC2,t.dyC=t.v22>0?t.dyC1:t.dyC2,t.sdxC=t.dxC*t.rw2/t.rI,t.sdyC=t.dyC*t.rh2/t.rI,t.xC=(t.l+t.r)/2+t.sdxC-0,t.yC=(t.t+t.b)/2+t.sdyC-0,t.ist0=108e5*r(t.sdxC,t.sdyC)/Math.PI,t.ist1=t.ist0+216e5-0,t.istAng=t.ist0>0?t.ist0:t.ist1,t.isw1=t.stAng+0-t.istAng,t.isw2=t.isw1+0-216e5,t.iswAng=t.isw1>0?t.isw2:t.isw1,t.p1=t.xF+0-t.xC,t.p2=t.yF+0-t.yC,t.p3=Math.sqrt(Math.pow(t.p1,2)+Math.pow(t.p2,2)+0),t.p4=+t.p3/2,t.p5=t.p4+0-t.thh,t.xGp=t.p5>0?t.xF:t.xG,t.yGp=t.p5>0?t.yF:t.yG,t.xBp=t.p5>0?t.xC:t.xB,t.yBp=t.p5>0?t.yC:t.yB,t.en0=108e5*r(t.sdxF,t.sdyF)/Math.PI,t.en1=t.en0+216e5-0,t.en2=t.en0>0?t.en0:t.en1,t.sw0=t.en2+0-t.stAng,t.sw1=t.sw0+216e5-0,t.swAng=t.sw0>0?t.sw0:t.sw1,t.wtI=t.rw3*Math.sin(t.stAng*Math.PI/108e5),t.htI=t.rh3*Math.cos(t.stAng*Math.PI/108e5),t.dxI=t.rw3*Math.cos(r(t.htI,t.wtI)),t.dyI=t.rh3*Math.sin(r(t.htI,t.wtI)),t.xI=(t.l+t.r)/2+t.dxI-0,t.yI=(t.t+t.b)/2+t.dyI-0,t.aI=t.stAng+0-54e5,t.aA=t.ptAng+54e5-0,t.aB=t.ptAng+108e5-0,t.idx=t.rw1*Math.cos(27e5*Math.PI/108e5),t.idy=t.rh1*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.circularArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.xA,y:t.yA}),e.push(n),(n={}).pos=t=>({x:t.xE,y:t.yE}),e.push(n),(n={}).pos=t=>({x:t.xF,y:t.yF}),e.push(n),(n={}).pos=t=>({x:t.xB,y:t.yB}),e.push(n),e},e.circularArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>t.aI,n.pos=t=>({x:t.xI,y:t.yI}),e.push(n),(n={}).ang=t=>t.ptAng,n.pos=t=>({x:t.xGp,y:t.yGp}),e.push(n),(n={}).ang=t=>t.aA,n.pos=t=>({x:t.xA,y:t.yA}),e.push(n),(n={}).ang=t=>t.aB,n.pos=t=>({x:t.xBp,y:t.yBp}),e.push(n),e},e.circularArrow.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.circularArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.xE,y:t.yE},i.push(s),n=s.x,r=s.y,o=t.rw1,l=t.rh1,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.rw1,ry:t.rh1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.rw1,ry:t.rh1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.xGp,y:t.yGp},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xA,y:t.yA},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xBp,y:t.yBp},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xC,y:t.yC},i.push(s),n=s.x,r=s.y,o=t.rw2,l=t.rh2,h=t.istAng,u=t.iswAng%216e5,(d=0!==t.iswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.rw2,ry:t.rh2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.rw2,ry:t.rh2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.cloud={name:"cloud",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.cloud.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.g29,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.g28}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.g27,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.g30}),e.push(n),e},e.cloud.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.cloud.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:3900*t.w/43200,y:14370*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=-0xae6581,(d=0==(u=7426832))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5333,l=7267,h=-8646143,(d=0==(u=5396714))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7267*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7267*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4365,l=5945,h=-8748475,(d=0==(u=5983381))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4857,l=6595,h=-7859164,(d=0==(u=7034504))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5333,l=7273,h=-4722533,(d=0==(u=6541615))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=6775,l=9220,h=-2776035,(d=0==(u=7816140))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6775*t.w/43200,ry:9220*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6775*t.w/43200,ry:9220*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5785,l=7867,h=37501,(d=0==(u=6842e3))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=6752,l=9215,h=1347096,(d=0==(u=6910353))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=7720,l=10543,h=3974558,(d=0==(u=4542661))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:7720*t.w/43200,ry:10543*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:7720*t.w/43200,ry:10543*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4360,l=5918,h=-0xfbb78d,(d=0==(u=8804134))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4345,l=5945,h=-0xe1fa6e,(d=0==(u=9151131))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:4693*t.w/43200,y:26177*t.h/43200},i.push(s),n=s.x,r=s.y,o=4345,l=5945,h=5204520,(d=0==(u=1585770))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:6928*t.w/43200,y:34899*t.h/43200},i.push(s),n=s.x,r=s.y,o=4360,l=5918,h=4416628,(d=0==(u=686848))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:16478*t.w/43200,y:39090*t.h/43200},i.push(s),n=s.x,r=s.y,o=6752,l=9215,h=8257449,(d=0==(u=844866))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:28827*t.w/43200,y:34751*t.h/43200},i.push(s),n=s.x,r=s.y,o=6752,l=9215,h=387196,(d=0==(u=959901))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:34129*t.w/43200,y:22954*t.h/43200},i.push(s),n=s.x,r=s.y,o=5785,l=7867,h=-4217541,(d=0==(u=4255042))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:41798*t.w/43200,y:15354*t.h/43200},i.push(s),n=s.x,r=s.y,o=5333,l=7273,h=1819082,(d=0==(u=1665090))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:38324*t.w/43200,y:5426*t.h/43200},i.push(s),n=s.x,r=s.y,o=4857,l=6595,h=-824660,(d=0==(u=891534))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:29078*t.w/43200,y:3952*t.h/43200},i.push(s),n=s.x,r=s.y,o=4857,l=6595,h=-8950887,(d=0==(u=1091722))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:22141*t.w/43200,y:4720*t.h/43200},i.push(s),n=s.x,r=s.y,o=4365,l=5945,h=-9809656,(d=0==(u=1061181))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:14e3*t.w/43200,y:5192*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=-4002417,(d=0==(u=739161))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:4127*t.w/43200,y:15789*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=9459261,(d=0==(u=711490))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.cloud.updateShapeGuides=t=>{t.il=2977*t.w/21600,t.it=3262*t.h/21600,t.ir=17087*t.w/21600,t.ib=17337*t.h/21600,t.g27=67*t.w/21600,t.g28=21577*t.h/21600,t.g29=21582*t.w/21600,t.g30=1235*t.h/21600},e.cloudCallout={name:"cloudCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.cloudCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=-20833,e.adj2=62500,e},e.cloudCallout.getAdjustValueNames=()=>["adj1","adj2"],e.cloudCallout.updateShapeGuides=t=>{t.dxPos=t.w*t.adj1/1e5,t.dyPos=t.h*t.adj2/1e5,t.xPos=(t.l+t.r)/2+t.dxPos-0,t.yPos=(t.t+t.b)/2+t.dyPos-0,t.ht=t.h/2*Math.cos(r(t.dxPos,t.dyPos)),t.wt=t.w/2*Math.sin(r(t.dxPos,t.dyPos)),t.g2=t.w/2*Math.cos(r(t.ht,t.wt)),t.g3=t.h/2*Math.sin(r(t.ht,t.wt)),t.g4=(t.l+t.r)/2+t.g2-0,t.g5=(t.t+t.b)/2+t.g3-0,t.g6=t.g4+0-t.xPos,t.g7=t.g5+0-t.yPos,t.g8=Math.sqrt(Math.pow(t.g6,2)+Math.pow(t.g7,2)+0),t.g9=6600*Math.min(t.w,t.h)/21600,t.g10=t.g8+0-t.g9,t.g11=+t.g10/3,t.g12=1800*Math.min(t.w,t.h)/21600,t.g13=t.g11+t.g12-0,t.g14=t.g13*t.g6/t.g8,t.g15=t.g13*t.g7/t.g8,t.g16=t.g14+t.xPos-0,t.g17=t.g15+t.yPos-0,t.g18=4800*Math.min(t.w,t.h)/21600,t.g19=2*t.g11/1,t.g20=t.g18+t.g19-0,t.g21=t.g20*t.g6/t.g8,t.g22=t.g20*t.g7/t.g8,t.g23=t.g21+t.xPos-0,t.g24=t.g22+t.yPos-0,t.g25=1200*Math.min(t.w,t.h)/21600,t.g26=600*Math.min(t.w,t.h)/21600,t.x23=t.xPos+t.g26-0,t.x24=t.g16+t.g25-0,t.x25=t.g23+t.g12-0,t.il=2977*t.w/21600,t.it=3262*t.h/21600,t.ir=17087*t.w/21600,t.ib=17337*t.h/21600,t.g27=67*t.w/21600,t.g28=21577*t.h/21600,t.g29=21582*t.w/21600,t.g30=1235*t.h/21600,t.pang=108e5*r(t.dxPos,t.dyPos)/Math.PI},e.cloudCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.cloudCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>108e5,n.pos=t=>({x:t.g27,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.g28}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.g29,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.g30}),e.push(n),(n={}).ang=t=>t.pang,n.pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.cloudCallout.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.cloudCallout.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:3900*t.w/43200,y:14370*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=-0xae6581,(d=0==(u=7426832))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5333,l=7267,h=-8646143,(d=0==(u=5396714))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7267*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7267*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4365,l=5945,h=-8748475,(d=0==(u=5983381))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4857,l=6595,h=-7859164,(d=0==(u=7034504))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5333,l=7273,h=-4722533,(d=0==(u=6541615))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=6775,l=9220,h=-2776035,(d=0==(u=7816140))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6775*t.w/43200,ry:9220*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6775*t.w/43200,ry:9220*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5785,l=7867,h=37501,(d=0==(u=6842e3))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=6752,l=9215,h=1347096,(d=0==(u=6910353))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=7720,l=10543,h=3974558,(d=0==(u=4542661))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:7720*t.w/43200,ry:10543*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:7720*t.w/43200,ry:10543*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4360,l=5918,h=-0xfbb78d,(d=0==(u=8804134))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=4345,l=5945,h=-0xe1fa6e,(d=0==(u=9151131))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x23,y:t.yPos},i.push(s),n=s.x,r=s.y,o=t.g26,l=t.g26,h=0,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.g26,ry:t.g26,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.g26,ry:t.g26,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x24,y:t.g17},i.push(s),n=s.x,r=s.y,o=t.g25,l=t.g25,h=0,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.g25,ry:t.g25,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.g25,ry:t.g25,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x25,y:t.g24},i.push(s),n=s.x,r=s.y,o=t.g12,l=t.g12,h=0,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.g12,ry:t.g12,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.g12,ry:t.g12,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:4693*t.w/43200,y:26177*t.h/43200},i.push(s),n=s.x,r=s.y,o=4345,l=5945,h=5204520,(d=0==(u=1585770))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4345*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:6928*t.w/43200,y:34899*t.h/43200},i.push(s),n=s.x,r=s.y,o=4360,l=5918,h=4416628,(d=0==(u=686848))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4360*t.w/43200,ry:5918*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:16478*t.w/43200,y:39090*t.h/43200},i.push(s),n=s.x,r=s.y,o=6752,l=9215,h=8257449,(d=0==(u=844866))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:28827*t.w/43200,y:34751*t.h/43200},i.push(s),n=s.x,r=s.y,o=6752,l=9215,h=387196,(d=0==(u=959901))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6752*t.w/43200,ry:9215*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:34129*t.w/43200,y:22954*t.h/43200},i.push(s),n=s.x,r=s.y,o=5785,l=7867,h=-4217541,(d=0==(u=4255042))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5785*t.w/43200,ry:7867*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:41798*t.w/43200,y:15354*t.h/43200},i.push(s),n=s.x,r=s.y,o=5333,l=7273,h=1819082,(d=0==(u=1665090))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5333*t.w/43200,ry:7273*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:38324*t.w/43200,y:5426*t.h/43200},i.push(s),n=s.x,r=s.y,o=4857,l=6595,h=-824660,(d=0==(u=891534))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:29078*t.w/43200,y:3952*t.h/43200},i.push(s),n=s.x,r=s.y,o=4857,l=6595,h=-8950887,(d=0==(u=1091722))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4857*t.w/43200,ry:6595*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:22141*t.w/43200,y:4720*t.h/43200},i.push(s),n=s.x,r=s.y,o=4365,l=5945,h=-9809656,(d=0==(u=1061181))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:4365*t.w/43200,ry:5945*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:14e3*t.w/43200,y:5192*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=-4002417,(d=0==(u=739161))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:4127*t.w/43200,y:15789*t.h/43200},i.push(s),n=s.x,r=s.y,o=6753,l=9190,h=9459261,(d=0==(u=711490))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,43200*n/t.w,43200*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:6753*t.w/43200,ry:9190*t.h/43200,x:c.x*t.w/43200,y:c.y*t.h/43200,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.corner={name:"corner",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.corner.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.corner.getAdjustValueNames=()=>["adj1","adj2"],e.corner.updateShapeGuides=t=>{t.maxAdj1=1e5*t.h/Math.min(t.w,t.h),t.maxAdj2=1e5*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.x1=Math.min(t.w,t.h)*t.a2/1e5,t.dy1=Math.min(t.w,t.h)*t.a1/1e5,t.y1=t.b+0-t.dy1,t.cx1=+t.x1/2,t.cy1=(t.y1+t.b)/2,t.d=t.w+0-t.h,t.it=t.d>0?t.y1:t.t,t.ir=t.d>0?t.r:t.x1},e.corner._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.corner.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.cy1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.cx1,y:t.t}),e.push(n),e},e.corner.getTextRect=t=>({l:t.l,t:t.it,r:t.ir,b:t.b}),e.corner.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.cube={name:"cube",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.cube.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.cube.getAdjustValueNames=()=>["adj"],e.cube.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,1e5)),t.y1=Math.min(t.w,t.h)*t.a/1e5,t.y4=t.b+0-t.y1,t.y2=+t.y4/2,t.y3=(t.y1+t.b)/2,t.x4=t.r+0-t.y1,t.x2=+t.x4/2,t.x3=(t.y1+t.r)/2},e.cube._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),e},e.cube.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.cube.getTextRect=t=>({l:t.l,t:t.y1,r:t.x4,b:t.b}),e.cube.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darkenLess"}),n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.y1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"lightenLess"}),n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.y1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"M",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.curvedConnector2={name:"curvedConnector2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedConnector2.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedConnector2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"C",x1:t.w/2,y1:t.t,x2:t.r,y2:t.h/2,x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.curvedConnector3={name:"curvedConnector3",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedConnector3.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e},e.curvedConnector3.getAdjustValueNames=()=>["adj1"],e.curvedConnector3.updateShapeGuides=t=>{t.x2=t.w*t.adj1/1e5,t.x1=(t.l+t.x2)/2,t.x3=(t.r+t.x2)/2,t.y3=3*t.h/4},e.curvedConnector3._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),e},e.curvedConnector3.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedConnector3.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"C",x1:t.x1,y1:t.t,x2:t.x2,y2:t.h/4,x:t.x2,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"C",x1:t.x2,y1:t.y3,x2:t.x3,y2:t.b,x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.curvedConnector4={name:"curvedConnector4",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedConnector4.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.curvedConnector4.getAdjustValueNames=()=>["adj1","adj2"],e.curvedConnector4.updateShapeGuides=t=>{t.x2=t.w*t.adj1/1e5,t.x1=(t.l+t.x2)/2,t.x3=(t.r+t.x2)/2,t.x4=(t.x2+t.x3)/2,t.x5=(t.x3+t.r)/2,t.y4=t.h*t.adj2/1e5,t.y1=(t.t+t.y4)/2,t.y2=(t.t+t.y1)/2,t.y3=(t.y1+t.y4)/2,t.y5=(t.b+t.y4)/2},e.curvedConnector4._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.y4}),e.push(n),e},e.curvedConnector4.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedConnector4.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"C",x1:t.x1,y1:t.t,x2:t.x2,y2:t.y2,x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"C",x1:t.x2,y1:t.y3,x2:t.x4,y2:t.y4,x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"C",x1:t.x5,y1:t.y4,x2:t.r,y2:t.y5,x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.curvedConnector5={name:"curvedConnector5",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedConnector5.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e.adj3=5e4,e},e.curvedConnector5.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.curvedConnector5.updateShapeGuides=t=>{t.x3=t.w*t.adj1/1e5,t.x6=t.w*t.adj3/1e5,t.x1=(t.x3+t.x6)/2,t.x2=(t.l+t.x3)/2,t.x4=(t.x3+t.x1)/2,t.x5=(t.x6+t.x1)/2,t.x7=(t.x6+t.r)/2,t.y4=t.h*t.adj2/1e5,t.y1=(t.t+t.y4)/2,t.y2=(t.t+t.y1)/2,t.y3=(t.y1+t.y4)/2,t.y5=(t.b+t.y4)/2,t.y6=(t.y5+t.y4)/2,t.y7=(t.y5+t.b)/2},e.curvedConnector5._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.y4}),e.push(n),(n={}).pos=t=>({x:t.x6,y:t.y5}),e.push(n),e},e.curvedConnector5.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedConnector5.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"C",x1:t.x2,y1:t.t,x2:t.x3,y2:t.y2,x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"C",x1:t.x3,y1:t.y3,x2:t.x4,y2:t.y4,x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"C",x1:t.x5,y1:t.y4,x2:t.x6,y2:t.y6,x:t.x6,y:t.y5},n.push(r),r.x,r.y,r={action:"C",x1:t.x6,y1:t.y7,x2:t.x7,y2:t.b,x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.curvedDownArrow={name:"curvedDownArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedDownArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=25e3,e},e.curvedDownArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.curvedDownArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.w/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw=Math.min(t.w,t.h)*t.a2/1e5,t.q1=(t.th+t.aw)/4,t.wR=t.w/2+0-t.q1,t.q7=2*t.wR/1,t.q8=t.q7*t.q7/1,t.q9=t.th*t.th/1,t.q10=t.q8+0-t.q9,t.q11=Math.sqrt(t.q10),t.idy=t.q11*t.h/t.q7,t.maxAdj3=1e5*t.idy/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.ah=Math.min(t.w,t.h)*t.adj3/1e5,t.x3=t.wR+t.th-0,t.q2=t.h*t.h/1,t.q3=t.ah*t.ah/1,t.q4=t.q2+0-t.q3,t.q5=Math.sqrt(t.q4),t.dx=t.q5*t.wR/t.h,t.x5=t.wR+t.dx-0,t.x7=t.x3+t.dx-0,t.q6=t.aw+0-t.th,t.dh=+t.q6/2,t.x4=t.x5+0-t.dh,t.x8=t.x7+t.dh-0,t.aw2=+t.aw/2,t.x6=t.r+0-t.aw2,t.y1=t.b+0-t.ah,t.swAng=108e5*r(t.ah,t.dx)/Math.PI,t.mswAng=0-t.swAng,t.iy=t.b+0-t.idy,t.ix=(t.wR+t.x3)/2,t.q12=+t.th/2,t.dang2=108e5*r(t.idy,t.q12)/Math.PI,t.stAng=162e5+t.swAng-0,t.stAng2=162e5-t.dang2,t.swAng2=t.dang2+0-54e5,t.swAng3=54e5+t.dang2-0},e.curvedDownArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x7,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.curvedDownArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.ix,y:t.t}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.q12,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x6,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x8,y:t.y1}),e.push(n),e},e.curvedDownArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedDownArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x6,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng,u=t.mswAng%216e5,(d=0!==t.mswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=162e5,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.ix,y:t.iy},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng2,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=108e5,u=t.swAng3%216e5,(d=0!==t.swAng3&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.ix,y:t.iy},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng2,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=162e5,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng,u=t.mswAng%216e5,(d=0!==t.mswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.curvedLeftArrow={name:"curvedLeftArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedLeftArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=25e3,e},e.curvedLeftArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.curvedLeftArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.a1=Math.max(0,Math.min(t.adj1,t.a2)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw=Math.min(t.w,t.h)*t.a2/1e5,t.q1=(t.th+t.aw)/4,t.hR=t.h/2+0-t.q1,t.q7=2*t.hR/1,t.q8=t.q7*t.q7/1,t.q9=t.th*t.th/1,t.q10=t.q8+0-t.q9,t.q11=Math.sqrt(t.q10),t.idx=t.q11*t.w/t.q7,t.maxAdj3=1e5*t.idx/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.ah=Math.min(t.w,t.h)*t.a3/1e5,t.y3=t.hR+t.th-0,t.q2=t.w*t.w/1,t.q3=t.ah*t.ah/1,t.q4=t.q2+0-t.q3,t.q5=Math.sqrt(t.q4),t.dy=t.q5*t.hR/t.w,t.y5=t.hR+t.dy-0,t.y7=t.y3+t.dy-0,t.q6=t.aw+0-t.th,t.dh=+t.q6/2,t.y4=t.y5+0-t.dh,t.y8=t.y7+t.dh-0,t.aw2=+t.aw/2,t.y6=t.b+0-t.aw2,t.x1=t.l+t.ah-0,t.swAng=108e5*r(t.ah,t.dy)/Math.PI,t.mswAng=0-t.swAng,t.ix=t.l+t.idx-0,t.iy=(t.hR+t.y3)/2,t.q12=+t.th/2,t.dang2=108e5*r(t.idx,t.q12)/Math.PI,t.swAng2=t.dang2+0-t.swAng,t.swAng3=t.swAng+t.dang2-0,t.stAng3=0-t.dang2},e.curvedLeftArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y5}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y4}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.b}),e.push(n),e},e.curvedLeftArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.q12}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y4}),e.push(n),(n={}).ang=t=>t.cd3,n.pos=t=>({x:t.l,y:t.y6}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.y8}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.iy}),e.push(n),e},e.curvedLeftArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedLeftArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.swAng,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.stAng3,u=t.swAng3%216e5,(d=0!==t.swAng3&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y8},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=0,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y8},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.swAng,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.curvedRightArrow={name:"curvedRightArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedRightArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=25e3,e},e.curvedRightArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.curvedRightArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.a1=Math.max(0,Math.min(t.adj1,t.a2)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw=Math.min(t.w,t.h)*t.a2/1e5,t.q1=(t.th+t.aw)/4,t.hR=t.h/2+0-t.q1,t.q7=2*t.hR/1,t.q8=t.q7*t.q7/1,t.q9=t.th*t.th/1,t.q10=t.q8+0-t.q9,t.q11=Math.sqrt(t.q10),t.idx=t.q11*t.w/t.q7,t.maxAdj3=1e5*t.idx/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.ah=Math.min(t.w,t.h)*t.a3/1e5,t.y3=t.hR+t.th-0,t.q2=t.w*t.w/1,t.q3=t.ah*t.ah/1,t.q4=t.q2+0-t.q3,t.q5=Math.sqrt(t.q4),t.dy=t.q5*t.hR/t.w,t.y5=t.hR+t.dy-0,t.y7=t.y3+t.dy-0,t.q6=t.aw+0-t.th,t.dh=+t.q6/2,t.y4=t.y5+0-t.dh,t.y8=t.y7+t.dh-0,t.aw2=+t.aw/2,t.y6=t.b+0-t.aw2,t.x1=t.r+0-t.ah,t.swAng=108e5*r(t.ah,t.dy)/Math.PI,t.stAng=108e5-t.swAng,t.mswAng=0-t.swAng,t.ix=t.r+0-t.idx,t.iy=(t.hR+t.y3)/2,t.q12=+t.th/2,t.dang2=108e5*r(t.idx,t.q12)/Math.PI,t.swAng2=t.dang2+0-54e5,t.swAng3=54e5+t.dang2-0,t.stAng3=108e5-t.dang2},e.curvedRightArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y5}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y4}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.b}),e.push(n),e},e.curvedRightArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.iy}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.y8}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y6}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x1,y:t.y4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.q12}),e.push(n),e},e.curvedRightArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedRightArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=108e5,u=t.mswAng%216e5,(d=0!==t.mswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y8},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y7},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.th},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=162e5,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.stAng3,u=t.swAng3%216e5,(d=0!==t.swAng3&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=108e5,u=t.mswAng%216e5,(d=0!==t.mswAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y8},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y7},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.th},i.push(s),n=s.x,r=s.y,o=t.w,l=t.hR,h=162e5,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.curvedUpArrow={name:"curvedUpArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.curvedUpArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=25e3,e},e.curvedUpArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.curvedUpArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.w/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw=Math.min(t.w,t.h)*t.a2/1e5,t.q1=(t.th+t.aw)/4,t.wR=t.w/2+0-t.q1,t.q7=2*t.wR/1,t.q8=t.q7*t.q7/1,t.q9=t.th*t.th/1,t.q10=t.q8+0-t.q9,t.q11=Math.sqrt(t.q10),t.idy=t.q11*t.h/t.q7,t.maxAdj3=1e5*t.idy/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.ah=Math.min(t.w,t.h)*t.adj3/1e5,t.x3=t.wR+t.th-0,t.q2=t.h*t.h/1,t.q3=t.ah*t.ah/1,t.q4=t.q2+0-t.q3,t.q5=Math.sqrt(t.q4),t.dx=t.q5*t.wR/t.h,t.x5=t.wR+t.dx-0,t.x7=t.x3+t.dx-0,t.q6=t.aw+0-t.th,t.dh=+t.q6/2,t.x4=t.x5+0-t.dh,t.x8=t.x7+t.dh-0,t.aw2=+t.aw/2,t.x6=t.r+0-t.aw2,t.y1=t.t+t.ah-0,t.swAng=108e5*r(t.ah,t.dx)/Math.PI,t.mswAng=0-t.swAng,t.iy=t.t+t.idy-0,t.ix=(t.wR+t.x3)/2,t.q12=+t.th/2,t.dang2=108e5*r(t.idy,t.q12)/Math.PI,t.swAng2=t.dang2+0-t.swAng,t.mswAng2=0-t.swAng2,t.stAng3=54e5-t.swAng,t.swAng3=t.swAng+t.dang2-0,t.stAng2=54e5-t.dang2},e.curvedUpArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x7,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.curvedUpArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x6,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.q12,y:t.t}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ix,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x8,y:t.y1}),e.push(n),e},e.curvedUpArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.curvedUpArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x6,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng3,u=t.swAng3%216e5,(d=0!==t.swAng3&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng2,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.wR,y:t.b},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.th,y:t.t},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.ix,y:t.iy},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng2,u=t.swAng2%216e5,(d=0!==t.swAng2&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=t.stAng3,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.wR,y:t.b},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.th,y:t.t},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.h,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.h,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.decagon={name:"decagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.decagon.getDefaultAdjustValues=t=>{let e={};return e.vf=105146,e},e.decagon.getAdjustValueNames=()=>["vf"],e.decagon.updateShapeGuides=t=>{t.shd2=t.h/2*t.vf/1e5,t.dx1=t.w/2*Math.cos(216e4*Math.PI/108e5),t.dx2=t.w/2*Math.cos(432e4*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.dy1=t.shd2*Math.sin(432e4*Math.PI/108e5),t.dy2=t.shd2*Math.sin(216e4*Math.PI/108e5),t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y4=(t.t+t.b)/2+t.dy1-0},e.decagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.y1}),e.push(n),e},e.decagon.getTextRect=t=>({l:t.x1,t:t.y2,r:t.x4,b:t.y3}),e.decagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.diagStripe={name:"diagStripe",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.diagStripe.getDefaultAdjustValues=t=>{let e={};return e.adj=5e4,e},e.diagStripe.getAdjustValueNames=()=>["adj"],e.diagStripe.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,1e5)),t.x2=t.w*t.a/1e5,t.x1=+t.x2/2,t.x3=(t.x2+t.r)/2,t.y2=t.h*t.a/1e5,t.y1=+t.y2/2,t.y3=(t.y2+t.b)/2},e.diagStripe._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.diagStripe.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:(t.l+t.r)/2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),e},e.diagStripe.getTextRect=t=>({l:t.l,t:t.t,r:t.x3,b:t.y3}),e.diagStripe.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.diamond={name:"diamond",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.diamond.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.diamond.getTextRect=t=>({l:t.w/4,t:t.h/4,r:t.ir,b:t.ib}),e.diamond.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.diamond.updateShapeGuides=t=>{t.ir=3*t.w/4,t.ib=3*t.h/4},e.dodecagon={name:"dodecagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.dodecagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y3}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),e},e.dodecagon.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x4,b:t.y4}),e.dodecagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.dodecagon.updateShapeGuides=t=>{t.x1=2894*t.w/21600,t.x2=7906*t.w/21600,t.x3=13694*t.w/21600,t.x4=18706*t.w/21600,t.y1=2894*t.h/21600,t.y2=7906*t.h/21600,t.y3=13694*t.h/21600,t.y4=18706*t.h/21600},e.donut={name:"donut",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.donut.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.donut.getAdjustValueNames=()=>["adj"],e.donut.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dr=Math.min(t.w,t.h)*t.a/1e5,t.iwd2=t.w/2+0-t.dr,t.ihd2=t.h/2+0-t.dr,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.donut._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.dr,y:(t.t+t.b)/2}),e.push(n),e},e.donut.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.donut.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.donut.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.dr,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.doubleWave={name:"doubleWave",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.doubleWave.getDefaultAdjustValues=t=>{let e={};return e.adj1=6250,e.adj2=0,e},e.doubleWave.getAdjustValueNames=()=>["adj1","adj2"],e.doubleWave.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,12500)),t.a2=Math.max(-1e4,Math.min(t.adj2,1e4)),t.y1=t.h*t.a1/1e5,t.dy2=10*t.y1/3,t.y2=t.y1+0-t.dy2,t.y3=t.y1+t.dy2-0,t.y4=t.b+0-t.y1,t.y5=t.y4+0-t.dy2,t.y6=t.y4+t.dy2-0,t.dx1=t.w*t.a2/1e5,t.of2=t.w*t.a2/5e4,t.x1=Math.abs(t.dx1),t.dx2=t.of2>0?0:t.of2,t.x2=t.l+0-t.dx2,t.dx8=t.of2>0?t.of2:0,t.x8=t.r+0-t.dx8,t.dx3=(t.dx2+t.x8)/6,t.x3=t.x2+t.dx3-0,t.dx4=(t.dx2+t.x8)/3,t.x4=t.x2+t.dx4-0,t.x5=(t.x2+t.x8)/2,t.x6=t.x5+t.dx3-0,t.x7=(t.x6+t.x8)/2,t.x9=t.l+t.dx8-0,t.x15=t.r+t.dx2-0,t.x10=t.x9+t.dx3-0,t.x11=t.x9+t.dx4-0,t.x12=(t.x9+t.x15)/2,t.x13=t.x12+t.dx3-0,t.x14=(t.x13+t.x15)/2,t.x16=t.r+0-t.x1,t.xAdj=(t.l+t.r)/2+t.dx1-0,t.il=Math.max(t.x2,t.x9),t.ir=Math.min(t.x8,t.x15),t.it=t.h*t.a1/5e4,t.ib=t.b+0-t.it},e.doubleWave._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.xAdj,y:t.b}),e.push(n),e},e.doubleWave.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.x12,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x5,y:t.y4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x16,y:(t.t+t.b)/2}),e.push(n),e},e.doubleWave.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.doubleWave.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"C",x1:t.x3,y1:t.y2,x2:t.x4,y2:t.y3,x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"C",x1:t.x6,y1:t.y2,x2:t.x7,y2:t.y3,x:t.x8,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x15,y:t.y4},n.push(r),r.x,r.y,r={action:"C",x1:t.x14,y1:t.y6,x2:t.x13,y2:t.y5,x:t.x12,y:t.y4},n.push(r),r.x,r.y,r={action:"C",x1:t.x11,y1:t.y6,x2:t.x10,y2:t.y5,x:t.x9,y:t.y4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.downArrow={name:"downArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.downArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.downArrow.getAdjustValueNames=()=>["adj1","adj2"],e.downArrow.updateShapeGuides=t=>{t.maxAdj2=1e5*t.h/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dy1=Math.min(t.w,t.h)*t.a2/1e5,t.y1=t.b+0-t.dy1,t.dx1=t.w*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.dy2=t.x1*t.dy1/(t.w/2),t.y2=t.y1+t.dy2-0},e.downArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),e},e.downArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.downArrow.getTextRect=t=>({l:t.x1,t:t.t,r:t.x2,b:t.y2}),e.downArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.upArrow={name:"upArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.upArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.upArrow.getAdjustValueNames=()=>["adj1","adj2"],e.upArrow.updateShapeGuides=t=>{t.maxAdj2=1e5*t.h/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dy2=Math.min(t.w,t.h)*t.a2/1e5,t.y2=t.t+t.dy2-0,t.dx1=t.w*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.dy1=t.x1*t.dy2/(t.w/2),t.y1=t.y2+0-t.dy1},e.upArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.upArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.upArrow.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x2,b:t.b}),e.upArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.downArrowCallout={name:"downArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.downArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=64977,e},e.downArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.downArrowCallout.updateShapeGuides=t=>{t.maxAdj2=5e4*t.w/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=1e5*t.h/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=t.a3*Math.min(t.w,t.h)/t.h,t.maxAdj4=1e5-t.q2,t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.dx1=Math.min(t.w,t.h)*t.a2/1e5,t.dx2=Math.min(t.w,t.h)*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.dy3=Math.min(t.w,t.h)*t.a3/1e5,t.y3=t.b+0-t.dy3,t.y2=t.h*t.a4/1e5,t.y1=+t.y2/2},e.downArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.downArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.downArrowCallout.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.y2}),e.downArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.ellipse={name:"ellipse",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.ellipse.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.ellipse.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.ellipse.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.ellipse.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.ellipseRibbon={name:"ellipseRibbon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.ellipseRibbon.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=12500,e},e.ellipseRibbon.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.ellipseRibbon.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(25e3,Math.min(t.adj2,75e3)),t.q10=1e5-t.a1,t.q11=+t.q10/2,t.q12=t.a1+0-t.q11,t.minAdj3=Math.max(0,t.q12),t.a3=Math.max(t.minAdj3,Math.min(t.adj3,t.a1)),t.dx2=t.w*t.a2/2e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=t.x2+t.w/8-0,t.x4=t.r+0-t.x3,t.x5=t.r+0-t.x2,t.x6=t.r+0-t.w/8,t.dy1=t.h*t.a3/1e5,t.f1=4*t.dy1/t.w,t.q1=t.x3*t.x3/t.w,t.q2=t.x3+0-t.q1,t.y1=t.f1*t.q2/1,t.cx1=+t.x3/2,t.cy1=t.f1*t.cx1/1,t.cx2=t.r+0-t.cx1,t.q1=t.h*t.a1/1e5,t.dy3=t.q1+0-t.dy1,t.q3=t.x2*t.x2/t.w,t.q4=t.x2+0-t.q3,t.q5=t.f1*t.q4/1,t.y3=t.q5+t.dy3-0,t.q6=t.dy1+t.dy3-t.y3,t.q7=t.q6+t.dy1-0,t.cy3=t.q7+t.dy3-0,t.rh=t.b+0-t.q1,t.q8=14*t.dy1/16,t.y2=(t.q8+t.rh)/2,t.y5=t.q5+t.rh-0,t.y6=t.y3+t.rh-0,t.cx4=+t.x2/2,t.q9=t.f1*t.cx4/1,t.cy4=t.q9+t.rh-0,t.cx5=t.r+0-t.cx4,t.cy6=t.cy3+t.rh-0,t.y7=t.y1+t.dy3-0,t.cy7=t.q1+t.q1-t.y7,t.y8=t.b+0-t.dy1},e.ellipseRibbon._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.q1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y8}),e.push(n),e},e.ellipseRibbon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.q1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/8,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y2}),e.push(n),e},e.ellipseRibbon.getTextRect=t=>({l:t.x2,t:t.q1,r:t.x5,b:t.y6}),e.ellipseRibbon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx1,y1:t.cy1,x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx2,y1:t.cy1,x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.rh},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx5,y1:t.cy4,x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y6},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy6,x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx4,y1:t.cy4,x:t.l,y:t.rh},n.push(r),r.x,r.y,r={action:"L",x:t.w/8,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y7},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy7,x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darkenLess"}),n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx1,y1:t.cy1,x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx2,y1:t.cy1,x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.rh},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx5,y1:t.cy4,x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y6},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy6,x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx4,y1:t.cy4,x:t.l,y:t.rh},n.push(r),r.x,r.y,r={action:"L",x:t.w/8,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"M",x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"M",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"M",x:t.x4,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.ellipseRibbon2={name:"ellipseRibbon2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.ellipseRibbon2.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=5e4,e.adj3=12500,e},e.ellipseRibbon2.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.ellipseRibbon2.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(25e3,Math.min(t.adj2,75e3)),t.q10=1e5-t.a1,t.q11=+t.q10/2,t.q12=t.a1+0-t.q11,t.minAdj3=Math.max(0,t.q12),t.a3=Math.max(t.minAdj3,Math.min(t.adj3,t.a1)),t.dx2=t.w*t.a2/2e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=t.x2+t.w/8-0,t.x4=t.r+0-t.x3,t.x5=t.r+0-t.x2,t.x6=t.r+0-t.w/8,t.dy1=t.h*t.a3/1e5,t.f1=4*t.dy1/t.w,t.q1=t.x3*t.x3/t.w,t.q2=t.x3+0-t.q1,t.u1=t.f1*t.q2/1,t.y1=t.b+0-t.u1,t.cx1=+t.x3/2,t.cu1=t.f1*t.cx1/1,t.cy1=t.b+0-t.cu1,t.cx2=t.r+0-t.cx1,t.q1=t.h*t.a1/1e5,t.dy3=t.q1+0-t.dy1,t.q3=t.x2*t.x2/t.w,t.q4=t.x2+0-t.q3,t.q5=t.f1*t.q4/1,t.u3=t.q5+t.dy3-0,t.y3=t.b+0-t.u3,t.q6=t.dy1+t.dy3-t.u3,t.q7=t.q6+t.dy1-0,t.cu3=t.q7+t.dy3-0,t.cy3=t.b+0-t.cu3,t.rh=t.b+0-t.q1,t.q8=14*t.dy1/16,t.u2=(t.q8+t.rh)/2,t.y2=t.b+0-t.u2,t.u5=t.q5+t.rh-0,t.y5=t.b+0-t.u5,t.u6=t.u3+t.rh-0,t.y6=t.b+0-t.u6,t.cx4=+t.x2/2,t.q9=t.f1*t.cx4/1,t.cu4=t.q9+t.rh-0,t.cy4=t.b+0-t.cu4,t.cx5=t.r+0-t.cx4,t.cu6=t.cu3+t.rh-0,t.cy6=t.b+0-t.cu6,t.u7=t.u1+t.dy3-0,t.y7=t.b+0-t.u7,t.cu7=t.q1+t.q1-t.u7,t.cy7=t.b+0-t.cu7},e.ellipseRibbon2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.rh}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.dy1}),e.push(n),e},e.ellipseRibbon2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/8,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.rh}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y2}),e.push(n),e},e.ellipseRibbon2.getTextRect=t=>({l:t.x2,t:t.y6,r:t.x5,b:t.rh}),e.ellipseRibbon2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx1,y1:t.cy1,x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx2,y1:t.cy1,x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.q1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx5,y1:t.cy4,x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y6},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy6,x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx4,y1:t.cy4,x:t.l,y:t.q1},n.push(r),r.x,r.y,r={action:"L",x:t.w/8,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y7},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy7,x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darkenLess"}),n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.w/8,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.q1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx4,y1:t.cy4,x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy6,x:t.x5,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx5,y1:t.cy4,x:t.r,y:t.q1},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx2,y1:t.cy1,x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"Q",x1:(t.l+t.r)/2,y1:t.cy3,x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"Q",x1:t.cx1,y1:t.cy1,x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"M",x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"M",x:t.x3,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"M",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y7},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.flowChartAlternateProcess={name:"flowChartAlternateProcess",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartAlternateProcess.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartAlternateProcess.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.flowChartAlternateProcess.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:Math.min(t.w,t.h)/6},i.push(s),n=s.x,r=s.y,o=Math.min(t.w,t.h)/6,l=Math.min(t.w,t.h)/6,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=Math.min(t.w,t.h)/6,l=Math.min(t.w,t.h)/6,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=Math.min(t.w,t.h)/6,l=Math.min(t.w,t.h)/6,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:Math.min(t.w,t.h)/6,y:t.b},i.push(s),n=s.x,r=s.y,o=Math.min(t.w,t.h)/6,l=Math.min(t.w,t.h)/6,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:Math.min(t.w,t.h)/6,ry:Math.min(t.w,t.h)/6,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartAlternateProcess.updateShapeGuides=t=>{t.x2=t.r+0-Math.min(t.w,t.h)/6,t.y2=t.b+0-Math.min(t.w,t.h)/6,t.il=Math.min(t.w,t.h)/6*29289/1e5,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.flowChartCollate={name:"flowChartCollate",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartCollate.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),e},e.flowChartCollate.getTextRect=t=>({l:t.w/4,t:t.h/4,r:t.ir,b:t.ib}),e.flowChartCollate.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartCollate.updateShapeGuides=t=>{t.ir=3*t.w/4,t.ib=3*t.h/4},e.flowChartConnector={name:"flowChartConnector",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartConnector.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.flowChartConnector.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.flowChartConnector.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartConnector.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.flowChartDecision={name:"flowChartDecision",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartDecision.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartDecision.getTextRect=t=>({l:t.w/4,t:t.h/4,r:t.ir,b:t.ib}),e.flowChartDecision.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartDecision.updateShapeGuides=t=>{t.ir=3*t.w/4,t.ib=3*t.h/4},e.flowChartDelay={name:"flowChartDelay",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartDelay.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartDelay.getTextRect=t=>({l:t.l,t:t.it,r:t.ir,b:t.ib}),e.flowChartDelay.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartDelay.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.flowChartDisplay={name:"flowChartDisplay",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartDisplay.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartDisplay.getTextRect=t=>({l:t.w/6,t:t.t,r:t.x2,b:t.b}),e.flowChartDisplay.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u;return i=[],n=0,r=0,s={action:"M",x:0*t.w/6,y:3*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"L",x:+t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"L",x:5*t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,o=162e5,(u=0==(l=108e5))&&(l=108e5),h=a(1,3,o*Math.PI/108e5,6*n/t.w,6*r/t.h,(o+l)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:h.x*t.w/6,y:h.y*t.h/6,a:0,b:+(Math.abs(l)>108e5),c:l<0?0:1},i.push(s),u&&(n=s.x,r=s.y,o-=108e5,h=a(1,3,o*Math.PI/108e5,n,r,(o+(l=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:h.x*t.w/6,y:h.y*t.h/6,a:0,b:+(Math.abs(l)>108e5),c:l<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:+t.w/6,y:6*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartDisplay.updateShapeGuides=t=>{t.x2=5*t.w/6},e.flowChartDocument={name:"flowChartDocument",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartDocument.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartDocument.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.y1}),e.flowChartDocument.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:17322*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:10800*t.w/21600,y1:17322*t.h/21600,x2:10800*t.w/21600,y2:23922*t.h/21600,x:0*t.w/21600,y:20172*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartDocument.updateShapeGuides=t=>{t.y1=17322*t.h/21600,t.y2=20172*t.h/21600},e.flowChartExtract={name:"flowChartExtract",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartExtract.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/4,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartExtract.getTextRect=t=>({l:t.w/4,t:(t.t+t.b)/2,r:t.x2,b:t.b}),e.flowChartExtract.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartExtract.updateShapeGuides=t=>{t.x2=3*t.w/4},e.flowChartInputOutput={name:"flowChartInputOutput",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartInputOutput.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/10,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartInputOutput.getTextRect=t=>({l:t.w/5,t:t.t,r:t.x5,b:t.b}),e.flowChartInputOutput.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:+t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:4*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartInputOutput.updateShapeGuides=t=>{t.x3=2*t.w/5,t.x4=3*t.w/5,t.x5=4*t.w/5,t.x6=9*t.w/10},e.flowChartInternalStorage={name:"flowChartInternalStorage",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartInternalStorage.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartInternalStorage.getTextRect=t=>({l:t.w/8,t:t.h/8,r:t.r,b:t.b}),e.flowChartInternalStorage.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:+t.w/8,y:0*t.h/8},n.push(r),r.x,r.y,r={action:"L",x:+t.w/8,y:8*t.h/8},n.push(r),r.x,r.y,r={action:"M",x:0*t.w/8,y:+t.h/8},n.push(r),r.x,r.y,r={action:"L",x:8*t.w/8,y:+t.h/8},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:0*t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.flowChartMagneticDisk={name:"flowChartMagneticDisk",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartMagneticDisk.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.h/3}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartMagneticDisk.getTextRect=t=>({l:t.l,t:t.h/3,r:t.r,b:t.y3}),e.flowChartMagneticDisk.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:0*t.w/6,y:+t.h/6},i.push(s),n=s.x,r=s.y,o=3,l=1,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:6*t.w/6,y:5*t.h/6},i.push(s),n=s.x,r=s.y,o=3,l=1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:6*t.w/6,y:+t.h/6},i.push(s),n=s.x,r=s.y,o=3,l=1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),i=[],n=0,r=0,s={action:"M",x:0*t.w/6,y:+t.h/6},i.push(s),n=s.x,r=s.y,o=3,l=1,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:6*t.w/6,y:5*t.h/6},i.push(s),n=s.x,r=s.y,o=3,l=1,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3*t.w/6,ry:+t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.flowChartMagneticDisk.updateShapeGuides=t=>{t.y3=5*t.h/6},e.flowChartMagneticDrum={name:"flowChartMagneticDrum",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartMagneticDrum.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartMagneticDrum.getTextRect=t=>({l:t.w/6,t:t.t,r:t.x2,b:t.b}),e.flowChartMagneticDrum.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:+t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"L",x:5*t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:+t.w/6,y:6*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:5*t.w/6,y:6*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),i=[],n=0,r=0,s={action:"M",x:+t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"L",x:5*t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:+t.w/6,y:6*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.flowChartMagneticDrum.updateShapeGuides=t=>{t.x2=2*t.w/3},e.flowChartMagneticTape={name:"flowChartMagneticTape",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartMagneticTape.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartMagneticTape.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.flowChartMagneticTape.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:(t.l+t.r)/2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,u=t.ang1%216e5,(d=0!==t.ang1&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.ib},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartMagneticTape.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0,t.ang1=108e5*r(t.w,t.h)/Math.PI},e.flowChartManualInput={name:"flowChartManualInput",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartManualInput.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.hd10}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartManualInput.getTextRect=t=>({l:t.l,t:t.h/5,r:t.r,b:t.b}),e.flowChartManualInput.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/5,y:+t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartManualOperation={name:"flowChartManualOperation",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartManualOperation.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/10,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartManualOperation.getTextRect=t=>({l:t.w/5,t:t.t,r:t.x3,b:t.b}),e.flowChartManualOperation.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:4*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:+t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartManualOperation.updateShapeGuides=t=>{t.x3=4*t.w/5,t.x4=9*t.w/10},e.flowChartMerge={name:"flowChartMerge",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartMerge.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/4,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartMerge.getTextRect=t=>({l:t.w/4,t:t.t,r:t.x2,b:(t.t+t.b)/2}),e.flowChartMerge.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartMerge.updateShapeGuides=t=>{t.x2=3*t.w/4},e.flowChartMultidocument={name:"flowChartMultidocument",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartMultidocument.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y8}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartMultidocument.getTextRect=t=>({l:t.l,t:t.y2,r:t.x5,b:t.y8}),e.flowChartMultidocument.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/21600,y:20782*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:9298*t.w/21600,y1:23542*t.h/21600,x2:9298*t.w/21600,y2:18022*t.h/21600,x:18595*t.w/21600,y:18022*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18595*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:1532*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1532*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:16252*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:19298*t.w/21600,y1:16252*t.h/21600,x2:18595*t.w/21600,y2:16352*t.h/21600,x:18595*t.w/21600,y:16352*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18595*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:2972*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2972*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:14392*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:20800*t.w/21600,y1:14392*t.h/21600,x2:2e4*t.w/21600,y2:14467*t.h/21600,x:2e4*t.w/21600,y:14467*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:0*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18595*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18595*t.w/21600,y:18022*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:9298*t.w/21600,y1:18022*t.h/21600,x2:9298*t.w/21600,y2:23542*t.h/21600,x:0*t.w/21600,y:20782*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:1532*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1532*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:16252*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:19298*t.w/21600,y1:16252*t.h/21600,x2:18595*t.w/21600,y2:16352*t.h/21600,x:18595*t.w/21600,y:16352*t.h/21600},n.push(r),r.x,r.y,r={action:"M",x:2972*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2972*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:14392*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:20800*t.w/21600,y1:14392*t.h/21600,x2:2e4*t.w/21600,y2:14467*t.h/21600,x:2e4*t.w/21600,y:14467*t.h/21600},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:0*t.w/21600,y:20782*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:9298*t.w/21600,y1:23542*t.h/21600,x2:9298*t.w/21600,y2:18022*t.h/21600,x:18595*t.w/21600,y:18022*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18595*t.w/21600,y:16352*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:18595*t.w/21600,y1:16352*t.h/21600,x2:19298*t.w/21600,y2:16252*t.h/21600,x:2e4*t.w/21600,y:16252*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2e4*t.w/21600,y:14467*t.h/21600},n.push(r),r.x,r.y,r={action:"C",x1:2e4*t.w/21600,y1:14467*t.h/21600,x2:20800*t.w/21600,y2:14392*t.h/21600,x:21600*t.w/21600,y:14392*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2972*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:2972*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1532*t.w/21600,y:1815*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1532*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/21600,y:3675*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"none"}),e},e.flowChartMultidocument.updateShapeGuides=t=>{t.y2=3675*t.h/21600,t.y8=20782*t.h/21600,t.x3=9298*t.w/21600,t.x4=12286*t.w/21600,t.x5=18595*t.w/21600},e.flowChartOffpageConnector={name:"flowChartOffpageConnector",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartOffpageConnector.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartOffpageConnector.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.y1}),e.flowChartOffpageConnector.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/10,y:0*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:10*t.w/10,y:0*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:10*t.w/10,y:8*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/10,y:10*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/10,y:8*t.h/10},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartOffpageConnector.updateShapeGuides=t=>{t.y1=4*t.h/5},e.flowChartOnlineStorage={name:"flowChartOnlineStorage",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartOnlineStorage.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartOnlineStorage.getTextRect=t=>({l:t.w/6,t:t.t,r:t.x2,b:t.b}),e.flowChartOnlineStorage.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:+t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,s={action:"L",x:6*t.w/6,y:0*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:+t.w/6,y:6*t.h/6},i.push(s),n=s.x,r=s.y,o=1,l=3,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,6*n/t.w,6*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:+t.w/6,ry:3*t.h/6,x:c.x*t.w/6,y:c.y*t.h/6,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartOnlineStorage.updateShapeGuides=t=>{t.x2=5*t.w/6},e.flowChartOr={name:"flowChartOr",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartOr.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.flowChartOr.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.flowChartOr.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:(t.l+t.r)/2,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.flowChartOr.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.flowChartPredefinedProcess={name:"flowChartPredefinedProcess",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartPredefinedProcess.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartPredefinedProcess.getTextRect=t=>({l:t.w/8,t:t.t,r:t.x2,b:t.b}),e.flowChartPredefinedProcess.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:+t.w/8,y:0*t.h/8},n.push(r),r.x,r.y,r={action:"L",x:+t.w/8,y:8*t.h/8},n.push(r),r.x,r.y,r={action:"M",x:7*t.w/8,y:0*t.h/8},n.push(r),r.x,r.y,r={action:"L",x:7*t.w/8,y:8*t.h/8},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:0*t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.flowChartPredefinedProcess.updateShapeGuides=t=>{t.x2=7*t.w/8},e.flowChartPreparation={name:"flowChartPreparation",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartPreparation.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartPreparation.getTextRect=t=>({l:t.w/5,t:t.t,r:t.x2,b:t.b}),e.flowChartPreparation.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/10,y:5*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/10,y:0*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:8*t.w/10,y:0*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:10*t.w/10,y:5*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:8*t.w/10,y:10*t.h/10},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/10,y:10*t.h/10},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartPreparation.updateShapeGuides=t=>{t.x2=4*t.w/5},e.flowChartProcess={name:"flowChartProcess",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartProcess.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartProcess.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.flowChartProcess.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:0*t.h/1},n.push(r),r.x,r.y,r={action:"L",x:+t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/1,y:+t.h/1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartPunchedCard={name:"flowChartPunchedCard",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartPunchedCard.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartPunchedCard.getTextRect=t=>({l:t.l,t:t.h/5,r:t.r,b:t.b}),e.flowChartPunchedCard.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/5,y:+t.h/5},n.push(r),r.x,r.y,r={action:"L",x:+t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:0*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:5*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/5,y:5*t.h/5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.flowChartPunchedTape={name:"flowChartPunchedTape",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartPunchedTape.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.hd10}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartPunchedTape.getTextRect=t=>({l:t.l,t:t.h/5,r:t.r,b:t.ib}),e.flowChartPunchedTape.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:0*t.w/20,y:2*t.h/20},i.push(s),n=s.x,r=s.y,o=5,l=2,h=108e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,20*n/t.w,20*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5,l=2,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,20*n/t.w,20*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:20*t.w/20,y:18*t.h/20},i.push(s),n=s.x,r=s.y,o=5,l=2,h=0,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,20*n/t.w,20*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=5,l=2,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,20*n/t.w,20*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:5*t.w/20,ry:2*t.h/20,x:c.x*t.w/20,y:c.y*t.h/20,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartPunchedTape.updateShapeGuides=t=>{t.y2=9*t.h/10,t.ib=4*t.h/5},e.flowChartSort={name:"flowChartSort",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartSort.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartSort.getTextRect=t=>({l:t.w/4,t:t.h/4,r:t.ir,b:t.ib}),e.flowChartSort.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:0*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:0*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),n=[],r={action:"M",x:0*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:0*t.h/2},n.push(r),r.x,r.y,r={action:"L",x:2*t.w/2,y:+t.h/2},n.push(r),r.x,r.y,r={action:"L",x:+t.w/2,y:2*t.h/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.flowChartSort.updateShapeGuides=t=>{t.ir=3*t.w/4,t.ib=3*t.h/4},e.flowChartSummingJunction={name:"flowChartSummingJunction",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartSummingJunction.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.flowChartSummingJunction.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.flowChartSummingJunction.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.il,y:t.it},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ir,y:t.ib},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ir,y:t.it},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.il,y:t.ib},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.flowChartSummingJunction.updateShapeGuides=t=>{t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.flowChartTerminator={name:"flowChartTerminator",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.flowChartTerminator.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.flowChartTerminator.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.flowChartTerminator.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:3475*t.w/21600,y:0*t.h/21600},i.push(s),n=s.x,r=s.y,s={action:"L",x:18125*t.w/21600,y:0*t.h/21600},i.push(s),n=s.x,r=s.y,o=3475,l=10800,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,21600*n/t.w,21600*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3475*t.w/21600,ry:10800*t.h/21600,x:c.x*t.w/21600,y:c.y*t.h/21600,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3475*t.w/21600,ry:10800*t.h/21600,x:c.x*t.w/21600,y:c.y*t.h/21600,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:3475*t.w/21600,y:21600*t.h/21600},i.push(s),n=s.x,r=s.y,o=3475,l=10800,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,21600*n/t.w,21600*r/t.h,(h+u)*Math.PI/108e5),s={action:"A",rx:3475*t.w/21600,ry:10800*t.h/21600,x:c.x*t.w/21600,y:c.y*t.h/21600,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:3475*t.w/21600,ry:10800*t.h/21600,x:c.x*t.w/21600,y:c.y*t.h/21600,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.flowChartTerminator.updateShapeGuides=t=>{t.il=1018*t.w/21600,t.ir=20582*t.w/21600,t.it=3163*t.h/21600,t.ib=18437*t.h/21600},e.foldedCorner={name:"foldedCorner",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.foldedCorner.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.foldedCorner.getAdjustValueNames=()=>["adj"],e.foldedCorner.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dy2=Math.min(t.w,t.h)*t.a/1e5,t.dy1=+t.dy2/5,t.x1=t.r+0-t.dy2,t.x2=t.x1+t.dy1-0,t.y2=t.b+0-t.dy2,t.y1=t.y2+t.dy1-0},e.foldedCorner._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.b}),e.push(n),e},e.foldedCorner.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.foldedCorner.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.y2}),e.foldedCorner.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"norm"}),n=[],r={action:"M",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!1,fill:"darkenLess"}),n=[],r={action:"M",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.frame={name:"frame",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.frame.getDefaultAdjustValues=t=>{let e={};return e.adj1=12500,e},e.frame.getAdjustValueNames=()=>["adj1"],e.frame.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.x1=Math.min(t.w,t.h)*t.a1/1e5,t.x4=t.r+0-t.x1,t.y4=t.b+0-t.x1},e.frame._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.frame.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.frame.getTextRect=t=>({l:t.x1,t:t.x1,r:t.x4,b:t.y4}),e.frame.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.x1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.halfFrame={name:"halfFrame",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.halfFrame.getDefaultAdjustValues=t=>{let e={};return e.adj1=33333,e.adj2=33333,e},e.halfFrame.getAdjustValueNames=()=>["adj1","adj2"],e.halfFrame.updateShapeGuides=t=>{t.maxAdj2=1e5*t.w/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.x1=Math.min(t.w,t.h)*t.a2/1e5,t.g1=t.h*t.x1/t.w,t.g2=t.h+0-t.g1,t.maxAdj1=1e5*t.g2/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.y1=Math.min(t.w,t.h)*t.a1/1e5,t.dx2=t.y1*t.w/t.h,t.x2=t.r+0-t.dx2,t.dy2=t.x1*t.h/t.w,t.y2=t.b+0-t.dy2,t.cx1=+t.x1/2,t.cy1=(t.y2+t.b)/2,t.cx2=(t.x2+t.r)/2,t.cy2=+t.y1/2},e.halfFrame._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.halfFrame.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.cx2,y:t.cy2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.cx1,y:t.cy1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.halfFrame.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.halfFrame.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.heart={name:"heart",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.heart.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.h/4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),e},e.heart.getTextRect=t=>({l:t.il,t:t.h/4,r:t.ir,b:t.ib}),e.heart.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:(t.l+t.r)/2,y:t.h/4},n.push(r),r.x,r.y,r={action:"C",x1:t.x3,y1:t.y1,x2:t.x4,y2:t.h/4,x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"C",x1:t.x1,y1:t.h/4,x2:t.x2,y2:t.y1,x:(t.l+t.r)/2,y:t.h/4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.heart.updateShapeGuides=t=>{t.dx1=49*t.w/48,t.dx2=10*t.w/48,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=t.t+0-t.h/3,t.il=+t.w/6,t.ir=5*t.w/6,t.ib=2*t.h/3},e.heptagon={name:"heptagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.heptagon.getDefaultAdjustValues=t=>{let e={};return e.hf=102572,e.vf=105210,e},e.heptagon.getAdjustValueNames=()=>["hf","vf"],e.heptagon.updateShapeGuides=t=>{t.swd2=t.w/2*t.hf/1e5,t.shd2=t.h/2*t.vf/1e5,t.svc=(t.t+t.b)/2*t.vf/1e5,t.dx1=97493*t.swd2/1e5,t.dx2=78183*t.swd2/1e5,t.dx3=43388*t.swd2/1e5,t.dy1=62349*t.shd2/1e5,t.dy2=22252*t.shd2/1e5,t.dy3=90097*t.shd2/1e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+t.dx3-0,t.x5=(t.l+t.r)/2+t.dx2-0,t.x6=(t.l+t.r)/2+t.dx1-0,t.y1=t.svc+0-t.dy1,t.y2=t.svc+t.dy2-0,t.y3=t.svc+t.dy3-0,t.ib=t.b+0-t.y1},e.heptagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x5,y:t.y1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.heptagon.getTextRect=t=>({l:t.x2,t:t.y1,r:t.x5,b:t.ib}),e.heptagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.hexagon={name:"hexagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.hexagon.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e.vf=115470,e},e.hexagon.getAdjustValueNames=()=>["adj","vf"],e.hexagon.updateShapeGuides=t=>{t.maxAdj=5e4*t.w/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.shd2=t.h/2*t.vf/1e5,t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.dy1=t.shd2*Math.sin(36e5*Math.PI/108e5),t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.q1=-1*t.maxAdj/2,t.q2=t.a+t.q1-0,t.q3=t.q2>0?4:2,t.q4=t.q2>0?3:2,t.q5=t.q2>0?t.q1:0,t.q6=(t.a+t.q5)/t.q1,t.q7=-(t.q6*t.q4/1),t.q8=t.q3+t.q7-0,t.il=t.w*t.q8/24,t.it=t.h*t.q8/24,t.ir=t.r+0-t.il,t.ib=t.b+0-t.it},e.hexagon._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.hexagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),e},e.hexagon.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.hexagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.homePlate={name:"homePlate",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.homePlate.getDefaultAdjustValues=t=>{let e={};return e.adj=5e4,e},e.homePlate.getAdjustValueNames=()=>["adj"],e.homePlate.updateShapeGuides=t=>{t.maxAdj=1e5*t.w/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.dx1=Math.min(t.w,t.h)*t.a/1e5,t.x1=t.r+0-t.dx1,t.ir=(t.x1+t.r)/2,t.x2=+t.x1/2},e.homePlate._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.homePlate.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.homePlate.getTextRect=t=>({l:t.l,t:t.t,r:t.ir,b:t.b}),e.homePlate.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.horizontalScroll={name:"horizontalScroll",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.horizontalScroll.getDefaultAdjustValues=t=>{let e={};return e.adj=12500,e},e.horizontalScroll.getAdjustValueNames=()=>["adj"],e.horizontalScroll.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,25e3)),t.ch=Math.min(t.w,t.h)*t.a/1e5,t.ch2=+t.ch/2,t.ch4=+t.ch/4,t.y3=t.ch+t.ch2-0,t.y4=t.ch+t.ch-0,t.y6=t.b+0-t.ch,t.y7=t.b+0-t.ch2,t.y5=t.y6+0-t.ch2,t.x3=t.r+0-t.ch,t.x4=t.r+0-t.ch2},e.horizontalScroll._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.ch,y:t.t}),e.push(n),e},e.horizontalScroll.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.ch}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y6}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.horizontalScroll.getTextRect=t=>({l:t.ch,t:t.ch,r:t.x4,b:t.y6}),e.horizontalScroll.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.r,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch2,y:t.ch},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y7},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=108e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y6},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ch2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=0,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.ch2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=0,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x4,y:t.ch},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-162e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=108e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y7},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x3,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.ch},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.x4,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.ch2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch2,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=108e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.ch,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y6},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.irregularSeal1={name:"irregularSeal1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.irregularSeal1.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x24,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y6}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x12,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y18}),e.push(n),e},e.irregularSeal1.getTextRect=t=>({l:t.x5,t:t.y3,r:t.x21,b:t.y9}),e.irregularSeal1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:10800*t.w/21600,y:5800*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14522*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14155*t.w/21600,y:5325*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18380*t.w/21600,y:4457*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16702*t.w/21600,y:7315*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21097*t.w/21600,y:8137*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:17607*t.w/21600,y:10475*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:13290*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16837*t.w/21600,y:12942*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18145*t.w/21600,y:18095*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14020*t.w/21600,y:14457*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:13247*t.w/21600,y:19737*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:10532*t.w/21600,y:14935*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:8485*t.w/21600,y:21600*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:7715*t.w/21600,y:15627*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:4762*t.w/21600,y:17617*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:5667*t.w/21600,y:13937*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:135*t.w/21600,y:14587*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:3722*t.w/21600,y:11775*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/21600,y:8615*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:4627*t.w/21600,y:7617*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:370*t.w/21600,y:2295*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:7312*t.w/21600,y:6320*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:8352*t.w/21600,y:2295*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.irregularSeal1.updateShapeGuides=t=>{t.x5=4627*t.w/21600,t.x12=8485*t.w/21600,t.x21=16702*t.w/21600,t.x24=14522*t.w/21600,t.y3=6320*t.h/21600,t.y6=8615*t.h/21600,t.y9=13937*t.h/21600,t.y18=13290*t.h/21600},e.irregularSeal2={name:"irregularSeal2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.irregularSeal2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y8}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x16,y:t.y16}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y24}),e.push(n),e},e.irregularSeal2.getTextRect=t=>({l:t.x5,t:t.y3,r:t.x19,b:t.y17}),e.irregularSeal2.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:11462*t.w/21600,y:4342*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14790*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14525*t.w/21600,y:5777*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18007*t.w/21600,y:3172*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16380*t.w/21600,y:6532*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:6645*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16985*t.w/21600,y:9402*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18270*t.w/21600,y:11290*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16380*t.w/21600,y:12310*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:18877*t.w/21600,y:15632*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14640*t.w/21600,y:14350*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14942*t.w/21600,y:17370*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:12180*t.w/21600,y:15935*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:11612*t.w/21600,y:18842*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:9872*t.w/21600,y:17370*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:8700*t.w/21600,y:19712*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:7527*t.w/21600,y:18125*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:4917*t.w/21600,y:21600*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:4805*t.w/21600,y:18240*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1285*t.w/21600,y:17825*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:3330*t.w/21600,y:15370*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/21600,y:12877*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:3935*t.w/21600,y:11592*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:1172*t.w/21600,y:8270*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:5372*t.w/21600,y:7817*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:4502*t.w/21600,y:3625*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:8550*t.w/21600,y:6382*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:9722*t.w/21600,y:1887*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.irregularSeal2.updateShapeGuides=t=>{t.x2=9722*t.w/21600,t.x5=5372*t.w/21600,t.x16=11612*t.w/21600,t.x19=14640*t.w/21600,t.y2=1887*t.h/21600,t.y3=6382*t.h/21600,t.y8=12877*t.h/21600,t.y14=19712*t.h/21600,t.y16=18842*t.h/21600,t.y17=15935*t.h/21600,t.y24=6645*t.h/21600},e.leftArrow={name:"leftArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.leftArrow.getAdjustValueNames=()=>["adj1","adj2"],e.leftArrow.updateShapeGuides=t=>{t.maxAdj2=1e5*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.x2=t.l+t.dx2-0,t.dy1=t.h*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.dx1=t.y1*t.dx2/(t.h/2),t.x1=t.x2+0-t.dx1},e.leftArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.leftArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.leftArrow.getTextRect=t=>({l:t.x1,t:t.y1,r:t.r,b:t.y2}),e.leftArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.leftArrowCallout={name:"leftArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=64977,e},e.leftArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.leftArrowCallout.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=1e5*t.w/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=t.a3*Math.min(t.w,t.h)/t.w,t.maxAdj4=1e5-t.q2,t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.dy1=Math.min(t.w,t.h)*t.a2/1e5,t.dy2=Math.min(t.w,t.h)*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y4=(t.t+t.b)/2+t.dy1-0,t.x1=Math.min(t.w,t.h)*t.a3/1e5,t.dx2=t.w*t.a4/1e5,t.x2=t.r+0-t.dx2,t.x3=(t.x2+t.r)/2},e.leftArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.b}),e.push(n),e},e.leftArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.leftArrowCallout.getTextRect=t=>({l:t.x2,t:t.t,r:t.r,b:t.b}),e.leftArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.leftBrace={name:"leftBrace",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftBrace.getDefaultAdjustValues=t=>{let e={};return e.adj1=8333,e.adj2=5e4,e},e.leftBrace.getAdjustValueNames=()=>["adj1","adj2"],e.leftBrace.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,1e5)),t.q1=1e5-t.a2,t.q2=Math.min(t.q1,t.a2),t.q3=+t.q2/2,t.maxAdj1=t.q3*t.h/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.y1=Math.min(t.w,t.h)*t.a1/1e5,t.y3=t.h*t.a2/1e5,t.y4=t.y3+t.y1-0,t.dx1=t.w/2*Math.cos(27e5*Math.PI/108e5),t.dy1=t.y1*Math.sin(27e5*Math.PI/108e5),t.il=t.r+0-t.dx1,t.it=t.y1+0-t.dy1,t.ib=t.b+t.dy1-t.y1},e.leftBrace._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y3}),e.push(n),e},e.leftBrace.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),e},e.leftBrace.getTextRect=t=>({l:t.il,t:t.it,r:t.r,b:t.ib}),e.leftBrace.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.leftBracket={name:"leftBracket",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftBracket.getDefaultAdjustValues=t=>{let e={};return e.adj=8333,e},e.leftBracket.getAdjustValueNames=()=>["adj"],e.leftBracket.updateShapeGuides=t=>{t.maxAdj=5e4*t.h/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.y1=Math.min(t.w,t.h)*t.a/1e5,t.y2=t.b+0-t.y1,t.dx1=t.w*Math.cos(27e5*Math.PI/108e5),t.dy1=t.y1*Math.sin(27e5*Math.PI/108e5),t.il=t.r+0-t.dx1,t.it=t.y1+0-t.dy1,t.ib=t.b+t.dy1-t.y1},e.leftBracket._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),e},e.leftBracket.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),e},e.leftBracket.getTextRect=t=>({l:t.il,t:t.it,r:t.r,b:t.ib}),e.leftBracket.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.leftRightArrow={name:"leftRightArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftRightArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.leftRightArrow.getAdjustValueNames=()=>["adj1","adj2"],e.leftRightArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.x2=Math.min(t.w,t.h)*t.a2/1e5,t.x3=t.r+0-t.x2,t.dy=t.h*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy,t.y2=(t.t+t.b)/2+t.dy-0,t.dx1=t.y1*t.x2/(t.h/2),t.x1=t.x2+0-t.dx1,t.x4=t.x3+t.dx1-0},e.leftRightArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.leftRightArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),e},e.leftRightArrow.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x4,b:t.y2}),e.leftRightArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.leftRightArrowCallout={name:"leftRightArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftRightArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=48123,e},e.leftRightArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.leftRightArrowCallout.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=5e4*t.w/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=t.a3*Math.min(t.w,t.h)/(t.w/2),t.maxAdj4=1e5-t.q2,t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.dy1=Math.min(t.w,t.h)*t.a2/1e5,t.dy2=Math.min(t.w,t.h)*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y4=(t.t+t.b)/2+t.dy1-0,t.x1=Math.min(t.w,t.h)*t.a3/1e5,t.x4=t.r+0-t.x1,t.dx2=t.w*t.a4/2e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0},e.leftRightArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.b}),e.push(n),e},e.leftRightArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.leftRightArrowCallout.getTextRect=t=>({l:t.x2,t:t.t,r:t.x3,b:t.b}),e.leftRightArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.leftRightUpArrow={name:"leftRightUpArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftRightUpArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e},e.leftRightUpArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.leftRightUpArrow.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.q1=1e5-t.maxAdj1,t.maxAdj3=+t.q1/2,t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.x1=Math.min(t.w,t.h)*t.a3/1e5,t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x5=(t.l+t.r)/2+t.dx2-0,t.dx3=Math.min(t.w,t.h)*t.a1/2e5,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+t.dx3-0,t.x6=t.r+0-t.x1,t.dy2=Math.min(t.w,t.h)*t.a2/5e4,t.y2=t.b+0-t.dy2,t.y4=t.b+0-t.dx2,t.y3=t.y4+0-t.dx3,t.y5=t.y4+t.dx3-0,t.il=t.dx3*t.x1/t.dx2,t.ir=t.r+0-t.il},e.leftRightUpArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.x1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.x1}),e.push(n),e},e.leftRightUpArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y5}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y4}),e.push(n),e},e.leftRightUpArrow.getTextRect=t=>({l:t.il,t:t.y3,r:t.ir,b:t.y5}),e.leftRightUpArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.leftUpArrow={name:"leftUpArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.leftUpArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e},e.leftUpArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.leftUpArrow.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=1e5-t.maxAdj1,t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.x1=Math.min(t.w,t.h)*t.a3/1e5,t.dx2=Math.min(t.w,t.h)*t.a2/5e4,t.x2=t.r+0-t.dx2,t.y2=t.b+0-t.dx2,t.dx4=Math.min(t.w,t.h)*t.a2/1e5,t.x4=t.r+0-t.dx4,t.y4=t.b+0-t.dx4,t.dx3=Math.min(t.w,t.h)*t.a1/2e5,t.x3=t.x4+0-t.dx3,t.x5=t.x4+t.dx3-0,t.y3=t.y4+0-t.dx3,t.y5=t.y4+t.dx3-0,t.il=t.dx3*t.x1/t.dx4,t.cx1=(t.x1+t.x5)/2,t.cy1=(t.x1+t.y5)/2},e.leftUpArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.x1}),e.push(n),e},e.leftUpArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x2,y:t.x1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.cx1,y:t.y5}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x5,y:t.cy1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.x1}),e.push(n),e},e.leftUpArrow.getTextRect=t=>({l:t.il,t:t.y3,r:t.x4,b:t.y5}),e.leftUpArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.lightningBolt={name:"lightningBolt",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.lightningBolt.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y6}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x5,y:t.y11}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x11,y:t.y7}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x8,y:t.y2}),e.push(n),e},e.lightningBolt.getTextRect=t=>({l:t.x4,t:t.y4,r:t.x9,b:t.y10}),e.lightningBolt.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:8472*t.w/21600,y:0*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:12860*t.w/21600,y:6080*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:11050*t.w/21600,y:6797*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:16577*t.w/21600,y:12007*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:14767*t.w/21600,y:12877*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:21600*t.w/21600,y:21600*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:10012*t.w/21600,y:14915*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:12222*t.w/21600,y:13987*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:5022*t.w/21600,y:9705*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:7602*t.w/21600,y:8382*t.h/21600},n.push(r),r.x,r.y,r={action:"L",x:0*t.w/21600,y:3890*t.h/21600},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.lightningBolt.updateShapeGuides=t=>{t.x1=5022*t.w/21600,t.x3=8472*t.w/21600,t.x4=8757*t.w/21600,t.x5=10012*t.w/21600,t.x8=12860*t.w/21600,t.x9=13917*t.w/21600,t.x11=16577*t.w/21600,t.y1=3890*t.h/21600,t.y2=6080*t.h/21600,t.y4=7437*t.h/21600,t.y6=9705*t.h/21600,t.y7=12007*t.h/21600,t.y10=14277*t.h/21600,t.y11=14915*t.h/21600},e.line={name:"line",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.line.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),e},e.line.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.lineInv={name:"lineInv",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.lineInv.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.b}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.r,y:t.t}),e.push(n),e},e.lineInv.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.mathDivide={name:"mathDivide",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathDivide.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e.adj2=5880,e.adj3=11760,e},e.mathDivide.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.mathDivide.updateShapeGuides=t=>{t.a1=Math.max(1e3,Math.min(t.adj1,36745)),t.ma1=0-t.a1,t.ma3h=(73490+t.ma1)/4,t.ma3w=36745*t.w/t.h,t.maxAdj3=Math.min(t.ma3h,t.ma3w),t.a3=Math.max(1e3,Math.min(t.adj3,t.maxAdj3)),t.m4a3=-4*t.a3/1,t.maxAdj2=73490+t.m4a3-t.a1,t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dy1=t.h*t.a1/2e5,t.yg=t.h*t.a2/1e5,t.rad=t.h*t.a3/1e5,t.dx1=73490*t.w/2e5,t.y3=(t.t+t.b)/2+0-t.dy1,t.y4=(t.t+t.b)/2+t.dy1-0,t.a=t.yg+t.rad-0,t.y2=t.y3+0-t.a,t.y1=t.y2+0-t.rad,t.y5=t.b+0-t.y1,t.x1=(t.l+t.r)/2+0-t.dx1,t.x3=(t.l+t.r)/2+t.dx1-0,t.x2=(t.l+t.r)/2+0-t.rad},e.mathDivide._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.mathDivide.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x3,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y5}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),e},e.mathDivide.getTextRect=t=>({l:t.x1,t:t.y3,r:t.x3,b:t.y4}),e.mathDivide.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:(t.l+t.r)/2,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.rad,l=t.rad,h=162e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.rad,ry:t.rad,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.rad,ry:t.rad,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:(t.l+t.r)/2,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.rad,l=t.rad,h=54e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.rad,ry:t.rad,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.rad,ry:t.rad,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x1,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.mathEqual={name:"mathEqual",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathEqual.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e.adj2=11760,e},e.mathEqual.getAdjustValueNames=()=>["adj1","adj2"],e.mathEqual.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,36745)),t["2a1"]=2*t.a1/1,t.mAdj2=1e5-t["2a1"],t.a2=Math.max(0,Math.min(t.adj2,t.mAdj2)),t.dy1=t.h*t.a1/1e5,t.dy2=t.h*t.a2/2e5,t.dx1=73490*t.w/2e5,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y1=t.y2+0-t.dy1,t.y4=t.y3+t.dy1-0,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.yC1=(t.y1+t.y2)/2,t.yC2=(t.y3+t.y4)/2},e.mathEqual._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.mathEqual.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:t.yC1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:t.yC2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.yC1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.yC2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),e},e.mathEqual.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x2,b:t.y4}),e.mathEqual.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.mathMinus={name:"mathMinus",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathMinus.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e},e.mathMinus.getAdjustValueNames=()=>["adj1"],e.mathMinus.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.dy1=t.h*t.a1/2e5,t.dx1=73490*t.w/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0},e.mathMinus._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),e},e.mathMinus.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),e},e.mathMinus.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x2,b:t.y2}),e.mathMinus.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.mathMultiply={name:"mathMultiply",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathMultiply.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e},e.mathMultiply.getAdjustValueNames=()=>["adj1"],e.mathMultiply.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,51965)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.a=108e5*r(t.w,t.h)/Math.PI,t.sa=+Math.sin(t.a*Math.PI/108e5),t.ca=+Math.cos(t.a*Math.PI/108e5),t.ta=+Math.tan(t.a*Math.PI/108e5),t.dl=Math.sqrt(Math.pow(t.w,2)+Math.pow(t.h,2)+0),t.rw=51965*t.dl/1e5,t.lM=t.dl+0-t.rw,t.xM=t.ca*t.lM/2,t.yM=t.sa*t.lM/2,t.dxAM=t.sa*t.th/2,t.dyAM=t.ca*t.th/2,t.xA=t.xM+0-t.dxAM,t.yA=t.yM+t.dyAM-0,t.xB=t.xM+t.dxAM-0,t.yB=t.yM+0-t.dyAM,t.xBC=(t.l+t.r)/2+0-t.xB,t.yBC=t.xBC*t.ta/1,t.yC=t.yBC+t.yB-0,t.xD=t.r+0-t.xB,t.xE=t.r+0-t.xA,t.yFE=(t.t+t.b)/2+0-t.yA,t.xFE=+t.yFE/t.ta,t.xF=t.xE+0-t.xFE,t.xL=t.xA+t.xFE-0,t.yG=t.b+0-t.yA,t.yH=t.b+0-t.yB,t.yI=t.b+0-t.yC,t.xC2=t.r+0-t.xM,t.yC3=t.b+0-t.yM},e.mathMultiply._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.th}),e.push(n),e},e.mathMultiply.getConnections=t=>{let e=[],n;return(n={}).ang=t=>108e5,n.pos=t=>({x:t.xM,y:t.yM}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.xC2,y:t.yM}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.xC2,y:t.yC3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.xM,y:t.yC3}),e.push(n),e},e.mathMultiply.getTextRect=t=>({l:t.xA,t:t.yB,r:t.xE,b:t.yH}),e.mathMultiply.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.xA,y:t.yA},n.push(r),r.x,r.y,r={action:"L",x:t.xB,y:t.yB},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.yC},n.push(r),r.x,r.y,r={action:"L",x:t.xD,y:t.yB},n.push(r),r.x,r.y,r={action:"L",x:t.xE,y:t.yA},n.push(r),r.x,r.y,r={action:"L",x:t.xF,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.xE,y:t.yG},n.push(r),r.x,r.y,r={action:"L",x:t.xD,y:t.yH},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.yI},n.push(r),r.x,r.y,r={action:"L",x:t.xB,y:t.yH},n.push(r),r.x,r.y,r={action:"L",x:t.xA,y:t.yG},n.push(r),r.x,r.y,r={action:"L",x:t.xL,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.mathNotEqual={name:"mathNotEqual",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathNotEqual.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e.adj2=66e5,e.adj3=11760,e},e.mathNotEqual.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.mathNotEqual.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.crAng=Math.max(42e5,Math.min(t.adj2,66e5)),t["2a1"]=2*t.a1/1,t.maxAdj3=1e5-t["2a1"],t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.dy1=t.h*t.a1/1e5,t.dy2=t.h*t.a3/2e5,t.dx1=73490*t.w/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x8=(t.l+t.r)/2+t.dx1-0,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y1=t.y2+0-t.dy1,t.y4=t.y3+t.dy1-0,t.cadj2=t.crAng+0-54e5,t.xadj2=t.h/2*Math.tan(t.cadj2*Math.PI/108e5),t.len=Math.sqrt(Math.pow(t.xadj2,2)+Math.pow(t.h/2,2)+0),t.bhw=t.len*t.dy1/(t.h/2),t.bhw2=+t.bhw/2,t.x7=(t.l+t.r)/2+t.xadj2-t.bhw2,t.dx67=t.xadj2*t.y1/(t.h/2),t.x6=t.x7+0-t.dx67,t.dx57=t.xadj2*t.y2/(t.h/2),t.x5=t.x7+0-t.dx57,t.dx47=t.xadj2*t.y3/(t.h/2),t.x4=t.x7+0-t.dx47,t.dx37=t.xadj2*t.y4/(t.h/2),t.x3=t.x7+0-t.dx37,t.dx27=2*t.xadj2/1,t.x2=t.x7+0-t.dx27,t.rx7=t.x7+t.bhw-0,t.rx6=t.x6+t.bhw-0,t.rx5=t.x5+t.bhw-0,t.rx4=t.x4+t.bhw-0,t.rx3=t.x3+t.bhw-0,t.rx2=t.x2+t.bhw-0,t.dx7=t.dy1*(t.h/2)/t.len,t.rxt=t.x7+t.dx7-0,t.lxt=t.rx7+0-t.dx7,t.rx=t.cadj2>0?t.rxt:t.rx7,t.lx=t.cadj2>0?t.x7:t.lxt,t.dy3=t.dy1*t.xadj2/t.len,t.dy4=0-t.dy3,t.ry=t.cadj2>0?t.dy3:t.t,t.ly=t.cadj2>0?t.t:t.dy4,t.dlx=t.w+0-t.rx,t.drx=t.w+0-t.lx,t.dly=t.h+0-t.ry,t.dry=t.h+0-t.ly,t.xC1=(t.rx+t.lx)/2,t.xC2=(t.drx+t.dlx)/2,t.yC1=(t.ry+t.ly)/2,t.yC2=(t.y1+t.y2)/2,t.yC3=(t.y3+t.y4)/2,t.yC4=(t.dry+t.dly)/2},e.mathNotEqual._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.lx,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.mathNotEqual.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x8,y:t.yC2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x8,y:t.yC3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.xC2,y:t.yC4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.yC2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.yC3}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.xC1,y:t.yC1}),e.push(n),e},e.mathNotEqual.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x8,b:t.y4}),e.mathNotEqual.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.lx,y:t.ly},n.push(r),r.x,r.y,r={action:"L",x:t.rx,y:t.ry},n.push(r),r.x,r.y,r={action:"L",x:t.rx6,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.rx5,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.rx4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.rx3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.drx,y:t.dry},n.push(r),r.x,r.y,r={action:"L",x:t.dlx,y:t.dly},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.mathPlus={name:"mathPlus",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.mathPlus.getDefaultAdjustValues=t=>{let e={};return e.adj1=23520,e},e.mathPlus.getAdjustValueNames=()=>["adj1"],e.mathPlus.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,73490)),t.dx1=73490*t.w/2e5,t.dy1=73490*t.h/2e5,t.dx2=Math.min(t.w,t.h)*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dx2,t.y3=(t.t+t.b)/2+t.dx2-0,t.y4=(t.t+t.b)/2+t.dy1-0},e.mathPlus._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.mathPlus.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),e},e.mathPlus.getTextRect=t=>({l:t.x1,t:t.y2,r:t.x4,b:t.y3}),e.mathPlus.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.moon={name:"moon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.moon.getDefaultAdjustValues=t=>{let e={};return e.adj=5e4,e},e.moon.getAdjustValueNames=()=>["adj"],e.moon.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,87500)),t.g0=Math.min(t.w,t.h)*t.a/1e5,t.g0w=t.g0*t.w/Math.min(t.w,t.h),t.g1=Math.min(t.w,t.h)+0-t.g0,t.g2=t.g0*t.g0/t.g1,t.g3=Math.min(t.w,t.h)*Math.min(t.w,t.h)/t.g1,t.g4=2*t.g3/1,t.g5=t.g4+0-t.g2,t.g6=t.g5+0-t.g0,t.g6w=t.g6*t.w/Math.min(t.w,t.h),t.g7=+t.g5/2,t.g8=t.g7+0-t.g0,t.dy1=t.g8*(t.h/2)/Math.min(t.w,t.h),t.g10h=(t.t+t.b)/2+0-t.dy1,t.g11h=(t.t+t.b)/2+t.dy1-0,t.g12=9598*t.g0/32768,t.g12w=t.g12*t.w/Math.min(t.w,t.h),t.g13=Math.min(t.w,t.h)+0-t.g12,t.q1=Math.min(t.w,t.h)*Math.min(t.w,t.h)/1,t.q2=t.g13*t.g13/1,t.q3=t.q1+0-t.q2,t.q4=Math.sqrt(t.q3),t.dy4=t.q4*(t.h/2)/Math.min(t.w,t.h),t.g15h=(t.t+t.b)/2+0-t.dy4,t.g16h=(t.t+t.b)/2+t.dy4-0,t.g17w=t.g6w+0-t.g0w,t.g18w=+t.g17w/2,t.dx2p=t.g0w+t.g18w-t.w,t.dx2=-1*t.dx2p/1,t.dy2=-(t.h/2*1)/1,t.stAng1=108e5*r(t.dx2,t.dy2)/Math.PI,t.enAngp1=108e5*r(t.dx2,t.h/2)/Math.PI,t.enAng1=t.enAngp1+0-216e5,t.swAng1=t.enAng1+0-t.stAng1},e.moon._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.g0w,y:(t.t+t.b)/2}),e.push(n),e},e.moon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.r,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.g0w,y:(t.t+t.b)/2}),e.push(n),e},e.moon.getTextRect=t=>({l:t.g12w,t:t.g15h,r:t.g0w,b:t.g16h}),e.moon.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w,l=t.h/2,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.g18w,l=t.dy1,h=t.stAng1,u=t.swAng1%216e5,(d=0!==t.swAng1&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.g18w,ry:t.dy1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.g18w,ry:t.dy1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.noSmoking={name:"noSmoking",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.noSmoking.getDefaultAdjustValues=t=>{let e={};return e.adj=18750,e},e.noSmoking.getAdjustValueNames=()=>["adj"],e.noSmoking.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dr=Math.min(t.w,t.h)*t.a/1e5,t.iwd2=t.w/2+0-t.dr,t.ihd2=t.h/2+0-t.dr,t.ang=108e5*r(t.w,t.h)/Math.PI,t.ct=t.ihd2*Math.cos(t.ang*Math.PI/108e5),t.st=t.iwd2*Math.sin(t.ang*Math.PI/108e5),t.m=Math.sqrt(Math.pow(t.ct,2)+Math.pow(t.st,2)+0),t.n=t.iwd2*t.ihd2/t.m,t.drd2=+t.dr/2,t.dang=108e5*r(t.n,t.drd2)/Math.PI,t["2dang"]=2*t.dang/1,t.swAng=-108e5+t["2dang"]-0,t.t3=108e5*r(t.w,t.h)/Math.PI,t.stAng1=t.t3+0-t.dang,t.stAng2=t.stAng1+0-108e5,t.ct1=t.ihd2*Math.cos(t.stAng1*Math.PI/108e5),t.st1=t.iwd2*Math.sin(t.stAng1*Math.PI/108e5),t.m1=Math.sqrt(Math.pow(t.ct1,2)+Math.pow(t.st1,2)+0),t.n1=t.iwd2*t.ihd2/t.m1,t.dx1=t.n1*Math.cos(t.stAng1*Math.PI/108e5),t.dy1=t.n1*Math.sin(t.stAng1*Math.PI/108e5),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.x2=(t.l+t.r)/2+0-t.dx1,t.y2=(t.t+t.b)/2+0-t.dy1,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.noSmoking._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.dr,y:(t.t+t.b)/2}),e.push(n),e},e.noSmoking.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.noSmoking.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.noSmoking.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=t.stAng1,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x2,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.iwd2,l=t.ihd2,h=t.stAng2,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.iwd2,ry:t.ihd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.notchedRightArrow={name:"notchedRightArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.notchedRightArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.notchedRightArrow.getAdjustValueNames=()=>["adj1","adj2"],e.notchedRightArrow.updateShapeGuides=t=>{t.maxAdj2=1e5*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.x2=t.r+0-t.dx2,t.dy1=t.h*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.x1=t.dy1*t.dx2/(t.h/2),t.x3=t.r+0-t.x1},e.notchedRightArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.notchedRightArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.notchedRightArrow.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x3,b:t.y2}),e.notchedRightArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.octagon={name:"octagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.octagon.getDefaultAdjustValues=t=>{let e={};return e.adj=29289,e},e.octagon.getAdjustValueNames=()=>["adj"],e.octagon.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1,t.il=+t.x1/2,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.octagon._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.octagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.x1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.x1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.octagon.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.octagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.parallelogram={name:"parallelogram",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.parallelogram.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.parallelogram.getAdjustValueNames=()=>["adj"],e.parallelogram.updateShapeGuides=t=>{t.maxAdj=1e5*t.w/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.x1=Math.min(t.w,t.h)*t.a/2e5,t.x2=Math.min(t.w,t.h)*t.a/1e5,t.x6=t.r+0-t.x1,t.x5=t.r+0-t.x2,t.x3=+t.x5/2,t.x4=t.r+0-t.x3,t.il=t.w/2*t.a/t.maxAdj,t.q1=5*t.a/t.maxAdj,t.q2=(1+t.q1)/12,t.il=t.q2*t.w/1,t.it=t.q2*t.h/1,t.ir=t.r+0-t.il,t.ib=t.b+0-t.it,t.q3=t.h*((t.l+t.r)/2)/t.x2,t.y1=Math.max(0,Math.min(t.q3,t.h)),t.y2=t.b+0-t.y1},e.parallelogram._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.parallelogram.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.t}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),e},e.parallelogram.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.parallelogram.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.pentagon={name:"pentagon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.pentagon.getDefaultAdjustValues=t=>{let e={};return e.hf=105146,e.vf=110557,e},e.pentagon.getAdjustValueNames=()=>["hf","vf"],e.pentagon.updateShapeGuides=t=>{t.swd2=t.w/2*t.hf/1e5,t.shd2=t.h/2*t.vf/1e5,t.svc=(t.t+t.b)/2*t.vf/1e5,t.dx1=t.swd2*Math.cos(108e4*Math.PI/108e5),t.dx2=t.swd2*Math.cos(1836e4*Math.PI/108e5),t.dy1=t.shd2*Math.sin(108e4*Math.PI/108e5),t.dy2=t.shd2*Math.sin(1836e4*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=t.svc+0-t.dy1,t.y2=t.svc+0-t.dy2,t.it=t.y1*t.dx2/t.dx1},e.pentagon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),e},e.pentagon.getTextRect=t=>({l:t.x2,t:t.it,r:t.x3,b:t.y2}),e.pentagon.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.pie={name:"pie",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.pie.getDefaultAdjustValues=t=>{let e={};return e.adj1=0,e.adj2=162e5,e},e.pie.getAdjustValueNames=()=>["adj1","adj2"],e.pie.updateShapeGuides=t=>{t.stAng=Math.max(0,Math.min(t.adj1,0x14996ff)),t.enAng=Math.max(0,Math.min(t.adj2,0x14996ff)),t.sw1=t.enAng+0-t.stAng,t.sw2=t.sw1+216e5-0,t.swAng=t.sw1>0?t.sw1:t.sw2,t.wt1=t.w/2*Math.sin(t.stAng*Math.PI/108e5),t.ht1=t.h/2*Math.cos(t.stAng*Math.PI/108e5),t.dx1=t.w/2*Math.cos(r(t.ht1,t.wt1)),t.dy1=t.h/2*Math.sin(r(t.ht1,t.wt1)),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.wt2=t.w/2*Math.sin(t.enAng*Math.PI/108e5),t.ht2=t.h/2*Math.cos(t.enAng*Math.PI/108e5),t.dx2=t.w/2*Math.cos(r(t.ht2,t.wt2)),t.dy2=t.h/2*Math.sin(r(t.ht2,t.wt2)),t.x2=(t.l+t.r)/2+t.dx2-0,t.y2=(t.t+t.b)/2+t.dy2-0,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.pie._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.y2}),e.push(n),e},e.pie.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.pie.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.pie.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.plaque={name:"plaque",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.plaque.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.plaque.getAdjustValueNames=()=>["adj"],e.plaque.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1,t.il=70711*t.x1/1e5,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.plaque._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.plaque.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.plaque.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.plaque.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.plus={name:"plus",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.plus.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.plus.getAdjustValueNames=()=>["adj"],e.plus.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1,t.d=t.w+0-t.h,t.il=t.d>0?t.l:t.x1,t.ir=t.d>0?t.r:t.x2,t.it=t.d>0?t.x1:t.t,t.ib=t.d>0?t.y2:t.b},e.plus._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.plus.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.plus.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.plus.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.quadArrow={name:"quadArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.quadArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=22500,e.adj2=22500,e.adj3=22500,e},e.quadArrow.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.quadArrow.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.q1=1e5-t.maxAdj1,t.maxAdj3=+t.q1/2,t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.x1=Math.min(t.w,t.h)*t.a3/1e5,t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x5=(t.l+t.r)/2+t.dx2-0,t.dx3=Math.min(t.w,t.h)*t.a1/2e5,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+t.dx3-0,t.x6=t.r+0-t.x1,t.y2=(t.t+t.b)/2+0-t.dx2,t.y5=(t.t+t.b)/2+t.dx2-0,t.y3=(t.t+t.b)/2+0-t.dx3,t.y4=(t.t+t.b)/2+t.dx3-0,t.y6=t.b+0-t.x1,t.il=t.dx3*t.x1/t.dx2,t.ir=t.r+0-t.il},e.quadArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.x1}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.x1}),e.push(n),e},e.quadArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.quadArrow.getTextRect=t=>({l:t.il,t:t.y3,r:t.ir,b:t.y4}),e.quadArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.x1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.quadArrowCallout={name:"quadArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.quadArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=18515,e.adj2=18515,e.adj3=18515,e.adj4=48123,e},e.quadArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.quadArrowCallout.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=5e4-t.a2,t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=2*t.a3/1,t.maxAdj4=1e5-t.q2,t.a4=Math.max(t.a1,Math.min(t.adj4,t.maxAdj4)),t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.dx3=Math.min(t.w,t.h)*t.a1/2e5,t.ah=Math.min(t.w,t.h)*t.a3/1e5,t.dx1=t.w*t.a4/2e5,t.dy1=t.h*t.a4/2e5,t.x8=t.r+0-t.ah,t.x2=(t.l+t.r)/2+0-t.dx1,t.x7=(t.l+t.r)/2+t.dx1-0,t.x3=(t.l+t.r)/2+0-t.dx2,t.x6=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+0-t.dx3,t.x5=(t.l+t.r)/2+t.dx3-0,t.y8=t.b+0-t.ah,t.y2=(t.t+t.b)/2+0-t.dy1,t.y7=(t.t+t.b)/2+t.dy1-0,t.y3=(t.t+t.b)/2+0-t.dx2,t.y6=(t.t+t.b)/2+t.dx2-0,t.y4=(t.t+t.b)/2+0-t.dx3,t.y5=(t.t+t.b)/2+t.dx3-0},e.quadArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x4,y:t.ah}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.ah}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.quadArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.quadArrowCallout.getTextRect=t=>({l:t.x2,t:t.y2,r:t.x7,b:t.y7}),e.quadArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.ah,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.ah,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.ah},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.ah},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.ah},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.ah},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.ah,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.ah,y:t.y6},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.rect={name:"rect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.rect.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.rect.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.ribbon={name:"ribbon",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.ribbon.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=5e4,e},e.ribbon.getAdjustValueNames=()=>["adj1","adj2"],e.ribbon.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,33333)),t.a2=Math.max(25e3,Math.min(t.adj2,75e3)),t.x10=t.r+0-t.w/8,t.dx2=t.w*t.a2/2e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x9=(t.l+t.r)/2+t.dx2-0,t.x3=t.x2+t.w/32-0,t.x8=t.x9+0-t.w/32,t.x5=t.x2+t.w/8-0,t.x6=t.x9+0-t.w/8,t.x4=t.x5+0-t.w/32,t.x7=t.x6+t.w/32-0,t.y1=t.h*t.a1/2e5,t.y2=t.h*t.a1/1e5,t.y4=t.b+0-t.y2,t.y3=+t.y4/2,t.hR=t.h*t.a1/4e5,t.y5=t.b+0-t.hR,t.y6=t.y2+0-t.hR},e.ribbon._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.ribbon.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/8,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x10,y:t.y3}),e.push(n),e},e.ribbon.getTextRect=t=>({l:t.x2,t:t.y2,r:t.x9,b:t.b}),e.ribbon.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.w/8,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x5,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x6,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y5},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.w/8,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x5,y:t.hR},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x6,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.hR},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x9,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.ribbon2={name:"ribbon2",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.ribbon2.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=5e4,e},e.ribbon2.getAdjustValueNames=()=>["adj1","adj2"],e.ribbon2.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,33333)),t.a2=Math.max(25e3,Math.min(t.adj2,75e3)),t.x10=t.r+0-t.w/8,t.dx2=t.w*t.a2/2e5,t.x2=(t.l+t.r)/2+0-t.dx2,t.x9=(t.l+t.r)/2+t.dx2-0,t.x3=t.x2+t.w/32-0,t.x8=t.x9+0-t.w/32,t.x5=t.x2+t.w/8-0,t.x6=t.x9+0-t.w/8,t.x4=t.x5+0-t.w/32,t.x7=t.x6+t.w/32-0,t.dy1=t.h*t.a1/2e5,t.y1=t.b+0-t.dy1,t.dy2=t.h*t.a1/1e5,t.y2=t.b+0-t.dy2,t.y4=t.t+t.dy2-0,t.y3=(t.y4+t.b)/2,t.hR=t.h*t.a1/4e5,t.y6=t.b+0-t.hR,t.y7=t.y1+0-t.hR},e.ribbon2._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.b}),e.push(n),e},e.ribbon2.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.w/8,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x10,y:t.y3}),e.push(n),e},e.ribbon2.getTextRect=t=>({l:t.x2,t:t.t,r:t.x9,b:t.y2}),e.ribbon2.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.w/8,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x5,y:t.y6},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x6,y:t.y6},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.w/8,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.hR},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.b},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/32,l=t.hR,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/32,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x5,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x5,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x6,y:t.y6},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x2,y:t.y7},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y7},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.rightArrow={name:"rightArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rightArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.rightArrow.getAdjustValueNames=()=>["adj1","adj2"],e.rightArrow.updateShapeGuides=t=>{t.maxAdj2=1e5*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.dx1=Math.min(t.w,t.h)*t.a2/1e5,t.x1=t.r+0-t.dx1,t.dy1=t.h*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.dx2=t.y1*t.dx1/(t.h/2),t.x2=t.x1+t.dx2-0},e.rightArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.rightArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.rightArrow.getTextRect=t=>({l:t.l,t:t.y1,r:t.x2,b:t.y2}),e.rightArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.rightArrowCallout={name:"rightArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rightArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=64977,e},e.rightArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.rightArrowCallout.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=1e5*t.w/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=t.a3*Math.min(t.w,t.h)/t.w,t.maxAdj4=1e5-t.q2,t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.dy1=Math.min(t.w,t.h)*t.a2/1e5,t.dy2=Math.min(t.w,t.h)*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y4=(t.t+t.b)/2+t.dy1-0,t.dx3=Math.min(t.w,t.h)*t.a3/1e5,t.x3=t.r+0-t.dx3,t.x2=t.w*t.a4/1e5,t.x1=+t.x2/2},e.rightArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x3,y:t.y2}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x3,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.b}),e.push(n),e},e.rightArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.rightArrowCallout.getTextRect=t=>({l:t.l,t:t.t,r:t.x2,b:t.b}),e.rightArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.rightBrace={name:"rightBrace",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rightBrace.getDefaultAdjustValues=t=>{let e={};return e.adj1=8333,e.adj2=5e4,e},e.rightBrace.getAdjustValueNames=()=>["adj1","adj2"],e.rightBrace.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,1e5)),t.q1=1e5-t.a2,t.q2=Math.min(t.q1,t.a2),t.q3=+t.q2/2,t.maxAdj1=t.q3*t.h/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.y1=Math.min(t.w,t.h)*t.a1/1e5,t.y3=t.h*t.a2/1e5,t.y2=t.y3+0-t.y1,t.y4=t.b+0-t.y1,t.dx1=t.w/2*Math.cos(27e5*Math.PI/108e5),t.dy1=t.y1*Math.sin(27e5*Math.PI/108e5),t.ir=t.l+t.dx1-0,t.it=t.y1+0-t.dy1,t.ib=t.b+t.dy1-t.y1},e.rightBrace._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y3}),e.push(n),e},e.rightBrace.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.r,y:t.y3}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.l,y:t.b}),e.push(n),e},e.rightBrace.getTextRect=t=>({l:t.l,t:t.it,r:t.ir,b:t.ib}),e.rightBrace.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=108e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:(t.l+t.r)/2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.y1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.rightBracket={name:"rightBracket",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rightBracket.getDefaultAdjustValues=t=>{let e={};return e.adj=8333,e},e.rightBracket.getAdjustValueNames=()=>["adj"],e.rightBracket.updateShapeGuides=t=>{t.maxAdj=5e4*t.h/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.y1=Math.min(t.w,t.h)*t.a/1e5,t.y2=t.b+0-t.y1,t.dx1=t.w*Math.cos(27e5*Math.PI/108e5),t.dy1=t.y1*Math.sin(27e5*Math.PI/108e5),t.ir=t.l+t.dx1-0,t.it=t.y1+0-t.dy1,t.ib=t.b+t.dy1-t.y1},e.rightBracket._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),e},e.rightBracket.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.l,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.rightBracket.getTextRect=t=>({l:t.l,t:t.it,r:t.ir,b:t.ib}),e.rightBracket.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.w,l=t.y1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w,ry:t.y1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.round1Rect={name:"round1Rect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.round1Rect.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.round1Rect.getAdjustValueNames=()=>["adj"],e.round1Rect.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=Math.min(t.w,t.h)*t.a/1e5,t.x1=t.r+0-t.dx1,t.idx=29289*t.dx1/1e5,t.ir=t.r+0-t.idx},e.round1Rect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.round1Rect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.round1Rect.getTextRect=t=>({l:t.l,t:t.t,r:t.ir,b:t.b}),e.round1Rect.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.t},i.push(s),n=s.x,r=s.y,o=t.dx1,l=t.dx1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.dx1,ry:t.dx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.dx1,ry:t.dx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.round2DiagRect={name:"round2DiagRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.round2DiagRect.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=0,e},e.round2DiagRect.getAdjustValueNames=()=>["adj1","adj2"],e.round2DiagRect.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.x1=Math.min(t.w,t.h)*t.a1/1e5,t.y1=t.b+0-t.x1,t.a=Math.min(t.w,t.h)*t.a2/1e5,t.x2=t.r+0-t.a,t.y2=t.b+0-t.a,t.dx1=29289*t.x1/1e5,t.dx2=29289*t.a/1e5,t.d=t.dx1+0-t.dx2,t.dx=t.d>0?t.dx1:t.dx2,t.ir=t.r+0-t.dx,t.ib=t.b+0-t.dx},e.round2DiagRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.round2DiagRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.round2DiagRect.getTextRect=t=>({l:t.dx,t:t.dx,r:t.ir,b:t.ib}),e.round2DiagRect.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.a,l=t.a,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.a,ry:t.a,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.a,ry:t.a,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.a,y:t.b},i.push(s),n=s.x,r=s.y,o=t.a,l=t.a,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.a,ry:t.a,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.a,ry:t.a,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.round2SameRect={name:"round2SameRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.round2SameRect.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=0,e},e.round2SameRect.getAdjustValueNames=()=>["adj1","adj2"],e.round2SameRect.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.tx1=Math.min(t.w,t.h)*t.a1/1e5,t.tx2=t.r+0-t.tx1,t.bx1=Math.min(t.w,t.h)*t.a2/1e5,t.bx2=t.r+0-t.bx1,t.by1=t.b+0-t.bx1,t.d=t.tx1+0-t.bx1,t.tdx=29289*t.tx1/1e5,t.bdx=29289*t.bx1/1e5,t.il=t.d>0?t.tdx:t.bdx,t.ir=t.r+0-t.il,t.ib=t.b+0-t.bdx},e.round2SameRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.tx2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.bx1,y:t.b}),e.push(n),e},e.round2SameRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.round2SameRect.getTextRect=t=>({l:t.il,t:t.tdx,r:t.ir,b:t.ib}),e.round2SameRect.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.tx1,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.tx2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.tx1,l=t.tx1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.tx1,ry:t.tx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.tx1,ry:t.tx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.by1},i.push(s),n=s.x,r=s.y,o=t.bx1,l=t.bx1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bx1,ry:t.bx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bx1,ry:t.bx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.bx1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.bx1,l=t.bx1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bx1,ry:t.bx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bx1,ry:t.bx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.tx1},i.push(s),n=s.x,r=s.y,o=t.tx1,l=t.tx1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.tx1,ry:t.tx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.tx1,ry:t.tx1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.roundRect={name:"roundRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.roundRect.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.roundRect.getAdjustValueNames=()=>["adj"],e.roundRect.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.x1=Math.min(t.w,t.h)*t.a/1e5,t.x2=t.r+0-t.x1,t.y2=t.b+0-t.x1,t.il=29289*t.x1/1e5,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.roundRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.roundRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.roundRect.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.roundRect.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.rtTriangle={name:"rtTriangle",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.rtTriangle.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.l,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:(t.l+t.r)/2,y:(t.t+t.b)/2}),e.push(n),e},e.rtTriangle.getTextRect=t=>({l:t.w/12,t:t.it,r:t.ir,b:t.ib}),e.rtTriangle.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.rtTriangle.updateShapeGuides=t=>{t.it=7*t.h/12,t.ir=7*t.w/12,t.ib=11*t.h/12},e.smileyFace={name:"smileyFace",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.smileyFace.getDefaultAdjustValues=t=>{let e={};return e.adj=4653,e},e.smileyFace.getAdjustValueNames=()=>["adj"],e.smileyFace.updateShapeGuides=t=>{t.a=Math.max(-4653,Math.min(t.adj,4653)),t.x1=4969*t.w/21699,t.x2=6215*t.w/21600,t.x3=13135*t.w/21600,t.x4=16640*t.w/21600,t.y1=7570*t.h/21600,t.y3=16515*t.h/21600,t.dy2=t.h*t.a/1e5,t.y2=t.y3+0-t.dy2,t.y4=t.y3+t.dy2-0,t.dy3=t.h*t.a/5e4,t.y5=t.y4+t.dy3-0,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0,t.wR=1125*t.w/21600,t.hR=1125*t.h/21600},e.smileyFace._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.y4}),e.push(n),e},e.smileyFace.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),e},e.smileyFace.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.smileyFace.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x2,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.hR,h=108e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"M",x:t.x3,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.hR,h=108e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"Q",x1:(t.l+t.r)/2,y1:t.y5,x:t.x4,y:t.y2},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.snip1Rect={name:"snip1Rect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.snip1Rect.getDefaultAdjustValues=t=>{let e={};return e.adj=16667,e},e.snip1Rect.getAdjustValueNames=()=>["adj"],e.snip1Rect.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=Math.min(t.w,t.h)*t.a/1e5,t.x1=t.r+0-t.dx1,t.it=+t.dx1/2,t.ir=(t.x1+t.r)/2},e.snip1Rect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.snip1Rect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.snip1Rect.getTextRect=t=>({l:t.l,t:t.it,r:t.ir,b:t.b}),e.snip1Rect.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.dx1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.snip2DiagRect={name:"snip2DiagRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.snip2DiagRect.getDefaultAdjustValues=t=>{let e={};return e.adj1=0,e.adj2=16667,e},e.snip2DiagRect.getAdjustValueNames=()=>["adj1","adj2"],e.snip2DiagRect.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.lx1=Math.min(t.w,t.h)*t.a1/1e5,t.lx2=t.r+0-t.lx1,t.ly1=t.b+0-t.lx1,t.rx1=Math.min(t.w,t.h)*t.a2/1e5,t.rx2=t.r+0-t.rx1,t.ry1=t.b+0-t.rx1,t.d=t.lx1+0-t.rx1,t.dx=t.d>0?t.lx1:t.rx1,t.il=+t.dx/2,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.snip2DiagRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.lx1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.rx2,y:t.t}),e.push(n),e},e.snip2DiagRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.snip2DiagRect.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.snip2DiagRect.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.lx1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.rx2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.rx1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.ly1},n.push(r),r.x,r.y,r={action:"L",x:t.lx2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.rx1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.ry1},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.lx1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.snip2SameRect={name:"snip2SameRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.snip2SameRect.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=0,e},e.snip2SameRect.getAdjustValueNames=()=>["adj1","adj2"],e.snip2SameRect.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.tx1=Math.min(t.w,t.h)*t.a1/1e5,t.tx2=t.r+0-t.tx1,t.bx1=Math.min(t.w,t.h)*t.a2/1e5,t.bx2=t.r+0-t.bx1,t.by1=t.b+0-t.bx1,t.d=t.tx1+0-t.bx1,t.dx=t.d>0?t.tx1:t.bx1,t.il=+t.dx/2,t.ir=t.r+0-t.il,t.it=+t.tx1/2,t.ib=(t.by1+t.b)/2},e.snip2SameRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.tx2,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.bx1,y:t.b}),e.push(n),e},e.snip2SameRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.snip2SameRect.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.snip2SameRect.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.tx1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.tx2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.tx1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.by1},n.push(r),r.x,r.y,r={action:"L",x:t.bx2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.bx1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.by1},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.tx1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.snipRoundRect={name:"snipRoundRect",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.snipRoundRect.getDefaultAdjustValues=t=>{let e={};return e.adj1=16667,e.adj2=16667,e},e.snipRoundRect.getAdjustValueNames=()=>["adj1","adj2"],e.snipRoundRect.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,5e4)),t.a2=Math.max(0,Math.min(t.adj2,5e4)),t.x1=Math.min(t.w,t.h)*t.a1/1e5,t.dx2=Math.min(t.w,t.h)*t.a2/1e5,t.x2=t.r+0-t.dx2,t.il=29289*t.x1/1e5,t.ir=(t.x2+t.r)/2},e.snipRoundRect._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.snipRoundRect.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.snipRoundRect.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.b}),e.snipRoundRect.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.x1,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.dx2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.x1},i.push(s),n=s.x,r=s.y,o=t.x1,l=t.x1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.x1,ry:t.x1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.star10={name:"star10",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star10.getDefaultAdjustValues=t=>{let e={};return e.adj=42533,e.hf=105146,e},e.star10.getAdjustValueNames=()=>["adj","hf"],e.star10.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.swd2=t.w/2*t.hf/1e5,t.dx1=95106*t.swd2/1e5,t.dx2=58779*t.swd2/1e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.dy1=t.h/2*80902/1e5,t.dy2=t.h/2*30902/1e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+t.dy2-0,t.y4=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.swd2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=80902*t.iwd2/1e5,t.sdx2=30902*t.iwd2/1e5,t.sdy1=95106*t.ihd2/1e5,t.sdy2=58779*t.ihd2/1e5,t.sx1=(t.l+t.r)/2+0-t.iwd2,t.sx2=(t.l+t.r)/2+0-t.sdx1,t.sx3=(t.l+t.r)/2+0-t.sdx2,t.sx4=(t.l+t.r)/2+t.sdx2-0,t.sx5=(t.l+t.r)/2+t.sdx1-0,t.sx6=(t.l+t.r)/2+t.iwd2-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+t.sdy2-0,t.sy4=(t.t+t.b)/2+t.sdy1-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star10._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star10.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.y1}),e.push(n),e},e.star10.getTextRect=t=>({l:t.sx2,t:t.sy2,r:t.sx5,b:t.sy3}),e.star10.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star12={name:"star12",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star12.getDefaultAdjustValues=t=>{let e={};return e.adj=37500,e},e.star12.getAdjustValueNames=()=>["adj"],e.star12.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=t.w/2*Math.cos(18e5*Math.PI/108e5),t.dy1=t.h/2*Math.sin(36e5*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x3=3*t.w/4,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.y3=3*t.h/4,t.y4=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=t.iwd2*Math.cos(9e5*Math.PI/108e5),t.sdx2=t.iwd2*Math.cos(27e5*Math.PI/108e5),t.sdx3=t.iwd2*Math.cos(45e5*Math.PI/108e5),t.sdy1=t.ihd2*Math.sin(45e5*Math.PI/108e5),t.sdy2=t.ihd2*Math.sin(27e5*Math.PI/108e5),t.sdy3=t.ihd2*Math.sin(9e5*Math.PI/108e5),t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+0-t.sdx3,t.sx4=(t.l+t.r)/2+t.sdx3-0,t.sx5=(t.l+t.r)/2+t.sdx2-0,t.sx6=(t.l+t.r)/2+t.sdx1-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+0-t.sdy3,t.sy4=(t.t+t.b)/2+t.sdy3-0,t.sy5=(t.t+t.b)/2+t.sdy2-0,t.sy6=(t.t+t.b)/2+t.sdy1-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star12._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star12.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.h/4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.w/4,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.h/4}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.w/4,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.y1}),e.push(n),e},e.star12.getTextRect=t=>({l:t.sx2,t:t.sy2,r:t.sx5,b:t.sy5}),e.star12.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.h/4},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.w/4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.h/4},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.w/4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star16={name:"star16",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star16.getDefaultAdjustValues=t=>{let e={};return e.adj=37500,e},e.star16.getAdjustValueNames=()=>["adj"],e.star16.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=t.w/2*92388/1e5,t.dx2=t.w/2*70711/1e5,t.dx3=t.w/2*38268/1e5,t.dy1=t.h/2*92388/1e5,t.dy2=t.h/2*70711/1e5,t.dy3=t.h/2*38268/1e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+t.dx3-0,t.x5=(t.l+t.r)/2+t.dx2-0,t.x6=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+0-t.dy3,t.y4=(t.t+t.b)/2+t.dy3-0,t.y5=(t.t+t.b)/2+t.dy2-0,t.y6=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=98079*t.iwd2/1e5,t.sdx2=83147*t.iwd2/1e5,t.sdx3=55557*t.iwd2/1e5,t.sdx4=19509*t.iwd2/1e5,t.sdy1=98079*t.ihd2/1e5,t.sdy2=83147*t.ihd2/1e5,t.sdy3=55557*t.ihd2/1e5,t.sdy4=19509*t.ihd2/1e5,t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+0-t.sdx3,t.sx4=(t.l+t.r)/2+0-t.sdx4,t.sx5=(t.l+t.r)/2+t.sdx4-0,t.sx6=(t.l+t.r)/2+t.sdx3-0,t.sx7=(t.l+t.r)/2+t.sdx2-0,t.sx8=(t.l+t.r)/2+t.sdx1-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+0-t.sdy3,t.sy4=(t.t+t.b)/2+0-t.sdy4,t.sy5=(t.t+t.b)/2+t.sdy4-0,t.sy6=(t.t+t.b)/2+t.sdy3-0,t.sy7=(t.t+t.b)/2+t.sdy2-0,t.sy8=(t.t+t.b)/2+t.sdy1-0,t.idx=t.iwd2*Math.cos(27e5*Math.PI/108e5),t.idy=t.ihd2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.it=(t.t+t.b)/2+0-t.idy,t.ir=(t.l+t.r)/2+t.idx-0,t.ib=(t.t+t.b)/2+t.idy-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star16._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star16.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x5,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y3}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x5,y:t.y5}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x4,y:t.y6}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y6}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x2,y:t.y5}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y4}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x3,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),e},e.star16.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.star16.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy7},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy7},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy5},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star24={name:"star24",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star24.getDefaultAdjustValues=t=>{let e={};return e.adj=37500,e},e.star24.getAdjustValueNames=()=>["adj"],e.star24.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=t.w/2*Math.cos(9e5*Math.PI/108e5),t.dx2=t.w/2*Math.cos(18e5*Math.PI/108e5),t.dx3=t.w/2*Math.cos(27e5*Math.PI/108e5),t.dx4=t.w/4,t.dx5=t.w/2*Math.cos(45e5*Math.PI/108e5),t.dy1=t.h/2*Math.sin(45e5*Math.PI/108e5),t.dy2=t.h/2*Math.sin(36e5*Math.PI/108e5),t.dy3=t.h/2*Math.sin(27e5*Math.PI/108e5),t.dy4=t.h/4,t.dy5=t.h/2*Math.sin(9e5*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+0-t.dx4,t.x5=(t.l+t.r)/2+0-t.dx5,t.x6=(t.l+t.r)/2+t.dx5-0,t.x7=(t.l+t.r)/2+t.dx4-0,t.x8=(t.l+t.r)/2+t.dx3-0,t.x9=(t.l+t.r)/2+t.dx2-0,t.x10=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+0-t.dy3,t.y4=(t.t+t.b)/2+0-t.dy4,t.y5=(t.t+t.b)/2+0-t.dy5,t.y6=(t.t+t.b)/2+t.dy5-0,t.y7=(t.t+t.b)/2+t.dy4-0,t.y8=(t.t+t.b)/2+t.dy3-0,t.y9=(t.t+t.b)/2+t.dy2-0,t.y10=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=99144*t.iwd2/1e5,t.sdx2=92388*t.iwd2/1e5,t.sdx3=79335*t.iwd2/1e5,t.sdx4=60876*t.iwd2/1e5,t.sdx5=38268*t.iwd2/1e5,t.sdx6=13053*t.iwd2/1e5,t.sdy1=99144*t.ihd2/1e5,t.sdy2=92388*t.ihd2/1e5,t.sdy3=79335*t.ihd2/1e5,t.sdy4=60876*t.ihd2/1e5,t.sdy5=38268*t.ihd2/1e5,t.sdy6=13053*t.ihd2/1e5,t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+0-t.sdx3,t.sx4=(t.l+t.r)/2+0-t.sdx4,t.sx5=(t.l+t.r)/2+0-t.sdx5,t.sx6=(t.l+t.r)/2+0-t.sdx6,t.sx7=(t.l+t.r)/2+t.sdx6-0,t.sx8=(t.l+t.r)/2+t.sdx5-0,t.sx9=(t.l+t.r)/2+t.sdx4-0,t.sx10=(t.l+t.r)/2+t.sdx3-0,t.sx11=(t.l+t.r)/2+t.sdx2-0,t.sx12=(t.l+t.r)/2+t.sdx1-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+0-t.sdy3,t.sy4=(t.t+t.b)/2+0-t.sdy4,t.sy5=(t.t+t.b)/2+0-t.sdy5,t.sy6=(t.t+t.b)/2+0-t.sdy6,t.sy7=(t.t+t.b)/2+t.sdy6-0,t.sy8=(t.t+t.b)/2+t.sdy5-0,t.sy9=(t.t+t.b)/2+t.sdy4-0,t.sy10=(t.t+t.b)/2+t.sdy3-0,t.sy11=(t.t+t.b)/2+t.sdy2-0,t.sy12=(t.t+t.b)/2+t.sdy1-0,t.idx=t.iwd2*Math.cos(27e5*Math.PI/108e5),t.idy=t.ihd2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.it=(t.t+t.b)/2+0-t.idy,t.ir=(t.l+t.r)/2+t.idx-0,t.ib=(t.t+t.b)/2+t.idy-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star24._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star24.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.star24.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.star24.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx9,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx10,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x9,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx11,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x10,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx12,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx12,y:t.sy7},n.push(r),r.x,r.y,r={action:"L",x:t.x10,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx11,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:t.x9,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.sx10,y:t.sy9},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.sx9,y:t.sy10},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y9},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy11},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y10},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy12},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy12},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y10},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy11},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y9},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy10},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy9},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy7},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star32={name:"star32",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star32.getDefaultAdjustValues=t=>{let e={};return e.adj=37500,e},e.star32.getAdjustValueNames=()=>["adj"],e.star32.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=t.w/2*98079/1e5,t.dx2=t.w/2*92388/1e5,t.dx3=t.w/2*83147/1e5,t.dx4=t.w/2*Math.cos(27e5*Math.PI/108e5),t.dx5=t.w/2*55557/1e5,t.dx6=t.w/2*38268/1e5,t.dx7=t.w/2*19509/1e5,t.dy1=t.h/2*98079/1e5,t.dy2=t.h/2*92388/1e5,t.dy3=t.h/2*83147/1e5,t.dy4=t.h/2*Math.sin(27e5*Math.PI/108e5),t.dy5=t.h/2*55557/1e5,t.dy6=t.h/2*38268/1e5,t.dy7=t.h/2*19509/1e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+0-t.dx4,t.x5=(t.l+t.r)/2+0-t.dx5,t.x6=(t.l+t.r)/2+0-t.dx6,t.x7=(t.l+t.r)/2+0-t.dx7,t.x8=(t.l+t.r)/2+t.dx7-0,t.x9=(t.l+t.r)/2+t.dx6-0,t.x10=(t.l+t.r)/2+t.dx5-0,t.x11=(t.l+t.r)/2+t.dx4-0,t.x12=(t.l+t.r)/2+t.dx3-0,t.x13=(t.l+t.r)/2+t.dx2-0,t.x14=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+0-t.dy2,t.y3=(t.t+t.b)/2+0-t.dy3,t.y4=(t.t+t.b)/2+0-t.dy4,t.y5=(t.t+t.b)/2+0-t.dy5,t.y6=(t.t+t.b)/2+0-t.dy6,t.y7=(t.t+t.b)/2+0-t.dy7,t.y8=(t.t+t.b)/2+t.dy7-0,t.y9=(t.t+t.b)/2+t.dy6-0,t.y10=(t.t+t.b)/2+t.dy5-0,t.y11=(t.t+t.b)/2+t.dy4-0,t.y12=(t.t+t.b)/2+t.dy3-0,t.y13=(t.t+t.b)/2+t.dy2-0,t.y14=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=99518*t.iwd2/1e5,t.sdx2=95694*t.iwd2/1e5,t.sdx3=88192*t.iwd2/1e5,t.sdx4=77301*t.iwd2/1e5,t.sdx5=63439*t.iwd2/1e5,t.sdx6=47140*t.iwd2/1e5,t.sdx7=29028*t.iwd2/1e5,t.sdx8=9802*t.iwd2/1e5,t.sdy1=99518*t.ihd2/1e5,t.sdy2=95694*t.ihd2/1e5,t.sdy3=88192*t.ihd2/1e5,t.sdy4=77301*t.ihd2/1e5,t.sdy5=63439*t.ihd2/1e5,t.sdy6=47140*t.ihd2/1e5,t.sdy7=29028*t.ihd2/1e5,t.sdy8=9802*t.ihd2/1e5,t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+0-t.sdx3,t.sx4=(t.l+t.r)/2+0-t.sdx4,t.sx5=(t.l+t.r)/2+0-t.sdx5,t.sx6=(t.l+t.r)/2+0-t.sdx6,t.sx7=(t.l+t.r)/2+0-t.sdx7,t.sx8=(t.l+t.r)/2+0-t.sdx8,t.sx9=(t.l+t.r)/2+t.sdx8-0,t.sx10=(t.l+t.r)/2+t.sdx7-0,t.sx11=(t.l+t.r)/2+t.sdx6-0,t.sx12=(t.l+t.r)/2+t.sdx5-0,t.sx13=(t.l+t.r)/2+t.sdx4-0,t.sx14=(t.l+t.r)/2+t.sdx3-0,t.sx15=(t.l+t.r)/2+t.sdx2-0,t.sx16=(t.l+t.r)/2+t.sdx1-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+0-t.sdy3,t.sy4=(t.t+t.b)/2+0-t.sdy4,t.sy5=(t.t+t.b)/2+0-t.sdy5,t.sy6=(t.t+t.b)/2+0-t.sdy6,t.sy7=(t.t+t.b)/2+0-t.sdy7,t.sy8=(t.t+t.b)/2+0-t.sdy8,t.sy9=(t.t+t.b)/2+t.sdy8-0,t.sy10=(t.t+t.b)/2+t.sdy7-0,t.sy11=(t.t+t.b)/2+t.sdy6-0,t.sy12=(t.t+t.b)/2+t.sdy5-0,t.sy13=(t.t+t.b)/2+t.sdy4-0,t.sy14=(t.t+t.b)/2+t.sdy3-0,t.sy15=(t.t+t.b)/2+t.sdy2-0,t.sy16=(t.t+t.b)/2+t.sdy1-0,t.idx=t.iwd2*Math.cos(27e5*Math.PI/108e5),t.idy=t.ihd2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.it=(t.t+t.b)/2+0-t.idy,t.ir=(t.l+t.r)/2+t.idx-0,t.ib=(t.t+t.b)/2+t.idy-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star32._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star32.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.star32.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.star32.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy7},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx9,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx10,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x9,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx11,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x10,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx12,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x11,y:t.y4},n.push(r),r.x,r.y,r={action:"L",x:t.sx13,y:t.sy5},n.push(r),r.x,r.y,r={action:"L",x:t.x12,y:t.y5},n.push(r),r.x,r.y,r={action:"L",x:t.sx14,y:t.sy6},n.push(r),r.x,r.y,r={action:"L",x:t.x13,y:t.y6},n.push(r),r.x,r.y,r={action:"L",x:t.sx15,y:t.sy7},n.push(r),r.x,r.y,r={action:"L",x:t.x14,y:t.y7},n.push(r),r.x,r.y,r={action:"L",x:t.sx16,y:t.sy8},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx16,y:t.sy9},n.push(r),r.x,r.y,r={action:"L",x:t.x14,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.sx15,y:t.sy10},n.push(r),r.x,r.y,r={action:"L",x:t.x13,y:t.y9},n.push(r),r.x,r.y,r={action:"L",x:t.sx14,y:t.sy11},n.push(r),r.x,r.y,r={action:"L",x:t.x12,y:t.y10},n.push(r),r.x,r.y,r={action:"L",x:t.sx13,y:t.sy12},n.push(r),r.x,r.y,r={action:"L",x:t.x11,y:t.y11},n.push(r),r.x,r.y,r={action:"L",x:t.sx12,y:t.sy13},n.push(r),r.x,r.y,r={action:"L",x:t.x10,y:t.y12},n.push(r),r.x,r.y,r={action:"L",x:t.sx11,y:t.sy14},n.push(r),r.x,r.y,r={action:"L",x:t.x9,y:t.y13},n.push(r),r.x,r.y,r={action:"L",x:t.sx10,y:t.sy15},n.push(r),r.x,r.y,r={action:"L",x:t.x8,y:t.y14},n.push(r),r.x,r.y,r={action:"L",x:t.sx9,y:t.sy16},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx8,y:t.sy16},n.push(r),r.x,r.y,r={action:"L",x:t.x7,y:t.y14},n.push(r),r.x,r.y,r={action:"L",x:t.sx7,y:t.sy15},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y13},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy14},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y12},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy13},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y11},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy12},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y10},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy11},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y9},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy10},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y8},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy9},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star4={name:"star4",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star4.getDefaultAdjustValues=t=>{let e={};return e.adj=12500,e},e.star4.getAdjustValueNames=()=>["adj"],e.star4.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx=t.iwd2*Math.cos(27e5*Math.PI/108e5),t.sdy=t.ihd2*Math.sin(27e5*Math.PI/108e5),t.sx1=(t.l+t.r)/2+0-t.sdx,t.sx2=(t.l+t.r)/2+t.sdx-0,t.sy1=(t.t+t.b)/2+0-t.sdy,t.sy2=(t.t+t.b)/2+t.sdy-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star4._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star4.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.star4.getTextRect=t=>({l:t.sx1,t:t.sy1,r:t.sx2,b:t.sy2}),e.star4.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star5={name:"star5",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star5.getDefaultAdjustValues=t=>{let e={};return e.adj=19098,e.hf=105146,e.vf=110557,e},e.star5.getAdjustValueNames=()=>["adj","hf","vf"],e.star5.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.swd2=t.w/2*t.hf/1e5,t.shd2=t.h/2*t.vf/1e5,t.svc=(t.t+t.b)/2*t.vf/1e5,t.dx1=t.swd2*Math.cos(108e4*Math.PI/108e5),t.dx2=t.swd2*Math.cos(1836e4*Math.PI/108e5),t.dy1=t.shd2*Math.sin(108e4*Math.PI/108e5),t.dy2=t.shd2*Math.sin(1836e4*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=t.svc+0-t.dy1,t.y2=t.svc+0-t.dy2,t.iwd2=t.swd2*t.a/5e4,t.ihd2=t.shd2*t.a/5e4,t.sdx1=t.iwd2*Math.cos(2052e4*Math.PI/108e5),t.sdx2=t.iwd2*Math.cos(324e4*Math.PI/108e5),t.sdy1=t.ihd2*Math.sin(324e4*Math.PI/108e5),t.sdy2=t.ihd2*Math.sin(2052e4*Math.PI/108e5),t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+t.sdx2-0,t.sx4=(t.l+t.r)/2+t.sdx1-0,t.sy1=t.svc+0-t.sdy1,t.sy2=t.svc+0-t.sdy2,t.sy3=t.svc+t.ihd2-0,t.yAdj=t.svc+0-t.ihd2},e.star5._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star5.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:t.y1}),e.push(n),e},e.star5.getTextRect=t=>({l:t.sx1,t:t.sy1,r:t.sx4,b:t.sy3}),e.star5.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star6={name:"star6",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star6.getDefaultAdjustValues=t=>{let e={};return e.adj=28868,e.hf=115470,e},e.star6.getAdjustValueNames=()=>["adj","hf"],e.star6.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.swd2=t.w/2*t.hf/1e5,t.dx1=t.swd2*Math.cos(18e5*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.y2=(t.t+t.b)/2+t.h/4-0,t.iwd2=t.swd2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx2=+t.iwd2/2,t.sx1=(t.l+t.r)/2+0-t.iwd2,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+t.sdx2-0,t.sx4=(t.l+t.r)/2+t.iwd2-0,t.sdy1=t.ihd2*Math.sin(36e5*Math.PI/108e5),t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+t.sdy1-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star6._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star6.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:t.h/4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.h/4}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.star6.getTextRect=t=>({l:t.sx1,t:t.sy1,r:t.sx4,b:t.sy2}),e.star6.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.h/4},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.h/4},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star7={name:"star7",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star7.getDefaultAdjustValues=t=>{let e={};return e.adj=34601,e.hf=102572,e.vf=105210,e},e.star7.getAdjustValueNames=()=>["adj","hf","vf"],e.star7.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.swd2=t.w/2*t.hf/1e5,t.shd2=t.h/2*t.vf/1e5,t.svc=(t.t+t.b)/2*t.vf/1e5,t.dx1=97493*t.swd2/1e5,t.dx2=78183*t.swd2/1e5,t.dx3=43388*t.swd2/1e5,t.dy1=62349*t.shd2/1e5,t.dy2=22252*t.shd2/1e5,t.dy3=90097*t.shd2/1e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+0-t.dx3,t.x4=(t.l+t.r)/2+t.dx3-0,t.x5=(t.l+t.r)/2+t.dx2-0,t.x6=(t.l+t.r)/2+t.dx1-0,t.y1=t.svc+0-t.dy1,t.y2=t.svc+t.dy2-0,t.y3=t.svc+t.dy3-0,t.iwd2=t.swd2*t.a/5e4,t.ihd2=t.shd2*t.a/5e4,t.sdx1=97493*t.iwd2/1e5,t.sdx2=78183*t.iwd2/1e5,t.sdx3=43388*t.iwd2/1e5,t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+0-t.sdx3,t.sx4=(t.l+t.r)/2+t.sdx3-0,t.sx5=(t.l+t.r)/2+t.sdx2-0,t.sx6=(t.l+t.r)/2+t.sdx1-0,t.sdy1=90097*t.ihd2/1e5,t.sdy2=22252*t.ihd2/1e5,t.sdy3=62349*t.ihd2/1e5,t.sy1=t.svc+0-t.sdy1,t.sy2=t.svc+0-t.sdy2,t.sy3=t.svc+t.sdy3-0,t.sy4=t.svc+t.ihd2-0,t.yAdj=t.svc+0-t.ihd2},e.star7._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star7.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.x5,y:t.y1}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x6,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x4,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x3,y:t.y3}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),e},e.star7.getTextRect=t=>({l:t.sx2,t:t.sy1,r:t.sx5,b:t.sy3}),e.star7.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx6,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x6,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx5,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.star8={name:"star8",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.star8.getDefaultAdjustValues=t=>{let e={};return e.adj=37500,e},e.star8.getAdjustValueNames=()=>["adj"],e.star8.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,5e4)),t.dx1=t.w/2*Math.cos(27e5*Math.PI/108e5),t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.dy1=t.h/2*Math.sin(27e5*Math.PI/108e5),t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.iwd2=t.w/2*t.a/5e4,t.ihd2=t.h/2*t.a/5e4,t.sdx1=92388*t.iwd2/1e5,t.sdx2=38268*t.iwd2/1e5,t.sdy1=92388*t.ihd2/1e5,t.sdy2=38268*t.ihd2/1e5,t.sx1=(t.l+t.r)/2+0-t.sdx1,t.sx2=(t.l+t.r)/2+0-t.sdx2,t.sx3=(t.l+t.r)/2+t.sdx2-0,t.sx4=(t.l+t.r)/2+t.sdx1-0,t.sy1=(t.t+t.b)/2+0-t.sdy1,t.sy2=(t.t+t.b)/2+0-t.sdy2,t.sy3=(t.t+t.b)/2+t.sdy2-0,t.sy4=(t.t+t.b)/2+t.sdy1-0,t.yAdj=(t.t+t.b)/2+0-t.ihd2},e.star8._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:(t.l+t.r)/2,y:t.yAdj}),e.push(n),e},e.star8.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x1,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.y1}),e.push(n),e},e.star8.getTextRect=t=>({l:t.sx1,t:t.sy1,r:t.sx4,b:t.sy4}),e.star8.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy1},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.sx4,y:t.sy3},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx3,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.sx2,y:t.sy4},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.sx1,y:t.sy3},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.straightConnector1={name:"straightConnector1",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.straightConnector1.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.straightConnector1.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"none"}),e},e.stripedRightArrow={name:"stripedRightArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.stripedRightArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.stripedRightArrow.getAdjustValueNames=()=>["adj1","adj2"],e.stripedRightArrow.updateShapeGuides=t=>{t.maxAdj2=84375*t.w/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.x4=5*Math.min(t.w,t.h)/32,t.dx5=Math.min(t.w,t.h)*t.a2/1e5,t.x5=t.r+0-t.dx5,t.dy1=t.h*t.a1/2e5,t.y1=(t.t+t.b)/2+0-t.dy1,t.y2=(t.t+t.b)/2+t.dy1-0,t.dx6=t.dy1*t.dx5/(t.h/2),t.x6=t.r+0-t.dx6},e.stripedRightArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x5,y:t.t}),e.push(n),e},e.stripedRightArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x5,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x5,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.stripedRightArrow.getTextRect=t=>({l:t.x4,t:t.y1,r:t.x6,b:t.y2}),e.stripedRightArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:Math.min(t.w,t.h)/32,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:Math.min(t.w,t.h)/32,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:Math.min(t.w,t.h)/16,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:Math.min(t.w,t.h)/8,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:Math.min(t.w,t.h)/8,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:Math.min(t.w,t.h)/16,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,r={action:"M",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:(t.t+t.b)/2},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x5,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.sun={name:"sun",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.sun.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.sun.getAdjustValueNames=()=>["adj"],e.sun.updateShapeGuides=t=>{t.a=Math.max(12500,Math.min(t.adj,46875)),t.g0=5e4-t.a,t.g1=30274*t.g0/32768,t.g2=12540*t.g0/32768,t.g3=t.g1+5e4-0,t.g4=t.g2+5e4-0,t.g5=5e4-t.g1,t.g6=5e4-t.g2,t.g7=23170*t.g0/32768,t.g8=5e4+t.g7-0,t.g9=5e4-t.g7,t.g10=3*t.g5/4,t.g11=3*t.g6/4,t.g12=t.g10+3662-0,t.g13=t.g11+3662-0,t.g14=t.g11+12500-0,t.g15=1e5-t.g10,t.g16=1e5-t.g12,t.g17=1e5-t.g13,t.g18=1e5-t.g14,t.ox1=18436*t.w/21600,t.oy1=3163*t.h/21600,t.ox2=3163*t.w/21600,t.oy2=18436*t.h/21600,t.x8=t.w*t.g8/1e5,t.x9=t.w*t.g9/1e5,t.x10=t.w*t.g10/1e5,t.x12=t.w*t.g12/1e5,t.x13=t.w*t.g13/1e5,t.x14=t.w*t.g14/1e5,t.x15=t.w*t.g15/1e5,t.x16=t.w*t.g16/1e5,t.x17=t.w*t.g17/1e5,t.x18=t.w*t.g18/1e5,t.x19=t.w*t.a/1e5,t.wR=t.w*t.g0/1e5,t.hR=t.h*t.g0/1e5,t.y8=t.h*t.g8/1e5,t.y9=t.h*t.g9/1e5,t.y10=t.h*t.g10/1e5,t.y12=t.h*t.g12/1e5,t.y13=t.h*t.g13/1e5,t.y14=t.h*t.g14/1e5,t.y15=t.h*t.g15/1e5,t.y16=t.h*t.g16/1e5,t.y17=t.h*t.g17/1e5,t.y18=t.h*t.g18/1e5},e.sun._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x19,y:(t.t+t.b)/2}),e.push(n),e},e.sun.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),e},e.sun.getTextRect=t=>({l:t.x9,t:t.y9,r:t.x8,b:t.y8}),e.sun.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.r,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x15,y:t.y18},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x15,y:t.y14},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ox1,y:t.oy1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x16,y:t.y13},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x17,y:t.y12},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:(t.l+t.r)/2,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x18,y:t.y10},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x14,y:t.y10},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ox2,y:t.oy1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x13,y:t.y12},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x12,y:t.y13},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y14},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x10,y:t.y18},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ox2,y:t.oy2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x12,y:t.y17},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x13,y:t.y16},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:(t.l+t.r)/2,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x14,y:t.y15},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x18,y:t.y15},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ox1,y:t.oy2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x17,y:t.y16},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x16,y:t.y17},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x19,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.wR,l=t.hR,h=108e5,(d=0==(u=0))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.wR,ry:t.hR,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.teardrop={name:"teardrop",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.teardrop.getDefaultAdjustValues=t=>{let e={};return e.adj=1e5,e},e.teardrop.getAdjustValueNames=()=>["adj"],e.teardrop.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,2e5)),t.r2=Math.sqrt(2),t.tw=t.w/2*t.r2/1,t.th=t.h/2*t.r2/1,t.sw=t.tw*t.a/1e5,t.sh=t.th*t.a/1e5,t.dx1=t.sw*Math.cos(27e5*Math.PI/108e5),t.dy1=t.sh*Math.sin(27e5*Math.PI/108e5),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+0-t.dy1,t.x2=((t.l+t.r)/2+t.x1)/2,t.y2=((t.t+t.b)/2+t.y1)/2,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.teardrop._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),e},e.teardrop.getConnections=t=>{let e=[],n;return(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.x1,y:t.y1}),e.push(n),e},e.teardrop.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.teardrop.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Q",x1:t.x2,y1:t.t,x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"Q",x1:t.r,y1:t.y2,x:t.r,y:(t.t+t.b)/2},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.trapezoid={name:"trapezoid",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.trapezoid.getDefaultAdjustValues=t=>{let e={};return e.adj=25e3,e},e.trapezoid.getAdjustValueNames=()=>["adj"],e.trapezoid.updateShapeGuides=t=>{t.maxAdj=5e4*t.w/Math.min(t.w,t.h),t.a=Math.max(0,Math.min(t.adj,t.maxAdj)),t.x1=Math.min(t.w,t.h)*t.a/2e5,t.x2=Math.min(t.w,t.h)*t.a/1e5,t.x3=t.r+0-t.x2,t.x4=t.r+0-t.x1,t.il=t.w/3*t.a/t.maxAdj,t.it=t.h/3*t.a/t.maxAdj,t.ir=t.r+0-t.il},e.trapezoid._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.trapezoid.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x4,y:(t.t+t.b)/2}),e.push(n),e},e.trapezoid.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.b}),e.trapezoid.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.triangle={name:"triangle",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.triangle.getDefaultAdjustValues=t=>{let e={};return e.adj=5e4,e},e.triangle.getAdjustValueNames=()=>["adj"],e.triangle.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,1e5)),t.x1=t.w*t.a/2e5,t.x2=t.w*t.a/1e5,t.x3=t.x1+t.w/2-0},e.triangle._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.t}),e.push(n),e},e.triangle.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:t.x2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.l,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.r,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x3,y:(t.t+t.b)/2}),e.push(n),e},e.triangle.getTextRect=t=>({l:t.x1,t:(t.t+t.b)/2,r:t.x3,b:t.b}),e.triangle.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.upArrowCallout={name:"upArrowCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.upArrowCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=64977,e},e.upArrowCallout.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4"],e.upArrowCallout.updateShapeGuides=t=>{t.maxAdj2=5e4*t.w/Math.min(t.w,t.h),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.maxAdj3=1e5*t.h/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q2=t.a3*Math.min(t.w,t.h)/t.h,t.maxAdj4=1e5-t.q2,t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.dx1=Math.min(t.w,t.h)*t.a2/1e5,t.dx2=Math.min(t.w,t.h)*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+0-t.dx2,t.x3=(t.l+t.r)/2+t.dx2-0,t.x4=(t.l+t.r)/2+t.dx1-0,t.y1=Math.min(t.w,t.h)*t.a3/1e5,t.dy2=t.h*t.a4/1e5,t.y2=t.b+0-t.dy2,t.y3=(t.y2+t.b)/2},e.upArrowCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x2,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.x1,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.upArrowCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.upArrowCallout.getTextRect=t=>({l:t.l,t:t.y2,r:t.r,b:t.b}),e.upArrowCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x4,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x3,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.upDownArrow={name:"upDownArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.upDownArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=5e4,e.adj2=5e4,e},e.upDownArrow.getAdjustValueNames=()=>["adj1","adj2"],e.upDownArrow.updateShapeGuides=t=>{t.maxAdj2=5e4*t.h/Math.min(t.w,t.h),t.a1=Math.max(0,Math.min(t.adj1,1e5)),t.a2=Math.max(0,Math.min(t.adj2,t.maxAdj2)),t.y2=Math.min(t.w,t.h)*t.a2/1e5,t.y3=t.b+0-t.y2,t.dx1=t.w*t.a1/2e5,t.x1=(t.l+t.r)/2+0-t.dx1,t.x2=(t.l+t.r)/2+t.dx1-0,t.dy1=t.x1*t.y2/(t.w/2),t.y1=t.y2+0-t.dy1,t.y4=t.y3+t.dy1-0},e.upDownArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.x1,y:t.y3}),e.push(n),(n={}).pos=t=>({x:t.l,y:t.y2}),e.push(n),e},e.upDownArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:t.y3}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y3}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x2,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y2}),e.push(n),e},e.upDownArrow.getTextRect=t=>({l:t.x1,t:t.y1,r:t.x2,b:t.y4}),e.upDownArrow.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:(t.l+t.r)/2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y3},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.y2},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.uturnArrow={name:"uturnArrow",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.uturnArrow.getDefaultAdjustValues=t=>{let e={};return e.adj1=25e3,e.adj2=25e3,e.adj3=25e3,e.adj4=43750,e.adj5=75e3,e},e.uturnArrow.getAdjustValueNames=()=>["adj1","adj2","adj3","adj4","adj5"],e.uturnArrow.updateShapeGuides=t=>{t.a2=Math.max(0,Math.min(t.adj2,25e3)),t.maxAdj1=2*t.a2/1,t.a1=Math.max(0,Math.min(t.adj1,t.maxAdj1)),t.q2=t.a1*Math.min(t.w,t.h)/t.h,t.q3=1e5-t.q2,t.maxAdj3=t.q3*t.h/Math.min(t.w,t.h),t.a3=Math.max(0,Math.min(t.adj3,t.maxAdj3)),t.q1=t.a3+t.a1-0,t.minAdj5=t.q1*Math.min(t.w,t.h)/t.h,t.a5=Math.max(t.minAdj5,Math.min(t.adj5,1e5)),t.th=Math.min(t.w,t.h)*t.a1/1e5,t.aw2=Math.min(t.w,t.h)*t.a2/1e5,t.th2=+t.th/2,t.dh2=t.aw2+0-t.th2,t.y5=t.h*t.a5/1e5,t.ah=Math.min(t.w,t.h)*t.a3/1e5,t.y4=t.y5+0-t.ah,t.x9=t.r+0-t.dh2,t.bw=+t.x9/2,t.bs=Math.min(t.bw,t.y4),t.maxAdj4=1e5*t.bs/Math.min(t.w,t.h),t.a4=Math.max(0,Math.min(t.adj4,t.maxAdj4)),t.bd=Math.min(t.w,t.h)*t.a4/1e5,t.bd3=t.bd+0-t.th,t.bd2=Math.max(t.bd3,0),t.x3=t.th+t.bd2-0,t.x8=t.r+0-t.aw2,t.x6=t.x8+0-t.aw2,t.x7=t.x6+t.dh2-0,t.x4=t.x9+0-t.bd,t.x5=t.x7+0-t.bd2,t.cx=(t.th+t.x7)/2},e.uturnArrow._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.th,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.x6,y:t.b}),e.push(n),(n={}).pos=t=>({x:t.x6,y:t.y4}),e.push(n),(n={}).pos=t=>({x:t.bd,y:t.t}),e.push(n),(n={}).pos=t=>({x:t.r,y:t.y5}),e.push(n),e},e.uturnArrow.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.x6,y:t.y4}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.x8,y:t.y5}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:t.y4}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.cx,y:t.t}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.th2,y:t.b}),e.push(n),e},e.uturnArrow.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.uturnArrow.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.bd},i.push(s),n=s.x,r=s.y,o=t.bd,l=t.bd,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.t},i.push(s),n=s.x,r=s.y,o=t.bd,l=t.bd,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd,ry:t.bd,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x9,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x8,y:t.y5},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.x3},i.push(s),n=s.x,r=s.y,o=t.bd2,l=t.bd2,h=0,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.th},i.push(s),n=s.x,r=s.y,o=t.bd2,l=t.bd2,h=162e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.bd2,ry:t.bd2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.th,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.verticalScroll={name:"verticalScroll",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.verticalScroll.getDefaultAdjustValues=t=>{let e={};return e.adj=12500,e},e.verticalScroll.getAdjustValueNames=()=>["adj"],e.verticalScroll.updateShapeGuides=t=>{t.a=Math.max(0,Math.min(t.adj,25e3)),t.ch=Math.min(t.w,t.h)*t.a/1e5,t.ch2=+t.ch/2,t.ch4=+t.ch/4,t.x3=t.ch+t.ch2-0,t.x4=t.ch+t.ch-0,t.x6=t.r+0-t.ch,t.x7=t.r+0-t.ch2,t.x5=t.x6+0-t.ch2,t.y3=t.b+0-t.ch,t.y4=t.b+0-t.ch2},e.verticalScroll._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.ch}),e.push(n),e},e.verticalScroll.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.ch,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x6,y:(t.t+t.b)/2}),e.push(n),e},e.verticalScroll.getTextRect=t=>({l:t.ch,t:t.ch,r:t.x6,b:t.y4}),e.verticalScroll.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.ch2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch2,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=54e5,(d=0==(u=-108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.t},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x4,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"norm"}),i=[],n=0,r=0,s={action:"M",x:t.x4,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ch,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=162e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!1,fill:"darkenLess"}),i=[],n=0,r=0,s={action:"M",x:t.ch,y:t.y3},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.ch2},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x7,y:t.t},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x6,y:t.y4},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x3,y:t.t},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=54e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x4,y:t.ch2},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.x6,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x3,y:t.ch},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ch2,y:t.y3},i.push(s),n=s.x,r=s.y,o=t.ch4,l=t.ch4,h=162e5,(d=0==(u=108e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch4,ry:t.ch4,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y4},i.push(s),n=s.x,r=s.y,s={action:"M",x:t.ch2,y:t.b},i.push(s),n=s.x,r=s.y,o=t.ch2,l=t.ch2,h=54e5,(d=0==(u=-54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.ch2,ry:t.ch2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.ch,y:t.y3},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"none"}),e},e.wave={name:"wave",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.wave.getDefaultAdjustValues=t=>{let e={};return e.adj1=12500,e.adj2=0,e},e.wave.getAdjustValueNames=()=>["adj1","adj2"],e.wave.updateShapeGuides=t=>{t.a1=Math.max(0,Math.min(t.adj1,2e4)),t.a2=Math.max(-1e4,Math.min(t.adj2,1e4)),t.y1=t.h*t.a1/1e5,t.dy2=10*t.y1/3,t.y2=t.y1+0-t.dy2,t.y3=t.y1+t.dy2-0,t.y4=t.b+0-t.y1,t.y5=t.y4+0-t.dy2,t.y6=t.y4+t.dy2-0,t.dx1=t.w*t.a2/1e5,t.of2=t.w*t.a2/5e4,t.x1=Math.abs(t.dx1),t.dx2=t.of2>0?0:t.of2,t.x2=t.l+0-t.dx2,t.dx5=t.of2>0?t.of2:0,t.x5=t.r+0-t.dx5,t.dx3=(t.dx2+t.x5)/3,t.x3=t.x2+t.dx3-0,t.x4=(t.x3+t.x5)/2,t.x6=t.l+t.dx5-0,t.x10=t.r+t.dx2-0,t.x7=t.x6+t.dx3-0,t.x8=(t.x7+t.x10)/2,t.x9=t.r+0-t.x1,t.xAdj=(t.l+t.r)/2+t.dx1-0,t.xAdj2=(t.l+t.r)/2+0-t.dx1,t.il=Math.max(t.x2,t.x6),t.ir=Math.min(t.x5,t.x10),t.it=t.h*t.a1/5e4,t.ib=t.b+0-t.it},e.wave._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.l,y:t.y1}),e.push(n),(n={}).pos=t=>({x:t.xAdj,y:t.b}),e.push(n),e},e.wave.getConnections=t=>{let e=[],n;return(n={}).ang=t=>54e5,n.pos=t=>({x:t.xAdj2,y:t.y1}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.x1,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.xAdj,y:t.y4}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.x9,y:(t.t+t.b)/2}),e.push(n),e},e.wave.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.wave.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.x2,y:t.y1},n.push(r),r.x,r.y,r={action:"C",x1:t.x3,y1:t.y2,x2:t.x4,y2:t.y3,x:t.x5,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.x10,y:t.y4},n.push(r),r.x,r.y,r={action:"C",x1:t.x8,y1:t.y6,x2:t.x7,y2:t.y5,x:t.x6,y:t.y4},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.wedgeEllipseCallout={name:"wedgeEllipseCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.wedgeEllipseCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=-20833,e.adj2=62500,e},e.wedgeEllipseCallout.getAdjustValueNames=()=>["adj1","adj2"],e.wedgeEllipseCallout.updateShapeGuides=t=>{t.dxPos=t.w*t.adj1/1e5,t.dyPos=t.h*t.adj2/1e5,t.xPos=(t.l+t.r)/2+t.dxPos-0,t.yPos=(t.t+t.b)/2+t.dyPos-0,t.sdx=t.dxPos*t.h/1,t.sdy=t.dyPos*t.w/1,t.pang=108e5*r(t.sdx,t.sdy)/Math.PI,t.stAng=t.pang+66e4-0,t.enAng=t.pang+0-66e4,t.dx1=t.w/2*Math.cos(t.stAng*Math.PI/108e5),t.dy1=t.h/2*Math.sin(t.stAng*Math.PI/108e5),t.x1=(t.l+t.r)/2+t.dx1-0,t.y1=(t.t+t.b)/2+t.dy1-0,t.dx2=t.w/2*Math.cos(t.enAng*Math.PI/108e5),t.dy2=t.h/2*Math.sin(t.enAng*Math.PI/108e5),t.x2=(t.l+t.r)/2+t.dx2-0,t.y2=(t.t+t.b)/2+t.dy2-0,t.stAng1=108e5*r(t.dx1,t.dy1)/Math.PI,t.enAng1=108e5*r(t.dx2,t.dy2)/Math.PI,t.swAng1=t.enAng1+0-t.stAng1,t.swAng2=t.swAng1+216e5-0,t.swAng=t.swAng1>0?t.swAng1:t.swAng2,t.idx=t.w/2*Math.cos(27e5*Math.PI/108e5),t.idy=t.h/2*Math.sin(27e5*Math.PI/108e5),t.il=(t.l+t.r)/2+0-t.idx,t.ir=(t.l+t.r)/2+t.idx-0,t.it=(t.t+t.b)/2+0-t.idy,t.ib=(t.t+t.b)/2+t.idy-0},e.wedgeEllipseCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeEllipseCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.il,y:t.it}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.il,y:t.ib}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.ir,y:t.ib}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>162e5,n.pos=t=>({x:t.ir,y:t.it}),e.push(n),(n={}).ang=t=>t.pang,n.pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeEllipseCallout.getTextRect=t=>({l:t.il,t:t.it,r:t.ir,b:t.ib}),e.wedgeEllipseCallout.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.xPos,y:t.yPos},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.y1},i.push(s),n=s.x,r=s.y,o=t.w/2,l=t.h/2,h=t.stAng1,u=t.swAng%216e5,(d=0!==t.swAng&&0===u)&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.w/2,ry:t.h/2,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e},e.wedgeRectCallout={name:"wedgeRectCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.wedgeRectCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=-20833,e.adj2=62500,e},e.wedgeRectCallout.getAdjustValueNames=()=>["adj1","adj2"],e.wedgeRectCallout.updateShapeGuides=t=>{t.dxPos=t.w*t.adj1/1e5,t.dyPos=t.h*t.adj2/1e5,t.xPos=(t.l+t.r)/2+t.dxPos-0,t.yPos=(t.t+t.b)/2+t.dyPos-0,t.dx=t.xPos+0-(t.l+t.r)/2,t.dy=t.yPos+0-(t.t+t.b)/2,t.dq=t.dxPos*t.h/t.w,t.ady=Math.abs(t.dyPos),t.adq=Math.abs(t.dq),t.dz=t.ady+0-t.adq,t.xg1=t.dxPos>0?7:2,t.xg2=t.dxPos>0?10:5,t.x1=t.w*t.xg1/12,t.x2=t.w*t.xg2/12,t.yg1=t.dyPos>0?7:2,t.yg2=t.dyPos>0?10:5,t.y1=t.h*t.yg1/12,t.y2=t.h*t.yg2/12,t.t1=t.dxPos>0?t.l:t.xPos,t.xl=t.dz>0?t.l:t.t1,t.t2=t.dyPos>0?t.x1:t.xPos,t.xt=t.dz>0?t.t2:t.x1,t.t3=t.dxPos>0?t.xPos:t.r,t.xr=t.dz>0?t.r:t.t3,t.t4=t.dyPos>0?t.xPos:t.x1,t.xb=t.dz>0?t.t4:t.x1,t.t5=t.dxPos>0?t.y1:t.yPos,t.yl=t.dz>0?t.y1:t.t5,t.t6=t.dyPos>0?t.t:t.yPos,t.yt=t.dz>0?t.t6:t.t,t.t7=t.dxPos>0?t.yPos:t.y1,t.yr=t.dz>0?t.y1:t.t7,t.t8=t.dyPos>0?t.yPos:t.b,t.yb=t.dz>0?t.t8:t.b},e.wedgeRectCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeRectCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeRectCallout.getTextRect=t=>({l:t.l,t:t.t,r:t.r,b:t.b}),e.wedgeRectCallout.getPaths=t=>{let e=[],n,r;return n=[],r={action:"M",x:t.l,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.xt,y:t.yt},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.t},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y1},n.push(r),r.x,r.y,r={action:"L",x:t.xr,y:t.yr},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.r,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.x2,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.xb,y:t.yb},n.push(r),r.x,r.y,r={action:"L",x:t.x1,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.b},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y2},n.push(r),r.x,r.y,r={action:"L",x:t.xl,y:t.yl},n.push(r),r.x,r.y,r={action:"L",x:t.l,y:t.y1},n.push(r),r.x,r.y,r={action:"Z"},n.push(r),r.x,r.y,e.push({path:n,stroke:!0,fill:"norm"}),e},e.wedgeRoundRectCallout={name:"wedgeRoundRectCallout",getAdjustValueNames:()=>[],getDefaultAdjustValues:t=>({}),updateShapeGuides:t=>{},_getAdjustHandles:t=>[],getPaths:t=>[],getConnections:t=>[],getTextRect:t=>{}},e.wedgeRoundRectCallout.getDefaultAdjustValues=t=>{let e={};return e.adj1=-20833,e.adj2=62500,e.adj3=16667,e},e.wedgeRoundRectCallout.getAdjustValueNames=()=>["adj1","adj2","adj3"],e.wedgeRoundRectCallout.updateShapeGuides=t=>{t.dxPos=t.w*t.adj1/1e5,t.dyPos=t.h*t.adj2/1e5,t.xPos=(t.l+t.r)/2+t.dxPos-0,t.yPos=(t.t+t.b)/2+t.dyPos-0,t.dq=t.dxPos*t.h/t.w,t.ady=Math.abs(t.dyPos),t.adq=Math.abs(t.dq),t.dz=t.ady+0-t.adq,t.xg1=t.dxPos>0?7:2,t.xg2=t.dxPos>0?10:5,t.x1=t.w*t.xg1/12,t.x2=t.w*t.xg2/12,t.yg1=t.dyPos>0?7:2,t.yg2=t.dyPos>0?10:5,t.y1=t.h*t.yg1/12,t.y2=t.h*t.yg2/12,t.t1=t.dxPos>0?t.l:t.xPos,t.xl=t.dz>0?t.l:t.t1,t.t2=t.dyPos>0?t.x1:t.xPos,t.xt=t.dz>0?t.t2:t.x1,t.t3=t.dxPos>0?t.xPos:t.r,t.xr=t.dz>0?t.r:t.t3,t.t4=t.dyPos>0?t.xPos:t.x1,t.xb=t.dz>0?t.t4:t.x1,t.t5=t.dxPos>0?t.y1:t.yPos,t.yl=t.dz>0?t.y1:t.t5,t.t6=t.dyPos>0?t.t:t.yPos,t.yt=t.dz>0?t.t6:t.t,t.t7=t.dxPos>0?t.yPos:t.y1,t.yr=t.dz>0?t.y1:t.t7,t.t8=t.dyPos>0?t.yPos:t.b,t.yb=t.dz>0?t.t8:t.b,t.u1=Math.min(t.w,t.h)*t.adj3/1e5,t.u2=t.r+0-t.u1,t.v2=t.b+0-t.u1,t.il=29289*t.u1/1e5,t.ir=t.r+0-t.il,t.ib=t.b+0-t.il},e.wedgeRoundRectCallout._getAdjustHandles=t=>{let e=[],n;return(n={}).pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeRoundRectCallout.getConnections=t=>{let e=[],n;return(n={}).ang=t=>162e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.t}),e.push(n),(n={}).ang=t=>108e5,n.pos=t=>({x:t.l,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:(t.l+t.r)/2,y:t.b}),e.push(n),(n={}).ang=t=>0,n.pos=t=>({x:t.r,y:(t.t+t.b)/2}),e.push(n),(n={}).ang=t=>54e5,n.pos=t=>({x:t.xPos,y:t.yPos}),e.push(n),e},e.wedgeRoundRectCallout.getTextRect=t=>({l:t.il,t:t.il,r:t.ir,b:t.ib}),e.wedgeRoundRectCallout.getPaths=t=>{let e=[],n,r,i,s,o,l,h,u,c,d;return i=[],n=0,r=0,s={action:"M",x:t.l,y:t.u1},i.push(s),n=s.x,r=s.y,o=t.u1,l=t.u1,h=108e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xt,y:t.yt},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.t},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.u2,y:t.t},i.push(s),n=s.x,r=s.y,o=t.u1,l=t.u1,h=162e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xr,y:t.yr},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.r,y:t.v2},i.push(s),n=s.x,r=s.y,o=t.u1,l=t.u1,h=0,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.x2,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xb,y:t.yb},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.x1,y:t.b},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.u1,y:t.b},i.push(s),n=s.x,r=s.y,o=t.u1,l=t.u1,h=54e5,(d=0==(u=54e5))&&(u=108e5),c=a(o,l,h*Math.PI/108e5,n,r,(h+u)*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s),d&&(n=s.x,r=s.y,h-=108e5,c=a(o,l,h*Math.PI/108e5,n,r,(h+(u=108e5))*Math.PI/108e5),s={action:"A",rx:t.u1,ry:t.u1,x:c.x,y:c.y,a:0,b:+(Math.abs(u)>108e5),c:u<0?0:1},i.push(s)),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y2},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.xl,y:t.yl},i.push(s),n=s.x,r=s.y,s={action:"L",x:t.l,y:t.y1},i.push(s),n=s.x,r=s.y,s={action:"Z"},i.push(s),n=s.x,r=s.y,e.push({path:i,stroke:!0,fill:"norm"}),e}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}})(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";let t,e,i,a,s,o,l,h;n.r(r),n.d(r,{initDocumentViewer:()=>vK});var u,c,d={};n.r(d),n.d(d,{adoptNode:()=>a8,appendAllChilds:()=>sr,applyAllCssStyleRules:()=>a5,applyCssStyleRule:()=>a2,child:()=>sa,clearChilds:()=>e8,cloneWithTag:()=>e6,contains:()=>aI,createCanvas:()=>aG,createCanvasRenderingContext2D:()=>aH,createHTMLIFrame:()=>a$,createHTMLImageElement:()=>aW,domChildCount:()=>sy,domChildLength:()=>sy,domIndex:()=>sf,domIndexUnder:()=>sg,domUnder:()=>sp,elt:()=>sl,ensureCSSAdded:()=>sd,ensureDocumentFragment:()=>sn,exitFullscreen:()=>aO,extractCSSFontFaceRulesText:()=>aq,findCorrespondingDescendant:()=>so,findIndexAlong:()=>ss,firstDescendant:()=>e5,firstElementDescendant:()=>e4,focus:()=>aC,forEachNode:()=>a4,generateResourceString:()=>aB,getCustomData:()=>aK,getElementCategoryList:()=>e0,getElementCategoryTags:()=>e1,getFullscreenChangeEventName:()=>aE,getHTMLScriptSrc:()=>aY,getIndex:()=>sf,getRangeClientRect:()=>a1,getReadyState:()=>aP,getSelectionRange:()=>a0,insertBackward:()=>st,insertCSS:()=>sc,insertForward:()=>a9,isCommentNode:()=>eW,isDisplayed:()=>aV,isDocumentFragmentNode:()=>eq,isDom:()=>a3,isElementCategory:()=>e2,isElementNode:()=>eG,isFullscreen:()=>aR,isHidden:()=>a6,isNode:()=>eF,isShown:()=>a7,isSvgElement:()=>eU,isTextNode:()=>eH,loadFontFaces:()=>aZ,matchesChild:()=>e3,openWindow:()=>aJ,prependAllChilds:()=>si,remove:()=>se,requestFullscreen:()=>aN,resetDocument:()=>az,setCustomData:()=>aQ,setDisplay:()=>sx,setOpacity:()=>sm,setTranslate:()=>sv,svgNS:()=>eB,toggleFullscreen:()=>aj,waitReadyStateComplete:()=>aD,waitReadyStateInteractive:()=>aL,xlinkNS:()=>ez});var p={};n.r(p),n.d(p,{BLANK_AS:()=>lp,CHART_TYPE:()=>ls,DEFAULT:()=>li,DIRECTION:()=>la,GROUPING:()=>lo,LABEL_POSITION:()=>lc,LEGEND_POSITION:()=>lu,LINE_DASH:()=>ld,MARKER_SYMBOL:()=>lh,ORIENTATION:()=>ll});var g={};function f(t){return t||Object.create(null)}n.r(g),n.d(g,{PLOT_STYLE:()=>lv,ensureString:()=>lM,getFontHeight:()=>lb,isDefined:()=>lf,isEmpty:()=>lg,isFunction:()=>ly,isNumber:()=>lx,isString:()=>lm,parseHexColor:()=>l_,trimArray:()=>lw});let y=t=>{let e="number"==typeof t?t:t?Number(t):NaN;return isFinite(e)?e:void 0},x={number:y,nonZeroNumber:t=>{let e=y(t);return"number"==typeof e&&0!==e?e:void 0},nonNegativeNumber:t=>{let e=y(t);return"number"==typeof e&&e>=0?e:void 0},positiveNumber:t=>{let e=y(t);return"number"==typeof e&&e>0?e:void 0},betweenZeroOneNumber:t=>{let e=y(t);return"number"==typeof e&&e>=0&&e<=1?e:void 0},integer:t=>{let e=y(t);return"number"==typeof e?Math.round(e):void 0},string:t=>"string"==typeof t?t:"number"==typeof t&&isFinite(t)?String(t):void 0,boolean:t=>null==t?void 0:!!t},m=Object.freeze(Object.create(null)),v=Object.freeze([]);function b(){}function w(){return null}function M(){return!0}function _(){return!1}function A(t){return null!=t}function S(){throw Error("Must override me.")}function C(t,e){t||function(t){throw Error(t||"Assertion failed.")}(e)}let I=function t(e,n,r){if(void 0===r&&(r={}),e===n)return!0;if(!(e&&"object"==typeof e)||!(n&&"object"==typeof n))return!1;let i=Array.isArray(e);if(Array.isArray(n)!=i)return!1;if(i){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}else{for(let i in e){if(!(i in n))return!1;if("function"==typeof r[i]){if(!r[i](e[i],n[i]))return!1}else if(!t(e[i],n[i]))return!1}for(let t in n)if(!(t in e))return!1}return!0};function P(t,e,n){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e.call(n,t[r],r,t))break}function T(t,e,n,r){let i;!0!==r&&(!1===r?e in t.prototype:t.prototype.hasOwnProperty(e))||(t.prototype[e]=n)}function k(t,e,n){var r,i,a,s,o,l,h;return r=t,i=e,a=void 0,s=n,void(o=r,l=i,h={configurable:!0,set:a,get:s},Object.defineProperty(o.prototype,l,h))}function L(t,e,n){if("number"==typeof t){if(t<0)return -1;else if(t>0)return 1;else if(e&&0===t)return 0}return"number"==typeof n?L(n,e):+!e}function D(t,e){return t>=0?t%e:(e- -t%e)%e}function R(t,e,n){void 0===n&&(n=1e-6);let r=t-e;return r>n?1:r<-n?-1:0}function N(t){return Number.isInteger(Number(t))}class O{constructor(t,e){this.fn=t,this.args=e,this.timer=void 0,this.flush=this.flush.bind(this)}isDelaying(){return void 0!==this.timer}getRemainingTime(){return void 0===this.dueTime?0:Math.max(Math.round(this.dueTime-performance.now()),0)}cancel(){return!!this.isDelaying()&&(clearTimeout(this.timer),this.timer=void 0,this.dueTime=void 0,!0)}flush(){this.cancel()&&this.fn?.apply(null,this.args??[])}delay(t,e,n){this.cancel(),e&&(this.fn=e),n&&(this.args=n),this.timer=setTimeout(this.flush,t),this.dueTime=performance.now()+t}maybeDelay(t,e,n){this.isDelaying()||this.delay(t,e,n)}}function j(t){for(let e in t)return!1;return!0}function E(t,e,n){return n.forEach(n=>{let r=n in e?e[n]:void 0;void 0!==r&&(t[n]=r)}),t}function V(t,e){return E(Object.create(null),t,e)}function B(t,e,n){let r=null;return P(t,(t,i,a)=>!!e.call(n,t,i,a)&&(r=i,!0)),r}function z(t,e,n){let r=!0;return P(t,(t,i,a)=>!e.call(n,t,i,a)&&(r=!1,!0)),r}function F(t,e,n){let r=Object.create(null);return P(t,(t,i,a)=>{r[i]=e.call(n,t,i,a)}),r}function G(t,e,n){return P(t,(t,r,i)=>{n=e(n,t,r,i)}),n}function H(t){return G(t,(t,e,n)=>(t[e]=n,t),Object.create(null))}class W{constructor(t){this.content=t}find(t){for(let e=0;e<this.content.length;e+=2)if(this.content[e]==t)return e;return -1}get(t){let e=this.find(t);return -1==e?void 0:this.content[e+1]}update(t,e,n){let r=n&&n!=t?this.remove(n):this,i=r.find(t),a=r.content.slice();return -1==i?a.push(n||t,e):(a[i+1]=e,n&&(a[i]=n)),new W(a)}remove(t){let e=this.find(t);if(-1==e)return this;let n=this.content.slice();return n.splice(e,2),new W(n)}addToStart(t,e){return new W([t,e].concat(this.remove(t).content))}addToEnd(t,e){let n=this.remove(t).content.slice();return n.push(t,e),new W(n)}addBefore(t,e,n){let r=this.remove(e),i=r.content.slice(),a=r.find(t);return i.splice(-1==a?i.length:a,0,e,n),new W(i)}forEach(t){for(let e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])}prepend(t){return(t=W.from(t)).size?new W(t.content.concat(this.subtract(t).content)):this}append(t){return(t=W.from(t)).size?new W(this.subtract(t).content.concat(t.content)):this}subtract(t){let e=this;return W.from(t).forEach(t=>e=e.remove(t)),e}get size(){return this.content.length>>1}static from(t){if(t instanceof W)return t;let e=[];if(t)for(let n in t)e.push(n,t[n]);return new W(e)}}class q{constructor(t,e,n){this.list=t,this.value=e,this.next=n}findPrev(){let t=null,e;if(this.list.forEach(function(n){if(n===this)return e=!0,!0;t=n},this,{keep_current:!0,early_return:!0}),!e)throw Error("List item is not attached to list.");return t}attach(t){this.list&&this.unlink(),this.list=t}detach(){this.list=null,this.next=null}static _link(t,e,n){return t&&(t.next=e),e.next=n,e}static link(t,e,n){let r=(t||n).list;return e.attach(r),++r.length,r.head===n?r.head=e:r.tail===t&&(r.tail=e),this._link(t,e,n)}linkNext(t){return this.constructor.link(this,t,this.next)}linkPrev(t){let e=this.findPrev();return this.constructor.link(e,t,this)}static _unlink(t,e,n){return t&&(t.next=n),e}static unlink(t,e,n){let r=e.list;return e.detach(),1===r.length?r.clear():(--r.length,r.head===e?r.head=n:r.tail===e&&(r.tail=t),r.current===e&&(r.current=null)),this._unlink(t,e,n)}unlink(){return this.constructor.unlink(this.findPrev(),this,this.next)}unlinkNext(){let t=this.next;return t&&this.constructor.unlink(this,t,t.next),t}unlinkPrev(){let t=this.findPrev();return t&&t.unlink(),t}}class U{constructor(t){this.length=0,this.head=null,this.tail=null,this.current=null,t&&t.forEach(this.append,this)}get headValue(){return this.getItemValue(this.head)}get tailValue(){return this.getItemValue(this.tail)}get currentValue(){return this.getItemValue(this.current)}createItem(t){return new q(null,t)}getItemValue(t){return t?t.value:null}forEach(t,e,n){void 0===n&&(n=m);let{from_start:r,keep_current:i,early_return:a}=n,s=r?this.head:this.current;for(;s;){let n=s.next;i||(this.current=s);let r=t.call(e,s,this);if(a&&null!=r)return r;s=n}i||(this.current=null)}_init(t){return t.attach(this),this.length=1,this.current=this.head=this.tail=t}init(t){return this._init(this.createItem(t))}_prepend(t){return this.head?this.head.linkPrev(t):this._init(t)}prepend(t){return this._prepend(this.createItem(t))}_append(t){return this.tail?this.tail.linkNext(t):this._init(t)}append(t){return this._append(this.createItem(t))}_insertAfter(t){return this.current&&this.current.linkNext(t)}insertAfter(t){return this._insertAfter(this.createItem(t))}_insertBefore(t){return this.current&&this.current.linkPrev(t)}insertBefore(t){return this._insertBefore(this.createItem(t))}clear(){this.length=0,this.current=this.head=this.tail=null}unshift(){return this.head&&this.head.unlink()}pop(t){return this.tail&&this.tail.unlink()}removeAfter(){return this.current&&this.current.unlinkNext()}removeBefore(){return this.current&&this.current.unlinkPrev()}reset(t){return this.current=t?this.tail:this.head}next(){return this.current&&(this.current=this.current.next)}clone(){let t=new this.constructor;return this.length&&this.forEach(function(e){t.append(e.value)},this,{from_start:!0,keep_current:!0}),t}}class Z extends q{constructor(t,e,n,r){super(t,e,r),this.prev=n}findPrev(){return this.prev}detach(){this.prev=null,super.detach()}static _link(t,e,n){return n&&(n.prev=e),e.prev=t,super._link(t,e,n)}static _unlink(t,e,n){return n&&(n.prev=t),super._unlink(t,e,n)}}class $ extends U{createItem(t){return new Z(null,t)}prev(){return this.current&&(this.current=this.current.prev)}}function J(t){void 0===t&&(t=10);let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r<t;r++)e+=n.charAt(Math.floor(Math.random()*n.length));return e}function Y(t,e){let n;if(!0===t.isSimpleDOM){do n=J(10);while(!0===t.synoIdMap.hasOwnProperty(n));t.synoIdMap[n]=e}else do n=J(10);while(t.querySelector("["+e+'="'+n+'"]'));return n}function X(t,e){let n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function Q(t){return t?JSON.parse(JSON.stringify(t)):Object.create(null)}function K(t,e,n,r){void 0===r&&(r=!0);let i=e||Object.create(null);if(!0===n&&(i=Q(i)),!t)return i;if(!0===r)for(let e in t)i[e]=t[e];else Array.isArray(r)&&r.forEach(function(e){void 0!==t[e]&&(i[e]=t[e])});return i}function tt(){let t=Object.create(null);for(let e=0,n=arguments.length;e<n;++e)t[arguments[e]]=e;return Object.freeze(t)}function te(t,e,n,r){if(t===e)return!0;if(!t||!e||"object"!=typeof t||"object"!=typeof e)return!1;let i=Array.isArray(t);if(i!==Array.isArray(e))return!1;if(null==r)if(i){let r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;++i)if(!n(t[i],e[i],i))return!1;return!0}else{for(let r in t)if(!(r in e)||!n(t[r],e[r],r))return!1;for(let n in e)if(!(n in t))return!1;return!0}if(Array.isArray(r)){for(let i=0,a=r.length;i<a;++i){let a=r[i];if(!n(t[a],e[a],a))return!1}return!0}return n(t[r],e[r],r)}function tn(t,e){return t===e}function tr(t,e){return te(t,e,tr)}function ti(t,e,n,r){void 0===r&&(r="value");let i=function(t,e){for(let n=t;n;n=Object.getPrototypeOf(n)){let t=Object.getOwnPropertyDescriptor(n,e);if(t)return t}}(t,e),a=i&&"function"==typeof i[r]?i[r]:null;return function(){return n.call(this,a,...arguments)}}function ta(t,e,n,r){return!!function(t,e,n){switch(n){case"has":return!(e in t);case"own":return!t.hasOwnProperty(e);default:return!0}}(t,e,r)&&(Object.defineProperty(t,e,n),!0)}function ts(t,e,n,r){return ta(t,e,{configurable:!0,enumerable:!0,writable:!0,value:n},r)}function to(t,e,n,r,i){return r&&(n=ti(t,e,n,"get")),ta(t,e,{configurable:!0,set:void 0,get:n},i)}function tl(t,e,n,r){return to(t,e,()=>n,!1,r)}function th(t,e,n,r,i){return r&&(n=ti(t,e,n)),ts(t,e,n,i)}let tu=Math.PI/180,tc=180/Math.PI;var td=/\s/;let tp=function(t){for(var e=t.length;e--&&td.test(t.charAt(e)););return e};var tg=/^\s+/;let tf=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var ty="object"==typeof global&&global&&global.Object===Object&&global,tx="object"==typeof self&&self&&self.Object===Object&&self,tm=ty||tx||Function("return this")(),tv=tm.Symbol,tb=Object.prototype,tw=tb.hasOwnProperty,tM=tb.toString,t_=tv?tv.toStringTag:void 0;let tA=function(t){var e=tw.call(t,t_),n=t[t_];try{t[t_]=void 0;var r=!0}catch(t){}var i=tM.call(t);return r&&(e?t[t_]=n:delete t[t_]),i};var tS=Object.prototype.toString,tC=tv?tv.toStringTag:void 0;let tI=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tC&&tC in Object(t)?tA(t):tS.call(t)},tP=function(t){return null!=t&&"object"==typeof t},tT=function(t){return"symbol"==typeof t||tP(t)&&"[object Symbol]"==tI(t)};var tk=0/0,tL=/^[-+]0x[0-9a-f]+$/i,tD=/^0b[01]+$/i,tR=/^0o[0-7]+$/i,tN=parseInt;let tO=function(t){if("number"==typeof t)return t;if(tT(t))return tk;if(tf(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=tf(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,tp(e)+1).replace(tg,""):e;var r=tD.test(t);return r||tR.test(t)?tN(t.slice(2),r?2:8):tL.test(t)?tk:+t},tj=function(t,e,n){var r,i,a;return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=tO(n))==n?n:0),void 0!==e&&(e=(e=tO(e))==e?e:0),r=tO(t),i=e,a=n,r==r&&(void 0!==a&&(r=r<=a?r:a),void 0!==i&&(r=r>=i?r:i)),r};function tE(t,e){return isNaN(t=Number(t))?0:tj(t=t>=0?Math.floor(t):e+(t=Math.ceil(t)),0,e)}function tV(t,e,n){return[t=void 0===t?0:tE(t,n),t>(e=void 0===e?n:tE(e,n))?t:e]}function tB(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.length;if(0===r)return[];if(1===r)return e[0].slice();if(2===r){let t=e[1];return e[0].filter(e=>t.includes(e))}{let t=e[0].slice();for(let n=1;n<r;++n){if(!t.length||!e[n].length)return[];let r=new Set;e[n].forEach(r.add,r),t=t.filter(r.has,r)}return t}}function tz(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=e.filter(t=>!!(t&&t.length)),i=r.length;if(0===i)return[];if(1===i)return r[0].slice();if(2!==i)return Array.from(r.reduce((t,e)=>(e.forEach(t.add,t),t),new Set));{let t=r[0];return r[1].reduce((e,n)=>(t.includes(n)||e.push(n),e),t.slice())}}function tF(t,e){let n=new Set(e);return t.filter(t=>!n.has(t))}let tG=/(?:https?:\/\/|www\.(?:[-\w@:%\\+~#=]+\.)+[a-zA-Z]{2,6}\b)/g,tH=RegExp(`${tG.source}[\\u0021-\\u007E]*`,"g"),tW={newLine:/(?:\r\n|\r|\n)/g,linkHttpHost:tG,linkHttp:tH,linkMailTo:/(?:mailto:)?(?:[^<>()[\]\\,;:\s@"]+|".+")@(?:\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]|(?:[a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})/g},tq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},tU=/[&<>"]/g,tZ=/[&<>]/g;function t$(t){return t&&tU.test(t)?t.replace(tU,function(t){return tq[t]}):t}function tJ(t){return t&&tZ.test(t)?t.replace(tZ,function(t){return tq[t]}):t}let tY=function(t,e,n){return Object.getOwnPropertyNames(e).forEach(r=>{if(!n&&Object.prototype.hasOwnProperty.call(t,r))throw Error(`Trying to mixin duplicated member ${r}.`);Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),e},tX=function(t,e,n){return tY(t.prototype,e,n)},tQ=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]),tK=new Set(["AF","AX","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CW","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IM","IL","IT","JM","JP","JE","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MK","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SA","SN","RS","SC","SL","SG","SX","SK","SI","SB","SO","ZA","GS","SS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW"]);function t0(t){return t>=0&&t<=31||127===t}function t1(t){return t>=55296&&t<=57343}function t2(t){return t>=56320&&t<=57343}function t5(t){return t>=0&&t<65536}function t4(t){return t>=65536&&t<=1114111}function*t8(t,e){void 0===e&&(e={});let{from:n=0,to:r=t.length,reversed:i=!1}=e;if(!(n>=0&&n<=t.length&&r>=0&&r<=t.length&&n<r))return;let a=i?-1:1,s=i?n:r,o=i?r:n;for(;;){let e;if(o===s||"number"!=typeof(e=o+a===s?t.charCodeAt(i?o+a:o):function(t,e,n){if(n>0)return t.codePointAt(e);if(e>=1&&e<=t.length){let n=t.charCodeAt(e-1);if(!t2(n))return n;{let r=e>=2?t.codePointAt(e-2):void 0;return void 0!==r&&t4(r)?r:n}}}(t,o,a)))break;let n=t4(e),r=n?2:1,l=o+r*a;yield{value:e,index:i?l:o,length:r,isSupplementary:n},o=l}}var t3=n(70777),t6=n.n(t3);let t7=(()=>{let t;return()=>t??(t=new(t6()))})();function*t9(t,e){let n=t7(),r=0;for(;!(r>=t.length);){let e=n.nextBreak(t,r);yield{index:r,length:e-r},r=e}}function*et(t,e){if(e?.reversed){yield t.length;let n=Array.from(t9(t,e));for(let t=n.length-2;t>=0;--t){let{index:e,length:r}=n[t];yield e+r}}else for(let{index:n,length:r}of t9(t,e))yield n+r}class ee{constructor(t){this.text=t,this.breakCache=[]}next(t){if(t<0)return 0;if(t>=this.text.length)return this.text.length;let{text:e,breakCache:n}=this,r=t7();for(;t>=n.length;){let t=r.nextBreak(e,n.length);for(let e=n.length;e<t;++e)n.push(t)}return n[t]}}function en(t){return t.map(t=>Array.isArray(t)?t:[t,t]).sort((t,e)=>t[0]-e[0]).reduce((t,e)=>{var n;let r=t.length;if(r&&(n=t[r-1],t5(n[0])===t5(e[0])&&e[0]<=n[1]+1)){let n=t[r-1];n[1]<e[1]&&(t[r-1]=[n[0],e[1]])}else t.push(e);return t},[])}function er(t,e){let n="string"==typeof e?e.charCodeAt(0):e;for(let e of t)if(n>=e[0]&&n<=e[1])return!0;else if(n<e[0])break;return!1}function ei(t){return"\\u"+t.toString(16).padStart(4,"0")}let ea=function(t){let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=en(t[n]));return e}({cjk:[[12544,12591],[12704,12735],[19968,40959],[13312,19903],[131072,173791],[173824,177983],[177984,178207],[178208,183983],[183984,191456],[63744,64255],[194560,195103],[12032,12255],[11904,12031],[12736,12783],[12272,12287]],kana:[[12352,12447],[12448,12543],[12784,12799],[65381,65439],[12688,12703],[110592,110847],[110848,110895],[110896,110959]],hangui:[[4352,4607],[43360,43391],[55216,55295],[12592,12687],[65440,65500],[44032,55215]],symbol:[[8192,11263],[11776,11903],[65024,65039],[65280,65519],[65520,65535]],symbolCjk:[[12288,12351],[94176,94207],[65072,65103],[65104,65135],[65040,65055],[12800,13055],[127488,127743],[13056,13311]],arabic:[[1536,1791],[1872,1919],[2208,2303],[64336,65023],[65136,65279]],thai:[[3584,3711]],space:[[9,13],65279,32,160,[8192,8202],8239,8287],asciiTabNewline:[9,10,13],asciiWhitespace:[9,10,12,13,32],breakingSpace:[9,10,13,32,133,5760,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8232,8233,8287,12288,8203],surrogate:[[55296,57343]],joiningTypeLeft:[[43122,43122],[68301,68301],[68311,68311],[68864,68864]],joiningTypeRight:[[1570,1573],[1575,1575],[1577,1577],[1583,1586],[1608,1608],[1649,1651],[1653,1655],[1672,1689],[1728,1728],[1731,1739],[1741,1741],[1743,1743],[1746,1747],[1749,1749],[1774,1775],[1808,1808],[1813,1817],[1822,1822],[1832,1832],[1834,1834],[1836,1836],[1839,1839],[1869,1869],[1881,1883],[1899,1900],[1905,1905],[1907,1908],[1912,1913],[2112,2112],[2118,2119],[2121,2121],[2132,2132],[2151,2151],[2153,2154],[2218,2220],[2222,2222],[2225,2226],[2233,2233],[68293,68293],[68295,68295],[68297,68298],[68302,68306],[68317,68317],[68321,68321],[68324,68324],[68335,68335],[68481,68481],[68483,68485],[68489,68489],[68492,68492],[68494,68495],[68497,68497],[68521,68524],[68898,68898],[69427,69427],[69460,69460]],joiningTypeDual:[[1568,1568],[1574,1574],[1576,1576],[1578,1582],[1587,1599],[1601,1607],[1609,1610],[1646,1647],[1656,1671],[1690,1727],[1729,1730],[1740,1740],[1742,1742],[1744,1745],[1786,1788],[1791,1791],[1810,1812],[1818,1821],[1823,1831],[1833,1833],[1835,1835],[1837,1838],[1870,1880],[1884,1898],[1901,1904],[1906,1906],[1909,1911],[1914,1919],[1994,2026],[2113,2117],[2120,2120],[2122,2131],[2133,2133],[2144,2144],[2146,2149],[2152,2152],[2208,2217],[2223,2224],[2227,2228],[2230,2232],[2234,2237],[6151,6151],[6176,6264],[6279,6312],[6314,6314],[43072,43121],[68288,68292],[68307,68310],[68312,68316],[68318,68320],[68331,68334],[68480,68480],[68482,68482],[68486,68488],[68490,68491],[68493,68493],[68496,68496],[68525,68526],[68865,68897],[68899,68899],[69424,69426],[69428,69444],[69457,69459],[125184,125251]],joiningTypeTransparent:[[173,173],[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8203],[8206,8207],[8234,8238],[8288,8292],[8298,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531],[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125259],[917505,917505],[917536,917631],[917760,917999]],joiningTypeCausing:[[1600,1600],[2042,2042],[6154,6154],[8205,8205]]});function es(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 1===e.length?ea[e[0]]:en(e.reduce((t,e)=>(t.push(...ea[e]),t),[]))}let eo=(Object.keys({space:es("space"),symbol:en([[0,25],[33,38],[40,44],[46,47],[58,64],[91,96],[123,127],171,187,[8220,8223]]),single:es("cjk","kana","symbolCjk"),surrogate:es("surrogate")}),es("joiningTypeLeft","joiningTypeDual")),el=es("joiningTypeRight","joiningTypeDual"),eh=es("joiningTypeTransparent"),eu=es("joiningTypeCausing"),ec=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1519,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1564],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2046,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2144,2154],[2208,2228],[2230,2237],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67872,67897],[67903,67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68416,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[69376,69415],[69424,69445],[69457,69465],[69600,69622],[124928,125124],[125127,125135],[125184,125251],[125259,125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651]];function ed(t,e){void 0===e&&(e="");let n=!0;for(let{value:e}of t8(t))if(t0(e)||t1(e)){n=!1;break}return n?t:Array.from(t8(t),t=>{let{value:n}=t;return t0(n)||t1(n)?e:String.fromCodePoint(n)}).join("")}class ep{}class eg extends ep{write(t){return String(t)}read(t){let e=parseInt(t,10);return e>=0?e:NaN}}class ef extends ep{write(t){if(!t)return"";let e=--t%26;return String.fromCharCode((this.lowerCase?97:65)+e).repeat((t-e)/26+1)}read(t){if(!t)return 0;let e=t[0];if(!function(t){let e=t.charCodeAt(0);return e>=65&&e<=90||e>=97&&e<=122}(e)||!function(t,e){if(!t)return!e;e=(e||t)[0];for(let n=0,r=t.length;n<r;++n)if(t[n]!==e)return!1;return!0}(t,e))return NaN;let n=e.charCodeAt(0);return(t.length-1)*26+(n-(n>=97?97:65))+1}}let ey=["V","L","D"].reduce((t,e)=>(t[e]=t[e.toLowerCase()]=!0,t),Object.create(null)),ex=G({I:1,IV:4,V:5,IX:9,X:10,XL:40,L:50,XC:90,C:100,CD:400,D:500,CM:900,M:1e3},(t,e,n)=>(t[n]=t[n.toLowerCase()]=e,t),Object.create(null)),em=function(t){let e=[];for(let n=0;n<3;++n){let r=2*n,i=t[r],a=t[r+1],s=t[r+2],o=[""];for(let t=1;t<=3;++t)o.push(i.repeat(t));o.push(i+a),o.push(a);for(let t=1;t<=3;++t)o.push(a+i.repeat(t));o.push(i+s),e.push(o)}return e}(["I","V","X","L","C","D","M"]);class ev extends ep{write(t){if(!t)return"";let e="";for(let n=0;n<3&&t;++n){let r=t%10;e=em[n][r]+e,t=(t-r)/10}return"M".repeat(t)+e}read(t){let e=0,n=0,r=t.length,i=1e4;for(;n<r;){let a=t[n],s=ex[a];if(null==s)return NaN;let o=1;for(;a===t[n+o];)++o;if(o>1){if("M"!==a.toUpperCase()&&o>3||ey[a])return NaN;s*=o}else if(n+1<r){let e=ex[t[n+1]];if(null!=e&&s<e){if(null==(s=ex[t.slice(n,n+2)]))return NaN;o=2}}if(s>=i)return NaN;i=s,e+=s,n+=o}return e}}class eb extends ep{getDigitMap(){return this.digitMap||(this.digitMap=this.digits.reduce((t,e,n)=>(t[e]=n,t),Object.create(null)))}getDigitString(t){return this.digits[t]||""}getDigitNumber(t){return this.getDigitMap()[t]??-1}write(t){let e="",n=String(t);for(let t=0,r=n.length;t<r;++t)e+=this.getDigitString(n[t]);return e}read(t){if(!t)return NaN;let e=0;for(let n=0,r=t.length;n<r;++n){let r=this.getDigitNumber(t[n]);if(r<0)return NaN;e=10*e+r}return e}constructor(...t){super(...t),this.digitMap=void 0}}class ew extends eb{write(t){if(t<10||t>=100)return super.write(t);let e=t%10,n=(t-e)/10,r="";return n>1&&(r+=this.getDigitString(n)),r+=this.tenDigit,e&&(r+=this.getDigitString(e)),r}read(t){return NaN}}let eM=["零","一","二","三","四","五","六","七","八","九"],e_=["零","壹","貳","參","肆","伍","陸","柒","捌","玖"],eA=eM.map((t,e)=>e?t:"○"),eS=eM.map((t,e)=>e?t:"〇"),eC=["十","百","千"],eI=["拾","佰","仟"],eP=["萬","億","兆"],eT=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],ek=["万","亿","兆"];class eL extends ep{getDigit(t,e){return this.digits[t]}getUnit(t,e){return 0===t||0===e?"":this.units[e-1]}getGroupUnit(t,e){if(!t||0===e)return"";let n=this.groups,r=e-1,i=n.length,a=r%i;return n[a]+n[i-1].repeat((r-a)/i)}writeGroup(t,e,n){let r="",i=!1,a=t.length;for(let s=0;s<a;++s){let o,l=parseInt(t[a-1-s],10);0===l?i?(i=!1,o=this.getDigit(0,0)):o="":(i=!0,o=this.getUnit(l,s),this.suppressTenDigit&&2===a&&1===l&&1===s&&e===n-1||(o=this.getDigit(l,s)+o)),r=o+r}return r+this.getGroupUnit(r,e)}splitNumber(t){let e=[];for(let n=t.length;n>0;n-=4)e.push(t.slice(Math.max(n-4,0),n));return e}write(t){return t?this.splitNumber(String(t)).map((t,e,n)=>this.writeGroup(t,e,n.length)).reverse().join(""):this.getDigit(0,0)}read(t){return NaN}constructor(...t){super(...t),this.suppressTenDigit=!0}}class eD extends eL{constructor(...t){super(...t),this.groups=ek}}class eR extends eL{constructor(...t){super(...t),this.groups=eP}}let eN=F({decimal:eg,decimalZero:class extends eg{write(t){return String(t).padStart(2,"0")}},lowerLetter:class extends ef{constructor(...t){super(...t),this.lowerCase=!0}},upperLetter:class extends ef{constructor(...t){super(...t),this.lowerCase=!1}},lowerRoman:class extends ev{write(t){return super.write(t).toLowerCase()}},upperRoman:ev,chineseCounting:class extends ew{constructor(...t){super(...t),this.digits=eA,this.tenDigit=eC["0"]}},chineseCountingThousand:class extends eD{constructor(...t){super(...t),this.digits=eM,this.units=eC}},chineseLegalSimplified:class extends eD{constructor(...t){super(...t),this.suppressTenDigit=!1,this.digits=eT,this.units=eI}},ideographDigital:class extends eb{constructor(...t){super(...t),this.digits=eS}},ideographLegalTraditional:class extends eR{constructor(...t){super(...t),this.suppressTenDigit=!1,this.digits=e_,this.units=eI}},taiwaneseCounting:class extends ew{constructor(...t){super(...t),this.digits=eA,this.tenDigit=eC["0"]}},taiwaneseCountingThousand:class extends eR{constructor(...t){super(...t),this.digits=eM,this.units=eC}},taiwaneseDigital:class extends eb{constructor(...t){super(...t),this.digits=eA}}},t=>new t);function eO(t,e){let n=e.find(e=>{let[n,r]=e;return r instanceof RegExp?r.test(t):"function"==typeof r&&r(t)});return n?n[0]:null}let ej="undefined"==typeof navigator?"node":eO(navigator.userAgent,[["opera",/opera/i],["chrome",/chrome/i],["safari",/safari/i],["firefox",/gecko\/\d/i]]);function eE(){return"safari"===ej}"undefined"!=typeof navigator&&/\bwv\b/.test(navigator.userAgent);let eV="undefined"==typeof navigator?null:eO(navigator.userAgent,[["ios",()=>/iPhone|iPad|iPod/i.test(navigator.platform)],["ipad",()=>/MacIntel/i.test(navigator.platform)&&navigator.maxTouchPoints>1],["android",/android/i],["windows",/windows|win32/i],["linux",/linux/i],["mac",/Mac_PowerPC|Macintosh/i]]);(function(){if("undefined"==typeof performance)return;let t=performance.getEntriesByType?.("navigation")[0]||performance.getEntries?.()[0];t&&t.nextHopProtocol})(),"undefined"!=typeof navigator&&/mobile/i.test(navigator.userAgent);let eB="http://www.w3.org/2000/svg",ez="http://www.w3.org/1999/xlink";function eF(t){return"nodeType"in t}function eG(t){return eF(t)&&t.nodeType===t.ELEMENT_NODE}function eH(t){return eF(t)&&t.nodeType===t.TEXT_NODE}function eW(t){return eF(t)&&t.nodeType===t.COMMENT_NODE}function eq(t){return eF(t)&&t.nodeType===t.DOCUMENT_FRAGMENT_NODE}function eU(t){return eG(t)&&"ownerSVGElement"in t}let eZ=["base","link","meta","noscript","script","style","template","title","command"],e$=["embed","iframe","object","head"].concat(eZ),eJ=["table","caption","col","colgroup","tbody","td","tfoot","th","thead","tr"],eY=["address","article","aside","blockquote","dd","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","menu","nav","ol","p","pre","section","ul",...eJ],eX={metadata:eZ,heading:["h1","h2","h3","h4","h5","h6","hgroup"],phrasing:["a","abbr","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","math","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","command","keygen"],embedded:["audio","canvas","embed","iframe","img","math","object","picture","svg","video"],ignored:e$,list:["ol","ul"],table:eJ,textblock:["p","li","h1","h2","h3","h4","h5","h6"],block:eY},eQ=Object.keys(eX),eK=F(eX,t=>t.reduce((t,e)=>(t[e.toLowerCase()]=t[e.toUpperCase()]=!0,t),Object.create(null)));function e0(){return eQ}function e1(t){return eX[t]}function e2(t,e){return!!eK[e]["string"==typeof t?t.toLowerCase():t.tagName]}function e5(t){let e,n=t.firstChild;if(!n)return null;for(;e=n.firstChild;)n=e;return n}function e4(t){let e,n=t.firstElementChild;if(!n)return null;for(;e=n.firstElementChild;)n=e;return n}function e8(t){let e;for(;e=t.lastChild;)e.remove()}function e3(t,e){for(let n=t.firstElementChild;n;n=n.nextElementSibling)if(n.matches(e))return n;return null}function e6(t,e,n){if(t.tagName.toLowerCase()===e.toLowerCase())return t.cloneNode(n);let r=t.ownerDocument,i=eU(t)?r.createElementNS(eB,e):r.createElement(e);for(let e of t.attributes){let{name:t,value:n}=e;"xlink:href"===t?i.setAttributeNS(ez,t,n):i.setAttribute(t,n)}return n&&t.firstChild&&i.append(...t.cloneNode(!0).childNodes),i}function e7(t,e){Object.assign(t.style,e)}let e9=["xlink:href"].reduce((t,e)=>(t[e]=!0,t),Object.create(null)),nt=Object.prototype.hasOwnProperty;function ne(t,e){for(let n in e)if(nt.call(e,n)){let r=e[n];if(null==r)continue;switch(n){case"class":case"classList":{let e=t.getAttribute("class");t.setAttribute("class",(e?e+" ":"")+function t(e){return e?Array.isArray(e)?e.reduce((e,n)=>(e.length&&" "!==e.at(-1)&&(e+=" "),e+=t(n)),""):e:""}(r));break}case"style":t.style.cssText=String(r);break;case"inline_style":e7(t,r);break;default:e9[n]?t.setAttributeNS("http://www.w3.org/1999/xlink",n,String(r)):t.setAttribute(n,String(r))}}}var nn=n(85150),nr=n.n(nn);let ni=(()=>{let t=["a","script","style","title"].reduce((t,e)=>(t[e]=!0,t),Object.create(null));return nr().reduce((e,n)=>(t[n]||e.add(n),e),new Set)})();function na(t,e,n,r){if(!e){if(!globalThis.document)throw Error("Document is not provided");e=globalThis.document}return function t(e,n,r,i){if(null!=e.nodeType)return e;if("string"==typeof e)return n.createTextNode(e);if(Array.isArray(e)){let a,s=e[0];a=ni.has(s)?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);let o=1,l=e[1];null==l?++o:l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)&&(++o,ne(a,l));for(let s=o,l=e.length;s<l;++s){let l=e[s];null!=l&&(0===l?r?.call(i,a,e,s,o):"function"==typeof l?l(a):a.appendChild(t(l,n,r,i)))}return a}throw Error(`Invalid structure [${e}]`)}(t,e,n,r)}function ns(t,e,n){return t?e[t]||n:null}let no=["inherit","initial","unset","revert","revert-layer"],nl=function(){let t=Object.create(null);return t.px=.75,t.cm=72/2.54,t.mm=.1*t.cm,t.q=.025*t.cm,t.in=72,t.pc=12,t.pt=1,t}(),nh=function(){let t=Object.create(null),e=1/nl.px;return P(nl,function(n,r){t[r]=n*e}),t.px=1,t}(),nu=function(){let t=Object.create(null);return P(nh,function(e,n){t[n]=1/e}),t.px=1,t}();function nc(t){return!t||"%"===t}function nd(t,e,n){return"%"!==e||n?e||"%"!==n?t:100*t:.01*t}function np(t,e,n,r){var i,a,s,o;if(e&&(e=e.toLowerCase()),n&&(n=n.toLowerCase()),e===n)return t;let l=!(i=e)||"%"===i,h=!(a=n)||"%"===a;if(l&&h)return nd(t,e,n);if(l)return null==r?NaN:nd(t*r,e,"");if(h)return null==r?NaN:nd(t/r,"",n);return s=e,o=n,0===t?0:t*nh[s]*nu[o]}function ng(t,e,n){var r;let i=parseFloat(t);return isNaN(i)||(i=np(i,"string"!=typeof(r=t)?"":r.trim().match(/[a-zA-Z%]*$/)[0].toLowerCase(),e,n)),i}var nf=n(74654),ny=n.n(nf);let nx="transparent";function nm(t,e){if(!t)return null;if(t===nx)return e?.disableTransparent?null:nx;if((3===t.length||6===t.length||8===t.length)&&/^[0-9a-fA-F]+$/.test(t)&&(t="#"+t),e?.simple){var n;return(7===(n=t).length||9===n.length)&&/^#[0-9a-fA-F]+$/.test(n)?"hexa"===(e?.format??"hex")?t.padEnd(9,"f").toLowerCase():"00"===t.slice(7,9)?e?.disableTransparent?null:nx:t.slice(0,7).toLowerCase():null}try{let n=new(ny())(t),r=e?.format??"hex";if("hexa"===r)return(n.hex()+Math.round(255*n.alpha()).toString(16).padStart(2,"0")).toLowerCase();if(0===n.alpha())return e?.disableTransparent?null:nx;return n.hex().toLowerCase()}catch{return null}}let nv=H(Object.assign(Object.create(null),{none:"none",solid:"solid",dotted:"dotted",dashed:"dashed"}));function nb(t){var e,n;return e=t,n=nv,e?n[e]||"solid":null}function nw(t){return(t=t.trim().replaceAll('"',"")).startsWith("'")&&t.endsWith("'")&&(t=t.slice(1,-1)),t}function nM(t,e){return t.split(",",e).map(nw).filter(t=>t)}function n_(t){return nM(t,1)[0]??""}Object.assign(H(Object.assign(Object.create(null),{none:"none",solid:"none",dotted:"2,2",dashed:"6,6"})),{none:"solid"});let nA=["Apple Symbols","Bookshelf Symbol 7","Marlett","Symbol","Webdings","Wingdings","Wingdings 2","Wingdings 3"].map(t=>t.toLowerCase());function nS(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}class nC{constructor(t){this.matrix=t}static from(t,e,n,r,i,a){return new nC([t,e,n,r,i,a])}static create(){return this.from(1,0,0,1,0,0)}static createTranslate(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.from(1,0,0,1,t,e)}static createRotate(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0);let r=t*tu,i=Math.sin(r),a=Math.cos(r);return this.from(a,i,-i,a,-e*a+n*i+e,-e*i-n*a+n)}static createScale(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.from(t,0,0,e,n*(1-t),r*(1-e))}static createFlip(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),"boolean"==typeof t&&(t=t?-1:1),"boolean"==typeof e&&(e=e?-1:1),this.createScale(Math.sign(t),Math.sign(e),n,r)}static createSkewY(t,e){void 0===e&&(e=0);let n=Math.tan(t*tu);return this.from(1,n,0,1,0,-e*n)}static applyTranslate(t,e,n){return{x:t.x+e,y:t.y+n}}static applyRotate(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),this.createRotate(e,n,r).apply(t)}static applyScale(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.createScale(e,n,r,i).apply(t)}static applyFlip(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.createFlip(e,n,r,i).apply(t)}static applySkewY(t,e,n){return void 0===n&&(n=0),this.createSkewY(e,n).apply(t)}apply(t){let{x:e,y:n}=t,r=this.matrix;return{x:r[0]*e+r[2]*n+r[4],y:r[1]*e+r[3]*n+r[5]}}applyDirected(t){let e=D(t.ang,360)*tu,{x:n,y:r}=this.apply(t),{x:i,y:a}=this.apply({x:t.x+100*Math.cos(e),y:t.y+100*Math.sin(e)});return{x:n,y:r,ang:D(Math.atan2(a-r,i-n)*tc,360)}}applyWithoutTranslate(t){let{x:e,y:n}=t,r=this.matrix;return{x:r[0]*e+r[2]*n,y:r[1]*e+r[3]*n}}inverse(){let t,e=this.matrix,n=e[0]*e[3]-e[1]*e[2];if(0===n)t=Array(6).fill(NaN);else{let r=1/n,i=e[0]*r,a=e[1]*r,s=e[2]*r,o=e[3]*r,l=e[4],h=e[5];t=[o,-a,-s,i,s*h-o*l,a*l-i*h]}return this.matrix=t,this}multiply(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(let t of e)this.matrix=nS(this.matrix,t.matrix);return this}preMultiply(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(let t=e.length-1;t>=0;--t)this.matrix=nS(e[t].matrix,this.matrix);return this}translate(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.multiply(nC.createTranslate(t,e))}rotate(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.multiply(nC.createRotate(t,e,n))}scale(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.multiply(nC.createScale(t,e,n,r))}flip(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.multiply(nC.createFlip(t,e,n,r))}skewY(t,e){return void 0===e&&(e=0),this.multiply(nC.createSkewY(t,e))}prependTranslate(t,e){return this.preMultiply(nC.createTranslate(t,e))}prependRotate(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.preMultiply(nC.createRotate(t,e,n))}prependScale(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.preMultiply(nC.createScale(t,e,n,r))}prependFlip(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.preMultiply(nC.createFlip(t,e,n,r))}prependSkewY(t,e){return void 0===e&&(e=0),this.preMultiply(nC.createSkewY(t,e))}copy(){return new nC(this.matrix)}toString(){let t=this.matrix;return`matrix(${t[0]},${t[1]},${t[2]},${t[3]},${t[4]},${t[5]})`}}class nI{constructor(t){this.hasOnce=!1,this.handlers=[]}hasHandler(){return this.handlers.length>0}createHandler(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=0),{f:t,once:e,priority:n}}findIndex(t){return this.handlers.findIndex(e=>e.f===t)}splice(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];let a=this.handlers,s=a.slice(0,t);s.push(...r);for(let n=t+e;n<a.length;++n)s.push(a[n]);this.handlers=s}_add(t,e){let n=this.createHandler(t,e.once,e.priority);if(this.findIndex(n.f)>=0)return!1;n.once&&(this.hasOnce=!0);let r=this.handlers,i=r.length,a=0;for(;a<i&&!(r[a].priority<n.priority);++a);return this.splice(a,0,n),!0}add(t,e){return void 0===e&&(e=Object.create(null)),"number"==typeof e&&(e={priority:e}),this._add(t,e)}addOnce(t,e){return void 0===e&&(e=Object.create(null)),"number"==typeof e&&(e={priority:e}),this._add(t,{...e,once:!0})}remove(t,e){let n=this.findIndex(t);return!(n<0)&&(this.splice(n,1),!0)}retrieveHandlers(){let t=this.handlers;return this.hasOnce&&(this.hasOnce=!1,this.handlers=t.filter(t=>!t.once)),t}}class nP extends nI{dispatch(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.retrieveHandlers(),i=r.length;for(let t=0;t<i;++t)r[t].f.apply(null,e)}}class nT extends nI{constructor(t){super(t);let{pipelineTransformer:e,pipelineParameterIndex:n=0}=t??{};if(!Number.isInteger(n)||n<0)throw RangeError("The parameter index must be unsigned integer.");this.pipelineTransformer=e,this.pipelineParameterIndex=n}dispatch(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let{pipelineTransformer:r,pipelineParameterIndex:i}=this,a=this.retrieveHandlers(),s=a.length;for(let t=0;t<s;++t){let n=a[t].f.apply(null,e);e[i]=r?r(n,e[i]):n}return e[i]}}class nk extends nI{dispatch(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.retrieveHandlers(),i=r.length;for(let t=0;t<i;++t){let n=r[t].f.apply(null,e);if(n)return n}}}class nL extends nI{dispatch(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=Promise.resolve(e[0]),i=this.retrieveHandlers(),a=i.length;for(let t=0;t<a;++t){let n=i[t].f;r=r.then(t=>(e[0]=t,n.call(null,...e)))}return r}}let nD=new WeakMap;function nR(t,e){return(function(t){let e,n=nD.get(t);if(n)return n;let r=[];for(let n of function*(t){for(let e=t;e;e=Object.getPrototypeOf(e))yield e}(t)){if(e=nD.get(n))break;r.push(n)}for(let t of r.reverse())e=function(t,e){if(!Object.hasOwn(t,"getSelfPropertyName"))return e??new Set;let n=new Set(e);var r=t.getSelfPropertyName?.();if(r)for(let t of Array.isArray(r)?r:[r])t&&n.add(t);return n}(t,e),nD.set(t,e);return e??new Set})(t).has(e)}class nN{constructor(t,e){if(0===e.length||e.length%3!=0)throw RangeError(`Invalid path length: ${e.length}`);this.pos=t,this.path=e}static ensurePath(t){return t?t.slice():[]}static _resolve(t,e,n,r){if(!(r>=0&&r<=e.getContentSize()))throw RangeError(`Offset ${r} out of range [0, ${e.getContentSize()}].`);let i=this.ensurePath(t),a=n+r;for(;;){let{index:t,offset:a}=e.findIndex(r),s=r-a;if(i.push(e,t,n+a),!s||(e=e.child(t)).isText)break;r=s-1,n+=a+1}return new this(a,i)}static _resolveIndex(t,e,n,r){let i=this.ensurePath(t);Array.isArray(r)||(r=[r]);let a=r.length;if(!i.length&&!a)throw RangeError("Invalid to resolve empty index array on empty path.");for(let t=0;t<a;++t){if(0!==t&&e.type.isLeaf)throw RangeError(`Invalid to resolve index inside leaf node ${e.type.name}.`);let a=r[t];if(!(a>=0&&a<=e.childCount)){let n=`Index ${a} out of range [0, ${e.childCount}]`;throw 0!==t&&(n+=` in node ${e.type.name}}`),RangeError(n+".")}let s=e.offsetAt(a);i.push(e,a,n+s),e=e.maybeChild(a),n+=s+1}return new this(n-1,i)}}class nO extends nN{static resolve(t,e){return this._resolve(null,t,0,e)}}class nj{constructor(t,e){this._pos=t,this._path=e}get depth(){return this._path.length/2}get pos(){return this.isAtEnd()?-1:this._pos}get index(){if(this.isAtEnd())return -1;let t=this._path;return t[t.length-1]}get parent(){if(this.isAtEnd())return null;let t=this._path;return t[t.length-2]}get parentNode(){let t=this.parent;return t&&t.type?t:null}get node(){let t=this.parent;return t?t.maybeChild(this.index):null}isAtEnd(){return 0===this.depth}move(t,e){this._pos+=e.nodeSize*t;let n=this._path;n[n.length-1]+=t}enter(t,e){this._pos+=t;let n=this._path;t>0?n.push(e,0):(--n[n.length-1],n.push(e,e.childCount))}leave(t){this._pos+=t;let e=this._path;e.length-=2,t>0&&++e[e.length-1]}next(t){if(void 0===t&&(t=!1),this.isAtEnd())return this;let e=this.node;return e?t||e.type.isLeaf?this.move(1,e):this.enter(1,e):this.leave(1),this}prev(t){if(void 0===t&&(t=!1),this.isAtEnd())return this;let e=this.index;if(e){let n=this.parent.maybeChild(e-1);t||n.type.isLeaf?this.move(-1,n):this.enter(-1,n)}else this.leave(-1);return this}walk(t,e){return t>0?this.next(e):this.prev(e)}clone(){return new this.constructor(this._pos,this._path.slice())}static create(t,e,n){void 0===n&&(n=-1);let r=nO.resolve(t,e).path,i=[];for(let t=0,e=r.length;t<e;t+=3)i.push(r[t],r[t+1]);let a=e-r[r.length-1];if(a&&(e-=a,n>0)){let t=i.length;e+=i[t-2].child(i[t-1]).nodeSize,++i[t-1]}return new this(e,i)}}function nE(t){let e=function(t){try{return JSON.stringify(t)}catch{return}}(t);return void 0!==e&&e.length>2?e:void 0}function nV(t){if(!t)return;let e=function(t){try{return JSON.parse(t)}catch{return}}(t);return e&&"object"==typeof e&&!Array.isArray(e)?e:void 0}let nB=Object.prototype.hasOwnProperty;function nz(t){let e;for(;(e=t.length)&&null==t[e-1];)t.pop();return t}class nF{assertAvailable(){if(this.hasValue()){if(this.optional)throw Error("Can not create attribute with both default value and `optional`.");if(this.deep)throw Error("Can not create attribute with both default value and `deep`.");if(this.array)throw Error("Can not create attribute with both default value and `array`.")}if(this.deep&&this.array)throw Error("Can not create attribute with both `deep` and `array`.");if(this.deep){if(this.normalizer)throw Error("Can not create attribute with both `deep` and `normalizer`.");if(this.optional&&this.constructor.isAttrsRequired(this.deep))throw Error("Can not create attribute with both `deep` and `optional` while there is required attribute inside `deep`.")}if(this.array&&this.normalizer)throw Error("Can not create attribute with both `array` and `normalizer`.");if(this.normalizer){if(this.hasValue()){let t=this.getValue();if(t!=this.normalizeValue(t))throw Error(`Given default value can not pass given normalizer. ${JSON.stringify(t)} => ${JSON.stringify(this.normalizeValue(t))}`)}let t=this.getEmptyValue();if(null!=t){let e=this.normalizeValue(t);if(null!=e&&t!==e)throw Error(`Given empty value can not pass given normalizer. ${JSON.stringify(t)} => ${JSON.stringify(this.normalizeValue(t))}`)}}if(!this.settable&&this.clearable)throw Error("Can not create attribute with clearable but non-settable.")}isRequired(t){return this.constructor.isAttrRequired(this,t)}static defaultAttrs(t){let e=Object.create(null);for(let n in t)if(nB.call(t,n)){let r,i=t[n];if(i.optional)continue;if(i.deep?r=this.defaultAttrs(i.deep):i.array?r=[]:"function"!=typeof i.default&&(r=i.default),null==r)return null;e[n]=r}return e}static emptyAttrs(t){let e=Object.create(null);for(let n in t)if(nB.call(t,n)){let r=t[n].getEmptyValue();null!=r&&(e[n]=r)}return e}static isAttrRequired(t,e){return!(t.optional||t.hasValue())&&(t.deep?this.isAttrsRequired(t.deep,e):null==e)}static isAttrsRequired(t,e){for(let n in t)if(nB.call(t,n)&&this.isAttrRequired(t[n],e&&e[n]))return!0;return!1}static checkAttr(t,e,n){if(!t||!t.settable)return!1;if(null==e)return!t.isRequired();if(t.deep){if(!this.checkAttrs(t.deep,e))return!1}else if(t.array){let r=t.array;if(Array.isArray(e)){for(let t=0,i=e.length;t<i;++t)if(!this.checkAttr(r,e[t],n))return!1}else if(!n)return!1;else for(let t in e)if(nB.call(e,t)&&N(t)&&!this.checkAttr(r,e[t],n))return!1}return!0}static checkAttrs(t,e,n){if(!e)return!0;for(let r in e)if(nB.call(e,r)&&!this.checkAttr(t[r],e[r],n))return!1;return!0}static copyAttr(t,e,n,r){if(!t||void 0===n)return e??null;if(null===n)return null;if(t.deep)e=this.copyAttrs(t.deep,e,n,r);else if(t.array){if(Array.isArray(n))e=n;else if(r){let i=t.array,a=e?e.slice():[];for(let t in n)nB.call(n,t)&&N(t)&&(a[t]=this.copyAttr(i,e&&e[t],n[t],r));e=nz(a)}}else e=n;return e}static copyAttrs(t,e,n,r){if(!n)return e||Object.create(null);let i=Object.assign(Object.create(null),e);for(let a in n)if(nB.call(n,a)){let s=this.copyAttr(t[a],e&&e[a],n[a],r);null==s?delete i[a]:i[a]=s}return i}static invertAttr(t,e,n,r){if(t&&void 0!==n){if(null==e)return null;if(null===n)return e??null;if(t.deep)e=this.invertAttrs(t.deep,e,n,r);else if(t.array&&!Array.isArray(n)&&r){let i=t.array,a=Object.create(null);for(let t in n)nB.call(n,t)&&N(t)&&(a[t]=this.invertAttr(i,e[t],n[t],r));e=a}return e}}static invertAttrs(t,e,n,r){if(!n)return null;let i=Object.create(null);for(let a in n)nB.call(n,a)&&(i[a]=this.invertAttr(t[a],e&&e[a],n[a],r));return i}static computeAttrsEmptyValue(t){let e;for(let n in t)if(nB.call(t,n)){let r=t[n],i=r.getEmptyValue();if(null==i){if(!r.hasValue())continue;i=r.getValue()}e||(e=Object.create(null)),e[n]=i}return e}static isAttrCopyable(t){return!(t.copyable<=0)&&(t.deep?this.isAttrsCopyable(t.deep):!t.array||this.isAttrCopyable(t.array))}static isAttrsCopyable(t){for(let e in t)if(nB.call(t,e)&&!this.isAttrCopyable(t[e]))return!1;return!0}static copyableAttr(t,e){if(null==e)return e;if(0===t.copyable)e=t.copyTransformer?t.copyTransformer(e)??null:null;else if(t.deep)e=this.copyableAttrs(t.deep,e);else if(t.array&&Array.isArray(e)){let n,r=t.array;for(let t=0,i=e.length;t<i;++t){let i=e[t],a=this.copyableAttr(r,i);i!==a&&(n||(n=e.slice()),n[t]=a)}n&&(e=nz(n))}return e}static copyableAttrs(t,e){let n;for(let r in t)if(nB.call(t,r)){let i=t[r],a=i.copyable<0,s=e[r],o=this.copyableAttr(i,s);(s!==o||null!=s&&a)&&(n||(n=Object.assign(Object.create(null),e)),a?(delete n[r],n["__"+r]=o):null==o?delete n[r]:n[r]=o)}return n||e}static mergeAttrs(t){let e=Object.create(null),n=arguments.length;for(let r=0,i=t.length;r<i;++r){let i,a,s=t[r];for(let t=1;t<n;++t)if(i=arguments[t][s],null!=i&&""!==i){a=!0;break}e[s]=a?i:null}return e}}function nG(t){return t&&"object"==typeof t?t:null}class nH extends nF{static #t=this.empty=new nH;static #e=this.optional=new nH({optional:!0});static #n=this.id=new nH({default:J,copyable:-1});constructor(t=Object.create(null)){super(),this.default=t.default,this.empty_value=t.empty_value??void 0,this.optional=!!t.optional,this.deep=t.deep,this.array=t.array,this.normalizer=this.ensureNormalizer(t.normalizer),this.clearable=!!t.clearable,this.hidden=!!t.hidden,this.copyable="number"==typeof t.copyable?L(t.copyable,!0,1):+(!1!==t.copyable),this.copyTransformer=t.copyTransformer,this.backward=!!t.backward,this.settable=!1!==t.settable,this.options=t,!this.optional||!this.deep||"empty_value"in t||(this.empty_value=this.constructor.computeAttrsEmptyValue(this.deep)),this.assertAvailable()}ensureNormalizer(t){return"string"==typeof t?this.constructor.getPresetNormalizer(t):Array.isArray(t)?e=>t.includes(e)?e:null:t}getEmptyValue(){return this.empty_value}getDefaultValue(){return this.getEmptyValue()}hasValue(){return null!=this.default}getValue(){let t=this.default;if(null==t)throw Error("No value in attribute.");return"function"==typeof t?t():t}normalizeValue(t,e){return(void 0===e&&(e=!1),null!=t&&this.normalizer&&(t=this.normalizer.call(null,t)),null!=t)?t:e?this.getEmptyValue():void 0}copy(t){let e={...this.options,...t};return new this.constructor(e)}static isSettableAttr(t){return!!t.settable&&(t.deep?this.isSettableAttrs(t.deep):!t.array||this.isSettableAttr(t.array))}static isSettableAttrs(t){return z(t,t=>this.isSettableAttr(t))}static settableAttrValue(t,e){if(t.settable)return null==e?null:(t.deep&&(e=this.settableAttrValues(t.deep,e)),e)}static settableAttrValues(t,e){let n=nG(e);return n?G(n,(e,n,r)=>{let i=t[r];if(i){let t=this.settableAttrValue(i,n);void 0!==t&&(e[r]=t)}return e},Object.create(null)):null}static completeAttrValue(t,e){return null==e?null:(t.deep&&(e=this.completeAttrValues(t.deep,e)),e)}static completeAttrValues(t,e){let n=nG(e),r=Object.create(null);for(let[e,i]of Object.entries(t))r[e]=this.completeAttrValue(i,n?.[e])??null;return r}static computeAttr(t,e){let n;if(t.optional&&null==e)return;if(t.deep)n=this.computeAttrs(t.deep,e);else if(t.array)if(Array.isArray(e)){let r,i=t.array;for(let t=0,n=e.length;t<n;++t){let n=e[t],a=this.computeAttr(i,n);n!==a&&(r||(r=e.slice()),r[t]=a)}n=r?nz(r):e}else n=[];else n=null!=e?e:t.getValue();let r=t.normalizeValue(n);if(null!=r)return r;if(null==e)throw Error("Infinity recursion detected. The preset attribute value must always pass the normalizer.");return this.computeAttr(t,null)}static computeAttrs(t,e){let n=nG(e),r=Object.create(null);for(let[e,i]of Object.entries(t)){let t=this.computeAttr(i,n?.[e]);null!=t&&(r[e]=t)}return r}static clearBackwardAttrValues(t,e){let n,r=nG(e);return P(t,(t,e)=>{t.backward&&(n||(n={...r}),n[e]=null)}),n||r||null}static normalizeAttrValue(t,e){let n;if(null!=e){if(t.deep)n=this.normalizeAttrValues(t.deep,e);else if(t.array)if(Array.isArray(e)){let r,i=t.array;for(let t=0,n=e.length;t<n;++t){let n=e[t],a=this.normalizeAttrValue(i,n);n!==a&&(r||(r=e.slice()),r[t]=a)}n=r?nz(r):n}else n=void 0;else n=t.normalizeValue(e);return n}}static normalizeAttrValues(t,e){let n,r=nG(e);if(r)return P(t,(t,e)=>{let i=r[e],a=this.normalizeAttrValue(t,i);(null==a||i!==a)&&(n||(n={...r}),null==a?delete n[e]:n[e]=a)}),n||r}static mergeTypeAttrs(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let i=Object.assign(Object.create(null),t);for(let t=0,e=n.length;t<e;++t){let e=n[t];e&&P(e,(t,e)=>{if(null==t)delete i[e];else if(t instanceof nH)i[e]=t;else{let n=i[e];if(!n)throw RangeError(`Base attribute \`${e}\` is missing.`);i[e]=n.copy(t)}})}return i}static getPresetNormalizer(t){return x[t]}static createMarksNormalizer(t){return e=>this.normalizeArrayValue(e,e=>{let n=e&&e._?e:void 0;if(!n)return;let r=t(n);return null==r?void 0:"boolean"==typeof r?r?n:void 0:r},{pruneEmpty:!0})}static createArrayNormalizer(t,e){let n;return n="function"==typeof t?t:e=>this.normalizeAttrValue(t,e),t=>this.normalizeArrayValue(t,n,e)}static normalizeArrayValue(t,e,n){let r;if(void 0===n&&(n=m),!Array.isArray(t))return null;for(let n=0,i=t.length;n<i;++n){let i=t[n]??null,a=e(i)??null;i!==a&&(r||(r=t.slice()),r[n]=a)}let i=r||t;return n.allowNull||i.every(A)||(i=i.filter(A)),n.pruneEmpty&&0===i.length&&(i=null),i}static create(t){return t?new this(t):this.empty}static createOptional(t){return t?new this({...t,optional:!0}):this.optional}}class nW{constructor(t,e){this.name=t,this.schema=e,this.type=this,this.attrKeys=void 0,this.defaultAttrValues=void 0,this.presetAttrValues=void 0,this._isSettableAttrs=void 0,this.getFreezeList().forEach(t=>{let e=this[t];void 0!==e&&Object.defineProperty(this,t,{value:e})})}getFreezeList(){return["className"]}static getSelfPropertyName(){}get classPrefix(){return"syno-o-doc-pm-"}get className(){return this.classPrefix+this.name.replace(/_/g,"-")}static is(t){return nR(this,t)}is(t){return t===this.name||nR(this.constructor,t)||(!function(t){let e=t.charCodeAt(0);return e>=65&&e<=90}(t[0])?!!this[t]:!!this[`is${t}`])}get attrs(){return m}getAttrKeys(){return this.attrKeys??=Object.keys(this.attrs)}getDefaultAttrValues(){return this.defaultAttrValues??=nH.emptyAttrs(this.attrs)}getPresetAttrValues(){return void 0!==this.presetAttrValues?this.presetAttrValues:this.presetAttrValues=nH.defaultAttrs(this.attrs)}computeCopyableAttrValues(t){return nH.copyableAttrs(this.attrs,t)}isSettableAttrs(){return void 0!==this._isSettableAttrs?this._isSettableAttrs:this._isSettableAttrs=nH.isSettableAttrs(this.attrs)}settableAttrValues(t){return nH.settableAttrValues(this.attrs,t)}completeAttrValues(t){return nH.completeAttrValues(this.attrs,t)}clearBackwardAttrValues(t){return nH.clearBackwardAttrValues(this.attrs,t)}normalizeAttrValues(t){return nH.normalizeAttrValues(this.attrs,t)}static ensureFilter(t){return t?"string"==typeof t?e=>e.is(t):t:_}}class nq extends nW{}class nU{constructor(t,e){this.type=t,this.attrs=e}get name(){return this.type.name}get schema(){return this.type.schema}is(t){return this.type.is(t)}getAttrValue(t,e){void 0===e&&(e=!1);let n=this.attrs[t];if(!e&&null==n){let e=this.type.attrs[t];e&&(n=e.getEmptyValue())}return null!=n?n:null}hasAttrValue(t,e){return void 0===e&&(e=!1),null!=this.getAttrValue(t,e)}}class nZ extends nN{indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&this.atNodeBoundary?0:1)}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.innerOffset,r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.innerOffset;return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}sameDepth(t){return this.commonDepth(t)}commonDepth(t){let e=0,n=Math.min(this.depth,t.depth);for(;e<n&&this.index(e)==t.index(e);)++e;return e}commonNode(t){return this.node(this.commonDepth(t))}blockRange(t,e){if(void 0===t&&(t=this),t.pos<this.pos)return t.blockRange(this,e);for(let n=this.depth-(this.parent.isTextblock||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new n$(this,t,n)}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}plusOne(){if(this.index()===this.parent.childCount)return this;let t=this.path.slice(),e=this.parent.child(t[t.length-2]++).nodeSize-this.innerOffset,n=t[t.length-1]=this.pos+e;return new this.constructor(n,t,this.parentOffset+e)}minusOne(){let t,e,n=this.innerOffset;return n?(t=this.path,e=n):0!==this.index()&&(t=this.path.slice(),e=this.parent.child(--t[t.length-2]).nodeSize,t[t.length-1]-=e),t?new this.constructor(t[t.length-1],t,this.parentOffset-e):this}map(t,e,n){return t.resolve(e.map(this.pos,n))}textblockDepth(t){let e=-1;for(let n=this.depth+1;n>0;--n){let r=this.node(n);if(r){if(r.type.isTextblock){if(e=n,t<0)break}else if(!r.type.isText)break}}return e}eq(t){return this.pos===t.pos&&this.doc===t.doc}eqChanged(t){if(this.eq(t))return!0;let e=this.self,n=t.self;if(!e&&!n){if(this.parentOffset!==t.parentOffset)return!1;e=this.parent,n=t.parent}if(e!==n||this.depth!==t.depth)return!1;for(let e=0;e<=this.depth;++e){let n=this.node(e),r=t.node(e);if(n!==r){if(n.dom!==r.dom)return!1}else break}return!0}eqChangedLoose(t){if(this.pos===t.pos)return!0;let e=this.self,n=t.self;if(!e||!n){if(this.parentOffset!==t.parentOffset||e&&!e.isText||n&&!n.isText)return!1;e=this.parent,n=t.parent}return e===n||e.dom&&e.dom===n.dom}}class n${constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}class nJ{constructor(t,e=t.depth+1,n=t.before(e),r=t.node(e)){this.$pos=t,this.depth=e,this.pos=n,this.node=r}static getResolvedPos(t){return t&&t.$pos}static getDepth(t){return t?t.depth:NaN}static getPos(t){return t?t.pos:NaN}static getNode(t){return t&&t.node}}function nY(t,e,n){if(!t)return e;let r=n&&t.isInSet(n);return e=r?r.addToSet(e):t.removeFromSet(e)}function nX(t){return t.reduce((t,e)=>(t[e._]=e,t),Object.create(null))}class nQ extends nU{static mergeSetJSON(){let t,e;for(let n=arguments.length-1;n>=0;--n){let r=arguments[n];if(r&&r.length)if(t){e||(e=(t=t.slice()).reduce((t,e)=>(t[e._]=!0,t),Object.create(null)));for(let n=r.length-1;n>=0;--n){let i=r[n];i._ in e||(e[i._]=!0,t.push(i))}}else t=r}return t||this.none}static trimSet(t,e){if(!t||!t.length||!e||!e.length)return null;let n=t;for(let t=e.length-1;t>=0;--t)n=e[t].removeFromSet(n);return n!==t?n:null}static trimSetJSON(t,e){if(!t||!t.length||!e||!e.length)return null;let n=nX(t),r=nX(e),i=!1;return t.forEach(t=>{let e=t._,a=r[e];a&&te(a,n[e],tr,void 0)&&(i=!0,delete n[e])}),i?G(n,(t,e)=>(t.push(e),t),[]):null}addToSet(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.type==this.type){let r;if(this.type.supportMerge){let e=this.type.merge(n,this);if(e===n)return t;r=e}else{if(this.eq(n))return t;r=this}let i=t.slice();return i[e]=r,i}if(n.type.rank>this.type.rank)return t.slice(0,e).concat(this).concat(t.slice(e))}return t.concat(this)}removeFromSet(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.type===this.type){if(this.type.supportMerge){let r=this.type.split(n,this);if(r===n)break;{let n=t.slice();return r?n[e]=r:n.splice(e,1),n}}else if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1))}if(n.type.rank>this.type.rank)break}return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&!!I(t.attrs,this.attrs,this.type.checker)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static sameSetJSON(t,e){return t==e||t.length==e.length&&te(nX(t),nX(e),tr,void 0)}static computeActiveMark(t,e,n){return e=function(t,e,n){let r=t.maybeMarkType("link");if(!r)return e;let i=r.isInSet(e);if(!i)return e;let a=n&&r.isInSet(n);if(a)if(a.eq(i))return e;else e=r.removeFromSet(e),n=null;return e=nY(t.maybeMarkType("color"),e,n),e=nY(t.maybeMarkType("underline"),e,n)}(t,e,n),this.filterSet(e,t=>t.type.inclusiveBefore||n&&t.isInSet(n))}}class nK extends nQ{static #t=this.none=v;constructor(t,e){super(t,e)}getValue(){let t=this.getAttrValue(this.type.valueKey);if(null==t)throw Error(`There is no valid value in attribute with name \`${this.type.valueKey}\`.`);return t}toJSON(t){void 0===t&&(t=m);let e=this.type.name,n={_:e,...this.attrsToJSON(t)};return n._=e,n}toJSONString(t){return void 0===t&&(t=m),`{"_":${JSON.stringify(this.type.name)}${this.attrsToJSONString(t)}}`}async toJSONStream(t,e){void 0===e&&(e=m),await t.write(`{"_":${JSON.stringify(this.type.name)}`),await this.attrsToJSONStream(t,e),await t.write("}")}attrsToJSON(t){let e=this.type.computeJsonConversionAttrs(this,t);if(!j(e))return e}attrsToJSONString(t){let e=this.attrsToJSON(t);if(!e)return"";let n=JSON.stringify(e);return n.length>=2&&(n=n.slice(1,-1))&&(n=`,${n}`),n}async attrsToJSONStream(t,e){let n=this.attrsToJSONString(e);n&&await t.write(n)}static fromJSON(t,e){let n=t.markType(e._),r=null;for(let t in e)"_"!==t&&(r||(r=Object.create(null)),r[t]=e[t]);return n.create(r)}static*iterateMarks(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(let t of e)t&&(Array.isArray(t)?yield*t:yield t)}static*iterateMarksAsMarks(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(let t of e)t&&(Array.isArray(t)?yield t:yield[t])}static intersectMarks(){let t;for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of this.iterateMarks(...n)){t=e.type.schema;break}if(!t)return this.none;let i=[...this.iterateMarksAsMarks(...n)],a=i.length;if(0===a)return this.none;{if(1===a)return this.setFrom(i[0]);let e=[];for(let n of t.markTypes()){let t=i.map(t=>n.findFromSet(t));if(t.some(t=>!t))continue;let r=t[0];if(n.supportMerge)for(let e=1;e<a&&(r=n.intersect(r,t[e]));++e);else for(let e=1;e<a;++e)if(!r.eq(t[e])){r=null;break}r&&e.push(r)}return this.setFrom(e)}}static filterSet(t,e){let n=t.filter(e);return n.length===t.length?t:n}static mergeSet(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.none;for(let t of this.iterateMarksAsMarks(...e))if(r.length)for(let e=t.length-1;e>=0;--e)r=t[e].addToSet(r);else r=this.setFrom(t);return r}static setToStyle(t,e){let n=e?.ignoreMarks,r=void 0!==n?Array.isArray(n)?n:[n]:void 0,i=Object.create(null),a=null;if(t.forEach(t=>{if(!t.type.hasCss||r&&r.some(t.is,t))return;if(t.is("Script")){if(a&&a.getValue()&&!t.getValue())return;a=t}let{type:e,key:n,value:s}=t.type.getCssStyle(t);"append"===e&&"string"==typeof i[n]?i[n]+=" "+s:i[n]=s}),a&&a.getValue()){let t=i["font-size"]?ng(i["font-size"],"pt",11):a.schema.markType("font_size").getDefaultMark().getValue();i["font-size"]=t*a.type.fontSizeRatio+"pt"}return i}static setToDOMStyle(t,e,n){e7(e,this.setToStyle(t,n))}static setFrom(t){if(!t)return this.none;if(!Array.isArray(t))return[t];if(t.length<=1)return 0===t.length?this.none:t;{let e=t.slice().sort((t,e)=>t.type.rank-e.type.rank);for(let t=e.length-1;t>0;--t)e[t].type===e[t-1].type&&e.splice(t-1,1);return e}}static setToJSON(t,e){return 0===t.length?this.none:t.map(t=>t.toJSON(e))}static setFromJSON(t,e){return 0===e.length?this.none:this.setFrom(e.map(e=>this.fromJSON(t,e)))}}let n0=[],n1=0;function n2(t){if("type"in t&&t.type.isLeaf)throw RangeError(`Leaf node ${t.name} could not be resolved.`)}class n5 extends nZ{constructor(t,e){super(t,e),this.pos=t,this.path=e,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parentOffset(){return this.pos-this.start()}get schema(){let t=(this.root.firstChild||this.root).type;if(!t)throw Error("Failed to get schema.");return t.schema}get root(){return this.node(0)}get doc(){return this.root}get parent(){return this.node()}get self(){return void 0!==this._self?this._self:this._self=this.atNodeBoundary?this.parent.maybeChild(this.index(this.depth)):null}node(t){let e=(t=this.resolveDepth(t))===this.depth+1?this.self:this.path[3*t];if(!e)throw RangeError(`No node at given depth ${t}.`);return e}index(t){t=this.resolveDepth(t);let e=this.path[3*t+1];if("number"!=typeof e)throw RangeError(`No index at given depth ${t}.`);return e}get atStart(){return this.pos===this.start()}get atEnd(){return this.pos===this.end()}get atNodeBoundary(){return 0===this.innerOffset}get innerOffset(){return this.pos-this.path[this.path.length-1]}before(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position before the top-level node.");return t===this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position after the top-level node.");return t===this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}start(t){return 0===(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).getContentSize()}getMarks(t){let e,n=this.parent;if(!("type"in n)||!n.is("Textblock"))return nK.none;if(0===n.childCount)return n.is("MarksBlock")?n.textMarks:nK.none;if(!this.atNodeBoundary)return n.child(this.index()).marks;let r=t?.usePureNodeMarks??!1;e=this.atStart?1:this.atEnd?-1:t?.bias??-1;let i=this.index(),a=n.child(i+(e>0?0:-1));if(r)return a.marks;{let t=n.maybeChild(i+(e>0?-1:0));return nK.computeActiveMark(this.schema,a.marks,t?t.marks:n.type.getInheritedTextMarks(n))}}forEach(t,e){for(let n=this.depth+ +!!this.self;n>=0;--n){let r=this.node(n);if(r&&t.call(e,n,r))return}}findDepth(t,e){let n,r,i;void 0===e&&(e=m),t.startsWith("is")&&(t=t.slice(2));let a=this.depth+(e.excludeSelf||!this.self?0:1);e.reversed||"number"==typeof e.dir&&e.dir>0?(n=null!=e.startDepth?tj(e.startDepth,1,a+1):1,r=null!=e.endDepth?tj(e.endDepth+1,n,a+1):a+1,i=1):(n=null!=e.startDepth?tj(e.startDepth,0,a):a,r=null!=e.endDepth?tj(e.endDepth-1,0,n):0,i=-1);let s=e.stopAt;for(;n!==r;n+=i){let e=this.node(n);if(e&&e.type){if(s&&e.is(s))break;if(e.is(t))return n}}return NaN}findNode(t,e){let n=this.findDepth(t,e);return isNaN(n)?null:this.node(n)}findPos(t,e){let n=this.findDepth(t,e);return isNaN(n)?-1:this.before(n)}findIndex(t,e){let n=this.findDepth(t,e);return isNaN(n)?-1:this.index(n)}findData(t,e){let n=this.findDepth(t,e);return isNaN(n)?null:{depth:n,node:this.node(n),pos:this.before(n)}}exists(t,e){return!isNaN(this.findDepth(t,e))}lift(t,e){let n=this.depth,r=this.pos,i=t>0?"end":"start";for(;n>0&&r===this[i](n)&&this.node(n).is("EditableType")&&(!e||e(this,n));)--n;return n===this.depth?this:this.shrink(n,t>0)}static expandRange(t,e,n){return{$from:t.lift(-1,n),$to:e.lift(1,n)}}toStart(){return this.toSibling(0)}toEnd(){return this.toSibling(this.parent.childCount)}toSibling(t){return t===this.index()&&0===this.innerOffset?this:this.shrink(-1).extendIndex(t)}maybeShrink(t,e){let n;if(void 0===e&&(e=!1),"number"==typeof t)n=this.resolveDepth(t);else{let e=this.findDepth(t);if(!e)return null;n=e-1}if(isNaN(n)||n<0||n>this.depth)return null;if(n===this.depth&&!e)return this;let r=this.path.slice(0,(n+1)*3);if(e){let t=this.node(n+1);r[r.length-2]+=1,r[r.length-1]+=t.nodeSize}return new this.constructor(r[r.length-1],r)}shrink(t,e){void 0===e&&(e=!1);let n=this.maybeShrink(t,e);if(!n)throw RangeError(`Depth matching predicate [${t}] is out of range.`);return n}extend(t){let e=this.self;if(!e)throw RangeError(`There is no node at given position ${this.pos} for extending.`);return this.constructor._resolve(this.path,e,this.pos+1,t)}extendIndex(t){let e=this.self;if(!e)throw RangeError(`There is no node at given position ${this.pos} for extending.`);return this.constructor._resolveIndex(this.path,e,this.pos+1,t)}static _resolve(t,e,n,r){return n2(e),super._resolve(t,e,n,r)}static _resolveIndex(t,e,n,r){return n2(e),super._resolveIndex(t,e,n,r)}static resolve(t,e){return this._resolve(null,t,0,e)}static resolveCached(t,e){for(let n of n0)if(n.pos===e&&n.root===t)return n;let n=n0[n1]=this.resolve(t,e);return n1=(n1+1)%6,n}static resolveIndex(t,e){return this._resolveIndex(null,t,0,e)}static resolveCommon(t,e,n){let r=this.resolve(t,e),i=this.resolve(t,n),a=r.commonDepth(i);return a?r.shrink(a-1):null}}let n4={index:0,offset:0};function n8(t,e){return n4.index=t,n4.offset=e,n4}function n3(t,e){if(t.nodeSize!==e.nodeSize)throw RangeError(`Size of mapped node has changed from ${t.nodeSize} to ${e.nodeSize}.`)}function n6(t,e,n,r){return t.is("Text")?t.text.slice(Math.max(n,e)-e,Math.min(r,e+t.nodeSize)-e):t.type.getAltText(t)}let n7=t=>(void 0===t&&(t=class{}),class extends t{getContent(){throw Error("getContent must be implemented")}getContentSize(){throw Error("getContentSize must be implemented")}isEmpty(){return 0===this.getContentSize()}get empty(){return this.isEmpty()}assertIndex(t){if(t<0||t>this.childCount)throw RangeError(`Index ${t} out of range for ${this.childCount} with size ${this.getContentSize()}.`)}assertOffset(t){if(t<0||t>this.getContentSize())throw RangeError(`Offset ${t} out of range for ${this.getContentSize()} with count ${this.childCount}.`)}findIndex(t,e){void 0===e&&(e=-1),this.assertOffset(t);let n=null;return this.forEach((r,i,a)=>{let s=i+r.nodeSize;if(t<s)return n=t===i||e<0?n8(a,i):n8(a+1,s),!0},this,!0),n||n8(this.childCount,this.getContentSize())}get childCount(){return this.getContent().length}get firstChild(){return this.maybeChild(0)}get lastChild(){let t=this.childCount;return t?this.maybeChild(t-1):null}maybeChild(t){return this.getContent()[t]||null}child(t){let e=this.maybeChild(t);if(!e)throw RangeError(`Index ${t} out of range for ${this.childCount} with size ${this.getContentSize()}.`);return e}childs(){return this.getContent().slice()}childBefore(t){if(0===t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.findIndex(t);if(n!==t)return{node:this.child(e),index:e,offset:n};{let t=this.child(e-1);return{node:t,index:e-1,offset:n-t.nodeSize}}}childAfter(t){let{index:e,offset:n}=this.findIndex(t);return{node:this.maybeChild(e),index:e,offset:n}}nodeAt(t){let e=(t,e)=>{let{index:n,offset:r}=t.findIndex(e);return{node:t.maybeChild(n),offset:r}},{node:n,offset:r}=e(this,t);for(;n;){if(r===t||n.type.isText)return n;t-=r+1,{node:n,offset:r}=e(n,t)}return null}indexOf(t,e){return void 0===e&&(e=0),this.getContent().indexOf(t,e)}index(t,e){return this.indexOf(t,e)}offsetAt(t){let e;this.assertIndex(t);let n=this.childCount;if(2*t<n){e=0;for(let n=0;n<t;++n)e+=this.child(n).nodeSize}else{e=this.getContentSize();for(let r=n-1;r>=t;--r)e-=this.child(r).nodeSize}return e}sizeBetween(t,e){let n;if([t,e]=tV(t,e,this.childCount),t>=e)return 0;let r=this.childCount;if((e-t)*2<r)for(n=0;t<e;++t)n+=this.child(t).nodeSize;else{n=this.getContentSize();for(let e=0;e<t;++e)n-=this.child(e).nodeSize;for(let t=e;t<r;++t)n-=this.child(t).nodeSize}return n}doQueryChild(t,e,n){let r=!!n||void 0;this.forEach((n,i,a)=>{if(n.type.is(e))return t.push({node:n,offset:i,index:a}),r},this,!0)}queryChild(t,e){void 0===e&&(e=!1);let n=[];if(this.doQueryChild(n,t,!0),e&&!n.length)throw RangeError(`There is no child matched with \`${t}\`.`);return n[0]||null}queryChildNode(t,e){let n=this.queryChild(t,e);return n?n.node:null}queryChildOffset(t,e){let n=this.queryChild(t,e);return n?n.offset:-1}queryChildOffsetRange(t,e){let n=this.queryChild(t,e);return n?[n.offset,n.offset+n.node.nodeSize]:null}queryChildResolvedPos(t,e){let n=this.queryChild(t,e);return n?n5.resolveIndex(this,n.index):null}queryChildIndex(t,e){let n=this.queryChild(t,e);return n?n.index:-1}queryAllChild(t){let e=[];return this.doQueryChild(e,t,!1),e}queryAllChildNode(t){return this.queryAllChild(t).map(t=>t.node)}queryAllChildOffset(t){return this.queryAllChild(t).map(t=>t.offset)}queryAllChildOffsetRange(t){return this.queryAllChild(t).map(t=>[t.offset,t.offset+t.node.nodeSize])}queryAllChildIndex(t){return this.queryAllChild(t).map(t=>t.index)}doQuery(t,e,n,r){let i=!1;n.startsWith("/")&&(i=!0,n=n.slice(1));let a=n.indexOf("/"),s=a>=0?n.slice(0,a):n,o=a>=0?n.slice(a):"";if(!s)return;let l=(n,i)=>{if(n.type.is(s)&&(o?n.doQuery(t,e+i+1,o,r):t.push({node:n,offset:e+i}),r&&t.length))return!0};i?this.forEach(l,this,!0):this.descendants(l)}query(t,e){void 0===e&&(e=!1);let n=[];if(this.doQuery(n,0,t,!0),e&&!n.length)throw RangeError(`There is no node matched with \`${t}\`.`);return n[0]||null}queryNode(t,e){let n=this.query(t,e);return n?n.node:null}queryOffset(t,e){let n=this.query(t,e);return n?n.offset:-1}queryOffsetRange(t,e){let n=this.query(t,e);return n?[n.offset,n.offset+n.node.nodeSize]:null}queryResolvedPos(t,e){let n=this.query(t,e);return n?n5.resolve(this,n.offset):null}queryAll(t){let e=[];return this.doQuery(e,0,t,!1),e}queryAllNode(t){return this.queryAll(t).map(t=>t.node)}queryAllOffset(t){return this.queryAll(t).map(t=>t.offset)}queryAllOffsetRange(t){return this.queryAll(t).map(t=>[t.offset,t.offset+t.node.nodeSize])}*iterateChildren(t,e){void 0===t&&(t=0),void 0===e&&(e=this.childCount);for(let n=t,r=this.offsetAt(t);n<e;){let t=this.maybeChild(n);if(!t)return;yield{node:t,offset:r,index:n},++n,r+=t.nodeSize}}*iterateChildrenByOffset(t,e){void 0===t&&(t=0),void 0===e&&(e=this.getContentSize());for(let{index:n,offset:r}=this.findIndex(t);r<e;){let t=this.maybeChild(n);if(!t)return;yield{node:t,offset:r,index:n},++n,r+=t.nodeSize}}forRange(t,e,n,r,i){for(let{node:a,offset:s,index:o}of this.iterateChildren(t??void 0,null!=e?e+1:void 0)){let t=n.call(r,a,s,o);if(i&&null!=t)return t}}forEach(t,e,n){for(let{node:r,offset:i,index:a}of this.iterateChildren()){let s=t.call(e,r,i,a);if(n&&null!=s)return s}}nodesInside(t,e,n,r){let i;void 0===r&&(r=Object.create(null));let a=r.preset;a&&("editor"===a&&(r={overrideRoot:"ContentEditable",skipInlineContent:!0,...r}),r.preset=void 0);let{start:s=0,parent:o=null,overrideRoot:l,skipOutOfRange:h,skipInlineContent:u,enableLeaving:c}=r;if(null!=l){r.overrideRoot=void 0;let i=function(t,e,n,r){let i=n5.resolveCommon(t,e,n);return i?!0===r?{node:i.self,pos:i.pos}:"string"==typeof r?i.findData(r):"number"!=typeof r?null:0===r?null:{node:i.node(r),pos:i.before(r)}:null}(this,t,e,l);if(i){let a=i.pos+1;return r.start=(r.start||0)+a,i.node.nodesInside(t-a,e-a,n,r)}}if(h){r.skipOutOfRange=void 0;let i=n,a=s+t,o=s+e;n=(t,e,n,r,s)=>{if(t.is("Text"))return i(t,e,n,r,s);{let l=s?e+1+t.getContentSize():e;if(l>=a&&l<o)return i(t,e,n,r,s)}}}for(let{node:a,offset:l,index:h}of this.iterateChildrenByOffset(t,e)){let d=s+l;if(!0===(i=n(a,d,h,o,!1)))return!0;if(!1!==i&&(!u||!a.is("Inline"))){let o=a.getContentSize();if(o){let h=l+1;if(r.start=s+h,r.parent=a,!0===(i=a.content.nodesInside(Math.max(0,t-h),Math.min(o,e-h),n,r)))return!0}}if(c&&!a.type.isLeaf&&!0===(i=n(a,d,h,o,!0)))return!0}return i}descendants(t,e){return this.nodesInside(0,this.getContentSize(),t,e)}mapNodesInside(t,e,n,r){void 0===r&&(r=Object.create(null));let{start:i=0,parent:a=null,skipInlineContent:s,enableLeaving:o}=r,l=this.getContent().slice();for(let{node:h,offset:u,index:c}of this.iterateChildrenByOffset(t,e)){let d=n(h,i+u,c,a,!1);if(n3(h,d),!s||!h.is("Inline")){let a=u+1;r.start=i+a,d=d.mapNodesInside(Math.max(0,t-a),Math.min(d.getContentSize(),e-a),n,r)}o&&!d.type.isLeaf&&n3(h,d=n(d,i+u,c,a,!0)),l[c]=d}return l}mapDescendants(t,e){return this.mapNodesInside(0,this.getContentSize(),t,e)}textBetween(t,e,n){void 0===n&&(n=m);let{blockSeparator:r="",inlineSeparator:i="",endOfLine:a="\n",tabText:s="	",prependListItem:o,forceSeparateBlock:l,keepInlineSize:h}=function(t){void 0===t&&(t=m);let{blockSeparator:e="",forceSeparateBlock:n=!1,keepInlineSize:r=!1}=t,{inlineSeparator:i="",endOfLine:a="\n",tabText:s="	"}=t,o="object"==typeof t.prependListItem?t.prependListItem:t.prependListItem?m:null,l=o&&{listItemIndentText:o.listItemIndentText??"	"};return r&&(1!==i.length&&(i=i?i[0]:" "),1!==a.length&&(a="\n"),1!==s.length&&(s="	")),{blockSeparator:e,inlineSeparator:i,endOfLine:a,prependListItem:l,tabText:s,forceSeparateBlock:n,keepInlineSize:r}}(n),u="",c=!0,d=!0;return this.nodesInside(t,e,(n,p)=>{if(n.is("Inline")){let r=n6(n,p,t,e);return r?("\n"!==a&&(r=r.replace("\n",a)),"	"!==s&&(r=r.replace("	",s))):r=h?i.repeat(n.nodeSize):i,r&&(u+=r,c=!1),!1}n.is("Textblock")&&(d?d=!1:(!c||l)&&(u+=r,c=!0),o&&p>=t&&n.is("ListBlock")&&n.type.isValidListBlock(n)&&(o.listItemIndentText&&(u+=o.listItemIndentText.repeat(n.getAttrValue("listLevel")??0)),u+=n.type.getListText(n)+"	",c=!1))},{skipInlineContent:!0,overrideRoot:!0}),u}textDescendants(t){return this.textBetween(0,this.getContentSize(),t)}containTextBetween(t,e,n){var r;let{includeBlockSeparator:i,includeInlineObject:a,ignoreWhiteSpace:s}=(void 0===(r=n)&&(r=m),{includeBlockSeparator:r.includeBlockSeparator??!1,includeInlineObject:r.includeInlineObject??!1,ignoreWhiteSpace:r.ignoreWhiteSpace??!1}),o=s?/^\s+$/:void 0,l=!1,h=!0;return this.nodesInside(t,e,(n,r)=>{if(n.is("Inline")){let i=n6(n,r,t,e);if(i){if(!o?.test(i))return l=!0,!0}else if(a)return l=!0,!0;return!1}if(n.is("Textblock")){if(h)h=!1;else if(i)return l=!0,!0}},{skipInlineContent:!0,overrideRoot:!0}),l}containTextDescendants(t){return this.containTextBetween(0,this.getContentSize(),t)}walkPos(t,e,n,r){void 0===r&&(r=m);let{start:i=0,parent:a}=r,s=nj.create(a||this,t,-e);for(;;){let t=e>0?s:s.clone().prev();if(t.isAtEnd())return;let r=n(i+t.pos,t.node,t.index,t.parentNode),a=!1;if(!0===r)return;!1===r&&(a=!0),s.walk(e,a)}}posBetween(t,e,n,r){let i=e-t;0!==i&&this.walkPos(t,i,(t,r,a,s)=>(i>0?t>=e:t<e)||n(t,r,a,s),r)}});class n9 extends n7(nU){}class rt extends n7(){toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}nodesBetween(t,e,n,r,i){for(let a=0,s=0;s<e;a++){let o=this.content[a];if(!o)break;let l=s+o.nodeSize;if(l>t&&!1!==n(o,r+s,i,a)&&o.content.size){let i=s+1;o.nodesBetween(Math.max(0,t-i),Math.min(o.content.size,e-i),n,r+i)}s=l}}cut(t,e){if(null==e&&(e=this.size),0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,a=0;a<e;i++){let s=this.content[i],o=a+s.nodeSize;o>t&&((a<t||o>e)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,e-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,e-a-1))),n.push(s),r+=s.nodeSize),a=o}return new this.constructor(n,r)}cutByIndex(t,e){return t==e?this.constructor.empty:0==t&&e==this.content.length?this:new this.constructor(this.content.slice(t,e))}dropByIndex(t,e){return([t,e]=tV(t,e,this.childCount),t>=e)?this:0==t&&e==this.content.length?this.constructor.empty:new this.constructor(this.content.slice(0,t).concat(this.content.slice(e,this.content.length)))}append(){let t=arguments.length;if(!t)return this;let e=this.content.slice(),n=this.size;for(let a=0;a<t;++a){var r,i;let t=arguments[a];if(!t)continue;let{content:s,size:o}=this.constructor.from(t);if(!o)continue;let l=0,h=(r=e[e.length-1],i=s[0],r&&i&&r.type.isText&&r.sameMarkup(i)?r.copyWithText(r.text+i.text):null);for(h&&(e[e.length-1]=h,l=1);l<s.length;++l)e.push(s[l]);n+=o}return new this.constructor(e,n)}prepend(){let t=arguments.length;if(!t)return this;let e=Array.prototype.slice.call(arguments,1);return e.push(this),this.constructor.from(arguments[0]).append(...e)}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new this.constructor(r,i)}static fromArray(t){if(!t.length)return this.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.copyWithText(e[e.length-1].text+i.text)):e&&e.push(i)}return new this(e||t,n)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}findDiffStart(t,e){return void 0===e&&(e=0),function t(e,n,r){for(let i=0;;i++){if(i==e.childCount||i==n.childCount)return e.childCount==n.childCount?null:r;let a=e.child(i),s=n.child(i);if(a==s){r+=a.nodeSize;continue}if(!a.sameMarkup(s))return r;if(a.isText&&a.text!=s.text){let t=a.text.replace(/\s/g," "),e=s.text.replace(/\s/g," ");if(t!=e){for(let n=0;t[n]==e[n];n++)r++;return r}}if(a.content.size||s.content.size){let e=t(a.content,s.content,r+1);if(null!=e)return e}r+=a.nodeSize}}(this,t,e)}findDiffEnd(t,e,n){return void 0===e&&(e=this.size),void 0===n&&(n=t.size),function t(e,n,r,i){for(let a=e.childCount,s=n.childCount;;){if(0==a||0==s)return a==s?null:{a:r,b:i};let o=e.child(--a),l=n.child(--s),h=o.nodeSize;if(o==l){r-=h,i-=h;continue}if(!o.sameMarkup(l))return{a:r,b:i};if(o.isText&&o.text!=l.text){let t=o.text.replace(/\s/g," "),e=l.text.replace(/\s/g," ");if(t!=e){let n=0,a=Math.min(t.length,e.length);for(;n<a&&t[t.length-n-1]==e[e.length-n-1];)n++,r--,i--;return{a:r,b:i}}}if(o.content.size||l.content.size){let e=t(o.content,l.content,r-1,i-1);if(e)return e}r-=h,i-=h}}(this,t,e,n)}}function re(t){let e=t?.document??window.document;if(!e)throw Error("A document must be given in a non-browser environment.");return e}class rn extends rt{static #t=this.empty=new rn(v,0);constructor(t,e){super(),this.content=t,this.size=null!=e?e:t.reduce((t,e)=>t+e.nodeSize,0)}*[Symbol.iterator](){yield*this.iterateChildren()}getContent(){return this.content}getContentSize(){return this.size}mapNodesInside(t,e,n,r){return this.constructor.from(super.mapNodesInside(t,e,n,r))}map(t,e){let n=[];return this.forEach((r,i,a)=>{n.push(t.call(e,r,i,a))}),this.constructor.from(n)}splice(t,e){let n;for(var r=arguments.length,i=Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];let s=0,o=[];i.forEach(t=>{t instanceof rn?(o.push(...t.content),s+=t.size):Array.isArray(t)?(o.push(...t),s+=t.reduce((t,e)=>t+e.nodeSize,0)):t&&(o.push(t),s+=t.nodeSize)});let l=t+e;return 0===t?n=o:(n=this.content.slice(0,t)).push(...o),n.push(...this.content.slice(l)),this.constructor.create(n,this.size-this.sizeBetween(t,l)+s)}swap(t,e){if(0===this.getContentSize())return this;let n=this.getContent();if(t=tE(t,n.length),e=tE(e,n.length),t===e)return this;let r=n.slice(),i=r[t];return r[t]=r[e],r[e]=i,this.constructor.create(r,this.getContentSize())}move(t,e){return this.moveTo(t,tj(t+e,0,this.getContent().length-1))}moveTo(t,e){if(0===this.getContentSize())return this;let n=this.getContent(),r=n.length;if(t=tj(tE(t,r),0,r-1),e=tj(tE(e,r),0,r-1),t===e)return this;let i=n.slice(0,Math.min(t,e));return t<e?i.push(...n.slice(t+1,e+1),n[t]):i.push(n[t],...n.slice(e,t)),i.push(...n.slice(Math.max(t,e)+1)),this.constructor.create(i,this.getContentSize())}deepCopy(t){let e=this.getContent();return 0===e.length?this:this.constructor.fromJSON(e[0].type.schema,this.toJSON(t))}render(t){return this.isEmpty()?re(t).createDocumentFragment():this.child(0).schema.getDomRenderer().renderFragment(this,t)}toJSON(t){return this.content.map(e=>e.toJSON(t))}toJSONString(t){let e=this.content.reduce((e,n)=>(e&&(e+=","),e+=n.toJSONString(t)),"");return`[${e}]`}async toJSONStream(t,e){await t.write("[");let n=this.content;for(let r=0;r<n.length;++r)0!==r&&await t.write(","),await n[r].toJSONStream(t,e);await t.write("]")}static create(t,e){return t.length?new this(t,e):this.empty}static fromJSON(t,e){return e&&e.length?this.create(e.map(t.nodeFromJSON)):this.empty}static from(t){return t?t instanceof rn?t:Array.isArray(t)?this.fromArray(t):this.create([t],t.nodeSize):this.empty}static jsonFrom(t){return t?Array.isArray(t)?t:[t]:[]}}class rr extends n7(){static #t=this.empty=new rr(rn.empty,0,0);constructor(t,e,n,r){super(),this.content=rn.from(t),this.openLeft=e||0,this.openRight=n||0,this.possibleParent=r||null}get size(){return this.content.size-this.openLeft-this.openRight}getContent(){return this.content.getContent()}getContentSize(){return this.content.getContentSize()}mapNodesInside(t,e,n,r){void 0===r&&(r=Object.create(null)),r.start=(r.start||0)-this.openLeft;let i=this.possibleParent;return i&&(r.parent=i),this.constructor.from(super.mapNodesInside(t,e,n,r),this.openLeft,this.openRight,i)}walkPos(t,e,n,r){void 0===r&&(r=Object.create(null)),r.start=(r.start||0)-this.openLeft,super.walkPos(t,e,n,r)}insertAt(t,e){let n=function t(e,n,r,i){let{index:a,offset:s}=e.findIndex(n);if(s===n||e.child(a).isText)return i&&!i.canReplace(a,a,r)?null:e.cut(0,n).append(r).append(e.cut(n));{let i=e.child(a),o=t(i.content,n-s-1,r,null);return o&&e.replaceChild(a,i.copy(o))}}(this.content,t+this.openLeft,e,null);return n?this.constructor.from(n,this.openLeft,this.openRight):null}removeBetween(t,e){return t===e?this:this.constructor.from(function t(e,n,r){let{index:i,offset:a}=e.findIndex(n),s=e.child(i),{index:o,offset:l}=e.findIndex(r);if(a===n||s.isText){if(l!==r&&!e.child(o).isText)throw RangeError(`Removing non-flat range [${n}, ${r}].`);return e.cut(0,n).append(e.cut(r))}if(i!==o)throw RangeError(`Removing non-flat range [${n}, ${r}].`);return e.replaceChild(i,s.copy(t(s.content,n-a-1,r-a-1)))}(this.content,t+this.openLeft,e+this.openLeft),this.openLeft,this.openRight)}toString(){return`${this.content}(${this.openLeft},${this.openRight})`}deepCopy(t){let e=this.getContent();return 0===e.length?this:this.constructor.fromJSON(e[0].type.schema,this.toJSON(t))}toJSON(t){return this.content.size?{content:this.content.toJSON(t),openLeft:this.openLeft,openRight:this.openRight}:null}static fromJSON(t,e){return e?new rr(rn.fromJSON(t,e.content),e.openLeft,e.openRight):rr.empty}static from(t,e,n,r){return(void 0===e&&(e=0),void 0===n&&(n=0),t)?t instanceof rr?t:new this(rn.from(t),e,n,r):rr.empty}static jsonFrom(t){if(!t)return{content:null,openLeft:0,openRight:0};if("openLeft"in t)return t;{let e=rn.jsonFrom(t);return{content:e.length>0?e:null,openLeft:0,openRight:0}}}}let ri=0;class ra{constructor(){this._state=[]}static registerIndex(){return ri++}set(t,e){this._state[t]=e}get(t){return this._state[t]}pushToStack(t,e){let n=this._state[t];n instanceof Array||(this._state[t]=n=[]),n.push(e)}popFromStack(t){let e=this._state[t];if(!(e instanceof Array)||0===e.length)return;let n=e[e.length-1];return e.splice(e.length-1,1),n}topOfStack(t){let e=this._state[t];if(e instanceof Array&&0!==e.length)return e[e.length-1]}setRootNode(t){this.set(rs,t)}getRootNode(){return this.get(rs)}pushTableInfo(t){this.pushToStack(ro,t)}popTableInfo(){return this.popFromStack(ro)}topTableInfo(){return this.topOfStack(ro)}setTableInfo(t,e){let n=this.topTableInfo();n&&(n[t]=e)}getTableInfo(t){let e=this.topTableInfo();return e&&e[t]}setTableNode(t){t?(this.pushTableInfo({}),this.setTableInfo(rl,t)):this.popTableInfo()}getTableNode(){return this.getTableInfo(rl)}setTableRowIndex(t){this.setTableInfo(rh,t)}setTableColIndex(t){this.setTableInfo(ru,t)}getTableRowIndex(){return this.getTableInfo(rh)}getTableColIndex(){return this.getTableInfo(ru)}setTableUpdateInfoMap(t){return this.setTableInfo(rc,t)}getTableUpdateInfoMap(){return this.getTableInfo(rc)}pushListMap(t){this.pushToStack(rd,t)}popListMap(t){this.popFromStack(rd)}getListMap(){return this.topOfStack(rd)}getListConfigs(t){let e=this.getListMap();return e&&e[t]}}let rs=ra.registerIndex(),ro=ra.registerIndex(),rl=ra.registerIndex(),rh=ra.registerIndex(),ru=ra.registerIndex(),rc=ra.registerIndex(),rd=ra.registerIndex();class rp{constructor(){this.update_maps={},this.phase_index=0,this.FROM_PARENT=this.phase_index++,this.UPDATE_START=this.phase_index++,this.UPDATE_END=this.phase_index++,this.SELF_START=this.phase_index++,this.SELF_END=this.phase_index++,this.INHERITED_START=this.phase_index++,this.INHERITED_END=this.phase_index++,this.BEFORE_CHILD=this.phase_index++,this.AFTER_CHILD=this.phase_index++}getSchemaMaps(t){return this.update_maps[t]||(this.update_maps[t]=[])}getMap(t,e){if(!(t>=0&&t<this.phase_index))throw RangeError("Given phase is invalid.");let n=this.getSchemaMaps(e);return n[t]||(n[t]=[])}createMapItem(t,e,n){if("string"!=typeof t||null!==e&&"string"!=typeof e||"function"!=typeof n)throw Error("Type of map item is error.");return{name:t,type:e,func:n}}register(t,e,n,r,i){let a=this.getMap(t,e);a.some(t=>t.name===n&&t.type===r&&t.func===i)||a.push(this.createMapItem(n,r,i))}unregister(t,e,n){let r=this.getMap(t,e);for(let t=r.length-1;t>=0;--t)r[t].name===n&&r.splice(t,1)}reorder(t,e,n){let r=this.getMap(t,e);for(let t=0,e=r.length;t<e;++t)r[t].name===n&&(r.push(...r.splice(t,1)),--t,--e)}}class rg{constructor(t,e){this.global_state=t,this.state_map=e}runMap(t,e,n){let r=this.state_map.getMap(t,e.type.name),i=n?[e,n,this.global_state]:[e,this.global_state];n||(n=e);let a=n.getStateRank();for(let t=0;t<r.length;++t){let e=r[t];if(e.type&&!n.type.is(e.type))continue;let s=e.func.apply(null,i);void 0!==s&&s>a&&(a=s)}return a}runFromParent(t,e){t.getStateRank()<rm&&e.getStateRank()<rm||t.setMinStateRank(this.runMap(this.state_map.FROM_PARENT,t,e))}runUpdateStart(t){t.setMinStateRank(this.runMap(this.state_map.UPDATE_START,t))}runSelfStart(t){t.getStateRank()<rm||t.setMinStateRank(this.runMap(this.state_map.SELF_START,t))}runInheritedStart(t){return this.runMap(this.state_map.INHERITED_START,t)===rb}runBeforeChild(t,e){this.runMap(this.state_map.BEFORE_CHILD,t,e)}runAfterChild(t,e){this.runMap(this.state_map.AFTER_CHILD,t,e)}runInheritedEnd(t){this.runMap(this.state_map.INHERITED_END,t)}runSelfEnd(t){t.getStateRank()<rm||this.runMap(this.state_map.SELF_END,t)}runUpdateEnd(t){this.runMap(this.state_map.UPDATE_END,t)}trimNode(t,e){return t.getStateRank()>=rm&&(t=t.type.trimNode(t,e)||t),t}run(t,e,n){let r;if(!t.type.enableLocalAttrs)return;let i=n.findInherit,a=n.partialUpdate;e&&this.runFromParent(t,e),this.runUpdateStart(t),this.runSelfStart(t),i&&this.runInheritedStart(t)&&(n.findInherit=!1),a&&t.getStateRank()>=rx&&(n.partialUpdate=!1);for(let e=0,i=t.childCount;e<i;++e){let i=t.child(e);if(this.runBeforeChild(t,i),!n.partialUpdate||i.getStateRank()>=ry){let a=this.run(i,t,n);i!==a&&(i=a,t=t.duplicate(t.content.replaceChild(e,i))),i.getRenderRank()!==rw&&(r=rM)}this.runAfterChild(t,i)}return i&&this.runInheritedEnd(t),this.runSelfEnd(t),this.runUpdateEnd(t),n.trimNode&&(t=this.trimNode(t,e)),t.getStateRank()>=rv&&(r=r_),null!=r&&t.setMinRenderRank(r),t.setStateRank(rf),n.findInherit=i,n.partialUpdate=a,t}static _update(t,e){if(void 0===e&&(e=Object.create(null)),!t.type.is("RootType"))throw Error("Only root node can update state.");return t.type.enableLocalAttrs?(e.partialUpdate&&(e.findInherit=!0),e.force&&t.setMinStateRank(rm),new rg(t.getGlobalState(),t.type.schema.state_map).run(t,null,e)):t}static update(t,e){void 0===e&&(e=Object.create(null));let n=this._update(t,e);if(n!==t)throw Error("Node is changed after state updating.");return n}static updateAndTrim(t,e){return void 0===e&&(e=Object.create(null)),e.trimNode=!0,this._update(t,e)}static shouldInherited(t){return t.getStateRank()>=rm}static markInheritNodePath(t){for(t.setMinStateRank(rx),t=t.state.parent;t&&t.getStateRank()<ry;)t.setStateRank(ry),t=t.state.parent;return rb}static markInheritNodesPath(t,e,n){for(void 0===e&&(e=0),void 0===n&&(n=t.length);e<n;++e)this.markInheritNodePath(t[e]);return rb}static maybeInherited(t,e,n,r){return this.shouldInherited(t)?this.markInheritNodesPath(e,n,r):rf}static markResolvedPos(t,e){let n;void 0===e&&(e=rm);for(let r=t.length+1;r>=0;--r){let i=t.node(r);i&&(i.setMinStateRank(n?ry:e),n=!0)}}static markIndexArr(t,e,n){void 0===n&&(n=rm);let r=t;for(let t=0,n=e.length;t<n;++t)r.setMinStateRank(ry),r=r.child(e[t]);r.setMinStateRank(n)}}let rf=rg.STATE_NONE=0,ry=rg.STATE_PASSING=1,rx=rg.STATE_SCAN=2,rm=rg.STATE_UPDATE=3,rv=rg.STATE_REDRAW=4,rb=rg.STATE_FIND=100,rw=rg.RENDER_NONE=0,rM=rg.RENDER_PASSING=1,r_=rg.RENDER_REDRAW=2,rA=Object.create(null),rS=rg.STATE_UPDATE,rC=rg.RENDER_NONE;class rI extends n9{constructor(t,e,n,r,i=rA){super(t,e),this.content=n||rn.empty,this.marksRaw=r||nK.none,this.type.enableLocalAttrs&&(this.node_id=J(),this.state_rank="state_rank"in i?i.state_rank:rS,this.state=i.state&&K(i.state)),this.render_rank="render_rank"in i?i.render_rank:rC,this.type.nodeConstructor(this,i),this.type.enableLocalAttrs&&!this.state&&(this.state=this.type.createDefaultLocalAttrs(this))}get node_id(){if(!this.type.enableLocalAttrs)throw Error(`Local attrs is not enabled for type ${this.type.name}`);return this.node_id_}set node_id(t){this.node_id_=t}get localAttrs(){if(!this.type.enableLocalAttrs)throw Error(`Local attrs is not enabled for type ${this.type.name}`);return this.state}set localAttrs(t){if(!this.type.enableLocalAttrs)throw Error(`Local attrs is not enabled for type ${this.type.name}`);this.state=t}getStateRank(){return this.state_rank}setStateRank(t){this.state_rank=t}setMinStateRank(t){t>this.state_rank&&(this.state_rank=t)}setMaxStateRank(t){t<this.state_rank&&(this.state_rank=t)}getRenderRank(){return this.render_rank}setRenderRank(t){this.render_rank=t}setMinRenderRank(t){t>this.render_rank&&(this.render_rank=t)}setMaxRenderRank(t){t<this.render_rank&&(this.render_rank=t)}resetRenderRank(){this.render_rank=rg.RENDER_NONE}get marks(){return this.type.enableLocalAttrs&&this.state.marks||this.marksRaw}set marks(t){throw Error("Cannot directly set marks.")}getMarks(t){return t?this.marksRaw:this.marks}getTextMarksJSON(t){return t?this.textMarksRawJSON:this.textMarksJSON}get textMarksRawJSON(){return this.attrs.textMarks||[]}get textMarksJSON(){return this.type.enableLocalAttrs&&this.state.text_marks_json||this.textMarksRawJSON}getTextMarks(t){return t?this.textMarksRaw:this.textMarks}get textMarksRaw(){return this.type.schema.marksFromJSON(this.textMarksRawJSON)}get textMarks(){return this.type.enableLocalAttrs&&this.state.text_marks||this.textMarksRaw}getListMarksJSON(t){return t?this.listMarksRawJSON:this.listMarksJSON}get listMarksRawJSON(){return this.getAttrValue("listMarks")||[]}get listMarksJSON(){return this.state.list_marks_json||this.listMarksRawJSON}getListMarks(t){return t?this.listMarksRaw:this.listMarks}get listMarksRaw(){return this.type.schema.marksFromJSON(this.listMarksRawJSON)}get listMarks(){return this.state.list_marks||this.listMarksRaw}eq(t){return this==t||this.sameMarkup(t,!0)&&this.content.eq(t.content)}shouldRender(t){if(this===t)return!1;if(this.type!==t.type||!nK.sameSet(this.marks,t.marks))return!0;let e=this.attrs,n=t.attrs,r=!1;return P(this.type.attrs,(t,i)=>{if(!t.hidden)return r=!I(e[i],n[i])}),r}sameMarkup(t,e){return this==t||this.hasMarkup(t.type,t.attrs,t.getMarks(e),e)}hasMarkup(t,e,n,r){return this.type===t&&I(this.attrs,e||t.getPresetAttrValues()||rA)&&nK.sameSet(this.getMarks(r),n||nK.none)}defaultOptions(t){return K(t,{state:this.state,state_rank:this.state_rank,render_rank:this.render_rank})}duplicate(t,e,n){let r=new this.constructor(this.type,this.type.copyAttrs(this.attrs,e),t||this.content,n||this.marksRaw);return r.state=Object.assign(Object.create(null),this.state),r.state_rank=this.state_rank,r.render_rank=this.render_rank,r}copy(t,e,n,r){return void 0===r&&(r=Object.create(null)),null===n?n=this.getStateRank():void 0===n&&(n=rS),r.state_rank=n,new this.constructor(this.type,this.type.copyAttrs(this.attrs,e,r),t,this.marks,this.defaultOptions(r))}mark(t){return(t=t||nK.none,nK.sameSet(t,this.marksRaw)&&nK.sameSet(this.marks,this.marksRaw))?this:new this.constructor(this.type,this.attrs,this.content,t,this.defaultOptions())}cut(t,e){return this.copy(this.content.cut(t,e))}slice(t,e){if(void 0===e&&(e=this.content.size),t==e)return rr.empty;let n=this.resolve(t),r=this.resolve(e),i=n.sameDepth(r),a=n.start(i),s=n.node(i);return new rr(s.content.cut(n.pos-a,r.pos-a),n.depth-i,r.depth-i,s)}nodesBetween(t,e,n,r){void 0===r&&(r=0),this.content.nodesBetween(t,e,n,r,this)}marksAt(t,e){return this.resolve(t).getMarks(e)}rangeHasMark(t,e,n){let r=!1;return this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}contentMatchAt(t){return this.type.contentExpr.getMatchAt(this.attrs,this.content,t)}canReplace(t,e,n,r,i){return this.type.contentExpr.checkReplace(this.attrs,this.content,t,e,n,r,i)}canReplaceWith(t,e,n,r,i){return this.type.contentExpr.checkReplaceWith(this.attrs,this.content,t,e,n,r,i||nK.none)}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}defaultContentType(t){let e=this.contentMatchAt(t)?.nextElement;return e&&e.defaultType()}getDOM(){return this.dom}setDOM(t){this.dom=t}}class rP extends Error{constructor(t=""){super(t),this.message!==t&&(this.message=t,Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(t).stack)}get name(){return this.constructor.name||"ProseMirrorError"}}class rT extends rP{}function rk(t,e,n){if(n.openLeft>t.depth)throw new rT("Inserted content deeper than insertion position");if(t.depth-n.openLeft!=e.depth-n.openRight)throw new rT("Inconsistent open depths");return function t(e,n,r,i){let a=e.index(i),s=e.node(i);if(a==n.index(i)&&i<e.depth-r.openLeft){let o=t(e,n,r,i+1);return s.duplicate(s.content.replaceChild(a,o))}if(!r.content.size)return rL(s,rj(e,n,i));{let{start:t,end:a}=function(t,e){let n=e.depth-t.openLeft,r=e.node(n).copy(t.content,null,null);for(let t=n-1;t>=0;--t)r=e.node(t).copy(rn.from(r),null,null);return{start:r.resolveNoCache(t.openLeft+n,!1),end:r.resolveNoCache(r.content.size-t.openRight-n,!1)}}(r,e);return rL(s,function t(e,n,r,i,a){var s,o,l,h,u,c;let d=e.depth>a&&rD(e,n,a+1),p=i.depth>a&&rD(r,i,a+1),g=[];return(rN(null,e,a,g),d&&p&&n.index(a)==r.index(a))?(s=rO(rR(d,p),t(e,n,r,i,a+1)),e.node(a),g.push(s)):(d&&(l=rO(d,rj(e,n,a+1)),e.node(a),g.push(l)),rN(n,r,a,g),p&&(u=rO(p,rj(r,i,a+1)),r.node(a),g.push(u))),rN(i,null,a,g),rn.fromArray(g)}(e,t,a,n,i))}}(t,e,n,0)}function rL(t,e){if(!t.type.validContent(e,t.attrs))throw new rT("Invalid content for node "+t.type.name);return t.duplicate(e)}function rD(t,e,n){return rR(t.node(n),e.node(n))}function rR(t,e){if(!e.type.compatibleContent(t.type))throw new rT("Cannot join "+e.type.name+" onto "+t.type.name);let n=t.type.attrs,r=e.type.attrs,i=G(n,(n,i,a)=>{if(i.backward&&r[a]&&r[a].backward){let r=e.getAttrValue(a);r!==t.getAttrValue(a)&&(n||(n=Object.create(null)),n[a]=r)}return n},null);return i?t.copy(t.content,i,null):t}function rN(t,e,n,r){var i,a,s,o,l;let h=(e||t).node(n),u=0,c=e?e.index(n):h.childCount;t&&((u=t.index(n),t.depth>n)?u++:!t.atNodeBoundary&&(i=t.nodeAfter,t.parent,r.push(i),u++));for(let t=u;t<c;++t)s=h.child(t),r.push(s);e&&e.depth==n&&!e.atNodeBoundary&&(o=e.nodeBefore,e.parent,r.push(o))}function rO(t,e){if(!t.type.validContent(e,t.attrs))throw new rT("Invalid content for node "+t.type.name);return t.copy(e,null,null)}function rj(t,e,n){let r=[];if(rN(null,t,n,r),t.depth>n){var i,a;i=rO(rD(t,e,n+1),rj(t,e,n+1)),t.node(n),r.push(i)}return rN(e,null,n,r),rn.fromArray(r)}function rE(t,e){for(let n=t.length-1;n>=0;n--)e=`${t[n].type.name}(${e})`;return e}class rV extends rI{constructor(t,e,n,r,i){"string"==typeof n&&(n=rn.empty),super(t,e,n,r,i)}setState(t,e){this.state[t]=e}getState(t,e){return this.state[t]??e}getContent(){return this.content.getContent()}getContentSize(){return this.content.getContentSize()}nodesInside(t,e,n,r){return r&&"number"!=typeof r||(r={start:r||0}),r.parent=this,super.nodesInside(t,e,n,r)}mapNodesInside(t,e,n,r){return void 0===r&&(r=Object.create(null)),r.parent=this,this.copyWithContent(super.mapNodesInside(t,e,n,r))}walkPos(t,e,n,r){return void 0===r&&(r=Object.create(null)),r.parent=this,super.walkPos(t,e,n,r)}get selfSize(){return this.type.isLeaf?1:2}get nodeSize(){return this.selfSize+this.content.size}resolve(t){return n5.resolveCached(this,t)}resolveNoCache(t){return n5.resolve(this,t)}resolveIndex(t){return n5.resolveIndex(this,t)}resolveCommon(t,e){return n5.resolveCommon(this,t,e)}replaceSimple(t,e,n){if(void 0===n&&(n=rr.empty),t===e&&0===n.size)return this;this.setMinStateRank(rg.STATE_UPDATE);let r=rk(this.resolve(t),this.resolve(e),n);return r.setMinStateRank(rg.STATE_UPDATE),r}replace(t,e,n){return this.replaceSimple(t,e,n)}replaceAll(t){return this.replace(0,this.getContentSize(),t)}deepCopy(t){return this.constructor.fromJSON(this.type.schema,this.toJSON(t))}copyWithAttrs(t){return this.copy(this.content,t)}copyWithContent(t){return this.copy(rn.from(t))}duplicateWithAttrs(t){return this.duplicate(this.content,t)}duplicateWithContent(t){return this.duplicate(rn.from(t))}render(t){return this.schema.getDomRenderer().renderNode(this,t)}toString(){let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),rE(this.marks,t)}toJSON(t){void 0===t&&(t=Object.create(null));let e={type:this.type.name},n=this.attrsToJSON(t);n&&(e.attrs=n);let r=this.contentToJSON(t);r&&(e.content=r);let i=this.marksToJSON(t);return i&&(e.marks=i),e}toJSONString(t){return void 0===t&&(t=Object.create(null)),`{${this.memberToJSONString(t)}}`}memberToJSONString(t){return`"type":${JSON.stringify(this.type.name)}`+this.attrsToJSONString(t)+this.contentToJSONString(t)+this.marksToJSONString(t)}async toJSONStream(t,e){void 0===e&&(e=Object.create(null)),await t.write("{"),await this.memberToJSONStream(t,e),await t.write("}")}async memberToJSONStream(t,e){await t.write(`"type":${JSON.stringify(this.type.name)}`),await this.attrsToJSONStream(t,e),await this.contentToJSONStream(t,e),await this.marksToJSONStream(t,e)}attrsToJSON(t){let e=this.type.computeJsonConversionAttrs(this,t);if(!j(e))return e}attrsToJSONString(t){let e=this.attrsToJSON(t);return e?`,"attrs":${JSON.stringify(e)}`:""}async attrsToJSONStream(t,e){this.type.collectFileIds(t.file,this);let n=this.attrsToJSONString(e);n&&await t.write(n)}contentToJSON(t){let e=this.content;if(0!==e.size)return e.toJSON(this.type.overrideJsonConversionContentOptions(this,t))}contentToJSONString(t){let e=this.content;return 0===e.size?"":`,"content":${e.toJSONString(this.type.overrideJsonConversionContentOptions(this,t))}`}async contentToJSONStream(t,e){let n=this.content;0!==n.size&&(await t.write(',"content":'),await n.toJSONStream(t,this.type.overrideJsonConversionContentOptions(this,e)))}marksToJSON(t){let e=this.type.computeJsonConversionMarks(this,t);if(0===e.length)return;let{markFilter:n}=t;if(!n)return e.map(e=>e.toJSON(t));{let r=[];for(let i of e){let e=i.toJSON(t);n(e)&&r.push(e)}return r}}marksToJSONString(t){let e=this.type.computeJsonConversionMarks(this,t);if(0===e.length)return"";let n=e.reduce((e,n)=>(e&&(e+=","),e+=n.toJSONString(t)),"");return`,"marks":[${n}]`}async marksToJSONStream(t,e){let n=this.type.computeJsonConversionMarks(this,e);if(0!==n.length){await t.write(',"marks":[');for(let r=0;r<n.length;++r)0!==r&&await t.write(","),await n[r].toJSONStream(t,e);await t.write("]")}}static fromJSON(t,e){return t.nodeType(e.type).create(e.attrs,"string"==typeof e.text?e.text:rn.fromJSON(t,e.content),e.marks&&e.marks.map(t.markFromJSON).sort((t,e)=>t.type.rank-e.type.rank))}}class rB extends rV{constructor(t,e,n,r,i){if(super(t,e,rn.empty,r,i),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}mapNodesInside(t,e,n,r){return this}textBetween(t,e,n){return this.text.slice(t,e)}textDescendants(t){return this.text}get selfSize(){return this.text.length}get nodeSize(){return this.text.length}eq(t){return this.sameMarkup(t,!0)&&this.text===t.text}duplicate(t,e,n){return super.duplicate(t||this.text,e,n)}copyWithText(t,e){return new this.constructor(this.type,this.attrs,t,e??this.marks,this.defaultOptions())}duplicateWithText(t,e){return this.duplicate(t,null,e)}cut(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.text.length),this.copyWithText(this.text.slice(t,e))}mark(t){return(t=t||nK.none,nK.sameSet(t,this.marksRaw)&&nK.sameSet(this.marks,this.marksRaw))?this:this.copyWithText(this.text,t)}toString(){return rE(this.marks,JSON.stringify(this.text))}toJSON(t){return{...super.toJSON(t),text:ed(this.text," ")}}memberToJSONString(t){return`${super.memberToJSONString(t)},"text":${JSON.stringify(ed(this.text," "))}`}async memberToJSONStream(t,e){await super.memberToJSONStream(t,e),await t.write(`,"text":${JSON.stringify(ed(this.text," "))}`)}}let rz=Object.create(null);class rF extends rV{constructor(t,e,n,r,i=rz){super(t,e,n,r,i),this.type.enableLocalAttrs&&(this.global_state=i.global_state||this.createGlobalState())}createGlobalState(){return new ra}getGlobalState(){return this.global_state}defaultOptions(t){return"global_state"in(t=super.defaultOptions(t))||(t.global_state=this.global_state),t}duplicate(t,e,n){let r=super.duplicate(...arguments);return r.global_state=this.getGlobalState(),r}maybeUpdateState(t){this.getStateRank()!==rg.STATE_NONE&&this.updateState(t)}updateState(t){return rg.update(this,t)}updateStateAndTrim(t){return rg.updateAndTrim(this,t)}replace(t,e,n,r){if(void 0===n&&(n=rr.empty),void 0===r&&(r=rg.STATE_UPDATE),t===e&&0===n.size)return this;let i=this.resolve(t),a=this.resolve(e),s=rk(i,a,n),o=s.resolve(t),l=s.resolve(t+n.size),h=Math.min(i.sameDepth(a),o.sameDepth(l));return rG(i,a,h,r),rG(o,l,h,r),s.updateStateAndTrim({partialUpdate:!0})}replaceRootAttrs(t){let e=this.copy(this.content,t);return this.setMinStateRank(rg.STATE_UPDATE),e.updateState(),e}}function rG(t,e,n,r){let i=t.node(n);if(!i||i!==e.node(n))throw Error("Given depth is not common depth.");for(let e=n-1;e>=0;--e)t.node(e).setMinStateRank(rg.STATE_PASSING);if(i.setMinStateRank(rg.STATE_PASSING),i.isTextblock)i.forEach(t=>{t.setMinStateRank(r)});else{let a=t.index(n),s=e.index(n);e.before(n+1)===e.pos&&--s;for(let t=a;t<=s;++t)i.child(t).setMinStateRank(r)}}class rH extends nq{constructor(t,e,n){super(t,e),this.isAttrsCopyable=nH.isAttrsCopyable(this.attrs),this.contentExpr=null,this.enableLocalAttrs&&(this.state_map=e.state_map,this.registerLocalAttrsUpdateMap())}getFreezeList(){let t=super.getFreezeList();return t.push("attrs","clearable"),t}getStateMap(){if(this.enableLocalAttrs)return this.state_map}get isBlock(){return!1}get isTextblock(){return!1}get isInline(){return!1}get isText(){return!1}get isLeaf(){return this.contentExpr.isLeaf}get selectable(){return!1}get clearable(){return null!==B(this.attrs,t=>t.clearable,void 0)}get copyable(){return!0}get canSelectionLeave(){return!0}get draggable(){return!1}get textDraggable(){return!0}get unbreakable(){return!1}get needHeightCalculating(){return!1}get deleteWhenEmpty(){return!1}get Node(){return rV}getLeftPaddingWidth(t){return 0}getRightPaddingWidth(t){return 0}getTopPaddingHeight(t){return 0}getBottomPaddingHeight(t){return 0}getPaddingHeight(t){return this.getTopPaddingHeight(t)+this.getBottomPaddingHeight(t)}compatibleContent(t){return this==t||this.contentExpr.compatible(t.contentExpr)}isAttrsRequired(t){return nH.isAttrsRequired(this.attrs,t)}computeAttrs(t){return!t&&this.getPresetAttrValues()?this.getPresetAttrValues():nH.computeAttrs(this.attrs,t)}copyAttrs(t,e,n){let r=t;return n&&n.filter_copyable&&(r=nH.copyableAttrs(this.attrs,r)),(r=nH.copyAttrs(this.attrs,r,e,n&&n.loose))===t?r:nH.computeAttrs(this.attrs,r)}invertAttrs(t,e,n){return nH.invertAttrs(this.attrs,t,e,n&&n.loose)}nodeConstructor(t,e){}static compile(t,e){let n=Object.create(null);if(t.forEach((t,r)=>n[t]=new r.type(t,e,r)),!n.doc)throw RangeError("Every schema needs a 'doc' type");if(!n.text)throw RangeError("Every schema needs a 'text' type");return n}get enableLocalAttrs(){return!0}static findFuncStack(t,e){let n=[];for(let r=t;r[e];r=Object.getPrototypeOf(r))r.hasOwnProperty(e)&&n.push(r[e]);return n}createDefaultLocalAttrs(t){return{cached_attrs:Object.create(null)}}registerLocalAttrsUpdateMap(){let t=rH.findFuncStack(this,"registerSelfLocalAttrsUpdateMap"),e=this.state_map;for(let n=t.length-1;n>=0;--n)t[n].call(this,e)}registerSelfLocalAttrsUpdateMap(t){t.register(t.UPDATE_END,this.name,"set_parent_node",null,(function(t){t.forEach(function(e){e.type.enableLocalAttrs&&(e.state.parent=t)})}).bind(this)),t.register(t.SELF_END,this.name,"cache_attrs",null,(function(t){t.state.cached_attrs=t.attrs}).bind(this))}storeAttrToState(t,e){return t.state[e]=e in t.attrs?t.attrs[e]:this.attrs[e].getDefaultValue()}storeInheritedAttrToState(t,e){return t.state[e]=e in t.attrs?t.attrs[e]:t.state["inherited_"+e]}}class rW extends rH{constructor(t,e,n){super(t,e,n)}get printable(){return!0}get allowContentMatchInside(){return!0}getFileId(t){}collectFileIds(t,e){let n=e.type.getFileId(e);n&&(Array.isArray(n)?t.push(...n):t.push(n))}initContentExpression(t){this.contentExpr=t}validContent(t,e){return this.contentExpr.matches(e,t)}trimNode(t,e){}_create(t,e,n){return new this.Node(this,t,e,nK.setFrom(n))}create(t,e,n,r){switch(r){case"check":return this.createChecked(t,e,n);case"fill":return this.maybeCreateFilled(t,e,n);default:return this.createComputed(t,e,n)}}createFromDOM(t,e,n,r){return this.createComputed(t,e,n)}createComputed(t,e,n){return this._create(this.computeAttrs(t),rn.from("string"==typeof e?null:e),n)}maybeCreateChecked(t,e,n){return"string"==typeof e?null:(t=this.computeAttrs(t),e=rn.from(e),this.validContent(e,t))?this._create(t,e,n):null}createChecked(t,e,n){let r=this.maybeCreateChecked(t,e,n);if(!r)throw RangeError(`Invalid content for node ${this.name}`);return r}maybeCreateFilled(t,e,n){if("string"==typeof e)return null;if(t=this.computeAttrs(t),(e=rn.from(e)).size){let n=this.contentExpr.start(t).fillBefore(e);if(!n)return null;e=n.append(e)}let r=this.contentExpr.getMatchAt(t,e);if(!r)return null;let i=r.fillBefore(rn.empty,!0);return i?(e=e.append(i),this._create(t,e,n)):null}createFilled(t,e,n){let r=this.maybeCreateFilled(t,e,n);if(!r)throw RangeError(`Unable to fill a valid content for node ${this.name}`);return r}createAndFill(t,e,n){return this.maybeCreateFilled(t,e,n)}get matchDOMTag(){return null}parseDOM(t,e){let n=this.parseAttrs(t,e),r=this.parseContent(t,e);return r?[n,r]:n}parseAttrs(t,e){let{parser:n}=e,r=Object.create(null),i=nV(t.getAttribute("data-syno-attrs")??"");return i&&(r=this.parseAttrsFromJson(r,i,e)),r=this.parseAttrsFromDom(r,t,e),n&&(r=this.parseAttrsFromParser(r,n,e)),r}parseAttrsFromJson(t,e,n){return Object.assign(t,e)}parseAttrsFromDom(t,e,n){return t}parseAttrsFromParser(t,e,n){return t}parseContent(t,e){return this.parseContentSyno(t,e)}parseContentSyno(t,e){let n,r=t.getAttribute("data-syno-content");if(!r)return null;try{n=JSON.parse(r)}catch{}let i=null;if("object"==typeof n&&n&&Array.isArray(n))try{i=this.schema.nodesFromJSON(n)}catch{}return i}renderAttrs(t,e,n){t||(t=Object.create(null)),this.renderAttrsDom(t,e,n);let r=n.target;if("editor"===r||"viewer"===r||"general"===r)t.class=[this.className,this.printable?"":"ProseMirror-non-printable",t.class];else if("clipboard"===r){let i=nE(this.renderAttrsJson(Object.create(null),e,n));if(i&&(t["data-syno-attrs"]=i),"clipboard"===r){let r=this.renderContentSyno(e,n);if(r)try{t["data-syno-content"]=JSON.stringify(r.toJSON(n))}catch{}}}return t}renderAttrsDom(t,e,n){return t}renderAttrsJson(t,e,n){return t}renderContentSyno(t,e){return null}toDOM(t,e){return"clipboard"===e.target?this.toCopyDOM(t,e):this.toRenderDOM(t,e)}toRenderDOM(t,e){throw Error("Override me!")}toCopyDOM(t,e){return this.toRenderDOM(t,e)}queryDom(t,e,n){let r=t.matches(e)?t:t.querySelector(e);if(n&&!r)throw RangeError(`There is no child matched with \`${e}\`.`);return r}computeJsonConversionAttrs(t,e){let n=t.attrs,r=e.target;return"clipboard"===r?this.isAttrsCopyable?n:nH.copyableAttrs(this.attrs,n):"replace"===r?this.isSettableAttrs()?n:this.settableAttrValues(n)??{}:n}computeJsonConversionMarks(t,e){let{target:n,useComputedStyle:r}=e,i=t.getMarks("clipboard"!==n||!r);return i.length?"clipboard"===n?nK.filterSet(i,t=>t.type.copyable):"replace"===n?nK.filterSet(i,t=>t.type.settable):i:i}overrideJsonConversionContentOptions(t,e){return e}}class rq extends rW{static getSelfPropertyName(){return"RootType"}get unbreakable(){return!0}get Node(){return rF}get attrs(){return{schema:nH.create({default:1}),type:nH.create({default:""})}}createDefaultContentStyles(){return{}}toRenderDOM(){return["div",null,0]}}class rU extends rW{get isNonEditableType(){return!0}get allowContentMatchInside(){return!1}get unbreakable(){return!0}toRenderDOM(t,e){return["div",this.renderAttrs(null,t,e),this.is("Leaf")?null:0]}}class rZ extends rW{static getSelfPropertyName(){return"EditableType"}get needHeightCalculating(){return!0}getTextRectInfo(t,e){return t.state.parent_text_rect_info||{left:0,width:0}}setStateTextRectInfo(t,e){return t.state.text_rect_info=this.getTextRectInfo(t,e),rg.STATE_UPDATE}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.FROM_PARENT,this.name,"set_parent_text_rect_info",null,(t,e)=>{let n=e.state.text_rect_info;return n&&n!==t.state.parent_text_rect_info?(t.state.parent_text_rect_info=n,rg.STATE_UPDATE):rg.STATE_NONE}),t.register(t.SELF_START,this.name,"set_text_rect_info",null,this.setStateTextRectInfo.bind(this))}}class r$ extends rZ{get isBlock(){return!0}getBlockContentDOM(t){return t.firstChild}toDOM(t,e){let n=super.toDOM(t,e);return("editor"===e.target||"viewer"===e.target||"general"===e.target)&&(n=["div",{class:this.classPrefix+"block"},n]),n}toRenderDOM(t,e){return this.renderBlockStructure(t,e)}toCopyDOM(t,e){return this.renderBlockStructure(t,e)}renderBlockStructure(t,e){throw Error("Override me!")}}class rJ extends r${get isContainerBlock(){return!0}}class rY extends r${get isTextblock(){return!0}}class rX extends rY{get isParagraph(){return!0}get selectable(){return!0}setStateTextRectInfo(t,e){return super.setStateTextRectInfo(t,e),rg.STATE_REDRAW}get matchDOMTag(){let t=(t,e)=>this.parseDOM(t,e);return["p","h1","h2","h3","h4","h5","h6"].reduce((e,n)=>(e[n]=t,e),Object.create(null))}renderAttrsDom(t,e,n){return super.renderAttrsDom(t,e,n),Object.assign(t.inline_style||(t.inline_style=Object.create(null)),{"padding-left":"0px","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","margin-left":"0px","margin-top":"0px","margin-right":"0px","margin-bottom":"0px"}),t}}class rQ extends rZ{static getSelfPropertyName(){return"Inline"}get isInline(){return!0}get needHeightCalculating(){return!1}getAltText(t){return""}nodeConstructor(t,e){super.nodeConstructor(t,e),t.type.enableLocalAttrs&&t.state&&(t.state=null)}createDefaultLocalAttrs(t){let e=super.createDefaultLocalAttrs(t);return e.cached_marks=[],e}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.SELF_END,this.name,"cache_marks",null,t=>{t.state.cached_marks=t.marksRaw}),t.register(t.FROM_PARENT,this.name,"inherit_text_marks","isMarksBlock",(t,e)=>{let n=t.state,r=e.state;return n.inherited_text_marks===r.inherited_text_marks?rg.STATE_NONE:(n.inherited_text_marks=r.inherited_text_marks,n.inherit=!0,rg.STATE_UPDATE)}),t.register(t.SELF_END,this.name,"clear_inherit_flag",null,t=>{t.state.inherit=!1}),t.register(t.SELF_START,this.name,"merge_marks",null,t=>{let e=t.state;return e.inherit||e.cached_marks!==t.marksRaw?(e.marks=nK.mergeSet(e.inherited_text_marks,t.marksRaw),rg.STATE_REDRAW):rg.STATE_NONE})}trimNode(t,e){t=super.trimNode(t,e)||t;let n=nK.trimSet(t.marksRaw,t.state.inherited_text_marks);return n&&(t=t.duplicate(null,null,n)),t}}class rK extends rQ{static getSelfPropertyName(){return"NonTextInline"}}class r0 extends rK{static getSelfPropertyName(){return"InlineObject"}get selectable(){return!0}get draggable(){return!0}getObjectBorder(t){return{left:0,top:0,right:0,bottom:0}}renderAttrsDom(t,e,n){return super.renderAttrsDom(t,e,n),Object.assign(t.inline_style||(t.inline_style=Object.create(null)),{display:"inline-block","white-space":"nowrap"}),t}}class r1 extends rK{static getSelfPropertyName(){return"InlineFieldText"}get selectable(){return!0}get draggable(){return!1}}class r2 extends nW{constructor(t,e,n){super(t,n);let r=this.attrs;if(Object.defineProperty(this,"attrs",{value:r}),!r[this.valueKey])throw Error(`Attribute ${this.valueKey} is not defined in mark ${t}.`);this.rank=e}get classPrefix(){return"syno-o-doc-pm-mark-"}get copyable(){return!0}get clearable(){return!0}get settable(){return!0}get inclusiveBefore(){return!0}get supportTextblock(){return!0}get supportListBlock(){return!0}get valueKey(){return"value"}get hasCss(){return!1}get attrs(){return{}}toDOM(t,e){throw Error("Failed to override MarkType.toDOM")}get matchDOMTag(){return null}get matchDOMStyle(){return null}}class r5 extends r2{constructor(t,e,n){super(t,e,n),this.defaultMark=void 0,this.presetMark=void 0}getDefaultValue(){return this.getDefaultAttrValues()[this.valueKey]}createDefaultMark(){return this.doCreate(this.getDefaultAttrValues())}getDefaultMark(){return this.defaultMark??=this.createDefaultMark()}createPresetMark(){return this.doCreate(Object.create(null))}getPresetMark(){return this.presetMark??=this.createPresetMark()}isInSet(t){return this.findFromSet(t)}findFromSet(t){return t.find(t=>t.type===this)??null}findIndexFromSet(t){return t.findIndex(t=>t.type===this)}removeFromSet(t){let e=this.findIndexFromSet(t);if(e<0)return t;let n=t.slice();return n.splice(e,1),n}doCreate(t){return new nK(this,nH.computeAttrs(this.attrs,t))}create(t){return!t||j(t)?this.getPresetMark():this.doCreate(t)}computeJsonConversionAttrs(t,e){return t.attrs}static compile(t,e){let n=Object.create(null),r=0;for(let[i,a]of e){if(n[i])throw RangeError(`Duplicate mark type name: ${i}`);n[i]=new a(i,r++,t)}return n}}class r4 extends r5{static getSelfPropertyName(){return"Block"}}class r8 extends r5{static getSelfPropertyName(){return"Css"}get hasCss(){return!0}get cssType(){return"overwrite"}get cssName(){throw Error("Must override!")}get cssDefaultValue(){throw Error("Must override!")}getCssStyle(t){return{type:this.cssType,key:this.cssName,value:this.getCssValue(t)}}toDOM(t,e){return["span",{inline_style:{[this.cssName]:this.getCssValue(t)}}]}}class r3 extends r8{static getSelfPropertyName(){return"ToggleableCss"}get cssValue(){throw Error("Must override!")}get attrs(){return{value:nH.create({default:!0,empty_value:!1,normalizer:"boolean"})}}getCssValue(t){return t.getValue()?this.cssValue:this.cssDefaultValue}computeJsonConversionAttrs(t,e){return 1===this.getAttrKeys().length&&!0===t.getValue()?m:t.attrs}create(t){return t&&null!=t.is_on&&null==t.value&&(t={...t,value:t.is_on,is_on:void 0}),super.create(t)}}class r6{constructor(t,e,n){this.nodeType=t,this.elements=e,this.inlineContent=n}get isLeaf(){return 0==this.elements.length}start(t){return new r9(this,t,0,0)}matches(t,e,n,r){return this.start(t).matchToEnd(e,n,r)}getMatchAt(t,e,n){return(void 0===n&&(n=e.childCount),1==this.elements.length)?new r9(this,t,0,n):this.start(t).matchFragment(e,0,n)}checkReplace(t,e,n,r,i,a,s){if(void 0===i&&(i=rn.empty),void 0===a&&(a=0),void 0===s&&(s=i.childCount),1==this.elements.length){let o=this.elements[0];if(!ii(o,e.childCount-(r-n)+(s-a),t,this))return!1;for(let e=a;e<s;e++)if(!o.matches(i.child(e),t,this))return!1;return!0}let o=this.getMatchAt(t,e,n)?.matchFragment(i,a,s);return!!o&&o.matchToEnd(e,r)}checkReplaceWith(t,e,n,r,i,a,s){if(1==this.elements.length){let o=this.elements[0];return!!ii(o,e.childCount-(r-n)+1,t,this)&&o.matchesType(i,a,s,t,this)}let o=this.getMatchAt(t,e,n)?.matchType(i,a,s);return!!o&&o.matchToEnd(e,r)}compatible(t){for(let e=0;e<this.elements.length;e++){let n=this.elements[e];for(let e=0;e<t.elements.length;e++)if(t.elements[e].compatible(n))return!0}return!1}generateContent(t){return this.start(t).fillBefore(rn.empty,!0)}static parse(t,e,n){let r=[],i=0,a=null;for(;(i+=/^\s*/.exec(e.slice(i))[0].length)!=e.length;){let n=/^(?:(\w+)|\(\s*(\w+(?:\s*\|\s*\w+)*)\s*\))/.exec(e.slice(i));if(!n)throw SyntaxError("Invalid content expression '"+e+"' at "+i);i+=n[0].length;let s=/^\[([^\]]+)\]/.exec(e.slice(i));s&&(i+=s[0].length);let o=/^<(?:(_)|\s*(\w+(?:\s+\w+)*)\s*)>/.exec(e.slice(i));o&&(i+=o[0].length);let l=/^(?:([+*?])|\{\s*(\d+|\.\w+)\s*(,\s*(\d+|\.\w+)?)?\s*\})/.exec(e.slice(i));l&&(i+=l[0].length);let h=function(t,e,n){let{nodes:r,groups:i}=t,a=[];return n.forEach(t=>{let e=r[t]?[r[t]]:i[t];if(!e)throw SyntaxError("Node type or group '"+t+"' does not exist");for(let t=0,n=e.length;t<n;++t){let n=e[t];-1==a.indexOf(n)&&a.push(n)}}),a}(t.schema,0,n[1]?[n[1]]:n[2].split(/\s*\|\s*/));for(let t=0;t<h.length;t++)if(null==a)a=h[t].isInline;else if(a!=h[t].isInline)throw SyntaxError("Mixing inline and block content in a single node");let u=s?function(t,e){let n=e.split(/\s*,\s*/),r=Object.create(null);for(let e=0;e<n.length;e++){let i=/^(\w+)=(\w+|"(?:\\.|[^\\])*"|\.\w+)$/.exec(n[e]);if(!i)throw SyntaxError("Invalid attribute syntax: "+n[e]);r[i[1]]=ie(t,i[2])}return r}(t,s[1]):null,c=!!o&&(!!o[1]||function(t,e){let n=[];for(let r=0;r<e.length;r++){let i=t.marks[e[r]];if(i)n.push(i);else throw SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}(t.schema,o[2].split(/\s+/))),{min:d,max:p}=function(t,e){let n=1,r=1;if(e&&("+"==e[1]?r=2e9:"*"==e[1]?(n=0,r=2e9):"?"==e[1]?n=0:e[2]&&(n=ie(t,e[2]),r=e[3]?e[4]?ie(t,e[4]):2e9:n),0==r||n>r))throw SyntaxError("Invalid repeat count in '"+e[0]+"'");return{min:n,max:r}}(t,l);if(0!=d&&h[0].isAttrsRequired(u))throw SyntaxError("Node type "+n[0]+" in type "+t.name+" is required, but has non-optional attributes");let g=new r7(h,u,c,d,p);for(let t=r.length-1;t>=0;t--){let n=r[t];if(n.min!=n.max&&n.overlaps(g))throw SyntaxError("Possibly ambiguous overlapping adjacent content expressions in '"+e+"'");if(0!=n.min)break}r.push(g)}return new r6(t,r,!!a)}}class r7{constructor(t,e,n,r,i){this.nodeTypes=t,this.attrs=e,this.marks=n,this.min=r,this.max=i}matchesType(t,e,n,r,i){if(-1==this.nodeTypes.indexOf(t))return!1;if(this.attrs){if(!e)return!1;for(let n in this.attrs)if((null!=e[n]?e[n]:t.attrs[n].getEmptyValue())!=ir(this.attrs[n],r,i))return!1}if(!0===this.marks)return!0;if(!1===this.marks)return 0==n.length;for(let t=0;t<n.length;t++)if(-1==this.marks.indexOf(n[t].type))return!1;return!0}matches(t,e,n){return this.matchesType(t.type,t.attrs,t.marks,e,n)}compatible(t){for(let e=0;e<this.nodeTypes.length;e++)if(-1!=t.nodeTypes.indexOf(this.nodeTypes[e]))return!0;return!1}constrainedAttrs(t,e){if(!this.attrs)return null;let n=Object.create(null);for(let r in this.attrs)n[r]=ir(this.attrs[r],t,e);return n}createFiller(t,e){let n=this.nodeTypes[0],r=n.computeAttrs(this.constrainedAttrs(t,e));return n.create(r,n.contentExpr.generateContent(r))}defaultType(){return this.nodeTypes[0].getPresetAttrValues()&&this.nodeTypes[0]}overlaps(t){return this.nodeTypes.some(e=>t.nodeTypes.indexOf(e)>-1)}allowsMark(t){return!0===this.marks||this.marks&&this.marks.indexOf(t)>-1}}class r9{constructor(t,e,n,r){this.expr=t,this.attrs=e,this.index=n,this.count=r}get element(){return this.expr.elements[this.index]}get nextElement(){for(let t=this.index,e=this.count;t<this.expr.elements.length;t++){let n=this.expr.elements[t];if(this.resolveValue(n.max)>e)return n;e=0}return null}move(t,e){return new r9(this.expr,this.attrs,t,e)}resolveValue(t){return t instanceof it?ir(t,this.attrs,this.expr):t}matchNode(t){return this.matchType(t.type,t.attrs,t.marks)}matchType(t,e,n){void 0===n&&(n=nK.none);for(let{index:r,count:i}=this;r<this.expr.elements.length;r++,i=0){let a=this.expr.elements[r];if(i<this.resolveValue(a.max)&&a.matchesType(t,e,n,this.attrs,this.expr))return i++,this.move(r,i);if(i<this.resolveValue(a.min))return null}}matchFragment(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=t.childCount),e==n)return this;let r=e,i=this.expr.elements.length;for(let{index:e,count:a}=this;e<i;e++,a=0){let i=this.expr.elements[e],s=this.resolveValue(i.max);for(;a<s;)if(i.matches(t.child(r),this.attrs,this.expr)){if(a++,++r==n)return this.move(e,a)}else break;if(a<this.resolveValue(i.min))return null}return!1}matchToEnd(t,e,n){let r=this.matchFragment(t,e,n);return r&&r.validEnd()||!1}validEnd(){for(let t=this.index,e=this.count;t<this.expr.elements.length;t++,e=0)if(e<this.resolveValue(this.expr.elements[t].min))return!1;return!0}fillBefore(t,e,n){let r=[],i=this,a=n||0,s=this.expr.elements.length;for(;;){let n=i.matchFragment(t,a);if(n&&(!e||n.validEnd()))return rn.from(r);if(!1===n)return null;let o=i.element;if(i.count<this.resolveValue(o.min))r.push(o.createFiller(this.attrs,this.expr)),i=i.move(i.index,i.count+1);else if(i.index<s)i=i.move(i.index+1,0);else if(t.childCount>a)return null;else return rn.from(r)}}possibleContent(){let t=[];for(let e=this.index,n=this.count;e<this.expr.elements.length;e++,n=0){let r=this.expr.elements[e],i=r.constrainedAttrs(this.attrs,this.expr);if(n<this.resolveValue(r.max))for(let e=0;e<r.nodeTypes.length;e++){let n=r.nodeTypes[e];n.isAttrsRequired(i)||t.push({type:n,attrs:i})}if(this.resolveValue(r.min)>n)break}return t}allowsMark(t){return this.element.allowsMark(t)}findWrapping(t,e){let n=Object.create(null),r={match:this,via:null},i=[r];for(;i.length;){let a=i.shift(),s=a.match;if(s.matchType(t,e)){let t=[];for(let e=a;e!=r;e=e.via)t.push({type:e.match.expr.nodeType,attrs:e.match.attrs});return t.reverse()}let o=s.possibleContent();for(let t=0;t<o.length;t++){let{type:e,attrs:l}=o[t],h=e.computeAttrs(l);!e.isLeaf&&e.allowContentMatchInside&&!(e.name in n)&&(a==r||s.matchType(e,h)?.validEnd())&&(i.push({match:e.contentExpr.start(h),via:a}),n[e.name]=!0)}}}}class it{constructor(t){this.attr=t}}function ie(t,e){if("."!=e.charAt(0))return JSON.parse(e);{let n=e.slice(1);if(!t.attrs[n])throw SyntaxError("Node type "+t.name+" has no attribute "+n);return new it(n)}}function ir(t,e,n){if(!(t instanceof it))return t;let r=e&&e[t.attr];if(void 0!==r)return r;let i=n.nodeType.getPresetAttrValues();return i?i[t.attr]:void 0}function ii(t,e,n,r){return e>=ir(t.min,n,r)&&e<=ir(t.max,n,r)}let ia=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a},is=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:ia(t,e,n)};var io=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");let il=function(t){return io.test(t)};var ih="\ud800-\udfff",iu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ic="\ud83c[\udffb-\udfff]",id="[^"+ih+"]",ip="(?:\ud83c[\udde6-\uddff]){2}",ig="[\ud800-\udbff][\udc00-\udfff]",iy="(?:"+iu+"|"+ic+")?",ix="[\\ufe0e\\ufe0f]?",im="(?:\\u200d(?:"+[id,ip,ig].join("|")+")"+ix+iy+")*",iv=RegExp(ic+"(?="+ic+")|"+("(?:"+[id+iu+"?",iu,ip,ig,"["+ih+"]"].join("|"))+")"+(ix+iy+im),"g");let ib=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i};var iw=Array.isArray,iM=1/0,i_=tv?tv.prototype:void 0,iA=i_?i_.toString:void 0;let iS=function t(e){if("string"==typeof e)return e;if(iw(e))return ib(e,t)+"";if(tT(e))return iA?iA.call(e):"";var n=e+"";return"0"==n&&1/e==-iM?"-0":n},iC=function(t){return null==t?"":iS(t)},iI=function(t){var e,n=il(t=iC(t))?il(e=t)?e.match(iv)||[]:e.split(""):void 0,r=n?n[0]:t.charAt(0),i=n?is(n,1).join(""):t.slice(1);return r.toUpperCase()+i};class iP{compile(){let t=this.spec;this.name=t.name;let e=this.name.replace(/_[a-zA-Z]/,t=>t[1].toUpperCase());0>e.indexOf("_")&&(this["is"+iI(e)]=!0),this.state_map=new rp,this.nodeSpec=W.from(t.nodes),this.groupSpec=W.from(t.groups),this.marks=r5.compile(this,t.marks),this.attr_marks=r5.compile(this,t.attr_marks),this.nodes=rW.compile(this.nodeSpec,this),this.groups=this.compileGroups(this.groupSpec,this),this.parsers=t.parsers??{},this.version=this.nodes.doc.attrs.schema.getValue(),P(this.nodes,function(t,e){if(e in this.marks||e in this.attr_marks)throw RangeError(`Type name (${e}) can not be both a node and a mark`);t.initContentExpression(r6.parse(t,this.nodeSpec.get(e).content||"",this.nodeSpec))},this)}compileGroups(t,e){let n=Object.create(null);return t.forEach(function(t,r){n[t]=r.map(function(n){let r=e.nodeType(n);return(r.group||(r.group=[])).push(t),r})}),n}node(t,e,n,r,i){if("string"==typeof t)t=this.nodeType(t);else if(t instanceof rW){if(t.schema!=this)throw RangeError("Node type from different schema used ("+t.name+")")}else throw RangeError("Invalid node type: "+t);let a=t.create(e,n,r,i||"check");if(!a)throw RangeError(`Invalid content for node ${t.name}`);return a}inline(t,e,n){return this.node(t,e,null,n)}text(t,e){return this.nodeType("text").create(null,t,e)}nodeFrom(t,e){return t instanceof rV?t:Array.isArray(t)?this.node(t[0],t[1],"text"===t[0]?t[3]:this.nodesFrom(t.slice(3),e),this.marksFrom(t[2]),e):this.node(t.type,t.attrs,"text"===t.type?t.text:this.nodesFrom(t.content,e),this.marksFrom(t.marks),e)}nodesFrom(t,e){return rn.from(t&&t.length?t.reduce((t,n)=>(n&&t.push(this.nodeFrom(n,e)),t),[]):null)}}function iT(t,e){return e?G(e,(e,n,r)=>{var i;if((i=n)&&"function"==typeof i&&!(i===r5||i.prototype instanceof r5)){let e=t.find(t=>{let[e]=t;return e===r})?.[1];if(!e)throw Error(`Failed to merge mark item spec by function without base spec: ${r}`);n=n(e,t)}let a=e.findIndex(t=>{let[e]=t;return e===r});return null==n?a>=0&&e.splice(a,1):a>=0?e[a]=[r,n]:e.push([r,n]),e},t.slice()):t}let ik=Object.create(null);function iL(t,e,n,r,i,a,s){if(e.type.isTextblock)return iD.getSelectionType("text").create(t,i);"object"!=typeof s&&(s={text_only:!!s});let{text_only:o,hidden_cell:l}=s;for(let h=r-+(a<0),u=a<0?-1:e.childCount;h!==u;h+=a){let r=e.child(h);if(r.type.isLeaf){if(!o&&r.type.selectable)return iD.getSelectionType("node").create(t,i-(a<0?r.nodeSize:0))}else{let o;if(r.type.isTableCell&&!1===r.state.display){if("skip"!==l){let i=t.resolve(n-1),{node:l,offset:u,row:c,col_span:d}=i.parent.getDisplayCellData(i.index(),h);if(a<0||c!==i.index()&&d!==e.childCount){let e=i.start()+u+1;o=iL(t,l,e,a<0?r.childCount:0,e+(a<0?l.content.size:0),a,s)}}}else r.type.isStyleEditor||(o=iL(t,r,i-(a<0?r.nodeSize:0)+1,a<0?r.childCount:0,i+a,a,s));if(o)return o}i+=r.nodeSize*a}return null}class iD{getRange(){return[this.from,this.to]}toJSON(){return{type:this.selectionName,range:this.getRange()}}static fromJSON(t,e,n){return this.getSelectionType(e.type).create(t,e.range[0],e.range[1],n)}static registerJSONType(t,e){if(t in ik)throw RangeError(`Duplicate use of SelectionRange JSON name ${t}.`);return ik[t]=e,e.prototype.selectionName=t,e}static getSelectionType(t){return ik[t]}map(t,e,n){return this.constructor.fromJSON(t,this.constructor.mapJSON(this.toJSON(),e),n)}static mapRange(t,e){throw Error("Implement this function.")}static mapJSON(t,e){return this.getSelectionType(t.type)._mapJSON(t,e)}static _mapJSON(t,e){return{...t,range:this.mapRange(t.range,e)}}toMultiSelection(t){return S()}static findFrom(t,e,n){if(t.parent.isTextblock)return this.getSelectionType("text").createResolved(t);e=L(e);let r=t.doc;if(t.atNodeBoundary){let i=e<0?t.index()>0?t.parent.child(t.index()-1):null:t.self;if(i&&!i.type.canSelectionLeave)return iL(r,i,t.pos-(e<0?i.nodeSize:0)+1,e<0?i.childCount:0,t.pos+e,e,n)}let i=0;for(let a=t.depth;a>=0;--a){let s=t.node(a),o=e<0?t.before(a+1):t.after(a+1),l=iL(r,s,t.start(a),t.index(a)+i,o,e,n);if(l)return l;if(!1===s.type.canSelectionLeave)return null;i=e<0?0:1}}static findNear(t,e,n,r){void 0===e&&(e=1);let i=this.findFrom(t,e,n)||this.findFrom(t,-e,n)||(r?null:this.findAtBoundary(t.doc,e,n));if(!i)throw RangeError("Searching for selection in invalid document "+t.node(0));return i}static findRange(t,e){void 0===e&&(e=t);let n=t.pos===e.pos;return t=this.findNear(t,1,!0).$from,n?e=t:(e=this.findNear(e,-1,!0).$to).pos<t.pos&&(e=t),this.getSelectionType("text").createResolved(t,e)}static findAtBoundary(t,e,n){return e<0?this.findAtEnd(t,n):this.findAtStart(t,n)}static findAtStart(t,e){return iL(t,t,0,0,0,1,e)}static findAtEnd(t,e){return iL(t,t,0,t.childCount,t.content.size,-1,e)}}class iR extends iD{constructor(t,e){super(),this.$from=t,this.$to=e}get isSelection(){return!0}get isMultiSelection(){return!1}get from(){return this.$from.pos}get to(){return this.$to.pos}get empty(){return this.from===this.to}get root(){return this.$from.root}get doc(){return this.root}get schema(){return this.root.schema}static getSelfPropertyName(){}is(t){return nR(this.constructor,t)}textBetween(t){return this.root.textBetween(this.from,this.to,t)}containTextBetween(t){return this.root.containTextBetween(this.from,this.to,t)}getMarks(t){return this.$from.getMarks({...t,bias:this.empty?-1:1})}getExpandedRange(){return{$from:this.$from,$to:this.$to}}_eq(t,e){return t instanceof this.constructor&&this.$from[e](t.$from)&&this.$to[e](t.$to)}eq(t){return this._eq(t,"eq")}eqChanged(t){return this._eq(t,"eqChanged")}eqChangedLoose(t){return this._eq(t,"eqChangedLoose")}commonDepth(){return this.$from.commonDepth(this.$to)}commonNode(){return this.$from.commonNode(this.$to)}ensureSelection(t){return this.toMultiSelection(t)}static checkAvailable(t){throw Error("Override me.")}static create(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];throw Error("Override me.")}static createResolved(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];throw Error("Override me.")}}class iN extends iR{constructor(t,e=t){let n=t.pos>e.pos;super(n?e:t,n?t:e),this.$anchor=t,this.$head=e}static getSelfPropertyName(){return"Text"}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get inverted(){return this.anchor>this.head}getSidePos(t){switch(t){case"from":return this.$from;case"to":return this.$to;case"head":return this.$head;case"anchor":return this.$anchor;default:throw RangeError(`Invalid side: ${t}`)}}isSpanningTextblock(){return this.$from.before()!==this.$to.before()}collapse(t){return void 0===t&&(t="head"),this.empty?this:new this.constructor(this.getSidePos(t))}invert(){return this.empty?this:new this.constructor(this.$head,this.$anchor)}containPos(t,e){let n=e?.bias??0,{$from:{pos:r},$to:{pos:i}}=e?.useExpandedRange?this.getExpandedRange():this;return(t>r||t===r&&n>=0)&&(t<i||t===i&&n<=0)}getExpandedRange(){let{$from:t,$to:e}=this,n={endDepth:this.commonDepth()+1},r=t.findDepth("selectionExtendable",n),i=e.findDepth("selectionExtendable",n);return r&&(t=t.shrink(r-1)),i&&(e=e.shrink(i-1,!0)),{$from:t,$to:e}}expand(t){void 0===t&&(t=0);let{$from:e,$to:n}=this.getExpandedRange(),r=this.inverted,i=t<=0?r?n:e:this.$anchor,a=t>=0?r?e:n:this.$head,s=i.pos===this.anchor?i:iN.findFrom(i,r?1:-1)?.$from??i,o=a.pos===this.head?a:iN.findFrom(a,r?-1:1)?.$from??a;return s.pos===this.anchor&&o.pos===this.head?this:this.constructor.createResolved(s,o,!0)||this}_eq(t,e){return t instanceof this.constructor&&this.inverted===t.inverted&&this.to-this.from==t.to-t.from&&this.$from[e](t.$from)}getRange(){return[this.anchor,this.head]}static mapRange(t,e){return[e.map(t[0]),e.map(t[1])]}static checkAvailable(t){return!!t.parent.isTextblock}static create(t,e,n,r){return this.createResolved(null==e?null:t.resolve(e),null==n?null:t.resolve(n),r)}static createResolved(t,e,n){if(!t&&!e)throw Error("One should give at least `anchor` or `head`.");return(t||(t=e),e||(e=t),this.checkAvailable(e))?this.checkAvailable(t)?new this(t,e):n?null:new this(e):n?null:iR.findNear(e,1,{text_only:!0})}}iR.registerJSONType("text",iN);class iO extends iR{constructor(t){super(t,t.plusOne()),this.node=t.nodeAfter}static getSelfPropertyName(){return"Node"}_eq(t,e){return t instanceof this.constructor&&this.$from[e](t.$from)}containPos(t,e){let n=e?.bias??0;return(t>this.from||t===this.from&&n>=0)&&t<this.to}static mapRange(t,e){if(t[1]<0)return[e.mapNode(t[0],1),-1];{let n=e.mapNodeRange(t[0],t[1]);return[n.from,n.deleted?-1:n.to]}}static checkAvailable(t){let e=t.self;return!!(e&&e.type.selectable)}static create(t,e,n,r){let i=t.resolve(e);return this.checkAvailable(i)&&(null==n||n===e+i.self.nodeSize)?new this(i):r?null:iR.findNear(i)}static createResolved(t,e){return this.checkAvailable(t)?new this(t):e?null:iR.findNear(t)}}iR.registerJSONType("node",iO);let ij=Object.create(null);class iE{get isSelection(){return!1}get isMultiSelection(){return!0}get supportMulti(){return!1}get copyable(){return!this.selection().empty}get pastable(){return!0}get insideEditor(){return!0}get typable(){return!0}get spellCheckable(){return!0}get selectionIndex(){return this.selections.length-1}get length(){return this.selections.length}get empty(){return 0===this.length}get single(){return 1===this.length}get multi(){return this.length>1}findEditor(){if(!this.insideEditor)throw Error("Try to find editor from multi-selection which is not inside an editor.");let t=this.$from(),e=t.findDepth("ContentEditable");return isNaN(e)?null:t.shrink(e-1)}_insert(t){let e=this.index(t),n=this.selections.slice();return e%1==0?n.length>1&&n.splice(e,1):n.push(t),new this.constructor(n,this.defaultOptions)}insert(t){return this.supportMulti&&this.constructor.checkSelectionAvailable(t)?this._insert(t):t.toMultiSelection(this.defaultOptions)}$from(t){let e=this.selection(t);return e&&e.$from}$to(t){let e=this.selection(t);return e&&e.$to}from(t){let e=this.selection(t);return e&&e.from}to(t){let e=this.selection(t);return e&&e.to}index(t){for(let e=0;e<this.selections.length;++e)if(t.eq(this.selections[e]))return e;return -.5}has(t){return this.index(t)%1==0}forEach(t,e,n){for(let r=0,i=this.selections.length;r<i;++r){let i=t.call(e,this.selections[r],r);if(n&&null!=i)return i}}eqType(t){return t instanceof this.constructor}_eq(t,e){if(!this.eqType(t)||this.selections.length!==t.selections.length)return!1;for(let n=this.selections.length-1;n>=0;--n)if(!this.selections[n][e](t.selections[n]))return!1;return!0}eq(t){return this._eq(t,"eq")}eqChanged(t){return this._eq(t,"eqChanged")}eqChangedLoose(t){return this._eq(t,"eqChangedLoose")}toJSON(){let t=[];for(let e=0,n=this.selections.length;e<n;++e)t.push(this.selections[e].toJSON());return{type:this.selectionName,selections:t,options:this.defaultOptions}}static registerJSONType(t,e){if(t in ij)throw RangeError(`Duplicate use of MultiSelection JSON name ${t}.`);return ij[t]=e,e.prototype.selectionName=t,e}static getSelectionType(t){return ij[t]}toMultiSelection(){return this}toResolvedPosArray(t,e){void 0===t&&(t=0),void 0===e&&(e=this.selections.length);let n=[];for(let r=t;r<e;++r)n.push(this.selections[r].$from);return n}}class iV extends iE{constructor(t,e){super(),this.ranges=t,this.$editor=this.insideEditor?this.findEditor():null}get rangeCount(){return this.ranges.length}get selections(){return this.ranges}get root(){return this.getRange().root}get doc(){return this.root}get schema(){return this.root.schema}get defaultOptions(){return null}static getSelfPropertyName(){}is(t){return nR(this.constructor,t)||!!this[`isMulti${t}Selection`]}getResolvedEditor(){return this.$editor}getRanges(){return this.ranges}getRange(t){return this.ranges[t??this.selectionIndex]}selection(t){return this.getRange(t)}getTypableSelection(){return this.typable?this:null}containPos(t,e){return this.getRanges().some(n=>n.containPos(t,e))}contentToSlice(){return null}contentToJSON(t){return null}static fromJSON(t,e,n){void 0===n&&(n=!1);let r=[];for(let n of e.selections){let e=iR.fromJSON(t,n,!0);e&&r.push(e)}let i=this.getSelectionType(e.type);return r.length?i.fromJSONSucc(t,e,r):n?null:i.fromJSONFailed(t,e)}static fromJSONSucc(t,e,n){return this.createSelected(n,!0,e.options)||this.fromJSONFailed(t,e)}static fromJSONFailed(t,e){throw Error("Implement me.")}map(t,e,n){let r=this.constructor;return r.fromJSON(t,r.mapJSON(this.toJSON(),e),n)}static mapJSON(t,e){return this.getSelectionType(t.type)._mapJSON(t,e)}static _mapJSON(t,e){return{...t,selections:t.selections.map(t=>iR.mapJSON(t,e))}}ensureSelection(){return this}static checkSelectionAvailable(t){return!1}static filterSelections(t,e){return t.every(this.checkSelectionAvailable,this)?t:[]}static _createSelected(t,e){return t.length>1&&!this.prototype.supportMulti&&(t=[t[t.length-1]]),e=Object.assign(Object.create(null),e),(t=this.filterSelections(t,e)).length?new this(t,e):null}static createSelected(t,e,n){let r=this._createSelected(t,n);return e||r?r:this.createAdapted(t,e,n)}static _createResolved(t,e){return null}static createResolved(t,e,n){let r=this._createResolved(t,n);return e||r?r:this.createAdapted(t,e,n)}static adaptResolvedPos(t){return null}static adaptTextSelection(t){let e=this.adaptResolvedPos(t.$head),n=this.adaptResolvedPos(t.$anchor);return e&&n?e.concat(n):e||n}static adaptNodeSelection(t){return this.adaptResolvedPos(t.$from)}static adaptSelection(t){return t.is("Text")?this.adaptTextSelection(t):this.adaptNodeSelection(t)}static adaptContent(t){return t instanceof n5?this.adaptResolvedPos(t):this.adaptSelection(t)}static _createAdapted(t,e){return null}static createAdapted(t,e,n){let r=this._createAdapted(t,n);if(e||r)return r;if(!t.length)throw Error("Given resolved pos array is empty.");let i=t[t.length-1];return i instanceof n5||(i=i.is("Text")?i.$head:i.$from),this.createFailed(i,n)}static createFailed(t,e){return"presentation"!==t.doc.type.schema.name||t.exists("ContentEditable")?iR.findNear(t).toMultiSelection(e):this.getSelectionType("slide_content").createFailed(t,e)}static fromRange(t,e){throw Error("Implement me.")}}class iB extends iV{constructor(t,e){super(t,e),this.bias=this.ensureHeadBias(e&&e.bias)}get isMultiTextSelection(){return!0}get defaultOptions(){return{bias:this.bias}}getTypableSelection(){let t,e,n=this.getRange();if(n.empty)return this;let r=n.$from,i=n.$to;if(r.findNode("TableCell")===i.findNode("TableCell"))return this;let a=r.findDepth("Table",{dir:1});t=isNaN(a)?r:iR.findFrom(r.shrink(a-1),-1,!0).$from;let s=i.findDepth("Table",{dir:1});return e=isNaN(s)?i:iR.findFrom(i.shrink(s-1,!0),1,!0).$from,iN.createResolved(t,e).toMultiSelection()}ensureHeadBias(t){let e=this.getRange();t=null==t?e.empty||e.inverted?1:-1:t<0?-1:1;let n=e.$head;return t<0&&0!==n.parentOffset&&n.atNodeBoundary&&n.parent.child(n.index()-1).is("HardBreak")&&(t=1),t}$anchor(t){let e=this.getRange(t);return e&&e.$anchor}$head(t){let e=this.getRange(t);return e&&e.$head}anchor(t){let e=this.getRange(t);return e&&e.anchor}head(t){let e=this.getRange(t);return e&&e.head}static fromJSONFailed(t,e){return this.createFailed(t.resolve(e.selections[e.selections.length-1].range[1]),e.options)}}class iz extends iB{replaceRange(t){return t&&t!==this.getRange()&&this.constructor.createSelected([t],!0)||this}collapse(){return this.replaceRange(this.getRange().collapse())}invert(){return this.replaceRange(this.getRange().invert())}expand(t){return this.replaceRange(this.getRange().expand(t))}contentToSlice(){let t=this.getRange();if(t.empty)return rr.empty;let{$from:e,$to:n}=t.getExpandedRange(),r=e.pos;for(let t=e.depth;t>0&&e.end(t)===r;--t)++r;let i=n.pos,a=e.root.slice(r,i),s=a.possibleParent;if(s?.is("Textblock")){let t;if(e.parent===n.parent&&n.pos-e.pos!==e.parent.content.size)for(let e of(t={},s.type.listAttrsList))t[e]=null;a=rr.from(s.copy(a.content,t),a.openLeft+1,a.openRight+1)}return a}static checkSelectionAvailable(t){return t.is("Text")}static filterSelections(t,e){return super.filterSelections(t,e)}static _createSelected(t,e){return super._createSelected(t,e)}static createSelected(t,e,n){return super.createSelected(t,e,n)}static _createResolved(t,e){let n=[];for(let e of t){let t=iN.createResolved(e,e,!0);if(!t)return null;n.push(t)}return this._createSelected(n,e)}static adaptResolvedPos(t){let e=iR.findNear(t,1,void 0,!0);return e?[e]:null}static _createAdapted(t,e){return this._createSelected(t.reduce((t,e)=>{let n=this.adaptContent(e);return n&&n.forEach(e=>{let n;(n=e instanceof n5?iN.createResolved(e,null,!0):e)&&t.push(n)}),t},[]),e)}}iV.registerJSONType("text",iz);let iF=t=>class extends t{get copyable(){return!1}get pastable(){return!1}get typable(){return!1}get spellCheckable(){return!1}getTypableSelection(){return null}};class iG extends iF(iz){get isMultiHolderTextSelection(){return!0}static checkSelectionAvailable(t){return!!(super.checkSelectionAvailable(t)&&t.$from.parent.type.isHolderParagraph&&t.$to.parent.type.isHolderParagraph)}}iV.registerJSONType("holder_text",iG);class iH extends iz{get isMultiCustomTextSelection(){return!0}get copyable(){return!1}get pastable(){return!1}get typable(){return!1}get spellCheckable(){return!1}getTypableSelection(){return null}static checkSelectionAvailable(t){return!!(super.checkSelectionAvailable(t)&&t.$from.parent.type.isStyleParagraph)}static filterSelections(t,e){return super.filterSelections(t,e).map(t=>t.collapse())}}iV.registerJSONType("style_text",iH);class iW extends iV{indexPos(t){for(let e=0;e<this.ranges.length;++e)if(this.ranges[e].from===t)return e;return -.5}indexNode(t){for(let e=0;e<this.ranges.length;++e)if(this.ranges[e].node===t)return e;return -.5}hasPos(t){return this.indexPos(t)%1==0}hasNode(t){return this.indexNode(t)%1==0}node(t){let e=this.getRange(t);return e&&e.node}resolvedPos(t){return this.$from(t)}pos(t){return this.from(t)}static fromJSONFailed(t,e){return this.createFailed(t.resolve(e.selections[e.selections.length-1].range[0]),e.options)}getNodePosArr(){let t=[];for(let e of this.ranges)t.push(e.from);return t}toNodeArray(t,e){void 0===t&&(t=0),void 0===e&&(e=this.ranges.length);let n=[];for(let r=t;r<e;++r)n.push(this.ranges[r].node);return n}toPosArray(t,e){void 0===t&&(t=0),void 0===e&&(e=this.ranges.length);let n=[];for(let r=t;r<e;++r)n.push(this.ranges[r].from);return n}}class iq extends iW{get isMultiNodeSelection(){return!0}get copyable(){return this.getRange().node.type.copyable}contentToSlice(){let t=this.ranges.slice().sort((t,e)=>t.from-e.from).map(t=>t.node);return rr.from(t)}contentToJSON(t){let e=this.contentToSlice();return e&&e.toJSON(t)}static checkNode(t){return!0}static checkSelectionAvailable(t){return t.is("Node")&&this.checkNode(t.node)}static filterSelections(t,e){let n=super.filterSelections(t,e),r=n.length;if(r>1){let t=[],e=Object.create(null);for(let i=r-1;i>=0;--i){let r=n[i],a=r.from;e[a]||(e[a]=!0,t.push(r))}t.reverse(),n=t}return n}static _createSelected(t,e){return super._createSelected(t,e)}static _createResolved(t,e){let n=[];for(let e of t){let t=iO.createResolved(e,!0);if(!t)return null;n.push(t)}return this._createSelected(n,e)}static adaptResolvedPos(t){return t.self?[t]:null}static _createAdapted(t,e){return this._createSelected(t.reduce((t,e)=>{let n=this.adaptContent(e);return n&&n.forEach(e=>{let n;(n=e instanceof n5?iO.createResolved(e,!0):e)&&t.push(n)}),t},[]),e)}static create2(t,e,n,r){return this.createResolved(e.map(t.resolve,t),n,r)}}iV.registerJSONType("node",iq);class iU extends iq{get isMultiInlineNodeSelection(){return!0}get typable(){return"document"===this.schema.name&&this.getRange().node.is("Shape")}getTypableSelection(){if(!this.typable)return null;let t=iR.findFrom(this.root.resolve(this.getRange().to-1),-1,!0);if(!t)return null;let e=iV.fromRange(t);return e.is("Text")?e:null}static checkNode(t){return!!t.is("Inline")}static checkSelectionAvailable(t){return super.checkSelectionAvailable(t)&&!t.$from.parent.type.isInvisible}}iV.registerJSONType("inline_node",iU);class iZ extends iU{get isMultiPageNumberSelection(){return!0}get copyable(){return!1}get pastable(){return!1}get typable(){return!1}get spellCheckable(){return!1}getTypableSelection(){return null}static checkTextSelection(t){return!!(t.is("Text")&&t.$from.parent.type.isPageNumberBlock&&t.$to.parent.type.isPageNumberBlock)}static checkSelectionAvailable(t){return super.checkSelectionAvailable(t)||this.checkTextSelection(t)}static checkNode(t){return t.type.isPageNumberText}static filterSelections(t,e){if(1===t.length){let e=t[0];this.checkTextSelection(e)&&(t=[iO.createResolved(e.$from.minusOne())])}return super.filterSelections(t,e)}static _createAdapted(t,e){return this.getSelectionType("text")._createAdapted.apply(this,arguments)}}iV.registerJSONType("page_num",iZ);class i$ extends iq{get isMultiBreakGraphSelection(){return!0}get pastable(){return!1}get spellCheckable(){return!1}get insideEditor(){return!1}get typable(){return this.getRange().node.is("Shape")}getTypableSelection(){if(!this.typable)return null;let t=iR.findFrom(this.root.resolve(this.getRange().to-1),-1,!0);if(!t)return null;let e=iV.fromRange(t);return e.is("Text")?e:null}static checkNode(t){return!!t.is("Inline")}static checkSelectionAvailable(t){return super.checkSelectionAvailable(t)&&!!t.$from.parent.type.isInvisible}}iV.registerJSONType("break_graph",i$);class iJ extends iq{constructor(t,e){super(t,e),this.whole=!!(e&&e.whole)}get isMultiListSelection(){return!0}get copyable(){return!1}get pastable(){return!1}get defaultOptions(){return{whole:this.whole}}get listId(){return this.getRange().node.getAttrValue("listId")||""}get listLevel(){return this.getRange().node.getAttrValue("listLevel")||0}get listConfig(){return this.getRange().node.state.list_config}get listConfigs(){return this.getRange().node.state.list_configs}getListInfo(){let t=this.getRange().node;return{id:t.getAttrValue("listId")||"",level:t.getAttrValue("listLevel")||0,type:t.state.list_config.type,config:t.state.list_config}}getTypableSelection(){return iR.findFrom(this.getRange().$from,1)?.toMultiSelection()??null}forEachList(t,e){if(this.whole){let n=this.getResolvedEditor();if(n){let{id:r,level:i}=this.getListInfo();n.self.descendants((n,a)=>{if(this.constructor.checkNode(n)&&n.getAttrValue("listId")===r&&n.getAttrValue("listLevel")===i)return!!t.call(e,n,a)},{start:n.pos+1,preset:"editor"})}}else{let n=this.getRange();t.call(e,n.node,n.from)}}static checkNode(t){return t.type.is("ListBlock")&&t.type.isValidListBlock(t)}static adaptResolvedPos(t){let e=-1;return t.forEach((t,n)=>!!n.is("ContentEditable")||(this.checkNode(n)?(e=t,!0):void 0)),e>=0?[t.shrink(e-1)]:null}}iV.registerJSONType("list",iJ);class iY extends iF(iJ){get isMultiHolderListSelection(){return!0}static checkSelectionAvailable(t){return!!(super.checkSelectionAvailable(t)&&t.$from.self.type.isHolderParagraph)}}iV.registerJSONType("holder_list",iY);class iX extends iq{get isSpecial(){return!0}get supportMulti(){return!0}get pastable(){return!0}get insideEditor(){return!1}get typable(){return!1}getTypableSelection(){return null}static create(t,e,n){return this.createAdapted(t,e,n)}}iV.registerJSONType("special_node",iX);class iQ{constructor(){this.index_map=Object.create(null),this.row_idx_min=void 0,this.row_idx_max=void 0,this.col_idx_min=void 0,this.col_idx_max=void 0}getAt(t,e){if(t in this.index_map&&e in this.index_map[t])return this.index_map[t][e]}setAt(t,e,n){t in this.index_map||(this.index_map[t]=Object.create(null)),this.index_map[t][e]=n,(isNaN(this.row_idx_min)||t<this.row_idx_min)&&(this.row_idx_min=t),(isNaN(this.row_idx_max)||t>this.row_idx_max)&&(this.row_idx_max=t),(isNaN(this.col_idx_min)||e<this.col_idx_min)&&(this.col_idx_min=e),(isNaN(this.col_idx_max)||e>this.col_idx_max)&&(this.col_idx_max=e)}setRange(t,e,n,r,i){for(let a=t;a<=e;++a)for(let t=n;t<=r;++t)this.setAt(a,t,i)}flattenToArray(){let t=[];return Object.keys(this.index_map).forEach(e=>{let n=Object.keys(this.index_map[e]),r=Number(e);n.forEach(n=>{t.push({row_index:r,col_index:Number(n),data:this.index_map[e][n]})})}),t}toPosArray(t){let e=[],n=t.findData("Table");if(!n)return e;let r=n.pos;return n.node.forEach((t,n,i)=>{if(!(i in this.index_map))return;let a=this.index_map[i];t.forEach((t,i,s)=>{s in a&&e.push(r+1+n+1+i)})}),e}toResolvedPosArray(t){let e=this.toPosArray(t),n=t.doc;return e.map(t=>n.resolve(t))}forEach(t,e,n){for(let r in this.index_map){let i=this.index_map[r];for(let a in r=Number(r),i){let s=t.call(e,r,Number(a),i[a]);if(n&&null!=s)return s}}}forEachCell(t,e,n,r){let i,a,s,o;return this.forEach(function(r,l,h){let u=t.maybeChild(r),c=u&&u.maybeChild(l);if(u&&c)return s===r?a+=u.sizeBetween(o,l):(a=(i=null==s?t.offsetAt(r):i+t.sizeBetween(s,r))+1+u.offsetAt(l),s=r),o=l,e.call(n,c,a,r,l,h)},this,r)}getRectRowSize(){return isNaN(this.row_idx_max)?0:this.row_idx_max-this.row_idx_min+1}getRectColSize(){return isNaN(this.col_idx_max)?0:this.col_idx_max-this.col_idx_min+1}getRect(){return{top:this.row_idx_min,bottom:this.row_idx_max,left:this.col_idx_min,right:this.col_idx_max}}}class iK{constructor(t,e,n){let r=t[0].findDepth("Table");if(isNaN(r))throw RangeError("Given resolved pos does not inside table");this.$table=t[0].shrink(r-1);let i=this.getIndexRectInfo(this.$table,t,e,n);this.sel_rect=i.rect,this.anchor=i.anchor,this.head=i.head;let a=this.$table.self;this.raw_idx_store_=a.getRawIdxStoreByRect(this.sel_rect),this.display_idx_store_=a.getDisplayIdxStoreByRect(this.sel_rect),this.op_idx_store_=a.getOpIdxStoreByRect(this.sel_rect)}getRawResolvedPosArray(){return this.raw_resolved_pos_arr_||(this.raw_resolved_pos_arr_=this.raw_idx_store_.toResolvedPosArray(this.$table)),this.raw_resolved_pos_arr_}getDisplayResolvedPosArray(){return this.display_resolved_pos_arr_||(this.display_resolved_pos_arr_=this.display_idx_store_.toResolvedPosArray(this.$table)),this.display_resolved_pos_arr_}getOpResolvedPosArray(){return this.op_resolved_pos_arr_||(this.op_resolved_pos_arr_=this.op_idx_store_.toResolvedPosArray(this.$table)),this.op_resolved_pos_arr_}get mergedCellResolvedPosArray(){return this.getOpResolvedPosArray().filter(t=>{let e=t.self.state;return(e.view_colspan>1||e.view_rowspan>1)&&e.display})}get tableDoms(){return this.$table.self.dom}get cellDoms(){return this.getDisplayResolvedPosArray().map(t=>t.self.dom)}isSquare(){let t=Object.keys(this.op_idx_store_.index_map).map(t=>Number(t));if(!t.length)return!1;for(let e=1;e<t.length;e++)if(t[e-1]+1!==t[e])return!1;let e=Object.keys(this.op_idx_store_.index_map[t[0]]).map(t=>Number(t));for(let t=1;t<e.length;t++)if(e[t-1]+1!==e[t])return!1;for(let n=1;n<t.length;n++){let r=Object.keys(this.op_idx_store_.index_map[t[n]]).map(t=>Number(t));if(r.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(r[t]!==e[t])return!1}return!0}isOnlyOneVisibleCell(){return 1===this.getDisplayResolvedPosArray().length}isSingleRow(){return 1===Object.keys(this.op_idx_store_).length}isSingleCol(){let t=Object.keys(this.op_idx_store_);if(0===t.length)return!1;let e=Object.keys(this.op_idx_store_[t[0]]);if(1!==e.length)return!1;let n=e[0];for(let e=1;e<t.length;e++){let r=Object.keys(this.op_idx_store_[t[e]]);if(1!==r.length||r[0]!==n)return!1}return!0}canBeMerged(){return this.isSquare()&&!this.isOnlyOneVisibleCell()}canBeUnmerged(){return this.mergedCellResolvedPosArray.length>0}getIndexRect(t){let e;for(let n of t){let t,r,i,a;t=i=n.index(),r=a=n.index(-1),e?(e.top=Math.min(e.top,r),e.bottom=Math.max(e.bottom,a),e.left=Math.min(e.left,t),e.right=Math.max(e.right,i)):e={left:t,top:r,right:i,bottom:a}}return e}getCornerIndex(t,e,n){return{row:e?t.bottom:t.top,col:n?t.right:t.left}}getAnchorIndex(t,e,n){return this.getCornerIndex(t,e<0,n<0)}getHeadIndex(t,e,n){return this.getCornerIndex(t,e>0,n>0)}getIndexRectInfo(t,e,n,r){let i=t.self,a=this.getIndexRect(e),s=this.getAnchorIndex(a,n,r),o=this.getHeadIndex(a,n,r);return s=i.getEnsuredCellIndex(s.row,s.col),o=i.getEnsuredCellIndex(o.row,o.col),a.top=Math.min(s.row,o.row),a.bottom=Math.max(s.row,o.row),a.left=Math.min(s.col,o.col),a.right=Math.max(s.col,o.col),{rect:a,anchor:s,head:o}}}class i0 extends iX{constructor(t,e){let n=L(e&&e.dir_col,!1,1),r=L(e&&e.dir_row,!1,1),i=new iK(t.map(t=>t.$from),r,n);super(i.getRawResolvedPosArray().map(t=>iO.createResolved(t,!0)),e),this.dir_col=n,this.dir_row=r,this.helper_=i;let a=e&&e.anchor,s,{$from:o,$to:l}=this.anchorSelection();if(null!=a&&a>=o.pos&&a<l.pos){if(s=o.doc.resolve(a),!iN.checkAvailable(s)){let t=iR.findNear(s,1,!0).$from;t.pos<o.pos&&t.pos>=l.pos&&(t=iR.findNear(s,-1,!0).$from),s=t}}else s=iR.findNear(o,1,!0).$from;this.$anchor=s}get isMultiCellSelection(){return!0}get insideEditor(){return!0}get defaultOptions(){return{dir_col:this.dir_col,dir_row:this.dir_row,anchor:this.$anchor.pos}}get typable(){return!0}getTypableSelection(){let t=this.headIndex,e=this.$table;t=e.self.getDisplayCellIndex(t.row,t.col);let n=iR.findFrom(e.extendIndex([t.row,t.col]),1,!0).$from,r=iR.findFrom(e.extendIndex([t.row,t.col+1]),-1,!0).$to;return iN.createResolved(n,r).toMultiSelection()}get minRow(){return this.helper_.sel_rect.top}get maxRow(){return this.helper_.sel_rect.bottom}get minCol(){return this.helper_.sel_rect.left}get maxCol(){return this.helper_.sel_rect.right}get anchorIndex(){return this.helper_.anchor}get headIndex(){return this.helper_.head}get $table(){return this.helper_.$table}anchorSelection(){return this.ranges.find((function(t){let e=t.$from;return e.index()===this.anchorIndex.col&&e.index(-1)===this.anchorIndex.row}).bind(this))}headSelection(){return this.ranges.find((function(t){let e=t.$from;return e.index()===this.headIndex.col&&e.index(-1)===this.headIndex.row}).bind(this))}canBeMerged(){return this.helper_.canBeMerged()}canBeUnmerged(){return this.helper_.canBeUnmerged()}canDeleteRow(){return this.helper_.$table.self.getRowSize()>this.helper_.op_idx_store_.getRectRowSize()}canDeleteCol(){return this.helper_.$table.self.getColSize()>this.helper_.op_idx_store_.getRectColSize()}getRawResolvedPosArray(){return this.helper_.getRawResolvedPosArray()}getDisplayResolvedPosArray(){return this.helper_.getDisplayResolvedPosArray()}getOpResolvedPosArray(){return this.helper_.getOpResolvedPosArray()}forEachCell(t,e,n){let r=this.$table.pos+1;return this.$table.self.forEachCell(this.minRow,this.maxRow,this.minCol,this.maxCol,function(n,i,a,s){return t.call(e,n,r+i,a,s)},this,n)}forEachDisplayCell(t,e,n){let r=this.$table.pos+1;return this.$table.self.forEachDisplayCell(this.minRow,this.maxRow,this.minCol,this.maxCol,function(n,i,a,s){return t.call(e,n,r+i,a,s)},this,n)}forEachOperateCell(t,e,n){let r=this.$table.pos+1;return this.$table.self.forEachOperateCell(this.minRow,this.maxRow,this.minCol,this.maxCol,function(n,i,a,s){return t.call(e,n,r+i,a,s)},this,n)}contentToSlice(){let t=this.helper_.$table.self,e=this.helper_.op_idx_store_,n=e.getRect(),r=[];t.forRange(n.top,n.bottom,(i,a,s)=>{let o=[];i.forRange(n.left,n.right,(n,r,i)=>{let a;a=e.getAt(s,i)?n:t.type.schema.nodes.table_cell.createAndFill(n.attrs),o.push(a)},this),r.push(i.copy(rn.fromArray(o)))},this);let i=t.attrs.colgroup.slice(n.left,n.right+1),a=t.copy(rn.fromArray(r),{colgroup:i});return rr.from([a])}contentToJSON(){return null}static _mapJSON(t,e){if((t=super._mapJSON(t,e)).options&&null!=t.options.anchor){let n=K(t.options);n.anchor=e.map(t.options.anchor),t.options=n}return t}static checkSelectionAvailable(t){return super.checkSelectionAvailable(t)||this.checkTextSelection(t)}static checkTextSelection(t){if(!t||!(t instanceof iN))return!1;let{$from:e,$to:n}=t,r=e.findDepth("TableCell");if(isNaN(r))return!1;let i=n.findDepth("TableCell");return!isNaN(i)&&e.node(r-2)===n.node(i-2)&&e.node(r)!==n.node(i)}static checkNode(t){return!!t.type.isTableCell}static filterSelections(t,e){if(1===t.length){let n=t[0];if(this.checkTextSelection(n)){let r=n.$anchor.shrink("TableCell"),i=n.$head.shrink("TableCell");t=[iO.createResolved(r,!0),iO.createResolved(i,!0)],e=Object.assign(e,{dir_col:i.index()>=r.index()?1:-1,dir_row:i.index(-1)>=r.index(-1)?1:-1,anchor:n.anchor})}}return t.some(t=>t.is("Text"))||(t=super.filterSelections(t,e)).length>1&&!this.checkSameTable(t)?[]:t}static checkSameTable(t){let e=t[0].$from.findData("Table");if(!e)return!1;let n=e.node,r=e.depth;return t.every(t=>t.$from.node(r)===n)}}class i1 extends i0{getResolvedTable(){return this.$table}getCellSelectionHelper(){return this.helper_}getDisplayCellsRange(){let{top:t,bottom:e,left:n,right:r}=this.getCellSelectionHelper().display_idx_store_.getRect();return{row:[t,e],col:[n,r]}}static adaptTextSelection(t){let e=t.$from.commonDepth(t.$to);if(0===e)return null;let n=t.$from.shrink(e-1),r=n.self;if(r&&(r.type.isTable||r.type.isTableRow)){let e=this.adaptResolvedPos(t.$head),n=this.adaptResolvedPos(t.$anchor);return e&&n?e.concat(n):e||n}return this.adaptResolvedPos(n)}static adaptResolvedPos(t){let e=t.self;if(e){if("presentation"===e.type.schema.name&&(e.is("TableBox")?e=(t=t.extend(e.getTextBlockOffset()+1)).self:e.is("TableBlock")&&(e=(t=t.extend(0)).self)),e.is("Table")){let n=[];return e.forEachCell(null,null,null,null,(e,r,i,a)=>{n.push(t.extendIndex([i,a]))}),n}if(e.is("TableRow")){let n=[];return e.forEach((e,r,i)=>{n.push(t.extendIndex([i]))}),n}}let n=-1;return t.forEach((t,e)=>!!e.is("ContentEditable")||(e.is("TableCell")?(n=t,!0):void 0)),n>=0?[t.shrink(n-1)]:null}}iV.registerJSONType("cell",i1);class i2 extends iX{forEachFloating(t,e,n){return this.forEach(function(r){let{node:i,from:a}=r,s=t.call(e,i,a);return n&&null!=s?s:i.type.isObjectGroup?i.forEachFloating(function(n,r){return t.call(e,n,a+1+r)},this,n):s},this,n)}forEachBox(t,e,n){return this.forEach(function(r){let{node:i,from:a}=r;return i.type.isObjectGroup?i.forEachBox(function(n,r){return t.call(e,n,a+1+r)},this,n):t.call(e,i,a)},this,n)}static checkNode(t){return!!t.type.isFloatingObject}static filterSelections(t,e){if((t=super.filterSelections(t,e)).length>1){if(!this.checkSameSlide(t))return[];t=this.filterSelectionsInsideGroup(t)}return t}static checkSameSlide(t){let e=t[0].$from.findData("AbstractSlide");if(!e)return!1;let n=e.pos,r=n+e.node.nodeSize;return t.every(t=>t.from>n&&t.to<r)}static filterSelectionsInsideGroup(t,e){let n,r,i=t[0].$from.findDepth("ContentContainer")+1,a=[],s=t.length;for(let e=0;e<s;++e){let s=t[e].$from,o=s.depth+1!==i;a.push(o);let l=!!o&&s.before(i);null==n?n=l:n!==l&&(r=!0)}return r?super.filterSelections(t.map((t,e)=>a[e]?iO.createResolved(t.$from.shrink(i-1),!0):t),e):!1===n?t:this.flattenGroupSelections(t,e)}static flattenGroupSelections(t,e){let n=[];for(let e=0,r=t.length;e<r;++e)this._flattenGroupSelections(n,t[e]);return super.filterSelections(n,e)}static _flattenGroupSelections(t,e){let n=e.node;if(n.type.isObjectGroup&&e.$from.parent.type.isObjectGroup){let r=e.$from;n.forEachBox(function(e,n,i){t.push(iO.createResolved(r.extend(n),!0))})}else t.push(e)}static adaptResolvedPos(t){return(t=t.maybeShrink("FloatingObject"))?[t]:null}static createFailed(t,e){return this.getSelectionType("slide_content").createFailed(t,e)}}class i5 extends i2{get isMultiFloatingSelection(){return!0}get typable(){if(this.single){let t=this.getRange().node.type;return t.isWithTextBox&&!t.isMasterHolder&&!t.isLayoutHolder}return!1}static get type(){return"floating_object"}getTypableSelection(){let t;if(!this.typable)return null;let e=this.getRange(),n=e.node;if(n.type.isTableBox){let r=n.getTextBlockData(),i=e.doc.resolve(e.from+1+r.offset+1+r.node.firstChild.getCellOffset(0,0));t=iR.findFrom(i.plusOne(),-1,!0)}else t=iR.findFrom(e.$to,-1,!0);return t?t.toMultiSelection():null}*iterateFloatings(){for(let t of this.getRanges()){let{node:e,from:n}=t;yield*function* t(e,n){if(yield{node:e,pos:n},e.is("ObjectGroup"))for(let{node:r,offset:i}of e.iterateChildren())yield*t(r,n+1+i)}(e,n)}}contentToJSON(t){return super.contentToJSON({...t,use_abs_transform:!0})}}iV.registerJSONType("floating",i5);class i4 extends iX{constructor(t,e){if(super(t,e),!this.empty&&!(e&&e.skip_master_tracking)){let t=this.resolvedPos(),e=t.self,n=t.doc;if(e.type.isLayout||e.type.isSlide){let t=n.getMasterOffset(e.state.master_id);isNaN(t)||(this.active_master=iO.create(n,t))}if(e.type.isSlide){let t=n.getLayoutOffset(e.state.master_id,e.state.layout_id);isNaN(t)||(this.active_layout=iO.create(n,t))}}}get isMultiSlideSelection(){return!0}static get type(){return"slide"}get activeMasterSelection(){return this.active_master}get activeLayoutSelection(){return this.active_layout}findMasterSelection(){if("_master_sel"in this)return this._master_sel;let t=this.node();return this._master_sel=t.type.isSlide||t.type.isLayout?this.constructor.createAdapted([this.doc.resolve(this.doc.getMasterOffset(t.state.master_id))],!0):null}findLayoutSelection(){if("_layout_sel"in this)return this._layout_sel;let t=this.node();return this._layout_sel=t.type.isSlide?this.constructor.createAdapted([this.doc.resolve(this.doc.getLayoutOffset(t.state.master_id,t.state.layout_id))],!0):null}static checkNode(t){return!!t.type.isAbstractSlide}static filterSelections(t,e){if((t=super.filterSelections(t,e)).length>1){if(!this.checkSameSlideContainer(t))return[];let e=t[t.length-1];e.node.type.isMaster&&(t=[e])}return t}static checkSameSlideContainer(t){let e=t[0].$from.findData("AbstractSlideContainer");if(!e)return!1;let n=e.pos,r=n+e.node.nodeSize;return t.every(t=>t.from>n&&t.to<r)}static adaptResolvedPos(t){return t.parent.type.isAbstractSlideContainer&&!t.self?null:(t=t.maybeShrink("AbstractSlide"))?[t]:null}static createFailed(t,e){let n=t.findData("AbstractSlideContainer");if(!n)return iR.findNear(t).toMultiSelection(e);let r=n.node.childCount;if(0===r)return this.getSelectionType("slide_container").createAdapted([t],!1,e);let i=n.depth;return i>t.depth?this.findFirstSlide(t.shrink(i-1).extendIndex(0),e):t.index(i)<r?this.findNextSlide(t.shrink(i),e):this.findLastSlide(t.shrink(i-1).extendIndex(r-1),e)}static findNextSlide(t,e){return this.createResolved([t],!1,e)}static findFirstSlide(t,e){return this.createResolved([t],!1,e)}static findLastSlide(t,e){return this.createResolved([t],!1,e)}}iV.registerJSONType("slide",i4);let i8=nH.create({deep:{id:nH.id,slideId:nH.optional,title:nH.optional}});function i3(t,e){return{...t,slideId:t.slideId??null,indexStarted:e,contentLength:0}}nH.createOptional({empty_value:v,normalizer:nH.createArrayNormalizer(i8)}),iV.registerJSONType("slide_separator",class extends i4{constructor(t,e){super(t,e),this.bias=0>(e&&e.bias)?-1:1,this.section=null,this.initCorrespondingSection(e?.sectionId)}get isMultiSlideSeparatorSelection(){return!0}get defaultOptions(){return{bias:this.bias,sectionId:this.sectionId}}get supportMulti(){return!1}get copyable(){return!1}get separatorIndex(){return this.showIndex+.5*this.showDirection}get showIndex(){return this.resolvedPos().index()}get showDirection(){return this.section?.dir??this.bias}get sectionId(){return this.section?.id??null}eqType(t){return t.isMultiSlideSelection}initCorrespondingSection(t){var e;if(null==t||this.node().type.isMaster||this.node().type.isLayout)return;let n=(function(t,e){var n,r;let i;if(0===e.length)return[];let a=e.map(t=>({...t}));n=t[0],0!==(r=a).length&&(r.some(t=>t.slideId===n)||(r[0].slideId=n));let{slideIdToSettingIndexGetter:s,isSectionEmptyChecker:o}=function(t,e){let n=function(t){let e=new Set(t);return t=>{let{slideId:n}=t;return!(n&&e.has(n))}}(t),r=new Map;return e.forEach((t,e)=>{let i=t.slideId;if(void 0!==i){if(r.has(i)||n(t)){t.slideId=void 0;return}r.set(i,e)}}),{isSectionEmptyChecker:n,slideIdToSettingIndexGetter:t=>r.get(t)}}(t,a),l=[],h=0;t.forEach((t,e)=>{let n=s(t);if(void 0===n){if(!i)return;++i.contentLength;return}for(let t=h;t<n;++t)if(o(a[t])){l.push(i3(a[t],e));continue}h=Math.max(h,n),i=i3(a[n],e),l.push(i),++i.contentLength});for(let e=h+1;e<a.length;++e)l.push(i3(a[e],t.length));return l})((e=this.doc).queryAll("/slide_container/slide").map(t=>{let{node:e}=t;return e.getAttrValue("id")}),e.queryChildNode("settings",!0).getAttrValue("sections")??[]).find(e=>e.id===t);this.updateRelatedSection(n??null)}updateRelatedSection(t){if(!t){this.section&&(this.bias=this.section.dir,this.section=null);return}let e=this.getRange().$from.index(),n=t.indexStarted-e;0===n?this.section={id:t.id,dir:-1}:1===n?this.section={id:t.id,dir:1}:(this.section=null,this.bias=n>0?1:-1)}static checkNode(t){return!!(t.type.isLayout||t.type.isSlide)}static findNextSlide(t,e){return this.createResolved([t],!1,Object.assign(Object.create(null),e,{bias:-1}))}static findFirstSlide(t,e){return this.createResolved([t],!1,Object.assign(Object.create(null),e,{bias:1}))}static findLastSlide(t,e){return this.createResolved([t],!1,Object.assign(Object.create(null),e,{bias:1}))}}),iV.registerJSONType("slide_content",class extends i4{get isMultiSlideContentSelection(){return!0}get supportMulti(){return!1}get copyable(){return!1}eqType(t){return t.isMultiSlideSelection}});class i6 extends iX{get isMultiSlideContainerSelection(){return!0}get supportMulti(){return!1}get copyable(){return!1}static fromJSONSucc(t,e,n){let r=n[n.length-1];return this.checkSelectionAvailable(r)&&r.node.childCount?this.getSelectionType("slide").createResolved([r.$from.extendIndex([0])],!1,e.options):super.fromJSONSucc(t,e,n)}static checkNode(t){return!!t.type.isSlideContainer}static adaptResolvedPos(t){return(t=t.maybeShrink("SlideContainer"))?[t]:null}static createFailed(t,e){return iR.findNear(t).toMultiSelection(e)}}iV.registerJSONType("slide_container",i6);let i7=[i1,iY,iG,iH,iZ,iU,iz,iJ,i5,i4,i6,i$,iq];function i9(t,e){return(function(t){Array.isArray(t)&&(t=t[0]);for(let e=0;e<i7.length;++e)if(i7[e].checkSelectionAvailable(t))return i7[e];return iV})(t).createSelected([t],!0,e)}iR.prototype.toMultiSelection=function(t){return i9(this,t)},iV.fromRange=function(t,e){return i9(t,e)};class at{parse(t){return this._parse(t),{node:this.finish(null),custom:this.finishCustom()}}parseContext(t){this._parse(t);let e=Math.min(this.root.openDepth,this.top.depth),n=this.finish(e),r=this.sliceFrom,i=n.content.size-e,a=n.resolve(r);for(let t=a.depth;t>=0&&r<i&&r===a.end(t);--t)++r;return{slice:n.slice(r,i),custom:this.finishCustom()}}_parse(t){let e=this.controller.getBlockSelector();return e&&Array.prototype.slice.call(t.querySelectorAll(e)).forEach(function(t){let e=t.previousSibling,n=t.nextSibling;e&&(e2(e,"textblock")||e2(e,"list"))||t.parentNode.insertBefore(t.ownerDocument.createElement("p"),t),n&&(e2(n,"textblock")||e2(n,"list"))||t.parentNode.insertBefore(t.ownerDocument.createElement("p"),n)},this),this.addAll(t,null,this.options.start,this.options.end)}addElement(t){let e=t.nodeName.toLowerCase();(!this.options.editableContent||("br"!=e||"true"===t.parentNode.getAttribute("synobr")||t.nextSibling)&&"trailing-break"!==t.getAttribute("pm-ignore"))&&(this.getCustomParserManager().add(t,this),this.parseNodeType(t,e)||(this.top.type.isTextblock&&e2(t,"block")&&this.sync(this.top.prev),this.addElementContent(t)),this.getCustomParserManager().remove(t,this))}addElementContent(t){if(e2(t,"ignored"))return;let e=e2(t,"block")?this.top:null;this.addAll(t,e),e&&this.sync(e)}addAll(t,e,n,r){let i=n||0;for(let a=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];a!=s;a=a.nextSibling,++i)this.addDOM(a),e&&e2(a,"block")&&this.sync(e)}findPlace(t,e,n){let r,i;for(let n=this.top;;n=n.prev){let a=n.match.findWrapping(t,e);if(a&&(!r||r.length>a.length)&&(r=a,i=n,!a.length)||n.solid)break}return!!r&&(this.sync(i),r.forEach(t=>{let{type:e,attrs:n}=t;this._enter(e,e.parseAttrsFromParser(Object.assign(Object.create(null),n),this,this.options),!1,null,this.top.preserveWhitespace)}),!0)}addSucc(t,e){}open(t,e){let n=this.openLeft;return null==n&&(n=this.top.type.isTextblock&&t.isTextblock?1:0),n>0&&this.top.match.matchType(t,e)&&(n=0),this.openLeft=n,0===n||(--this.openLeft,!1)}openInsert(t,e,n,r){let i=this.insert(...arguments);return i&&(this.openLeft=0,this.addSucc(t,e)),i}insert(t,e,n,r){if(void 0===r&&(r=this.marks),!this.findPlace(t,e,r))return null;if(t.isText)return this.top.addText(n,r);{let i=t.maybeCreateChecked(e,n,r);return i?this.top.addNode(i):null}}openEnter(t,e,n){let r=null;return this.open(t,e)&&(r=this.enter(...arguments),!r)?null:(this.addSucc(t,e),r)}enter(t,e,n){return this.findPlace(t,e,this.marks)?this._enter(t,e,!0,null,n):null}_enter(t,e,n,r,i){let a=this.top.start(t,e,n,r,i);return a&&this.sync(a),a}leave(){this.top=this.top.prev}sync(t){for(;t&&t.isClosed();)t=t.prev;for(;;){for(let e=t;e;e=e.prev)if(e==this.top){this.top=t;return}this.leave()}}}class ae{constructor(t=m){this.parsers=t,this.parsersList=Object.entries(t).filter(t=>!!t[1])}getParsersList(){return this.parsersList}getParser(t){return this.parsers[t]||null}init(t,e,n){this.getParsersList().forEach(r=>{let[i,a]=r;a.init&&a.init(t,e,n[i]||m)})}add(t,e){this.getParsersList().forEach(n=>{let[r,i]=n;i.add&&i.add(t,e)})}remove(t,e){this.getParsersList().forEach(n=>{let[r,i]=n;i.remove&&i.remove(t,e)})}finish(t,e,n){return this.getParsersList().forEach(r=>{let[i,a]=r;a.finish&&(t=a.finish(t,e,n))}),t}finishCustom(t){return this.getParsersList().reduce((e,n)=>{let[r,i]=n;return i.finishCustom&&(e[r]=i.finishCustom(t)),e},Object.create(null))}}function an(t){return t instanceof rV&&t.type.isText&&/\s+$/.test(t.text)}class ar{constructor(t,e,n,r,i,a,s){this.type=t,this.match=i||t.contentExpr.start(e),this.solid=n,this.content=[],this.prev=r,this.openChild=null,this.preserveWhitespace=a,this.options=s||r&&r.options,this.closed=!1}get attrs(){return this.match.attrs}isClosed(){return this.closed}assertOpened(){if(this.isClosed())throw Error("Current NodeBuilder is already closed.")}add(t,e,n,r){return t.isText?this.addText(n,r):this.addNode(t.create(e,n,r))}addText(t,e){if(!this.preserveWhitespace){t=t.replace(/\s+/g," ");let e=/^\s/.exec(t);if(e){let n=this.content[this.content.length-1];(!n||an(n))&&(t=t.slice(e[0].length))}}return t?this.addNode(this.type.schema.text(t,e)):null}addNode(t){this.assertOpened();let e=this.match.matchNode(t);return(!e&&(t=function(t,e){let n=t.marks,r=n.length;return 0===r||(n=n.filter(t=>e.allowsMark(t.type))).length===r?null:t.mark(n)}(t,this.match))&&(e=this.match.matchNode(t)),e)?(this.closeChild(),this.content.push(t),this.match=e,t):null}start(t,e,n,r,i){this.assertOpened();let a=this.match.matchType(t,e);return a?(this.closeChild(),this.match=a,this.openChild=new ar(t,e,n,this,r,i,this.options)):null}closeChild(t){let e=this.openChild;e&&(this.openChild=null,e.close(t&&t-1),this.content.push(e))}close(t){this.isClosed()||(this.closed=!0,this.closeChild(t))}finish(t){this.close(t);let e=t&&t-1,n=this.content.map(t=>(t instanceof ar&&(t=t.finish(e)),t));if(this.content=null,!this.preserveWhitespace){let t=n.length-1,e=n[t];e&&an(e)&&(n[t]=e.copyWithText(e.text.trimEnd()))}return n=rn.from(n),t||(n=n.append(this.match.fillBefore(rn.empty,!0))),this.type.createFromDOM(this.match.attrs,n,null,this.options)}get depth(){let t=0;for(let e=this.prev;e;e=e.prev)t++;return t}get openDepth(){let t=0;for(let e=this.openChild;e;e=e.openChild)t++;return t}}class ai extends at{constructor(t,e,n=Object.create(null)){super(),this.controller=t,this.options=n,this.schema=t.schema,this.customParser=new ae({...this.schema.createCustomParsers(),...n.parsers}),this.breakTextblockWithBr=n.breakTextblockWithBr??!1,this.marks=n.marks||nK.none,this.blockMarks=n.blockMarks||nK.none,({top:this.top,root:this.root,sliceFrom:this.sliceFrom,openLeft:this.openLeft}=this.initNodeBuilder(e)),n.state=n.parser=this,n.target=n.target||"clipboard",this.getCustomParserManager().init(this,e instanceof n5?e:null,n.parserOptions||m)}initNodeBuilder(t){return t instanceof n5?this.initFromResolvedPos(t):t instanceof rV?this.initFromNode(t):this.initFromNodeType(t||this.schema.nodeType("doc"))}initFromNodeType(t,e){let{options:n}=this,r=new ar(t,e||null,!0,null,null,n.preserveWhitespace,n);return{root:r,top:r,sliceFrom:0,openLeft:r.type.is("RootType")?0:n.openLeft}}initFromNode(t){return this.initFromNodeType(t.type,t.attrs)}initFromResolvedPos(t){let{options:e}=this,n=!!e.preserveWhitespace,r=t.depth,i=0,a=null,s=null;for(let o=0;o<=r;++o){let r=t.node(o),l=r.contentMatchAt(t.index(o));s=s?s.start(r.type,r.attrs,r.type.unbreakable,l,n):new ar(r.type,r.attrs,!0,null,l,n,e),(!a||r.type.unbreakable)&&(a=s,i=o)}if(!a||!s)throw Error("No valid root NodeBuilder.");return{root:a,top:s,sliceFrom:r-i,openLeft:a.type.is("RootType")?0:e.openLeft}}getCustomParserManager(){return this.customParser}getCustomParser(t){return this.getCustomParserManager().getParser(t)}getParser(t){return this.getCustomParser(t)}parseNodeType(t){if(this.breakTextblockWithBr&&"br"===t.nodeName.toLowerCase()){let t,e=this.top;return e.type.is("Textblock")?(t={type:e.type,attrs:e.type.computeCopyableAttrValues(e.attrs),content:null},this.sync(e.prev)):t={type:this.schema.getDefaultTextblockType(),attrs:null,content:null},this.openEnter(t.type,t.attrs,this.top.preserveWhitespace),!0}{let e=this.controller.matchNode(t,this.options);if(!e)return!1;let{type:n,attrs:r,content:i}=e;if(i||n.isLeaf)this.openInsert(n,r,i);else{let e=this.openEnter(n,r,this.top.preserveWhitespace);this.addAll(t,e),e&&this.sync(e.prev)}return!0}}parseMarks(t){let e=this.controller.matchMarks(t,this.options);this.marks=nK.mergeSet(this.marks,e)}parseBlockMarks(t){let e=this.controller.matchBlockMarks(t,this.options);this.blockMarks=nK.mergeSet(this.blockMarks,e)}finish(t){return this.getCustomParserManager().finish(this.root.finish(t),this.sliceFrom,this)}finishCustom(){return this.getCustomParserManager().finishCustom(this)}addDOM(t){if(eH(t))this.addText(t);else if(eG(t)){let e=t.getAttribute("pm-ignore");if(e)"self"===e&&this.addElementContent(t);else{let e=this.marks,n=this.blockMarks;this.parseMarks(t),this.parseBlockMarks(t),this.addElement(t),this.blockMarks=n,this.marks=e}}}addText(t){var e,n,r;let i=ed(t.data.replace(/\t/g,"    ").replace((n="newLine",Object.prototype.hasOwnProperty.call(tW,n)?tW[n]:void 0)," "));!i||!this.top.type.isTextblock&&(r=es("asciiWhitespace"),Array.prototype.every.call(i,t=>er(r,t)))||this.openInsert(this.schema.nodeType("text"),null,i)}addMarks(t){this.marks=nK.mergeSet(this.marks,t)}getMarks(){return this.marks}getMark(t,e){let n=this.schema.maybeMarkType(t)??this.schema.maybeAttrMarkType(t);if(!n)return null;let r=n.is("Block")?this.blockMarks:this.marks;if(!r.length)return null;let i=n.findFromSet(r);if(!i)return null;if(e){let t=n.removeFromSet(r);n.is("Block")?this.blockMarks=t:this.marks=t}return i}getMarkValue(t,e){let n=this.getMark(t,e);return n?n.getValue():null}}function aa(t,e){let n=e.matchDOMTag;n&&P(n,(n,r)=>{t.push({type:e,selector:r,value:n})})}function as(t,e){let n=e.matchDOMStyle;n&&P(n,(n,r)=>{t.push({type:e,style:r,value:n})})}class ao{constructor(t){this.schema=t,this.schemaMatchSpec=function(t){let e=[],n=[],r=[],i=[],a=[],s="",o=t.nodes;for(let t in o){let n=o[t],r=e.length;aa(e,n);let i=e.length;if(r!==i){let t=n.group;if(t&&(t.indexOf("block")>=0||t.indexOf("first_level_block")>=0)&&0>t.indexOf("basic_block"))for(let t=r;t<i;++t)s&&(s+=", "),s+=e[t].selector}}let l=t.marks;for(let t in l){let e=l[t];aa(n,e),as(r,e)}let h=t.attr_marks;for(let t in h){let e=h[t];aa(i,e),as(a,e)}return{nodeDomMatches:e,markDomMatches:n,markCssMatches:r,blockMarkDomMatches:i,blockMarkCssMatches:a,blockSelector:s}}(t)}parse(t,e,n){return new ai(this,e||null,n).parse(t)}parseContext(t,e,n){return new ai(this,e,n).parseContext(t)}getBlockSelector(){return this.schemaMatchSpec.blockSelector}matchNodeDom(t,e,n){let r,i;if(!e.matches(t.selector))return null;let a=null,s=t.value;if(s instanceof Function){let t=s(e,n);if(!1===t)return null;a=t}else a=s;return Array.isArray(a)?[r,i]=a:(r=a,i=null),{type:t.type,attrs:r,content:i}}matchNode(t,e){let n=this.schemaMatchSpec.nodeDomMatches;for(let r=0,i=n.length;r<i;++r){let i=this.matchNodeDom(n[r],t,e);if(i)return i}return null}matchMarkStyle(t,e,n){let r=e.style.getPropertyValue(t.style);if(!r)return null;let i=null,a=t.value;if(a instanceof Function){let t=a(r,e,n);if(!1===t)return null;i=t}else i=a;return t.type.create(i)}matchMarkDom(t,e,n){if(!e.matches(t.selector))return null;let r=null,i=t.value;if(i instanceof Function){let t=i(e,n);if(!1===t)return null;r=t}else r=i;return t.type.create(r)}_matchMarks(t,e,n,r){let i=[];for(let e=0,a=t.length;e<a;++e){let a=this.matchMarkDom(t[e],n,r);a&&i.push(a)}for(let t=0,a=e.length;t<a;++t){let a=this.matchMarkStyle(e[t],n,r);a&&i.push(a)}return i}matchMarks(t,e){let n=this.schemaMatchSpec;return this._matchMarks(n.markDomMatches,n.markCssMatches,t,e)}matchBlockMarks(t,e){let n=this.schemaMatchSpec;return this._matchMarks(n.blockMarkDomMatches,n.blockMarkCssMatches,t,e)}}class al{constructor(t=Object.create(null)){null==t.target&&(t.target="general"),this.options=t,this.target=t.target,this.doc=re(t),this.overrideChildContainer=t.overrideChildContainer,this.filterContentProgressiveRenderable=nW.ensureFilter(t.filterContentProgressiveRenderable),this.renderInlineFlat=t.renderInlineFlat??!0,this.listCountMap=void 0}getTarget(){return this.target}isTarget(t){return this.constructor.isTargetMatch(this.getTarget(),t)}onChildContainer(t,e){this.options.onChildContainer?.(t,e)}onRender(t,e,n,r){let{onRender:i,onAfterRender:a}=this.options;return i&&(e=i(t,e,n,r,this)),t.is("Inline")&&(e=this.wrapInline(t,e)),a&&a(t,e,n,r,this),e}onChange(t,e,n,r,i){let{onChange:a}=this.options;a&&a(t,e,n,r,i,this)}onAfterChildRender(t,e,n,r){let{onAfterChildRender:i,renderInlineFlat:a}=this.options;i&&i(t,e,n,r,this),"function"==typeof a&&t.is("Inline")&&a(t,e,n,r,this.options.ranges)}onMarkRender(t,e){let{onMarkRender:n}=this.options;n&&n(t,e,this)}renderStructure(t){if(!t){if(this.isTarget("display"))throw RangeError("Given render structure should exist.");return null}let e=null,n=na(t,this.doc,(t,n,r,i)=>{if(e)throw RangeError("Each structure must have at most one content hole.");if(e=t,r<n.length-1||r>i)throw RangeError("Content hole must be the only child of its parent node.")});return e&&this.onChildContainer(e,n),{dom:n,childContainer:e}}renderNodeStructure(t){let e=this.renderStructure(t.type.toDOM(t,this.options));if(!e)return null;if(this.isTarget("display")){let n=!t.is("Leaf");if(!!e.childContainer!==n)throw Error(`The render result must match the content expression in node ${t.name}.`)}return e}renderMarkStructure(t){let e=this.renderStructure(t.type.toDOM(t,this.options));if(!e)return null;if(e.childContainer)throw Error(`There must not be child container in the render result of mark ${t.name}.`);return e}*renderNode(t,e,n,r){let i=this.doRenderNode(t,n,r),{done:a,value:s}=i.next();if(a||!s.dom){yield{node:t,dom:null,pos:n,size:t.nodeSize},yield*i;return}let o=s.dom;e.appendChild(o),this.onChange(t,o,n,r,null);let l=s.size;if(l===t.nodeSize)this.onAfterChildRender(t,o,n,r),yield s,yield*i;else for(yield s;;){let{done:e,value:a}=i.next();if(e)break;a.dom&&this.onChange(t,o,n,r,{node:a.node,dom:a.dom,pos:a.pos,offset:a.pos-n-1}),(l+=a.size)===t.nodeSize&&this.onAfterChildRender(t,o,n,r),yield a}}*doRenderNode(t,e,n){return t.is("Text")?yield*this.doRenderTextNode(t,e,n):yield*this.doRenderNonTextNode(t,e,n)}*doRenderTextNode(t,e,n){let r,i=this.renderNodeStructure(t);if(!i)return void(yield{node:t,dom:null,pos:e,size:t.nodeSize});let{dom:a}=i;if(eH(a))(r=this.doc.createElement("span")).appendChild(a);else{if(!eG(a))throw Error("The render result of `TextNode` must be `Text` or `Element`.");r=a}r=this.onRender(t,r,e,n),yield{node:t,dom:r,pos:e,size:t.nodeSize}}*doRenderNonTextNode(t,e,n){let r=this.renderNodeStructure(t);if(!r)return void(yield{node:t,dom:null,pos:e,size:t.nodeSize});let{dom:i,childContainer:a}=r;if(!eG(i))throw Error(`The render result of non-text node ${t.name} must be \`Element\`.`);let s=this.onRender(t,i,e,n),o=t.selfSize;if(a){let n=this.renderFragment(t.content,()=>this.getChildContainer(t,i,a),e+1);if(!this.isContentProgressiveRenderable(t))for(let e=0,r=t.childCount;e<r;++e){let{done:t,value:e}=n.next();if(t)break;o+=e.size}yield{node:t,dom:s,pos:e,size:o},yield*n}else yield{node:t,dom:s,pos:e,size:o}}getChildContainer(t,e,n){return this.overrideChildContainer?this.overrideChildContainer.call(null,t,e,n):n}isContentProgressiveRenderable(t){return!(t.type.isLeaf||t.is("RootType"))&&this.filterContentProgressiveRenderable.call(null,t)}wrapInline(t,e){return this.renderInlineFlat&&(e=this.wrapInlineMarksFlat(e,t.marks)),t.type.is("Drawing")&&"break"===t.attrs.config.alignment||(e=this.wrapInlineSpan(e,t)),e}wrapInlineMarksFlat(t,e){for(let n=e.length-1;n>=0;--n){let r=this.renderMark(e[n]);r&&((e4(r)||r).appendChild(t),t=r)}return t}wrapInlineSpan(t,e){let n=this.doc.createElement("span");return n.appendChild(t),n}*renderFragment(t,e,n){if(t.isEmpty())return;let r="function"==typeof e?e:()=>e;return t.child(0).is("Inline")?this.renderInlineFlat?yield*this.renderFragmentInlineFlat(t,r,n):yield*this.renderFragmentInline(t,r,n):yield*this.renderFragmentBlocks(t,r,n)}*renderFragmentBlocks(t,e,n){let r=null,i=[];return yield*this.doRenderFragmentBy(t,n,t=>{if(this.isTarget("clipboard"))if(t.type.is("ListBlock")&&t.type.isValidListBlock(t)){let n=t.getAttrValue("listId")??"",a=t.getAttrValue("listLevel")??0;n!==r&&(r=n,i.length=0);let s=this.listCountMap||(this.listCountMap=Object.create(null)),o=s[n]||(s[n]=[]),l=i.length-1;if(l<a){let n=i.at(-1)??e();for(let e=l+1;e<=a;++e){let r=this.renderStructure(t.type.getPseudoListType().toDOM(t,{...this.options,list_level:e,list_index:o[e]||0}));if(!r||!r.childContainer)throw Error("The render result of `PseudoListType` must be `Element`.");n.appendChild(r.dom),n=r.childContainer,i.push(r.childContainer)}}else l>a&&(i.length=a+1);o[a]=(o[a]||0)+1}else r=null,i.length=0;return i.length?i[i.length-1]:e()})}*renderFragmentInlineFlat(t,e,n){return yield*this.doRenderFragmentBy(t,n,e)}*renderFragmentInline(t,e,n){let r=[],i=e();return yield*this.doRenderFragmentBy(t,n,t=>{let n=t.marks,a=0;for(let t=Math.min(r.length,n.length);a<t&&n[a].eq(r[a].mark);++a);r.length=a,i=a>0?r[a-1].childContainer:e();for(let t=a;t<n.length;++t){let e=n[t],a=this.renderMark(e);a&&(i.appendChild(a),i=e4(a)||a),r.push({mark:e,childContainer:i})}return i})}*doRenderFragmentBy(t,e,n){let r=[];for(let{node:i,offset:a,index:s}of t){let t=e+a,o=this.renderNode(i,n(i,a,s),t,a);r.push(o);let{done:l,value:h}=o.next();if(l||!h.dom){yield{node:i,dom:null,pos:t,size:i.nodeSize};continue}yield h}for(let t of r)yield*t}renderMark(t){if(this.isTarget("clipboard")&&!t.type.copyable||t.is("ToggleableCss")&&!t.getValue())return null;let e=this.renderMarkStructure(t)?.dom;if(!e)return null;if(!eG(e))throw Error("The render result of `Mark` must be `Element`.");return this.onMarkRender(t,e),e}static isTargetMatch(t,e){return"major"===e?"editor"===t||"viewer"===t:"minor"===e?"general"===t||"clipboard"===t:"display"===e?"editor"===t||"viewer"===t||"general"===t:t===e}static renderFragment(t,e,n){return new this(n).renderFragment(t,e,n?.pos??0)}static renderNode(t,e,n){return new this(n).renderNode(t,e,n?.pos??0,n?.offset??0)}}class ah{constructor(t){}*getFragmentGenerator(t,e,n){let r=al.renderFragment(t,e,n),i=n?.progressiveRenderContent??!1;for(let e=0,n=t.childCount;e<n;++e)r.next(),i&&(yield);i||(yield),yield*this.handleProgressiveGenerator(r,n)}*getNodeGenerator(t,e,n){let r=al.renderNode(t,e,n);r.next(),yield,yield*this.handleProgressiveGenerator(r,n)}ensureProgressiveStopChecker(t){if(!t)return M;if("function"==typeof t)return t;if("object"==typeof t){let{preset:e,value:n}=t;if("time"===e){let t=Date.now();return()=>{let e=Date.now();return!(e-t<n)&&(t=e,!0)}}if("size"===e){let t=0;return e=>{let{size:r}=e;return!((t+=r)<n)&&(t=0,!0)}}}return M}*handleProgressiveGenerator(t,e){let n=this.ensureProgressiveStopChecker(e?.progressiveStopThreshold);for(let e of t)n(e)&&(yield)}renderFragment(t,e){let n=re(e).createDocumentFragment(),r=al.renderFragment(t,n,e);for(;!r.next().done;);return n}renderNode(t,e){let n=re(e).createDocumentFragment(),r=al.renderNode(t,n,e);for(;!r.next().done;);return n}}class au extends iP{constructor(t,e=Object.create(null)){for(let n of(super(),this.rawSpec=t,this.spec=t=this.transformSpec(t),this.data=e,this.compile(),this.preset=t.preset??null,this.domParser=void 0,this.domRenderer=void 0,this.defaultContentStyles=void 0,this.cached=Object.create(null),this.getBindList())){let t=this[n];"function"==typeof t&&(this[n]=t.bind(this))}}getBindList(){return["node","text","mark","nodeFromJSON","nodesFromJSON","markFromJSON","marksFromJSON","nodeFrom","nodesFrom","markFrom","marksFrom"]}static mergeSpec(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t=Object.assign(Object.create(null),t),n.forEach(e=>{!function(t,e){var n,r,i,a,s,o,l;if(!e)return;let{name:h,version:u,nodes:c,groups:d,marks:p,attr_marks:g,preset:f,parsers:y}=e;n=t.name,t.name=null==h?n:"string"==typeof h?h:h(n),r=t.version,t.version=null==u?r:"number"==typeof u?u:u(r),i=t.nodes,t.nodes=c?G(c,(t,e,n)=>{"function"==typeof e&&(e=e(i[n]||null,i));let r=function(t,e){if(!e)return null;let n=G(e,(e,n,r)=>{var i;if((i=n)&&"function"==typeof i&&!(i===rW||i.prototype instanceof rW)){if(!t)throw Error(`Failed to merge ${r} in node item spec by function without base spec.`);n=n(t[r],t)}return null==n?delete e[r]:e[r]=n,e},{...t});if(!n.type)throw Error("Invalid schema node item spec without a node type.");return n}(t[n],e);return null==r?delete t[n]:t[n]=r,t},{...i}):i,a=t.groups,t.groups=d?G(d,(t,e,n)=>("function"==typeof e&&(e=e(a[n]||[],a)),null==e?delete t[n]:t[n]=e,t),{...a}):a,t.marks=iT(t.marks,p),t.attr_marks=iT(t.attr_marks,g),s=t.preset,t.preset=void 0===f?s:"function"==typeof f?t=>f(t,s??null):f,o=t.parsers,t.parsers=void 0===y?o:G(y,(t,e,n)=>(null==e?delete t[n]:t[n]=e,t),{...o}),l=t.getInitialSelection,t.getInitialSelection=e.getInitialSelection??l}(t,e)}),t}(t,...n)}transformSpec(t){return this.constructor.mergeSpec(t,{nodes:{doc:{type:e=>class extends e{get attrs(){return{...super.attrs,schema:nH.create({default:t.version})}}}}}})}getVersion(){return this.version}testVersion(t){return this.constructor.findSchemaVersion(t)===this.getVersion()}static findSchemaVersion(t){let e=t.attrs?.schema;return"number"==typeof e?e:-1}getPresetData(t,e){let n=function(t,e){let n;if(null==(n="function"==typeof e?e(t):e))return t.getRootType().createFilled();if("string"!=typeof n)return n;{let t=JSON.parse(n);if(!t||"object"!=typeof t)throw Error(`Given json string is invalid: ${n}`);return t}}(this,t);if(!this.testVersion(n))throw Error(`Mismatched schema version for preset data: ${this.constructor.findSchemaVersion(n)}, ${this.getVersion()}`);if(n instanceof rV)if("node"===e)return n;else return n.toJSON();return"node"===e?this.nodeFromJSON(n):n}getPreset(){return this.getPresetData(this.preset,"node")}getPresetJson(){return this.getPresetData(this.preset,"json")}getDomParser(){return this.domParser||(this.domParser=new ao(this))}createCustomParsers(){return F(this.parsers,t=>t(this))}getDomRenderer(){return this.domRenderer||(this.domRenderer=new ah(this))}copy(t,e){let n=this.constructor;return new n(n.mergeSpec(this.rawSpec,t),e)}setCache(t,e){this.cached[t]=e}getCache(t){return this.cached[t]}maybeNodeType(t){return this.nodes[t]??null}nodeType(t){let e=this.maybeNodeType(t);if(!e)throw RangeError(`Unknown node type: ${t}`);return e}getRootType(){return this.nodeType("doc")}getDefaultTextblockType(){let t=this.groups?.block;if(!t)throw RangeError("There is no block types.");let e=t.find(t=>t.is("Textblock"));if(!e)throw RangeError("There is no textblock types.");return e}*nodeTypes(){let t=this.nodes;for(let e in t)Object.hasOwn(t,e)&&(yield t[e])}maybeMarkType(t){return this.marks[t]??null}markType(t){let e=this.maybeMarkType(t);if(!e)throw RangeError(`Unknown mark type: ${t}`);return e}*markTypes(){let t=this.marks;for(let e in t)Object.hasOwn(t,e)&&(yield t[e])}mark(t,e){if("string"==typeof t)t=this.markType(t);else if(t instanceof r5){if(t.schema!==this)throw RangeError("Mark type from different schema used ("+t.name+")")}else throw RangeError("Invalid mark type: "+t);return t.create(e)}markFrom(t){return"string"==typeof t?this.markType(t).getPresetMark():t instanceof r5?t.getPresetMark():t instanceof nK?t:Array.isArray(t)?this.mark(t[0],t[1]):this.markFromJSON(t)}marksFrom(t){return nK.setFrom(t&&t.length?t.map(this.markFrom,this):null)}maybeAttrMarkType(t){return this.attr_marks[t]??null}attrMarkType(t){let e=this.maybeAttrMarkType(t);if(!e)throw RangeError(`Unknown attr mark type: ${t}`);return e}getInitialSelection(t){return this.spec.getInitialSelection?this.spec.getInitialSelection.call(null,t):iR.findAtStart(t,!0).toMultiSelection()}getDefaultContentStyles(){return this.defaultContentStyles||(this.defaultContentStyles=this.nodeType("doc").createDefaultContentStyles())}nodeFromJSON(t){return rV.fromJSON(this,t)}nodesFromJSON(t){return rn.fromJSON(this,t)}markFromJSON(t){return nK.fromJSON(this,t)}marksFromJSON(t){return nK.setFromJSON(this,t)}}let ac=new class{constructor(){this.arrow_size=12}createSvg(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return["svg",{"pointer-events":"none",fill:"none",stroke:"none","fill-rule":"evenodd",overflow:"visible",width:((t=Math.ceil(t))||1)+"px",height:((e=Math.ceil(e))||1)+"px",inline_style:{position:"absolute"}},...r]}createGroup(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return["g",...e]}createGroupWithAttrs(t){void 0===t&&(t={});for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return["g",t,...n]}createChartGroup(t,e){let n=["image",{preserveAspectRatio:"none",x:"0",y:"0",width:Math.abs(e.width)+"",height:Math.abs(e.height)+""}];return this.createGroup(n)}setupDefaultPathAttrs(t,e){return t.d=e,t}makePathAttrs(t,e){let n=K(t);return this.setupDefaultPathAttrs(n,e)}createPathsGroup(t,e,n,r){void 0===r&&(r={});let i=[];for(let r=0;r<e.length;++r){let a=e[r];if(!a.define)continue;let s=n.call(this,t,a);i.push(["path",s])}return this.createGroupWithAttrs(r,...i)}createTriggerGroup(t,e){return this.createPathsGroup(t,e,function(t,e){let n=this.makePathAttrs(t,e.define);return n.class="syno-o-slide-pm-svg-element-trigger",n.fill="none"===e.fill?"none":"#000000",n["fill-opacity"]="0",n.stroke="#000000",n["stroke-opacity"]="0",n["stroke-width"]="stroke-width"in n?Math.max(parseInt(n["stroke-width"]),10):10,n["stroke-dasharray"]=void 0,n},{"pointer-events":"visiblePainted"})}createPatternGroup(t,e,n){return t?this.createGroup(["pattern",{id:t,patternUnits:"userSpaceOnUse",patternContentUnits:"userSpaceOnUse",width:Math.abs(n.width)+"",height:Math.abs(n.height)+""},["image",{preserveAspectRatio:"none",x:"0",y:"0",width:Math.abs(n.width)+"",height:Math.abs(n.height)+""}]]):this.createGroup()}createShapeGroup(t,e,n,r){return this.createPathsGroup(t,e,function(t,e){let n=this.makePathAttrs(t,e.define);return r?n.fill="url(#"+r+")":"color"in e&&(n.fill=e.color),"stroke"in e&&!e.stroke&&(n.stroke="none"),n},n)}createShapeStrokeGroup(t,e){return"stroke-type"in t?this.createStrokeGroup(t,e):this.createGroup()}createStrokeGroup(t,e){return this.createPathsGroup(t,e,function(t,e){let n=this.makePathAttrs(t,e.define);return delete n.fill,delete n["fill-opacity"],n})}createLineGroup(t,e){return this.createPathsGroup(t,e,function(t,e){return this.makePathAttrs(t,e.define)})}createArrowGroup(t,e){return this.createPathsGroup(t,e,function(t,e){let n=this.makePathAttrs(t,e.define);return"color"in e?n.fill=e.color:n.fill=t.stroke,n["fill-opacity"]=t["stroke-opacity"],n["stroke-miterlimit"]=10,delete n["stroke-dasharray"],n})}createHighlightRect(t,e){return["rect",{rx:1,ry:1,fill:"none",stroke:"#000000","stroke-width":3}]}createHighlightRectGroup(t,e){return this.createGroup(this.createHighlightRect(t,e))}createDiv(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return["div",{inline_style:{position:"absolute"}},...e]}createNodeDiv(t){let e,n={class:t,inline_style:{position:"absolute",width:"0px",height:"0px"}};if(Array.isArray(arguments[1])||"object"!=typeof arguments[1])e=1;else{let t=arguments[1];t.inline_style&&(K(t.inline_style,n.inline_style),delete t.inline_style),K(t,n),e=2}let r=["div",n];for(let t=e,n=arguments.length;t<n;++t)r.push(arguments[t]);return r}createInstanceTextDiv(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return["div",{inline_style:{visibility:"hidden",position:"absolute",width:t.width+"px"}},...n]}createTriggerDiv(t,e){void 0===e&&(e={});for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return["div",{inline_style:K(e,{visibility:"hidden",position:"absolute",width:t.width+"px",height:t.height+"px"})},...r]}createIndicatorWrapper(t,e){return["div",{class:"ProseMirror-non-printable syno-o-pm-plugin-indicator-wrapper",inline_style:{position:"absolute",left:(t||0)+"px",top:(e||0)+"px"}}]}};var ad=n(93318);class ap{constructor(t,e,n){this.schema=t.type.schema,this.doc=t,this.commentStore=e,this._selection=null,this._multiSelection=null,this._storedMarks=null,this._cachedMarks=null,n&&this.select(n)}set comments(t){this.commentStore=t}get comments(){return this.commentStore}set comment_store(t){this.commentStore=t}get comment_store(){return this.commentStore}_setState(t,e,n,r){this.schema=t.type.schema,this.doc=t,this.commentStore=e,this.select(n,r)}setState(t,e,n){return this._setState(t,e,n,!1)}get selection(){return this._selection}get multiSelection(){return this._multiSelection}selectText(t,e,n){void 0===n&&(n=m);let r=iN.create(this.doc,t,e,!n.useFallbackSelection);if(!r)throw RangeError(`Setting text selection with invalid anchor ${t} and head ${e}.`);return this.select(r,n.preserveMarks)}selectNode(t,e){void 0===e&&(e=m);let n=iO.create(this.doc,t,null,!e.useFallbackSelection);if(!n)throw RangeError(`Setting node selection with invalid node position ${t}.`);return this.select(n,e.preserveMarks)}clearSelection(){this._select(null)}select(t,e){return void 0===e&&(e=!1),t&&(t.doc!==this.doc?ad.default.error("Try to select at a different root node."):(t instanceof iR&&(t=t.toMultiSelection()),this._select(t,e))),this}_select(t,e){void 0===e&&(e=!1),this._selection=t&&t.getRange(),this._multiSelection=t,e?this._cachedMarks=null:this.clearActiveMarks()}getStoredMarks(){return this._storedMarks}setStoredMarks(t){return this._storedMarks=t,t}clearStoredMarks(){this.setStoredMarks(null)}getActiveMarks(){let t=this.getStoredMarks()||this._cachedMarks;if(t)return t;let e=this.selection;return t=e&&e.is("Text")?e.getMarks():nK.none,this._cachedMarks=t}setActiveMarks(t){return this.setStoredMarks(nK.setFrom(t))}clearActiveMarks(){this.clearStoredMarks(),this._cachedMarks=null}addActiveMarks(t){let e=this.getActiveMarks();return t?(Array.isArray(t)||(t=[t]),this.setActiveMarks(t.reduce((t,e)=>e.addToSet(t),e))):e}removeActiveMarks(t){let e=this.getActiveMarks();return t?(Array.isArray(t)||(t=[t]),this.setActiveMarks(t.reduce((t,e)=>e.removeFromSet(t),e))):e}}function ag(t,e){let n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}let af=Math.PI/180,ay=180/Math.PI,ax={left:0,top:1,right:2,bottom:3},am=[3,12,48,192],av=[5,65,20,80],ab=Object.create(null);class aw{static createDefault(){return[1,0,0,1,0,0]}static createTranslate(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),[1,0,0,1,t,e]}static createRotate(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0);let r=t*af,i=Math.sin(r),a=Math.cos(r);return[a,i,-i,a,-e*a+n*i+e,-e*i-n*a+n]}static createScale(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),[t,0,0,e,n*(1-t),r*(1-e)]}static createFlip(t,e,n,r){return void 0===e&&(e=t),void 0===n&&(n=0),void 0===r&&(r=0),this.createScale(Math.sign(t),Math.sign(e),n,r)}static createSkewY(t,e){void 0===e&&(e=0);let n=Math.tan(t*af);return[1,n,0,1,0,-e*n]}static apply(t,e){let n=t.x,r=t.y;return t.x=e[0]*n+e[2]*r+e[4],t.y=e[1]*n+e[3]*r+e[5],t}static applyNoTranslate(t,e){let n=t.x,r=t.y;return t.x=e[0]*n+e[2]*r,t.y=e[1]*n+e[3]*r,t}static applyTranslate(t,e,n){return t.x+=e,t.y+=n,t}static applyRotate(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),this.apply(t,this.createRotate(e,n,r))}static applyScale(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.apply(t,this.createScale(e,n,r,i))}static applyFlip(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.apply(t,this.createFlip(e,n,r,i))}static applySkewY(t,e,n){return void 0===n&&(n=0),this.apply(t,this.createSkewY(e,n))}static reverse(t){let e=1/(t[0]*t[3]-t[1]*t[2]),n=t[0]*e,r=t[1]*e,i=t[2]*e,a=t[3]*e,s=t[4],o=t[5];return[a,-r,-i,n,i*o-a*s,r*s-n*o]}static multiply2(t,e){let n=[];return n.push(t[0]*e[0]+t[2]*e[1]),n.push(t[1]*e[0]+t[3]*e[1]),n.push(t[0]*e[2]+t[2]*e[3]),n.push(t[1]*e[2]+t[3]*e[3]),n.push(t[0]*e[4]+t[2]*e[5]+t[4]),n.push(t[1]*e[4]+t[3]*e[5]+t[5]),n}static multiply(){let t=arguments[0];for(let e=1;e<arguments.length;++e)t=this.multiply2(t,arguments[e]);return t}static translate(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.multiply(t,this.createTranslate(e,n))}static rotate(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),this.multiply(t,this.createRotate(e,n,r))}static scale(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.multiply(t,this.createScale(e,n,r,i))}static flip(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.multiply(t,this.createFlip(e,n,r,i))}static skewY(t,e,n){return void 0===n&&(n=0),this.multiply(t,this.createSkewY(e,n))}static prependTranslate(t,e,n){return this.multiply(this.createTranslate(e,n),t)}static prependRotate(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),this.multiply(this.createRotate(e,n,r),t)}static prependScale(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.multiply(this.createScale(e,n,r,i),t)}static prependFlip(t,e,n,r,i){return void 0===n&&(n=e),void 0===r&&(r=0),void 0===i&&(i=0),this.multiply(this.createFlip(e,n,r,i),t)}static prependSkewY(t,e,n){return void 0===n&&(n=0),this.multiply(this.createSkewY(e,n),t)}static fromTransform(t){if(!t)return null;let e=t.deg?t.deg*af:0,n=t.skewY?t.skewY*af:0,r=Math.sin(e),i=Math.cos(e),a=Math.tan(n),s=t.width?Math.sign(t.width):1,o=t.height?Math.sign(t.height):1;return[s*(i-r*a),s*(r+i*a),-o*r,o*i,t.left||0,t.top||0]}static toMatrixStr(t){return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"}static transformToMatrixStr(t){return this.toMatrixStr(this.fromTransform(t))}}class aM{static get prop_list(){return["left","top","width","height","deg","skewY"]}static getAttrs(t){let e;void 0===t&&(t=ab);let n=this.prop_list,r=Object.create(null);for(let i=n.length-1;i>=0;--i){let a=n[i],s=t[a];null==s&&(e||(e=this.createDefault()),s=e[a]),r[a]=new nH({default:s})}return r}static getImageAttrs(t){let e;void 0===t&&(t=ab);let n=this.prop_list,r=Object.create(null);for(let i=n.length-1;i>=0;--i){let a=n[i],s=t[a];null==s&&(e||(e=this.createImageDefault()),s=e[a]),r[a]=new nH({default:s})}return r}static createDefault(){return{left:0,top:0,width:100,height:100,deg:0,skewY:0}}static createImageDefault(){return{left:0,top:0,width:1,height:1,deg:0,skewY:0}}static createImageCenter(t,e){let n=t.width?e.width/t.width:0,r=t.height?e.height/t.height:0;return{left:(1-n)/2,top:(1-r)/2,width:n,height:r,deg:0,skewY:0}}static createFilled(t){return K(t,this.createDefault(),!1,this.prop_list)}static createImageFilled(t){return K(t,this.createImageDefault(),!1,this.prop_list)}static _createFilledFromArray(t,e){let n=this.prop_list,r=Math.min(n.length,t.length);for(let i=0;i<r;++i)e[n[i]]=t[i];return e}static createFilledFromArray(t){return this._createFilledFromArray(t,this.createDefault())}static createImageFilledFromArray(t){return this._createFilledFromArray(t,this.createImageFilled())}static copy(t,e){return t&&(t=K(t,null,!1,this.prop_list),e&&(t=K(e,t,!1,this.prop_list))),t}static _compare(t,e,n){return this._compareCoords(t,e,n)&&this._compareShape(t,e,n)}static compare(t,e,n){return t===e||this._compare(t,e,n)}static _compareShape(t,e,n){return!R(t.skewY,e.skewY)&&(!R(t.deg,e.deg)&&!R(t.width,e.width)&&!R(t.height,e.height)||!n&&!R(this.ensureDeg(t.deg+180),e.deg)&&!R(-t.width,e.width)&&!R(-t.height,e.height))}static compareShape(t,e,n){return t===e||this._compareShape(t,e,n)}static _compareCoords(t,e,n){return!R(t.left,e.left)&&!R(t.top,e.top)}static compareCoords(t,e,n){return t===e||this._compareCoords(t,e,n)}static _compareSize(t,e,n){return!R(t.width,e.width)&&!R(t.height,e.height)||!n&&!R(-t.width,e.width)&&!R(-t.height,e.height)}static compareSize(t,e,n){return t===e||this._compareSize(t,e,n)}static _compareDeg(t,e,n){return!R(this.getTrueDeg(t),this.getTrueDeg(e))}static compareDeg(t,e,n){return t===e||this._compareDeg(t,e,n)}static add(t,e){return t?e?(t=this.copy(t),this.addTranslate(t,e.left,e.top),this.addScale(t,e.width,e.height),this.addRotate(t,e.deg),this.addSkewY(t,e.skewY),t):this.copy(t):this.copy(e)}static addTranslate(t,e,n){return t.left+=e||0,t.top+=n||0,t}static addScale(t,e,n){return null!=e&&(t.width=e*Math.sign(t.width)),null!=n&&(t.height=n*Math.sign(t.height)),t}static addFlip(t,e,n){return null!=e&&(t.width*=Math.sign(e)),null!=n&&(t.height*=Math.sign(n)),t}static addRotate(t,e){return e&&(t.deg=this.ensureDeg(t.deg+e)),t}static addSkewY(t,e){return e&&(t.skewY=this.ensureSkew(t.skewY+e)),t}static merge(t,e,n,r){if(!t)return this.copy(e);if(!e)return this.copy(t);let i=Object.create(null);n||(n=aw.fromTransform(t)),r||(r=aw.fromTransform(e));let a=aw.multiply(n,r);return this.mergeMove(i,a,0,0),this.mergeResize(i,t,e),this.mergeRotateSkew(i,a),i}static split(t,e,n,r){if(!t)return this.copy(e);if(!e)return aM.createDefault();let i=Object.create(null);n||(n=aw.fromTransform(t)),r||(r=aw.fromTransform(e));let a=aw.multiply(aw.reverse(n),r);return this.mergeMove(i,a,0,0),this.mergeResize(i,t,e),this.mergeRotateSkew(i,a),i}static mergeMove(t,e,n,r){let i=aw.apply({x:n,y:r},e);return t.left=i.x,t.top=i.y,t}static mergeResize(t,e,n){return t.width=Math.abs(null!=n.width?n.width:e.width),t.height=Math.abs(null!=n.height?n.height:e.height),t}static mergeRotateSkew(t,e){let n=aw.applyNoTranslate({x:1,y:0},e),r=aw.applyNoTranslate({x:0,y:1},e);return this.setDegSkewFromPos(t,n,r)}static setDegSkewFromPos(t,e,n,r){let i,a;void 0===r&&(r={x:0,y:0});let s=e.x-r.x,o=e.y-r.y,l=n.x-r.x,h=n.y-r.y;(s||o)&&(i=Math.atan2(o,s)*ay+90),(l||h)&&(a=Math.atan2(h,l)*ay+90),null==i&&null==a?(i=90,a=180):null==i?i=a-90:null==a&&(a=i+90);let u=this.ensureDeg(a-i);return u>180&&(u-=180,t.width*=-1),t.deg=this.ensureDeg(a+180),t.skewY=90-u,t}static applyMatrix(t,e,n){n||(n=aw.fromTransform(e)),t=aw.multiply(t,n);let r=Math.abs(e.width),i=Math.abs(e.height),a=aw.apply({x:0,y:0},t),s=aw.apply({x:r,y:0},t),o=aw.apply({x:0,y:i},t),l=Object.create(null);return l.left=a.x,l.top=a.y,l.width=ag(a,s),l.height=ag(a,o),this.setDegSkewFromPos(l,s,o,a),l.width*=Math.cos(l.skewY*af),l}static getScaleAppliedMatrix(t,e){return aw.multiply(e,aw.createScale(t.x,t.y),aw.reverse(e))}static getCenterPos(t,e){return void 0===e&&(e=aw.fromTransform(t)),aw.apply({x:Math.abs(t.width)/2,y:Math.abs(t.height)/2},e)}static getTopLeftPos(t,e){return void 0===e&&(e=aw.fromTransform(t)),aw.apply({x:0,y:0},e)}static getBottomRightPos(t,e){return void 0===e&&(e=aw.fromTransform(t)),aw.apply({x:Math.abs(t.width),y:Math.abs(t.height)},e)}static translate(t,e,n){return this.addTranslate(this.copy(t),e,n)}static rotate(t,e,n,r,i){return void 0===r&&(r=0),void 0===i&&(i=0),this.applyMatrix(aw.createRotate(n,r,i),t,e)}static rotateCenter(t,e,n){e||(e=aw.fromTransform(t));let r=this.getCenterPos(t,e);return this.rotate(t,e,n,r.x,r.y)}static scale(t,e,n,r,i,a){return void 0===r&&(r=n),void 0===i&&(i=0),void 0===a&&(a=0),this.applyMatrix(aw.createScale(n,r,i,a),t,e)}static scaleCenter(t,e,n,r){void 0===r&&(r=n),e||(e=aw.fromTransform(t));let i=this.getCenterPos(t,e);return this.scale(t,e,n,r,i.x,i.y)}static flip(t,e,n,r,i,a){return void 0===r&&(r=n),void 0===i&&(i=0),void 0===a&&(a=0),this.scale(t,e,Math.sign(n),Math.sign(r),i,a)}static flipCenter(t,e,n,r){return void 0===r&&(r=n),this.scaleCenter(t,e,Math.sign(n),Math.sign(r))}static skewY(t,e,n,r){return void 0===r&&(r=0),this.applyMatrix(aw.createSkewY(n,r),t,e)}static skewYCenter(t,e,n){e||(e=aw.fromTransform(t));let r=this.getCenterPos(t,e);return this.skewY(t,e,n,r.x)}static getScale(t,e){return{x:null!=e.width&&t.width?Math.abs(e.width/t.width):1,y:null!=e.height&&t.height?Math.abs(e.height/t.height):1}}static getTrueDeg(t){return t.height>0?t.deg:this.ensureDeg(t.deg+180)}static ensureDeg(t){return D(t,360)}static ensureSkew(t){return t>=-90&&t<=90?t:D(t+90,180)-90}static fixDegForLine(t,e,n){void 0===n&&(n=!0),n&&(t=K(t)),e||(e=this.getMatrix(t));let{x1:r,y1:i}=aw.apply({x:0,y:0},e),{x2:a,y2:s}=aw.apply({x:Math.abs(t.width),y:Math.abs(t.height)},e);return t.left=r,t.top=i,t.width=a-r,t.height=s-i,t.deg=0,t.skewY=0,t}static fromImageTransform(t,e){let n=Math.abs(t.width),r=Math.abs(t.height),i=this.copy(e);return i.left*=n,i.top*=r,i.width*=n,i.height*=r,i}static toImageTransform(t,e){let n=1/Math.abs(t.width),r=1/Math.abs(t.height),i=this.copy(e);return i.left*=n,i.top*=r,i.width*=n,i.height*=r,i}static getMatrix(t){return aw.fromTransform(t)}static matrixToStr(t){return aw.toMatrixStr(t)}static getMatrixStr(t){return aw.transformToMatrixStr(t)}static fromBoundingBox(t){let e=this.createFilled(t);return e.width=t.right-t.left,e.height=t.bottom-t.top,e}}class a_{static get prop_list(){return["left","top","right","bottom"]}static createDefault(){return{left:0,top:0,right:0,bottom:0}}static createSmallest(){return{left:1/0,top:1/0,right:-1/0,bottom:-1/0}}static createFilled(t){return K(t,this.createDefault(),!1,this.prop_list)}static copy(t){return t&&K(t,null,!1,this.prop_list)}static ensure(t){let e,n="left_source"in t;return t.left>t.right&&(e=t.left,t.left=t.right,t.right=e,n&&(e=t.left_source,t.left_source=t.right_source,t.right_source=e)),t.top>t.bottom&&(e=t.top,t.top=t.bottom,t.bottom=e,n&&(e=t.top_source,t.top_source=t.bottom_source,t.bottom_source=e)),t}static expand2(t,e){return e&&(t.left=Math.min(t.left,e.left),t.top=Math.min(t.top,e.top),t.right=Math.max(t.right,e.right),t.bottom=Math.max(t.bottom,e.bottom)),t}static expand(t,e,n){return(void 0===n&&(n=b),e)?t?(e.left<t.left&&(t.left=e.left,n("left",t,e)),e.top<t.top&&(t.top=e.top,n("top",t,e)),e.right>t.right&&(t.right=e.right,n("right",t,e)),e.bottom>t.bottom&&(t.bottom=e.bottom,n("bottom",t,e)),t):e:t}static expandFromGetter(t,e,n,r){return this.expand(t,n(e),r)}static expandFromTransform(t,e,n,r){return void 0===n&&(n=aw.fromTransform(e)),this.expand(t,this.fromTransform(e,n),r)}static expandFromNode(t,e,n){return this.expandFromTransform(t,e.type.getAbsTransform(e),e.type.getAbsMatrix(e),n)}static expandFromNodeGetter(t,e,n,r){return this.expandFromNode(t,n(e),r)}static expandFromResolvedPos(t,e,n){return this.expandFromNode(t,e.self,n)}static fromArray(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];let a=this.createSmallest();for(let n=0;n<t.length;++n)e(a,t[n],...r);return a}static fromBoundingArray(t,e){return this.fromArray(t,this.expand.bind(this),e)}static fromGetterArray(t,e,n){return this.fromArray(t,this.expandFromGetter.bind(this),e,n)}static fromNodeArray(t,e){return this.fromArray(t,this.expandFromNode.bind(this),e)}static fromNodeGetterArray(t,e,n){return this.fromArray(t,this.expandFromNodeGetter.bind(this),e,n)}static fromResolvedPosArray(t,e){return this.fromArray(t,this.expandFromResolvedPos.bind(this),e)}static fromMap(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];let a=this.createSmallest();for(let n in t)t.hasOwnProperty(n)&&e(a,t[n],...r);return a}static fromBoundingMap(t,e){return this.fromArray(t,this.expand.bind(this),e)}static fromGetterMap(t,e,n){return this.fromMap(t,this.expandFromGetter.bind(this),e,n)}static fromNodeMap(t,e){return this.fromMap(t,this.expandFromNode.bind(this),e)}static fromNodeGetterMap(t,e,n){return this.fromArray(t,this.expandFromNodeGetter.bind(this),e,n)}static fromResolvedPosMap(t,e){return this.fromMap(t,this.expandFromResolvedPos.bind(this),e)}static getIntersection(t,e){let n={left:Math.max(t.left,e.left),top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom)};return n.left<=n.right&&n.top<=n.bottom?n:null}static getEdgeResult(t,e){return{left:R(t.left,e.left),top:R(t.top,e.top),right:R(t.right,e.right),bottom:R(t.bottom,e.bottom)}}static recoverSource(t,e){let n=ax[e];return(t&am[n])>>(n<<1)}static fromSizeAndMatrix(t,e,n,r){let i=[];if(i.push(aw.apply({x:0,y:0},n)),i.push(aw.apply({x:0,y:e},n)),i.push(aw.apply({x:t,y:0},n)),i.push(aw.apply({x:t,y:e},n)),!r)return{left:Math.min(i[0].x,i[1].x,i[2].x,i[3].x),top:Math.min(i[0].y,i[1].y,i[2].y,i[3].y),right:Math.max(i[0].x,i[1].x,i[2].x,i[3].x),bottom:Math.max(i[0].y,i[1].y,i[2].y,i[3].y)};let a=Object.create(null);a.pos_arr=i;let s=function(t,e){let n,r,i,s,o;switch(e){case"left":s="x",o=-1;break;case"top":s="y",o=-1;break;case"right":s="x",o=1;break;case"bottom":s="y",o=1;break;default:return}for(let e=0;e<4;++e)!function(e){let a=av[e],l=t[e],h=l[s],u=null==i?null:R(h,i);null==u||u*o>0?(i=h,n=a,r=l):0===u&&(n=(n&a)<<1,r=null)}(e);a[e]=i,a[e+"_source"]=n,a[e+"_pos"]=r},o=this.prop_list;for(let t=0;t<o.length;++t)s(i,o[t]);return a}static fromTransform(t,e,n){return this.fromSizeAndMatrix(Math.abs(t.width),Math.abs(t.height),e||aw.fromTransform(t),n)}static fromNode(t,e){return this.fromTransform(t.type.getAbsTransform(t),t.type.getAbsMatrix(t),e)}static toTransform(t){return aM.fromBoundingBox(t)}static translate(t,e,n){return this.calculateTranslate(this.copy(t),e,n)}static scale(t,e,n){return this.calculateScale(this.copy(t),e,n)}static calculateTranslate(t,e,n){return void 0===n&&(n=e),t.left+=e,t.top+=n,t.right+=e,t.bottom+=n,t}static calculateScale(t,e,n){return void 0===n&&(n=e),t.left*=e,t.top*=n,t.right*=e,t.bottom*=n,t}static calculateCenter(t){return t.h_center=(t.left+t.right)/2,t.v_center=(t.top+t.bottom)/2,t}static calculateSize(t){return t.width=t.right-t.left,t.height=t.bottom-t.top,t}static calculateSource(t){return t.left_source=2,t.top_source=8,t.right_source=32,t.bottom_source=128,t}}class aA extends ap{constructor(t){super(t.doc,t.commentStore,t._multiSelection),this.progressiveFlush=!1,this.scrollIntoView=!1,this.scrollOptions=void 0,this.focus=!1,this.selectionChanged=!1,this.updateStatus=!1}}Object.create(null);let aS=null;function aC(t,e){"focus"in t&&(e?.force||t.ownerDocument.activeElement!==t)&&t.focus(e)}function aI(t,e){if(!(t&&e))return!1;if(t===e)return!0;if(t.nodeType===document.TEXT_NODE)return!1;if(e.nodeType!==document.ELEMENT_NODE){let t=e.parentNode;if(!t)return!1;e=t}return t.nodeType!==document.DOCUMENT_NODE||t.contains||(t=t.body),t.contains(e)}function aP(t){let e=t.readyState;return"loaded"===e&&(e="complete"),e}let aT=["loading","interactive","complete"];function ak(t,e){let n=aT.indexOf(e);if(n<0)return Promise.reject(`Given state \`${e}\` is invalid.`);let r=()=>aT.indexOf(aP(t))>=n;return r()?Promise.resolve():new Promise(e=>{let n=()=>{r()&&(t.removeEventListener("readystatechange",n),e())};t.addEventListener("readystatechange",n)})}function aL(t){return ak(t,"interactive")}function aD(t){return ak(t,"complete")}function aR(t,e){let n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return e?n===e:!!n}function aN(t,e){let n=t.ownerDocument;if(!n)return Promise.reject("Given element is not attached to a document.");if(aR(n,t))return Promise.resolve();let r=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;return r?r.call(t,e)||Promise.resolve():Promise.reject("No valid fullscreen requester.")}function aO(t){if(!aR(t))return Promise.resolve();let e=t.exitFullscreen||t.webkitExitFullscreen||t.webkitExitFullScreen||t.mozCancelFullScreen||t.msExitFullscreen;return e?e.call(t)||Promise.resolve():Promise.reject("No valid fullscreen exitor.")}function aj(t){let e=t.ownerDocument;return e?aR(e,t)?aO(e):aN(t):Promise.reject("Given element is not attached to a document.")}let aE=(()=>{let t;return()=>t??(t=function(){for(let t of["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"])if(void 0!==document[`on${t}`])return t;return"fullscreenchange"}())})();function aV(t){let e;if(t.nodeType===t.ELEMENT_NODE)e=t;else{let n=t.parentElement;if(!n)return!1;e=n}return 0!==e.getClientRects().length}function aB(t){if(!t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(aB).join("");{let e="",{metas:n,styles:r,scripts:i}=t;if(n)for(let[t,r]of Object.entries(n))e+=`<meta http-equiv="${t$(t)}" content="${t$(r)}">`;if(r)for(let t of r)t&&(e+=`<link rel="stylesheet" type="text/css" href="${t$(t)}">`);if(i)for(let t of i)t&&(e+=`<script type="text/javascript" src="${t$(t)}"></script>`);return e}}function az(t,e){void 0===e&&(e={});let{lang:n,headContent:r="",bodyContent:i=""}=e,a=n?` lang="${t$(n)}"`:"";t.open(),t.write(`<!DOCTYPE html><html${a}><head><meta charset="utf-8">${aB(r)}</head><body>${aB(i)}</body></html>`),t.close()}let aF="undefined"!=typeof OffscreenCanvas;function aG(t){return t?.preferOffscreen&&aF?new OffscreenCanvas(100,100):(t?.document??document).createElement("canvas")}function aH(t){return aG(t).getContext("2d",t?.contextAttributes)}function aW(t,e,n){let r=document.createElement("img");return t&&(r.src=t),r.style.width=e+"px",r.style.height=n+"px",r.setAttribute("width",String(e)),r.setAttribute("height",String(n)),r}function aq(t){let e=[];for(let n of t)try{for(let t of n.cssRules)"CSSFontFaceRule"===t.constructor.name&&e.push(t)}catch(t){console.warn(t)}return e.map(aU).join("\n")}function aU(t){let e=t.parentStyleSheet?.href??t.parentStyleSheet?.ownerNode?.ownerDocument?.location?.href??window.location.href;return t.cssText.replaceAll(/url\("([^"]+)"\)/g,(t,n)=>{let r=new URL(n,e).href;return`url("${r}")`})}async function aZ(t){await Promise.allSettled(Array.from(t,async t=>{try{await t.load()}catch(t){}}))}function a$(t){void 0===t&&(t={});let e=t.preset,{parentNode:n=document.body,inheritFontFaces:r="metrics"===e}=t,i=document.createElement("iframe");e&&("hidden"===e||"metrics"===e)&&Object.assign(i.style,{position:"absolute",left:"-5566px",top:"-5566px",width:"5566px",height:"5566px",opacity:"0",border:"0",overflow:"hidden","pointer-events":"none","z-index":"0"}),n.appendChild(i);let a=i.contentDocument;if(a&&(az(a,{...t,headContent:[t.headContent,r&&n.ownerDocument?`<style>${tJ(aq(n.ownerDocument.styleSheets))}</style>`:void 0]}),"metrics"===e)){let t=a.body.style;t["-moz-text-size-adjust"]="none",t["-webkit-text-size-adjust"]="none",t["text-size-adjust"]="none",a.fonts&&aZ(a.fonts)}return i}function aJ(t,e){void 0===e&&(e={});let n=t.open(e.url||"",e.target||"",e.features);return n&&az(n.document,{...e,headContent:[e.headContent,e.inheritFontFaces?`<style>${tJ(aq(t.document.styleSheets))}</style>`:void 0]}),n}function aY(t,e){if(e.includes('"'))return"";let n=t.querySelector(`script[src*="${e}"]`);return n&&n.getAttribute("src")||""}let aX=Symbol("synoCustomData");function aQ(t,e,n){(t[aX]||(t[aX]=Object.create(null)))[e]=n}function aK(t,e){return t[aX]?.[e]}function a0(t){let e=(t??document).getSelection();return e&&e.rangeCount?e.getRangeAt(0):null}function a1(t,e,n){void 0===n&&(n=e);let r=t.ownerDocument;if(!r)return new DOMRect(0,0,0,0);let i=r.createRange();i.setStart(t,e),i.setEnd(t,n);let a=e===n&&eE()?i.getClientRects()[0]:i.getBoundingClientRect();return i.detach(),a}function a2(t,e){try{let n=Array.from(t.querySelectorAll(e.selectorText));for(let r of(eG(t)&&t.matches(e.selectorText)&&n.push(t),n))r.setAttribute("style",`${e.style.cssText}${r.getAttribute("style")}`)}catch{}}function a5(t,e){let n;try{n=e.cssRules}catch(t){console.warn(t);return}for(let e=n.length-1;e>=0;--e){let r=n[e];"CSSStyleRule"===r.constructor.name&&a2(t,r)}}function a4(t,e,n,r){let i=(t instanceof Document?t:t.ownerDocument).createTreeWalker(t,n,{acceptNode:r||(()=>NodeFilter.FILTER_ACCEPT)});for(let t=i.nextNode();null!==t;t=i.nextNode())if(e(t))return}function a8(t,e){try{t.adoptNode(e)}catch{}return e}function a3(t){return null!=(t&&t.nodeType)}function a6(t,e){return t.nodeType===t.TEXT_NODE&&(t=t.parentNode),eU(t)&&(e=!0),e?0===t.getClientRects().length:!t.offsetParent}function a7(t,e){return!a6(t,e)}function a9(t,e){e!==t.previousSibling&&t.parentNode.insertBefore(e,t)}function st(t,e){e!==t.nextSibling&&t.parentNode.insertBefore(e,t.nextSibling)}function se(t){let e=t.parentNode;e&&e.removeChild(t)}function sn(t){let e;if(t instanceof window.DocumentFragment)return t;let n=t.ownerDocument.createDocumentFragment();for(;e=t.firstChild;)n.appendChild(e);return n}function sr(t,e){t.appendChild(sn(e))}function si(t,e){t.insertBefore(sn(e),t.firstChild)}function sa(t,e){for(t=t.firstChild;e>0&&t;--e)t=t.nextSibling;return t}function ss(t,e){let n=[];for(;t&&t!==e;t=t.parentNode)n.push(sf(t));return t===e?n:null}function so(t,e,n){let r=ss(e,t);if(!r)return null;for(let t=r.length-1;t>=0&&n;--t)n=sa(n,t);return n}function sl(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];let a=document.createElement(t);if(e)for(let t in e)if("style"===t)a.style.cssText=e[t];else if("inline_style"===t&&e[t])for(let n in e[t])a.style[n]=e[t][n];else null!=e[t]&&a.setAttribute(t,e[t]);for(let t=0;t<r.length;t++)!function t(e,n){if("string"==typeof e&&(e=document.createTextNode(e)),Array.isArray(e))for(let r=0;r<e.length;r++)t(e[r],n);else e&&n.appendChild(e)}(r[t],a);return a}let sh="",su=null;function sc(t){su?su.textContent+=t:sh+=t}function sd(){su||((su=document.createElement("style")).textContent="/* ProseMirror CSS */\n"+sh,document.head.insertBefore(su,document.head.firstChild))}function sp(t,e){for(;t;){let n=t.parentNode;if(n===e)return t;t=n}return null}function sg(t,e){return(t=sp(t,e))?sf(t):-1}function sf(t){let e;for(e=-1;t;++e)t=t.previousSibling;return e}function sy(t){return t.nodeType===t.TEXT_NODE?t.length:t.childNodes.length}function sx(t,e){e?t.style.display="block":t.style.display="none"}function sm(t,e){t.style.opacity=`${e}`}function sv(t,e,n){t.style.transform=`translate(${e}px, ${n}px)`}function sb(){if(t)return t;let e=a$({preset:"metrics"}),n=e.contentDocument;if(!n)throw Error("Content document of measurement iframe is not available.");let r=function(t){let e=t.createElement("div");return Object.assign(e.style,{margin:"0",padding:"0",lineHeight:"1",wordWrap:"normal",whiteSpace:"nowrap"}),e}(n),i=n.createElement("span"),a=function(t){let e=t.createElement("img");return e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",e.width=1,e.height=1,Object.assign(e.style,{margin:"0",padding:"0",verticalAlign:"baseline"}),e}(n),s=function(t){let e=t.createElement("span");return e.textContent="​",e}(n);return i.append(a),r.append(i,s),n.body.append(r),t={iframe:e,container:r,rulerElement:i,rulerImage:a,targetElement:s}}let sw=Object.create(null);function sM(t){if("string"==typeof t)return t;{let{family:e,size:n}=t||{};return`${n&&"number"==typeof n?n:11}pt ${e||"Arial"}`}}function s_(t){return sw[t]||(sw[t]=Object.create(null))}function sA(t,e){let{container:n,rulerElement:r}=sb();n.style.font=t,r.style.verticalAlign=e;let{rulerImage:i,targetElement:a}=sb(),s=a.offsetTop,o=s+a.offsetHeight;return{textTop:s,textBottom:o,rulerBaseline:i.offsetTop+1}}function sS(t){let e=sM(t),n=s_(e);return n.textOffsets||(n.textOffsets=function(t){let{textTop:e,textBottom:n,rulerBaseline:r}=sA(t,"");return{top:e-r,bottom:n-r}}(e))}function sC(t,e){let n=sM(t),r=s_(n),i="super"===e?"superBaselineOffset":"subBaselineOffset";return r[i]||(r[i]=function(t,e){let{textTop:n,rulerBaseline:r}=sA(t,e),{top:i}=sS(t);return r-(n-i)}(n,e))}function sI(t){return"html"!==t&&"head"!==t&&"body"!==t&&!getElementCategoryTags("metadata").includes(t)}new WeakMap;function sP(t,e,n){for(let r of["serif","sans-serif","monospace"]){let i="mmmmmmmmmmlli",a=`${n}px ${r}`;if(t.innerHTML=i,t.style.font=a,e.font=a,.5>Math.abs(t.getBoundingClientRect().width-e.measureText(i).width))return!0}return!1}function sT(t){if(!t)return"10px sans-serif";if(t.font)return t.font;let{fontStyle:e="",fontVariant:n="",fontWeight:r="",fontStretch:i="",fontSize:a="10px",fontFamily:s="sans-serif",lineHeight:o=""}=t,l="string"==typeof a?a:`${a}px`,h="string"==typeof o?o:`${o}`,u="string"==typeof s?s:s.map(t=>((t=t.trim()).length>=2&&("'"!==t[0]&&'"'!==t[0]||"'"!==t.at(-1)||'"'!==t.at(-1))&&(t=`"${t}"`),t)).join(","),c=[];return e&&c.push(e),n&&c.push(n),r&&c.push(r),i&&c.push(i),c.push(l),h&&c.push(`/ ${h}`),c.push(u),c.join(" ")}function sk(t){return{direction:t?.direction??"ltr",font:sT(t),fontStretch:t?.fontStretch??"normal"}}let sL=null;class sD{constructor(t){this.metrics=t}get actualBoundingBoxAscent(){return this.metrics.actualBoundingBoxAscent}get actualBoundingBoxDescent(){return this.metrics.actualBoundingBoxDescent}get actualBoundingBoxLeft(){return this.metrics.actualBoundingBoxLeft}get actualBoundingBoxRight(){return this.metrics.actualBoundingBoxRight}get fontBoundingBoxAscent(){return this.metrics.fontBoundingBoxAscent??this.metrics.actualBoundingBoxAscent}get fontBoundingBoxDescent(){return this.metrics.fontBoundingBoxDescent??this.metrics.actualBoundingBoxDescent}get width(){return this.metrics.width}get height(){return this.fontBoundingBoxAscent+this.fontBoundingBoxDescent}get actualWidth(){return this.metrics.actualBoundingBoxLeft+this.metrics.actualBoundingBoxRight}get actualHeight(){return this.metrics.actualBoundingBoxAscent+this.metrics.actualBoundingBoxDescent}}function sR(t,e){var n;let r=(n=e)&&"measureText"in n?n:sL||(sL=aH())?(Object.assign(sL,sk(n)),sL):null;return new sD(r?r.measureText(t):{actualBoundingBoxAscent:0,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:0,fontBoundingBoxAscent:0,fontBoundingBoxDescent:0,width:0})}function sN(t){let e=t.createElement("div");return Object.assign(e.style,{position:"absolute",left:"0",top:"0",margin:"0",padding:"0",wordWrap:"normal",whiteSpace:"nowrap"}),e}function sO(t){let e=function(t){let e=t.createElement("span");return Object.assign(e.style,{verticalAlign:"baseline"}),e}(t),n=function(t){let e=t.createElement("img");return e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",e.width=1,e.height=1,Object.assign(e.style,{margin:"0",padding:"0"}),e}(t),r=function(t){let e=t.createElement("span");return e.textContent="​",e}(t);return e.append(n,r),{inline:e,ruler:n,text:r}}function sj(t,e){let n=sN(t),{inline:r,ruler:i}=sO(t),{inline:a,ruler:s}=sO(t);return a.style.verticalAlign=e?"super":"sub",n.append(r,a),{line:n,baseRuler:i,scriptRuler:s}}let sE=new Map;function sV(t){let e={font:sT(t)},n=e.font,r=sE.get(n);if(r)return r;let a=function(t){let{body:e,baselineLine:n,baselineRuler:r,baselineText:a,superBaseRuler:s,superScriptRuler:o,subBaseRuler:l,subScriptRuler:h}=function(){if(i)return i;let t=a$({preset:"metrics"}),e=t.contentDocument;if(!e)throw Error("Content document of measurement iframe is not available.");let{line:n,ruler:r,text:a}=function(t){let e=sN(t),{inline:n,ruler:r,text:i}=sO(t);return e.append(n),{line:e,ruler:r,text:i}}(e),{line:s,baseRuler:o,scriptRuler:l}=sj(e,!0),{line:h,baseRuler:u,scriptRuler:c}=sj(e,!1);return e.body.append(n,s,h),i={iframe:t,body:e.body,baselineLine:n,baselineRuler:r,baselineText:a,superLine:s,superBaseRuler:o,superScriptRuler:l,subLine:h,subBaseRuler:u,subScriptRuler:c}}();e.style.font=t.font;let u=n.getBoundingClientRect().height,c=r.getBoundingClientRect().bottom,d=a.getBoundingClientRect().height,p=c-a.getBoundingClientRect().top,g=s.getBoundingClientRect().bottom-o.getBoundingClientRect().bottom,f=l.getBoundingClientRect().bottom-h.getBoundingClientRect().bottom;return{height:u,lineBoundingBoxAscent:c,lineBoundingBoxDescent:u-c,textHeight:d,textBoundingBoxAscent:p,textBoundingBoxDescent:d-p,superBaselineAscent:g,superBaselineDescent:-g,subBaselineAscent:f,subBaselineDescent:-f}}(e);return sE.set(n,a),a}k(rV,"dom_node",function(){return sK.fly(this.dom)}),k(window.Element,"$node",function(){return sK.fly(this)});let sB=Symbol("PmElement"),sz=new WeakMap,sF=new WeakMap,sG=new WeakMap,sH=new WeakMap,sW=new WeakMap,sq=new WeakMap,sU=new WeakMap,sZ=new WeakMap,s$=new WeakMap,sJ=new WeakMap,sY=new WeakMap,sX=new WeakMap;function sQ(t){return sK.fly(t,s1)}class sK{constructor(t){this.dom=t,this._child_container=null}get key(){return this.dom[sB]||(this.dom[sB]=Object.create(null))}reset(t){t&&(this.dom=t),this._child_container=null}get isPmElement(){return this.isPmContent||this.isNodeElement||this.isPseudoElement||this.isLineElement}get isPmContent(){return this.dom.nodeType===this.dom.ELEMENT_NODE&&this.dom.classList.contains("ProseMirror-content")}get isOffsetElement(){return!isNaN(parseInt(this.dom.getAttribute("pm-size")??""))}get isNodeElement(){return this.isOffsetElement&&!this.isLineElement}get isPseudoElement(){return this.isPageElement}get isPageElement(){return this.dom.nodeType===this.dom.ELEMENT_NODE&&this.dom.classList.contains("syno-o-doc-pm-page")}get isLineElement(){return this.dom.nodeType===this.dom.ELEMENT_NODE&&this.dom.classList.contains("syno-o-doc-pm-line")}get isTextElement(){return"text"===this.dom.getAttribute("data-syno-inline-wrapper")}get isInlineObjectElement(){return"non_text"===this.dom.getAttribute("data-syno-inline-wrapper")}get isUnwrappedInlineElement(){return this.dom.hasAttribute("data-syno-inline")}get isFirstSegment(){return!this.getPrevSegment()}get isLastSegment(){return!this.getNextSegment()}get childContainer(){return this.getChildContainer()}get parentNode(){let t=this.dom.parentElement;for(;t&&!sQ(t).isPmElement;)t=t.parentElement;return t}get childCount(){let t=0;return this.forEach(()=>{++t}),t}get firstChild(){let t=this.childContainer?.firstElementChild;return t?sQ(t).isPmElement?t:sQ(t).nextSibling:null}get lastChild(){let t=this.childContainer?.lastElementChild;return t?sQ(t).isPmElement?t:sQ(t).previousSibling:null}child(t){let e=this.firstChild;return e&&sQ(e).sibling(t)}get previousSibling(){let t=this.dom.previousElementSibling;for(;t&&!sQ(t).isPmElement;)t=t.previousElementSibling;return t}get nextSibling(){let t=this.dom.nextElementSibling;for(;t&&!sQ(t).isPmElement;)t=t.nextElementSibling;return t}sibling(t){let e=this.dom;if(t>0)for(;e&&t>0;)e=sQ(e).nextSibling,--t;else if(t<0)for(;e&&t<0;)e=sQ(e).previousSibling,++t;return e}forEach(t,e,n){let r=this.firstChild,i=0;for(;r;){let a=sQ(r).nextSibling,s=t.call(e,r,i);if(n&&null!=s)return s;r=a,++i}}forEachDOM(t,e,n){let r=this.childContainer?.firstChild,i=0;for(;r;){let a=r.nextSibling,s=t.call(e,r,i);if(n&&null!=s)return s;r=a,++i}}get elementChildCount(){let t=0;return this.forEachElement(()=>{++t}),t}get firstElementChild(){return this._elementIterator.dom}get lastElementChild(){return this._elementIterator.end()}elementChild(t){return this.forEachElement((e,n)=>{if(n===t)return e},null,!0)}elementInfoAtOffset(t,e){void 0===e&&(e=m);let n=e.bias??1,r=e.bound;return this.forEachElement((e,i,a)=>{let s=sQ(e).getOffset(),o=s+sQ(e).getSize();if(t<o||n<0&&t===o||r&&!a.dom)return{dom:e,offset:s,size:o-s,index:i}},null,!0)}elementInfoAtIndex(t){let e=this.elementChild(t);return e?{dom:e,offset:sQ(e).getOffset(),size:sQ(e).getSize(),index:t}:null}forEachElement(t,e,n){let r=0;return this._elementIterator.forEach((n,i)=>t.call(e,n,r++,i),null,n)}forAll(t,e,n){let r=this.getFirstSegment();for(;r;){let i=sQ(r).getNextSegment(),a=t.call(e,r);if(n&&null!=a)return a;r=i}}clear(){let{dom:t}=this;t[sB]&&(t[sB]=void 0),this.reset(document.body)}removeAll(){let t=this.getFirstSegment();sQ(t).forAll(se,d),sQ(t).forAll(function(t){let e=sQ(t).childContainer;if(e){let t=null;for(;t=e.firstElementChild;)sQ(t).isFirstSegment?sQ(t).removeAll():t.remove()}sQ(t).clear()})}sync(t,e){this.forAll(n=>{sQ(n)[t](e)})}setClonedInfo(t){let{dom:e}=this,n=this.constructor.get(e);n.setOffset(sQ(t).getOffset()),n.setSize(sQ(t).getSize());let r=sQ(t).getNode();void 0!==r&&n.setNode(r),n._setContentWidth(sQ(t).getContentWidth()),n._setContentHeight(sQ(t).getContentHeight());let i=sQ(t)._getPaddingWidth();void 0!==i&&n._setPaddingWidth(i);let a=sQ(t)._getPaddingHeight();void 0!==a&&n._setPaddingHeight(a);let s=sX.get(sQ(t).key);null!=s&&(n.dom.style.paddingTop=s)}getDatas(){return sz.get(this.key)}getData(t){let e=sz.get(this.key);return e&&e[t]}setData(t,e){let{key:n}=this,r=sz.get(n);r||(r=Object.create(null),sz.set(n,r)),r[t]=e}syncData(t,e){return this.getData(t)!==e&&(this.setData(t,e),!0)}getVersion(){return sF.get(this.key)??0}bumpVersion(){let{key:t}=this;sF.set(t,this.getVersion()+1)}getChildContainer(){return this._child_container||(this._child_container=sG.get(this.key)||(this.dom.hasAttribute("pm-container")||this.isPmContent?this.dom:this.dom.querySelector("[pm-container]"))),this._child_container}setChildContainer(t){t.setAttribute("pm-container",String(!0)),sG.set(this.key,t)}getOffset(){let t=this.dom.getAttribute("pm-offset");return t&&parseInt(t)||0}setOffset(t){this.dom.setAttribute("pm-offset",String(t))}syncOffset(t){this.sync("setOffset",t)}getSize(){let t=this.dom.getAttribute("pm-size");return t&&parseInt(t)||0}setSize(t){this.dom.setAttribute("pm-size",String(t))}syncSize(t){this.sync("setSize",t)}getNode(){return sH.get(this.key)}getNodeType(){return sH.get(this.key)?.type??null}setNode(t){sH.set(this.key,t)}syncNode(t){this.sync("setNode",t)}_getPaddingWidth(){return sU.get(this.key)}_setPaddingWidth(t){sU.set(this.key,t)}_getPaddingHeight(){return sW.get(this.key)}_setPaddingHeight(t){sW.set(this.key,t)}getLeftPaddingWidth(){return this._getPaddingWidth()?.[0]??0}getRightPaddingWidth(){return this._getPaddingWidth()?.[1]??0}getPaddingWidth(){let t=this._getPaddingWidth();return t?t[0]+t[1]:0}getTopPaddingHeight(){return this._getPaddingHeight()?.[0]??0}getBottomPaddingHeight(){return this._getPaddingHeight()?.[1]??0}getPaddingHeight(){let t=this._getPaddingHeight();return t?t[0]+t[1]:0}_calcTablePaddingWidth(){let t=this.dom,e=0,n=0;return sQ(t).forEach(t=>{let r=sQ(t).getNode();r&&(e=Math.max(e,r.state.border.left/2),n=Math.max(n,r.state.border.right/2))}),[e,n]}_calcTablePaddingHeight(){let t=sQ(this.dom).childContainer,e=[0,0];if(t){let n;n=sQ(t.firstElementChild)?.getNode(),e[0]=n?n.state.border.top/2:0,n=sQ(t.lastElementChild)?.getNode(),e[1]=n?n.state.border.bottom/2:0}return e}calcPaddingWidth(t){void 0===t&&(t=!1);let e=this.getNode();return e?e.type.isTable?this._calcTablePaddingWidth():[e.type.getLeftPaddingWidth(e),e.type.getRightPaddingWidth(e)]:t?[0,0]:null}calcPaddingHeight(t){void 0===t&&(t=!1);let e=this.getNode();return e?e.type.isTable?this._calcTablePaddingHeight():[e.type.getTopPaddingHeight(e),e.type.getBottomPaddingHeight(e)]:t?[0,0]:null}updatePaddingSize(t){void 0===t&&(t=!1);let{dom:e}=this,n=sQ(e).calcPaddingWidth(t);n&&sQ(e)._setPaddingWidth(n);let r=sQ(e).calcPaddingHeight(t);r&&sQ(e)._setPaddingHeight(r)}syncPaddingSize(t){void 0===t&&(t=!1);let{dom:e}=this,n=sQ(e).getNodeType();if(n?.is("Table"))sQ(e).sync("updatePaddingSize",t);else{let n=sQ(e).calcPaddingWidth(t);sQ(e).sync("_setPaddingWidth",n);let r=sQ(e).calcPaddingHeight(t);sQ(e).sync("_setPaddingHeight",r)}}_setContentWidth(t){let{key:e}=this;this.getContentWidth()!==t&&sZ.set(e,t)}_setContentHeight(t){let{dom:e,key:n}=this,{childContainer:r}=this;if(this.getContentHeight()!==t){for(sq.set(n,t);r&&r!==e&&"SPAN"===r.tagName;)r=r.parentElement;r&&"SPAN"!==r.tagName&&(r.style.height=t+"px")}}getContentWidth(){return sZ.get(this.key)??0}getWidth(){return this.getContentWidth()+this.getPaddingWidth()}getContentHeight(){return sq.get(this.key)??0}getHeight(){return this.getContentHeight()+this.getPaddingHeight()}_updateTableRowSpanInfo(t){let{dom:e}=this,n=t?t.clone():new $,r=sQ(e).getData("table_row_height")??0;if(n.length){let t=-1;n.forEach(e=>{let n=e.value;if(1!==n.span)return!0;t=Math.max(t,n.height),e.unlink()},null,{from_start:!0,early_return:!0}),r=Math.max(r,t)}sQ(e)._setContentHeight(r);let i=sQ(e).getData("table_row_spans");if(i){let t=0,e=i.length;for(n.forEach(r=>{let a=r.value.span;for(;i[t].span<=a;)if(n.insertBefore(i[t]),++t===e)return!0},null,{from_start:!0,early_return:!0});t<e;++t)n.append(i[t])}return n.forEach(t=>{let e=t.value;e.height<=r?t.unlink():(e=t.value=Object.assign(Object.create(null),e),--e.span,e.height-=r)},null,{from_start:!0}),sQ(e).setData("table_row_span_list",n),n}updateTableRowSpanInfo(){let t,{dom:e}=this,n=sQ(e).previousSibling;if(n&&!(t=sQ(n).getData("table_row_span_list")))throw Error("There is no span list in previous table row.");sQ(e)._updateTableRowSpanInfo(t)}_updateTableRowContentHeight(){let t,e,{dom:n}=this,r=sQ(n).getPrevSegment()?0:sQ(n).getNode()?.getAttrValue("height")??0,i=r;if(sQ(n).forEach(t=>{let n=sQ(t).getNode();if(!n||!n.type.isTableCell||!1===n.state.display)return;let r=sQ(t).getHeight(),a="TD"===t.tagName?t.rowSpan:1;1===a?i=Math.max(r,i):(e||(e=new Map),e.set(a,Math.max(r,e.get(a)??0)))}),e){for(let[n,r]of(t=[],e))t.push({span:n,height:r});t.sort((t,e)=>t.span-e.span)}sQ(n).setData("table_row_spans",t),sQ(n).setData("table_row_height",i),sQ(n).setData("table_row_min_height",r),sQ(n)._setContentHeight(i)}_updateTableContentHeight(){let{dom:t}=this,e=[];sQ(t).forEachDOM(t=>{eG(t)&&sQ(t).getNodeType()?.is("TableRow")&&e.push(t)});let n=e.length;if(n){let t;for(let r=0;r<n;++r)t=sQ(e[r])._updateTableRowSpanInfo(t);if(t?.length){let r=0;t.forEach(t=>{r=Math.max(r,t.value.height)},null,{from_start:!0});let i=e[n-1];r+=sQ(i).getContentHeight(),sQ(i)._setContentHeight(r)}}sQ(t)._updateNodeContentHeight()}_updateNodeContentHeight(){let{dom:t}=this,e=0;sQ(t).forEachDOM(t=>{e+=sQ(t)?.getHeight()??0}),sQ(t)._setContentHeight(e)}_updateLeafContentHeight(){this._setContentHeight(0)}_updateContentWidth(){let{dom:t}=this,e=sQ(t).getNode();this._setContentWidth(e?.state.text_rect_info?.width||0)}updateContentSize(){let t=this.getNodeType();t&&(this._updateContentWidth(),t.isLeaf?this._updateLeafContentHeight():t.is("Table")?this._updateTableContentHeight():t.is("TableRow")?this._updateTableRowContentHeight():this._updateNodeContentHeight())}syncContentSize(){this.sync("updateContentSize")}syncDrawSize(){let{dom:t}=this;this.getNodeType()?.needHeightCalculating&&(sQ(t).syncPaddingSize(),sQ(t).syncContentSize())}getPrevSegment(){return sJ.get(this.key)??null}getNextSegment(){return s$.get(this.key)??null}getSegment(t){let e=this;if(t>0)for(;e&&t>0;)e=sQ(e.getNextSegment()),--t;else if(t<0)for(;e&&t<0;)e=sQ(e.getPrevSegment()),++t;return e&&e.dom}getFirstSegment(){let t=this.dom,e=this.getPrevSegment();for(;e;)t=e,e=sQ(e).getPrevSegment();return t}getLastSegment(){let t=this.dom,e=this.getNextSegment();for(;e;)t=e,e=sQ(e).getNextSegment();return t}getContainingSegment(t){let e=this.getFirstSegment(),n=t;for(;n&&sQ(n).getFirstSegment()!==e;n=n.parentElement);return n}getAllSegments(){let t=[];return this.forAll(e=>{t.push(e)}),t}insertNextSegment(t){let e=this.dom,n=this.getNextSegment();this.constructor.linkSegment(e,t),n&&this.constructor.linkSegment(t,n)}removeNextSegment(){let t=this.getNextSegment();t&&sQ(t).clearSegment()}clearSegment(){let t=this.dom,e=this.getPrevSegment(),n=this.getNextSegment();t.remove(),this.constructor.linkSegment(e,n),sQ(t).clear()}static linkSegment(t,e){if(t){let n=sQ(t).key;e?s$.set(n,e):s$.delete(n)}if(e){let n=sQ(e).key;t?sJ.set(n,t):sJ.delete(n)}}getBlockerPadding(){return sY.get(this.key)??0}setBlockerPadding(t){if(!t)return void this.removeBlockerPadding();let{dom:e,key:n}=this,r=sX.get(n);null==r&&(r=e.style.paddingTop,sX.set(n,r)),sY.set(n,t),e.style.paddingTop=(parseFloat(r)||0)+t+"px"}removeBlockerPadding(){let{dom:t,key:e}=this,n=sX.get(e);null!=n&&(sX.delete(e),sY.delete(e),t.style.paddingTop=n)}static get(t,e){return t&&eG(t)?e?(t!==e.dom&&e.reset(t),e):new this(t):null}static fly(t,e){return void 0===e&&(e=s0),this.get(t,e)}static adapt(t,e){let n;if(!t)return null;if(eG(t))n=t;else{let e=t.parentElement;if(!e)return null;n=e}return sQ(n).isPmElement||(n=sQ(n).parentNode),n&&this.get(n,e)}}let s0=sK.get(document.body),s1=sK.get(document.body);k(sK,"_elementIterator",function(){return new s3(this.dom)});let s2=sK.get(document.body);function s5(t){return sK.fly(t,s2)}class s4{constructor(t,e=!1){e||(t=s5(t).getFirstSegment()),this.root=t,this.parent=t,this.child_container=null,this.updateChildContainer(),this.dom=this.child_container&&s5(this.child_container).firstChild,this.ensureDOM()}updateChildContainer(){this.child_container=this.parent&&s5(this.parent).childContainer}checkDOM(t){return!0}ensureDOM(){for(;!this.dom||!this.checkDOM(this.dom);)if(this.dom)this.dom=s5(this.dom).nextSibling;else if(this.parent)this.parent=s5(this.parent).getNextSegment(),this.updateChildContainer(),this.dom=this.child_container&&s5(this.child_container).firstChild;else break}next(){let t=this.dom;return t&&(this.dom=s5(t).nextSibling,this.ensureDOM()),t}end(){let t=null;for(;this.dom;)t=this.next(...arguments);return t}forEach(t,e,n){for(;this.dom;){let r=this.dom;this.next();let i=t.call(e,r,this);if(n&&null!=i)return i}}}class s8 extends s4{checkDOM(t){return s5(t).isFirstSegment||!!s5(t).getNodeType()?.is("Text")}}class s3 extends s8{constructor(t,e=!1){s5(t).getNodeType()?.pseudoType&&(t=new s8(t,e).dom||t),super(t,e)}nextToOffset(t,e){void 0===e&&(e=1);let n=null;for(;n=this.next();){let r=s5(n),i=r.getOffset()+r.getSize();if(t<i||e<0&&t===i)break}return n}}class s6{constructor(t,e){this.options=e||{},this.from=t,this.removed=!1}remove(){this.options.onRemove&&this.options.onRemove(this.from,Math.max(this.to,this.from)),this.from=this.to=null,this.removed=!0}getPos(t){}getRangeSorterObjs(){}markDirty(t){}map(t){return!0}}class s7 extends s6{constructor(t,e,n){super(t,n),this.to=e}get isMarkedRange(){return!0}getPos(t){return"open"===t?this.from:this.to}getRangeSorterObjs(){return[{type:"open",at:this.from,range:this},{type:"close",at:this.to,range:this}]}markDirty(t){this.options.className&&t.markRangeDirty(this.from,this.to)}map(t){return this.options.onModified&&t.intersect(this.from,this.to)&&this.options.onModified(this.from,this.to),this.from=t.map(this.from,this.options.inclusiveLeft?-1:1),this.to=t.map(this.to,this.options.inclusiveRight?1:-1),(!1===this.options.removeWhenEmpty||!(this.from>=this.to))&&(this.from>this.to&&(this.to=this.from),!0)}}class s9 extends s6{get isMarkedNode(){return!0}getPos(t){return this.from}getRangeSorterObjs(){return[{type:"node",at:this.from,range:this}]}map(t){let e=t.mapNodeResult(this.from,1);return!e.deleted&&(this.from=e.pos,!0)}}class ot{constructor(){this.sorted=[]}find(t){let e=0,n=this.sorted.length;for(;;){if(n<e+10){for(let r=e;r<n;r++)if(this.sorted[r].at>=t)return r;return n}let r=e+n>>1;this.sorted[r].at>t?n=r:e=r}}insert(t){this.sorted.splice(this.find(t.at),0,t)}remove(t,e){let n=this.find(t);for(let t=0;;t++){let r=n-t-1,i=n+t;if(r>=0&&this.sorted[r].range==e)return void this.sorted.splice(r,1);if(i<this.sorted.length&&this.sorted[i].range==e)return void this.sorted.splice(i,1)}}resort(){for(let t=0;t<this.sorted.length;t++){let e=this.sorted[t],n=e.at=e.range.getPos(e.type),r=t;for(;r>0&&this.sorted[r-1].at>n;)this.sorted[r]=this.sorted[r-1],this.sorted[--r]=e}}}class oe{constructor(t){this.pm=t,this.ranges=[],this.sorted=new ot}removeAll(){for(let t of this.ranges)this._removeRange(t);this.ranges=[]}addRange(t){for(let e of(this.ranges.push(t),t.getRangeSorterObjs()))this.sorted.insert(e);t.markDirty(this.pm)}removeRange(t){let e=this.ranges.indexOf(t);e>-1&&(this.ranges.splice(e,1),this._removeRange(t))}_removeRange(t){for(let e of t.getRangeSorterObjs())this.sorted.remove(e.at,t);t.markDirty(this.pm),t.remove()}transform(t){for(let e=0;e<this.ranges.length;e++){let n=this.ranges[e];!n.map(t)&&(this.removeRange(n),e--)}this.sorted.resort()}activeRangeTracker(){return new or(this.sorted.sorted)}}function on(t){let e=t.range;return e.options.className&&e.from!=e.to||e.options.elementBefore&&"open"==t.type||e.options.elementAfter&&"close"==t.type}class or{constructor(t){this.sorted=t,this.pos=0,this.current=[],this.element=null,this.find_idx=0}reset(){this.pos=0,this.current.length=0,this.element=null,this.find_idx=0}advanceTo(t){let e;for(this.pos>0&&this.sorted[this.pos-1].at>t&&this.reset(),this.element=null;this.pos<this.sorted.length&&(e=this.sorted[this.pos]).at<=t;){if(on(e)){let n=e.range.options.className,r=e.range.options.elementBefore;n&&("open"===e.type?this.current.push(n):"close"===e.type&&this.current.splice(this.current.indexOf(n),1)),r&&"open"==e.type&&e.at==t&&(this.element=r)}this.pos++}}nextChangeBefore(t){for(;;){if(this.pos==this.sorted.length)return -1;let e=this.sorted[this.pos];if(on(e))if(e.at>=t)return -1;else return e.at;this.pos++}}getRangesAt(t){let e=[];for(;this.find_idx<this.sorted.length;++this.find_idx)if(this.sorted[this.find_idx].at===t)e.push(this.sorted[this.find_idx].range);else if(this.sorted[this.find_idx].at>t)break;return e}}class oi{constructor(t){this.tr=t}get doc(){return this.tr.doc}get commentStore(){return this.tr.commentStore}get uid(){return this.tr.getUserId()}step(t,e){this.tr.step(t,{...e,revising:!1})}exec(t,e){return this.step(t,e),!0}accept(t,e){return this.handleSuggestionId(t,!0,e)}reject(t,e){return this.handleSuggestionId(t,!1,e)}handleSuggestionId(t,e,n){let r=this.commentStore.getBy(t);return!!r&&this.handleSuggestion(r,e,n)}handleSuggestion(t,e,n){return!!t.isSuggestion()&&(this.tr.resolveComment(t.id),!0)}static exec(t,e,n){return new this(t).exec(e,n)}static accept(t,e,n){return new this(t).accept(e,n)}static reject(t,e,n){return new this(t).reject(e,n)}}class oa{constructor(t,e=!1,n){this.pos=t,this.deleted=!!e,this.recover=n}}class os{constructor(t,e){this.from=t.pos,this.to=e.pos,this.deleted=this.checkDeleted(t,e)}get empty(){return this.from===this.to}checkDeleted(t,e){return t.deleted&&e.deleted}}class oo extends os{checkDeleted(t,e){return t.deleted||e.deleted||this.from>=this.to}}let ol=Object.create(null);class oh{static #t=this.mapType="";static #e=this.mapId="";constructor(){}toJSON(){let t={id:this.constructor.mapId};for(let e in this)if(Object.prototype.hasOwnProperty.call(this,e)){let n=this[e];t[e]=n&&"object"==typeof n&&"function"==typeof n.toJSON?n.toJSON():n}return t}static fromJSON(t){return new this}static deserializeJSON(t,e){let n=this.findMapConstructor(t.id).fromJSON(t);if(e&&e!==n.constructor.mapType)throw RangeError(`No ${e} map is named \`${t.id}\`.`);return n}static findMapConstructor(t){let e=ol[t];if(!e)throw RangeError(`No step map is named \`${t}\`.`);return e}static register(){let t=this.mapId;if(!t)throw RangeError("Step map id should be defined.");if(t in ol)throw RangeError(`Duplicate use of step map id \`${t}\`.`);ol[t]=this}}function ou(t,e,n,r){return void 0===r&&(r=!1),t!==e?t-e:r?n:0}class oc extends oh{constructor(t,e=!1){super(),this.ranges=this.constructor.ensureRanges(t),this.inverted=!!e}isMappable(){return!!this.ranges.length}invert(){return new this.constructor(this.ranges,!this.inverted)}static fromJSON(t){return new this(t.ranges,t.inverted)}static ensureRanges(t){let e=t.length%3;return 0!==e&&(t=t.slice(0,t.length-e)),t}}class od extends oc{forEach(t,e){let{ranges:n,inverted:r}=this,i=r?2:1,a=r?1:2,s=0;for(let o=0,l=n.length;o<l;o+=3){let l=n[o],h=l-(r?s:0),u=l+(r?0:s),c=n[o+i],d=n[o+a];if(t.call(e,h,c,u,d,s))return;s+=d-c}}run(t,e,n,r,i){e=L(e,!1,1);let{ranges:a,inverted:s}=this,o=s?2:1,l=s?1:2,h=0;for(let i=0,u=a.length;i<u;i+=3){let u=a[i]-(s?h:0),c=ou(t,u,e,n);if(c<0)break;let d=a[i+o],p=a[i+l],g=u+d,f=ou(t,g,e,n);if(f<=0){let n;n=0===d?e:t===u?-1:t===g?1:e;let a=u+h+(n<0?0:p);return r?a:new oa(a,c>0&&f<0,i/3+(t-u)*65536)}h+=p-d}return t+=h,r?t:new oa(t)}static appendRange(t,e,n,r){let i=t.length-3;i>=0&&t[i]+t[i+1]===e?(t[i+1]+=n,t[i+2]+=r):t.push(e,n,r)}}class op extends oc{run(t,e,n,r,i){let a=L(e,!1,1);return this.forEach((e,r,i,s)=>{let o=this.constructor.calcRangeInfo(e,r,i,s);if(!o)return;let{from:l,to:h,split:u}=o;if(0>=ou(t,l,a,n)||ou(t,h,a,n)>=0)return;let c=ou(t,u,a,n);c<0?t+=h-u:c>0?t-=u-l:t=o.forward?h:l},this),r?t:new oa(t)}forEach(t,e,n){let r,i,a,{ranges:s,inverted:o}=this;o?(r=s.length-3,i=-3,a=-3):(r=0,i=s.length,a=3);for(let l=r;l!==i;l+=a){let r=t.call(e,s[l],s[l+1],s[l+2],o);if(n&&null!=r)return r}}static invertRange(t,e,n){let r,i,a=t+e;if(n<t)r=n,i=a;else{if(!(n>a))return null;r=n-e,i=t}return[r,e,i]}static calcRangeInfo(t,e,n,r){let i,a,s,o;if(r){let r=this.invertRange(t,e,n);if(!r)return null;[t,e,n]=r}let l=t+e;if(n<t)i=n,a=l,s=t,o=!0;else{if(!(n>l))return null;i=t,a=n,s=l,o=!1}return{start:t,size:e,target:n,end:l,from:i,to:a,split:s,forward:o}}}class og extends oc{constructor(t){super([],t)}invert(){return new this.constructor(!this.inverted)}run(t,e,n,r,i){return r?0:new oa(0,!0)}}let of=t=>class extends(t||class{}){isMappable(){return!0}mapRange(t,e){return new os(this.mapResult(t,1),this.mapResult(e,-1))}mapResult(t,e){throw Error("Override me.")}map(t,e){throw Error("Override me.")}mapNodeRange(t,e){return new oo(this.mapNodeResult(t,1),this.mapNodeResult(e,-1))}mapNodeResult(t,e){return this.mapResult(...arguments)}mapNode(t,e){return this.map(...arguments)}invert(){throw Error("Override me.")}intersect(t,e){return!1}},oy=t=>class extends of(t){getPosMaps(){return[]}intersect(t,e){let n=this.getPosMaps();for(let r=0,i=n.length;r<i;++r){let i=n[r];if(i.intersect(t,e))return!0;t=i.map(t,-1),e=i.map(e,1)}return!1}},ox=t=>class extends of(t){static #t=this.mapType="pos"},om=t=>class extends ox(t){isMappable(){return!!this.ranges.length}invert(){return new this.constructor(this.ranges,!this.inverted)}};function ov(t,e,n,r){return t!==e?t-e:r?n:0}class ob extends om(od){static #t=this.mapId="replacePos";constructor(t,e){super(t,e)}recover(t){let e=0,n=65535&t;if(3*n>=this.ranges.length)return NaN;if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+(t-(65535&t))/65536}mapResult(t,e){return this.run(t,e,!1,!1)}map(t,e){return this.run(t,e,!1,!0)}mapNodeResult(t,e){return this.run(t,e,!0,!1)}mapNode(t,e){return this.run(t,e,!0,!0)}touches(t,e){let n=0,r=65535&e,i=this.inverted?2:1,a=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let o=this.ranges[e+i];if(t<=s+o&&e==3*r)return!0;n+=this.ranges[e+a]-o}return!1}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}intersect(t,e){let n=0,r=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let s=this.ranges[a]-(this.inverted?n:0);if(s>t&&s>e)break;let o=this.ranges[a+r],l=this.ranges[a+i],h=s+o;if(t<=h||e<=h)return!0;n+=l-o,t+=n,e+=n}return!1}static create(t,e){return t.length?new this(t,e):this.empty}}ob.empty=new ob([]),ob.register();class ow extends ox(oh){static #t=this.mapId="shiftPos";constructor(t){if(super(),!t)return;let e=t.length,n=[],r=[];for(let i=0;i<e;i+=3){let e=t[i],a=t[i+1],s=t[i+2];n.push([e,a,s]),r.push([s,a,e])}let i=(t,e)=>t[0]-e[0],a=(t,e)=>(t.push(...e),t);this.oldRanges=n.sort(i).reduce(a,[]),this.newRanges=r.sort(i).reduce(a,[])}static from(t,e){let n=new ow;return n.oldRanges=t,n.newRanges=e,n}isMappable(){return!!this.oldRanges.length}mapResult(t,e){return this.run(t,e,!1,!1)}map(t,e){return this.run(t,e,!1,!0)}mapNodeResult(t,e){return this.run(t,e,!0,!1)}mapNode(t,e){return this.run(t,e,!0,!0)}run(t,e,n,r){let i=this.oldRanges.length,a=0;for(let s=0;s<i;s+=3){let i=this.oldRanges[s];if(0>=ov(t,i,e,n))break;let o=this.oldRanges[s+1];if(0>ov(t,i+o,e,n)){let e=this.oldRanges[s+2]+(t-i);return r?e:new oa(e)}a+=-o}t+=a;for(let n=0;n<i;n+=3){let r=this.newRanges[n];if(0>ov(t,r,e,!0))break;t+=this.newRanges[n+1]}return r?t:new oa(t)}invert(){return ow.from(this.newRanges,this.oldRanges)}toString(){return JSON.stringify(this.oldRanges)+"\n"+JSON.stringify(this.newRanges)}toJSON(){return{id:this.constructor.mapId,oldRanges:this.oldRanges,newRanges:this.newRanges}}static fromJSON(t){return this.from(t.oldRanges,t.newRanges)}}ow.empty=ow.from([],[]),ow.register();class oM extends ox(oh){static #t=this.mapId="groupPos";constructor(t,e){if(super(),!t)return;let n=[],r=e;for(let i=0;i<t.length;++i){let a=t[i],s=a.pos,o=a.node.nodeSize;n.push(s,o,null),s<e&&(r-=o)}let i=r;for(let t=0;t<n.length;t+=3)n[t+2]=i,i+=n[t+1];this.posMap=new ob([r,0,1,i,0,1]),this.shiftPosMap=new ow(n),this.group=!0}static from(t,e,n){let r=new oM;return r.posMap=t,r.shiftPosMap=e,r.group=!!n,r}isMappable(){return this.posMap.isMappable()||this.shiftPosMap.isMappable()}mapResult(t,e){let n;return this.group?(t=this.shiftPosMap.map(t,e),n=this.posMap.mapResult(t,e)):(n=this.posMap.mapResult(t,e)).pos=this.shiftPosMap.map(n.pos,e),n}map(t,e){return this.group?(t=this.shiftPosMap.map(t,e),t=this.posMap.map(t,e)):(t=this.posMap.map(t,e),t=this.shiftPosMap.map(t,e)),t}mapNodeResult(t,e){let n;return this.group?(t=this.shiftPosMap.mapNode(t,e),n=this.posMap.mapNodeResult(t,e)):(n=this.posMap.mapNodeResult(t,e)).pos=this.shiftPosMap.mapNode(n.pos,e),n}mapNode(t,e){return this.group?(t=this.shiftPosMap.mapNode(t,e),t=this.posMap.mapNode(t,e)):(t=this.posMap.mapNode(t,e),t=this.shiftPosMap.mapNode(t,e)),t}recover(t){return this.posMap.recover(t)}touches(t,e){return this.posMap.touches(t,e)}invert(){return oM.from(this.posMap.invert(),this.shiftPosMap.invert(),!this.group)}toString(){return(this.group?"group":"ungroup")+"\n"+JSON.stringify(this.posMap)+"\n"+JSON.stringify(this.shiftPosMap)}toJSON(){return{id:this.constructor.mapId,posMap:this.posMap?.toJSON(),shiftPosMap:this.shiftPosMap?.toJSON(),group:this.group}}static fromJSON(t){return this.from(t.posMap&&oh.deserializeJSON(t.posMap),t.shiftPosMap&&oh.deserializeJSON(t.shiftPosMap),t.group)}}function o_(t,e,n,r,i){let a=r?"mapNode":"map";for(let r=i||0;r<t.length;r++)e=t[r][a](e,n);return e}function oA(t,e,n,r,i){let a=!1,s=r?"mapNodeResult":"mapResult";for(let r=i||0;r<t.length;r++){let i=t[r][s](e,n);e=i.pos,i.deleted&&(a=!0)}return new oa(e,a)}function oS(t,e,n,r,i){return new(r?oo:os)(oA(t,e,1,r,i),oA(t,n,-1,r,i))}function oC(t){return T(t,"map",function(t,e,n,r,i,a){return i||!this.inverted==!a?t:this._map(t,e,n,r)},!1),T(t,"_map",function(t,e,n,r){return S()},!1),T(t,"invert",function(){return S()},!1),t.mapType="custom",t}function oI(t){T(t,"invert",function(){return new this.constructor(this.pos,this.ranges,!this.inverted)}),T(t,"_map",function(t){if(!t)return null;Array.isArray(t)||(t=[t]);for(let e=0,n=t.length;e<n;++e){let n=t[e],r=this.run(n.index,n.bias,!n.deleted&&n.sticky,!1);n.index=r.pos,r.deleted&&(n.deleted=!0)}return t});let e=Object.prototype.hasOwnProperty.call(t.prototype,"map");if(oC(t),!e){let e=t.prototype.map;T(t,"map",function(t,n,r,i,a,s){return n!==this.pos?t:e.apply(this,arguments)},!0)}return t}oM.empty=oM.from(ob.empty,ow.empty,!0),oM.register(),oC(class{constructor(t){this.maps=t}map(t,e,n,r,i,a){let s=this.maps;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let l=s[o];l&&(t[o]=l.map(t[o],e,n,r,i,a))}}invert(){let t=this.maps,e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n].invert());return new this.constructor(e)}}),oI(class extends od{constructor(t,e,n){super(e,n),this.pos=t}}),oI(class extends op{constructor(t,e,n){super(e,n),this.pos=t}}),oI(class extends og{constructor(t,e){super(e),this.pos=t}invert(){return new this.constructor(this.pos,!this.inverted)}});class oP{constructor(t){this.inverted=!!t,this.hash_map=new Map}get size(){return this.hash_map.size}set(t,e){let n=this.hash_map.get(t);return n&&(e=ok.merge(n,e)),this.hash_map.set(t,e)}get(t){return this.hash_map.get(t)}invert(){let t=new oP(!this.inverted);return this.hash_map.forEach(function(e,n){t.set(n,e.invert())}),t}_map(t,e){let n=this.get(e);return n&&(t=n.applyResult(t)),t}}oC(oP);class oT{invert(){throw Error("Override me!")}apply(t,e){throw Error("Override me!")}applyResult(t,e){throw Error("Override me!")}}class ok extends oT{constructor(t){super(),this.items=t}static merge(t,e){return t instanceof ok?t.append(e):new ok([t,e])}append(t){return this.items.push(t),this}invert(){let t=[];for(let e=this.items.length-1;e>=0;--e)t.push(this.items[e].invert());return new ok(t)}apply(t,e){for(let n=0;n<this.items.length;++n)t=this.items[n].apply(t,e);return t}applyResult(t,e){for(let n=0;n<this.items.length;++n)t=this.items[n].applyResult(t,e);return t}}class oL extends oy(){get maps(){return this.posMaps}set maps(t){this.posMaps=t}get customs(){return this.customMaps}set customs(t){this.customMaps=t}get innerMapTo(){return this.mapTo??this.length}mapResult(t,e,n){return this.run(t,e,!1,!1,n)}map(t,e,n){if(this.mirror.length)return this.run(t,e,!1,!0,n);let r=this.maps;for(let n=this.mapFrom,i=this.innerMapTo;n<i;++n)t=r[n].map(t,e);return t}mapNodeResult(t,e,n){return this.run(t,e,!0,!1,n)}mapNode(t,e,n){if(this.mirror.length)return this.run(t,e,!0,!0,n);let r=this.maps;for(let n=this.mapFrom,i=this.innerMapTo;n<i;++n)t=r[n].mapNode(t,e);return t}runCustom(t,e,n,r,i,a,s){if(null==e)return;let o=this.customs[t];o&&o.map(e,n,r,i,a,s)}run(t,e,n,r,i){let a=!1,s,o=i&&i.map_custom,l=this.maps;for(let r=this.mapFrom,h=this.innerMapTo;r<h;this.runCustom(r,o,t,e,n,a,!0),r++){this.runCustom(r,o,t,e,n,a,!1);let u=l[r],c=s&&s[r];if(null!=c&&u.touches(t,c)){let e=u.recover(c);if(!isNaN(e)){t=e;continue}}let d=n?u.mapNodeResult(t,e,i):u.mapResult(t,e,i);if(null!=d.recover){let e=this.getMirror(r);if(e>r&&e<h)if(d.deleted){let n=this.maps[e].recover(d.recover);if(!isNaN(n)){r=e,t=n;continue}}else s||(s=Object.create(null)),s[e]=d.recover}d.deleted&&(a=!0),t=d.pos}return r?t:new oa(t,a)}}class oD extends oL{static #t=this.empty=new oD;constructor(t,e,n=0,r=[]){super(),this.posMaps=t||[],this.customMaps=e||Array(this.posMaps.length).fill(null),this.mapFrom=n,this.mapTo=void 0,this.mirror=r,this.assertValid()}assertValid(){this.posMaps.length!==this.customMaps.length&&(this.customMaps.length=this.posMaps.length),this.mirror.length%2!=0&&(this.mirror.length-=1)}get length(){return this.posMaps.length}getMappingCount(){return this.innerMapTo-this.mapFrom}isMappable(){return!!this.length}getPosMaps(){return this.posMaps}getMirror(t){let e=this.mirror.findIndex(e=>e===t);return e<0?-1:this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror.push(t,e)}forEachMirror(t,e){let n=this.mirror,r=n.length;for(let i=0,a=0;a<r;++i,a+=2)t.call(e,n[a],n[a+1],i)}shiftMirrors(t){let e=this.mirror;for(let n=0,r=e.length;n<r;++n)e[n]+=t}unshift(t,e,n){this.posMaps.unshift(t||ob.empty),this.customMaps.unshift(e),this.shiftMirrors(1),null!=n&&this.setMirror(0,n+1)}push(t,e,n){this.posMaps.push(t||ob.empty),this.customMaps.push(e),null!=n&&this.setMirror(this.length-1,n)}prependMapping(t){this.posMaps.unshift(...t.posMaps),this.customMaps.unshift(...t.customMaps),this.shiftMirrors(t.length),t instanceof oD&&this.mirror.push(...t.mirror)}appendMapping(t){let e=this.length;this.posMaps.push(...t.posMaps),this.customMaps.push(...t.customMaps),t instanceof oD&&t.forEachMirror((t,n)=>{this.setMirror(e+t,e+n)})}prepend(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(this.prependMapping,this)}append(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(this.appendMapping,this)}concat(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.slice();return e.forEach(r.appendMapping,r),r}slice(t,e){let n=this.length;[t,e]=tV(t,e,n);let r=this.mirror;if(0===t&&e===this.length)r=r.slice();else{let n=[];for(let i=0,a=r.length;i<a;i+=2){let a=r[i],s=r[i+1];a>=t&&a<e&&s>=t&&s<e&&n.push(a-t,s-t)}r=n}return new this.constructor(this.posMaps.slice(t,e),this.customMaps.slice(t,e),0,r)}withMappingRange(t,e,n){let{mapFrom:r,mapTo:i}=this;"number"==typeof t&&(this.mapFrom=t),"number"==typeof e&&(this.mapTo=e),n(this),this.mapFrom=r,this.mapTo=i}computeChangeRange(){var t;let e,n,r;return t=this.posMaps,e=!1,n=Number.MAX_SAFE_INTEGER,r=0,(t.forEach(t=>{t instanceof ob&&t.forEach((t,i)=>{n=Math.min(n,t),r=Math.max(r,t+i),e=!0}),e&&(n=t.map(n,-1),r=t.map(r,1))}),e)?[n,r]:null}invert(){let t=[],e=[],{posMaps:n,customMaps:r}=this;for(let i=this.length-1;i>=0;--i)t.push(n[i].invert()),e.push(r[i]?.invert());let i=this.length-1,a=this.mirror.map(t=>i-t);return new this.constructor(t,e,0,a)}static from(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=new this;return r.append(...e),r}}class oR extends rP{}class oN{constructor(t,e){this.succ=!0,this.doc=t,this.commentStore=e}get comments(){return this.commentStore}get comment_store(){return this.commentStore}set comment_store(t){this.commentStore=t}}class oO{constructor(t){this.succ=!1,this.reason=t}get failed(){return this.reason}}let oj={ok:(t,e)=>new oN(t,e),fail:t=>new oO(t),fromReplace(t,e,n,r){try{return oj.ok(t.replace(e,n,r))}catch(t){if(t instanceof rT)return oj.fail(t.message);throw t}},fromReplaceFunc(t,e){try{return oj.ok(t.call(e))}catch(t){if(t instanceof rT)return oj.fail(t.message);throw t}}};class oE{constructor(t){if(void 0===t.status)throw Error("not given a status");this.id=t.id,"number"==typeof t.author?(this.author=t.author,this.authorName=t.authorName||""):(this.author=0,this.authorName=t.authorName||t.author||""),this.status=t.status,this.text=t.text||"",this.timestamp=t.timestamp||0,this.lastModified=t.lastModified||0}isOpened(){return 0===this.status}isResolved(){return 1===this.status}isAuthor(t){return 0===t||this.author===t}editText(t){if(!t.text)throw Error("empty string is not allowed");return this.copy({text:t.text,lastModified:t.lastModified})}toJSON(){return{id:this.id,author:this.author,authorName:this.authorName||void 0,status:this.status,text:this.text,timestamp:this.timestamp,lastModified:this.lastModified}}static fromJSON(t){throw Error("BaseComment is not constructable.")}}class oV extends oE{constructor(t){super(t)}isReopened(){return 2===this.status}copy(t){return new this.constructor(Object.assign(this.toObject(),t))}toObject(){return this.toJSON()}static fromJSON(t){return new this(t)}}class oB extends oE{constructor(t){super(t),this.type=t.type,this.replies=t.replies||[]}isDiscussion(){return 0===this.type}isSuggestion(){return 1===this.type}getReply(t){return this._ensureReplyIndexInBound(t),this.replies[t]}_ensureReplyIndexInBound(t){if(t<0||t>=this.replies.length){var e;throw e=this.replies.length,Error(`Request #${t}, only ${e} replies`)}}reply(t){if(1===this.status){let e=this.constructor.createReply({...t,status:2});return this.copy({status:0,replies:this.replies.concat(e)})}{let e=this.constructor.createReply(t);return this.copy({replies:this.replies.concat(e)})}}resolve(t){return this._setStatus(t,1,1)}reopen(t){return this._setStatus(t,0,2)}_setStatus(t,e,n){if(this.status===e)return this;let r=this.constructor.createReply({...t,status:n,text:""});return this.copy({status:e,replies:this.replies.concat(r)})}removeReply(t){this._ensureReplyIndexInBound(t.replyIndex);let e=this.replies.slice();return e.splice(t.replyIndex,1),this.copy({replies:e})}editReplyText(t){this._ensureReplyIndexInBound(t.replyIndex);let e=this.replies.slice();return e[t.replyIndex]=e[t.replyIndex].editText(t),this.copy({replies:e})}copy(t){return new this.constructor(Object.assign(this.toObject(),t))}toObject(){return Object.assign(super.toJSON(),{type:this.type,replies:this.replies.slice()})}toJSON(){return Object.assign(super.toJSON(),{type:this.type,replies:this.replies.map(t=>t.toJSON())})}static fromJSON(t){return new this({...t,replies:(t.replies||[]).map(this.createReply,this)})}static createReply(t){return oV.fromJSON(t)}}var oz=n(11312);class oF extends oz.EventEmitter{constructor(t){super(),this.comments=t||Object.create(null)}getCommentById(t,e){void 0===e&&(e=!1);let n=this.comments[t]||null;if(!n&&e)throw Error(`Comment id: "${t}" Not Found`);return n}getBy(t,e){return this.getCommentById(t,e)}getComments(){return this.comments}getAllCommentIds(){return Object.keys(this.comments)}getAllCommentValues(){return Object.values(this.comments)}getCommentCount(){return this.getAllCommentIds().length}forEach(t,e){let n=this.comments;for(let r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&t.call(e,n[r],r,n))break}copy(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this,{comments:{...this.comments}})}setComment(t){let e=this.copy();return e.comments[t.id]=t,this.emit("commentChanged",[[t.id,t.toJSON()]]),e}deleteComment(t){let e=this.copy();return delete e.comments[t],this.emit("commentChanged",[[t,null]]),e}createComment(t,e){if(this.getCommentById(e.id))throw Error(`Comment id "${e.id}" already exists in store`);if(t!==e.author)throw Error("Can only create comment by yourself");if(0===e.type&&0!==e.status)throw Error("Can only create open status discussion.");let n=this.constructor.createComment(e);return this.setComment(n)}removeComment(t,e){if(!this.getCommentById(e.target,!0).isAuthor(t))throw Error("Can only remove comment created by self");return this.deleteComment(e.target)}reply(t,e){let n=this.getCommentById(e.target,!0);return this.setComment(n.reply(e))}removeReply(t,e){let n=this.getCommentById(e.target,!0),r=n.getReply(e.replyIndex);if(!r.isAuthor(t))throw Error(`No permission to remove reply in reply \`${r.id}\` of comment \`${n.id}\` by uid ${t}.`);return this.setComment(n.removeReply(e))}resolve(t,e){let n=this.getCommentById(e.target,!0);return this.setComment(n.resolve(e))}reopen(t,e){let n=this.getCommentById(e.target,!0);return this.setComment(n.reopen(e))}editCommentText(t,e){let n=this.getCommentById(e.target,!0);if(!n.isOpened())throw Error(`Unable to edit comment text in a resolved comment \`${n.id}\`.`);if(!n.isAuthor(t))throw Error(`No permission to edit comment text in comment \`${n.id}\` by uid ${t}.`);return this.setComment(n.editText(e))}editReplyText(t,e){let n=this.getCommentById(e.target,!0);if(!n.isOpened())throw Error(`Unable to edit reply text in a resolved comment \`${n.id}\`.`);let r=n.getReply(e.replyIndex);if(r.isResolved()||r.isReopened()&&!r.text)throw Error(`Unable to edit reply text in a resolved/reopened reply \`${r.id}\` of comment \`${n.id}\`.`);if(!r.isAuthor(t))throw Error(`No permission to edit reply text in reply \`${r.id}\` of comment \`${n.id}\` by uid ${t}.`);return this.setComment(n.editReplyText(e))}toJSON(){return Object.keys(this.comments).map(t=>this.comments[t].toJSON())}static fromJSON(t){return new this(this.createComments(t||[]))}static createComment(t){return oB.fromJSON(t)}static createComments(t){return t.reduce((t,e)=>{let n=this.createComment(e);return t[n.id]=n,t},Object.create(null))}}window._Pinia;let oG=Object.create(null);class oH{static #t=this.stepType="";get stepType(){return this.jsonID}is(t){return this.stepType===t}prepare(){return this.doPrepare()}doPrepare(){return{step:this}}apply(t,e){try{let n=this.doApply(t,e);if(n instanceof rF)return oj.ok(n,e);if(n instanceof oF)return oj.ok(t,n);if(n&&"object"==typeof n&&"boolean"==typeof n.succ)return n;else return oj.fail("string"==typeof n?n:`Invalid returned value of Step.prototype.doApply(). (${n})`)}catch(t){if(t instanceof rT||t instanceof oR)return oj.fail(t.message);throw t}}doApply(t,e){throw Error("must override")}invert(t,e){try{return this.doInvert(t,e)}catch(t){return ad.default.error("Caught exception during Step.invert()."),ad.default.error(t instanceof Error?t.stack:t),null}}doInvert(t,e){return null}posMap(t){return this.doCreatePosMap(t)??ob.empty}doCreatePosMap(t){return null}customMap(t){return null}map(t){return this.doMap(t)}doMap(t){return null}relay(t,e,n){let r=n.apply(t,e);if(!r.succ)throw new rT(r.reason);return r.commentStore||(r.commentStore=e),r}deepCopy(t,e){return this.constructor.fromJSON(t,this.toJSON(e))}toJSON(t){let e={stepType:this.jsonID};for(let n in this)if(Object.hasOwn(this,n)){let r=this[n];e[n]=r&&"object"==typeof r&&"toJSON"in r&&"function"==typeof r.toJSON?r.toJSON(t):r}return e}static fromJSON(t,e){return this.stepClass(e.stepType).fromJSON(t,e)}static create(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return new this(...e)}static register(t,e){if(void 0===e&&(e=this),t in oG)throw RangeError(`Duplicate use of step JSON ID \`${t}\`.`);oG[t]=e,e.stepType=t,e.prototype.jsonID=t}static jsonID(t,e){return this.register(t,e),e}static stepClass(t){let e=oG[t];if(!e)throw RangeError(`No step named ${t}`);return e}static normalizeStepId(t){return t.replace(/V\d+$/i,"")}}oH.prototype.jsonID="";class oW extends oH{constructor(t){super(),this.pos=t}checkNode(t){return this.constructor.checkNode(t)}resolvePos(t,e){return this.constructor.resolvePos(t,this.pos,e)}doApply(t,e){return this.applyAtPos(this.resolvePos(t,!0),e)}applyAtPos(t,e){return t.root}doInvert(t,e){let n=this.resolvePos(t);return n&&this.invertAtPos(n)}invertAtPos(t){return null}doCreatePosMap(t){let e=this.resolvePos(t);return e&&this.createPosMapAtPos(e)}createPosMapAtPos(t){return null}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e)}mapPos(t){let e=t.mapNodeResult(this.pos,1);return e.deleted?null:e.pos}static fromJSON(t,e){return new this(e.pos)}static checkNode(t){return!0}static resolvePos(t,e,n){let r=t.resolve(e),i=r.self;if(!i||!this.checkNode(i))if(!n)return null;else throw new rT(`No valid node at position ${e}.`);return r}}class oq extends oy(ap){get comment_stores(){return this.commentStores}set comment_stores(t){this.commentStores=t}get maps(){return this.posMaps}set maps(t){this.posMaps=t}get customs(){return this.customMaps}set customs(t){this.customMaps=t}_updateSelection(t,e){return t.map(this.doc,e?this.toRemapping(e):this)}updateSelection(){let t=this._multiSelection;if(!t)return;let e=this._sel_at;e>=this.length||this.select(this._updateSelection(t,e),!0)}_select(t,e){return this._sel_at=this.steps?this.steps.length:0,super._select(...arguments)}storeSelection(){this._stored||(this._stored=[]),this._stored.push(this._multiSelection,this._selection,this._sel_at)}restoreSelection(t){let e=this._stored;if(!e)return!1;let n=e.length;return!!e.length&&(t?(this._multiSelection=e[0],this._selection=e[1],this._sel_at=e[2],e.length=0):(this._multiSelection=e[n-3],this._selection=e[n-2],this._sel_at=e[n-1],e.length=n-3),!0)}isMappable(){return!!this.length}getPosMaps(){return this.maps}mapRange(t,e,n){return oS(this.maps,t,e,!1,n)}mapResult(t,e,n){return oA(this.maps,t,e,!1,n)}map(t,e,n){return o_(this.maps,t,e,!1,n)}mapNodeRange(t,e,n){return oS(this.maps,t,e,!0,n)}mapNodeResult(t,e,n){return oA(this.maps,t,e,!0,n)}mapNode(t,e,n){return o_(this.maps,t,e,!0,n)}toRemapping(t){return new oD(this.maps,this.customs,t)}}class oU extends rP{}class oZ extends oq{constructor(t,e,n){super(t,e,n),this.docs=[],this.commentStores=[],this.steps=[],this.posMaps=[],this.customMaps=[]}get length(){return this.steps.length}get baseDoc(){return this.length?this.docs[0]:this.doc}get baseCommentStore(){return this.length?this.commentStores[0]:this.commentStore}get lastDoc(){let t=this.length;return t?this.docs[t-1]:void 0}get lastCommentStore(){let t=this.length;return t?this.commentStores[t-1]:void 0}get lastStep(){let t=this.length;return t?this.steps[t-1]:void 0}get lastPosMap(){let t=this.length;return t?this.posMaps[t-1]:void 0}get lastCustomMap(){let t=this.length;return t&&this.customMaps[t-1]||void 0}get selection(){return this.updateSelection(),this._selection}get multiSelection(){return this.updateSelection(),this._multiSelection}selectText(t,e,n){void 0===n&&(n=m);let{stateIndex:r}=n;return"number"==typeof r&&r<this.length&&(t=this.map(t,1,r),"number"==typeof e&&(e=this.map(e,1,r))),super.selectText(t,e,n)}selectNode(t,e){void 0===e&&(e=m);let{stateIndex:n}=e;return"number"==typeof n&&n<this.length&&(t=this.mapNode(t,1,n)),super.selectNode(t,e)}runWithSelectionRecovery(t){this.storeSelection();let e=t(this);return this.restoreSelection(),e}step(t,e){let n=this.maybeStep(t,e);if(!n.succ)throw new oU(n.reason);return this}maybeStep(t,e){return this.addStep(t.prepare().step)}addStep(t){let e=t.apply(this.doc,this.commentStore);return e.succ&&!e.commentStore&&(e.commentStore=this.commentStore),e.succ&&this.saveStepResult(t,e),e}saveStepResult(t,e){let{doc:n,commentStore:r}=this;this.docs.push(n),this.commentStores.push(r),this.steps.push(t),this.posMaps.push(t.posMap(n)),this.customMaps.push(t.customMap(n)),this.doc=e.doc,this.commentStore=e.commentStore,this.clearActiveMarks()}cherryPick(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t,e,n,r,i,a){void 0===i&&(i=oD.empty),void 0===a&&(a=m),C(e.length===n.length&&e.length===r.length,`In rebasing, the length of given steps (${e.length}), posMaps (${n.length}), customMaps (${r.length}) must be same.`);let{discardBase:s,suppressFailure:o}=a,l=e.length,h=new oD(n.map(t=>t?t.invert():ob.empty).reverse(),r.map(t=>t&&t.invert()).reverse());h.append(i,t),h.mapFrom=l;for(let n=0;n<l;++n){let r=e[n].map(h);if(--h.mapFrom,!r)continue;s||(r=r.deepCopy(t.schema));let i=t.maybeStep(r);if(!i.succ)if(o)continue;else throw new oU(i.reason);h.push(t.lastPosMap,t.lastCustomMap,h.mapFrom)}return h}(this,...e)}hasDoneReplace(){return this.steps.some(t=>"replace"===t.jsonID||"replaceAround"===t.jsonID)}toMapping(t,e){return new oD(this.posMaps.slice(t,e),this.customMaps.slice(t,e))}forEach(t,e){let{length:n,steps:r,posMaps:i,customMaps:a}=this;for(let s=0;s<n&&!t.call(e,r[s],i[s],a[s],s);++s);}}class o$ extends oH{constructor(t,e){super(),this.root=t,this.comments=e}doApply(){return oj.ok(this.root.updateStateAndTrim({force:!0}),oF.fromJSON(this.comments))}doInvert(t,e){return new o$(t,e.toJSON())}doCreatePosMap(t){return ob.create([0,t.getContentSize(),this.root.getContentSize()])}doMap(){return this}static fromJSON(t,e){return new this(t.nodeFromJSON(e.root),e.comments)}}function oJ(t,e,n,r){void 0===r&&(r=rr.empty);let i=function(t,e,n){let r=function(t,e){let n=t.depth,r=null,i=[],a=null;for(let s=e.openLeft;;--s){let o,l,h;if(s>=0)s>0?{type:o,attrs:l,content:h}=oY(e.content,s):0==s&&(h=e.content),s<e.openLeft&&(h=h.cut(h.firstChild.nodeSize));else if(a){h=rn.empty;let t=a[a.length+s-1];o=t.type,l=t.attrs}if(r&&(h=h.prepend(r)),0==h.size&&s<=0)break;let u=function(t,e,n,r){let i=!1;for(let e=0;e<t.childCount;e++)t.child(e).marks.length&&(i=!0);for(let a=n;a>=0;a--){let n=e.node(a).contentMatchAt(e.indexAfter(a)),s=r[a];s&&(n=n?.matchFragment(s.content));let o=n?.fillBefore(t);if(o)return{depth:a,fragment:(s?s.content.append(o):o).append(t)};if(i){let e=function(t,e){let n=[];for(let r=0;r<e.childCount;r++){let i=e.child(r),a=i.mark(i.marks.filter(e=>t.allowsMark(e.type)));if(!(t=t.matchNode(a)))return null;n.push(a)}return rn.from(n)}(n,t);if(e)return{depth:a,fragment:s?s.content.append(e):e}}}}(h,t,n,i);if(u&&function(t,e,n,r,i){if(i<1)return!1;for(;e>n;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e));if(n){for(let t=i-1;t>=0;t--)if(n.matchNode(oY(r.content,t)))return!0}}return!1}(t,n,u.depth,e,s)&&(u=null),u){if(u.fragment.size>0&&(i[u.depth]={content:u.fragment,openRight:s>0?0:e.openRight-s,depth:u.depth}),s<=0)break;r=null,n=u.depth-+(o==t.node(u.depth).type)}else{if(0==s){let e=t.node(0),n=e.contentMatchAt(t.index(0))?.findWrapping(h.firstChild.type,h.firstChild.attrs);if(!n||0==n.length)break;let r=n[n.length-1];if(!r.type.contentExpr.matches(r.attrs,h))break;a=[{type:e.type,attrs:e.attrs}].concat(n),{type:o,attrs:l}=r}h.size?(h=o.contentExpr.start(l).fillBefore(h,!0)?.append(h),r=o.create(l,h)):r=null}}return i}(t,n),i=function(t,e){let{content:n,openRight:r}=function t(e,n,r,i){let a=rn.empty,s=0,o=r[n];if(e.depth>n){let l=t(e,n+1,r,i||o);s=l.openRight+1,a=rn.from(e.node(n+1).copy(l.content,null,null))}return o&&(a=a.append(o.content),s=o.openRight),i&&(a=a.append(e.node(n).contentMatchAt(e.indexAfter(n))?.fillBefore(rn.empty,!0)),s=0),{content:a,openRight:s}}(t,0,e,!1);return new rr(n,t.depth,r||0)}(t,r),a=function(t,e,n){let r=function t(e,n,r,i,a,s,o){let l,h=e.childCount,u=h-+(o>0);l=s<0?n.contentMatchAt(u):1==h&&o>0?r.node(a).contentMatchAt(s?r.index(a):r.indexAfter(a)):r.node(a).contentMatchAt(r.indexAfter(a))?.matchFragment(e,h>0&&s?1:0,u);let c=i.node(a);if(o>0&&a<i.depth){let n=c.content.cutByIndex(i.indexAfter(a)).prepend(e.lastChild),u=l?.fillBefore(n,!0);if(u&&u.size&&s>0&&1==h&&(u=null),u){let n=t(e.lastChild.content,e.lastChild,r,i,a+1,1==h?s-1:-1,o-1);if(n){let t=e.lastChild.copy(n);return u.size?e.cutByIndex(0,h-1).append(u,t):e.replaceChild(h-1,t)}}}o>0&&l&&(l=l.matchNode(1==h&&s>0?r.node(a+1):e.lastChild));let d=i.index(a);if(d==c.childCount&&!c.type.compatibleContent(n.type))return null;let p=l?.fillBefore(c.content,!0,d);if(!p)return null;if(o>0){let t=function t(e,n,r,i,a){let s,o=e.content,l=o.childCount;if(s=a>=0?r.node(i).contentMatchAt(r.indexAfter(i))?.matchFragment(o,+(a>0),l):e.contentMatchAt(l),n>0){let e=t(o.lastChild,n-1,r,i+1,1==l?a-1:-1);o=o.replaceChild(l-1,e)}return e.copy(o.append(s?.fillBefore(rn.empty,!0)))}(e.lastChild,o-1,r,a+1,1==h?s-1:-1);e=e.replaceChild(h-1,t)}return e=e.append(p),i.depth>a&&(e=e.append(function t(e,n){let r=e.node(n),i=r.contentMatchAt(0)?.fillBefore(r.content,!0,e.index(n));return e.depth>n&&(i=i?.append(t(e,n+1))),r.copy(i,null,null,{filter_copyable:!0})}(i,a+1))),e}(n.content,t.node(0),t,e,0,n.openLeft,n.openRight);if(!r)return null;for(var i=r,a=n.openLeft,s=e.depth;a>0&&s>0&&1==i.childCount;)i=i.firstChild.content,a--,s--;return new rr(i,a,s)}(t,e,i);return a?{fittedLeft:i,fitted:a}:null}(t.resolve(e),t.resolve(n),r);return i?i.fitted:null}o$.register("overwrite"),tY(oZ.prototype,{overwrite(t,e){if("doc"!==t.type)throw Error(`Invalid root type: ${t.type}`);return this.step(new o$(this.schema.nodeFromJSON(t),e))}});function oY(t,e){for(let n=1;n<e;n++)t=t.firstChild.content;return t.firstChild}class oX extends oH{constructor(t,e,n,r){super(),this.from=t,this.to=e,this.slice=n,this.structure=!!r}doPrepare(){return{step:new this.constructor(this.from,this.to,this.slice.deepCopy({target:"replace"}),this.structure),replacements:[{pos:this.from,insertionSlice:this.slice}]}}doApply(t){let{from:e,to:n,slice:r}=this;return this.structure&&oK(t,e,n)?"Structure replace would overwrite content":t.replace(e,n,r.deepCopy({target:"replace"}))}doInvert(t){return new this.constructor(this.from,this.from+this.slice.size,t.slice(this.from,this.to).deepCopy({target:"replace"}))}doCreatePosMap(t){return ob.create([this.from,this.to-this.from,this.slice.size])}doMap(t){let e=t.mapRange(this.from,this.to);return e.deleted?null:new this.constructor(e.from,Math.max(e.from,e.to),this.slice)}static fromJSON(t,e){return new this(e.from,e.to,rr.fromJSON(t,e.slice))}}oX.register("replace");class oQ extends oH{constructor(t,e,n,r,i,a,s,o){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=!!s,this.skipSuggest=!!o}doPrepare(){return{step:new this.constructor(this.from,this.to,this.gapFrom,this.gapTo,this.slice.deepCopy({target:"replace"}),this.insert,this.structure,this.skipSuggest)}}doApply(t){if(this.structure&&(oK(t,this.from,this.gapFrom)||oK(t,this.gapTo,this.to)))return"Structure gap-replace would overwrite content";let e=t.slice(this.gapFrom,this.gapTo);if(e.openLeft||e.openRight)return"Gap is not a flat range";let n=this.slice.deepCopy({target:"replace"}).insertAt(this.insert,e.content);return n?t.replace(this.from,this.to,n):"Content does not fit in gap"}doInvert(t){let e=this.gapTo-this.gapFrom;return new this.constructor(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from).deepCopy({target:"replace"}),this.gapFrom-this.from,this.structure)}doCreatePosMap(t){return ob.create([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}doMap(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return e.deleted&&n.deleted||r<e.pos||i>n.pos?null:new this.constructor(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}static fromJSON(t,e){return new this(e.from,e.to,e.gapFrom,e.gapTo,rr.fromJSON(t,e.slice),e.insert,e.structure)}}function oK(t,e,n){let r=t.resolve(e),i=n-e,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)===r.node(a).childCount;)a--,i--;if(i>0){let t=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!t||t.type.isLeaf)return!0;t=t.firstChild,i--}}return!1}oQ.register("replaceAround"),tY(oZ.prototype,{fitSlice(t,e,n){return oJ(this.doc,t,e,n)},getReplaceStep(t,e,n){let r=this.fitSlice(t,e,n);return r?new oX(t,e,r):null},replace(t,e,n,r){void 0===e&&(e=t);let i=rr.from(n);if(t===e&&0===i.size)return this;let a=this.getReplaceStep(t,e,i);return a?this.step(a,r):this},delete(t,e){return this.replace(t,e,rr.empty)},insert(t,e){return this.replace(t,t,e)}});class o0 extends oW{constructor(t,e){super(t),this.attrs=e}applyAtPos(t,e){let{doc:n,pos:r,self:i}=t,a=this.attrs;if(a){let t=a.synocomment;if(t&&Array.isArray(t)&&t.length>0){let n;for(let r=0;r<t.length;++r){let i=t[r];if(e.getCommentById(i)){n&&n.push(i);continue}n||(n=t.slice(0,r))}n&&(a=Object.assign({},this.attrs,{synocomment:n.length?n:null}))}}let s=a?i.copy(i.content,i.type.settableAttrValues(a)):i.type.create(null,i.content,i.marksRaw);return n.replace(r,r+i.nodeSize,rr.from(s))}invertAtPos(t){let e=t.self;return new this.constructor(t.pos,e.type.invertAttrs(e.attrs,this.attrs))}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.attrs)}static fromJSON(t,e){return new this(null!=e.pos?e.pos:e.from,e.attrs)}}function o1(t,e){let n=t.doc.resolve(e).self;if(!n)throw new oU(`No node at pos ${e}.`);return n}oH.jsonID("setNodeAttrs",o0),tY(oZ.prototype,{setNodeAttrs(t,e){let n=o1(this,t);if(e?!nH.checkAttrs(n.type.attrs,e):null!==e)throw new oU(`Invalid attrs for node type ${n.type.name}. ${JSON.stringify(e)}`);return this.step(new o0(t,e))},clearNodeAttrs(t){let e=o1(this,t);if(e.type.clearable){let n;P(e.type.attrs,(t,e)=>{t.clearable&&(n||(n=Object.create(null)),n[e]=null)}),n&&this.setNodeAttrs(t,n)}return this},overwriteNodeAttrs(t,e){let n=o1(this,t);return this.setNodeAttrs(t,n.type.completeAttrValues(e))}});class o2 extends oW{applyAtPos(t){return t.root.replace(t.pos,t.pos+t.self.nodeSize,rr.empty)}invertAtPos(t){return new o5(t.pos,t.self.deepCopy({target:"replace"}))}createPosMapAtPos(t){return ob.create([t.pos,t.self.nodeSize,0])}static fromJSON(t,e){return new this(e.pos??e.from)}}o2.register("deleteNode"),tY(oZ.prototype,{deleteNode(t){return o2.resolvePos(this.doc,t,!0),this.step(new o2(t))}});class o5 extends oH{constructor(t,e){super(),this.pos=t,this.node=e}doPrepare(){return{step:new this.constructor(this.pos,this.node.deepCopy({target:"replace"})),replacements:[{pos:this.pos,insertionSlice:this.node}]}}doApply(t){return t.replace(this.pos,this.pos,rr.from(this.node.deepCopy({target:"replace"})))}doInvert(t){return new o2(this.pos)}doCreatePosMap(t){return ob.create([this.pos,0,this.node.nodeSize])}doMap(t){let{pos:e,deleted:n}=t.mapResult(this.pos,1);return n?null:new this.constructor(e,this.node)}static fromJSON(t,e){return new this(e.pos,t.nodeFromJSON(e.node))}}function o4(t,e,n){let r=JSON.stringify(t.mark.toJSON()),i=n.get(r);i&&i.count===t.count-1?(i.to=t.to,i.count=t.count):(n.set(r,t),e.push(t))}function o8(t,e,n){let r=n?"_addMark":"_removeMark";for(let n=e.length-1;n>=0;--n){let{from:i,to:a,mark:s}=e[n];t[r](i,a,s)}}function o3(t,e){return new rr(function t(e,n,r){let i=[];for(let a=0;a<e.childCount;a++){let s=e.child(a);s.isInline?s=n(s,r,a):s.childCount&&(s=s.copy(t(s.content,n,s))),i.push(s)}return rn.fromArray(i)}(t.content,e,t.possibleParent),t.openLeft,t.openRight)}o5.register("insertNode"),tY(oZ.prototype,{insertNode(t,e,n){return this.step(new o5(t,e),n)}});class o6 extends oH{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t,e){let n=this.mark;if(n.type.is("Tracking")){let t=[],r=!1;for(let i of n.attrs.id)e.getCommentById(i)?t.push(i):r=!0;r&&(n=n.type.create({...n.attrs,id:t}))}let r=o3(t.slice(this.from,this.to),(t,e,r)=>{let i=e.contentMatchAt(r+1);return i&&i.allowsMark(n.type)?t.mark(n.addToSet(t.marks)):t});return oj.fromReplace(t,this.from,this.to,r)}invert(){return new o7(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new o6(e.pos,n.pos,this.mark)}static fromJSON(t,e){return new o6(e.from,e.to,t.markFromJSON(e.mark))}}oH.jsonID("addMark",o6);class o7 extends oH{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=o3(t.slice(this.from,this.to),(function(t,e){let n=this.mark.removeFromSet(t.marks);if(t.marks!==n&&e.type.enableLocalAttrs&&e.type.isMarksBlock&&e.state.inherited_text_marks){let t=this.mark.type.isInSet(e.state.inherited_text_marks);t&&(n=t.addToSet(n))}return t.mark(n)}).bind(this));return oj.fromReplace(t,this.from,this.to,e)}invert(){return new o6(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new o7(e.pos,n.pos,this.mark)}static fromJSON(t,e){return new o7(e.from,e.to,t.markFromJSON(e.mark))}}function o9(t){if(!t)return null;{if("function"==typeof t)return t;if(Array.isArray(t))return t.length?()=>t:null;let e=[t];return()=>e}}oH.jsonID("removeMark",o7),tY(oZ.prototype,{handleMarksBy(t,e,n,r){var i;if(t===e)return this;i=r,r=function(){let t=i(...arguments);return t?Array.isArray(t)?0!==t.length?t:null:[t]:null};let a=0,s=new Map,o=[],l=new Map,h=[],u=[];this.doc.nodesInside(t,e,(i,c,d,p)=>{if(i.type.isInline){++a;let u=i.marks,g=r(u,"inline");if(!g)return;let f=g===u,y=n&&p.contentMatchAt(d+1);for(let r of g){let d;if(f)d=!0;else if(r instanceof nK)d=!!r.isInSet(u);else{if(!(r=r.isInSet(u)))continue;d=!0}if(n){if(d||!y||!y.allowsMark(r.type))continue}else if(!d)continue;let p={from:Math.max(c,t),to:Math.min(c+i.nodeSize,e),mark:r,count:a};if(n){let t=r.type.isInSet(u);t&&o4(Object.assign(Object.create(null),p,{mark:t}),o,s),o4(p,h,l)}else o4(p,o,s)}}else if(i.type.isMarksBlock){if(c<t||c+i.nodeSize>e)return;let a=i.textMarks,s=r(a,"text"),o=i.type.is("ListBlock")&&i.type.isValidListBlock(i)?i.listMarks:null,l=o&&r(o,"list");if(!s&&!l)return;let h=Object.create(null);s&&(h.textMarks=nK.setToJSON(s.reduce((t,e)=>e.type.supportTextblock?e[n?"addToSet":"removeFromSet"](t):t,a))),l&&(h.listMarks=nK.setToJSON(l.reduce((t,e)=>e.type.supportListBlock?e[n?"addToSet":"removeFromSet"](t):t,o))),u.push({pos:c,attrs:h})}},{preset:"editor"}),o8(this,o,!1);for(let t=u.length-1;t>=0;--t){let{pos:e,attrs:n}=u[t];this.setNodeAttrs(e,n)}return o8(this,h,!0),this},_addMark(t,e,n){return this.step(new o6(t,e,n))},_removeMark(t,e,n){return this.step(new o7(t,e,n))},addMarks(t,e,n){let r=o9(n);return r?this.handleMarksBy(t,e,!0,r):this},removeMarks(t,e,n){let r=o9(n);return r?this.handleMarksBy(t,e,!1,r):this},clearMarks(t,e){return this.removeMarks(t,e,t=>t)}});class lt extends oH{constructor(){super()}map(t){return this}}class le extends lt{constructor(t){super(),this.attrs=t}apply(t,e){return oj.ok(t.replaceRootAttrs(t.type.settableAttrValues(this.attrs)),e)}invert(t){return new le(t.type.invertAttrs(t.attrs,this.attrs))}toJSON(){return{stepType:this.jsonID,attrs:this.attrs}}static fromJSON(t,e){return new le(e.attrs)}}oH.jsonID("setRootNodeAttrs",le),oZ.prototype.lift=function(t,e){let{$from:n,$to:r,depth:i}=t,a=n.before(i+1),s=r.after(i+1),o=a,l=s,h=rn.empty,u=0;for(let t=i,r=!1;t>e;t--)r||n.index(t)>0?(r=!0,h=rn.from(n.node(t).copy(h)),u++):o--;let c=rn.empty,d=0;for(let t=i,n=!1;t>e;t--)n||r.after(t+1)<r.end(t)?(n=!0,c=rn.from(r.node(t).copy(c)),d++):l++;return this.step(new oQ(o,l,a,s,new rr(h.append(c),u,d),h.size-u,!0,!0))},oZ.prototype.wrap=function(t,e){let n=rn.empty;for(let t=e.length-1;t>=0;t--)n=rn.from(e[t].type.create(e[t].attrs,n));let r=t.start,i=t.end;return this.step(new oQ(r,i,r,i,new rr(n,0,0),e.length,!0))},oZ.prototype.setRootNodeAttrs=function(t){let e=this.doc;if(!t||!nH.checkAttrs(e.type.attrs,t))throw RangeError(`Invalid attrs ${t} for node type ${e.type.name}`);return this.step(new le(t))},oZ.prototype.split=function(t,e,n,r){void 0===e&&(e=1);let i=this.doc.resolve(t),a=rn.empty,s=rn.empty;for(let t=i.depth,o=i.depth-e;t>o;t--){let e=i.node(t);a=rn.from(e.copy(a,e.type.clearBackwardAttrValues())),n?(r=nH.copyableAttrs(n.attrs,Object.assign(Object.create(null),e.attrs,r)),s=rn.from(n.create(r,s)),n=null):s=rn.from(e.type.create(nH.copyableAttrs(e.type.attrs,e.attrs),s)),r=null}return this.step(new oX(t,t,new rr(a.append(s),e,e,!0)))};oZ.prototype.join=function(t,e,n){if(void 0===e&&(e=1),void 0===n&&(n=!1),n&&(t<e||t+e>this.doc.content.size))return this;let r=new oX(t-e,t+e,rr.empty,!0);return n?this.maybeStep(r):this.step(r),this};class ln extends oH{constructor(t,e){super(),this.from=t,this.to=e}checkResolvedPos(t,e,n){let r=t.resolve(e),i=r.self;return i&&(null==n||n===e+i.nodeSize)?r:null}checkNode(t,e,n){let r=this.checkResolvedPos(t,e,n);return r&&r.self}checkPathData(t,e,n){let r=new nJ(t.resolve(e));return r.node&&(null==n||e+r.node.nodeSize===n)?r:null}mapRange(t,e,n){return new oo(t.mapNodeResult(this.from,1,e),t.mapNodeResult(this.to,-1,n))}checkMapResultDeleted(t,e){return t.deleted||e.deleted||t.pos>=e.pos}mapNodeResult(t,e,n){let r=t.mapNodeResult(e,1),i=t.mapNodeResult(n,-1);return{deleted:this.checkMapResultDeleted(r,i),from:r.pos,to:i.pos}}}class lr extends ln{constructor(t,e,n){super(t,e),this.index=n}resolveIndex(t){let e=t.$pos,n=t.depth-1,r=e.node(n).childCount-1;return{old_index:tj(e.index(n),0,r),new_index:tj(this.index,0,r)}}apply(t,e){let n=this.checkPathData(t,this.from,this.to);if(!n)return oj.fail("No valid node in given from.");this.checkPosMap(t)||this._genPosMap(t,n);let{old_index:r,new_index:i}=this.resolveIndex(n);if(r===i)return oj.ok(t,e);let a=n.$pos,s=n.depth-1,o=a.node(s),l=n.node.copy(n.node.content),h=o.content.replaceChild(r,l).moveTo(r,i),u=o.copy(h);return oj.fromReplace(t,a.before(s),a.after(s),new rr(rn.from(u),0,0))}checkPosMap(t){return this.cache_doc===t&&this.pos_map}_genPosMap(t,e){let n;if(this.cache_doc=t,!e)return this.pos_map=ow.empty;let{old_index:r,new_index:i}=this.resolveIndex(e);if(r===i)return this.pos_map=ow.empty;let a=e.node.nodeSize,s=e.$pos,o=e.depth-1;return n=r<i?s.start(o)+s.node(o).content.offsetAt(i+1)-a:s.start(o)+s.node(o).content.offsetAt(i),this.pos_map=new ow([e.pos,a,n])}genPosMap(t){return t?this.checkPosMap(t)?this.pos_map:this._genPosMap(t,this.checkPathData(t,this.from,this.to)):this.pos_map||ow.empty}posMap(t){return this.genPosMap(t)}invert(t){let e=this.checkPathData(t,this.from,this.to);if(!e)return null;let n=this.mapNodeResult(this.posMap(t),this.from,this.to);return new lr(n.from,n.to,e.$pos.index(e.depth-1))}map(t){let e=this.mapNodeResult(t,this.from,this.to);return e.deleted?null:new this.constructor(e.from,e.to,this.index)}toJSON(t){return{stepType:this.jsonID,from:this.from,to:this.to,index:this.index}}static fromJSON(t,e){return new lr(e.from,e.to,e.index)}}oH.jsonID("orderNode",lr),oZ.prototype.orderNode=function(t,e){return this.step(new lr(t,t+this.doc.nodeAt(t).nodeSize,e))};let li={TYPE:"bar",BAR_DIR:"col",GROUPING:"standard",DATA_DIR:"row",ORIENTATION:"minMax",MARKER_SYMBOL:"circle",LEGEND_POSITION:"r",LABEL_POSITION:"t",LINE_DASH:"solid",BLANK_AS:"gap",BACKGROUND:"#FFFFFF"},la={ROW:"row",COL:"col"},ls={BAR:"bar",LINE:"line",AREA:"area",PIE:"pie",SCATTER:"scatter",HYBRID:"hybrid"},lo={STANDARD:"standard",STACKED:"stacked",PERCENT:"percentStacked"},ll={SEQUENCE:"minMax",REVERSE:"maxMin"},lh={CIRCLE:"circle",DIAMOND:"diamond",TRIANGLE:"triangle",SQUARE:"square",NONE:"none"},lu={TOP:"t",LEFT:"l",RIGHT:"r",BOTTOM:"b"},lc={TOP:"t",LEFT:"l",RIGHT:"r",BOTTOM:"b",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",INSIDE_CENTER:"inCenter"},ld={SOLID:"solid",DASH:"dash",DOT:"dot"},lp={ZERO:"zero",GAP:"gap",SPAN:"span"};function lg(t){return null==t||""===t}function lf(t){return null!=t}function ly(t){return"[object Function]"===Object.prototype.toString.call(t)}function lx(t){return"number"==typeof t&&isFinite(t)}function lm(t){return"string"==typeof t}let lv={titleGap:8,legendWidth:72,padding:{top:32,bottom:32,left:16,right:16},plotGap:12,cm2pxMultiplier:72/2.54/.75};function lb(t){return 1.4*t}function lw(t,e){let n;for(;(n=t.length)&&null==t[n-1];)e&&(t=t.slice(),e=!1),t.pop();return t}function lM(t){return lf(t)?String(t):""}function l_(t){if(t.length<=7)return t;let e=parseInt(t.substr(1,2),16),n=parseInt(t.substr(3,2),16),r=parseInt(t.substr(5,2),16),i=Math.round(parseInt(t.substr(7,2),16)/255*100)/100;return`rgba(${e},${n},${r},${i})`}class lA{constructor(t){this.chartInfo=t}initData(){let t=this.chartInfo.getEmptyCategory(),e=this.chartInfo.getEmptySeries();function n(t){let e=[];for(let n=0;n<t.length;n++)t[n]||e.push(n);return e}this._categoryIndexMap=n(t),this._seriesIndexMap=n(e);let r=this.chartInfo.getSeriesCat(),i=this.chartInfo.calcSeriesData(),a=(e,n)=>!t[n];for(let t of(i=i.filter((t,n)=>!e[n]),r=r.filter(a),i))t.data=t.data.filter(a);this._category=this._processCategory(r),this._data=this._processData(i)}_getNullValue(){return null}_processCategory(t){for(let e=0,n=t.length;e<n;e++)lg(t[e])&&(t[e]="");return t}_processData(t){let e=this._getNullValue();for(let n=0,r=t.length;n<r;n++){let r=t[n].data;for(let t=0,n=r.length;t<n;t++)lx(r[t])||(r[t]=e);t[n].name=this._uniquifyName(t[n].name,n)}return t}_calcPlotBound(){let t=this.chartInfo.ensurePlotArea().ensureLayout();if(!t.getEnabled())return this.chartInfo.calcPlotBound();let e=(t.getTop()||0)*lv.cm2pxMultiplier,n=(t.getLeft()||0)*lv.cm2pxMultiplier;return{top:e,left:n,right:(t.getRight()||0)*lv.cm2pxMultiplier,bottom:(t.getBottom()||0)*lv.cm2pxMultiplier}}convert(t,e){return this._containerWidth=t||560,this._containerHeight=e||410,this._plotBound=this._calcPlotBound(),{title:this.convertTitle(),legend:this.convertLegend(),series:this.convertSeries(),color:this.convertColor(),backgroundColor:this.convertBackground(),textStyle:this.convertTextStyle(this.chartInfo.ensureGlobalTextStyle()),tooltip:this.convertTooltip(),animation:!1}}convertTitle(){let t={top:lv.padding.top,left:"center",itemGap:lv.titleGap},e=this.chartInfo.ensureChartTitle();e&&!e.getHidden()&&Object.assign(t,{text:e.getText(),textStyle:this.convertTextStyle(e.ensureTextStyle())});let n=this.chartInfo.ensureChartSubtitle();return n&&!n.getHidden()&&Object.assign(t,{subtext:n.getText(),subtextStyle:this.convertTextStyle(n.ensureTextStyle())}),t}convertLegend(){let t=this.chartInfo.ensureChartLegend();if(t.getHidden())return{show:!1};let e={selectedMode:!1,itemWidth:12,itemHeight:12,padding:0,formatter:this._getOriginName};switch(t.getPosition()){case"t":{let n=t.ensureTextStyle().getFontSize()||this.chartInfo.ensureGlobalTextStyle().getFontSize();e.top=this._plotBound.top-lv.plotGap-lb(n),e.orient="horizontal";break}case"b":e.bottom=lv.padding.bottom,e.orient="horizontal";break;case"l":e.top=this._plotBound.top,e.right=this._containerWidth-this._plotBound.left+lv.plotGap,e.orient="vertical";break;default:e.top=this._plotBound.top,e.left=this._containerWidth-this._plotBound.right+lv.plotGap,e.orient="vertical"}return e.textStyle=this.convertTextStyle(t.ensureTextStyle()),e.data=this._convertLegendIcon(),e}_convertLegendIcon(){return this._data.map(t=>({name:t.name,icon:"rect"}))}convertSeries(){return this._data.map((t,e)=>this._convertSeries(this.chartInfo.ensureSeries(this._seriesIndexMap[e]),t))}_convertSeries(t,e){let n={name:e.name,data:e.data,emphasis:this._convertSeriesEmphasis(),tooltip:{formatter:this._convertSeriesTooltipFormatter(t)}},r=t.ensureLabel();return r.getHidden()||(n.label=this._convertSeriesLabel(r,t)),n}_convertSeriesEmphasis(){return{itemStyle:{shadowColor:"rgba(0,0,0,0.5)",shadowBlur:6,shadowOffsetY:2}}}_convertSeriesLabel(t,e){let n={show:!0,position:this._switchSeriesLabelPosition(t,e),textBorderWidth:3,...this.convertTextStyle(t.ensureTextStyle())};return n.textBorderColor=n.position.startsWith("inside")?"auto":this.chartInfo.ensureChart().getBackgroundColor(),n}_switchSeriesLabelPosition(t){let e="top";switch(t.getPosition()){case"r":e="right";break;case"b":e="bottom";break;case"l":e="left"}return e}convertColor(){let t=this.chartInfo.getSeriesThemeColors();return this._data.map((e,n)=>(n=this._seriesIndexMap[n],this.chartInfo.getSeriesColor(n)||t[n%t.length]))}convertBackground(){return l_(this.chartInfo.ensureChart().getBackgroundColor())}convertTextStyle(t){return{fontFamily:`"${t.getFontFamily()}"`,fontSize:t.getFontSize(),fontStyle:t.getItalic()?"italic":"normal",fontWeight:t.getBold()?"bold":"normal",color:t.getColor()}}convertTooltip(){return{show:!0,position:"top",transitionDuration:0,padding:[4,12],backgroundColor:"#606264",borderWidth:1,borderColor:"#FFF",extraCssText:"box-shadow: 0 1px 4px rgba(0,0,0,0.1); border-radius: 3px;"}}_convertSeriesTooltipFormatter(t){return e=>{let n="";e.name&&(n+=`<span class="syno-o-chart-tooltip-category">${t$(e.name)}</span><br>`),n+=`<span class="syno-o-chart-tooltip-icon" style="background-color: ${t$(e.color)}"></span>`;let r=this._getOriginName(e.seriesName),i=this._tooltipValueFormatter(e.value,t.getRightAxis()?"y2":"y1");return n+`<span class="syno-o-chart-tooltip-series">${r?t$(r)+": ":""}${t$(i)}</span>`}}_tooltipValueFormatter(t,e){return this._dataFormatter(t,e)}_dataFormatter(t,e){return ly(this.chartInfo.dataFormatter)?this.chartInfo.dataFormatter(t,e):t}_uniquifyName(t,e){return(1e3+e).toString().substr(1)+t}_getOriginName(t){return t.substr(3)}}class lS extends lA{constructor(t){super(t);let e=this.chartInfo.calcAxisBias();this._useAxis=[e<=0,e>=0]}_getGridSpace(t){return t&&t.getText()?lb(t.ensureTextStyle().getFontSize()||this.chartInfo.ensureGlobalTextStyle().getFontSize())+12:0}_calcGridBound(){let{top:t,left:e,right:n,bottom:r}=this._plotBound;return{top:t,left:e+this._getGridSpace(this._useAxis[0]&&this.chartInfo.ensureYAxis().ensureTitle()),right:n+this._getGridSpace(this._useAxis[1]&&this.chartInfo.ensureYAxis2().ensureTitle()),bottom:r+this._getGridSpace(this.chartInfo.ensureXAxis().ensureTitle())}}convert(t,e){let n=super.convert(t,e);return n.grid=this.convertGrid(),n.xAxis=this.convertXAxis(!1),n.yAxis=this.convertYAxis(!0),n}convertGrid(){return{containLabel:!0,...this._calcGridBound()}}convertXAxis(t){return this.convertCategoryAxis(this.chartInfo.ensureXAxis(),t)}convertYAxis(t){return[this.chartInfo.ensureYAxis(),this.chartInfo.ensureYAxis2()].map((e,n)=>this.convertValueAxis(this._useAxis[n]&&e,t,"y"+(n+1)))}convertCategoryAxis(t,e){return{type:"category",data:this._category,inverse:t.ensureScaling().getRevert(),...this.convertAxis(t,e)}}convertValueAxis(t,e,n){if(!t)return{show:!1};let r={splitNumber:t.getTickNumber(),scale:!0,...this.convertAxis(t,e),...this.convertAxisScale(t.ensureScaling())};return!1!==r.axisLabel.show&&(r.axisLabel.formatter=t=>this._dataFormatter(t,n)),r}convertAxisScale(t){return{type:t.getLog()&&this.chartInfo.ensureChart().getGrouping()===lo.STANDARD?"log":"value",min:t.getMin(),max:t.getMax()}}convertAxis(t,e){return{axisLine:{show:!1},axisTick:{show:!1},axisLabel:this.convertAxisLabel(t.ensureLabel(),e),splitLine:{lineStyle:this.convertAxisLine(t.ensureMajorGridLines(),e)},...this.convertAxisTitle(t.ensureTitle(),e)}}convertAxisLine(t,e){return{color:t.getHidden()?"transparent":t.getColor()}}convertAxisTitle(t,e){return!t||!t.getText()||t.getHidden()?{}:{name:t.getText(),nameTextStyle:this.convertTextStyle(t.ensureTextStyle()),nameLocation:"center",nameGap:e?56:28}}convertAxisLabel(t,e){return!t||t.getHidden()?{show:!1}:{show:!0,rotate:t.getRotate(),margin:e?12:4,...this.convertTextStyle(t.ensureTextStyle())}}convertLegend(){let t=super.convertLegend(),e=this.chartInfo.ensureChartLegend().getPosition();return("l"===e||"r"===e)&&(t.top=this._plotBound.top),t}_convertSeries(t,e){let n=super._convertSeries(t,e);return t.getRightAxis()&&(n.yAxisIndex=1),n.label&&(n.label.formatter=e=>this._labelValueFormatter(e.value,t.getRightAxis()?"y2":"y1")),n}_labelValueFormatter(t,e){return this._dataFormatter(t,e)}}class lC extends lS{constructor(t){super(t),this.stacked=this.chartInfo.ensureChart().getGrouping()===lo.STACKED}_getNullValue(){return this.stacked?0:null}convertValueAxis(t,e,n){let r=super.convertValueAxis(t,e,n);return this.stacked&&r.scale&&(r.scale=!1),r}_convertSeries(t,e){let n=super._convertSeries(t,e);return this.stacked&&(n.stack=t.getRightAxis()?"s0":"s1"),n}}class lI extends lC{_convertSeries(t,e){let n=super._convertSeries(t,e);return lI.fillSeriesOption(n,this.chartInfo,t,e)}_convertLegendIcon(){let t=super._convertLegendIcon();return t.forEach((t,e)=>{t.icon=lI.switchLegendIcon(this.chartInfo.ensureSeries(e).ensureMarker().getSymbol())}),t}static fillSeriesOption(t,e,n,r){t.type="line";let i=n.ensureMarker();t.symbol=lI.switchSeriesMarker(i.getSymbol()),t.symbolSize=i.getSize();let a=n.ensureLineStyle(),s=a.getType();switch(s){case"dot":s="dotted";break;case"dash":s="dashed";break;default:s="solid"}return t.lineStyle={type:s,width:a.getWidth()},n.getSmooth()&&(t.smooth=!0),e.ensurePlotArea().getBlankAs()===lp.SPAN&&(t.connectNulls=!0),t}static switchSeriesMarker(t){let e;switch(t){case lh.NONE:e="image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";break;case lh.DIAMOND:e="diamond";break;case lh.TRIANGLE:e="triangle";break;case lh.SQUARE:e="rect";break;default:e="circle"}return e}static switchLegendIcon(t){let e="line";switch(t){case lh.CIRCLE:e="circle";break;case lh.DIAMOND:e="diamond";break;case lh.TRIANGLE:e="triangle";break;case lh.SQUARE:e="rect"}return e}}class lP extends lI{_convertSeries(t,e){let n=super._convertSeries(t,e);return n.areaStyle={opacity:t.getOpacity()},n}}class lT extends lC{convertXAxis(t){return this.chartInfo.ensureChart().getBarDir()===li.BAR_DIR?super.convertXAxis(t):super.convertYAxis(t)}convertYAxis(t){return this.chartInfo.ensureChart().getBarDir()===li.BAR_DIR?super.convertYAxis(t):super.convertXAxis(t)}_convertSeries(t,e){let n=super._convertSeries(t,e);return this.chartInfo.ensureChart().getBarDir()!==li.BAR_DIR&&n.yAxisIndex&&(n.xAxisIndex=n.yAxisIndex,delete n.yAxisIndex),lT.fillSeriesOption(n,this.chartInfo,t,e)}_switchSeriesLabelPosition(t){let e=this.chartInfo.ensureChart().getBarDir()!==li.BAR_DIR,n=e?"right":"top";switch(t.getPosition()){case"inBase":n=e?"insideLeft":"insideBottom";break;case"inCenter":n="inside";break;case"inEnd":n=e?"insideRight":"insideTop"}return n}static fillSeriesOption(t){return t.type="bar",t}}class lk extends lA{_processCategory(t){t=super._processCategory(t);for(let e=0,n=t.length;e<n;e++)t[e]=this._uniquifyName(t[e],e);return t}_processData(t){t.length=1;let e=t[0].data;for(let t=0,n=e.length;t<n;t++){let n=e[t];e[t]={value:null==n?null:Math.abs(n),name:this._category[t]}}return t}convertColor(){let t=this.chartInfo.getSeriesThemeColors(),e=t.length,n=this.chartInfo.ensurePieSeries().getPieColor(),r=[];for(let i=0,a=this._data[0].data.length;i<a;i++){let a=this._categoryIndexMap[i];r[i]=n&&n[a]||t[a%e]}return r}_convertLegendIcon(){return this._category.map(t=>({name:t,icon:"rect"}))}convertSeries(){return[this._convertSeries(this.chartInfo.ensurePieSeries(),this._data[0])]}_convertSeries(t,e){let n=this._containerWidth-this._plotBound.left-this._plotBound.right,r=this._containerHeight-this._plotBound.top-this._plotBound.bottom,i=Math.min(n,r)/2;return{type:"pie",data:e.data,emphasis:this._convertSeriesEmphasis(),selectedMode:!1,center:[this._plotBound.left+n/2,this._plotBound.top+r/2],radius:[t.getPieHoleSize()/100*i,i],itemStyle:{borderColor:l_(t.getPieBorderColor())},tooltip:{formatter:this._convertSeriesTooltipFormatter(t)},label:this._convertSeriesLabel(t.ensureLabel())}}_convertSeriesLabel(t){return{show:t.getShowCat()||t.getShowVal()||t.getShowPercent(),formatter:e=>{let n=[];return t.getShowCat()&&n.push(this._getOriginName(e.name)),t.getShowVal()&&n.push(this._dataFormatter(e.value,"y1")),t.getShowPercent()&&n.push(n.length?`(${e.percent}%)`:`${e.percent}%`),n.join(" ")},...this.convertTextStyle(t.ensureTextStyle())}}_convertSeriesTooltipFormatter(){return t=>{let e="",n=this._getOriginName(t.name);return n&&(e+=`<span class="syno-o-chart-tooltip-category">${n}</span><br>`),e+=`<span class="syno-o-chart-tooltip-icon" style="background-color: ${t.color}"></span><span class="syno-o-chart-tooltip-series">${this._tooltipValueFormatter(t.value,"y1")}</span>`}}}class lL extends lS{_processCategory(t){if(this._xHasNumber=!1,this.chartInfo.ensureXAxis().getTreatAsText())return super._processCategory(t);for(let e=0,n=t.length;e<n;e++)lx(t[e])?this._xHasNumber=!0:t[e]=null;return t}convertXAxis(){let t=this.chartInfo.ensureXAxis();return t.getTreatAsText()?super.convertXAxis():this.convertValueAxis(t,!1,"x")}_convertSeries(t,e){let n=super._convertSeries(t,e);n.type="scatter",this.chartInfo.ensureXAxis().getTreatAsText()||(n.data=n.data.map((t,e)=>this._xHasNumber?[this._category[e],t]:[e,t]));let r=t.ensureMarker();return n.symbol=lI.switchSeriesMarker(r.getSymbol()),n.symbolSize=r.getSize(),n}_convertLegendIcon(){let t=super._convertLegendIcon();return t.forEach((t,e)=>{let n=lI.switchLegendIcon(this.chartInfo.ensureSeries(e).ensureMarker().getSymbol());t.icon="line"===n?"rect":n}),t}_tooltipValueFormatter(t,e){return Array.isArray(t)?`${this._dataFormatter(t[0],"x")},${this._dataFormatter(t[1],e)}`:this._dataFormatter(t,e)}_labelValueFormatter(t,e){let n=Array.isArray(t)?t[1]:t;return this._dataFormatter(n,e)}}class lD extends lS{_convertSeries(t,e){let n=super._convertSeries(t,e);return t.getType(!0)===ls.BAR?lT.fillSeriesOption(n,this.chartInfo,t,e):lI.fillSeriesOption(n,this.chartInfo,t,e)}_convertLegendIcon(){let t=super._convertLegendIcon();return t.forEach((t,e)=>{let n=this.chartInfo.ensureSeries(e);n.getType()===ls.LINE&&(t.icon=lI.switchLegendIcon(n.ensureMarker().getSymbol()))}),t}_switchSeriesLabelPosition(t,e){return e.getType()===ls.BAR?lT.prototype._switchSeriesLabelPosition.call(this,t,e):super._switchSeriesLabelPosition(t,e)}}let lR=Object.prototype.hasOwnProperty;class lN{constructor(t,e){this.fillArgs(...arguments),e&&this.initSubConfig(e)}fillArgs(t,e){this._info=t,this._config=e}static get configName(){return""}static get subConfigList(){return null}static get configList(){return null}static get supportMap(){return lR.call(this,"_supportMap")||(this._supportMap=this.createSupportMap()),this._supportMap}static createSupportMap(){let t,e=Object.create(null);return(t=this.configList)&&t.forEach(t=>{e[t]=!0}),(t=this.subConfigList)&&t.forEach(t=>{e[t]=!0}),e}initSubConfig(t){let e=this.constructor.subConfigList;if(e)for(let n=0,r=e.length;n<r;++n){let r=e[n],i=t[r];if(lf(i)){let t="ensure"+iI(r);(this["_"+t]||this[t]).call(this,i)}}}_cloneConfig(t){return Object.assign(Object.create(null),t)}_getConfig(t,e,n,r){return t&&lf(t[e])?t[e]:r||null==n?null:n}_setConfig(t,e,n){return lf(n)?t&&t[e]===n||((t=this._cloneConfig(t))[e]=n):(!t||e in t)&&(t=this._cloneConfig(t),delete t[e]),t}build(){let t=this.getRawConfig(),e,n=this.constructor.supportMap;for(let r in t)if(lR.call(t,r)){if(n[r])continue;e||(e=this._cloneConfig(t)),delete e[r]}let r=this.constructor.subConfigList;if(r&&r.length)for(let n=0,i=r.length;n<i;++n){let i,a=r[n],s=this["get"+iI(a)](),o=Array.isArray(s);o?(i=lw(s.map(t=>t&&t.build()))).length||(i=null):i=s&&s.build(),(t&&a in t?!i||(o?!function(t,e){let n=Math.max(t?t.length:0,e?e.length:0);for(let r=0;r<n;++r)if((t&&t[r])!=(e&&e[r]))return!1;return!0}(i,t[a]):i!==t[a]):i)&&(e||(e=this._cloneConfig(t)),i?e[a]=i:delete e[a])}return e&&(t=e),t&&!function(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}(t)&&(t=null),this.setRawConfig(t),t}compute(t){let e,n=Object.create(null);if((e=this.constructor.subConfigList)&&e.length)for(let r=0,i=e.length;r<i;++r){let i,a=e[r],s=iI(a),o="ensure"+s,l=this[o]();if(Array.isArray(l)){let e=this["get"+s+"Count"],n=e?e.call(this):l.length;i=[];for(let e=0;e<n;++e)i.push(this[o](e).compute(t))}else i=l.compute(t);n[a]=i}if((e=this.constructor.configList)&&e.length)for(let t=0,r=e.length;t<r;++t){let r=e[t],i=this["get"+iI(r)];if(i){let t=i.call(this);null!=t&&(n[r]=t)}}return n}cloneRawConfig(){return Object.assign(Object.create(null),this.getRawConfig())}getRawConfig(){return this._config}setRawConfig(t){return this._config!==t&&(this._config=t,!0)}getChartInfo(){return this._info}getSubConfig(t){return this[t]}setSubConfig(t,e,n){return n||(e=this.createSubConfig(t,e)),this[t]=e}createSubConfig(t,e){let n=this.getChartInfo(),r=n.getConfigCls(t);if(!r)throw Error(`Unknown sub-config name. (${t})`);return e[0]!==n&&(e=[n].concat(e)),new r(...e)}getConfig(t,e,n){return this._getConfig(this.getRawConfig(),t,e,n)}setConfig(t,e){return this.setRawConfig(this._setConfig(this.getRawConfig(),t,e))}}let lO=["xAxis","yAxis","yAxis2","series","layout"],lj=["blankAs","useRowHeader","useColumnHeader","switchRowColumn"],lE=["plotArea","title","subtitle","legend","textStyle"],lV=["backgroundColor","chartType","barDir","grouping"];function lB(t,e){return t.index-e.index}let lz=["min","max","orientation","logBase"],lF=["hidden","color"],lG=["title","label","scaling","majorGridLines"],lH=["tickNumber","treatAsText"],lW=["symbol","size"],lq=["type","width"],lU=["label","marker","lineStyle"],lZ=["type","color","axis2","smooth","opacity","holeSize","pieColors","pieBorderColor"],l$=["textStyle"],lJ=["hidden","position"],lY=["textStyle"],lX=["hidden","position","rotate","showVal","showCat","showPercent"],lQ=["textStyle"],lK=["hidden","text"],l0={title:{fontSize:16,bold:!0},subtitle:{fontSize:13,color:"#7E8082"},axisTitle:{bold:!0},global:{fontFamily:"Arial",fontSize:12,italic:!1,bold:!1,color:"#000000"}},l1=["fontFamily","fontSize","italic","bold","color"],l2=["enabled","top","left","right","bottom"],l5=[class extends lN{static get configName(){return"plotArea"}static get subConfigList(){return lO}static get configList(){return lj}initSubConfig(t){super.initSubConfig(this.fixConfig(t))}fixConfig(t){let{nonNumericAsZero:e,zeroStart:n,xAxisTitle:r,yAxisTitle:i}=t;if(!lf(e)&&!n&&!r&&!i)return t;if(t=this._cloneConfig(t),delete t.nonNumericAsZero,delete t.zeroStart,delete t.xAxisTitle,delete t.yAxisTitle,!t.blankAs&&lf(e)&&(t.blankAs=e?lp.ZERO:lp.GAP),!t.xAxis&&(r||n)){let e=t.xAxis=Object.create(null);r&&(e.title=r),n&&(e.scaling={min:0})}if(!t.yAxis&&(i||n)){let e=t.yAxis=Object.create(null);i&&(e.title=i),n&&(e.scaling={min:0})}return!t.yAxis2&&n&&(t.yAxis2={scaling:{min:0}}),t}getXAxis(){return this.getSubConfig("xAxis")}ensureXAxis(t){return this.getXAxis()||this.setSubConfig("xAxis",this.createSubConfig("axis",[t]),!0)}getYAxis(){return this.getSubConfig("yAxis")}ensureYAxis(t){return this.getYAxis()||this.setSubConfig("yAxis",this.createSubConfig("axis",[t]),!0)}getYAxis2(){return this.getSubConfig("yAxis2")}ensureYAxis2(t){return this.getYAxis2()||this.setSubConfig("yAxis2",this.createSubConfig("axis",[t]),!0)}_getSeries(){return this.getSubConfig("series")}_ensureSeries(t){return this._getSeries()||this.setSubConfig("series",Array.isArray(t)?t.map((t,e)=>this.createSubConfig("series",[t,e])):[],!0)}getSeries(t){let e=this._getSeries();return e?lx(t)?e[t]:e:null}ensureSeries(t,e){let n=this._ensureSeries();return lx(t)?n[t]||(n[t]=this.createSubConfig("series",[e,t])):n}getSeriesCount(){return this.getChartInfo().getSeriesCount()}getLayout(){return this.getSubConfig("layout")}ensureLayout(t){return this.getLayout()||this.setSubConfig("layout",this.createSubConfig("layout",[t]),!0)}getBlankAs(t){return this.getConfig("blankAs",li.BLANK_AS,t)}setBlankAs(t){return this.setConfig("blankAs",t)}getUseRowHeader(){return this.getConfig("useRowHeader",!0)}setUseRowHeader(t){return this.setConfig("useRowHeader",!!t)}getUseColumnHeader(){return this.getConfig("useColumnHeader",!0)}setUseColumnHeader(t){return this.setConfig("useColumnHeader",!!t)}getSwitchRowColumn(){return this.getConfig("switchRowColumn",!1)}setSwitchRowColumn(t){return this.setConfig("switchRowColumn",!!t)}},class extends lN{static get configName(){return"chart"}static get subConfigList(){return lE}static get configList(){return lV}initSubConfig(t){super.initSubConfig(this.fixConfig(t))}fixConfig(t){let e=t.plotArea;if(!e||e.series)return t;let n=e.subCharts;if(!n||!n.length)return t;e=(t=this._cloneConfig(t)).plotArea=this._cloneConfig(e),delete e.subCharts;let r=e.series=[];for(let e=0,i=n.length;e<i;++e){let{type:i,series:a,barDir:s,grouping:o}=n[e];for(let t=0,e=a.length;t<e;++t){let e=this._cloneConfig(a[t]);e.type=i,r.push(e)}s&&(t.barDir=s),o&&(t.grouping=o)}return r.sort(lB),t.chartType=n.length>1?"hybrid":n[0].type,t}getPlotArea(){return this.getSubConfig("plotArea")}ensurePlotArea(t){return this.getPlotArea()||this.setSubConfig("plotArea",[t])}getTitle(){return this.getSubConfig("title")}ensureTitle(t){return this.getTitle()||this.setSubConfig("title",[t,"title"])}getSubtitle(){return this.getSubConfig("subtitle")}ensureSubtitle(t){return this.getSubtitle()||this.setSubConfig("subtitle",this.createSubConfig("title",[t,"subtitle"]),!0)}getLegend(){return this.getSubConfig("legend")}ensureLegend(t){return this.getLegend()||this.setSubConfig("legend",[t])}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(t){return this.getTextStyle()||this.setSubConfig("textStyle",[t,"global"])}getBackgroundColor(t){return this.getConfig("backgroundColor",li.BACKGROUND,t)}setBackgroundColor(t){return this.setConfig("backgroundColor",t)}getChartType(t){return this.getConfig("chartType",li.TYPE,t)}setChartType(t){return this.setConfig("chartType",t)}getBarDir(t){return this.getConfig("barDir",li.BAR_DIR,t)}setBarDir(t){return this.setConfig("barDir",t)}getGrouping(t){return this.getConfig("grouping",li.GROUPING,t)}setGrouping(t){return this.setConfig("grouping",t)}getType(t){return this.getChartType(t)}setType(t){return this.setChartType(t)}},class extends lN{static get configName(){return"scaling"}static get configList(){return lz}getMin(t){return this.getConfig("min",null,t)}setMin(t){return this.setConfig("min",lx(t)?t:null)}getMax(t){return this.getConfig("max",null,t)}setMax(t){return this.setConfig("max",lx(t)?t:null)}getOrientation(t){return this.getConfig("orientation",li.ORIENTATION,t)}setOrientation(t){return this.setConfig("orientation",t)}getLogBase(t){return this.getConfig("logBase",null,t)}setLogBase(t){return this.setConfig("logBase",lx(t)?t:null)}getRevert(){return this.getOrientation()===ll.REVERSE}setRevert(t){return this.setOrientation(t?ll.REVERSE:ll.SEQUENCE)}getLog(){return!!lf(this.getLogBase())}setLog(t){return this.setLogBase(t?10:null)}},class extends lN{static get configName(){return"majorGridLines"}static get configList(){return lF}getHidden(t){return this.getConfig("hidden",!1,t)}setHidden(t){return this.setConfig("hidden",!!t)}getColor(t){return this.getConfig("color","#CCCCCC",t)}setColor(t){return this.setConfig("color",t)}},class extends lN{static get configName(){return"axis"}static get subConfigList(){return lG}static get configList(){return lH}getTitle(){return this.getSubConfig("title")}ensureTitle(t){return this.getTitle()||this.setSubConfig("title",[t,"axisTitle"])}getLabel(){return this.getSubConfig("label")}ensureLabel(t){return this.getLabel()||this.setSubConfig("label",[t])}getScaling(){return this.getSubConfig("scaling")}ensureScaling(t){return this.getScaling()||this.setSubConfig("scaling",[t])}getMajorGridLines(){return this.getSubConfig("majorGridLines")}ensureMajorGridLines(t){return this.getMajorGridLines()||this.setSubConfig("majorGridLines",[t])}getTickNumber(t){return this.getConfig("tickNumber",5,t)}setTickNumber(t){return this.setConfig("tickNumber",lx(t)?t:null)}getTreatAsText(t){return this.getConfig("treatAsText",!1,t)}setTreatAsText(t){return this.setConfig("treatAsText",!!t)}},class extends lN{constructor(t,e){!0===e?e=null:!1===e&&(e={symbol:lh.NONE}),super(t,e)}static get configName(){return"marker"}static get configList(){return lW}getSymbol(t){return this.getConfig("symbol",li.MARKER_SYMBOL,t)}setSymbol(t){return this.setConfig("symbol",t)}getSize(t){return this.getConfig("size",5,t)}setSize(t){return this.setConfig("size",lx(t)?t:null)}},class extends lN{static get configName(){return"lineStyle"}static get configList(){return lq}getType(t){return this.getConfig("type",li.LINE_DASH,t)}setType(t){return this.setConfig("type",t)}getWidth(t){return this.getConfig("width",2,t)}setWidth(t){return this.setConfig("width",lx(t)?t:null)}},class extends lN{constructor(t,e,n){super(t,e),this.index=lx(n)?n:0}static get configName(){return"series"}static get subConfigList(){return lU}static get configList(){return lZ}getDefaultType(){let t=this.getChartInfo().ensureChart().getType();return t===ls.HYBRID?ls.BAR:t}getDefaultColor(t){let e=this.getChartInfo().getSeriesThemeColors();return e[t%e.length]}compute(t){let e=super.compute(t);if(t){let t=this.getChartInfo();t.dataHasCat()&&(e.cat=t.getSourceSeriesCat()),t.dataHasTx()&&(e.tx=t.getSourceSeriesTx(this.index)),e.val=t.getSourceSeriesVal(this.index)}return e}getLabel(){return this.getSubConfig("label")}ensureLabel(t){return this.getLabel()||this.setSubConfig("label",[t])}getMarker(){return this.getSubConfig("marker")}ensureMarker(t){return this.getMarker()||this.setSubConfig("marker",[t])}getLineStyle(){return this.getSubConfig("lineStyle")}ensureLineStyle(t){return this.getLineStyle()||this.setSubConfig("lineStyle",[t])}getType(t){let e=this.getConfig("type",null,t);return t||e?e:this.getDefaultType()}setType(t){return this.setConfig("type",t)}getColor(t){let e=this.getConfig("color",null,t);return t||e?e:this.getDefaultColor(this.index)}setColor(t){return this.setConfig("color",t)}getAxis2(t){return this.getConfig("axis2",!1,t)}setAxis2(t){return this.setConfig("axis2",!!t)}getSmooth(t){return this.getConfig("smooth",!1,t)}setSmooth(t){return this.setConfig("smooth",!!t)}getOpacity(t){return this.getConfig("opacity",.2,t)}setOpacity(t){return this.setConfig("opacity",lx(t)?t:null)}getHoleSize(t){return this.getConfig("holeSize",0,t)}setHoleSize(t){return this.setConfig("holeSize",t)}getPieColors(t){return this.getConfig("pieColors",null,t)}setPieColors(t){return this.setConfig("pieColors",Array.isArray(t)?lw(t,!0):null)}getPieBorderColor(t){return this.getConfig("pieBorderColor","#FFFFFF00",t)}setPieBorderColor(t){return this.setConfig("pieBorderColor",t)}getRightAxis(t){return this.getAxis2(t)}setRightAxis(t){return this.setAxis2(t)}getLineSmooth(t){return this.getSmooth(t)}setLineSmooth(t){return this.setSmooth(t)}getAreaOpacity(t){return this.getOpacity(t)}setAreaOpacity(t){return this.setOpacity(t)}getPieHoleSize(t){return this.getHoleSize(t)}setPieHoleSize(t){return this.setHoleSize(t)}getPieColor(t,e){let n=this.getPieColors(e);return n&&Array.isArray(n)?lx(t)?n[t]||this.getDefaultColor(t):n:null}setPieColor(t,e){if(lx(t)){let n=this.getPieColors();(n=n?n.slice():[])[t]=e,e=lw(n)}return this.setPieColors(e)}},class extends lN{static get configName(){return"legend"}static get subConfigList(){return l$}static get configList(){return lJ}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(t){return this.getTextStyle()||this.setSubConfig("textStyle",[t])}getHidden(t){return this.getConfig("hidden",!1,t)}setHidden(t){return this.setConfig("hidden",!!t)}getPosition(t){return this.getConfig("position",li.LEGEND_POSITION,t)}setPosition(t){return this.setConfig("position",t)}},class extends lN{static get configName(){return"label"}static get subConfigList(){return lY}static get configList(){return lX}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(t){return this.getTextStyle()||this.setSubConfig("textStyle",[t])}getHidden(t){return this.getConfig("hidden",!1,t)}setHidden(t){return this.setConfig("hidden",!!t)}getPosition(t){return this.getConfig("position",li.LABEL_POSITION,t)}setPosition(t){return this.setConfig("position",t)}getRotate(t){return this.getConfig("rotate",0,t)}setRotate(t){return this.setConfig("rotate",t)}getShowVal(t){return this.getConfig("showVal",!1,t)}setShowVal(t){return this.setConfig("showVal",!!t)}getShowCat(t){return this.getConfig("showCat",!1,t)}setShowCat(t){return this.setConfig("showCat",!!t)}getShowPercent(t){return this.getConfig("showPercent",!1,t)}setShowPercent(t){return this.setConfig("showPercent",!!t)}},class extends lN{constructor(t,e,n){lm(e)&&(e={text:e}),super(t,e,n)}fillArgs(t,e,n){super.fillArgs(...arguments),this.styleKey=n}static get configName(){return"title"}static get subConfigList(){return lQ}static get configList(){return lK}getTextStyle(){return this.getSubConfig("textStyle")}ensureTextStyle(t){return this.getTextStyle()||this.setSubConfig("textStyle",[t,this.styleKey])}getHidden(t){return this.getConfig("hidden",!1,t)}setHidden(t){return this.setConfig("hidden",!!t)}getText(t){return this.getConfig("text","",t)}setText(t){return this.setConfig("text",t)}},class extends lN{constructor(t,e,n){super(t,e),this.defaultStyle=l0[n]}static get configName(){return"textStyle"}static get configList(){return l1}getStyleConfig(t,e){let n=this.getConfig(t,null,e);if(e||lf(n))return n;let r=this.defaultStyle&&this.defaultStyle[t];return lf(r)?r:this.getChartInfo().ensureGlobalTextStyle()["get"+iI(t)]()}getFontFamily(t){return this.getStyleConfig("fontFamily",t)}setFontFamily(t){return this.setConfig("fontFamily",t)}getFontSize(t){return this.getStyleConfig("fontSize",t)}setFontSize(t){return this.setConfig("fontSize",t)}getItalic(t){return this.getStyleConfig("italic",t)}setItalic(t){return this.setConfig("italic",!!t)}getBold(t){return this.getStyleConfig("bold",t)}setBold(t){return this.setConfig("bold",!!t)}getColor(t){return this.getStyleConfig("color",t)}setColor(t){return this.setConfig("color",t)}},class extends lN{static get configName(){return"layout"}static get configList(){return l2}getEnabled(t){return this.getConfig("enabled",!1,t)}setEnabled(t){return this.setConfig("enabled",t)}getLeft(t){return this.getConfig("left",null,t)}setLeft(t){return this.setConfig("left",t)}getTop(t){return this.getConfig("top",null,t)}setTop(t){return this.setConfig("top",t)}getRight(t){return this.getConfig("right",null,t)}setRight(t){return this.setConfig("right",t)}getBottom(t){return this.getConfig("bottom",null,t)}setBottom(t){return this.setConfig("bottom",t)}}].reduce(function(t,e){return t[e.configName]=e,t},Object.create(null)),l4=["#509BE6","#FFC100","#F26166","#AD70CC","#4DBF4D","#FF8F3D","#8E6F69","#00B6CE","#E25FBC","#4D5FFF","#27D790","#3B8795"],l8=class{constructor(t,e){this.readChartCfg(t),this.readOptionCfg(e),this._options=e}getConfigMap(){return l5}getConfigCls(t){return this.getConfigMap()[t]}readChartCfg(t){this._config=new(this.getConfigCls("chart"))(this,t)}readOptionCfg(t){}getUseRowHeader(){return this.ensurePlotArea().getUseRowHeader()}getUseColumnHeader(){return this.ensurePlotArea().getUseColumnHeader()}getSwitchRowColumn(){return this.ensurePlotArea().getSwitchRowColumn()}dataHasCat(){return this.getSwitchRowColumn()?this.getUseColumnHeader():this.getUseRowHeader()}dataHasTx(){return this.getSwitchRowColumn()?this.getUseRowHeader():this.getUseColumnHeader()}setRawData(t){this.data=t}getRawData(){return this.data}cloneRawData(t){let e=this.getRawData();if(!e)return e;if(!t)return e.map(t=>t.slice());{let t=[],n=this._getDataColNumber(e),r=this._getDataRowNumber(e);for(let i=0;i<n;++i){t[i]=[];for(let n=0;n<r;++n)t[i][n]=this._getData(e,n,i)}return t}}_getData(t,e,n){let r=t&&t[e]&&t[e][n];return null!=r?r:null}getData(t,e){return this._getData(this.getRawData(),t,e)}_getDataRowNumber(t){return t?t.length:0}getDataRowNumber(){return this._getDataRowNumber(this.getRawData())}_getDataColNumber(t){return t&&t[0]?t[0].length:0}getDataColNumber(){return this._getDataColNumber(this.getRawData())}ensureChart(){return this._config}ensureChartTitle(){return this.ensureChart().ensureTitle()}ensureChartSubtitle(){return this.ensureChart().ensureSubtitle()}ensureChartLegend(){return this.ensureChart().ensureLegend()}ensureChartLegendStyle(){return this.ensureChartLegend().ensureTextStyle()}ensureGlobalTextStyle(){return this.ensureChart().ensureTextStyle()}ensurePlotArea(){return this.ensureChart().ensurePlotArea()}ensureSeries(t){return this.ensurePlotArea().ensureSeries(t)}ensureSeriesLabel(t){return this.ensureSeries(t).ensureLabel()}ensureSeriesLabelStyle(t){return this.ensureSeriesLabel(t).ensureTextStyle()}ensurePieSeries(){return this.ensureSeries(0)}ensurePieLabel(){return this.ensurePieSeries().ensureLabel()}ensurePieLabelStyle(){return this.ensurePieLabel().ensureTextStyle()}ensureTitle(t){switch(t){case"title":return this.ensureChartTitle();case"subtitle":return this.ensureChartSubtitle();case"xTitle":return this.ensureXAxis().ensureTitle();case"yTitle":return this.ensureYAxis().ensureTitle();case"y2Title":return this.ensureYAxis2().ensureTitle();default:return null}}ensureTitleStyle(t){let e=this.ensureTitle(t);return e&&e.ensureTextStyle()}ensureXAxis(){return this.ensurePlotArea().ensureXAxis()}ensureYAxis(){return this.ensurePlotArea().ensureYAxis()}ensureYAxis2(){return this.ensurePlotArea().ensureYAxis2()}ensureAxis(t){switch(t){case"x":return this.ensureXAxis();case"y":return this.ensureYAxis();case"y2":return this.ensureYAxis2();default:return null}}ensureAxisScaling(t){let e=this.ensureAxis(t);return e&&e.ensureScaling()}ensureAxisMajorGridLines(t){let e=this.ensureAxis(t);return e&&e.ensureMajorGridLines()}ensureAxisLabel(t){let e=this.ensureAxis(t);return e&&e.ensureLabel()}ensureAxisLabelStyle(t){let e=this.ensureAxisLabel(t);return e&&e.ensureTextStyle()}build(){return this.ensureChart().build()}compute(t){return this.ensureChart().compute(t)}getChartSetting(){let t=this.ensureChart();return this.filterChartSetting(t.getType(),t.getBarDir(),t.getGrouping(),!0)}getSeriesCat(t){let e=+!!this.dataHasTx();if(lx(t))return this.dataHasCat()?lM(this.getData(0,e+t)):"";{let t=this.getDataColNumber(),n=Array(t-e);if(this.dataHasCat())for(let r=e;r<t;++r)n[r-e]=this.getData(0,r);else n.fill("");return n}}getSourceSeriesCat(){return this.getSeriesCat()}getSeriesTx(t){let e=+!!this.dataHasCat();if(lx(t))return this.dataHasTx()?lM(this.getData(e+t,0)):"";{let t=this.getDataRowNumber(),n=Array(t-e);if(this.dataHasTx())for(let r=e;r<t;++r)n[r-e]=lM(this.getData(r,0));else n.fill("");return n}}getSourceSeriesTx(t){return this.getSeriesTx(t)}getSeriesVal(t,e){let n=t+ +!!this.dataHasCat(),r=+!!this.dataHasTx();if(lx(e))return this.getData(n,r+e);{let t=this.getDataColNumber(),e=[];for(let i=r;i<t;++i)e.push(this.getData(n,i));return e}}getSourceSeriesVal(t,e){return this.getSeriesVal(t,e)}getSeriesThemeColors(){return l4}getSeriesCount(t){let e=this.getDataRowNumber()-+!!this.dataHasCat();if(t){let t=this.ensureSeries().length;e<t&&(e=t)}return e}getSeriesColor(t){return this.ensureChart().getType()===ls.PIE?this.ensurePieSeries().getPieColor(t):this.ensureSeries(t).getColor()}calcAxisBias(){let t,e;return(this.forEachSeries(function(n){if(n.getRightAxis()?e=!0:t=!0,t&&e)return!0}),t&&e)?0:t?-1:e?1:NaN}forEachSeries(t,e,n){for(let r=0,i=this.getSeriesCount(n);r<i;++r){let n=t.call(e,this.ensureSeries(r),r,i);if(null!=n)return n}}eachSeries(t){return this.forEachSeries(function(e,n){if(!1===t.call(this,e,n))return!1},this)}filterChartSetting(t,e,n,r){switch(t){case ls.BAR:case ls.LINE:case ls.AREA:break;default:n=r?li.GROUPING:null}return{type:t,barDir:t===ls.BAR?e:r?li.BAR_DIR:null,grouping:n}}handleSeries(t,e,n){lx(t)?e.call(n,this.ensureSeries(t),t):this.forEachSeries(e,n)}_handleTitle(t,e,n){let r=this.ensureTitle(t);r&&e.call(n,r,t)}handleTitle(t,e,n){t?this._handleTitle(t,e,n):["title","subtitle","xTitle","yTitle","y2Title"].forEach(t=>{this._handleTitle(t,e,n)})}_handleAxis(t,e,n){let r=this.ensureAxis(t);r&&e.call(n,r,t)}handleAxis(t,e,n){t?this._handleAxis(t,e,n):["x","y","y2"].forEach(t=>{this._handleAxis(t,e,n)})}getAllColors(){let t=[];function e(e){e&&t.push(e.substr(1).toLowerCase())}return e(this.ensureChart().getBackgroundColor(!0)),this.handleTitle(null,function(t){e(t.ensureTextStyle().getColor(!0))},this),this.forEachSeries(function(t){e(t.getColor(!0)),e(t.getPieBorderColor(!0)),e(t.ensureLabel().ensureTextStyle().getColor(!0)),(t.getPieColors(!0)||[]).forEach(e)},this,!0),e(this.ensureChartLegendStyle().getColor(!0)),this.handleAxis(null,function(t){e(t.ensureLabel().ensureTextStyle().getColor(!0)),e(t.ensureMajorGridLines().getColor(!0))},this),t}static checkCmdName(t){return t&&t in this.prototype&&"apply"!==t&&(t.startsWith("apply")||t.startsWith("_apply"))}apply(t,e){return!!this.constructor.checkCmdName(t)&&(this[t].apply(this,e),!0)}invert(t,e){if(!this.constructor.checkCmdName(t))return!1;let n=this[t.replace("apply","invert")].apply(this,e);return Array.isArray(n)||(n=[n]),n.forEach(e=>{e.name||(e.name=t)}),n}applyChartSetting(t,e,n){if({type:t,barDir:e,grouping:n}=this.filterChartSetting(t,e,n),this._applyChartType(t),t===ls.HYBRID){let t=this.getSeriesCount()/2;this.forEachSeries(function(e,n){e.setType(n<t?ls.BAR:null)},this,!0)}else this.forEachSeries(function(t,e){t.setType(null)},this,!0);this._applyChartBarDir(e),this._applyChartGrouping(n)}_applyChartType(t){this.ensureChart().setType(t)}_applyChartBarDir(t){this.ensureChart().setBarDir(t)}_applyChartGrouping(t){this.ensureChart().setGrouping(t)}applyChartBackgroundColor(t){this.ensureChart().setBackgroundColor(t)}applyChartBlankAs(t){this.ensurePlotArea().setBlankAs(t)}applyChartShowBlank(t){this.applyChartBlankAs(t?lp.SPAN:lp.GAP)}applyGlobalFontFamily(t){this.ensureGlobalTextStyle().setFontFamily(t)}applyUseColumnHeader(t){this.ensurePlotArea().setUseColumnHeader(t)}applyUseRowHeader(t){this.ensurePlotArea().setUseRowHeader(t)}applySwitchRowColumn(t){this.ensurePlotArea().setSwitchRowColumn(t)}applyPieHoleSize(t){this.ensurePieSeries().setPieHoleSize(t)}applyPieBorderColor(t){this.ensurePieSeries().setPieBorderColor(t)}applyPieLabelDisplay(t){let e=this.ensurePieLabel();e.setShowVal(t.val),e.setShowCat(t.cat),e.setShowPercent(t.percent)}applyPieLabelFontFamily(t){this.ensurePieLabelStyle().setFontFamily(t)}applyPieLabelFontSize(t){this.ensurePieLabelStyle().setFontSize(t)}applyPieLabelBold(t){this.ensurePieLabelStyle().setBold(t)}applyPieLabelItalic(t){this.ensurePieLabelStyle().setItalic(t)}applyPieLabelColor(t){this.ensurePieLabelStyle().setColor(t)}applyTitleText(t,e){this.handleTitle(t,function(t){t.setText(e)})}applyTitleFontFamily(t,e){this.handleTitle(t,function(t){t.ensureTextStyle().setFontFamily(e)})}applyTitleFontSize(t,e){this.handleTitle(t,function(t){t.ensureTextStyle().setFontSize(e)})}applyTitleBold(t,e){this.handleTitle(t,function(t){t.ensureTextStyle().setBold(e)})}applyTitleItalic(t,e){this.handleTitle(t,function(t){t.ensureTextStyle().setItalic(e)})}applyTitleColor(t,e){this.handleTitle(t,function(t){t.ensureTextStyle().setColor(e)})}applySeriesType(t,e){this.handleSeries(t,function(t){t.setType(e)})}applySeriesColor(t,e){if(lx(t))if(this.ensureChart().getType()===ls.PIE)return this._applyPieColor(t,e);else return this._applySeriesColor(t,e)}_applyPieColor(t,e){this.ensurePieSeries().setPieColor(t,e)}_applySeriesColor(t,e){this.ensureSeries(t).setColor(e)}applySeriesRightAxis(t,e){this.handleSeries(t,function(t){t.setRightAxis(e)})}applySeriesSmooth(t,e){this.handleSeries(t,function(t){t.setSmooth(e)})}applySeriesOpacity(t,e){this.handleSeries(t,function(t){t.setOpacity(e)})}applySeriesLineType(t,e){this.handleSeries(t,function(t){t.ensureLineStyle().setType(e)})}applySeriesLineWidth(t,e){this.handleSeries(t,function(t){t.ensureLineStyle().setWidth(e)})}applySeriesMarkerSymbol(t,e){this.handleSeries(t,function(t){t.ensureMarker().setSymbol(e)})}applySeriesMarkerSize(t,e){this.handleSeries(t,function(t){t.ensureMarker().setSize(e)})}applySeriesLabelHidden(t,e){this.handleSeries(t,function(t){t.ensureLabel().setHidden(e)})}applySeriesLabelPosition(t,e){this.handleSeries(t,function(t){t.ensureLabel().setPosition(e)})}applySeriesLabelFontFamily(t,e){this.handleSeries(t,function(t){t.ensureLabel().ensureTextStyle().setFontFamily(e)})}applySeriesLabelFontSize(t,e){this.handleSeries(t,function(t){t.ensureLabel().ensureTextStyle().setFontSize(e)})}applySeriesLabelItalic(t,e){this.handleSeries(t,function(t){t.ensureLabel().ensureTextStyle().setItalic(e)})}applySeriesLabelBold(t,e){this.handleSeries(t,function(t){t.ensureLabel().ensureTextStyle().setBold(e)})}applySeriesLabelColor(t,e){this.handleSeries(t,function(t){t.ensureLabel().ensureTextStyle().setColor(e)})}applyLegendHidden(t){this.ensureChartLegend().setHidden(t)}applyLegendPosition(t){this.ensureChartLegend().setPosition(t),this.applyLegendHidden(!1)}applyLegendFontFamily(t){this.ensureChartLegendStyle().setFontFamily(t)}applyLegendFontSize(t){this.ensureChartLegendStyle().setFontSize(t)}applyLegendItalic(t){this.ensureChartLegendStyle().setItalic(t)}applyLegendBold(t){this.ensureChartLegendStyle().setBold(t)}applyLegendColor(t){this.ensureChartLegendStyle().setColor(t)}applyAxisTickNumber(t,e){this.handleAxis(t,function(t){t.setTickNumber(e)})}applyAxisTreatAsText(t,e){this.handleAxis(t,function(t){t.setTreatAsText(e)})}applyAxisScalingMin(t,e){this.handleAxis(t,function(t){t.ensureScaling().setMin(e)})}applyAxisScalingMax(t,e){this.handleAxis(t,function(t){t.ensureScaling().setMax(e)})}applyAxisScalingOrientation(t,e){this.handleAxis(t,function(t){t.ensureScaling().setOrientation(e)})}applyAxisScalingRevert(t,e){this.handleAxis(t,function(t){t.ensureScaling().setRevert(e)})}applyAxisScalingLogBase(t,e){this.handleAxis(t,function(t){t.ensureScaling().setLogBase(e)})}applyAxisScalingLog(t,e){this.handleAxis(t,function(t){t.ensureScaling().setLog(e)})}applyAxisGridHidden(t,e){this.handleAxis(t,function(t){t.ensureMajorGridLines().setHidden(e)})}applyAxisGridColor(t,e){this.handleAxis(t,function(t){t.ensureMajorGridLines().setColor(e)})}applyAxisLabelHidden(t,e){this.handleAxis(t,function(t){t.ensureLabel().setHidden(e)})}applyAxisLabelRotate(t,e){this.handleAxis(t,function(t){t.ensureLabel().setRotate(e)})}applyAxisLabelFontFamily(t,e){this.handleAxis(t,function(t){t.ensureLabel().ensureTextStyle().setFontFamily(e)})}applyAxisLabelFontSize(t,e){this.handleAxis(t,function(t){t.ensureLabel().ensureTextStyle().setFontSize(e)})}applyAxisLabelItalic(t,e){this.handleAxis(t,function(t){t.ensureLabel().ensureTextStyle().setItalic(e)})}applyAxisLabelBold(t,e){this.handleAxis(t,function(t){t.ensureLabel().ensureTextStyle().setBold(e)})}applyAxisLabelColor(t,e){this.handleAxis(t,function(t){t.ensureLabel().ensureTextStyle().setColor(e)})}applyPlotAreaLayoutEnabled(t,e){let n=this.ensurePlotArea().ensureLayout();n.setEnabled(t),t&&e?(n.setTop(e.top||0),n.setLeft(e.left||0),n.setRight(e.right||0),n.setBottom(e.bottom||0)):(n.setTop(null),n.setLeft(null),n.setRight(null),n.setBottom(null))}applyPlotAreaLeft(t){this.ensurePlotArea().ensureLayout().setLeft(t)}applyPlotAreaTop(t){this.ensurePlotArea().ensureLayout().setTop(t)}applyPlotAreaRight(t){this.ensurePlotArea().ensureLayout().setRight(t)}applyPlotAreaBottom(t){this.ensurePlotArea().ensureLayout().setBottom(t)}invertChartSetting(){let t=[];return t.push.apply(t,this.invert("_applyChartGrouping")),t.push.apply(t,this.invert("_applyChartBarDir")),this.forEachSeries(function(e,n){t.push.apply(t,this.invert("applySeriesType",[n]))},this,!0),t.push.apply(t,this.invert("_applyChartType")),t}_invertChartType(t){return{args:[this.ensureChart().getType(!0)]}}_invertChartBarDir(t){return{args:[this.ensureChart().getBarDir(!0)]}}_invertChartGrouping(t){return{args:[this.ensureChart().getGrouping(!0)]}}invertChartBackgroundColor(t){return{args:[this.ensureChart().getBackgroundColor(!0)]}}invertChartBlankAs(t){return{args:[this.ensurePlotArea().getBlankAs(!0)]}}invertChartShowBlank(t){return this.invert("applyChartBlankAs")}invertGlobalFontFamily(t){return{args:[this.ensureGlobalTextStyle().getFontFamily(!0)]}}invertUseColumnHeader(t){return{args:[this.ensurePlotArea().getUseColumnHeader(!0)]}}invertUseRowHeader(t){return{args:[this.ensurePlotArea().getUseRowHeader(!0)]}}invertSwitchRowColumn(t){return{args:[this.ensurePlotArea().getSwitchRowColumn(!0)]}}invertPieHoleSize(t){return{args:[this.ensurePieSeries().getPieHoleSize(!0)]}}invertPieBorderColor(t){return{args:[this.ensurePieSeries().getPieBorderColor(!0)]}}invertPieLabelDisplay(t){let e=this.ensurePieLabel();return{args:[{val:e.getShowVal(!0),cat:e.getShowCat(!0),percent:e.getShowPercent(!0)}]}}invertPieLabelFontFamily(t){return{args:[this.ensurePieLabelStyle().getFontFamily(!0)]}}invertPieLabelFontSize(t){return{args:[this.ensurePieLabelStyle().getFontSize(!0)]}}invertPieLabelBold(t){return{args:[this.ensurePieLabelStyle().getBold(!0)]}}invertPieLabelItalic(t){return{args:[this.ensurePieLabelStyle().getItalic(!0)]}}invertPieLabelColor(t){return{args:[this.ensurePieLabelStyle().getColor(!0)]}}invertTitleText(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.getText(!0)]})}),n}invertTitleFontFamily(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.ensureTextStyle().getFontFamily(!0)]})}),n}invertTitleFontSize(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.ensureTextStyle().getFontSize(!0)]})}),n}invertTitleBold(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.ensureTextStyle().getBold(!0)]})}),n}invertTitleItalic(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.ensureTextStyle().getItalic(!0)]})}),n}invertTitleColor(t,e){let n=[];return this.handleTitle(t,function(t,e){n.push({args:[e,t.ensureTextStyle().getColor(!0)]})}),n}invertSeriesType(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.getType(!0)]})}),n}invertSeriesColor(t,e){if(lx(t))if(this.ensureChart().getType()===ls.PIE)return this.invert("_applyPieColor",arguments);else return this.invert("_applySeriesColor",arguments)}_invertPieColor(t,e){return{args:[t,this.ensurePieSeries().getPieColor(t,!0)]}}_invertSeriesColor(t,e){return{args:[t,this.ensureSeries(t).getColor(!0)]}}invertSeriesRightAxis(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.getRightAxis(!0)]})}),n}invertSeriesSmooth(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.getSmooth(!0)]})}),n}invertSeriesOpacity(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.getOpacity(!0)]})}),n}invertSeriesLineType(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLineStyle().getType(!0)]})}),n}invertSeriesLineWidth(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLineStyle().getWidth(!0)]})}),n}invertSeriesMarkerSymbol(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureMarker().getSymbol(!0)]})}),n}invertSeriesMarkerSize(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureMarker().getSize(!0)]})}),n}invertSeriesLabelHidden(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().getHidden(!0)]})}),n}invertSeriesLabelPosition(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().getPosition(!0)]})}),n}invertSeriesLabelFontFamily(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getFontFamily(!0)]})}),n}invertSeriesLabelFontSize(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getFontSize(!0)]})}),n}invertSeriesLabelItalic(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getItalic(!0)]})}),n}invertSeriesLabelBold(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getBold(!0)]})}),n}invertSeriesLabelColor(t,e){let n=[];return this.handleSeries(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getColor(!0)]})}),n}invertLegendHidden(t){return{args:[this.ensureChartLegend().getHidden(!0)]}}invertLegendPosition(t){return[{args:[this.ensureChartLegend().getPosition(!0)]},{name:"applyLegendHidden",args:[this.ensureChartLegend().getHidden(!0)]}]}invertLegendFontFamily(t){return{args:[this.ensureChartLegendStyle().getFontFamily(!0)]}}invertLegendFontSize(t){return{args:[this.ensureChartLegendStyle().getFontSize(!0)]}}invertLegendItalic(t){return{args:[this.ensureChartLegendStyle().getItalic(!0)]}}invertLegendBold(t){return{args:[this.ensureChartLegendStyle().getBold(!0)]}}invertLegendColor(t){return{args:[this.ensureChartLegendStyle().getColor(!0)]}}invertAxisTickNumber(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.getTickNumber(!0)]})}),n}invertAxisTreatAsText(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.getTreatAsText(!0)]})}),n}invertAxisScalingMin(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureScaling().getMin(!0)]})}),n}invertAxisScalingMax(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureScaling().getMax(!0)]})}),n}invertAxisScalingOrientation(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureScaling().getOrientation(!0)]})}),n}invertAxisScalingRevert(t,e){return this.invert("applyAxisScalingOrientation",[t])}invertAxisScalingLogBase(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureScaling().getLogBase(!0)]})}),n}invertAxisScalingLog(t,e){return this.invert("applyAxisScalingLogBase",[t])}invertAxisGridHidden(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureMajorGridLines().getHidden(!0)]})}),n}invertAxisGridColor(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureMajorGridLines().getColor(!0)]})}),n}invertAxisLabelHidden(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().getHidden(!0)]})}),n}invertAxisLabelRotate(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().getRotate(!0)]})}),n}invertAxisLabelFontFamily(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getFontFamily(!0)]})}),n}invertAxisLabelFontSize(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getFontSize(!0)]})}),n}invertAxisLabelItalic(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getItalic(!0)]})}),n}invertAxisLabelBold(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getBold(!0)]})}),n}invertAxisLabelColor(t,e){let n=[];return this.handleAxis(t,function(t,e){n.push({args:[e,t.ensureLabel().ensureTextStyle().getColor(!0)]})}),n}invertPlotAreaLayoutEnabled(t){let e=this.ensurePlotArea().ensureLayout(),n={top:e.getTop(!0),left:e.getLeft(!0),right:e.getRight(!0),bottom:e.getBottom(!0)};return{args:[e.getEnabled(!0),n]}}invertPlotAreaLeft(t){return{args:[this.ensurePlotArea().ensureLayout().getLeft(!0)]}}invertPlotAreaTop(t){return{args:[this.ensurePlotArea().ensureLayout().getTop(!0)]}}invertPlotAreaRight(t){return{args:[this.ensurePlotArea().ensureLayout().getRight(!0)]}}invertPlotAreaBottom(t){return{args:[this.ensurePlotArea().ensureLayout().getBottom(!0)]}}isDrawable(){let t,e,n,r=this.ensureChart().getType()===ls.PIE,i=+!!this.dataHasCat(),a=+!!this.dataHasTx(),s=r?i+1:this.getDataRowNumber(),o=this.getDataColNumber();if(i>=s||a>=o)return!1;for(t=i;t<s;t++)for(e=a;e<o;e++)if(lx(n=this.getData(t,e))&&(!r||n>0))return!0;return!1}getEmptyCategory(){let t=this.getSeriesCat(),e=this.getSeriesCount();return t.map((n,r)=>{if(!lg(t[r]))return!1;for(let t=0;t<e;t++)if(lx(this.getSeriesVal(t,r)))return!1;return!0})}getEmptySeries(){return Array.from({length:this.getSeriesCount()},(t,e)=>this.getSeriesVal(e).every(t=>lg(t)))}calcSeriesData(t){let e=[];for(let t=0,n=this.getSeriesCount();t<n;++t)e.push({name:this.getSeriesTx(t),data:this.getSeriesVal(t)});return e}calcPlotBound(t){let{top:e,bottom:n,left:r,right:i}=lv.padding,a=this.ensureGlobalTextStyle().getFontSize(),s=this.ensureChartTitle();s.getText()&&(e+=lb(s.ensureTextStyle().getFontSize()||a));let o=this.ensureChartSubtitle();o.getText()&&(e+=lb(o.ensureTextStyle().getFontSize()||a)+(s.getText()?lv.titleGap:0));let l=this.ensureChartLegend();if(!l.getHidden())switch(l.getPosition()){case"t":e+=lb(l.ensureTextStyle().getFontSize()||a)+lv.plotGap;break;case"b":n+=lb(l.ensureTextStyle().getFontSize()||a)+lv.plotGap;break;case"l":r+=lv.legendWidth;break;default:i+=lv.legendWidth}return e+=lv.plotGap,r+=lv.plotGap,i+=lv.plotGap,t&&(e/=lv.cm2pxMultiplier,r/=lv.cm2pxMultiplier,i/=lv.cm2pxMultiplier,n/=lv.cm2pxMultiplier),{top:e,left:r,right:i,bottom:n}}getEchartParameters(t,e){let n=function(t){switch(t.ensureChart().getType()){case ls.LINE:return new lI(t);case ls.AREA:return new lP(t);case ls.BAR:return new lT(t);case ls.PIE:return new lk(t);case ls.SCATTER:return new lL(t);case ls.HYBRID:return new lD(t)}}(this);if(n)return n.initData(),n.convert(t,e)}clone(){return new this.constructor(this.getChartCfg(),this.getOptionCfg())}getConfig(){return{chartCfg:this.getChartCfg(),optionCfg:this.getOptionCfg()}}getChartCfg(){return this.build()}getOptionCfg(){return this._options}},{isDefined:l3}=g,{DEFAULT:l6}=p;class l7 extends l8{readOptionCfg(t){this.setRawData(t&&t.data||this.constructor.createDefaultData())}getData(t,e){if(this.getSwitchRowColumn()){let n=t;t=e,e=n}return super.getData(t,e)}getDataRowNumber(){return this.getSwitchRowColumn()?super.getDataColNumber():super.getDataRowNumber()}getDataColNumber(){return this.getSwitchRowColumn()?super.getDataRowNumber():super.getDataColNumber()}static createDefaultData(){return[["","Number 1","Number 2","Number 3","Number 4"],["Category A",500,520,540,520],["Category B",520,540,560,540],["Category C",540,560,580,560]]}static extractData(t,e){let n,r,i,a;if(!t)return null;let s=new this(t,e).ensureChart(),o=s.getPlotArea();if(!o)return null;let l=o.getSeries();if(!l)return null;let h=l.length;if(0===h)return null;if(e&&({switchRowColumn:n,extractCat:r,extractTx:i}=e),!l3(n)||!l3(r)||!l3(i)){let t=o.getRawConfig().dataDir;n=!!t&&t!==l6.DATA_DIR,r=!1,i=!1;for(let t=0;t<h;++t){let e=l[t];if(l3(e.cat)&&(r=!0),l3(e.tx)&&(i=!0),r&&i)break}}let u=[],c=+!!r,d=+!!i;for(let t=0,e=l.length;t<e;++t){let e=l[t];if(!e)continue;if(r&&!a){let t=e.cat;l3(t)&&(this._fillDataRow(u,0,d,this.translateDataValue(t),n),a=!0)}if(i){let r=e.tx;if(l3(r)){let e=this.translateDataValue(r);Array.isArray(e)&&(e=e[0]),this._fillDataRow(u,c+t,0,e,n)}}let s=e.val;l3(s)&&this._fillDataRow(u,c+t,d,this.translateDataValue(s),n)}return r&&i&&this._fillDataRow(u,0,0,[s.getRawConfig().cornerData||""]),this.ensureData(u)}static translateDataValue(t){return t}static _fillDataRow(t,e,n,r,i){if(Array.isArray(r)||(r=[r]),i)for(let i=0,a=r.length;i<a;++i)this._ensureDataRow(t,n+i)[e]=r[i];else{let i=this._ensureDataRow(t,e);for(let t=0,e=r.length;t<e;++t)i[n+t]=r[t]}}static _ensureDataRow(t,e){return t[e]||(t[e]=[])}static ensureData(t){if(Array.isArray(t)&&t.length){let e=t.length,n=null,r;for(let i=0;i<e;++i){let e;Array.isArray(t[i])?e=t[i].length:(e=0,r=!0),null==n?n=e:n!==e&&(r=!0,n=Math.max(n,e))}if(0===n)t=null;else if(r){let r=[];for(let i=0;i<e;++i){let e=t[i];if(Array.isArray(e)){let t=e.length;t!==n&&((e=e.slice()).length=n,e.fill("",t))}else e=Array(n).fill("");r.push(e)}t=r}}else t=null;return t}static fromNode(t){return this.fromAttrs(t.attrs)}static fromAttrs(t){return new this(t&&t.config,t)}}class l9 extends ln{checkChartNode(t,e,n){let r=this.checkNode(t,e,n);return r&&r.type.isChart?r:null}}class ht extends l9{constructor(t,e,n){super(t,e),this.cmds=Array.isArray(n)?n:[n]}doApply(t){let e=this.checkChartNode(t,this.from,this.to);if(!e)return"No valid node in given `from`.";let n=l7.fromNode(e),r=this.cmds;for(let t=0,e=r.length;t<e;++t){let e=r[t];if(!n.apply(e.name,e.args))return`Invalid command at index ${t} of commands (${r}).`}let i=e.copy(e.content,{config:n.getChartCfg()});return t.replace(this.from,this.to,rr.from(i))}invert(t){let e=this.checkChartNode(t,this.from,this.to);if(!e)return null;let n=l7.fromNode(e),r=this.cmds,i=[];for(let t=r.length-1;t>=0;--t){let e=r[t],a=n.invert(e.name,e.args);if(!a)return null;i.push(...a)}return new this.constructor(this.from,this.to,i)}map(t){let e=this.mapRange(t);return e.deleted?null:new this.constructor(e.from,e.to,this.cmds)}toJSON(t){return{stepType:this.jsonID,from:this.from,to:this.to,cmds:this.cmds}}static fromJSON(t,e){return new this(e.from,e.to,e.cmds)}}oH.jsonID("setChartConfig",ht);class he extends l9{constructor(t,e,n,r,i){super(t,e),this.row=n,this.col=r,this.value=!function(t){return"number"==typeof t&&isFinite(t)}(i)?null!=i?String(i):"":i}doApply(t){let e=this.checkChartNode(t,this.from,this.to);if(!e)return"No valid node in given `from`.";let{row:n,col:r}=this,i=e.getAttrValue("data");if(n>=i.length)return t;let a=i[n];if(r>=a.length)return t;(a=a.slice())[r]=this.value,(i=i.slice())[n]=a;let s=e.copy(e.content,{data:i});return t.replace(this.from,this.to,rr.from(s))}invert(t){let e=this.checkChartNode(t,this.from,this.to);if(!e)return null;let{row:n,col:r}=this,i=e.getAttrValue("data");if(n>=i.length)return null;let a=i[n];return r>=a.length?null:new this.constructor(this.from,this.to,n,r,a[r])}map(t){let e=this.mapRange(t);return e.deleted?null:new this.constructor(e.from,e.to,this.row,this.col,this.value)}toJSON(t){return{stepType:this.jsonID,from:this.from,to:this.to,row:this.row,col:this.col,value:this.value}}static fromJSON(t,e){return new this(e.from,e.to,e.row,e.col,e.value)}}oH.jsonID("setChartDataValue",he),Object.assign(oZ.prototype,{setChartConfig:function(t,e,n){if(!l7.checkCmdName(e))throw RangeError(`Given command name ${e} is invalid.`);let r=ht.prototype.checkChartNode(this.doc,t);if(!r)throw RangeError("No chart node at given position");return this.step(new ht(t,t+r.nodeSize,{name:e,args:n}))},setChartDataValue:function(t,e,n,r){let i=he.prototype.checkChartNode(this.doc,t);if(!i)throw RangeError("No chart node at given position");return this.step(new he(t,t+i.nodeSize,e,n,r))}});class hn extends oH{constructor(t){super(),this.comment=t}apply(t,e){return oj.ok(t,e)}map(t){return new this.constructor(this.comment)}static fromJSON(t,e){return new(oH.stepClass(e.stepType))(e.comment)}}class hr extends hn{get isCreateCommentStep(){return!0}invert(t){return new hi(this.comment)}}oH.jsonID("createComment",hr);class hi extends hn{invert(t){return new hr(this.comment)}}oH.jsonID("removeComment",hi);class ha extends hn{invert(t){return new hs(this.comment)}}oH.jsonID("resolveComment",ha);class hs extends hn{get isReopenCommentStep(){return!0}invert(t){return new ha(this.comment)}}oH.jsonID("reopenComment",hs);class ho extends oH{constructor(t){super(),this.operator=t}}class hl extends ho{constructor(t,e){super(t),this.operation=e}doApply(t,e){return this.operate(e)}operate(t){return t[this.constructor.operationName](this.operator,this.operation)}map(t){return this}static fromJSON(t,e){return new this(e.operator,e.operation)}static create(t,e){if(!this.operationProperties.every(t=>t in e))throw Error(`Operation ${JSON.stringify(e)} misses keys ${this.operationProperties}`);return new this(t,V(e,this.operationProperties))}}class hh extends hl{static #t=this.operationName="removeComment";static #e=this.operationProperties=["target"];invert(t,e){let n=e.getCommentById(this.operation.target);return n&&n.isSuggestion()?hu.create(this.operator,n):null}static create(t,e){return super.create(t,e)}}hh.register("removeCommentV2");class hu extends hl{static #t=this.operationName="createComment";static #e=this.operationProperties=["id","author","authorName","type","status","text","timestamp","lastModified"];invert(t,e){return 1!==this.operation.type?null:hh.create(this.operator,{target:this.operation.id})}static create(t,e){let n=Date.now();return super.create(t,{id:e.id||J(),author:t,authorName:e.authorName||void 0,type:e.type,text:e.text,status:e.status??0,timestamp:e.timestamp??n,lastModified:n})}}hu.register("createCommentV2");class hc extends hl{static #t=this.operationName="reply";static #e=this.operationProperties=["target","id","author","authorName","status","text","timestamp","lastModified"];static create(t,e){let n=Date.now();return super.create(t,{target:e.target,id:`${J()}-${n}`,author:t,authorName:e.authorName||void 0,status:0,text:e.text,timestamp:n,lastModified:n})}}hc.register("createReplyV2");class hd extends hl{static #t=this.operationName="removeReply";static #e=this.operationProperties=["target","replyIndex"];static create(t,e){return super.create(t,{target:e.target,replyIndex:e.replyIndex})}}hd.register("removeReplyV2");class hp extends hl{static #t=this.operationProperties=["target","id","author","authorName","timestamp","lastModified"];invert(t,e){let n=e.getCommentById(this.operation.target);return n&&0!==n.type?("resolve"===this.constructor.operationName?hf:hg).create(this.operator,this.operation):null}static create(t,e){let n=Date.now();return super.create(t,{target:e.target,id:`${J()}-${n}`,author:t,authorName:e.authorName||void 0,timestamp:n,lastModified:n})}}class hg extends hp{static #t=this.operationName="resolve"}hg.register("resolveCommentV2");class hf extends hp{static #t=this.operationName="reopen"}hf.register("reopenCommentV2");class hy extends hl{static #t=this.operationName="editCommentText";static #e=this.operationProperties=["target","text","lastModified"];static create(t,e){return super.create(t,{target:e.target,text:e.text,lastModified:Date.now()})}}hy.register("editCommentV2");class hx extends hl{static #t=this.operationName="editReplyText";static #e=this.operationProperties=["target","replyIndex","text","lastModified"];static create(t,e){return super.create(t,{target:e.target,replyIndex:e.replyIndex,text:e.text,lastModified:Date.now()})}}hx.register("editReplyV2");class hm extends oZ{constructor(t,e,n){super(t,e,n),this.userInfo={id:0}}getUserId(){return this.userInfo.id}getUserName(){return this.userInfo.name}getUserInfo(){return this.userInfo}setUserInfo(t){this.userInfo=t}createComment(t,e){return this.step(hu.create(this.getUserId(),{authorName:this.getUserName(),...t}),e)}removeComment(t,e){return this.commentStore.getBy(t,!0),this.step(hh.create(this.getUserId(),{target:t}),e)}clearComments(t){for(let e of this.commentStore.getAllCommentIds())this.removeComment(e,t);return this}setCommentResolved(t,e,n){let r=this.commentStore.getBy(t,!0);return(e?r.isResolved():r.isOpened())?this:this.step((e?hg:hf).create(this.getUserId(),{target:t,authorName:this.getUserName()}),n)}resolveComment(t,e){return this.setCommentResolved(t,!0,e)}reopenComment(t,e){return this.setCommentResolved(t,!1,e)}createReply(t,e,n){return this.commentStore.getBy(t,!0),this.step(hc.create(this.getUserId(),{target:t,authorName:this.getUserName(),text:e}),n)}removeReply(t,e,n){return this.commentStore.getBy(t,!0),this.step(hd.create(this.getUserId(),{target:t,replyIndex:e}),n)}editCommentText(t,e,n){return this.commentStore.getBy(t,!0),this.step(hy.create(this.getUserId(),{target:t,text:e}),n)}editReplyText(t,e,n,r){return this.commentStore.getBy(t,!0),this.step(hx.create(this.getUserId(),{target:t,replyIndex:e,text:n}),r)}}let hv=nH.createOptional({empty_value:v,copyable:!0,settable:!1,normalizer:t=>{let e;return t?(Array.isArray(t)?e=t:"string"==typeof t&&(e=t.split(" ")),e&&e.length?e:null):null}}),hb={trackingSelf:hv},hw={...hb,trackingStart:hv,trackingEnd:hv.copy({backward:!0})},hM={...hb,trackingLeaf:hv};function h_(t,e){return t.getAttrValue(e)||v}let hA=(t,e)=>{if(void 0===e&&(e=!1),t.is("Text"))throw Error("Unable to mixin Trackable to Text.");return class extends t{getFreezeList(){let t=super.getFreezeList();return t.push("trackingAttrs","trackingAttrsList","defaultTrackingAttrs"),t}static getSelfPropertyName(){return"Trackable"}get trackingAttrs(){let t,n=this.constructor;return n.is("Inline")||!n.is("EditableType")?hb:e?hM:hw}get trackingAttrsList(){return Object.keys(this.trackingAttrs)}get defaultTrackingAttrs(){return nH.emptyAttrs(this.trackingAttrs)}get attrs(){return{...super.attrs,...this.trackingAttrs}}computeJsonConversionAttrs(t,e){let n=super.computeJsonConversionAttrs(t,e);if("clipboard"!==e.target)return n;if(!e.preserveTrackings&&this.trackingAttrsList.some(t=>n[t])){let t={...n};for(let e of this.trackingAttrsList)t[e]&&(t[e]=void 0);n=t}return n}renderAttrsDom(t,e,n){if(super.renderAttrsDom(t,e,n),"clipboard"!==n.target){let n;this.isNonEditableType?n=h_(e,"trackingSelf"):this.is("EditableType")&&!this.is("Inline")&&(n=this.isLeaf?h_(e,"trackingLeaf"):this.isTextblock?h_(e,"trackingEnd"):tB(h_(e,"trackingStart"),h_(e,"trackingEnd"))),n&&n.length&&(t["data-syno-comment"]=n.join(" "))}return t}renderAttrsJson(t,e,n){if(super.renderAttrsJson(t,e,n),"clipboard"!==n.target||n.preserveTrackings)for(let n of this.trackingAttrsList){let r=e.getAttrValue(n);r?.length&&(t[n]=r)}return t}}},hS=t=>{if(!t.is("Inline"))throw Error("Unable to mixin TrackableInline to non-inline.");return class extends t{static getSelfPropertyName(){return"TrackableInline"}computeJsonConversionMarks(t,e){let n=super.computeJsonConversionMarks(t,e);return n.length&&"clipboard"===e.target&&(e.preserveTrackings||(n=this.schema.markType("tracking").removeFromSet(n))),n}}};class hC extends r5{static getSelfPropertyName(){return"Tracking"}get supportTextblock(){return!1}get supportListBlock(){return!1}get inclusiveBefore(){return!1}get copyable(){return!0}get clearable(){return!1}get settable(){return!1}get supportMerge(){return!0}get valueKey(){return"id"}get attrs(){return{id:nH.create({normalizer:t=>Array.isArray(t)?t:v})}}merge(t,e){let n=t.getValue(),r=tz(n,e.getValue());return r.length===n.length?t:this.create({id:r})}split(t,e){let n=t.getValue(),r=tF(n,e.getValue());return r.length===n.length?t:r.length?this.create({id:r}):null}intersect(t,e){let n=t.getValue(),r=tB(n,e.getValue());return r.length===n.length?t:r.length?this.create({id:r}):null}get matchDOMTag(){return{"span[data-syno-comment]":(t,e)=>{let n=t.getAttribute("data-syno-comment");if(!n)return!1;let r=n.split(" ").filter(t=>t);return 0!==r.length&&{id:r}}}}toDOM(t,e){let n="clipboard"!==e.target||e.preserveTrackings?t.getValue():v;return["span",{"data-syno-comment":n.length?n.join(" "):null}]}checkIds(t,e){if(t===e)return!0;if(!t||!e)return!1;if(!t.length&&!e.length)return!0;if(t.length!==e.length)return!1;let n=new Set;for(let e of t)n.add(e);for(let t of e)if(!n.has(t))return!1;return!0}get checker(){return{id:this.checkIds}}}function hI(t,e){return t?e?t.length&&e.length?t.concat(e):e.length?e:t:t:e}function hP(t,e){return e.is("Tracking")&&t.push(...e.getValue()),t}function hT(t){return t.marks.reduce(hP,[])}function hk(t){return t.getAttrValue("trackingLeaf")||v}function hL(t){return t.is("Trackable")?t.getAttrValue("trackingSelf")||v:null}function hD(t){return t.is("Inline")?hT(t):null}function hR(t){if(t.is("Inline"))return hT(t);if(t.is("Trackable"))if(t.is("Leaf"))return hk(t);else return t.getAttrValue("trackingStart")||v;return null}function hN(t){if(t.is("Inline"))return hT(t);if(t.is("Trackable"))if(t.is("Leaf"))return hk(t);else return t.getAttrValue("trackingEnd")||v;return null}function hO(t){return hI(hR(t),hL(t))}function hj(t){return hI(hN(t),t.is("Leaf")?hL(t):null)}let hE={from:-1,to:-1};function hV(t,e){return hE.from=t,hE.to=e,hE}function hB(t,e){return t.is("Trackable")?hV(e,e+1):null}function hz(t,e){if(t.is("EditableType")){if(t.is("Inline"))return hV(e,e+t.nodeSize);else if(t.is("Trackable"))return hV(e,e+1)}return null}function hF(t,e){if(t.is("EditableType")){if(t.is("Inline"))return hV(e,e+t.nodeSize);else if(t.is("Trackable")){let n=e+t.nodeSize;return hV(n-1,n)}}return null}function hG(t,e,n,r){return!t.is("Inline")||t.is("Leaf")||e>=n&&e+t.nodeSize<=r}function hH(t,e,n,r,i){void 0===i&&(i=m);let a=(t,i,a,s,o)=>{let l=t(s,o);l&&r(s,o,i(s)||v,Math.max(e,l.from),Math.min(n,l.to),a)},s=a.bind(null,hB,hL,!0),o=a.bind(null,hz,hR,!1),l=a.bind(null,hF,hN,!1);t.nodesInside(e,n,(t,r,i,a,h)=>{h||s(t,r),hG(t,r,e,n)&&(h?t.is("Inline")||l(t,r):o(t,r))},{overrideRoot:!0,skipOutOfRange:!0,skipInlineContent:i.skipInlineContent,enableLeaving:!0})}let hW=new WeakMap;function hq(t){let e=hW.get(t);return e||(e={},hW.set(t,e)),e}function hU(t){for(let e=2,n=t.length;e<n;e+=2)if(t[e-1]>t[e])return!0;return!1}function*hZ(t,e){let n=t.length+(t.length%2==0?0:-1);if(e?.reversed)for(let e=n/2-1,r=n-2;r>=0;--e,r-=2)yield{from:t[r],to:t[r+1],index:e};else for(let e=0,r=0;r<n;++e,r+=2)yield{from:t[r],to:t[r+1],index:e}}function h$(t,e,n){for(let{from:r,to:i,index:a}of hZ(t))if(e.call(n,r,i,a))return}function hJ(t,e){if(t===e)return!0;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;++r)if(t[r]!==e[r])return!1;return!0}function hY(t){return t instanceof ob}function hX(t){let e=hq(t);if(e.deleted)return e.deleted;{let n=[];return hY(t)&&t.forEach((t,e)=>{0!==e&&n.push(t,t+e)}),e.deleted=n,n}}function hQ(t){let e=hq(t);if(e.inserted)return e.inserted;{let n=[];return hY(t)&&t.forEach((t,e,r,i)=>{0!==i&&n.push(r,r+i)}),e.inserted=n,n}}function hK(t,e){if(!t.length||!e.length)return[];let n=[],r=t.length,i=e.length,a=0,s=0;for(;a<r&&s<i;){let r=t[a],i=t[a+1],o=e[s],l=e[s+1];r<l&&i>o&&n.push(Math.max(r,o),Math.min(i,l)),i<=l&&(a+=2),i>=l&&(s+=2)}return n}function h0(t,e){if(!e.length)return t;if(!t.length)return e;let n=[],r=t.length,i=e.length,a=-1,s=-1,o=0,l=0;for(;o<r||l<i;){let h,u;l>=i||o<r&&t[o]<e[l]?(h=t[o],u=t[o+1],o+=2):(h=e[l],u=e[l+1],l+=2),a>=0?h<=s?s=Math.max(s,u):(n.push(a,s),a=h,s=u):(a=h,s=u)}return a>=0&&n.push(a,s),n}function h1(t,e){if(!t.length||!e.length)return t;let n=[],r=t.length,i=e.length,a=-1,s=-1,o=0,l=0;for(;;){if(a<0){if(o>=r)break;a=t[o],s=t[o+1],o+=2}for(;l<i&&!(e[l+1]>a);l+=2);if(l>=i)break;let h=e[l],u=e[l+1];h<s?(h>a&&n.push(a,h),a=u<s?u:s=-1):(n.push(a,s),a=s=-1)}for(a>=0&&n.push(a,s);o<r;o+=2)n.push(t[o],t[o+1]);return n}function h2(t,e,n){if(!t.length||!n.isMappable())return t;let r=[];for(let i=0,a=t.length;i<a;i+=2)if(e){let{pos:e,deleted:a}=n.mapNodeResult(t[i],1);a||r.push(e,e+1)}else{let e=n.map(t[i],1),a=n.map(t[i+1],-1);if(e<a){let t=r.length;t&&r[t-1]>=e?r[t-1]=a:r.push(e,a)}}return e&&r.sort((t,e)=>t-e),r}class h5 extends ho{constructor(t,e,n,r){super(t),this.ids=e,this.ranges=n,this.sticky=r}collectSelfTrackingRange(t,e,n,r){let i=e.nodeAt(n);return i&&i.is("Trackable")&&t.push(n,n+1),t}collectRangedTrackingRange(t,e,n,r){let i=[];return e.nodesInside(n,r,(t,e,a,s,o)=>{let l;if(!t.is("EditableType")||!hG(t,e,n,r)||!(l=o?hF(t,e):hz(t,e)))return;let h=Math.max(n,l.from),u=Math.min(r,l.to),c=i.length,d=c?i[c-1]:-1;h<=d?i[c-1]=Math.max(d,u):i.push(h,u)},{overrideRoot:!0,skipOutOfRange:!0,skipInlineContent:!0,enableLeaving:!0}),h0(t,i)}collectTrackingRanges(t){let e=this.sticky?this.collectSelfTrackingRange:this.collectRangedTrackingRange,n=[];return h$(this.ranges,(r,i)=>{n=e.call(this,n,t,r,i)}),n}doApply(t,e){let n=this.ids.filter(t=>e.getCommentById(t));return n.length&&h$(this.ranges,(r,i)=>{t=this.applyTrackingRange(t,e,r,i,n)}),oj.ok(t,e)}createTrackingMark(t,e,n){return t.type.schema.mark("tracking",{id:n})}modifyCommentIds(t,e){return null}fillTrackingAttrs(t,e,n,r){let i=this.modifyCommentIds(e.getAttrValue(n)||v,r);if(i)return Object.assign(t||Object.create(null),{[n]:i})}applySelfTrackingRange(t,e,n,r,i){let a=t.nodeAt(n);if(!a||!a.is("Trackable"))return t;let s=this.fillTrackingAttrs(void 0,a,"trackingSelf",i);return s?t.replace(n,n+a.nodeSize,rr.from(a.copyWithAttrs(s))):t}applyRangedTrackingRange(t,e,n,r,i){let a=this.createTrackingMark(t,e,i),s=t.slice(n,r).mapDescendants((t,e,s,o)=>{if(!t.is("EditableType"))return t;if(t.is("Inline")){if(hG(t,e,n,r)){let e=o?.contentMatchAt(s+1);if(e&&e.allowsMark(a.type))return t.mark(a["add"===this.constructor.rangeType?"addToSet":"removeFromSet"](t.marks))}}else if(t.is("Trackable")){let a;if(t.type.isLeaf?a=this.fillTrackingAttrs(a,t,"trackingLeaf",i):(e>=n&&(a=this.fillTrackingAttrs(a,t,"trackingStart",i)),e+t.nodeSize<=r&&(a=this.fillTrackingAttrs(a,t,"trackingEnd",i))),a)return t.copyWithAttrs(a)}return t},{start:n,skipInlineContent:!0});return t.replace(n,r,s)}applyTrackingRange(t,e,n,r,i){return this.sticky?this.applySelfTrackingRange(t,e,n,r,i):this.applyRangedTrackingRange(t,e,n,r,i)}invert(t,e){return("add"===this.constructor.rangeType?h8:h4).create(this.operator,this.ids,this.ranges,this.sticky)}map(t){let e=h2(this.ranges,this.sticky,t);return e.length?new this.constructor(this.operator,this.ids,e,this.sticky):null}static fromJSON(t,e){return new this(e.operator,e.ids,e.ranges,e.sticky)}static create(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return super.create(...e)}}class h4 extends h5{static #t=this.rangeType="add";modifyCommentIds(t,e){let n=tz(t,e);return n.length===t.length?null:n}}oH.jsonID("addCommentTracking",h4);class h8 extends h5{static #t=this.rangeType="remove";modifyCommentIds(t,e){let n=tF(t,e);return n.length===t.length?null:n}}oH.jsonID("removeCommentTracking",h8),(class extends oH{static fromJSON(t,e){return h4.create(0,[e.id],e.ranges,e.applyOnNode)}}).register("createCommentRange");(class extends oH{static fromJSON(t,e){return h8.create(0,[e.id],e.ranges,e.applyOnNode)}}).register("removeCommentRange");class h3 extends oV{}class h6 extends oB{constructor(t){super(t),this.ranges=t.ranges||v,this.sticky=t.sticky??!1,this.suggestionInfo=void 0}getSuggestionInfo(){let t;if(void 0!==this.suggestionInfo)return this.suggestionInfo;if(this.isSuggestion())try{t=JSON.parse(this.text)}catch{t=null}else t=null;return this.suggestionInfo=t}getSuggestionOp(){let t=this.getSuggestionInfo();return t?t.op||"":null}getSuggestionStepId(){let t=this.getSuggestionInfo();return t?t.step||"":null}isInsertion(){return this.isSuggestion()&&"insertion"===this.getSuggestionOp()}isDeletion(){return this.isSuggestion()&&"deletion"===this.getSuggestionOp()}isSelfDiscussion(t){return this.isAuthor(t)&&this.isDiscussion()}isSelfSuggestion(t){return this.isAuthor(t)&&this.isSuggestion()}isSelfInsertion(t){return this.isAuthor(t)&&this.isInsertion()}isSelfDeletion(t){return this.isAuthor(t)&&this.isDeletion()}hasRanges(){return!!this.ranges.length}hasSingleRanges(){return this.hasRanges()&&this.ranges.length<=2}hasMultiRanges(){return this.hasRanges()&&this.ranges.length>2}isVisible(){return this.isOpened()&&this.hasRanges()}forEachRange(t,e){h$(this.ranges,t,e)}handleRanges(t,e,n){void 0===n&&(n=!1);let r=this.ranges,i=(n?h0:h1)(r,t),a=r.length?this.sticky:e,s=e===a&&e;return a===s&&hJ(r,i)?this:this.copy({ranges:i,sticky:s})}addRanges(t,e){return this.handleRanges(t,e,!0)}removeRanges(t,e){return this.handleRanges(t,e,!1)}mapRanges(t,e){let n=this.ranges;return!n.length||!t.isMappable()||hJ(n=h1(n=h2(n,this.sticky,t),e),this.ranges)?this:this.copy({ranges:n})}toObject(){return Object.assign(super.toObject(),{ranges:this.ranges,sticky:this.sticky})}static createReply(t){return h3.fromJSON(t)}}let h7={ids:[],whole:!1};class h9 extends oF{constructor(t,e){if(!e)throw Error("doc is not initialized.");super(t),this.doc=e}init(){let t=h9.buildTrackingRangesMap([{fragment:this.doc}]);return this.updateCommentsMapped((e,n)=>{let r=t.get(n);return r?e.copy(r):e.copy()})}assertValid(){}hasVisibleSuggestion(){let t=!1;return this.forEach(e=>{if(e.isVisible()&&e.isSuggestion())return t=!0,!0}),t}commentIdsBetween(t,e,n,r){return hH(this.doc,t,e,(t,e,r,i,a,s)=>{r.length&&n(r,s)},r)}commentsBetween(t,e,n,r){return this.commentIdsBetween(t,e,t=>{let e=this.idsToComments(t);e.length&&n(e)},r)}static buildTrackingRangesMap(t){let e=new Map;for(let{fragment:n,from:r,to:i,start:a=0}of t)hH(n,r??0,i??n.getContentSize(),(t,n,r,i,s,o)=>{for(let t of r)!function(t,n,r,i){let a=e.get(t);if(a){!i&&a.sticky&&(a.sticky=!1);let t=a.ranges,e=t.length,s=e?t[e-1]:-1;n<=s?t[e-1]=Math.max(s,r):t.push(n,r)}else e.set(t,{ranges:[n,r],sticky:i})}(t,i+a,s+a,o)});return e}_findCommentIdsAt(t,e){let n,r,i=t.parent,a=t.index();return i.is("Textblock")&&!t.atNodeBoundary?(n=hD(i.child(a)),r=!0):(n=e>0?a===i.childCount?hj(i):hO(i.child(a)):0===a?hO(i):hj(i.child(a-1)),r=!1),h7.ids=n||v,h7.whole=r,h7}findCommentIdsAt(t,e){return this._findCommentIdsAt(t,e).ids}findCommentIdsUnion(t){let{ids:e,whole:n}=this._findCommentIdsAt(t,-1);return n?e:tz(e,this._findCommentIdsAt(t,1).ids)}getCommentsAt(t,e){let n=this.doc.resolve(t);return this.idsToComments(0===e?this.findCommentIdsUnion(n):this.findCommentIdsAt(n,e))}getAt(t,e){return this.getCommentsAt(t,e)}getCommentsInsideRanges(t){let e=new Set;return h$(t,(t,n)=>{this.commentIdsBetween(t,n,t=>{t.forEach(e.add,e)})}),this.idsToComments(e)}getInsideRanges(t){return this.getCommentsInsideRanges(t)}getCommentsInside(t,e){return this.getCommentsInsideRanges([t,e])}getInside(t,e){return this.getCommentsInside(t,e)}getCommentsBetweenRanges(t){let e=new Set;return h$(t,(t,n)=>{this.commentIdsBetween(t,n,t=>{t.forEach(e.add,e)},{skipInlineContent:!0})}),this.idsToComments(e)}getBetweenRanges(t){return this.getCommentsBetweenRanges(t)}getCommentsBetween(t,e){return this.getCommentsBetweenRanges([t,e])}getBetween(t,e){return this.getCommentsBetween(t,e)}getCommentsFittingRanges(t){let e=[];return h$(t,(t,n)=>{e.push(this.getCommentsAt(t,1),this.getCommentsAt(n,-1))}),tB(...e)}getFittingRanges(t,e){return this.getCommentsFittingRanges(t)}getCommentsFitting(t,e){return void 0===e&&(e=t),this.getCommentsFittingRanges([t,e])}getFitting(t,e){return this.getCommentsFitting(t,e)}getCommentsAcrossRanges(t){let e=[];return h$(t,(t,n)=>{e.push(this.getCommentsAt(t,-1),this.getCommentsAt(n,1))}),tB(...e)}getAcrossRanges(t){return this.getCommentsAcrossRanges(t)}getCommentsAcross(t,e){return this.getCommentsAcrossRanges([t,e])}getAcross(t,e){return this.getCommentsAcross(t,e)}updateDoc(t){let e=this.copy();return e.doc=t,e}updateComments(t){let e=this.copy();return e.comments=t,e}updateCommentsMapped(t,e){return this.updateComments(F(this.comments,t,e))}mapPos(t){if(!t.isMappable())return this;let e=hQ(t),n=[];return h$(e,(t,e)=>{let r=this.doc.resolveCommon(t,e);if(!r)return;let i=new Set;r.forEach((t,e)=>{let n=hD(e);n&&n.forEach(i.add,i)}),n.push(i)}),this.updateCommentsMapped(r=>{let i,a=n.map(t=>t.has(r.id));return i=a.some(t=>t)?a.reduce((t,n,r)=>(n||t.push(e[2*r],e[2*r+1]),t),[]):e,r.mapRanges(t,i)})}mapCommentRanges(t,e,n,r){if(void 0===r&&(r=!1),!t.length||!e.length)return this;let i=r?"addRanges":"removeRanges",a=t.reduce((t,r)=>{let a=this.getBy(r);return a&&t.push(a[i](e,n)),t},[]),s=this.copy();return a.forEach(t=>{s.comments[t.id]=t}),s}mapCommentTrackingStep(t){return this.mapCommentRanges(t.ids,t.collectTrackingRanges(this.doc),t.sticky,"addCommentTracking"===t.jsonID)}mapStep(t){switch(t.jsonID){case"addCommentTracking":case"removeCommentTracking":return this.mapCommentTrackingStep(t);default:return this}}mapChange(t,e,n){return this.updateDoc(t).mapStep(e).mapPos(n||ob.empty)}mapTransform(t){let e=this;return t.forEach((n,r,i,a)=>{e=e.mapChange(t.docs[a+1]||t.doc,n,r)}),e}idsToComments(t){let e=[];return t.forEach(t=>{let n=this.getBy(t);n&&e.push(n)}),e}static createComment(t){return h6.fromJSON(t)}static createComments(t){return super.createComments(t)}static init(t){return t.init()}static fromJSON(t,e){return this.init(new this(this.createComments(t||[]),e))}static fromCommentStore(t,e){return this.fromJSON(t.toJSON(),e)}static from(t,e){return!e||Array.isArray(e)?this.fromJSON(e,t):e instanceof this&&e.doc===t?e:this.fromCommentStore(e,t)}}class ut extends hm{constructor(t,e,n){super(t,e,n),this._lastActiveStepIndex=-1,this.duringStep=!1,this.tracking=!1}get lastActiveStepIndex(){return this._lastActiveStepIndex}get lastActiveStep(){return this.steps[this.lastActiveStepIndex]}get lastActivePosMap(){return this.posMaps[this.lastActiveStepIndex]}get lastActiveCustomMap(){return this.customMaps[this.lastActiveStepIndex]||void 0}saveActiveStepIndex(){this._lastActiveStepIndex=this.length-1}clearActiveStepIndex(){this._lastActiveStepIndex=-1}isTracking(){return this.tracking}setTracking(t){this.tracking=!!t}isDuringStep(){return this.duringStep}setDuringStep(t){this.duringStep=t}execIfTracking(t){this.isTracking()&&(this.setTracking(!1),t(),this.setTracking(!0))}maybeStep(t,e){let n,r=!this.isDuringStep();r&&this.setDuringStep(!0);let i=t.prepare();t=i.step,this.execIfTracking(()=>{n=this.handleStepPreparation(i,e),this.removeDeletedCommentTracking(t.posMap(this.doc))});let a=this.addStep(t);return a.succ&&(r&&!e?.passive&&this.saveActiveStepIndex(),this.execIfTracking(()=>{this.addInsertedCommentTracking(this.lastPosMap),n?.insertionTrackings&&this.applyTrackingItems(n.insertionTrackings)})),r&&this.setDuringStep(!1),a}saveStepResult(t,e){let n=!(e.commentStore instanceof h9);n&&(e.commentStore=this.commentStore.constructor.from(e.doc,e.commentStore)),super.saveStepResult(t,e),n||(this.commentStore=e.commentStore=this.commentStore.mapChange(this.doc,t,this.lastPosMap))}cherryPick(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.isTracking();r&&this.setTracking(!1);let i=super.cherryPick(...e);return r&&this.setTracking(!0),i}removeDeletedCommentTracking(t){let e=hX(t);if(!e.length)return;let n=this.commentStore.getCommentsInsideRanges(e).map(t=>({id:t.id,ranges:hK(t.ranges,e)}));this.mergeRemoveCommentTracking(n)}addInsertedCommentTracking(t){let e=hQ(t);if(!e.length)return;let n=[];h$(e,(t,e)=>{n.push({ids:this.commentStore.getCommentsAcross(t,e).map(t=>{let{id:e}=t;return e}),range:[t,e]})});for(let t=n.length-1;t>=0;--t){let{ids:e,range:r}=n[t];this.addCommentTracking(e,r)}}handleStepPreparation(t,e){return{insertionTrackings:this.collectTrackingItems(t,e)}}collectTrackingItems(t,e){if(e?.ignoreInsertionTrackings)return[];let n=t.replacements;if(!n?.length)return[];let r=h9.buildTrackingRangesMap(n.map(t=>{let{pos:e,insertionSlice:n}=t,r=rr.from(n);return{fragment:r.content,from:r.openLeft,to:r.openLeft+r.size,start:e-r.openLeft}})),i=[];for(let[t,{ranges:e,sticky:n}]of r)i.push({id:t,ranges:e,sticky:n});return i}applyTrackingItems(t){for(let{id:e,ranges:n}of t.filter(t=>{let{id:e}=t,n=this.commentStore.getBy(e);return n&&!n.hasRanges()}))this.addCommentTracking(e,n);return this}createCommentWithRange(t,e,n,r){let i;if(!e.length)throw new oU(`Empty ranges when creating comment from ${t}.`);if(e=function(t,e){void 0===e&&(e=!1);let n=t.length;if(n%2!=0)throw Error(`Odd tracking ranges: ${t}`);for(let e=0;e<n;e+=2)if(t[e]>=t[e+1])throw Error(`Invalid tracking ranges: ${t}`);if(hU(t)&&hU(t=function(t){let e=[];for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e.sort((t,e)=>t[0]-e[0]).flat()}(t)))throw Error(`Invalid tracking ranges with overlaps: ${t}`);return t}(e),n)for(let{from:t,to:n}of hZ(e)){if(n!==t+1)throw new oU(`Invalid self tracking ranges: ${e}`);let r=this.doc.resolve(t).self;if(!r||!r.is("Trackable"))throw new oU((r?`Invalid node \`${r.type.name}\``:"Empty node")+` at position ${t}`)}return t.id?i=t.id:(i=J(),t={...t,id:i}),this.createComment(t,r),this.commentStore.getBy(i,!0),this.doAddCommentTracking([i],e,n,r)}removeComment(t,e){return this.clearCommentTracking(t,e),super.removeComment(t,e)}resolveDiscussionsWith(t,e){let n=[];for(let r of(this.commentStore.forEach((e,r)=>{e.isDiscussion()&&e.isOpened()&&(!t||t(e))&&n.push(r)}),n))this.resolveComment(r,e);return this}resolveAllDiscussions(t){return this.resolveDiscussionsWith(void 0,t)}doAddCommentTracking(t,e,n,r){return(void 0===n&&(n=!1),t.length&&e.length)?this.step(h4.create(this.getUserId(),t,e,n),r):this}doRemoveCommentTracking(t,e,n,r){return(void 0===n&&(n=!1),t.length&&e.length)?this.step(h8.create(this.getUserId(),t,e,n),r):this}clearCommentTracking(t,e){return"string"==typeof t&&(t=[t]),t.forEach(t=>{let n=this.commentStore.getBy(t,!0);this.doRemoveCommentTracking([n.id],n.ranges,n.sticky,e)}),this}handleCommentTracking(t,e,n,r){"string"==typeof t&&(t=[t]);let i=[],a=[];t.forEach(t=>{this.commentStore.getBy(t,!0).sticky?i.push(t):a.push(t)});let s=n?"doAddCommentTracking":"doRemoveCommentTracking";return this[s](i,e,!0,r),this[s](a,e,!1,r),this}addCommentTracking(t,e,n){return this.handleCommentTracking(t,e,!0,n)}removeCommentTracking(t,e,n){return this.handleCommentTracking(t,e,!1,n)}mergeRemoveCommentTracking(t,e){if(t.length>=2&&t.every(e=>{let{ranges:n}=e;return hJ(n,t[0].ranges)}))this.removeCommentTracking(t.map(t=>{let{id:e}=t;return e}),t[0].ranges,e);else for(let n=t.length-1;n>=0;--n){let{id:r,ranges:i}=t[n];this.removeCommentTracking([r],i,e)}return this}}class ue extends au{transformSpec(t){return{...t=super.transformSpec(t),nodes:F(t.nodes,t=>{let e=t.type;return!e.is("Trackable")&&!e.is("Text")&&e.is("EditableType")&&(t={...t,type:hA(t.type,!t.content)}),!e.is("TrackableInline")&&e.is("Inline")&&(t={...t,type:hS(t.type)}),t}),marks:[...t.marks,["tracking",hC]]}}}class un extends oi{exec(t,e){if(this.checkSkipTracking(t))return super.exec(t,e);let n={...e,passive:!0},r=this.convertAndDeleteSelfInsertion(t.posMap(this.tr.doc),t,n);if(!r)return!0;if(this.trackDeletionRanges(r.posMap(this.tr.doc),r,n),r=this.convertInsertionStep(r)){this.step(r,{...e,passive:!1});let t=this.tr.lastActivePosMap;t&&this.trackInsertionRanges(t,r,n)}else this.tr.clearActiveStepIndex();return!0}convertAndDeleteSelfInsertion(t,e,n){let r=this.tr.length,i=this.deleteSelfInsertion(t,e,n);return void 0===i?this.tr.length===r?e:e.map(this.tr.toRemapping(r)):i}deleteSelfInsertion(t,e,n){let r=hX(t);if(!r.length)return;let i=this.commentStore.getCommentsBetweenRanges(r).reduce((t,e)=>(e.isSelfInsertion(this.uid)&&t.push({id:e.id,ranges:hK(e.ranges,r)}),t),[]);i.length&&(this.tr.mergeRemoveCommentTracking(i,n),this.tr.deleteTrackingContentInsideRanges(i.reduce((t,e)=>h0(t,e.ranges),v),n))}checkSkipTracking(t){return!!t.is("replace")&&!!this.doc.resolve(t.from).parent.type.isInvisible}trackDeletionRanges(t,e,n){let r=hX(t);if(!r.length||this.tr.commentStore.getFittingRanges(r).some(t=>t.isSelfDeletion(this.uid)))return;let i=this.matchSelfDeletion(r,n?.matchSuggestionBias);i?this.tr.addCommentTracking(i.id,r,n):this.tr.createCommentWithRange(this.createSuggestionJson(e,"deletion"),r,!1,n)}trackInsertionRanges(t,e,n){let r=hQ(t);if(!r.length)return;let i=this.matchSelfInsertion(r,n?.matchSuggestionBias);i?this.tr.addCommentTracking(i.id,r,n):this.tr.createCommentWithRange(this.createSuggestionJson(e,"insertion"),r,!1,n)}convertInsertionStep(t){return t}handleSuggestion(t,e,n){return void 0===n&&(n=m),!!super.handleSuggestion(t,e,n)&&(e!==t.isInsertion()?(this.tr.clearCommentTracking(t.id,n),this.deleteSuggestionContent(t,n)):n.keepResolvedTracking||this.tr.clearCommentTracking(t.id,n),!0)}deleteSuggestionContent(t,e){this.tr.deleteTrackingContentInsideRanges(t.ranges,e)}createSuggestionJson(t,e){return{type:1,text:this.createSuggestionText(t,e)}}createSuggestionText(t,e){return JSON.stringify({step:oH.normalizeStepId(t.jsonID),op:e})}matchSelfDeletion(t,e){return void 0===e&&(e=-1),this.matchSelfSuggestion(t,e,!1)}matchSelfInsertion(t,e){return void 0===e&&(e=-1),this.matchSelfSuggestion(t,e,!0)}matchSelfSuggestion(t,e,n){return null}}class ur extends un{convertInsertionStep(t){return this.commentStore.getCommentsFitting(t.from,t.to).some(t=>t.isSelfInsertion(this.uid))?t:this.tr.getReplaceStep(t.to,t.to,t.slice)}matchSelfSuggestion(t,e,n){return t.length?this.doMatchSelfSuggestion(t[0],t[1],e,n):null}doMatchSelfSuggestion(t,e,n,r){let i=this.commentStore,a=r?"isSelfInsertion":"isSelfDeletion",s=t=>(t=t.filter(t=>!t.sticky&&t[a](this.uid))).length?t[0]:null;return s(i.getAt(n<0?t:e,n))||s(i.getAt(n<0?e:t,-n))||s(i.getBetween(t,e))}}function ui(t){return t<=0?0:t<=1?1:Math.round(t)}function ua(t){return isNaN(t=ng(t,"px"))?null:ui(t)}function us(t){return ua(t.style.width||t.getAttribute("width"))}function uo(t){return ua(t.style.height||t.getAttribute("height"))}let ul={indexToPos(t,e,n){let r,i=t.self,a=t.pos;a+=1;for(let t=0;t<e;t++)a+=(r=i.child(t)).nodeSize;if(void 0===n)return a;a+=1,r=i.child(e);for(let t=0;t<n;t++)a+=r.child(t).nodeSize;return a},$posToTableIndex(t){let e=t.findDepth("Table"),n=t.findDepth("TableRow");return{rowIndex:t.index(e),cellIndex:t.index(n)}}};class uh{insertColumnRight(){throw Error("Please extend this class")}insertColumnLeft(){throw Error("Please extend this class")}removeColumn(){throw Error("Please extend this class")}}class uu{constructor(){this.data=[]}_ensureRowData(t){return this.data[t]||(this.data[t]=[])}_getRowData(t){return this.data[t]}getRowCount(){return this.data.length}getCellCount(t){let e=this._getRowData(t);return e?e.length-1:0}getCell(t,e){let n=this._getRowData(t);return n?n[e+1]:void 0}setCell(t,e,n){return this._ensureRowData(t)[e+1]=n}getRow(t){return this.getCell(t,-1)}setRow(t,e){return this.setCell(t,-1,e)}forEachCell(t,e){let n=this.data;for(let r=0,i=n.length;r<i;++r){let i=n[r];for(let n=0,a=i.length-1;n<a;++n)if(t.call(e,i[n+1],r,n))return}}forEachRow(t,e){let n=this.data;for(let r=0,i=n.length;r<i;++r)if(t.call(e,n[r][0],r))return}}let uc={width:1,style:"solid",color:"#000000"},ud=["left","top","right","bottom"].reduce(function(t,e){return t[e]=uc,t},Object.create(null));function up(t,e,n,r,i,a,s,o){t.setCell(e,n,{row_index:e,col_index:n,node:r,dirty:!1,display:!i,hidden:i,view_rowspan:a,view_colspan:s,covered_idx:o,border:i?ud:Object.create(null)})}function ug(t,e){let n="border"+iI(e);return{width:t.getAttrValue(n+"Width"),style:t.getAttrValue(n+"Style"),color:t.getAttrValue(n+"Color")}}function uf(t,e){return t.getAttrValue(`border${iI(e)}Width`)}function uy(t,e,n){return t.border[e]=n||ug(t.node,e)}function ux(t,e,n){let r=n?"left":"top";return e.border[r]||uy(e,r)}function um(t,e,n){let r,i,a=n?"right":"bottom",s=(i=n?t.getCell(e.row_index,e.col_index+e.view_colspan):t.getCell(e.row_index+e.view_rowspan,e.col_index))&&!i.hidden?i:void 0;if(s){let i=n?"left":"top";r=uf(s.node,i)>uf(e.node,a)?ux(t,s,n):uy(s,i,ug(e.node,a))}return uy(e,a,r)}function uv(t){var e,n;return e=t,n=a||(a={top:"top",middle:"middle",bottom:"bottom"}),e?n[e]||"top":null}class ub extends rJ{get Node(){return uw}registerSelfLocalAttrsUpdateMap(t){t.register(t.UPDATE_START,this.name,"init_table_info",null,(t,e)=>{e.setTableNode(t)}),t.register(t.UPDATE_START,this.name,"init_table_row_index",null,(t,e)=>{e.setTableRowIndex(-1)}),t.register(t.BEFORE_CHILD,this.name,"increase_table_row_index",null,(t,e,n)=>{n.setTableRowIndex(n.getTableRowIndex()+1)}),t.register(t.UPDATE_END,this.name,"clear_table_row_index",null,(t,e)=>{e.setTableRowIndex()}),t.register(t.UPDATE_START,this.name,"scan_table",null,(t,e)=>{let n=t.getStateRank();if(n===rg.STATE_NONE)return;let r=!1;if(n>=rg.STATE_UPDATE)r=0;else if(t.forEach(function(t,e,n){return t.getStateRank()>=rg.STATE_UPDATE||t.state.row_index!==n||t.state.cell_count!==t.childCount?(r=n,!0):t.forEach(function(t,e,i){if(t.getStateRank()>=rg.STATE_UPDATE||t.state.row_index!==n||t.state.col_index!==i)return r=n,!0},this,!0)},this,!0),!1===r){if(t.state.row_count===t.childCount)return;r=t.childCount}t.state.row_count=t.childCount,t.forEach(function(t){t.setMinStateRank(rg.STATE_PASSING)}),e.setTableUpdateInfoMap(function(t,e){let n=function(t){let e=new uu,n=t.childCount,r=t.content.content.map(t=>t.childCount);return t.forEach(function(t,n,r){e.setRow(r,{row_index:r,node:t,dirty:!1,border:{left:0,top:0,right:0,bottom:0}})}),t.forEachCell(null,null,null,null,function(i,a,s,o){if(e.getCell(s,o))return;let l=Math.min(i.getAttrValue("rowspan"),n-s),h=Math.min(i.getAttrValue("colspan"),r[s]-o);if(1!==l||1!==h){for(let t=1;t<h;++t)if(e.getCell(s,o+t)){h=t;break}let n=o+h;for(let t=1;t<l;++t)if(n>r[s+t]){l=t;break}let i={row_index:s,col_index:o};for(let n=0;n<l;++n){let r=s+n;for(let a=0;a<h;++a){if(0===a&&0===n)continue;let s=o+a;up(e,r,s,t.getCellNode(r,s),!0,1,1,i)}}}up(e,s,o,i,!1,l,h,null)}),e}(t);var r=e;if(t.forEachCell(r,null,null,null,function(t,e,r,i){n.getCell(r,i).dirty=!0}),r>0&&r<=n.getRowCount()){let e=--r;t.child(e).forEach(function(t,i,a){let s=n.getCell(e,a);if(s.hidden){let t=s.covered_idx;if(t.col_index!==a)return;s=n.getCell(t.row_index,t.col_index),r=Math.min(r,s.row_index)}s.dirty=!0})}for(let t=r,e=n.getRowCount();t<e;++t)n.getRow(t).dirty=!0;n.forEachCell(function(t){t.hidden||(ux(n,t,!0),ux(n,t,!1),um(n,t,!0),um(n,t,!1))}),n.forEachRow(function(t){!function(t,e){let n=e.row_index,r=e.border;for(let e=0,i=t.getCellCount(n);e<i;++e){let i=t.getCell(n,e);if(i.hidden){let n=i.covered_idx;if(n.col_index!==e)continue;i=t.getCell(n.row_index,n.col_index)}let a=i.border;0===e&&(r.left=a.left.width),r.right=a.right.width,r.top=Math.max(r.top,a.top.width),r.bottom=Math.max(r.bottom,a.bottom.width)}}(n,t)});let i=0,a=[];return(t.getAttrValue("colgroup")||v).forEach(t=>{let{width:e}=t;a.push({left:i,width:e}),i+=e}),n.forEachCell(t=>{let e=t.col_index,n=e+t.view_colspan,r=0;for(let t=e;t<n;++t)r+=a[t]?.width||0;t.width=r,t.left=e<a.length?a[e].left:i}),n}(t,r))}),t.register(t.UPDATE_END,this.name,"clear_table_info",null,(t,e)=>{e.setTableUpdateInfoMap(),e.setTableRowIndex(),e.setTableNode()}),t.register(t.SELF_START,this.name,"set_col_info",null,(t,e)=>{let n=0,r=[],i=[],a=0;for(let e=0;e<t.attrs.colgroup.length;++e){let s=t.attrs.colgroup[e].width;r.push(s),i.push(a),a+=s,n+=s}t.state.width=n,t.state.col_width_arr=r,t.state.col_left_arr=i}),t.reorder(t.SELF_START,this.name,"set_text_rect_info")}matchColgroup(t){let e=null,n=null;if(Array.prototype.forEach.call(t.children,t=>{switch(t.nodeName){case"COLGROUP":e=t;break;case"TBODY":n=t}}),null!==e&&e.children.length>0){let t=[];return[...e.children].forEach(e=>{let n=e.span??1,r=us(e);for(r=null==r?NaN:r||1;n>0;)t.push({width:r}),--n}),t}return null===n?[]:Array.prototype.reduce.call(n.firstElementChild.children,(t,e)=>{let n=e.colSpan,r=us(e);for(null!=r&&(r=Math.floor(r/n)||1);n>0;)t.push({width:r}),--n;return t},[])}get matchDOMTag(){return{table:(t,e)=>Object.assign(this.parseAttrs(t,e),{synotable:t.getAttribute("synotable")||t.getAttribute("data-syno-table")||Y(t.ownerDocument,"synotable"),colgroup:this.matchColgroup(t),parsed_width:us(t),parsed_height:uo(t)})}}createFromDOM(t,e,n,r){let i=r&&r.editor_width||NaN,a=this.fixTableCreation(e,t,i);return e=a.content,t=a.attrs,super.createFromDOM(t,e,n,r)}maybeCreateFilled(t,e,n){let r=this.fixTableCreation(e,t);return e=r.content,t=r.attrs,super.maybeCreateFilled(t,e,n)}_getIndexStore(t){let e=new iQ;for(let n=0;n<t.childCount;++n){let r=t.child(n);if(!(r.getAttrValue("parsed_empty")&&e.getAt(n,0)))for(let t=0;t<r.childCount;++t){let i=r.child(t),a=n,s=t;for(;e.getAt(a,s);)s++;e.setAt(a,s,i);let o=i.attrs.colspan||1,l=i.attrs.rowspan||1;for(let t=0;t<l;++t)for(let n=0;n<o;++n){if(0===t&&0===n)continue;let r=a+t,l=s+n;if(e.getAt(r,l))o=n;else{let t=K({colspan:1,rowspan:1},K(i.attrs));e.setAt(r,l,this.schema.nodes.table_cell.createAndFill(t))}}}}return e}_fixValueArr(t,e,n,r){let i=0,a=[];for(let e=0;e<t.length;++e){let n=t[e];isNaN(n)||null==n?a.push(e):i+=n}if(a.length){let s;for(let o of(s=!isNaN(e)&&e>i?Math.floor((e-i)/a.length):!isNaN(n)&&n>i?Math.floor((n-i)/a.length):r,a))t[o]=s,i+=s}else if(!isNaN(e)&&e>i){let n=e/i;for(let e=0;e<t.length;++e)t[e]=Math.floor(t[e]*n)}if((isNaN(e)||null==e)&&(e=i),!isNaN(n)&&e>n){let r=n/e;for(let e=0;e<t.length;++e)t[e]=Math.floor(t[e]*r)}return t}_getFixedRowHeightArr(t,e){let n=Array(t.childCount);for(let e=0;e<t.childCount;++e)n[e]=t.child(e).attrs.height;return this._fixValueArr(n,e,void 0,22)}_getFixedAttrs(t,e,n){let r={...t},i=t.colgroup||[],a=[];for(let t=0;t<e;++t){let e=i[t]?i[t].width:NaN;a.push(e)}let s=t.parsed_width;this._fixValueArr(a,s,n,24);let o=[];for(let t=0;t<e;++t)o.push({width:a[t]});return r.colgroup=o,delete r.parsed_width,delete r.parsed_height,r}fixTableCreation(t,e,n){t||(t=rn.empty),e||(e={});let r=this._getIndexStore(t),i=r.getRectColSize(),a=this._getFixedRowHeightArr(t,e&&e.parsed_height),s=this._getFixedAttrs(e,i,n),o=[];for(let e=0;e<t.childCount;++e){let n=t.child(e),s=[];for(let t=0;t<i;++t){let n=r.getAt(e,t);n||(n=this.schema.nodes.table_cell.createAndFill()),s.push(n)}let l=n.copy(rn.from(s),{parsed_empty:null});isNaN(a[e])||(l.attrs.height=a[e]),o.push(l)}return{content:rn.from(o),attrs:s}}findGridCell(t,e,n){if(t.type!==this)return null;let r=t.attrs.grid;for(let t=0;t<r.length;++t){let i=r[t];for(let r=0;r<i.length;++r){let a=i[r];if(a.x===e&&a.y===n)return[t,r]}}return null}expandRegion(t,e,n,r,i){if(t.type!==this)return null;let a=t.attrs.grid;a[n][e].real||(e-=a[n][e].dx,n-=a[n][e].dy);let s=[e,n,r,i];for(let t=n;t<=i;++t){let e=r+a[t][r].colspan-a[t][r].dx-1;e>s[2]&&(s[2]=e)}for(let t=e;t<=r;++t){let e=i+a[i][t].rowspan-a[i][t].dy-1;e>s[3]&&(s[3]=e)}return[[s[1],s[0]],[s[3],s[2]]]}}class uw extends rV{getRowCount(){return this.childCount}getColCount(){return this.attrs&&this.attrs.colgroup&&this.attrs.colgroup.length||0}getRowSize(){return this.getRowCount()}getColSize(){return this.getColCount()}getColWidth(t){let e=this.attrs.colgroup[t];return e?e.width:NaN}getCellIndex(t,e){return this.getCellNode(t,e)&&{row:t,col:e}}getCellNode(t,e){let n=this.maybeChild(t);return n&&n.maybeChild(e)}getCellOffset(t,e){let n=this.maybeChild(t);return!n||e>=n.childCount?NaN:this.offsetAt(t)+1+n.offsetAt(e)}getCellData(t,e){let n=this.getCellNode(t,e);return n?{node:n,offset:this.getCellOffset(t,e),row:t,col:e}:null}getDisplayCellIndex(t,e){let n=this.getCellNode(t,e);return n?(n.state.display||(t=n.state.covered_idx.row_index,e=n.state.covered_idx.col_index,n=this.getCellNode(t,e)),{row:t,col:e,row_span:n.state.view_rowspan,col_span:n.state.view_colspan}):null}getDisplayCellNode(t,e){let n=this.getDisplayCellIndex(t,e);return n&&this.getCellNode(n.row,n.col)}getDisplayCellOffset(t,e){let n=this.getDisplayCellIndex(t,e);return n?this.getCellOffset(n.row,n.col):NaN}getDisplayCellData(t,e){let n=this.getDisplayCellIndex(t,e);return n&&Object.assign(this.getCellData(n.row,n.col),n)}getSiblingDisplayCellIndex(t,e,n,r){var i,a;let s=this.getDisplayCellIndex(t,e);return s&&this.getDisplayCellIndex(s.row+(i=s.row_span,n>0?i:n<0?-1:0),s.col+(a=s.col_span,r>0?a:r<0?-1:0))}getSiblingDisplayCellNode(t,e,n,r){let i=this.getSiblingDisplayCellIndex(t,e,n,r);return i&&this.getCellNode(i.row,i.col)}getSiblingDisplayCellOffset(t,e,n,r){let i=this.getSiblingDisplayCellIndex(t,e,n,r);return i?this.getCellOffset(i.row,i.col):NaN}getSiblingDisplayCellData(t,e,n,r){let i=this.getSiblingDisplayCellIndex(t,e,n,r);return i&&Object.assign(this.getCellData(i.row,i.col),i)}getNextDisplayCellIndex(t,e,n){let r,i,a,s=this.getDisplayCellIndex(t,e);if(!s)return null;for(n=L(n),t=s.row,e=s.col+n;r=this.maybeChild(t);){for(null==e&&(e=n<0?r.childCount-1:0);i=r.maybeChild(e);){if(i.state.display){a=!0;break}e+=n}if(a)break;e=null,t+=n}return this.getDisplayCellIndex(t,e)}getNextDisplayCellNode(t,e,n,r){let i=this.getNextDisplayCellIndex(t,e,n,r);return i&&this.getCellNode(i.row,i.col)}getNextDisplayCellOffset(t,e,n,r){let i=this.getNextDisplayCellIndex(t,e,n,r);return i?this.getCellOffset(i.row,i.col):NaN}getNextDisplayCellData(t,e,n,r){let i=this.getNextDisplayCellIndex(t,e,n,r);return i&&Object.assign(this.getCellData(i.row,i.col),i)}getEnsuredCellIndex(t,e){return t=tj(t,0,this.childCount-1),e=tj(e,0,this.child(t).childCount-1),{row:t,col:e}}getEnsuredCellNode(t,e){let n=this.getEnsuredCellIndex(t,e);return this.getCellNode(n.row,n.col)}getEnsuredCellOffset(t,e){let n=this.getEnsuredCellIndex(t,e);return this.getCellOffset(n.row,n.col)}getEnsuredCellData(t,e){let n=this.getEnsuredCellIndex(t,e);return this.getCellData(n.row,n.col)}forEachCell(t,e,n,r,i,a,s){return this.forRange(t,e,function(t,e,o){return t.forRange(n,r,function(t,n,r){return i.call(a,t,e+1+n,o,r)},this,s)},this,s)}forEachDisplayCell(t,e,n,r,i,a,s){let o=new iQ;return this.forEachCell(t,e,n,r,function(t,e,n,r){let i=this.getDisplayCellIndex(n,r);o.getAt(i.row,i.col)||o.setAt(i.row,i.col,!0)},this),o.forEachCell(this,function(t,e,n,r){return i.call(a,t,e,n,r)},this,s)}forEachOperateCell(t,e,n,r,i,a,s){let o=new iQ;return this.forEachCell(t,e,n,r,function(t,e,n,r){let i=this.getDisplayCellIndex(n,r);o.getAt(i.row,i.col)||o.setRange(i.row,i.row+i.row_span-1,i.col,i.col+i.col_span-1,!0)},this),o.forEachCell(this,function(t,e,n,r){return i.call(a,t,e,n,r)},this,s)}getRawIdxStoreByRect(t){let e=new iQ;for(let n=t.top;n<=t.bottom;++n)for(let r=t.left;r<=t.right;++r)this.getCellNode(n,r)&&e.setAt(n,r,!0);return e}getDisplayIdxStoreByRect(t){let e=new iQ;for(let n=t.top;n<=t.bottom;++n)for(let r=t.left;r<=t.right;++r){let t=this.getCellNode(n,r);t&&(t.state.display?e.setAt(n,r,!0):this.getCellNode(t.state.covered_idx.row_index,t.state.covered_idx.col_index)&&e.setAt(t.state.covered_idx.row_index,t.state.covered_idx.col_index,!0))}return e}getOpIdxStoreByRect(t){let e=new iQ;for(let n=t.top;n<=t.bottom;++n)for(let r=t.left;r<=t.right;++r){let t=this.getCellNode(n,r);if(!t)continue;if(e.setAt(n,r,!0),t.state.display){for(let n=0;n<t.state.view_rowspan;++n)for(let r=0;r<t.state.view_colspan;++r){let i=n+t.state.row_index,a=r+t.state.col_index;this.getCellNode(i,a)&&e.setAt(i,a,!0)}continue}let i=this.getCellNode(t.state.covered_idx.row_index,t.state.covered_idx.col_index);if(i)for(let t=0;t<i.state.view_rowspan;++t)for(let n=0;n<i.state.view_colspan;++n){let r=t+i.state.row_index,a=n+i.state.col_index;this.getCellNode(r,a)&&e.setAt(r,a,!0)}}return e}getCellsCount(){let t=0;for(let e=0;e<this.childCount;++e)t+=this.child(e).childCount;return t}}class uM extends ub{get isTable(){return!0}get unbreakable(){return!0}get selectionExtendable(){return!0}get attrs(){return{synotable:nH.create({default:J,copyable:!1}),colgroup:nH.create({default:[]}),parsed_width:nH.createOptional({normalizer:"number"}),parsed_height:nH.createOptional({normalizer:"number"})}}getTextRectInfo(t,e){return{left:super.getTextRectInfo(t,e).left,width:t.state.width||0}}getTableDOM(t){return t.firstChild}getTableBodyDOM(t){return this.getTableDOM(t).childNodes[1]}getIndicatorWrapperDOM(t){return this.getTableDOM(t)}renderBlockStructure(t,e){let n=e.target;return["table",this.renderAttrs({synotable:t.getAttrValue("synotable"),inline_style:{borderCollapse:"collapse",tableLayout:"fixed",width:"clipboard"===n?null:t.state.width+"px"}},t,e),(t.getAttrValue("colgroup")||v).reduce((t,e)=>(t.push(["col",{inline_style:{width:`${e.width}px`}}]),t),["colgroup",null]),["tbody",null,0],"editor"===n||"viewer"===n||"general"===n?["div"]:null]}}class u_ extends oW{static checkNode(t){return!!t.is("Table")}}class uA extends u_{constructor(t,e){super(t),this.cells=e}collectCellActions(t){let e=t.pos+1,n=e+t.self.getContentSize(),r=[];return this.cells.forEach(i=>{let{pos:a}=i;if(!(a>=e&&a<=n))return;let s=t.extend(a-e);if(!s.parent.is("TableRow"))return;let o=this.collectCellAction(s,i);o&&r.push(o)}),r.length?r.sort((t,e)=>t.pos-e.pos):r}applyAtPos(t,e){let{doc:n,self:r}=t,i=r,a=t.pos,s=a+i.nodeSize,o=this.collectCellActions(t);if(o.length)for(let t=o.length-1;t>=0;--t)i=this.applyCellAction(o[t],i,a);return i===r?n:n.replace(a,s,rr.from(i))}map(t){let e=this.mapPos(t);if(null==e)return null;let n=[];return(this.cells.forEach(e=>{let r=this.mapCellInfo(e,t);r&&n.push(r)}),n.length)?this.constructor.create(e,n):null}static create(t,e){if(!e.length)throw RangeError("Given cells are empty.");return super.create(t,e)}static assertCellInfo(t,e,n){let{pos:r}=n;if(!(r>e&&r<e+t.nodeSize))throw new oU(`Given cell pos ${r} is out of range (${e}, ${e+t.nodeSize}).`);if(!t.resolve(r-e-1).parent.is("TableRow"))throw new oU(`Given cell pos ${r} is not at table cell boundary.`)}}function uS(t,e,n){if(!Array.isArray(t)){let r=typeof t;if("object"===r){let{from:r,to:i}=t;null==r&&(r=0),null==i&&(i=n?e.getRowSize():e.getColSize()),t=Array.from({length:i-r},(t,e)=>r+e)}else if("number"===r)t=[t];else throw RangeError(`Given reference range ${t} is invalid.`)}if(!t.length)throw RangeError("Given reference range is empty.");return t}function uC(t,e,n){if(!e)return t.nodeType("table_cell").createAndFill(n);{let r=e.maybeChild(0),i=null;if(r&&r.type.isParagraph){let e=t.nodeType("paragraph");i=e.createAndFill(e.settableAttrValues(r.attrs))}let a=t.nodeType("table_cell");return a.createAndFill({...a.settableAttrValues(e.attrs),...n},i)}}function uI(t){return t.map(t=>t?t.reduce((t,e)=>(t[e.index]=e.node,t),Object.create(null)):Object.create(null))}function uP(t,e){return e.map(e=>e?e.map(e=>Object.assign(Object.create(null),e,{node:t.nodeFromJSON(e.node)})):[])}function uT(t,e){if(t.length<e){t=t.slice();for(let n=t.length;n<e;++n)t.push(null)}return t}class uk extends u_{constructor(t,e){super(t),this.index=e}static get replaceDir(){return""}static get replaceType(){return""}getReplaceIndex(t){return this.index}getReplaceCount(t){return 0}collectTableAttrs(t,e){return null}collectMergedCellsAttrs(t,e){let n,r,i,a,s=this.getReplaceIndex(e);if(0===s)return null;let o=this.getReplaceCount(e);if(0===o)return null;let l="insert"===this.constructor.replaceType,h=this.constructor.replaceDir,u=h+"span";"row"===h?(n=0,r=s-1):(i=0,a=s-1);let c=[];return e.forEachCell(n,r,i,a,(t,e,n,r)=>{let i=t.getAttrValue(u);if(1===i)return;let a=("row"===h?n:r)+i-1;s>a||c.push({pos:e,node:t,attrs:{[u]:i+(l?o:-Math.min(o,a-s+1))}})}),c}collectReplacingContent(t,e){return null}applyAtPos(t,e){let{doc:n,self:r}=t,i=r,a=t.pos,s=a+i.nodeSize,o=this.collectTableAttrs(n,i),l=this.collectMergedCellsAttrs(n,i),h=this.collectReplacingContent(n,i);if(o||l&&l.length||!h||1!==h.length){if(o&&(i=i.copy(i.content,o)),l&&l.forEach(t=>{let{pos:e,node:n,attrs:r}=t;i=i.replace(e,e+n.nodeSize,rr.from(n.copy(n.content,r)))}),h)for(let t=h.length-1;t>=0;--t){let{from:e,to:n,content:r}=h[t];i=i.replace(e,n,r)}return i===r?n:n.replace(a,s,rr.from(i))}{let t=a+1,{from:e,to:r,content:i}=h[0];return n.replace(t+e,t+r,i)}}posMap(t){let e=this.resolvePos(t);if(!e)return ob.empty;let n=this.collectReplacingContent(t,e.self);if(!n)return ob.empty;let r=[],i=e.pos+1;return n.forEach(t=>{let{from:e,to:n,content:a}=t;r.push(i+e,n-e,a?a.size:0)}),new ob(r)}}let uL=t=>class extends t{static get replaceType(){return"insert"}getReplaceCount(t){return this.cells.length}},uD=t=>class extends t{static get replaceType(){return"remove"}getReplaceCount(t){return this.count}};function uR(t,e,n){e=uS(e,t,!0);let r=[],i=[],a=t.type.schema;for(let s=0,o=e.length;s<o;++s){let o=t.maybeChild(e[s]);r.push(o.type.settableAttrValues(o&&o.attrs));let l=[];o&&o.forEach((t,e,r)=>{l.push({index:r,node:n?uC(a,t,{rowspan:1}):t.deepCopy({target:"replace"})})}),i.push(l)}return{row_attrs:r,cells:i}}class uN extends uk{static get replaceDir(){return"row"}}class uO extends uL(uN){constructor(t,e,n,r){super(t,e);let i=Math.max(n.length,r.length);this.row_attrs=uT(n,i),this.cells=uT(r,i)}getReplaceIndex(t){return Math.min(t.getRowSize(),this.index)}collectReplacingContent(t,e){if(0===this.getReplaceCount(e))return null;let n=uI(this.cells),r=this.getReplaceIndex(e),i=e.getColSize(),a=e.type.schema,s=a.nodeType("table_row"),o=a.nodeType("table_cell"),l=e.offsetAt(r),h=this.row_attrs.map((t,e)=>s.create(t,Array.from({length:i},(t,r)=>n[e][r]?.deepCopy({target:"replace"})||o.createAndFill())));return[{from:l,to:l,content:rr.from(h)}]}invertAtPos(t){return new uj(t.pos,this.getReplaceIndex(t.self),this.getReplaceCount(t.self))}map(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.index,this.row_attrs,this.cells)}toJSON(t){return Object.assign(super.toJSON(t),{cells:this.cells.map(e=>e.map(e=>({...e,node:e.node.toJSON(t)})))})}static fromJSON(t,e){return new this(e.pos,e.index,e.row_attrs,uP(t,e.cells))}}oH.jsonID("insertTableRowV2",uO);class uj extends uD(uN){constructor(t,e,n){super(t,e),this.count=n}collectReplacingContent(t,e){let n=this.getReplaceCount(e);if(0===n)return null;let r=e.getRowSize(),i=this.getReplaceIndex(e);if(i>=r)return null;let a=Math.min(i+n,r),s=e.offsetAt(i);return[{from:s,to:s+e.sizeBetween(i,a),content:rr.empty}]}invertAtPos(t){let e=t.self,n=this.getReplaceIndex(e),r=this.getReplaceCount(e),i=r?uR(e,{from:n,to:Math.min(n+r,e.getRowSize())},!1):null;return new uO(t.pos,n,i?i.row_attrs:[],i?i.cells:[])}map(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.index,this.count)}static fromJSON(t,e){return new this(e.pos,e.index,e.count)}}function uE(t){return t&&t.width?t:{width:24}}function uV(t,e){return e&&1!==e?t.map(t=>Object.assign(Object.create(null),t,{width:t.width*e})):t}function uB(t,e,n,r,i){let a=[];for(let n=0;n<e;++n)a.push(uE(t[n]));r&&r.forEach(t=>{a.push(uE(t))});for(let r=e+n,i=t.length;r<i;++r)a.push(uE(t[r]));return uV(a,i)}oH.jsonID("removeTableRowV2",uj),oH.jsonID("insertTableRow",class extends oH{static fromJSON(t,e){return new uO(e.table_pos,e.row_index,[e.row_attrs],uP([e.cell_info_arr]))}}),oH.jsonID("removeTableRow",class extends oH{static fromJSON(t,e){return new uj(e.table_pos,e.row_index,1)}}),Object.assign(oZ.prototype,{insertTableRow(t,e,n){let{row_attrs:r,cells:i}=uR(uN.resolvePos(this.doc,t,!0).self,n,!0);return this.step(new uO(t,e,r,i))},removeTableRow(t,e,n){return uN.resolvePos(this.doc,t,!0),this.step(new uj(t,e,n))}});class uz extends uk{constructor(t,e,n){super(t,e),this.ratio=n||1}static get replaceDir(){return"col"}collectTableAttrsColgroup(t,e){return null}collectTableAttrs(t,e){let n=this.collectTableAttrsColgroup(t,e);return n?{colgroup:n}:null}}class uF extends uL(uz){constructor(t,e,n,r,i){super(t,e,n);let a=Math.max(r.length,i.length);this.colgroup=uT(r,a),this.cells=uT(i,a)}getReplaceIndex(t){return Math.min(t.getColSize(),this.index)}collectTableAttrsColgroup(t,e){return uB(e.getAttrValue("colgroup"),this.getReplaceIndex(e),0,this.colgroup,this.ratio)}collectReplacingContent(t,e){if(0===this.getReplaceCount(e))return null;let n=[],r=uI(this.cells),i=this.getReplaceIndex(e);return e.forEach((e,a,s)=>{let o=a+1+e.offsetAt(Math.min(e.childCount,i));n.push({from:o,to:o,content:rr.from(r.map(e=>e[s]?.deepCopy({target:"replace"})||t.type.schema.nodeType("table_cell").createAndFill()))})}),n}invertAtPos(t){return new uG(t.pos,this.getReplaceIndex(t.self),1/this.ratio,this.getReplaceCount(t.self))}map(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.index,this.ratio,this.colgroup,this.cells)}toJSON(t){return Object.assign(super.toJSON(t),{cells:this.cells.map(e=>e.map(e=>({...e,node:e.node.toJSON(t)})))})}static fromJSON(t,e){return new this(e.pos,e.index,e.ratio,e.colgroup,uP(t,e.cells))}}oH.jsonID("insertTableColV2",uF);class uG extends uD(uz){constructor(t,e,n,r){super(t,e,n),this.count=r}collectTableAttrsColgroup(t,e){return uB(e.getAttrValue("colgroup"),this.getReplaceIndex(e),this.getReplaceCount(e),null,this.ratio)}collectReplacingContent(t,e){let n=this.getReplaceCount(e);if(0===n)return null;let r=[],i=this.getReplaceIndex(e),a=i+n;return e.forEach((t,e,n)=>{if(i>=t.childCount)return;let s=e+1+t.offsetAt(i);r.push({from:s,to:s+t.sizeBetween(i,Math.min(a,t.childCount)),content:rr.empty})}),r}invertAtPos(t){let e=t.self,n=this.getReplaceIndex(e),r=this.getReplaceCount(e),i=this.ratio,a=r?uV(e.getAttrValue("colgroup").slice(n,n+r),i):[],s=[];return r&&e.forEachCell(0,e.getRowSize()-1,n,n+r-1,(t,e,r,i)=>{let a=i-n;(s[a]||(s[a]=[])).push({index:r,node:t.deepCopy({target:"replace"})})}),new uF(t.pos,n,1/i,a,s)}map(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.index,this.ratio,this.count)}static fromJSON(t,e){return new this(e.pos,e.index,e.ratio,e.count)}}oH.jsonID("removeTableColV2",uG),oH.jsonID("insertTableCol",class extends oH{static fromJSON(t,e){return new uF(e.table_pos,e.col_index,e.table_width_ratio,[e.colgroup_info],uP([e.cell_info_arr]))}}),oH.jsonID("removeTableCol",class extends oH{static fromJSON(t,e){return new uG(e.table_pos,e.col_index,e.table_width_ratio,1)}}),Object.assign(oZ.prototype,{insertTableCol(t,e,n){let r,i=this.schema,a=uz.resolvePos(this.doc,t,!0).self,s=(n=uS(n,a,!1)).length,o=a.getAttrValue("colgroup"),l=[],h=[];for(let t=0;t<s;++t){let e=n[t];l.push(uE(e>=0?o[e]:null));let r=[];e>=0&&a.forEach((t,n,a)=>{let s=t.maybeChild(e);s&&r.push({index:a,node:uC(i,s,{colspan:1})})}),h.push(r)}let u=a.state.width+l.reduce((t,e)=>t+e.width,0);if(i.isDocument){let t=a.state.text_rect_info.width;r=u>t?t/u:1}else r=a.state.width/u;return this.step(new uF(t,e,r,l,h))},removeTableCol(t,e,n){return uz.resolvePos(this.doc,t,!0),this.step(new uG(t,e,1,n))}});class uH extends uA{collectCellAction(t,e){let{pos:n,attrs:r}=e,i=t.self;return i?{pos:n,node:i,attrs:r}:null}applyCellAction(t,e,n){let{pos:r,node:i,attrs:a}=t,s=r-n-1;return e.replace(s,s+i.nodeSize,rr.from(i.copyWithAttrs(i.type.settableAttrValues(a))))}invertAtPos(t){let e=this.collectCellActions(t);if(!e.length)return null;let n=e.map(t=>{let{pos:e,node:n,attrs:r}=t;return{pos:e,attrs:n.type.invertAttrs(n.attrs,r)}});return this.constructor.create(t.pos,n)}mapCellInfo(t,e){let n=e.mapNodeResult(t.pos,1);return n.deleted?null:{...t,pos:n.pos}}static fromJSON(t,e){return new this(e.pos,e.cells)}static create(t,e){return super.create(t,e)}static assertCellInfo(t,e,n){super.assertCellInfo(t,e,n);let{pos:r,attrs:i}=n;if(!t.nodeAt(r-e-1))throw new oU(`No node at given cell pos ${r}.`);if(!nH.checkAttrs(t.type.schema.nodeType("table_cell").attrs,i))throw new oU(`Invalid attrs for cell. ${JSON.stringify(i)}`)}}uH.register("setTableCellAttrs"),tY(oZ.prototype,{setTableCellAttrs(t,e){let n=uH.resolvePos(this.doc,t,!0).self;return e.slice().sort((t,e)=>t.pos-e.pos).forEach((r,i)=>{uH.assertCellInfo(n,t,r);let{pos:a}=r;if(i>0&&a===e[i-1].pos)throw new oU(`Repeatedly set table cell attrs at ${a}.`)}),this.step(uH.create(t,e))}});class uW extends uA{posMap(t){let e=this.resolvePos(t);if(!e)return ob.empty;let n=this.collectCellActions(e);if(!n.length)return ob.empty;let r=[];return n.forEach(t=>{this.addCellPosMapRange(t,r)}),ob.create(r)}toJSON(t){return{stepType:this.jsonID,pos:this.pos,cells:this.cells.map(e=>{let n={...e};return e.node&&(n.node=e.node.toJSON(t)),n})}}static create(t,e){return super.create(t,e)}static assertCellInfo(t,e,n){super.assertCellInfo(t,e,n);let{node:r}=n;if(r&&!r.is("TableCell"))throw new oU(`Given node ${r.type.name} is not table cell.`)}}class uq extends uW{applyCellAction(t,e,n){let{pos:r,oldCell:i,newCell:a}=t,s=r-n-1;return e.replace(s,s+(i?i.nodeSize:0),rr.from(a?.deepCopy({target:"replace"})))}invertAtPos(t){let e=this.collectCellActions(t);if(!e.length)return null;let n=0,r=e.map(t=>{let e,{pos:r,oldCell:i,newCell:a}=t,s=r+n;return e=i?{pos:s,node:i.deepCopy({target:"replace"})}:{pos:s},n+=(a?a.nodeSize:0)-(i?i.nodeSize:0),e});return("insert"===this.constructor.replaceType?uZ:uU).create(t.pos,r)}addCellPosMapRange(t,e){let{pos:n,oldCell:r,newCell:i}=t,a=r?r.nodeSize:0,s=i?i.nodeSize:0,o=e.length;o&&n===e[o-3]+e[o-2]?(e[o-2]+=a,e[o-1]+=s):e.push(n,a,s)}}class uU extends uq{static #t=this.replaceType="insert";collectCellAction(t,e){let{pos:n,node:r}=e;return{pos:n,oldCell:null,newCell:r}}mapCellInfo(t,e){let n=e.mapResult(t.pos,1);return n.deleted?null:{...t,pos:n.pos}}static fromJSON(t,e){return new this(e.pos,e.cells.map(e=>({...e,node:t.nodeFromJSON(e.node)})))}static create(t,e){return super.create(t,e)}}uU.register("insertTableCells");class uZ extends uq{static #t=this.replaceType="delete";collectCellAction(t,e){let{pos:n,node:r}=e,i=t.self;return i?{pos:n,oldCell:i,newCell:null}:null}collectCellActions(t){return super.collectCellActions(t).filter((t,e,n)=>{let{pos:r}=t;return 0===e||r!==n[e-1].pos})}mapCellInfo(t,e){let n=e.mapNodeResult(t.pos,1);return n.deleted?null:{...t,pos:n.pos}}static fromJSON(t,e){return new this(e.pos,e.cells)}static create(t,e){return super.create(t,e)}}uZ.register("deleteTableCells"),tY(oZ.prototype,{_insertDeleteTableCells(t,e,n,r){let i=n?uU:uZ,a=i.resolvePos(this.doc,t,!0).self;return e.forEach((r,s)=>{let{pos:o,node:l}=r;if(i.assertCellInfo(a,t,r),!n){if(s>0&&o===e[s-1].pos)throw new oU(`Repeatedly deleting table cell at ${o}.`);if(!a.nodeAt(o-t-1))throw new oU(`No node at given cell pos ${o}.`)}if(n?!l:l)throw new oU(`node is ${n?"":"not "}required when ${n?"inserting":"deleting"} table cells.`)}),this.step(i.create(t,e),r)},insertTableCells(t,e,n){return this._insertDeleteTableCells(t,e,!0,n)},deleteTableCells(t,e,n){return this._insertDeleteTableCells(t,e,!1,n)}});class u$ extends uW{collectCellAction(t,e){let{pos:n,node:r,range:i}=e,a=t.self;if(!a)return null;let s=i||[n+1,n+1+a.getContentSize()],o=oJ(t.doc,s[0],s[1],rr.from(r.content));return o?{pos:n,oldCell:a,newCell:r,replaceRange:s,replaceSlice:o}:null}collectCellActions(t){return super.collectCellActions(t).filter((t,e,n)=>{let{pos:r}=t;return 0===e||r!==n[e-1].pos})}applyCellAction(t,e,n){let{pos:r,oldCell:i,newCell:a,replaceRange:[s,o],replaceSlice:l}=t,h=a.attrs;h=a.type.completeAttrValues(h),h=a.type.settableAttrValues(h);let u=i.replace(s-r-1,o-r-1,l.deepCopy({target:"replace"})).copyWithAttrs(h),c=r-n-1;return e.replace(c,c+i.nodeSize,rr.from(u))}invertAtPos(t){let e=this.collectCellActions(t);if(!e.length)return null;let n=0,r=e.map(t=>{let{pos:e,oldCell:r,replaceRange:[i,a],replaceSlice:s}=t;r=r.deepCopy({target:"replace"});let o={pos:e+n,node:r.copyWithContent(r.slice(i-e-1,a-e-1).content),range:[i+n,i+n+s.size]};return n+=s.size-(a-i),o});return this.constructor.create(t.pos,r)}addCellPosMapRange(t,e){let{replaceRange:[n,r],replaceSlice:i}=t;e.push(n,r-n,i.size)}mapCellInfo(t,e){let n=e.mapNodeResult(t.pos,1);if(n.deleted)return null;let r=t.range;if(r){let t=e.mapRange(r[0],r[1]);r=[t.from,Math.max(t.from,t.to)]}return{...t,pos:n.pos,...r?{range:r}:null}}static fromJSON(t,e){return new this(e.pos,e.cells.map(e=>({...e,node:t.nodeFromJSON(e.node)})))}static create(t,e){return super.create(t,e)}}u$.register("replaceTableCells"),tY(oZ.prototype,{replaceTableCells(t,e){let n=u$.resolvePos(this.doc,t,!0).self;return e.forEach((r,i)=>{let{pos:a,range:s}=r;if(u$.assertCellInfo(n,t,r),i>0&&a===e[i-1].pos)throw new oU(`Repeatedly replacing table cell at ${a}.`);let o=n.nodeAt(a-t-1);if(!o)throw new oU(`No node at given cell pos ${a}.`);if(s){let t=a+1,e=t+o.getContentSize();if(2!==s.length||!s.every(n=>n>=t&&n<=e))throw new oU(`Given cell replace range ${JSON.stringify(s)} out of range [${t}, ${e}].`)}}),this.step(u$.create(t,e))}});class uJ extends un{deleteSelfInsertion(t,e,n){let r=e.jsonID;if("removeTableRowV2"!==r&&"removeTableColV2"!==r&&"deleteTableCells"!==r)return super.deleteSelfInsertion(t,e,n);let i=hX(t);if(!i.length)return;let a=!0;if(h$(i,(t,e)=>{this.commentStore.getCommentsFitting(t,e).some(t=>t.isSelfInsertion(this.uid))||(a=!1)}),!a)return;let s=this.collectTableCellsDeletionInfo(i);if(s)return this.tr.withoutRevising(function(){this.deleteTableCells(s.pos,s.cells,n)}),null}convertInsertionTableCellsStep(t){let e=t.jsonID;if("deleteTableCells"===e);else if("insertTableCells"===e)return t;else if("replaceTableCells"===e){let e=t.cells.reduce((t,e)=>{let n=this.doc.nodeAt(e.pos);if(!n)return t;let r=e.range||[e.pos+1,e.pos+1+n.getContentSize()];return this.commentStore.getCommentsFitting(r[0],r[1]).some(t=>t.isSelfInsertion(this.uid))||(r=[r[0],r[0]]),t.push({...e,range:r}),t},[]);return e.length?u$.create(t.pos,e):null}return null}convertInsertionStep(t){switch(t.jsonID){case"insertTableCells":case"deleteTableCells":case"replaceTableCells":return this.convertInsertionTableCellsStep(t);case"insertTableRowV2":case"insertTableColV2":return t;default:return null}}deleteSuggestionContent(t,e){let n=this.collectTableCellsDeletionInfo(t.ranges);if(!n)return super.deleteSuggestionContent(t,e);this.tr.withoutRevising(function(){this.deleteTableCells(n.pos,n.cells,e)})}collectTableCellsDeletionInfo(t){let e=-1,n=[];return(h$(t,(t,r)=>{let i=this.doc.resolve(t),a=i.self;if(!a||!a.type.isTableCell||e>=0&&e!==i.before(-1))return e=-1,!0;let s=this.doc.resolve(r),o=s.parent;if(!o.type.isTableRow||o!==i.parent)return e=-1,!0;e<0&&(e=i.before(-1));let l=i.pos;for(let t=i.index(),e=s.index();t<e;++t)n.push({pos:l}),l+=o.child(t).nodeSize}),e<0)?null:{pos:e,cells:n}}}class uY extends ut{constructor(t,e,n){super(t,e,n),this.revising=!1}isRevising(){return this.revising}setRevising(t){this.revising=t}withoutRevising(t){return this.revising?(this.setRevising(!1),t.call(this),this.setRevising(!0)):t.call(this),this}step(t,e){return("boolean"==typeof e&&(e={revising:e}),(e?.revising??!0)&&this.isRevising())?(this.getRevisionHandler(t.jsonID).exec(this,t,e),this):super.step(t,e)}cherryPick(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let r=this.isRevising();r&&this.setRevising(!1);let i=super.cherryPick(...e);return r&&this.setRevising(!0),i}handleSuggestion(t,e,n){let r=this.commentStore.getBy(t,!0);if(!r.isSuggestion())throw new oU(`Comment with given id \`${t}\` is not a suggestion.`);if(!this.getRevisionHandler(r.getSuggestionStepId()||"")[e?"accept":"reject"](this,t,n))throw new oU(`Failed to ${e?"accept":"reject"} suggestion \`${t}\`.`);return this}acceptSuggestion(t,e){return this.handleSuggestion(t,!0,e)}rejectSuggestion(t,e){return this.handleSuggestion(t,!1,e)}handleSuggestionsWith(t,e,n,r){for(let e of t)this.resolveComment(e,r);return this.clearCommentTracking(e,r),this.deleteTrackingContentInsideRanges(n,r),this}acceptSuggestionsWith(t,e){void 0===e&&(e=m);let n=[],r=[],i=v;return this.commentStore.forEach((a,s)=>{if(!a.isSuggestion()||t&&!t(a))return;let o=a.isDeletion();n.push(s),(!e.keepResolvedTracking||o)&&r.push(s),o&&(i=h0(i,a.ranges))}),this.handleSuggestionsWith(n,r,i,e)}rejectSuggestionsWith(t,e){void 0===e&&(e=m);let n=[],r=[],i=v;return this.commentStore.forEach((a,s)=>{if(!a.isSuggestion()||t&&!t(a))return;let o=a.isInsertion();n.push(s),(!e.keepResolvedTracking||o)&&r.push(s),o&&(i=h0(i,a.ranges))}),this.handleSuggestionsWith(n,r,i,e)}acceptAllSuggestions(t){return this.acceptSuggestionsWith(void 0,t)}acceptAllInsertions(t){return this.acceptSuggestionsWith(t=>t.isInsertion(),t)}acceptAllDeletions(t){return this.acceptSuggestionsWith(t=>t.isDeletion(),t)}rejectAllSuggestions(t){return this.rejectSuggestionsWith(void 0,t)}rejectAllInsertions(t){return this.rejectSuggestionsWith(t=>t.isInsertion(),t)}rejectAllDeletions(t){return this.rejectSuggestionsWith(t=>t.isDeletion(),t)}getRevisionHandler(t){switch(oH.normalizeStepId(t)){case"replaceAround":case"insertNode":case"deleteNode":case"insertFloating":case"deleteFloating":return un;case"replace":return ur;case"insertTableCells":case"deleteTableCells":case"replaceTableCells":case"insertTableRow":case"removeTableRow":case"insertTableCol":case"removeTableCol":return uJ;default:return oi}}deleteTrackingContent(t,e,n){let r=this.getReplaceStep(t,e)?.deepCopy(this.schema,{target:"replace"});return r&&this.step(r,{...n,revising:!1}),this}deleteTrackingContentInsideRanges(t,e){return!function(t,e,n){for(let{from:n,to:r,index:i}of hZ(t,{reversed:!0}))if(e.call(void 0,n,r,i))return}(t,(t,n)=>{this.deleteTrackingContent(t,n,e)}),this}}class uX extends uY{constructor(t,e,n,r){super(e,n,r),this.pm=t,this.options=Object.create(null),this.setUserInfo(t.getUserInfo())}apply(t){return this.pm.apply(this,{...this.options,...t})}addStep(t){this.pm.dispatchEvent("beforeTransformStep",t,this);let e=super.addStep(t);return this.pm.dispatchEvent("transformStep",t,this,e),e}}class uQ{constructor(t,e){this.pm=t,this.destroyed=!1}isDestroyed(){return this.destroyed}destroy(){this.destroyed||(this.destroyed=!0,this.onDestroy())}onDestroy(){this.pm.destroyHelper(this)}}let uK={};function u0(t){let e,n=uK[t];if(n)return n;switch(t){case"array":e=(t,e)=>{let n;return n=void 0===e?[]:Array.isArray(e)?e:[e],Array.isArray(t)?n.push(...t):n.push(t),n};break;case"unique_array":e=(t,e)=>{let n;for(let r of(n=null==e?[]:Array.isArray(e)?e:[e],Array.isArray(t)?t:[t]))n.includes(r)||n.push(r);return n};break;case"set":e=(t,e)=>{let n;for(let r of(n=null==e?new Set:Array.isArray(e)?new Set(e):e,t))n.add(r);return n};break;default:throw Error(`Unknown preset merger: ${t}`)}return uK[t]=e,e}class u1 extends uQ{constructor(t,e){super(t,e),this.actionMap=this.convertActionMap(e.actions)}convertActionMap(t){return F(t,t=>{var e;let n=t.mode??"flush_sync";return{handler:t.handler,merger:"function"==typeof(e=t.merger)?e:"string"==typeof e?u0(e):void 0,mode:n,dataRef:null}})}getActionItem(t){return this.actionMap[t]||null}schedule(t,e){if(this.isDestroyed())return;let n=void 0===e?"default":t,r=void 0===e?t:e,i=this.getActionItem(n);if(i.dataRef)i.dataRef.value=this.mergeData(n,r,i.dataRef.value);else{i.dataRef={value:this.mergeData(n,r,void 0)};let t=this.handleData.bind(this,n),e=i.mode;"flush_sync"===e?(this.pm.addEventListener("flush",t,{once:!0}),this.pm.ensureFlush()):this.pm.nextTick({mode:e}).then(t)}}handleData(t){if(this.isDestroyed())return;let e=this.getActionItem(t),{dataRef:n,handler:r}=e;n&&(e.dataRef=null,r.call(null,n.value))}mergeData(t,e,n){let{merger:r}=this.getActionItem(t);return r?r.call(null,e,n):e}static getPresetMerger(t){return u0(t)}}let u2=function(t,e){return t===e||t!=t&&e!=e},u5=function(t,e){for(var n=t.length;n--;)if(u2(t[n][0],e))return n;return -1};var u4=Array.prototype.splice;function u8(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u8.prototype.clear=function(){this.__data__=[],this.size=0},u8.prototype.delete=function(t){var e=this.__data__,n=u5(e,t);return!(n<0)&&(n==e.length-1?e.pop():u4.call(e,n,1),--this.size,!0)},u8.prototype.get=function(t){var e=this.__data__,n=u5(e,t);return n<0?void 0:e[n][1]},u8.prototype.has=function(t){return u5(this.__data__,t)>-1},u8.prototype.set=function(t,e){var n=this.__data__,r=u5(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};let u3=function(t){if(!tf(t))return!1;var e=tI(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};var u6=tm["__core-js_shared__"],u7=function(){var t=/[^.]+$/.exec(u6&&u6.keys&&u6.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),u9=Function.prototype.toString;let ct=function(t){if(null!=t){try{return u9.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var ce=/^\[object .+?Constructor\]$/,cn=Object.prototype,cr=Function.prototype.toString,ci=cn.hasOwnProperty,ca=RegExp("^"+cr.call(ci).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let cs=function(t){return!!tf(t)&&(!u7||!(u7 in t))&&(u3(t)?ca:ce).test(ct(t))},co=function(t,e){var n=null==t?void 0:t[e];return cs(n)?n:void 0};var cl=co(tm,"Map"),ch=co(Object,"create"),cu=Object.prototype.hasOwnProperty,cc=Object.prototype.hasOwnProperty;function cd(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}cd.prototype.clear=function(){this.__data__=ch?ch(null):{},this.size=0},cd.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=+!!e,e},cd.prototype.get=function(t){var e=this.__data__;if(ch){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return cu.call(e,t)?e[t]:void 0},cd.prototype.has=function(t){var e=this.__data__;return ch?void 0!==e[t]:cc.call(e,t)},cd.prototype.set=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=ch&&void 0===e?"__lodash_hash_undefined__":e,this};let cp=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},cg=function(t,e){var n=t.__data__;return cp(e)?n["string"==typeof e?"string":"hash"]:n.map};function cf(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function cy(t){var e=this.__data__=new u8(t);this.size=e.size}function cx(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new cf;++e<n;)this.add(t[e])}cf.prototype.clear=function(){this.size=0,this.__data__={hash:new cd,map:new(cl||u8),string:new cd}},cf.prototype.delete=function(t){var e=cg(this,t).delete(t);return this.size-=+!!e,e},cf.prototype.get=function(t){return cg(this,t).get(t)},cf.prototype.has=function(t){return cg(this,t).has(t)},cf.prototype.set=function(t,e){var n=cg(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this},cy.prototype.clear=function(){this.__data__=new u8,this.size=0},cy.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},cy.prototype.get=function(t){return this.__data__.get(t)},cy.prototype.has=function(t){return this.__data__.has(t)},cy.prototype.set=function(t,e){var n=this.__data__;if(n instanceof u8){var r=n.__data__;if(!cl||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new cf(r)}return n.set(t,e),this.size=n.size,this},cx.prototype.add=cx.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},cx.prototype.has=function(t){return this.__data__.has(t)};let cm=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},cv=function(t,e,n,r,i,a){var s=1&n,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var h=a.get(t),u=a.get(e);if(h&&u)return h==e&&u==t;var c=-1,d=!0,p=2&n?new cx:void 0;for(a.set(t,e),a.set(e,t);++c<o;){var g=t[c],f=e[c];if(r)var y=s?r(f,g,c,e,t,a):r(g,f,c,t,e,a);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!cm(e,function(t,e){if(!p.has(e)&&(g===t||i(g,t,n,r,a)))return p.push(e)})){d=!1;break}}else if(!(g===f||i(g,f,n,r,a))){d=!1;break}}return a.delete(t),a.delete(e),d};var cb=tm.Uint8Array;let cw=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},cM=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n};var c_=tv?tv.prototype:void 0,cA=c_?c_.valueOf:void 0;let cS=function(t,e,n,r,i,a,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!a(new cb(t),new cb(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return u2(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=cw;case"[object Set]":var l=1&r;if(o||(o=cM),t.size!=e.size&&!l)break;var h=s.get(t);if(h)return h==e;r|=2,s.set(t,e);var u=cv(o(t),o(e),r,i,a,s);return s.delete(t),u;case"[object Symbol]":if(cA)return cA.call(t)==cA.call(e)}return!1},cC=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t},cI=function(t,e,n){var r=e(t);return iw(t)?r:cC(r,n(t))},cP=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var s=t[n];e(s,n,t)&&(a[i++]=s)}return a};var cT=Object.prototype.propertyIsEnumerable,ck=Object.getOwnPropertySymbols,cL=ck?function(t){return null==t?[]:cP(ck(t=Object(t)),function(e){return cT.call(t,e)})}:function(){return[]};let cD=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},cR=function(t){return tP(t)&&"[object Arguments]"==tI(t)};var cN=Object.prototype,cO=cN.hasOwnProperty,cj=cN.propertyIsEnumerable,cE=cR(function(){return arguments}())?cR:function(t){return tP(t)&&cO.call(t,"callee")&&!cj.call(t,"callee")},cV="object"==typeof exports&&exports&&!exports.nodeType&&exports,cB=cV&&"object"==typeof module&&module&&!module.nodeType&&module,cz=cB&&cB.exports===cV?tm.Buffer:void 0;let cF=(cz?cz.isBuffer:void 0)||function(){return!1};var cG=/^(?:0|[1-9]\d*)$/;let cH=function(t,e){var n=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==n||"symbol"!=n&&cG.test(t))&&t>-1&&t%1==0&&t<e},cW=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff};var cq={};cq["[object Float32Array]"]=cq["[object Float64Array]"]=cq["[object Int8Array]"]=cq["[object Int16Array]"]=cq["[object Int32Array]"]=cq["[object Uint8Array]"]=cq["[object Uint8ClampedArray]"]=cq["[object Uint16Array]"]=cq["[object Uint32Array]"]=!0,cq["[object Arguments]"]=cq["[object Array]"]=cq["[object ArrayBuffer]"]=cq["[object Boolean]"]=cq["[object DataView]"]=cq["[object Date]"]=cq["[object Error]"]=cq["[object Function]"]=cq["[object Map]"]=cq["[object Number]"]=cq["[object Object]"]=cq["[object RegExp]"]=cq["[object Set]"]=cq["[object String]"]=cq["[object WeakMap]"]=!1;var cU="object"==typeof exports&&exports&&!exports.nodeType&&exports,cZ=cU&&"object"==typeof module&&module&&!module.nodeType&&module,c$=cZ&&cZ.exports===cU&&ty.process,cJ=function(){try{var t=cZ&&cZ.require&&cZ.require("util").types;if(t)return t;return c$&&c$.binding&&c$.binding("util")}catch(t){}}(),cY=cJ&&cJ.isTypedArray,cX=cY?function(t){return cY(t)}:function(t){return tP(t)&&cW(t.length)&&!!cq[tI(t)]},cQ=Object.prototype.hasOwnProperty;let cK=function(t,e){var n=iw(t),r=!n&&cE(t),i=!n&&!r&&cF(t),a=!n&&!r&&!i&&cX(t),s=n||r||i||a,o=s?cD(t.length,String):[],l=o.length;for(var h in t)(e||cQ.call(t,h))&&!(s&&("length"==h||i&&("offset"==h||"parent"==h)||a&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||cH(h,l)))&&o.push(h);return o};var c0=Object.prototype;let c1=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||c0)};var c2=(u=Object.keys,c=Object,function(t){return u(c(t))}),c5=Object.prototype.hasOwnProperty;let c4=function(t){if(!c1(t))return c2(t);var e=[];for(var n in Object(t))c5.call(t,n)&&"constructor"!=n&&e.push(n);return e},c8=function(t){return null!=t&&cW(t.length)&&!u3(t)?cK(t):c4(t)},c3=function(t){return cI(t,c8,cL)};var c6=Object.prototype.hasOwnProperty;let c7=function(t,e,n,r,i,a){var s=1&n,o=c3(t),l=o.length;if(l!=c3(e).length&&!s)return!1;for(var h=l;h--;){var u=o[h];if(!(s?u in e:c6.call(e,u)))return!1}var c=a.get(t),d=a.get(e);if(c&&d)return c==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++h<l;){var f=t[u=o[h]],y=e[u];if(r)var x=s?r(y,f,u,e,t,a):r(f,y,u,t,e,a);if(!(void 0===x?f===y||i(f,y,n,r,a):x)){p=!1;break}g||(g="constructor"==u)}if(p&&!g){var m=t.constructor,v=e.constructor;m!=v&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v)&&(p=!1)}return a.delete(t),a.delete(e),p};var c9=co(tm,"DataView"),dt=co(tm,"Promise"),de=co(tm,"Set"),dn=co(tm,"WeakMap"),dr="[object Map]",di="[object Promise]",da="[object Set]",ds="[object WeakMap]",dl="[object DataView]",dh=ct(c9),du=ct(cl),dc=ct(dt),dd=ct(de),dp=ct(dn),dg=tI;(c9&&dg(new c9(new ArrayBuffer(1)))!=dl||cl&&dg(new cl)!=dr||dt&&dg(dt.resolve())!=di||de&&dg(new de)!=da||dn&&dg(new dn)!=ds)&&(dg=function(t){var e=tI(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case dh:return dl;case du:return dr;case dc:return di;case dd:return da;case dp:return ds}return e});let df=dg;var dy="[object Arguments]",dx="[object Array]",dm="[object Object]",dv=Object.prototype.hasOwnProperty;let db=function(t,e,n,r,i,a){var s=iw(t),o=iw(e),l=s?dx:df(t),h=o?dx:df(e);l=l==dy?dm:l,h=h==dy?dm:h;var u=l==dm,c=h==dm,d=l==h;if(d&&cF(t)){if(!cF(e))return!1;s=!0,u=!1}if(d&&!u)return a||(a=new cy),s||cX(t)?cv(t,e,n,r,i,a):cS(t,e,l,n,r,i,a);if(!(1&n)){var p=u&&dv.call(t,"__wrapped__"),g=c&&dv.call(e,"__wrapped__");if(p||g){var f=p?t.value():t,y=g?e.value():e;return a||(a=new cy),i(f,y,n,r,a)}}return!!d&&(a||(a=new cy),c7(t,e,n,r,i,a))},dw=function(t,e){return function t(e,n,r,i,a){return e===n||(null!=e&&null!=n&&(tP(e)||tP(n))?db(e,n,r,i,t,a):e!=e&&n!=n)}(t,e)};class dM extends uQ{constructor(t,e,n,r){super(t,r),this.oldValue=e,this.value=e,this.callback=n;let i=this.ensureHandlers(r?.timing??"immediate");this.onHandleUpdate=i.onHandleUpdate,this.onHandleDestroy=i.onHandleDestroy}ensureHandlers(t){let e,n;if("immediate"===t)e=()=>{this.run()};else{let r=this.pm.createFlushScheduler({actions:{default:{handler:()=>{this.run()},mode:t}}});e=()=>{r.schedule(void 0)},n=()=>{r.destroy()}}return{onHandleUpdate:e,onHandleDestroy:n}}run(){if(this.isDestroyed())return;let t=this.oldValue;this.oldValue=this.value,this.callback.call(null,this.value,t)}update(t){this.isDestroyed()||dw(t,this.value)||(this.value=t,this.onHandleUpdate())}onDestroy(){this.onHandleDestroy?.(),super.onDestroy()}}function d_(t){let e=t.defaultView??window;return"hidden"===t.visibilityState?{request:t=>e.setTimeout(t,16),cancel:t=>e.clearTimeout(t)}:{request:t=>e.requestAnimationFrame(t),cancel:t=>e.cancelAnimationFrame(t)}}function dA(t){if(!t)throw Error("Selection is not set.")}let dS=class extends ap{constructor(t){let e=t.schema||t.doc&&t.doc.type.schema;if(!e)throw RangeError("You must specify a schema in options.");let n=t.doc||e.nodeType("doc").createFilled();if(n.type.schema!==e)throw RangeError("Given schema does not correspond to doc's schema");n.updateState(),super(n,h9.from(n,t.comments)),t=this.options=function(t){let e=(t={...t}).hook=f(t.hook);return e.render=f(e.render),e.redraw=f(e.redraw),e.change=f(e.change),e.event=f(e.event),t}(t),this.mode=t.mode??"editor",this.userInfo=t.userInfo||{id:0},this.locale=t.locale||"en_US",this.hook=t.hook,this.enableBreakLineHook=!!t.enableBreakLineHook,this.masterDoc=this.doc,this.masterCommentStore=this.commentStore,this.stateMappingMasterLocal=null,this.stateMappingLocalMaster=null,super._select(e.getInitialSelection(this.doc)),this._root=null,{content:this.content,wrapper:this.wrapper}=this.initDom();let r=t.place;"function"==typeof r?r(this.wrapper):r&&r.appendChild(this.wrapper),this.on={userInfoChange:new nP,localeChange:new nP,destroy:new nP,beforeSetState:new nP,setState:new nP,beforeUpdateState:new nP,updateState:new nP,beforeResetState:new nP,resetState:new nP,masterStateChange:new nP,stateChange:new nP,applyLocalTransform:new nP,localTransform:new nP,beforeTransformStep:new nP,transformStep:new nP,filterTransform:new nk,beforeTransform:new nP,transform:new nP,textInput:new nP,beforePrint:new nL,afterPrint:new nL,selectionChange:new nP,startDraw:new nP,draw:new nP,drawProgressive:new nP,statusChange:new nP,flushing:new nP,flush:new nP,flushSelection:new nP,flushSelectionLoose:new nP,afterFlush:new nP,activeMarkChange:new nP,transformCopiedJSON:new nT,transformCopiedSlice:new nT,transformPastedJSON:new nT,transformPastedDOM:new nT,transformPastingSelection:new nT,transformDroppedSelection:new nT,transformClientCoords:new nT,viewportChange:new nP,beforeDrawSelection:new nk,drawingSelection:new nk,drawSelection:new nP,drawIndicator:new nP,collabSelectionUpdate:new nP,collabStepApply:new nP,spellLanguagesChange:new nP,spellCheckEnabledChange:new nP,spellCheckChange:new nP,spellingAnalyze:new nk,spellingSuggest:new nk,spellingCorrect:new nk,spellingAdd:new nk,spellingRemove:new nk,spellingIgnore:new nk,spellingPersonal:new nk,dictionaryAdd:new nP,dictionaryRemove:new nP,dictionaryIgnore:new nP,dictionaryInit:new nP},this.transform=null,this.scheduleTimer=d_(this.root),this.operation=null,this.flushScheduled=null,this.flushGenerator=null,this.flushRunning=!1,this.flushingPhase=0,this.tickMap={},this.flushProgressive=this.flushProgressive.bind(this),this.bindEvents(),this.helpers=new Set,this.plugin=Object.create(null),this.dirtyNodes=new Map,this.ranges=new oe(this),this.history=null,t.plugins&&this.initPlugins(t.plugins,t.pluginConfigs),this.dompos=this.getPlugin("dompos"),"presentation"===this.schema.name&&t.video_controller_class&&(this.video_controller=new t.video_controller_class(Object.assign(this.options.video_controller_config,{video_container_wrapper:this.wrapper,syno_token:t.syno_token}))),this.markAllDirty()}get master_doc(){return this.masterDoc}set master_doc(t){this.masterDoc=t}get master_comment_store(){return this.masterCommentStore}set master_comment_store(t){this.masterCommentStore=t}initDom(){let t=na(["div",{class:"ProseMirror-content","pm-container":!0,inline_style:this.schema.getDefaultContentStyles()}]),e=na(["div",{class:"ProseMirror"},t]);return{content:t,wrapper:e}}bindEvents(){this.root.addEventListener("visibilitychange",()=>{this.updateScheduleTimer()});let t={priority:1/0};if(this.addEventListener("drawProgressive",()=>{this.tickMap.draw?.resolve()},t),this.addEventListener("flush",()=>{this.tickMap.draw?.resolve(),this.tickMap.flush?.resolve()},t),"document"===this.schema.name){let t,e=()=>{t&&(t.classList.remove("ProseMirror-selectednode"),t=void 0)};this.on.flush.add(()=>{let n=this.selection;if(n.is("Node")){let r=n.node.dom;r!==t&&(r&&r.classList.add("ProseMirror-selectednode"),e(),t=r)}else e()})}}getMode(){return this.mode}getUserId(){return this.userInfo.id}getUserName(){return this.userInfo.name??""}getUserInfo(){return this.userInfo}setUserInfo(t){let e=this.getUserInfo();(t.id!==e.id||t.name!==e.name)&&(this.userInfo=t,this.dispatchEvent("userInfoChange",t,e))}getLocale(){return this.locale}setLocale(t){let e=this.getLocale();t!==e&&(this.locale=t,this.dispatchEvent("localeChange",t,e))}destroy(){this.flushGenerator?.return(),this.destroyHelpers(),this.destroyPlugins(),this.dispatchEvent("destroy")}getEventSubscription(t,e){let n=this.on[t]||null;if(e&&!n)throw Error(`There is no subscription named \`${t}\`.`);return n}hasEventListener(t){let e=this.getEventSubscription(t);return!!e&&e.hasHandler()}addEventListener(t,e,n){let r;r=n&&n.once?"addOnce":"add",this.getEventSubscription(t,!0)[r](e,n&&n.priority||0)}removeEventListener(t,e,n){this.getEventSubscription(t,!0).remove(e,n)}dispatchEvent(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.on[t].dispatch(...n)}ensureDOMVisible(t,e){if(void 0===e&&(e=!1),aV(t))return!0;if(e&&"document"===this.schema.name){let e=this.getPlugin("page_display");return!e||e.showPageByChild(t)}return!1}get showDoc(){let t=this.getOperation();return t?t.doc:this.doc}getOption(t){return this.options[t]}getPlugin(t){return this.plugin[t]||null}get operator(){return this.getPlugin("operator").operators}getOperator(t){return this.getPlugin("operator").getOperator(t)}getAction(t){return this.getPlugin("operator").getAction(t)}get root(){let t=this._root;if(t)return t;for(let e=this.wrapper.parentNode;e;e=e.parentNode)if(9===e.nodeType){t=e;break}return this._root=t||document}get selection(){return dA(this._selection),this._selection}get multiSelection(){return dA(this._multiSelection),this._multiSelection}get masterMultiSelection(){let t=this.multiSelection,e=this.getStateMapping(!0);return e&&(t=t.map(this.masterDoc,e)),t}_select(t,e){void 0===e&&(e=!1),this.ensureOperation().selectionChanged=!0,super._select(t),this.dispatchEvent("selectionChange",t)}watchSelection(t,e,n){let r=this.createWatcher(t.call(this,this.multiSelection),e.bind(this),n),i=e=>{r.update(t.call(this,e))};return this.addEventListener("selectionChange",i),()=>{r.destroy(),this.removeEventListener("selectionChange",i)}}createLocalTransform(t,e,n){let r=new uY(t,e,n);return r.setTracking(!0),r.setUserInfo({id:0}),this.dispatchEvent("applyLocalTransform",r),r}branchLocalState(t,e,n){return this.hasEventListener("applyLocalTransform")?(t=t.deepCopy().updateState(),e=e.copy(),n&&(n=iV.fromJSON(t,n.ensureSelection().toJSON())),this.createLocalTransform(t,e,n)):null}getStateMapping(t){return t?this.stateMappingLocalMaster:this.stateMappingMasterLocal}ensureStateMapping(t){return this.getStateMapping(t)||oD.empty}setStateMapping(t,e){t?(this.stateMappingMasterLocal=e?t:t.invert(),this.stateMappingLocalMaster=e?t.invert():t):this.stateMappingMasterLocal=this.stateMappingLocalMaster=null}hasConsistentState(){return this.masterDoc===this.doc}_setState(t,e,n,r){return this.ensureFlush(),super._setState(t,e,n,r)}_setMasterState(t,e){this.masterDoc=t,this.masterCommentStore=e}setLocalState(t,e,n){this.ranges.removeAll(),this.ranges=new oe(this),this._setState(t,e,n,!1),this.resumeFlush()}setMasterState(t,e){this._setMasterState(t,e)}setState(t,e,n){this.assertIdle(),t.updateState();let r=h9.from(t,e),i=this.branchLocalState(t,r,n),a=i?i.doc:t,s=i?i.commentStore:r,o=(i?i.multiSelection:n?.ensureSelection())||a.schema.getInitialSelection(a);this.dispatchEvent("beforeSetState",a,s,o),this.setMasterState(t,r),this.setLocalState(a,s,o),this.setStateMapping(i?i.toMapping():null,!0),this.dispatchEvent("masterStateChange",null,this.masterDoc,this.masterCommentStore,null,null),this.dispatchEvent("stateChange",null,this.doc,this.commentStore,null,null),this.dispatchEvent("setState",this.doc,this.commentStore,this.multiSelection),i&&this.dispatchEvent("localTransform",i)}updateLocalState(t,e,n,r,i){this.ranges.transform(i),this._setState(t,e,n,r)}updateMasterState(t,e){this._setMasterState(t,e)}assertUpdateState(t,e,n,r,i){let a=t===n;C(a===(e===r),"`doc` and `commentStore` must be both consistent or inconsistent between master and local state."),a?C(!i||!i.length,"There must not be state mapping if state is consistent.."):C(i,"There must be state mapping if state is inconsistent.")}doUpdateState(t,e,n,r,i,a,s,o,l){this.assertUpdateState(t,e,r,i,o);let{doc:h,commentStore:u,masterDoc:c,masterCommentStore:d}=this,p=!a;a||(a=this.multiSelection.map(r,s)),a=a.ensureSelection(),this.dispatchEvent("beforeUpdateState",r,i,a),this.updateMasterState(t,e),this.updateLocalState(r,i,a,p,s),this.setStateMapping(t===r?null:o,l),this.dispatchEvent("masterStateChange",n,this.masterDoc,this.masterCommentStore,c,d),this.dispatchEvent("stateChange",s,this.doc,this.commentStore,h,u),this.dispatchEvent("updateState",this.doc,this.commentStore,this.multiSelection)}updateState(t,e,n,r,i,a,s,o,l){this.assertIdle(),C(this.hasConsistentState()===(t===r),"One should preserve state consistency when updating state.");let h=this.hasConsistentState()?null:this.createLocalTransform(r,i,a);return h&&({doc:r,commentStore:i,multiSelection:a}=h,s=s.concat(h),o&&(o=l?o.concat(h):h.toMapping().invert().concat(o))),this.doUpdateState(t,e,n,r,i,a,s,o,l),h}resetState(){this.assertIdle();let{masterDoc:t,masterCommentStore:e}=this,n=this.branchLocalState(t,e),r=n?n.doc:t,i=n?n.commentStore:e,a=n?n.multiSelection:null,s=this.ensureStateMapping(!0),o=null;n&&(s=s.concat(n),o=n.toMapping()),this.dispatchEvent("beforeResetState",r,i),this.doUpdateState(t,e,oD.empty,r,i,a,s,o,!0),this.dispatchEvent("resetState",this.doc,this.commentStore),n&&this.dispatchEvent("localTransform",n)}watchState(t,e,n){let r=this.createWatcher(t.call(this,this.doc,this.commentStore),e.bind(this),n),i=(e,n,i)=>{r.update(t.call(this,n,i))};return this.addEventListener("stateChange",i),()=>{r.destroy(),this.removeEventListener("stateChange",i)}}isPermission(t){let e=this.getPlugin("permission");return e?e.isPermission(t):"previewable"===t}isWritable(){return this.isPermission("writable")}isCommentable(){return this.isPermission("commentable")}isReadable(){return this.isPermission("readable")}getViewport(){return this.options.getViewport?this.options.getViewport():{left:0,top:0,right:this.doc.getAttrValue("cx")||0,bottom:this.doc.getAttrValue("cy")||0}}getPendingTransform(){return this.transform}setPendingTransform(t){return this.transform=t}clearPendingTransform(){this.transform=null}dropTransform(t){void 0===t&&(t=!1),this.assertIdle(),this.clearPendingTransform(),t?(this.doc.updateState({force:!0}),this.masterDoc.updateState({force:!0})):(this.doc.maybeUpdateState({partialUpdate:!0}),this.masterDoc.maybeUpdateState({partialUpdate:!0}))}createEditorTransform(t,e,n){return this.assertIdle(),new uX(this,t,e,n)}get tr(){return this.ensureTransform()}ensureTransform(t){void 0===t&&(t=m),this.assertIdle();let{selection:e,simple:n}=t,r=this.getPendingTransform()||this.setPendingTransform(this.createEditorTransform(this.doc,this.commentStore,this.multiSelection));if(e&&r.select(e),!n){r.setTracking(!0);let t=this.getPlugin("revision");r.setRevising(!!t&&t.isRevising());let e=this.getStoredMarks();e&&r.setActiveMarks(e)}return r}apply(t,e){this.assertIdle();try{this.applyTransform(t,e)?this.clearPendingTransform():this.dropTransform()}catch(t){throw this.dropTransform(!0),t}return t}assertApplyTransform(t,e){let n=this.getPendingTransform();C(n&&n===t,"Given transformation does not match pending transformation."),C(t.baseDoc===this.doc,"The base document in given transformation does not match the document in the editor.")}convertMasterTransform(t,e){let n,r=null;if(this.hasConsistentState())n=t;else if(n=this.createEditorTransform(this.masterDoc,this.masterCommentStore),e.masterTransformAdapter){let i=e.masterTransformAdapter.call(null,n,t);i||(i=oD.from(t.toMapping().invert(),this.ensureStateMapping(!0),n)),r=i}else r=n.cherryPick(t.steps,t.posMaps,t.customMaps,this.ensureStateMapping(!0));return{masterTransform:n,stateMapping:r}}applyTransform(t,e){if(void 0===e&&(e=m),this.assertApplyTransform(t,e),t.length||t.multiSelection!==this.multiSelection||t.getStoredMarks()!==this.getStoredMarks()){if(!1!==e.filter&&this.on.filterTransform.dispatch(t))return!1;this.dispatchEvent("beforeTransform",t,e);let{masterTransform:n,stateMapping:r}=this.convertMasterTransform(t,e),i=this.updateState(n.doc,n.commentStore,n.toMapping(),t.doc,t.commentStore,t.multiSelection,t.toMapping(),r,!1),a=t.getStoredMarks();a&&this.setActiveMarks(a),this.dispatchEvent("transform",t,n,e),i&&this.dispatchEvent("localTransform",i)}return this.ensureFlush(),e.scrollIntoView&&this.scrollIntoView(e.scrollPos),e.focus&&this.focus(),!0}getOperation(){return this.operation}hasOperation(){return!!this.getOperation()}ensureOperation(){return this.getOperation()||this.startOperation()}startOperation(){let t=this.operation=new aA(this);return this.requestFlush(),t}endOperation(){let t=this.getOperation();return this.operation=null,t}updateScheduleTimer(){null!==this.flushScheduled?(this.cancelFlush(),this.scheduleTimer=d_(this.root),this.requestFlush()):this.scheduleTimer=d_(this.root)}requestFlush(){null===this.flushScheduled&&(this.flushScheduled=this.scheduleTimer.request(this.flushProgressive))}cancelFlush(){let t=this.flushScheduled;null!==t&&(this.scheduleTimer.cancel(t),this.flushScheduled=null)}pauseFlush(){this.ensureOperation(),this.cancelFlush()}resumeFlush(){this.ensureOperation(),this.requestFlush()}ensureFlush(t){void 0===t&&(t=m),!t.skipCurrentFlush&&this.isFlushing(4,-1)||(t.wakeUp?this.resumeFlush():this.ensureOperation())}isFlushing(t,e){let n=this.flushingPhase;if(0===n)return!1;if(void 0===t)return!0;{let r=e??0;return r>0?n>t:r<0?n<t:n===t}}isIdle(){return!this.isFlushing()}assertIdle(){if(!this.isIdle())throw Error("")}flush(){if(this.flushRunning)return;this.flushRunning=!0,this.cancelFlush();let t=this.ensureFlushGenerator();for(;!t.next(!0).done;);this.hasOperation()&&this.requestFlush(),this.flushRunning=!1}flushProgressive(){this.flushRunning=!0,this.cancelFlush();let{done:t}=this.ensureFlushGenerator().next(!1);(!t||this.hasOperation())&&this.requestFlush(),this.flushRunning=!1}ensureFlushGenerator(){return this.flushGenerator||(this.flushGenerator=this.createFlushGenerator())}*createFlushGenerator(){let t=this.endOperation();t&&(yield*this.doCreateFlushGenerator(t)),this.flushGenerator=null}*doCreateFlushGenerator(t){this.flushingPhase=1,this.dispatchEvent("flushing"),this.flushingPhase=2;let e=null;if(t.doc!==this.doc||this.dirtyNodes.size||this.doc.getRenderRank()!==rg.RENDER_NONE){this.on.startDraw.dispatch(this.doc,t.doc),e=new Map;let n=this.draw(t.doc,e);if(t.progressiveFlush)n.next(!1),yield*n;else for(;!n.next(!0).done;);this.on.draw.dispatch(this.doc,t.doc,e)}if(this.flushingPhase=3,(t.focus||t.selectionChanged&&this.hasFocus())&&this.doFocus(),this.status&&(t.updateStatus||t.selectionChanged)&&this.status.updateStatus(e),this.flushingPhase=4,this.on.flush.dispatch(),t.selectionChanged){let e=this.multiSelection,n=t.multiSelection;e.eqChangedLoose(n)||this.on.flushSelectionLoose.dispatch(e,n),this.on.flushSelection.dispatch(e,n)}this.on.afterFlush.dispatch(),!1!==t.scrollIntoView&&this.doScroll(!0===t.scrollIntoView?this.multiSelection:t.scrollIntoView,t.scrollOptions),this.flushingPhase=0}createFlushTick(t){let e;return this.ensureFlush(t),{promise:new Promise(t=>{e=t}),resolve:e}}createDrawTick(t){let e;return this.ensureFlush(t),{promise:new Promise(t=>{e=t}),resolve:e}}async createTaskTick(){return this.isIdle()||await this.nextTick(),new Promise(t=>{setTimeout(()=>{this.isIdle()?t():this.createTaskTick().then(t)},0)})}nextTick(t){void 0===t&&(t=m);let e=t.mode??"flush";if("task"===e)return this.tickMap[e]||(this.tickMap[e]=this.createTaskTick().then(()=>{this.tickMap[e]=void 0}));{let t,n=this.tickMap[e];return n?n.promise:((t="draw"===e?this.createDrawTick():this.createFlushTick()).promise=t.promise.then(()=>{this.tickMap[e]=void 0}),this.tickMap[e]=t,t.promise)}}nextFlushTick(){return this.nextTick({mode:"flush"})}nextDrawTick(){return this.nextTick({mode:"draw"})}nextTaskTick(){return this.nextTick({mode:"task"})}isViewSync(){let t=this.getOperation();return!t||t.doc===this.doc}markObject(t){if(this.isFlushing(2))return void this.addEventListener("draw",()=>{this.ranges.addRange(t)},{once:!0});this.ranges.addRange(t)}markRange(t,e,n){let r=new s7(t,e,n);return this.markObject(r),r}markNode(t,e){let n=new s9(t,e);return this.markObject(n),n}removeRange(t){if(this.isFlushing(2))return void this.addEventListener("draw",()=>{this.removeRange(t)},{once:!0});this.ranges.removeRange(t)}setStoredMarks(t){return this.getStoredMarks()!==(t=super.setStoredMarks(t))&&this.dispatchEvent("activeMarkChange"),t}hasFocus(t){if(t?.includeAsyncFocus&&this.getOperation()?.focus)return!0;let e=this.getPlugin("input");return!!e&&e.hasFocus()}doFocus(){let t=this.getPlugin("input");t&&t.focus()}focus(t){void 0===t&&(t=!1),t?this.doFocus():this.ensureOperation().focus=!0}cancelFocus(){let t=this.getOperation();t&&(t.focus=!1)}doScroll(t,e){let n=this.getPlugin("scroll");n&&n.scroll(t,e)}scrollIntoView(t,e){let n=this.ensureOperation();n.scrollIntoView=t??!0,n.scrollOptions=e}*draw(t,e){let n=this.getPlugin("draw");if(!n)return;let r=this.dirtyNodes;this.dirtyNodes=new Map;let i=n.draw(this.doc,t,{dirty:r,redrawn:e}),a=!0,s=yield;for(;!i.next().done;)s||(this.dispatchEvent("drawProgressive",this.doc,t,{first:a,last:!1}),a=!1),s=yield;this.dispatchEvent("drawProgressive",this.doc,t,{first:a,last:!0})}markRangeDirty(t,e){this.ensureOperation();let n=this.dirtyNodes,r=this.doc.resolve(t),i=this.doc.resolve(e),a=r.sameDepth(i);for(let t=0;t<=a;t++){let e=r.node(t);n.has(e)||n.set(e,1)}let s=r.index(a),o=i.index(a)+(a===i.depth&&i.atNodeBoundary?0:1),l=r.node(a);for(let t=s;t<o;t++)n.set(l.child(t),2)}markNodeDirty(t){let e=this.doc.resolve(t),n=e.self;if(!n)throw RangeError("given position is not a node.");this.ensureOperation();let r=this.dirtyNodes;for(let t=0;t<=e.depth;++t){let n=e.node(t);r.has(n)||r.set(n,1)}r.set(n,2)}markAllDirty(){this.ensureOperation(),this.dirtyNodes.set(this.doc,2)}async print(t,e){try{await this.dispatchEvent("beforePrint",void 0,t)}catch(t){ad.default.error("Failed to handle preprocessing before print.",t)}try{return await this.nextTick(),e(t)}finally{try{await this.dispatchEvent("afterPrint",void 0,t)}catch(t){ad.default.error("Failed to handle postprocessing after print.",t)}}}translate(t,e,n){let r=this.options.translate;return r?r(t,e,n):n||""}get(t){return sK.get(t)}fly(t,e){return sK.fly(t,e)}addHelper(t){return this.helpers.add(t),t}destroyHelper(t){t.destroy(),this.helpers.delete(t)}destroyHelpers(){for(let t of this.helpers)t.destroy();this.helpers.clear()}createFlushScheduler(t){return this.addHelper(new u1(this,t))}createWatcher(t,e,n){return this.addHelper(new dM(this,t,e,n))}initPlugins(t,e){e&&(t=t.map(t=>t.config(e[t.getGroupName()]).config(e[t.getName()])));let n=this.on;t.forEach(t=>{let e=t.getSubscriptions();e&&P(e,(e,r)=>{if(r in n)throw RangeError(`Plugin subscription \`${r}\` of plugin \`${t.getName()}\` conflicts.`);n[r]=e})}),t.forEach(t=>{this.attachPlugin(t)}),t.forEach(t=>{t.get(this)?.init()})}attachPlugin(t){let e=t.getName(),n=t.getGroupName();if(this.getPlugin(e)||n&&this.getPlugin(n))throw RangeError(`Plugin \`${e}\` or plugin group \`${n}\` has already been attached.`);let r=t.attach(this),i=this.plugin;return i[e]=r,n&&(i[n]=r),r}detachPlugin(t){t.detach(this);let e=t.getName(),n=t.getGroupName(),r=this.plugin;r[e]=void 0,n&&(r[n]=void 0)}destroyPlugins(){for(let t of Object.values(this.plugin))t&&t.destroy()}static mergePluginConfigs(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((t,e)=>t&&e?G(e,(t,e,n)=>{let r=t[n];return r?t[n]={...r,...e}:t[n]=e,t},{...t}):t?t:e?e:void 0,void 0)}static mergeConfigs(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce((t,e)=>{if(!e)return t;let n=this.mergePluginConfigs(t.pluginConfigs,e.pluginConfigs);return Object.assign(t,e),t.pluginConfigs=n,t},{})}};class dC extends ra{constructor(){super()}setPageSetup(t){this.set(dI,t)}getPageSetup(){return this.get(dI)}setPageSize(t){this.set(dP,t)}getPageSize(){return this.get(dP)}setPagePadding(t){this.set(dT,t)}getPagePadding(){return this.get(dT)}setPageContentSize(t){this.set(dk,t)}getPageContentSize(){return this.get(dk)}setPageDecorateHeight(t){this.set(dL,t)}getPageDecorateHeight(){return this.get(dL)}setCustomStyle(t,e){if(null==t)this.set(dD);else{let n=this.get(dD);n||this.set(dD,n=Object.create(null)),n[t]=e}}getCustomStyle(t){let e=this.get(dD);return e&&e[t]}}let dI=dC.registerIndex(),dP=dC.registerIndex(),dT=dC.registerIndex(),dk=dC.registerIndex(),dL=dC.registerIndex(),dD=dC.registerIndex();function dR(t){return parseFloat(t.toFixed(2))}class dN{static getPageSizeByType(t,e){let n,r=this.PAGE_SIZE_DEFINE[t];r||(r=this.PAGE_SIZE_DEFINE.a4);let i="landscape"!==e,a=i?this.page_size_portrait_cache:this.page_size_landscape_cache;return t in a?n=a[t]:(n={width:dR(np(r[+!i],"mm","px")),height:dR(np(r[+!!i],"mm","px"))},a[t]=n),n}static getPagePadding(t){return{top:dR(np(t.top,"cm","px")),bottom:dR(np(t.bottom,"cm","px")),left:dR(np(t.left,"cm","px")),right:dR(np(t.right,"cm","px"))}}static getPageContentSize(t,e){return{width:dR(t.width-e.left-e.right),height:dR(t.height-e.top-e.bottom)}}static getDecorateMaxHeight(t){return dR(.2*t.height)}static getDefaultPageSetup(){return{left:2.54,top:2.54,right:2.54,bottom:2.54,orientation:"portrait",page_type:"a4"}}}dN.PAGE_SIZE_DEFINE={letter:[216,279],tabloid:[279,432],legal:[216,356],statement:[140,216],executive:[184,267],folio:[216,330],a3:[297,420],a4:[210,297],a5:[148,210],b4:[250,353],b5:[176,250]},dN.page_size_portrait_cache=Object.create(null),dN.page_size_landscape_cache=Object.create(null);let dO=t=>{class e extends t{static getSelfPropertyName(){return"ContentEditable"}get canSelectionLeave(){return!1}get unbreakable(){return!0}hasVisibleContent(t){if(t.childCount>1)return!0;let e=t.firstChild;return!!(e&&(0!==e.childCount||!e.is("Paragraph")||e.is("BasicParagraph")&&e.type.isValidListBlock(e)))||!1}getIndicatorWrapperDOM(t){return t}renderAttrsDom(t,e,n){return super.renderAttrsDom(t,e,n),"clipboard"!==n.target&&Object.assign(t.inline_style||(t.inline_style=Object.create(null)),this.schema.getDefaultContentStyles()),t}toCopyDOM(t,e){return["div",{synoedit:!0},0]}}return tX(e,{get matchDOMTag(){return{"div[synoedit]":null}}}),e},dj=t=>class extends t{static getSelfPropertyName(){return"IndependentScroller"}getScrollerInfo(t){return null}},dE=(()=>{let t=["link","tracking"];return nH.createMarksNormalizer(e=>!t.includes(e._))})(),dV={textMarks:nH.create({optional:!0,empty_value:v,clearable:!0,normalizer:dE})},dB=Object.keys(dV),dz=nH.create({optional:!0,empty_value:0,normalizer:"nonNegativeNumber",clearable:!0}),dF={textAlign:nH.create({optional:!0,empty_value:"left",clearable:!0,normalizer:["left","right","center","justify"]}),lineHeight:nH.create({optional:!0,empty_value:1,clearable:!0,normalizer:"positiveNumber"}),paddingTop:dz,paddingBottom:dz},dG=nH.create({optional:!0,empty_value:0,clearable:!0,normalizer:"number"}),dH={indentFirst:dG,indentLeft:dG,indentRight:dG},dW=Object.keys(dH),dq=nH.create({deep:{pos:nH.create(),type:nH.create({normalizer:["left","right","center"]}),leader:nH.create({normalizer:["none","dot","hyphen","underscore","middleDot","heavy"]})}}),dU={tabStops:nH.createOptional({empty_value:v,clearable:!0,normalizer:nH.createArrayNormalizer(dq)})},dZ=Object.keys(dU),d$=t=>{class e extends t{constructor(...t){super(...t),this.defaultTabAttrs=null}static getSelfPropertyName(){return"TabBlock"}getTabAttrList(){return dZ}getDefaultTabAttrValues(){return this.defaultTabAttrs||(this.defaultTabAttrs=nH.emptyAttrs(V(this.attrs,this.getTabAttrList())))}getTabAttrValues(t){return t.getState("tab_attrs")||this.getDefaultTabAttrValues()}_getInheritedTabAttrValues(t){return t.getState("inherited_tab_attrs")}getInheritedTabAttrValues(t){return this._getInheritedTabAttrValues(t)||this.getDefaultTabAttrValues()}registerTabBlock(){let t=this.getStateMap();t.register(t.SELF_START,this.name,"merge_tab_attrs",null,t=>{if(t.getState("inherit")||t.getState("cached_attrs")!==t.attrs)return t.setState("tab_attrs",nH.mergeAttrs(this.getTabAttrList(),t.attrs,this.getInheritedTabAttrValues(t))),rg.STATE_REDRAW})}trimNode(t,e){let n;t=super.trimNode(t,e)||t;let r=this.getInheritedTabAttrValues(t);for(let e of this.getTabAttrList()){let i=t.getAttrValue(e,!0);null!=i&&("tabStops"===e?0===i.length&&0===r.tabStops.length:i===r[e])&&(n||(n=Object.create(null)),n[e]=null)}return n?t.duplicate(t.content,n):t}computeJsonConversionAttrs(t,e){let n=super.computeJsonConversionAttrs(t,e);return"clipboard"===e.target&&e.useComputedStyle?{...n,...this.getTabAttrValues(t)}:n}renderAttrsJson(t,e,n){super.renderAttrsJson(t,e,n);let r=e.getAttrValue("tabStops",!0);return r&&(t.tabStops=r),t}}let n=t.prototype.attrs;return tX(e,{get attrs(){return{...n,...dU}}}),e},dJ=t=>class extends t{static getSelfPropertyName(){return"DefaultParagraph"}};class dY extends rq{static getSelfPropertyName(){return"BasicRoot"}buildDefaultMarks(){let t=this.schema;return["font_size","font_family","em","strong","color"].reduce((e,n)=>{let r=t.markType(n).getDefaultMark();return r&&e.push(r),e},[])}buildDefaultStyles(){return{"line-height":dF.lineHeight.getEmptyValue(),"font-variant":"normal","font-stretch":"normal"}}createDefaultContentStyles(){return{...this.buildDefaultStyles(),...nK.setToStyle(this.buildDefaultMarks())}}}class dX extends rU{static getSelfPropertyName(){return"Settings"}get copyable(){return!1}get printable(){return!1}}function dQ(t){return"bullet"===t||t.startsWith("bullet_")}function dK(t){return"bullet_"+t}let d0=new Map([["●","disc"],["•","disc"],["○","circle"],["◦","circle"],["■","square"],["□","square"],["▪","square"],["▫","square"],["▼","disclosure-open"],["▽","disclosure-open"],["▾","disclosure-open"],["▿","disclosure-open"],["▶","disclosure-closed"],["▷","disclosure-closed"],["▸","disclosure-closed"],["▹","disclosure-closed"],["►","disclosure-closed"],["▻","disclosure-closed"]].map(t=>{let[e,n]=t;return[dK(e),n]})),d1=new Map([["decimal","decimal"],["decimalZero","decimal-leading-zero"],["lowerLetter","lower-alpha"],["upperLetter","upper-alpha"],["lowerRoman","lower-roman"],["upperRoman","upper-roman"],["chineseCounting","cjk-decimal"],["chineseCountingThousand","simp-chinese-informal"],["chineseLegalSimplified","simp-chinese-formal"],["ideographDigital","cjk-decimal"],["ideographLegalTraditional","trad-chinese-formal"],["taiwaneseCounting","cjk-decimal"],["taiwaneseCountingThousand","trad-chinese-informal"],["taiwaneseDigital","cjk-decimal"]]),d2=(()=>{let t=new Map;for(let e of["arabic-indic","armenian","upper-armenian","lower-armenian","bengali","cambodian","khmer","devanagari","georgian","gujarati","gurmukhi","hebrew","kannada","lao","malayalam","mongolian","myanmar","oriya","persian","lower-roman","upper-roman","tamil","telugu","thai","tibetan","lower-greek","hiragana","hiragana-iroha","katakana","katakana-iroha","cjk-earthly-branch","cjk-heavenly-stem","japanese-informal","japanese-formal","korean-hangul-formal","korean-hanja-informal","korean-hanja-formal"])t.set(e,"decimal");for(let[e,n]of d0)t.set(n,e);for(let[e,n]of d1)t.set(n,e);for(let[e,n]of[["disc",dK("●")],["circle",dK("○")],["square",dK("■")],["disclosure-open",dK("▾")],["disclosure-closed",dK("▸")],["cjk-decimal","ideographDigital"]])t.set(e,n);for(let[e,n]of[["lower-latin","lower-alpha"],["upper-latin","upper-alpha"],["cjk-ideographic","trad-chinese-informal"]]){let r=t.get(n);"string"==typeof r&&t.set(e,r)}return t})(),d5=new Map([["disc","●"],["circle","○"],["square","■"]].map(t=>{let[e,n]=t;return[e,dK(n)]})),d4=new Map([["a","lowerLetter"],["A","upperLetter"],["i","lowerRoman"],["I","upperRoman"],["1","decimal"]]),d8=/%(\d)/g,d3=(()=>{let t=Object.create(null);return["decimal","decimalZero","lowerLetter","upperLetter","lowerRoman","upperRoman"].forEach(e=>{t[e]="."}),["chineseCounting","chineseCountingThousand","chineseLegalSimplified","ideographDigital","ideographLegalTraditional","taiwaneseCounting","taiwaneseCountingThousand","taiwaneseDigital"].forEach(e=>{t[e]="、"}),t})();function d6(t,e){var n;let r;return r=t?dQ(t)?"":d3[t]??"":"",void 0===(n=e)&&(n=0),`%${tj(n+1,1,9)}`+r}(()=>{let t=Object.create(null);return["disc","circle","square","disclosure-open","disclosure-closed"].forEach(e=>{t[e]=""}),["cjk-decimal","simp-chinese-formal","simp-chinese-informal","trad-chinese-formal","trad-chinese-informal"].forEach(e=>{t[e]="、"})})();function d7(t,e){return dQ(t)?(dQ(t)?t.slice(7)||"●":null)||"":function(t,e){var n;let r=(n=t)in eN?eN[n]:null;if(r)return e<0||isNaN(e)?"":r.write(e)}(t,e)||""}function d9(t){return Array.isArray(t)?e=>t[e]||"":t}function pt(t){return t.forEach((t,e)=>{t.text&&(t.text=t.text.replace(d8,`%${e+1}`))}),t}function pe(t,e,n){let r=t.length,i=e?e.length:0,a=-1;return pt(Array.from({length:9},(s,o)=>{let l=Object.create(null),h=o%r;return i&&0===h&&(a=(a+1)%i),l.format=t[h],i&&(l.text=e[a]),n?.(l,o),l}))}let pn=(()=>{let t=pe(["decimal","decimal","upperLetter","lowerLetter"],["%1."],(t,e)=>{e%4==1&&(t.text="(%1)")}),e={default:void 0,decimalPeriod:pe(["decimal","lowerLetter","lowerRoman"],["%1."]),decimalParenthesis:pe(["decimal","lowerLetter","lowerRoman"],["%1)","(%1)","%1."]),decimalParentheses:pe(["decimal","lowerLetter","lowerRoman"],["(%1)","%1)","%1."]),decimalZeroPeriod:pe(["decimalZero","lowerLetter","lowerRoman"],["%1."],(t,e)=>{e&&e%3==0&&(t.format="decimal")}),upperLetterPeriod:pe(["upperLetter","lowerLetter","lowerRoman"],["%1."],(t,e)=>{e&&e%3==0&&(t.format="decimal")}),upperLetterParenthesis:pe(["upperLetter","lowerLetter","lowerRoman"],["%1)","(%1)","%1."],(t,e)=>{e&&e%3==0&&(t.format="decimal")}),upperLetterParentheses:pe(["upperLetter","lowerLetter","lowerRoman"],["(%1)","%1)","%1."],(t,e)=>{e&&e%3==0&&(t.format="decimal")}),lowerLetterPeriod:pe(["lowerLetter","lowerRoman","decimal"],["%1."]),lowerLetterParenthesis:pe(["lowerLetter","lowerRoman","decimal"],["%1)","(%1)","%1."]),lowerLetterParentheses:pe(["lowerLetter","lowerRoman","decimal"],["(%1)","%1)","%1."]),upperRomanPeriod:pe(["lowerRoman","lowerLetter","decimal"],["%1.","(%1)","%1)"],(t,e)=>{0===e?t.format="upperRoman":1===e&&(t.format="upperLetter")}),upperRomanParenthesis:pe(["lowerRoman","lowerLetter","decimal"],["%1.","(%1)","%1."],(t,e)=>{0===e?(t.format="upperRoman",t.text="%1)"):1===e&&(t.format="upperLetter")}),upperRomanParentheses:pe(["lowerRoman","lowerLetter","decimal"],["%1.","%1)","%1."],(t,e)=>{0===e?(t.format="upperRoman",t.text="(%1)"):1===e&&(t.format="upperLetter")}),decimalOutline:pe(["decimal"]).map((t,e)=>{let n="";for(let t=0;t<=e;++t)n+=`%${t+1}.`;return{...t,align:"right",text:n}}),taiwaneseCountingIdeographicComma:pt(t.map((t,e,n)=>0===e?{format:"taiwaneseCountingThousand",text:"%1、"}:1===e?{format:"taiwaneseCountingThousand",text:"(%1)"}:{...n[e-2]})),taiwaneseLegalCountingIdeographicComma:pt(t.map((t,e,n)=>0===e?{format:"ideographLegalTraditional",text:"%1、"}:1===e?{format:"taiwaneseCountingThousand",text:"%1、"}:2===e?{format:"taiwaneseCountingThousand",text:"(%1)"}:{...n[e-3]})),taiwaneseCountingPeriod:pt(t.map((t,e,n)=>0===e?{format:"taiwaneseCountingThousand",text:"%1."}:1===e?{format:"taiwaneseCountingThousand",text:"(%1)"}:{...n[e-2]})),taiwaneseCountingPresentationPeriod:pt(t.map((t,e,n)=>0===e?{format:"taiwaneseCountingThousand",text:"%1."}:{...n[e-1]})),taiwaneseLegalCountingPresentationPeriod:pt(t.map((t,e,n)=>0===e?{format:"ideographLegalTraditional",text:"%1."}:1===e?{format:"taiwaneseCountingThousand",text:"%1."}:{...n[e-2]})),chineseCountingIdeographicComma:pt(t.map((t,e,n)=>0===e?{format:"chineseCountingThousand",text:"%1、"}:1===e?{format:"chineseCountingThousand",text:"(%1)"}:{...n[e-2]})),chineseLegalCountingIdeographicComma:pt(t.map((t,e,n)=>0===e?{format:"chineseLegalSimplified",text:"%1、"}:1===e?{format:"chineseCountingThousand",text:"%1、"}:2===e?{format:"chineseCountingThousand",text:"(%1)"}:{...n[e-3]})),chineseCountingPeriod:pt(t.map((t,e,n)=>0===e?{format:"chineseCountingThousand",text:"%1."}:1===e?{format:"chineseCountingThousand",text:"(%1)"}:{...n[e-2]})),chineseCountingPresentationPeriod:pt(t.map((t,e,n)=>0===e?{format:"chineseCountingThousand",text:"%1."}:{...n[e-1]})),chineseLegalCountingPresentationPeriod:pt(t.map((t,e,n)=>0===e?{format:"chineseLegalSimplified",text:"%1."}:1===e?{format:"chineseCountingThousand",text:"%1."}:{...n[e-2]}))};return e.default=e.decimalPeriod,e})(),pr=(()=>{let t={default:void 0,bulletHollowSquare:pe(["bullet_●","bullet_○","bullet_■"],["%1"]),diamondxArrow3dSquare:pe(["bullet_❖","bullet_➢","bullet_■","bullet_●","bullet_◆","bullet_➢","bullet_■","bullet_●","bullet_◆"],["%1"]),arrowDiamondBullet:pe(["bullet_➔","bullet_◆","bullet_●"],["%1"],(t,e)=>{e&&e%3==0&&(t.format="bullet_○")}),starHollowSquare:pe(["bullet_★","bullet_○","bullet_■"],["%1"],(t,e)=>{e&&e%3==0&&(t.format="bullet_●")}),arrow3dHollowSquare:pe(["bullet_➢","bullet_○","bullet_■"],["%1"],(t,e)=>{e&&e%3==0&&(t.format="bullet_●")}),checkbox:pe(["bullet_❏"],["%1"]),plus:pe(["bullet_+"],["%1"]),minus:pe(["bullet_-"],["%1"])};return t.default=t.bulletHollowSquare,t})();function pi(t,e){return null==t&&null==e||null!=t&&null!=e&&z(t,(t,n)=>t===e[n])}class pa{constructor(){this.container=null}getNodeType(t){return""}_add(t,e){switch(t){case"container":return this.addContainer(e);case"wrapper":return this.addWrapper(e);case"list":return this.addList(e);default:return null}}add(t){this._add(this.getNodeType(t),t)}_remove(t,e){switch(t){case"container":return this.removeContainer(e);case"wrapper":return this.removeWrapper(e);case"list":return this.removeList(e);default:return null}}remove(t){this._remove(this.getNodeType(t),t)}createContainer(t){let e=Object.create(null);return{node:t,wrappers:[],map:e,has_list:!1,attrs:{listMap:e}}}getContainer(){return this.container}addContainer(t){return this.getContainer()?null:this.container=this.createContainer(t)}removeContainer(t){let e=this.getContainer();return e&&e.node===t?(this.container=null,e):null}createWrapper(t){return{node:t,lists:[]}}getWrapper(){let t=this.getContainer();return t&&t.wrappers[t.wrappers.length-1]}addWrapper(t){let e=this.getContainer()||this.addContainer(null),n=this.createWrapper(t);return e.wrappers.push(n),n}removeWrapper(t){let e=this.getWrapper();return e&&e.node===t?(this.getContainer().wrappers.length-=1,e):null}getListType(t){return""}createListConfig(t,e){return null}getList(){let t=this.getWrapper();return t&&t.lists[t.lists.length-1]}_createList(t,e,n,r){if(n||(n=J()),!r){let n,i=this.createListConfig(t,e),a=i?.format;r={type:a?dQ(a)?"ul":"ol":this.getListType(t),configs:[i]}}return{node:t,indent:0,level:e,id:n,attrs:{listId:n,listLevel:e},info:r}}createList(t,e,n){let r;if(!n)return this._createList(t,e);let i=n.info.configs,a=i[e],s=this.createListConfig(t,e);if(a&&!te(a,s,tn,void 0)){let a=i.slice(0,e);a.push(s),r=this._createList(t,e,null,Object.assign(Object.create(null),n.info,{configs:a}))}else a||i.push(s),r=this._createList(t,e,n.id,n.info);return r.indent+=n.indent,r}addList(t){let e=(this.getWrapper()||this.addWrapper(null)).lists,n=e.length;if(n>=9)return null;let r=this.createList(t,n,e[n-1]);return e.push(r),this.storeList(r),r}removeList(t){let e=this.getList();return e&&e.node===t?(this.getWrapper().lists.length-=1,e):null}storeList(t){let e=this.getContainer(),n=e.map,r=t.id;r in n||(n[r]=t.info,e.has_list=!0)}}let ps=(()=>{let t=["underline","link","tracking"];return nH.createMarksNormalizer(e=>!t.includes(e._))})(),po={start:nH.createOptional({empty_value:1,normalizer:t=>{let e=nH.getPresetNormalizer("integer")(t);return null==e?null:e>=0&&e<=9999?e:null}}),format:nH.createOptional({empty_value:`bullet_\u25CF`}),text:nH.createOptional({empty_value:"%1"}),align:nH.createOptional({empty_value:"left",normalizer:["left","right"]}),marks:nH.createOptional({empty_value:v,clearable:!0,normalizer:ps})},pl=Object.keys(po);function ph(t){let e=t.prototype;tl(e,"isListType",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("listConfigAttrs","listConfigAttrsList","defaultListConfigAttrs","defaultOrderedListConfigs","defaultBulletListConfigs"),e},!0),tl(e,"listMaxLevel",9),tl(e,"listConfigAttrs",po),tl(e,"listConfigAttrsList",pl),to(e,"defaultListConfigAttrs",function(){return nH.emptyAttrs(this.listConfigAttrs)}),to(e,"defaultOrderedListConfigs",function(){let t=this.defaultListConfigAttrs;return(pn.default||null).map((e,n)=>Object.assign(Object.create(null),t,e))}),to(e,"defaultBulletListConfigs",function(){let t=this.defaultListConfigAttrs;return(pr.default||null).map((e,n)=>Object.assign(Object.create(null),t,e))})}class pu extends rW{static getSelfPropertyName(){return"PseudoList"}parseAttrsFromJson(t,e,n){try{if(e.configs&&Array.isArray(e.configs))for(let t of e.configs)t&&Array.isArray(t.marks)&&(t.marks=nK.setToJSON(nK.setFromJSON(this.schema,t.marks)))}catch{e.configs=void 0}return super.parseAttrsFromJson(t,e,n)}renderAttrsDom(t,e,n){if(super.renderAttrsDom(t,e,n),"clipboard"===n.target){let i=n.list_level||0,a=e.getState("list_configs"),s=a?.[i];if(s){var r;"ol"===s.type&&Object.assign(t,{start:s.start+(n.list_index||0)}),Object.assign(t.inline_style||(t.inline_style=Object.create(null)),{"margin-top":"0px","margin-bottom":"0px","margin-left":0===i?a.list_indent+"px":null,"list-style-type":(r=s.format)?dQ(r)?d0.get(r)||"disc":d1.get(r)||"decimal":null})}}return t}renderAttrsJson(t,e,n){super.renderAttrsJson(t,e,n);let r=e.getState("list_configs");return r?Object.assign(t,{id:r.list_id,configs:r.map(t=>this.listConfigAttrsList.reduce((e,n)=>(e[n]=t[n],e),Object.create(null)))}):t}toDOM(t,e){let n=e.list_level||0,r=t.getState("list_configs")?.[n];return r?[r.type,this.renderAttrs(Object.create(null),t,e),0]:null}}ph(pu);let pc={listId:nH.createOptional(),listLevel:nH.createOptional({empty_value:0,normalizer:t=>{let e=nH.getPresetNormalizer("integer")(t);return null==e?null:tj(e,0,8)}}),listMarks:po.marks},pd=Object.keys(pc);function pp(t,e,n){return"ul"===t.type||e===n}function pg(t){let e;return e=t?{...po,marks:po.marks.copy({normalizer:t})}:po,t=>{let n,r;if(!t||!Array.isArray(t))return;let i=t.length;if(9!==i)if(0===i)return;else n=i>9?t.slice(0,9):Array.from({length:9},(e,n)=>t[n]??null);else n=t;return n.forEach((t,i)=>{let a=null==t?null:nH.normalizeAttrValues(e,t);a!==t&&(r||(r=n.slice()),r[i]=a)}),r??n}}let pf={type:nH.createOptional({empty_value:"ul",normalizer:["ul","ol"]}),indent:nH.createOptional({empty_value:0,normalizer:"number"}),configs:nH.createOptional({empty_value:v,normalizer:pg()})},py=Object.keys(pf);function px(t){let e;return e=t?{...pf,configs:pf.configs.copy({normalizer:pg(t)})}:pf,t=>{let n;if(t&&"object"==typeof t)return P(t,(r,i)=>{let a=null===r?null:nH.normalizeAttrValues(e,r),s=void 0===a;(s||r!==a)&&(n||(n=Object.assign(Object.create(null),t)),s?delete n[i]:n[i]=a)}),n??t}}let pm={listMap:nH.create({optional:!0,empty_value:m,hidden:!0,normalizer:px()})},pv=Object.keys(pm),pb=pl.filter(t=>"marks"!==t);function pw(t){if(!t.is("ContentEditable"))throw Error("Unable to mixin ListContainer to non-contentEditable.");let e=t.prototype;tl(e,"isListContainer",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("listContainerAttrs","listContainerAttrsList","defaultListContainerAttrs","listInfoAttrs","listInfoAttrsList","defaultListInfoAttrs"),e},!0),tl(e,"listContainerAttrs",pm),tl(e,"listContainerAttrsList",pv),to(e,"defaultListContainerAttrs",function(){return nH.emptyAttrs(this.listContainerAttrs)}),tl(e,"listInfoAttrs",pf),tl(e,"listInfoAttrsList",py),to(e,"defaultListInfoAttrs",function(){return nH.emptyAttrs(this.listInfoAttrs)}),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.listContainerAttrs)},!0),th(e,"_getInheritedOrderedListConfigs",function(t){return t.state.inherited_ol_configs},!1,"has"),th(e,"getInheritedOrderedListConfigs",function(t){return this._getInheritedOrderedListConfigs(t)||this.defaultOrderedListConfigs},!1,"has"),th(e,"_getInheritedBulletListConfigs",function(t){return t.state.inherited_ul_configs},!1,"has"),th(e,"getInheritedBulletListConfigs",function(t){return this._getInheritedBulletListConfigs(t)||this.defaultBulletListConfigs},!1,"has"),th(e,"getInheritedListConfigs",function(t,e){return"ol"===e?this.getInheritedOrderedListConfigs(t):this.getInheritedBulletListConfigs(t)},!1,"has"),th(e,"getInheritedListConfigAttrs",function(t,e,n){return this.getInheritedListConfigs(t,e)[n]},!1,"has"),th(e,"registerListContainer",function(){let t=this.getStateMap();t.register(t.UPDATE_START,this.name,"set_list_info",null,(t,e)=>{let n,r=!1;if(t.getStateRank()<rg.STATE_SCAN){let e=!1;t.descendants(t=>{let n=t.getStateRank();return n>=rg.STATE_SCAN?(r=!0,!0):t.type.isTextblock?(n===rg.STATE_PASSING&&(e=!0),!1):void 0},{skipInlineContent:!0}),e||(r=!0)}else r=!0;if(!r)return;let i=t.state.list_map;return i&&t.getStateRank()<rg.STATE_SCAN?P(n=i,function(t,e){t.forEach(t=>{t.dirty=!1,t.index=t.start})}):P(n=F(t.getAttrValue("listMap"),(e,n)=>(function(t,e,n){n||(n=m);let r=n.type||t.type.defaultListInfoAttrs.type,i=n.indent||t.type.defaultListInfoAttrs.indent,a=n.configs||t.type.defaultListInfoAttrs.configs,s=t.type.getInheritedListConfigs(t,r),o=Array(9);for(let t=0;t<9;++t)o[t]=function(t,e,n,r){return(r=Object.assign(Object.create(null),n,r,{marks:nK.mergeSetJSON(n.marks,r&&r.marks)})).level=e,r.dirty=!1,r.index=r.start,r.type=dQ(r.format)?"ul":"ol",r.depends=(function(t){let e=t.match(d8);return e?e.map(t=>parseInt(t.slice(1),10)):[]})(r.text).reduce((t,n)=>(--n>=0&&n<e&&t.push(n),t),[]),r}(0,t,s[t],a[t]);return o.list_id=e,o.list_type=r,o.list_indent=i,o})(t,n,e)),function(e,n){!function(t,e,n){for(let r=0;r<9;++r){let i,a=e[r];if(a.depends&&a.depends.some(t=>e[t].dirty))i=!0;else if(n)i=!te(n[r],a,tn,["format","text","align","marks"]);else i=!0;a.dirty=i,a.marks_instance=i?t.type.schema.marksFromJSON(a.marks):n[r].marks_instance}}(t,e,i&&i[n])}),t.state.list_map=n,e.pushListMap(n),rg.STATE_SCAN}),t.register(t.UPDATE_END,this.name,"clear_list_info",null,(t,e)=>{e.popListMap()})}),th(e,"computeJsonConversionAttrs",function(t,e,n){let r=t.call(this,e,n);return"clipboard"===n.target&&n.useComputedStyle&&e.getAttrValue("listMap",!0)&&(r===e.attrs&&(r=Object.assign(Object.create(null),r)),r.listMap=F(e.state.list_map,t=>({indent:t.list_indent,configs:t.map(t=>pl.reduce((e,n)=>(e[n]=t[n],e),Object.create(null)))}))),r},!0),th(e,"trimNode",function(t,e,n){let r,i=(e=t.call(this,e,n)||e).getAttrValue("listMap",!0);if(!i)return e;let a=["ol","ul"].reduce((t,n)=>(t[n]=this.getInheritedListConfigs(e,n),t),Object.create(null));return P(i,(t,e)=>{let n;if(!t)return;let{type:s,indent:o,configs:l}=t,h=a[s]||a[this.defaultListInfoAttrs.type];if(null!=o&&o===h.list_indent&&(n||(n=Object.assign(Object.create(null),t)),delete n.indent),null!=l){let e;for(let t=0;t<9;++t){let n,r=l[t];if(!r)continue;let i=h[t];for(let t=pb.length-1;t>=0;--t){let e=pb[t],a=r[e];null!=a&&a===i[e]&&(n||(n=Object.assign(Object.create(null),r)),delete n[e])}let a=nK.trimSetJSON(r.marks,i.marks);a&&(n||(n=Object.assign(Object.create(null),r)),n.marks=a),n&&(e||(e=l.slice()),e[t]=n)}e&&(n||(n=Object.assign(Object.create(null),t)),n.configs=e)}n&&(r||(r=Object.assign(Object.create(null),i)),r[e]=n)}),r&&(e=e.duplicate(e.content,{listMap:r})),e},!0),th(e,"parseAttrsFromParser",function(t,e,n,r){t.call(this,e,n,r);let i=n.getParser("list");if(!i)return e;let a=i.getContainer();return a&&Object.assign(e,{...a.attrs,listMap:{...e.listMap,...a.attrs.listMap}}),e},!0),ph(t)}class pM extends rW{static getSelfPropertyName(){return"PseudoListItem"}parseAttrsFromJson(t,e,n){try{e.listMarks&&Array.isArray(e.listMarks)&&(e.listMarks=nK.setToJSON(nK.setFromJSON(this.schema,e.listMarks)))}catch{e.listMarks=void 0}return super.parseAttrsFromJson(t,e,n)}parseAttrsFromParser(t,e,n){super.parseAttrsFromParser(t,e,n);let r=e.getMarks(),i=this.schema.maybeMarkType("link");return i&&(r=i.removeLinkMarks(r)),r.length&&(t.listMarks=nK.mergeSetJSON(t.listMarks,nK.setToJSON(r))),t}renderAttrsJson(t,e,n){super.renderAttrsJson(t,e,n);let r=e.listMarksJSON;return r.length&&(t.listMarks=r),t}}ph(pM);let p_=Object.assign(Object.create(null),{ul:"list",ol:"list",li:"item"});class pA extends pa{getNodeType(t){if(t.nodeType!==t.ELEMENT_NODE)return null;let e=p_[t.nodeName.toLowerCase()];return e||("true"===t.getAttribute("synoedit")?"container":null)}_add(t,e){return"item"===t?this.addItem(e):(t&&this.consumeItem(),super._add(...arguments))}_remove(t,e){return"item"===t?this.removeItem(e):super._remove(...arguments)}getListType(t){return t.tagName.toLowerCase()}createListConfig(t,e){let n=this._createListConfig(t,e);for(let r=t.firstChild;r;r=r.nextSibling)if("item"===this.getNodeType(r)){Object.assign(n,this._createListConfig(r,e));break}return n}_createListConfig(t,e){let n=Object.create(null);return this.fillListConfigFormat(n,t,e),this.fillListConfigStart(n,t,e),n}fillListConfigFormat(t,e,n){var r;let i=(r=e.style.listStyleType)&&d2.get(r)||null||function(t){let e=t.tagName;if("OL"===e||"UL"===e){let n=t.getAttribute("type");return"OL"===e?n&&d4.get(n)||"decimal":n&&d5.get(n)||dK("●")}return null}(e);return i&&(t.format=i,t.text=d6(i,n)),t}fillListConfigStart(t,e,n){let r=e.getAttribute("item"===this.getNodeType(e)?"value":"start");return r&&(isNaN(r=parseInt(r,10))||1===r||(t.start=r)),t}_createList(t,e,n,r){return Object.assign(super._createList(...arguments),{item:null})}createList(t,e,n){let r=this.type.getPseudoListType().parseAttrs(t,Object.assign(Object.create(null),this.parser.options,{list_level:e})),i=r.id;return i&&Array.isArray(r.configs)?(this.parsedIds[i]=!0,delete r.id,this._createList(t,e,i,r)):super.createList(...arguments)}createItem(t){return{node:t,marker:!0,attrs:this.type.getPseudoListItemType().parseAttrs(t,this.parser.options)}}getItem(){let t=this.getList();return t&&t.item}addItem(t){let e=this.getList();return!e||e.item?null:e.item=this.createItem(t)}removeItem(t){let e=this.getItem();return e&&e.node===t&&(this.getList().item=null),e}consumeItem(){let t=this.getItem();return!!t&&!!t.marker&&(t.marker=!1,!0)}}function pS(t){return!!t.type.isListBlock&&null!=t.getAttrValue("listId",!0)}function pC(t){return pS(t)?t.getAttrValue("listId"):null}function pI(t,e){let n=function(t,e){let n=t.parent;if(pS(n))return{type:0,node:n};let r=null,i=0;if(n.type.isTextblock?(e<0?t.atStart:t.atEnd)&&(r=t.node(-1),i=t.index(-1)+e):(r=n,i=t.index()+(e<0?-1:0)),r){let t=r.maybeChild(i);if(t&&pS(t))return{type:1,node:t}}return null}(t,e);if(!n)return null;let{type:r,node:i}=n;return{type:r,listId:i.getAttrValue("listId"),listLevel:i.getAttrValue("listLevel"),listMarks:i.getAttrValue("listMarks")}}class pP extends pA{static #t=this.parserName="list";constructor(t){super(),this.type=t,this.parser=null,this.parsedIds=Object.create(null),this.currentListMap=null,this.listContextBefore=null,this.listContextAfter=null}getParseOptions(){let t=this.parser;return t?t.options:Object.create(null)}getParsedIds(){return this.parsedIds}init(t,e,n){this.parser=t;let r=n.currentListMap||null;if(!r){for(let e=t.top;e;e=e.prev)if(e.type.isListContainer){r=e.attrs.listMap||null;break}}this.currentListMap=r,e&&(e.self&&e.self.isTextblock&&(e=e.extend(0)),this.listContextBefore=pI(e,-1),this.listContextAfter=pI(e,1))}finish(t,e){return t=this.adaptList(t,e),t=this.changeListId(t,e)}finishCustom(){let t=this.getContainer();return{listMap:t&&t.map&&!j(t.map)?t.map:null}}overrideListId(t,e,n,r){let i=e.self;if(!i)return t;let a=pC(i);if(!a)return t;let s=9;t.descendants(t=>{pC(t)===a&&(s=Math.min(s,t.getAttrValue("listLevel")))},{skipInlineContent:!0});let{listId:o,listLevel:l}=n;return t.mapDescendants(t=>{if(t.type.isListContainer){let e=t.getAttrValue("listMap");a in e&&(e=Object.assign(Object.create(null),e),delete e[a],t=t.copyWithAttrs({listMap:e}))}else pC(t)===a&&(t=t.copyWithAttrs({listId:o,listLevel:l+t.getAttrValue("listLevel")-s,indentFirst:null,indentLeft:null}));return t},{skipInlineContent:!0})}applyContinuousList(t,e,n,r){let{listId:i,listLevel:a,listMarks:s}=n,o=e.parent,l=e.index(),h=r?o.childCount:-1,u=r?1:-1,c=o.childs();for(let t=l;t!==h;t+=u){let e=o.child(t);if(!e.type.isListBlock)break;c[t]=e.copyWithAttrs({listId:i,listLevel:a,listMarks:s,indentFirst:null,indentLeft:null})}let d=o.copyWithContent(c);return t===o?d:t.mapDescendants(t=>t===o?d:t,{skipInlineContent:!0})}adaptListContext(t,e,n,r){let i=e.self;if(!i||!i.type.isListBlock)return null;let a=i.getAttrValue("listId")||"";return 1!==n.type||a?a?this.overrideListId(t,e,n,r):this.applyContinuousList(t,e,n,r):null}adaptList(t,e){let{listContextBefore:n,listContextAfter:r}=this;if(!n&&!r)return t;let i=null,a=null;if(t.descendants((t,n,r,s)=>{if(!t.type.isListBlock||n<e)return;let o={node:t,pos:n,parent:s,id:t.getAttrValue("listId")||""};i||(i=o),a=o},{skipInlineContent:!0}),!i||!a)return t;if(n){let e=this.adaptListContext(t,i.$pos||t.resolve(i.pos),n,!0);if(e)if(t=e,i===a)a=null;else{let e=t.resolve(a.pos);e.self&&pC(e.self)===a.id?a.$pos=e:a=null}}return r&&a&&(t=this.adaptListContext(t,a.$pos||t.resolve(a.pos),r,!1)||t),t}changeListId(t,e){let n=this.getContainer();if(!n)return t;let r=this.getParsedIds(),i=this.currentListMap;if(i&&(r=function(t,e,n){let r=Object.create(null);return P(t,(t,n,i)=>{e.call(void 0,t,n,i)&&(r[n]=t)}),r}(r,(t,e)=>void 0===i[e])),j(r))return t;let a=F(r,(t,e)=>J()),s=n.map;return Object.entries(s).forEach(t=>{let[e,n]=t;e in a&&(s[a[e]]=n,delete s[e])}),t.mapDescendants(t=>{if(t.type.isListContainer){let e=!1,n=G(t.getAttrValue("listMap"),(t,n,r)=>{let i;return r in a?(i=a[r],e=!0):i=r,t[i]=n,t},Object.create(null));e&&(t=t.copyWithAttrs({listMap:n}))}else if(pS(t)){let e=t.getAttrValue("listId");e&&e in a&&(t=t.copyWithAttrs({listId:a[e]}))}return t},{skipInlineContent:!0})}}class pT extends oW{static checkNode(t){return super.checkNode(t)&&t.type.isListContainer}}class pk extends pT{applyListMap(t,e){return e}applyAtPos(t,e){let{doc:n,pos:r,self:i}=t,a=this.applyListMap(t,i.getAttrValue("listMap",!0));return!1===a?n:n.replace(r,r+i.nodeSize,rr.from(i.duplicate(i.content,{listMap:a})),rg.STATE_SCAN)}doCreatePosMap(t){return null}}class pL extends pk{constructor(t,e){super(t),this.infos=e}applyListMap(t,e){e=Object.assign(Object.create(null),e);let n=!1;return P(this.infos,(t,r)=>{void 0!==t&&void 0===e[r]&&(e[r]=t,n=!0)}),!!n&&e}doInvert(t){return null}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.infos)}static fromJSON(t,e){return new this(e.pos,e.infos)}}oH.jsonID("addListMap",pL);class pD extends pk{constructor(){super(),delete this.pos}applyListMap(t,e){if(!e)return!1;let n=Object.create(null);return t.self.descendants(t=>{if(!t.type.isListBlock)return;let r=t.getAttrValue("listId");if(r&&!(r in n)&&Object.prototype.hasOwnProperty.call(e,r)){let t=e[r];void 0!==t&&(n[r]=t)}},{skipInlineContent:!0}),!te(e,n,tn,void 0)&&n}doApply(t,e){let n=[];t.descendants((t,e)=>{if(t.type.isListContainer)return n.push(e),!1});for(let r=n.length-1;r>=0;--r)t=this.applyAtPos(t.resolve(n[r]),e);return t}doInvert(t){return null}doMap(t){return this}static fromJSON(t,e){return new this}}oH.jsonID("trimListMap",pD);class pR extends pk{constructor(t,e){super(t),this.id=e}applyListAttrs(t,e){}applyListMap(t,e){e=Object.assign(Object.create(null),e);let n=this.id;return e[n]=this.applyListAttrs(t,e[n])||null,e}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.id)}static fromJSON(t,e){return new this(e.pos,e.id)}}class pN extends pR{constructor(t,e,n){super(t,e),this.attrs=n}applyListAttrs(t,e){return nH.copyAttrs(t.self.type.listInfoAttrs,e,this.attrs)}invertAtPos(t){let{pos:e,self:n}=t,{id:r,attrs:i}=this;return new this.constructor(e,r,nH.invertAttrs(n.type.listInfoAttrs,n.getAttrValue("listMap")[r],i))}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.id,this.attrs)}static fromJSON(t,e){return new this(e.pos,e.id,e.attrs)}}oH.jsonID("setListInfo",pN);class pO extends pR{constructor(t,e,n){super(t,e),this.configs=n}applyListAttrs(t,e){let{configs:n}=this,r=e&&e.configs;r=r?r.slice():[];let i=t.self.type.listConfigAttrs;for(let t=0;t<9;++t)n[t]&&(r[t]=nH.copyAttrs(i,r[t],n[t]));return Object.assign(Object.create(null),e,{configs:r})}invertAtPos(t){let{pos:e,self:n}=t,{id:r,configs:i}=this,a=n.getAttrValue("listMap")[r],s=a&&a.configs,o=n.type.listConfigAttrs;return new this.constructor(e,r,i.map((t,e)=>nH.invertAttrs(o,s&&s[e],t)))}doMap(t){let e=this.mapPos(t);return null==e?null:new this.constructor(e,this.id,this.configs)}static fromJSON(t,e){return new this(e.pos,e.id,e.configs)}}function pj(t,e){let n=t.doc.resolve(e).self;if(!pk.checkNode(n))throw RangeError(`Invalid node at pos ${e}.`);return n}oH.jsonID("setListConfigs",pO),Object.assign(oZ.prototype,{trimListMap(){return this.step(new pD(...arguments))},addListMap(t,e){let n=pj(this,t);return P(e,(t,e)=>{if(t?!nH.checkAttrs(n.type.listInfoAttrs,t):null!==t)throw RangeError(`Invalid list info ${JSON.stringify(t)}.`)}),this.step(new pL(...arguments))},addListInfo(t,e,n){return e in pj(this,t).state.list_map?this.setListInfo(t,e,n):this.addListMap(t,{[e]:n})},setListInfo(t,e,n){let r=pj(this,t);if(!n||!nH.checkAttrs(r.type.listInfoAttrs,n))throw RangeError(`Invalid list info ${JSON.stringify(n)}.`);return this.step(new pN(...arguments))},setListConfigs(t,e,n){let r=pj(this,t);if(n.length>9)throw RangeError(`Invalid list configs length ${n.length}.`);return n.forEach((t,e)=>{if(!nH.checkAttrs(r.type.listConfigAttrs,t))throw RangeError(`Invalid list config ${JSON.stringify(t)} at level ${e}.`)}),this.step(new pO(...arguments))},setListConfig(t,e,n,r){if(n<0||n>=9)throw RangeError(`Invalid list level ${n}.`);if(!r)throw RangeError(`Invalid list config ${JSON.stringify(r)}.`);let i=Array(n);return i.push(r),this.setListConfigs(t,e,i)}});class pE extends d$(rX){static getSelfPropertyName(){return"BasicParagraph"}getTopPaddingHeight(t){return this.getCssAttrs(t).paddingTop}getBottomPaddingHeight(t){return this.getCssAttrs(t).paddingBottom}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();this.registerMarksBlock(),this.registerCssBlock(),this.registerIndentBlock(),this.registerTabBlock(),this.registerListBlock(),t.reorder(t.SELF_START,this.name,"set_text_rect_info")}_toChildContainerDOM(t,e){return["span",null,0]}renderBlockStructure(t,e){return["div",this.renderAttrs(Object.create(null),t,e),this._toChildContainerDOM(t,e)]}renderTag(t,e){return"p"}toCopyDOM(t,e){let n=this.renderTag(t,e),r=this.renderAttrs(Object.create(null),t,e),i=[n,r,0];if(null==t.getAttrValue("listId"))return i;{let n=r.inline_style,a={"padding-top":"0px","padding-bottom":"0px","margin-top":"0px","margin-bottom":"0px"};return["padding-left","padding-right","margin-left","margin-right"].forEach(t=>{a[t]=n[t],n[t]="0px"}),["li",this.getPseudoListItemType().renderAttrs({inline_style:a},t,e),i]}}}!function(t){let e=t.prototype;if(!e.isTextblock)throw Error("Unable to mixin MarksBlock to non-Textblock.");tl(e,"isMarksBlock",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("marksAttrs","marksAttrsList","defaultMarksAttrs"),e},!0),tl(e,"marksAttrs",dV),tl(e,"marksAttrsList",dB),to(e,"defaultMarksAttrs",function(){return nH.emptyAttrs(this.marksAttrs)}),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.marksAttrs)},!0),th(e,"_getInheritedTextMarksJSON",function(t){return t.state.inherited_text_marks_json},!1,"has"),th(e,"getInheritedTextMarksJSON",function(t){return this._getInheritedTextMarksJSON(t)||nK.none},!1,"has"),th(e,"_getInheritedTextMarks",function(t){return t.state.inherited_text_marks},!1,"has"),th(e,"getInheritedTextMarks",function(t){return this._getInheritedTextMarks(t)||nK.none},!1,"has"),th(e,"mergeTextMarks",function(t){let e=t.state;if(e.inherit||e.cached_attrs!==t.attrs)return e.text_marks_json=nK.mergeSetJSON(this.getInheritedTextMarksJSON(t),t.textMarksRawJSON),e.text_marks=nK.mergeSet(this.getInheritedTextMarks(t),t.textMarksRaw),rg.STATE_REDRAW},!1,"has"),th(e,"registerMarksBlock",function(){let t=this.getStateMap();t.register(t.SELF_START,this.name,"merge_text_marks",null,this.mergeTextMarks.bind(this))}),th(e,"computeJsonConversionAttrs",function(t,e,n){let r=t.call(this,e,n),{target:i,useComputedStyle:a,markFilter:s}=n;if("clipboard"===i&&a&&(r={...r,textMarks:e.textMarksJSON}),s&&r.textMarks?.length){let t=r.textMarks.filter(s);t.length!==r.textMarks.length&&(r={...r,textMarks:t})}return r},!0),th(e,"trimNode",function(t,e,n){e=t.call(this,e,n)||e;let r=nK.trimSetJSON(e.textMarksRawJSON,this.getInheritedTextMarksJSON(e));return r&&(e=e.duplicate(e.content,{textMarks:r})),e},!0),th(e,"parseAttrsFromJson",function(t,e,n,r){try{n.textMarks&&Array.isArray(n.textMarks)&&(n.textMarks=nK.setToJSON(nK.setFromJSON(this.schema,n.textMarks)))}catch{n.textMarks=void 0}return t.call(this,e,n,r)},!0),th(e,"parseAttrsFromParser",function(t,e,n,r){t.call(this,e,n,r);let i=n.getMarks(),a=this.schema.maybeMarkType("link");return a&&(i=a.removeLinkMarks(i)),i.length&&(e.textMarks=nK.mergeSetJSON(e.textMarks,nK.setToJSON(i))),e},!0),th(e,"renderAttrsDom",function(t,e,n,r){return t.call(this,e,n,r),e},!0),th(e,"renderAttrsJson",function(t,e,n,r){t.call(this,e,n,r);let i=n.textMarksJSON;return i.length&&(e.textMarks=i),e},!0)}(pE),function(t){let e=t.prototype;if(!e.isTextblock)throw Error("Unable to mixin CssBlock to non-Textblock.");tl(e,"isCssBlock",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("cssAttrs","defaultCssAttrs"),e},!0),tl(e,"cssAttrs",dF),to(e,"defaultCssAttrs",function(){return nH.emptyAttrs(this.cssAttrs)}),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.cssAttrs)},!0),th(e,"getCssAttrList",function(){return this.cssAttrList||(this.cssAttrList=Object.keys(this.cssAttrs))},!1,"has"),th(e,"getCssAttrs",function(t){return t.state.css_attrs||this.defaultCssAttrs},!1,"has"),th(e,"getBlockMarks",function(t){let e=t.schema,{textAlign:n,lineHeight:r}=this.getCssAttrs(t);return nK.setFrom([e.attrMarkType("text_align").create({value:n}),e.attrMarkType("line_height").create({value:r})])},!1,"has"),th(e,"_getInheritedCssAttrs",function(t){return t.state.inherited_css_attrs},!1,"has"),th(e,"getInheritedCssAttrs",function(t){return this._getInheritedCssAttrs(t)||this.defaultCssAttrs},!1,"has"),th(e,"mergeCssAttrs",function(t){let e=t.state;if(e.inherit||e.cached_attrs!==t.attrs)return e.css_attrs=nH.mergeAttrs(this.getCssAttrList(),t.attrs,this.getInheritedCssAttrs(t)),rg.STATE_REDRAW},!1,"has"),th(e,"registerCssBlock",function(){let t=this.getStateMap();t.register(t.SELF_START,this.name,"merge_css_attrs",null,this.mergeCssAttrs.bind(this))}),th(e,"computeJsonConversionAttrs",function(t,e,n){let r=t.call(this,e,n);return"clipboard"===n.target&&n.useComputedStyle?(r===e.attrs&&(r=Object.assign(Object.create(null),r)),Object.assign(r,this.getCssAttrs(e))):r},!0),th(e,"trimNode",function(t,e,n){let r,i=(e=t.call(this,e,n)||e).attrs,a=this.getInheritedCssAttrs(e),s=this.getCssAttrList();for(let t=s.length-1;t>=0;--t){let e=s[t],n=i[e];null!=n&&n===a[e]&&(r||(r=Object.create(null)),r[e]=null)}return r?e.duplicate(e.content,r):e},!0),th(e,"parseAttrsFromDom",function(t,e,n,r){function i(t){var e;return e=n.style[t],ng(e,"px",void 0)||0}t.call(this,e,n,r);let a=i("marginTop")+i("paddingTop"),s=i("marginBottom")+i("paddingBottom");return a&&(e.paddingTop=(e.paddingTop||0)+a),s&&(e.paddingBottom=(e.paddingBottom||0)+s),e},!0),th(e,"parseAttrsFromParser",function(t,e,n,r){t.call(this,e,n,r);let i=n.getMarkValue("text_align");i&&(e.textAlign=i);let a=n.getMarkValue("line_height");return a&&(e.lineHeight=a),e},!0),th(e,"renderAttrsDom",function(t,e,n,r){t.call(this,e,n,r);let i=e.inline_style||(e.inline_style=Object.create(null)),a=this.getCssAttrs(n);function s(t,e){i[t]=(parseFloat(i[t])||0)+e+"px"}return i["text-align"]=a.textAlign,i["line-height"]=1.2*a.lineHeight,s("padding-top",a.paddingTop),s("padding-bottom",a.paddingBottom),i["margin-top"]="0px",i["margin-bottom"]="0px",e},!0)}(pE),function(t){let e=t.prototype;if(!e.isTextblock)throw Error("Unable to mixin IndentBlock to non-Textblock.");tl(e,"isIndentBlock",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("baseIndent","indentAttrs","indentAttrsList","defaultIndentAttrs"),e},!0),tl(e,"baseIndent",30),tl(e,"indentAttrs",dH),tl(e,"indentAttrsList",dW),to(e,"defaultIndentAttrs",function(){return nH.emptyAttrs(this.indentAttrs)}),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.indentAttrs)},!0),th(e,"getIndentAttrs",function(t){return t.state.indent_attrs||this.defaultIndentAttrs},!1,"has"),th(e,"_getInheritedIndentAttrs",function(t){return t.state.inherited_indent_attrs},!1,"has"),th(e,"getInheritedIndentAttrs",function(t){return this._getInheritedIndentAttrs(t)||this.defaultIndentAttrs},!1,"has"),th(e,"mergeIndentAttrs",function(t){let e=t.state;if(e.inherit||e.cached_attrs!==t.attrs)return e.indent_attrs=nH.mergeAttrs(this.indentAttrsList,t.attrs,this.getInheritedIndentAttrs(t)),rg.STATE_REDRAW},!1,"has"),th(e,"registerIndentBlock",function(){let t=this.getStateMap();t.register(t.SELF_START,this.name,"merge_indent_attrs",null,this.mergeIndentAttrs.bind(this))}),th(e,"computeJsonConversionAttrs",function(t,e,n){let r=t.call(this,e,n);return"clipboard"===n.target&&n.useComputedStyle?(r===e.attrs&&(r=Object.assign(Object.create(null),r)),Object.assign(r,this.getIndentAttrs(e))):r},!0),th(e,"trimNode",function(t,e,n){let r,i=(e=t.call(this,e,n)||e).attrs,a=this.getInheritedIndentAttrs(e),s=this.indentAttrsList;for(let t=s.length-1;t>=0;--t){let e=s[t],n=i[e];null!=n&&n===a[e]&&(r||(r=Object.create(null)),r[e]=null)}return r?e.duplicate(e.content,r):e},!0),th(e,"getTextRectInfo",function(t,e,n){let r=t.call(this,e,n),{indentLeft:i,indentRight:a}=this.getIndentAttrs(e);return i||a?{left:r.left+i,width:r.width-i-a}:r},!0),th(e,"getFirstTextRectInfo",function(t,e){let n=t.state.text_rect_info,r=this.getIndentAttrs(t),i=r.indentFirst-r.indentLeft;return i?{left:n.left+i,width:n.width-i}:n}),th(e,"setStateTextRectInfo",function(t,e,n){let r=t.call(this,e,n);return e.state.first_text_rect_info=this.getFirstTextRectInfo(e,n),r},!0),th(e,"parseAttrsFromDom",function(t,e,n,r){function i(t){var e;return e=n.style[t],ng(e,"px",void 0)||0}t.call(this,e,n,r);let a=i("marginLeft")+i("paddingLeft"),s=i("marginRight")+i("paddingRight");return a&&(e.indentFirst=(e.indentFirst||0)+a,e.indentLeft=(e.indentLeft||0)+a),s&&(e.indentRight=(e.indentRight||0)+s),e},!0),th(e,"parseAttrsFromParser",function(t,e,n,r){t.call(this,e,n,r);let i=n.getMarkValue("text_indent");return i&&(e.indentFirst=(e.indentFirst||0)+i),e},!0),th(e,"renderAttrsDom",function(t,e,n,r){if(t.call(this,e,n,r),"clipboard"===r.target){let t=e.inline_style||(e.inline_style=Object.create(null)),{indentFirst:r,indentLeft:i,indentRight:a}=this.getIndentAttrs(n),s=function(e,n){t[e]=(parseFloat(t[e])||0)+n+"px"},o=r-i;s("margin-left",Math.min(r,i)),s("padding-left",Math.max(-o,0)),s("text-indent",o),s("margin-right",a)}return e},!0)}(pE),function(t){let e=t.prototype;if(!e.isIndentBlock||!e.isMarksBlock)throw Error("Unable to mixin ListBlock to non-IndentBlock or non-MarksBlock.");tl(e,"isListBlock",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("listAttrs","listAttrsList","defaultListAttrs"),e},!0),tl(e,"listAttrs",pc),tl(e,"listAttrsList",pd),to(e,"defaultListAttrs",function(){return nH.emptyAttrs(this.listAttrs)}),tl(e,"listItemPadding",2),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.listAttrs)},!0),th(e,"_getInheritedListMarksJSON",function(t){let e=t.state.list_config;return e&&e.marks},!1,"has"),th(e,"getInheritedListMarksJSON",function(t){return this._getInheritedListMarksJSON(t)||nK.none},!1,"has"),th(e,"_getInheritedListMarks",function(t){let e=t.state.list_config;return e&&e.marks_instance},!1,"has"),th(e,"getInheritedListMarks",function(t){return this._getInheritedListMarks(t)||nK.none},!1,"has"),th(e,"mergeListMarks",function(t){let e=t.state;if(e.list_config){let n=t.getAttrValue("listMarks");e.list_marks_json=nK.mergeSetJSON(this.getInheritedListMarksJSON(t),n),e.list_marks=nK.mergeSet(this.getInheritedListMarks(t),this.schema.marksFromJSON(n))}else e.list_marks_json=nK.none,e.list_marks=nK.none;return rg.STATE_REDRAW},!1,"has"),ts(e,"registerListBlock",function(){let t=this.getStateMap();t.register(t.UPDATE_START,this.name,"set_list_info",null,(t,e)=>{if(!e.getListMap())return;let n=t.getAttrValue("listId"),r=n&&e.getListConfigs(n),i=t.state.list_configs;if(!r&&!i)return;let a=t.getAttrValue("listLevel"),s=t.state.list_path,o=r&&function(t,e){let n=[];for(let r=0;r<e;++r){let e=t[r];e.index===e.start&&++e.index,n.push(e.index-1)}n.push(t[e].index++);for(let n=t.length-1;n>e;--n){let e=t[n];e.index=e.start}return n}(r,a);if(Object.assign(t.state,r?{list_configs:r,list_path:o,list_config:r[a],list_index:o[a],list_head:0===a&&r[a].start===o[a]}:{list_configs:null,list_path:null,list_config:null,list_index:null,list_head:null}),!(t.getStateRank()<rg.STATE_UPDATE&&i&&r&&function(t,e,n,r,i){if(t.list_id!==e.list_id||t.list_type!==e.list_type||t.list_indent!==e.list_indent)return!1;let a=e[i];if(a.dirty||!pp(a,n[i],r[i]))return!1;let s=a.depends;return!(s&&s.some(t=>!pp(e[t],n[t],r[t])))}(i,r,s,o,a)))return rg.STATE_REDRAW}),t.register(t.SELF_START,this.name,"merge_list_marks",null,this.mergeListMarks.bind(this))}),th(e,"getTextRectInfo",function(t,e,n){let r=t.call(this,e,n),i=e.state.list_configs;if(!i)return r;{let t=this.baseIndent*(e.getAttrValue("listLevel")+1)+i.list_indent;return{left:r.left+t,width:r.width-t}}},!0),th(e,"getFirstTextRectInfo",function(t,e,n){let r=t.call(this,e,n);if(!e.state.list_configs)return r;{let t=this.baseIndent;return{left:r.left-t,width:r.width+t}}},!0),th(e,"computeJsonConversionAttrs",function(t,e,n){let r=t.call(this,e,n),{target:i,useComputedStyle:a,markFilter:s}=n;if("clipboard"===i&&a&&(r={...r,listMarks:e.listMarksJSON}),s&&r.listMarks?.length){let t=r.listMarks.filter(s);t.length!==r.listMarks.length&&(r={...r,listMarks:t})}return r},!0),th(e,"trimNode",function(t,e,n){e=t.call(this,e,n)||e;let r=nK.trimSetJSON(e.listMarksRawJSON,this.getInheritedListMarksJSON(e));return r&&(e=e.duplicate(e.content,{listMarks:r})),e},!0),th(e,"parseAttrsFromParser",function(t,e,n,r){t.call(this,e,n,r);let i=n.getParser("list");if(!i)return e;let a=i.getList();if(a){let t=a.item;if(t){let{indentFirst:n,indentLeft:i,indentRight:a}=this.parseAttrsFromDom(Object.create(null),t.node,r);n&&(e.indentFirst=(e.indentFirst||0)+n),i&&(e.indentLeft=(e.indentLeft||0)+i),a&&(e.indentRight=(e.indentRight||0)+a)}let n=a.indent;if(n&&(e.indentFirst=(e.indentFirst||0)+n,e.indentLeft=(e.indentLeft||0)+n),i.consumeItem())Object.assign(e,a.attrs,t.attrs);else{let t=this.baseIndent*(a.level+1);e.indentFirst=(e.indentFirst||0)+t,e.indentLeft=(e.indentLeft||0)+t}}return e},!0),th(e,"getListText",function(t){let e=t.getState("list_config"),n=t.getState("list_configs"),r=t.getState("list_path");return e&&n&&r?function(t,e){let n=d9(e);return t.replace(d8,(t,e)=>"0"===e?"":n(Number(e)-1))}(e.text,t=>{let e=r[t];return null!=e?d7(n[t].format,e):""}):""}),th(e,"getPseudoListType",function(){return pu.prototype}),th(e,"getPseudoListItemType",function(){return this.schema.nodeType("pseudo_list_item")}),th(e,"isValidListBlock",function(t){return!!(t.getAttrValue("listId")&&t.state.list_config)}),ph(t)}(pE);let pV=[9,9,11,12,14,18,24,36],pB=F({1:0,2:2,3:3,4:4,5:5,6:6,7:7},t=>pV[t]),pz=F({"xx-small":0,"x-small":1,small:2,medium:3,large:4,"x-large":5,"xx-large":6},t=>pV[t]);function pF(t){return"string"!=typeof t?null:nw(t)||null}let pG=new Map([["helvetica","Arial"]]);function pH(t){return{value:t,eastAsia:t,complexScript:t}}let pW=RegExp(function(){let t,e,n;for(var r,i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=es(...a),t="",e="",r.forEach(n=>{let[r,i]=n;if(t5(r))r===i?t+=`${ei(r)}`:t+=`${ei(r)}-${ei(i)}`;else{let t=String.fromCodePoint(r),n=t.charCodeAt(0),a=t.charCodeAt(1),s=String.fromCodePoint(i),o=s.charCodeAt(0),l=s.charCodeAt(1);e&&(e+="|"),r===i?e+=`${ei(n)}${ei(a)}`:n===o?e+=`${ei(n)}[${ei(a)}-${ei(l)}]`:(e+=`${ei(n)}[${ei(a)}-${ei(57343)}]`,n+1<=o-1&&(e+=`|[${ei(n+1)}-${ei(o-1)}][${ei(56320)}-${ei(57343)}]`),e+=`|${ei(o)}[${ei(56320)}-${ei(l)}]`)}}),n="",t&&(n+=`[${t}]`),e&&(n&&(n+="|"),n+=`${e}`),`(${n})`}("asciiTabNewline"),"g");function pq(t){return!(t=t.trim().replace(pW,""))||t.startsWith("javascript:")?"":t.startsWith("#")||/^(?:(?:https?|s?ftp):\/\/|mailto:)/i.test(t)?t:`http://${t}`}function pU(t){let e=nm(t,{disableTransparent:!0});return!!e&&{value:e}}let pZ={baseline:"base",middle:"base","text-top":"base","text-bottom":"base",super:"super",top:"super",sub:"sub",bottom:"sub"};class p$ extends r3{static getSelfPropertyName(){return"Script"}get fontSizeRatio(){return .8}get cssName(){return"vertical-align"}get cssValue(){return this.scriptType}get cssDefaultValue(){return"baseline"}get matchDOMTag(){return{[this.scriptType]:null}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>{if("TD"===e.tagName)return!1;let r=pZ[t];return!!r&&(r===this.scriptType?null:{value:!1})}}}toDOM(t,e){return["span",{inline_style:{"vertical-align":this.scriptType,"font-size":"clipboard"!==e.target?100*this.fontSizeRatio+"%":void 0}}]}}class pJ extends r3{static getSelfPropertyName(){return"TextDecoration"}get cssType(){return"append"}get cssName(){return"text-decoration-line"}get cssValue(){return this.decorationType}get cssDefaultValue(){return"none"}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>"none"===t?{value:!1}:!!t.split(" ").includes(this.decorationType)&&null}}}function pY(t,e){return e.parser?.getMarkValue("direction")||null}let pX={name:"",version:0,nodes:{paragraph:{type:pE,content:"inline<_>*"},text:{type:class extends rQ{static getSelfPropertyName(){return"Text"}get isText(){return!0}get Node(){return rB}_create(t,e,n){if("string"!=typeof e)throw Error("Invalid fragment content for a text node.");return new rB(this,t,e,nK.setFrom(n))}createComputed(t,e,n){return this._create(this.computeAttrs(t),"string"!=typeof e?"":e,n)}maybeCreateChecked(t,e,n){return"string"==typeof e&&e?this._create(this.computeAttrs(t),e,n):null}maybeCreateFilled(t,e,n){return"string"!=typeof e?null:this._create(this.computeAttrs(t),e||" ",n)}toDOM(t,e){let n=t.text;return"clipboard"===e.target?["span",{inline_style:{"white-space":"pre-wrap"}},n]:["span",this.renderAttrs(null,t,e),n]}}},hard_break:{type:class extends rK{static getSelfPropertyName(){return"HardBreak"}getAltText(t){return"\n"}get matchDOMTag(){return{br:null}}toDOM(t,e){return["span",{linebreak:"true",synobr:"true"},["br"]]}}},tab:{type:class extends rK{static getSelfPropertyName(){return"Tab"}getAltText(t){return"	"}get matchDOMTag(){return{'span[data-syno-schema="tab"]':(t,e)=>this.parseDOM(t,e)}}toDOM(t,e){let n=e.target;return["span",this.renderAttrs({"data-syno-schema":"clipboard"===n?"tab":void 0,inline_style:{display:"inline-block",...nK.setToStyle(t.marks.filter(t=>t.is("TextDecoration")))}},t,e),"clipboard"===n?" ".repeat(4):void 0]}}},table:{type:uM,content:"table_row+"},table_row:{type:class extends rZ{get isTableRow(){return!0}get unbreakable(){return!0}get hasCss(){return!0}get attrs(){return{parsed_empty:nH.create({optional:!0,empty_value:!1}),height:new nH({default:22,normalizer:"number"})}}registerSelfLocalAttrsUpdateMap(t){t.register(t.UPDATE_START,this.name,"init_table_col_index",null,(t,e)=>{e.setTableColIndex(-1)}),t.register(t.BEFORE_CHILD,this.name,"increase_table_col_index",null,(t,e,n)=>{n.setTableColIndex(n.getTableColIndex()+1)}),t.register(t.UPDATE_END,this.name,"clear_table_col_index",null,(t,e)=>{e.setTableColIndex()}),t.register(t.UPDATE_START,this.name,"update_table_row_info",null,(t,e)=>{let n=e.getTableUpdateInfoMap();if(!n)return;let r=n.getRow(e.getTableRowIndex());if(!r.dirty)return;let i=t.state;return(i.border=r.border,t.getStateRank()<rg.STATE_UPDATE&&i.row_index===r.row_index&&i.cell_count===t.childCount)?(t.forEach(function(t){t.setMinStateRank(rg.STATE_PASSING)}),rg.STATE_PASSING):(i.row_index=r.row_index,i.cell_count=t.childCount,rg.STATE_UPDATE)})}get matchDOMTag(){return{tr:(t,e)=>Object.assign(this.parseAttrs(t,e),{height:uo(t),parsed_empty:!t.querySelector("td")||null})}}toDOM(t,e){return["tr",this.renderAttrs({inline_style:{height:`${t.attrs.height}px`}},t,e),0]}},content:"table_cell+"},table_cell:{type:class extends rZ{get isTableCell(){return!0}get selectable(){return!0}get unbreakable(){return!0}get hasCss(){return!0}get attrs(){let t=nH.create({default:1,empty_value:1,normalizer:t=>{let e=nH.getPresetNormalizer("integer")(t);if(null!=e&&!(e<=0))return e}}),e={verticalAlign:nH.createOptional({empty_value:"middle",normalizer:["top","middle","bottom"]}),backgroundColor:nH.createOptional({empty_value:"transparent"}),rowspan:t,colspan:t},n=nH.create({default:1,empty_value:1,normalizer:ui}),r=nH.create({default:"solid",empty_value:"solid"}),i=nH.create({default:"#7b8187",empty_value:"#7b8187"});return["Left","Top","Right","Bottom"].forEach(t=>{let a=`border${t}`;e[a+"Width"]=n,e[a+"Style"]=r,e[a+"Color"]=i}),e.codeBlock=nH.create({optional:!0}),e}getLeftPaddingWidth(t){return 6+t.state.border.left.width/2}getRightPaddingWidth(t){return 6+t.state.border.right.width/2}getTopPaddingHeight(t){return t.state.border.top.width/2}getBottomPaddingHeight(t){return t.state.border.bottom.width/2}getCustomizeColors(t){let e=[];return["borderLeftColor","borderTopColor","borderRightColor","borderBottomColor","backgroundColor"].forEach(n=>{t.attrs[n]&&e.push(t.attrs[n])}),e}getTextRectInfo(t,e){let n=t.type.getLeftPaddingWidth(t),r=t.type.getRightPaddingWidth(t),i=super.getTextRectInfo(t,e),a=t.state;return{left:i.left+a.left+n,width:a.width-n-r}}registerSelfLocalAttrsUpdateMap(t){t.register(t.UPDATE_START,this.name,"update_table_cell_info",null,(t,e)=>{let n=e.getTableUpdateInfoMap();if(!n)return;let r=n.getCell(e.getTableRowIndex(),e.getTableColIndex());if(!r.dirty)return;let i=t.state,a=i.hidden!==r.hidden||i.view_rowspan!==r.view_rowspan||i.view_colspan!==r.view_colspan||i.left!==r.left||i.width!==r.width||!I(i.border,r.border);if(i.row_index=r.row_index,i.col_index=r.col_index,i.display=r.display,i.hidden=r.hidden,i.view_rowspan=r.view_rowspan,i.view_colspan=r.view_colspan,i.covered_idx=r.covered_idx,i.left=r.left,i.width=r.width,i.border=r.border,a)return rg.STATE_REDRAW}),t.reorder(t.SELF_START,this.name,"set_text_rect_info")}getContentDOM(t){return t.firstChild}getIndicatorWrapperDOM(t){return this.getContentDOM(t)}get matchDOMTag(){return{"td,th":(t,e)=>this.parseDOM(t,e)}}parseAttrsFromDom(t,e,n){return super.parseAttrsFromDom(...arguments),Object.assign(t,{rowspan:parseInt(e.getAttribute("rowspan"),10)||1,colspan:parseInt(e.getAttribute("colspan"),10)||1,verticalAlign:uv(e.style.verticalAlign),backgroundColor:nm(e.style.backgroundColor)}),["Left","Top","Right","Bottom"].forEach(n=>{let r=`border${n}`;t[r+"Width"]=ua(e.style[r+"Width"]),t[r+"Style"]=nb(e.style[r+"Style"]),t[r+"Color"]=nm(e.style[r+"Color"])}),t}parseAttrsFromParser(t,e,n){let r=e.getMarkValue("background_color",!0);return!t.backgroundColor&&r&&(t.backgroundColor=r),t}renderAttrsJson(t,e,n){super.renderAttrsJson(t,e,n);let r=e.getAttrValue("codeBlock");return r&&(t.codeBlock=r),t}toDOM(t,e){let n=t.state;if("clipboard"===e.target&&n.hidden)return null;let r={display:n.hidden?"none":"table-cell",verticalAlign:t.getAttrValue("verticalAlign"),backgroundColor:t.getAttrValue("backgroundColor")},i=n.border;return i?P(i,function(t,e){let n="border"+iI(e);r[n+"Width"]=t.width+"px",r[n+"Style"]=t.style,r[n+"Color"]=t.color}):["Left","top","Right","Bottom"].forEach(function(e){let n="border"+e;r[n+"Width"]=t.getAttrValue(n+"Width")+"px",r[n+"Style"]=t.getAttrValue(n+"Style"),r[n+"Color"]=t.getAttrValue(n+"Color")}),["td",this.renderAttrs({rowspan:n.view_rowspan||1,colspan:n.view_colspan||1,inline_style:r},t,e),["div",{class:this.className+"-content"},["div",{class:this.className+"-content-container"},0]]]}},content:"basic_block block*"},text_line:{type:class extends rZ{get isLine(){return!0}get isPseudoType(){return!0}getLocationDOM(t){return t.firstChild}getContentDOM(t){return this.getLocationDOM(t).firstChild}getIndicatorWrapperDOM(t){return this.getLocationDOM(t)}toRenderDOM(t,e){let n=this.classPrefix+"line";return["div",{class:n},["div",{class:n+"-location"},["div",{class:n+"-content"},["span",0]]]]}},content:"inline<_>*"},table_parser:{type:class extends rU{static getSelfPropertyName(){return"TableParser"}},content:"basic_block* table basic_block*"},pseudo_list_item:{type:pM}},groups:{basic_block:["paragraph"],block:["paragraph","table"],inline:["text","hard_break","tab"]},marks:[["font_size",class extends r8{static getSelfPropertyName(){return"FontSize"}get cssName(){return"font-size"}get cssDefaultValue(){return"11pt"}get attrs(){return{value:nH.create({default:11,empty_value:11,normalizer:t=>{let e=nH.getPresetNormalizer("positiveNumber")(t);if(null!=e)return Math.round(e)}})}}getCssValue(t){return t.getValue()+"pt"}getFontSizeByLevel(t){return pV[t]}get matchDOMTag(){return{"font[size]":(t,e)=>{let n,r=t.getAttribute("size");if(!r||isNaN(n="+"===r[0]||"-"===r[0]?3+parseInt(r,10):parseInt(r,10)))return!1;let i=pB[n=tj(n,1,7)];return!!i&&{value:i}}}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>{let r;return!!(r=t in pz?pz[t]:"larger"===t||"smaller"===t?"larger"===t?14:9:ng(t,"pt",11))&&{value:r}}}}}],["font_family",class extends r8{static getSelfPropertyName(){return"FontFamily"}get cssName(){return"font-family"}get cssDefaultValue(){return"Arial"}get supportMerge(){return!0}get attrs(){let t=nH.createOptional({empty_value:this.cssDefaultValue,normalizer:pF});return{value:t,eastAsia:t,complexScript:t,hint:nH.createOptional({empty_value:"default",normalizer:["default","eastAsia","complexScript"]})}}getCssValue(t){return this.ensureFontFamilyCssValue(t.getValue())}merge(t,e){let n={};for(let r of this.getAttrKeys()){let i=e.getAttrValue(r,!0)??t.getAttrValue(r,!0);null!=i&&(n[r]=i)}return dw(t.attrs,n)?t:this.create(n)}split(t,e){let n={},r=!1;for(let i of this.getAttrKeys()){let a=t.getAttrValue(i,!0);null!=a&&e.getAttrValue(i,!0)!==a&&(n[i]=a,r=!0)}return r?dw(t.attrs,n)?t:this.create(n):null}intersect(t,e){let n={},r=!1;for(let i of this.getAttrKeys()){let a=t.getAttrValue(i,!0);null!=a&&e.getAttrValue(i,!0)===a&&(n[i]=a,r=!0)}return r?dw(t.attrs,n)?t:this.create(n):null}ensureFontFamilyCssValue(t){let e=pG.get(t.toLowerCase());return e?`"${t}","${e}"`:`"${t}"`}readFontFamily(t,e){var n;let r="",i=e.parser?.getCustomParser("font");if(i){let e=nM(t);r=e.find(t=>i.isSupported(t))||e[0]||""}else r=n_(t);return(n=r,no.includes(n.toLowerCase()))?"":r}get matchDOMTag(){return{"font[face]":(t,e)=>{let n=t.getAttribute("face");if(!n)return!1;let r=this.readFontFamily(n,e);return!!r&&pH(r)}}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>{if(!(t=this.readFontFamily(t,n)))return!1;let r=e.getAttribute("data-syno-attrs"),i=r&&nV(r);return i&&(t===i.value||t===i.eastAsia||t===i.complexScript)?i:pH(t)}}}toDOM(t,e){return["span",{"data-syno-attrs":"clipboard"===e.target?nE(function(t){let e={};for(let n of t.type.getAttrKeys()){let r=t.getAttrValue(n);null!=r&&(e[n]=r)}return e}(t)):void 0,inline_style:{[this.cssName]:this.getCssValue(t)}}]}}],["em",class extends r3{static getSelfPropertyName(){return"Em"}get cssName(){return"font-style"}get cssValue(){return"italic"}get cssDefaultValue(){return"normal"}get matchDOMTag(){return{i:null,em:null}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>"italic"===t||t.startsWith("oblique")?null:"normal"===t&&{value:!1}}}toDOM(t,e){return["span",{inline_style:{"font-style":"italic"}}]}}],["strong",class extends r3{static getSelfPropertyName(){return"Strong"}get cssName(){return"font-weight"}get cssValue(){return"bold"}get cssDefaultValue(){return"normal"}get matchDOMTag(){return{b:null,strong:null}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>{let r=parseInt(t,10);return isNaN(r)?"bold"===t||"bolder"===t?null:("normal"===t||"lighter"===t)&&{value:!1}:r>=500?null:{value:!1}}}}toDOM(t,e){return["span",{inline_style:{"font-weight":700}}]}}],["link",class extends r5{static getSelfPropertyName(){return"Link"}get clearable(){return!1}get supportTextblock(){return!1}get supportListBlock(){return!1}get inclusiveBefore(){return!1}get valueKey(){return"href"}get linkColor(){return"#0F7BE9"}get linkUnderline(){return!0}get attrs(){return{href:nH.create({normalizer:t=>"string"!=typeof t?"":pq(t)})}}sanitizeLink(t){return pq(t)}getLinkStyleMarks(){return this.linkStyleMarksCache??=nK.setFrom([this.schema.mark("color",{value:this.linkColor}),this.schema.mark("underline",{value:this.linkUnderline})])}removeLinkMarks(t,e){void 0===e&&(e=!1);let n=this.removeFromSet(t);if(t.length!==n.length)if(e)for(let t of this.getLinkStyleMarks())n=t.removeFromSet(n);else n=this.schema.markType("color").removeFromSet(n),n=this.schema.markType("underline").removeFromSet(n);return n}get matchDOMTag(){return{"a[href]":(t,e)=>{let n=pq(t.getAttribute("synohref")||t.getAttribute("href")||"");if(!n)return!1;let r=e.parser;return r&&r.addMarks(this.getLinkStyleMarks()),{href:n}}}}toDOM(t,e){let n={class:this.className},r=t.getValue();if(r){let t=e.target;"viewer"===t||"clipboard"===t?(n.href=r,r.startsWith("#")||(n.target="_blank",n.rel="noreferrer noopener")):n.synohref=r}return["a",n]}constructor(...t){super(...t),this.linkStyleMarksCache=null}}],["color",class extends r8{static getSelfPropertyName(){return"Color"}get cssName(){return"color"}get cssDefaultValue(){return"#000000"}get attrs(){return{value:new nH({default:"",empty_value:this.cssDefaultValue})}}getCssValue(t){return t.getValue()}get matchDOMTag(){return{"font[color]":(t,e)=>{let n=t.getAttribute("color");return!!n&&pU(n)}}}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>pU(t)}}}],["background_color",class extends r8{static getSelfPropertyName(){return"BackgroundColor"}get cssName(){return"background-color"}get cssDefaultValue(){return"transparent"}get attrs(){return{value:new nH({default:"",empty_value:this.cssDefaultValue})}}getCssValue(t){return t.getValue()}get matchDOMStyle(){return{[this.cssName]:(t,e,n)=>(function(t){let e=nm(t);return!!e&&{value:e}})(t)}}}],["superscript",class extends p${static getSelfPropertyName(){return"Superscript"}get scriptType(){return"super"}get matchDOMTag(){return{sup:null}}}],["subscript",class extends p${static getSelfPropertyName(){return"Subscript"}get scriptType(){return"sub"}}],["underline",class extends pJ{static getSelfPropertyName(){return"Underline"}get supportListBlock(){return!1}get decorationType(){return"underline"}get matchDOMTag(){return{u:null}}toDOM(t,e){return["u"]}}],["strike",class extends pJ{static getSelfPropertyName(){return"Strike"}get decorationType(){return"line-through"}get matchDOMTag(){return{s:null,strike:null}}toDOM(t,e){return["s"]}}]],attr_marks:[["direction",class extends r4{static getSelfPropertyName(){return"Direction"}get attrs(){return{value:new nH({optional:!0,empty_value:"ltr"})}}get matchDOMStyle(){return{direction:(t,e,n)=>({value:t})}}}],["text_align",class extends r4{static getSelfPropertyName(){return"TextAlign"}get attrs(){return{value:new nH({optional:!0,empty_value:"left"})}}get matchDOMStyle(){return{"text-align":(t,e,n)=>{let r;if("left"===t||"right"===t)r=t;else if(t.includes("center"))r="center";else if(t.includes("justify"))r="justify";else if("start"===t||"end"===t)r="start"===t==("rtl"===(e.style.direction||pY(e,n)))?"right":"left";else{if(!t.includes("match-parent"))return!1;r="rtl"===pY(e,n)?"right":"left"}return{value:r}}}}}],["line_height",class extends r4{static getSelfPropertyName(){return"LineHeight"}get attrs(){return{value:new nH({optional:!0,empty_value:1})}}get matchDOMStyle(){return{"line-height":(t,e,n)=>{let r=ng(t,"");return!!r&&{value:r/1.2}}}}}],["text_indent",class extends r4{static getSelfPropertyName(){return"TextIndent"}get attrs(){return{value:new nH({optional:!0,empty_value:0})}}get matchDOMStyle(){return{"text-indent":(t,e,n)=>{let r=ng(t,"px");return!!r&&{value:r}}}}}]],parsers:{[pP.parserName]:t=>new pP(t.nodeType("paragraph"))}},pQ={angle:nH.createOptional({empty_value:0,normalizer:"integer"}),fileId:nH.createOptional({empty_value:""}),imageWidth:nH.createOptional({empty_value:0}),imageHeight:nH.createOptional({empty_value:0}),faded:nH.createOptional({empty_value:!1}),scale:nH.createOptional({empty_value:0}),content:nH.createOptional({empty_value:""}),opacity:nH.createOptional({empty_value:1,normalizer:"betweenZeroOneNumber"}),fontFamily:nH.createOptional({empty_value:"Arial",normalizer:pF}),fontSize:nH.createOptional({empty_value:0}),color:nH.createOptional({empty_value:"#000000"})},pK={type:nH.createOptional({empty_value:"none"}),config:nH.createOptional({deep:pQ})},p0=nH.createOptional({deep:pK}),p1=nH.createOptional({deep:{watermark:p0}});class p2 extends rF{createGlobalState(){return new dC}}let p5=/^h[1-6]$/i,p4=Array.from({length:7},(t,e)=>{let n=e-1;return{id:n>=0?`_heading${n}`:null,level:n,tag:n>=0?`h${n}`:"p"}}),p8=[24,20,16,12,11,11],p3=[20,13,10,9,0,0].map(t=>np(t,"pt","px")),p6=[6,4,3,3,0,0].map(t=>np(t,"pt","px")),p7={headingId:nH.create({optional:!0,copyable:0,copyTransformer:()=>J()}),headingLevel:nH.create({optional:!0,empty_value:0,normalizer:t=>{let e=nH.getPresetNormalizer("integer")(t);return null==e?null:tj(e,0,5)}})},p9=Object.keys(p7);class gt{constructor(){this.headingIdSet=null,this.doc=null}init(t,e){e&&(this.doc=e.doc)}add(t){if(!p5.test(t.tagName))return;let e=t.getAttribute("synohead")||"",n=this.ensureValidId(e);e!==n&&t.setAttribute("synohead",n)}buildIdSet(){let t=new Set,e=this.doc;return e&&e.descendants(e=>{if(!e.type.isHeadingBlock)return;let n=e.getAttrValue("headingId");n&&t.add(n)}),t}getIdSet(){return this.headingIdSet||(this.headingIdSet=this.buildIdSet())}ensureValidId(t){let e=this.getIdSet();return(!t||e.has(t))&&(t=J()),e.add(t),t}}class ge extends pE{static getSelfPropertyName(){return"DocumentBaseParagraph"}get cssAttrs(){return{...super.cssAttrs,backgroundColor:nH.createOptional({empty_value:"transparent"})}}getCustomizeColors(t){return t.getAttrValue("backgroundColor",!0)}parseAttrsFromParser(t,e,n){super.parseAttrsFromParser(t,e,n);let r=e.getMarkValue("background_color",!0);return r&&(t.backgroundColor=r),t}renderAttrsDom(t,e,n){super.renderAttrsDom(t,e,n);let r=t.inline_style||(t.inline_style=Object.create(null)),i=this.getCssAttrs(e);return r["background-color"]=i.backgroundColor,t}}!function(t){let e=t.prototype;if(!e.isCssBlock||!e.isMarksBlock)throw Error("Unable to mixin HeadingBlock to non-CssBlock or non-MarksBlock.");tl(e,"isHeadingBlock",!0),th(e,"getFreezeList",function(t){let e=t.call(this);return e.push("headingMaxLevel","headingFontSizeMap","headingPaddingTopMap","headingPaddingBottomMap","defaultHeadingCssAttrsMap","defaultHeadingTextMarksMap","defaultHeadingTextMarksJsonMap","headingAttrs","headingAttrsList","defaultHeadingAttrs"),e},!0),tl(e,"headingMaxLevel",6),tl(e,"headingConfigs",p4),tl(e,"headingFontSizeMap",p8),tl(e,"headingPaddingTopMap",p3),tl(e,"headingPaddingBottomMap",p6),to(e,"defaultHeadingCssAttrsMap",function(){let t=Array(6);for(let e=0;e<6;++e)t[e]=Object.assign(Object.create(null),this.defaultCssAttrs,{paddingTop:this.headingPaddingTopMap[e],paddingBottom:this.headingPaddingBottomMap[e]});return t}),to(e,"defaultHeadingTextMarksMap",function(){let t=this.schema.markType("font_size");return this.headingFontSizeMap.map(e=>[t.create({value:e})])}),to(e,"defaultHeadingTextMarksJsonMap",function(){return this.defaultHeadingTextMarksMap.map(t=>t.map(t=>t.toJSON()))}),tl(e,"headingAttrs",p7),tl(e,"headingAttrsList",p9),to(e,"defaultHeadingAttrs",function(){return nH.emptyAttrs(this.headingAttrs)}),to(e,"attrs",function(t){return nH.mergeTypeAttrs(t.call(this),this.headingAttrs)},!0),th(e,"getInheritedCssAttrs",function(t){return this._getInheritedCssAttrs(t)||(t.getAttrValue("headingId")?this.defaultHeadingCssAttrsMap[t.getAttrValue("headingLevel")]:null)||this.defaultCssAttrs}),th(e,"getInheritedTextMarks",function(t){return this._getInheritedTextMarks(t)||(t.getAttrValue("headingId")?this.defaultHeadingTextMarksMap[t.getAttrValue("headingLevel")]:null)||nK.none}),th(e,"getInheritedTextMarksJSON",function(t){return this._getInheritedTextMarksJSON(t)||(t.getAttrValue("headingId")?this.defaultHeadingTextMarksJsonMap[t.getAttrValue("headingLevel")]:null)||nK.none}),th(e,"mergeListMarks",function(t){let e=t.state;if(e.list_config){let n=t.getAttrValue("listMarks");e.list_marks_json=nK.mergeSetJSON(this.getInheritedTextMarksJSON(t),this.getInheritedListMarksJSON(t),n),e.list_marks=nK.mergeSet(this.getInheritedTextMarks(t),this.getInheritedListMarks(t),this.schema.marksFromJSON(n))}else e.list_marks_json=nK.none,e.list_marks=nK.none;return rg.STATE_REDRAW}),th(e,"parseAttrsFromDom",function(t,e,n,r){t.call(this,e,n,r);let i=n.tagName;return i&&p5.test(i)&&Object.assign(e,{headingId:n.getAttribute("synohead")||J(),headingLevel:parseInt(i[1],10)-1}),e},!0),th(e,"renderTag",function(t,e,n){return e.getAttrValue("headingId")?"h"+(e.getAttrValue("headingLevel")+1):t.call(this,e,n)},!0),th(e,"renderAttrsDom",function(t,e,n,r){return t.call(this,e,n,r),e.synohead=n.getAttrValue("headingId"),e},!0),th(e,"hasHeading",function(t){return!!t.getAttrValue("headingId")})}(ge);class gn extends dO(rU){get isStyleEditor(){return!0}get printable(){return!1}get Node(){return gr}registerSelfLocalAttrsUpdateMap(t){t.register(t.INHERITED_START,this.name,"force_scan_edit_area",null,(t,e)=>{if(t.getStateRank()>=rg.STATE_PASSING){let t=e.getRootNode();return rg.markInheritNodesPath(t.childs(),t.queryChildOffset("style_editor",!0)+1)}}),t.register(t.SELF_START,this.name,"set_text_rect_info",null,t=>{t.state.text_rect_info={width:1e4,left:0}})}get matchDOMTag(){return{"div[data-syno-style-editor]":null}}toDOM(t,e){return["div",this.renderAttrs({"data-syno-style-editor":!0,inline_style:{display:"none"}},t,e),0]}}class gr extends rV{getStyleParagraphIdx(t){return t<0?0:t<gi.prototype.headingMaxLevel?t+1:NaN}getStyleParagraphNode(t){let e=this.getStyleParagraphIdx(t);return isNaN(e)?null:this.child(e)}getStyleParagraphOffset(t){let e=this.getStyleParagraphIdx(t);return isNaN(e)?NaN:this.offsetAt(e)}getStyleParagraphData(t){let e=this.getStyleParagraphIdx(t);return isNaN(e)?null:{node:this.child(e),offset:this.offsetAt(e)}}}class gi extends dJ(ge){get isStyleParagraph(){return!0}registerSelfLocalAttrsUpdateMap(t){t.register(t.SELF_END,this.name,"set_paragraph_style",null,(t,e)=>{e.setCustomStyle(t.getAttrValue("headingId")?t.getAttrValue("headingLevel"):-1,{marks_json:t.textMarksJSON,marks:t.textMarks,css:this.getCssAttrs(t),tab:this.getTabAttrValues(t)})})}get matchDOMTag(){return{"div[data-syno-style-paragraph]":(t,e)=>this.parseDOM(t,e)}}parseAttrsFromDom(t,e,n){super.parseAttrsFromDom(...arguments);let r=parseInt(e.getAttribute("data-syno-style-paragraph"),10);return r&&r>=1&&r<=6&&Object.assign(t,{headingId:p4[r].id,headingLevel:r-1}),t}renderAttrsDom(t,e,n){return super.renderAttrsDom(...arguments),"clipboard"===n.target&&Object.assign(t.inline_style||(t.inline_style=Object.create(null)),nK.setToStyle(e.textMarks)),t}}function ga(t){let e=t.getStateMap();e.register(e.SELF_START,t.name,"set_page_info",null,(function(t,e){let n=e.getPageSize(),r=e.getPagePadding(),i=e.getPageContentSize(),a=e.getPageDecorateHeight(),s=t.state;return s.page_size===n&&s.page_padding===r&&s.page_content_size===i&&s.page_decorate_height===a?rg.STATE_NONE:(s.page_size=n,s.page_padding=r,s.page_content_size=i,s.page_decorate_height=a,rg.STATE_REDRAW)}).bind(this)),e.register(e.SELF_START,t.name,"set_text_rect_info",null,(function(t){t.state.text_rect_info={width:t.state.page_content_size.width,left:0}}).bind(this))}class gs extends dO(rU){get isEditArea(){return!0}get pseudoType(){return this.schema.nodes.page}getIndicatorWrapperDOM(t){return t.lastChild}createPseudoNode(t){let e=t.getState("page_size")??{width:0,height:0},n=t.getState("page_padding")??{left:0,top:0,right:0,bottom:0},r=t.getState("page_decorate_height")??0;return t.type.pseudoType.create({width:e.width,height:e.height,marginLeft:n.left,marginTop:n.top,marginRight:n.right,marginBottom:n.bottom,decoratorMaxHeight:r})}registerSelfLocalAttrsUpdateMap(){this.registerListContainer(),ga(this)}get matchDOMTag(){return{"div[synoedit]":(t,e)=>this.parseDOM(t,e)}}getPageFillingDOM(t){return t.childNodes[1]}toRenderDOM(t,e){return["div",this.renderAttrs({class:"syno-o-doc-pm-edit-area",synoedit:!0},t,e),["div",{class:"syno-o-doc-pm-edit-area-page-container"},0],["div",{class:"syno-o-doc-pm-edit-area-page-filling"}],ac.createIndicatorWrapper()]}toCopyDOM(t,e){return["div",0]}}pw(gs);let go=["header","footer","page_num"],gl=["cover","even","normal"];class gh extends dO(rU){get isDecorator(){return!0}get decoratorType(){return""}get attrs(){return{type:new nH({default:"normal"})}}registerSelfLocalAttrsUpdateMap(){ga(this)}}class gu extends dj(gh){get isHeaderFooter(){return!0}get needHeightCalculating(){return!0}getIndicatorWrapperDOM(t){return t.firstChild.childNodes[1]}getScrollerInfo(t){return{dom:t}}getTopPaddingHeight(t){return 11}getBottomPaddingHeight(t){return 11}registerSelfLocalAttrsUpdateMap(){this.registerListContainer()}get matchDOMTag(){return{[this.decoratorType]:(t,e)=>this.parseDOM(t,e)}}getEditorDOM(t){return t.firstChild}getEditableAreaDOM(t){return this.getEditorDOM(t).firstChild}parseAttrsFromDom(t,e,n){return super.parseAttrsFromDom(...arguments),t.type=e.getAttribute("type"),t}toRenderDOM(t,e){let n=this.decoratorType,r=t.state,i=r.page_padding,a=r.page_content_size,s=this.getTopPaddingHeight(t),o=this.getBottomPaddingHeight(t),l=s+o;return[n,{class:"syno-o-doc-pm-"+n,type:t.attrs.type,inline_style:{maxHeight:r.page_decorate_height-l+"px",minHeight:i["header"===n?"top":"bottom"]-l+"px"}},["div",{class:"syno-o-doc-pm-"+n+"-editor",inline_style:{width:a.width+"px"}},["div",{class:"syno-o-doc-pm-"+n+"-padding",inline_style:{padding:`${s}px ${i.right}px ${o}px ${i.left}px`}},["div",{inline_style:{width:a.width+"px"}},0]],ac.createIndicatorWrapper(4,4)]]}}function gc(t,e,n){let r;if(t.is("RootType"))r="/page_decorate";else if(t.is("PageDecorate"))r="";else throw RangeError(`Invalid parent node: ${t.neme}`);if("page_num"===e)return t.query(r+"/page_num",!0);{let i=t.queryAll(r+"/HeaderFooter").find(t=>{let{node:r}=t;return r.type.decoratorType===e&&r.getAttrValue("type")===n});if(!i)throw RangeError(`There is no matched node. name: ${e}, type: ${n}`);return i}}pw(gu);let gd={line:"line",connect_line:"bentConnector3",bentConnector2:"bentConnector2",bentConnector4:"bentConnector4",bentConnector5:"bentConnector5",rect:"rect",rect_round:"roundRect",rect_single_snip:"snip1Rect",rect_snip_same_side:"snip2SameRect",rect_snip_diagonal:"snip2DiagRect",rect_snip_round:"snipRoundRect",rect_single_round:"round1Rect",rect_round_same_side:"round2SameRect",rect_round_diagonal:"round2DiagRect",ellipse:"ellipse",triangle:"triangle",right_triangle:"rtTriangle",parallelogram:"parallelogram",trapezoid:"trapezoid",diamond:"diamond",pentagon:"pentagon",hexagon:"hexagon",heptagon:"heptagon",octagon:"octagon",decagon:"decagon",dodecagon:"dodecagon",pie:"pie",chord:"chord",rect_frame:"frame",half_frame:"halfFrame",l_shape:"corner",diagonal_stripe:"diagStripe",cross:"plus",plaque:"plaque",can:"can",cube:"cube",bevel:"bevel",donut:"donut",block_arc:"blockArc",folded_corner:"foldedCorner",lightning_bolt:"lightningBolt",moon:"moon","4_point_star":"star4",arrow:"rightArrow",arrow_left:"leftArrow",arrow_up:"upArrow",arrow_down:"downArrow",arrow_left_right:"leftRightArrow",arrow_up_down:"upDownArrow",arrow_striped:"stripedRightArrow",arrow_notched:"notchedRightArrow",arrow_pentagon:"homePlate",arrow_chevron:"chevron",bentArrow:"bentArrow",curvedRightArrow:"curvedRightArrow",curvedLeftArrow:"curvedLeftArrow",curvedUpArrow:"curvedUpArrow",curvedDownArrow:"curvedDownArrow",bentUpArrow:"bentUpArrow",leftUpArrow:"leftUpArrow",leftRightUpArrow:"leftRightUpArrow",quadArrow:"quadArrow",uturnArrow:"uturnArrow",customGeometry:"customGeometry",accentBorderCallout1:"accentBorderCallout1",accentBorderCallout2:"accentBorderCallout2",accentBorderCallout3:"accentBorderCallout3",accentCallout1:"accentCallout1",accentCallout2:"accentCallout2",accentCallout3:"accentCallout3",arc:"arc",borderCallout1:"borderCallout1",borderCallout2:"borderCallout2",borderCallout3:"borderCallout3",bracePair:"bracePair",bracketPair:"bracketPair",callout1:"callout1",callout2:"callout2",callout3:"callout3",circularArrow:"circularArrow",cloud:"cloud",cloudCallout:"cloudCallout",curvedConnector2:"curvedConnector2",curvedConnector3:"curvedConnector3",curvedConnector4:"curvedConnector4",curvedConnector5:"curvedConnector5",doubleWave:"doubleWave",downArrowCallout:"downArrowCallout",ellipseRibbon:"ellipseRibbon",ellipseRibbon2:"ellipseRibbon2",flowChartAlternateProcess:"flowChartAlternateProcess",flowChartCollate:"flowChartCollate",flowChartConnector:"flowChartConnector",flowChartDecision:"flowChartDecision",flowChartDelay:"flowChartDelay",flowChartDisplay:"flowChartDisplay",flowChartDocument:"flowChartDocument",flowChartExtract:"flowChartExtract",flowChartInputOutput:"flowChartInputOutput",flowChartInternalStorage:"flowChartInternalStorage",flowChartMagneticDisk:"flowChartMagneticDisk",flowChartMagneticDrum:"flowChartMagneticDrum",flowChartMagneticTape:"flowChartMagneticTape",flowChartManualInput:"flowChartManualInput",flowChartManualOperation:"flowChartManualOperation",flowChartMerge:"flowChartMerge",flowChartMultidocument:"flowChartMultidocument",flowChartOffpageConnector:"flowChartOffpageConnector",flowChartOnlineStorage:"flowChartOnlineStorage",flowChartOr:"flowChartOr",flowChartPredefinedProcess:"flowChartPredefinedProcess",flowChartPreparation:"flowChartPreparation",flowChartProcess:"flowChartProcess",flowChartPunchedCard:"flowChartPunchedCard",flowChartPunchedTape:"flowChartPunchedTape",flowChartSort:"flowChartSort",flowChartSummingJunction:"flowChartSummingJunction",flowChartTerminator:"flowChartTerminator",heart:"heart",horizontalScroll:"horizontalScroll",irregularSeal1:"irregularSeal1",irregularSeal2:"irregularSeal2",leftArrowCallout:"leftArrowCallout",leftBrace:"leftBrace",leftBracket:"leftBracket",leftRightArrowCallout:"leftRightArrowCallout",lineInv:"lineInv",mathDivide:"mathDivide",mathEqual:"mathEqual",mathMinus:"mathMinus",mathMultiply:"mathMultiply",mathNotEqual:"mathNotEqual",mathPlus:"mathPlus",noSmoking:"noSmoking",quadArrowCallout:"quadArrowCallout",ribbon:"ribbon",ribbon2:"ribbon2",rightArrowCallout:"rightArrowCallout",rightBrace:"rightBrace",rightBracket:"rightBracket",smileyFace:"smileyFace",star10:"star10",star12:"star12",star16:"star16",star24:"star24",star32:"star32",star5:"star5",star6:"star6",star7:"star7",star8:"star8",straightConnector1:"straightConnector1",sun:"sun",teardrop:"teardrop",upArrowCallout:"upArrowCallout",verticalScroll:"verticalScroll",wave:"wave",wedgeEllipseCallout:"wedgeEllipseCallout",wedgeRectCallout:"wedgeRectCallout",wedgeRoundRectCallout:"wedgeRoundRectCallout"},gp=["l","t","r","b","w","h"],gg=["stroke","stroke-opacity","stroke-width","stroke-dasharray"],gf=["fill","fill-opacity"];function gy(t,e,n){let r=(n.l+n.r)/2,i=(n.t+n.b)/2,a=Math.round(108e5*Math.atan((e-i)/(t-r))/Math.PI);return t<r?a+=108e5:e<i&&(a+=216e5),216e5!==a?a:0}let gx=Math.PI/108e5,gm={bentArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,5e4*e/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(5e4,(n.w-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,1e5*t/Math.min(n.w,n.h)))}],bentConnector3:[function(t,e,n){n.adj1=1e5*t/n.w}],bentConnector4:[function(t,e,n){n.adj1=1e5*t/n.w},function(t,e,n){n.adj2=1e5*e/n.h}],bentConnector5:[function(t,e,n){n.adj1=1e5*t/n.w},function(t,e,n){n.adj2=1e5*e/n.h},function(t,e,n){n.adj3=1e5*t/n.w}],bentUpArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,(n.h-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.w-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(5e4,1e5*e/Math.min(n.w,n.h)))}],bevel:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))}],blockArc:[function(t,e,n){n.adj1=gy(t,e,n)},function(t,e,n){n.adj2=gy(t,e,n),n.adj3=Math.max(0,Math.min(5e4,5e4-1e5*Math.sqrt(Math.pow(t-(n.l+n.r)/2,2)+Math.pow(e-(n.t+n.b)/2,2))/Math.min(n.w,n.h)))}],can:[function(t,e,n){n.adj=Math.max(0,Math.min(n.maxAdj,1e5*e/Math.min(n.w,n.h)))}],chevron:[function(t,e,n){n.adj=Math.max(0,Math.min(n.maxAdj,(n.r-t)*1e5/Math.min(n.w,n.h)))}],chord:[function(t,e,n){n.adj1=gy(t,e,n)},function(t,e,n){n.adj2=gy(t,e,n)}],corner:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj1=Math.max(0,Math.min(1e5*n.h/r,(n.b-e)*1e5/r))},function(t,e,n){let r=Math.min(n.w,n.h);n.adj2=Math.max(0,Math.min(1e5*n.w/r,1e5*t/r))}],cube:[function(t,e,n){n.adj=Math.max(0,Math.min(1e5,1e5*e/Math.min(n.w,n.h)))}],curvedDownArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=n.w/2,a=r*n.adj2/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.h*n.h-s*s),l=t-i+a/4-o/n.h*(i-a/4),h=3/4-o/(4*n.h);n.adj1=Math.max(0,Math.min(n.adj2,l/h*1e5/r))},function(t,e,n){let r=Math.min(n.w,n.h),i=n.w/2,a=r*n.adj1/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.h*n.h-s*s),l=t-i-a/4-o/n.h*(i-a/4),h=(-1-o/n.h)/4;n.adj2=Math.max(0,Math.min(n.maxAdj2,l/h*1e5/r))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,(n.h-e)*1e5/Math.min(n.w,n.h)))}],curvedLeftArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=n.h/2,a=r*n.adj2/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.w*n.w-s*s),l=e-i+a/4-o/n.w*(i-a/4),h=(-1-o/n.w)/4;n.adj1=Math.max(0,Math.min(n.adj2,l/h*1e5/r))},function(t,e,n){let r=Math.min(n.w,n.h),i=n.h/2,a=r*n.adj1/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.w*n.w-s*s),l=e-i-a/4-o/n.w*(i-a/4),h=-3/4-o/(4*n.w);n.adj2=Math.max(0,Math.min(n.maxAdj2,l/h*1e5/r))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*t/Math.min(n.w,n.h)))}],curvedRightArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=n.h/2,a=r*n.adj2/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.w*n.w-s*s),l=e-i+a/4-o/n.w*(i-a/4),h=(-1-o/n.w)/4;n.adj1=Math.max(0,Math.min(n.adj2,l/h*1e5/r))},function(t,e,n){let r=Math.min(n.w,n.h),i=n.h/2,a=r*n.adj1/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.w*n.w-s*s),l=e-i-a/4-o/n.w*(i-a/4),h=-3/4-o/(4*n.w);n.adj2=Math.max(0,Math.min(n.maxAdj2,l/h*1e5/r))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,(n.w-t)*1e5/Math.min(n.w,n.h)))}],curvedUpArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=n.w/2,a=r*n.adj2/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.h*n.h-s*s),l=t-i+a/4-o/n.h*(i-a/4),h=3/4-o/(4*n.h);n.adj1=Math.max(0,Math.min(n.adj2,l/h*1e5/r))},function(t,e,n){let r=Math.min(n.w,n.h),i=n.w/2,a=r*n.adj1/1e5,s=r*n.adj3/1e5,o=Math.sqrt(n.h*n.h-s*s),l=t-i-a/4-o/n.h*(i-a/4),h=(-1-o/n.h)/4;n.adj2=Math.max(0,Math.min(n.maxAdj2,l/h*1e5/r))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/Math.min(n.w,n.h)))}],diagStripe:[function(t,e,n){n.adj=Math.max(0,Math.min(1e5,1e5*e/n.h))}],donut:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))}],downArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.l+n.r)/2-t)*2e5/n.w))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.b-e)*1e5/Math.min(n.w,n.h)))}],upArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.l+n.r)/2-t)*2e5/n.w))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(e-n.t)*1e5/Math.min(n.w,n.h)))}],foldedCorner:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],frame:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj1=Math.max(0,Math.min(5e4,1e5*t/r))}],halfFrame:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.t+e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,1e5*t/Math.min(n.w,n.h)))}],homePlate:[function(t,e,n){n.adj=Math.max(0,Math.min(n.maxAdj,(n.r-t)*1e5/Math.min(n.w,n.h)))}],leftArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.t+n.b)/2-e)*2e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(t-n.l)*1e5/Math.min(n.w,n.h)))}],leftRightArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.t+n.b)/2-e)*2e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,1e5*t/Math.min(n.w,n.h)))}],leftRightUpArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.w/2-t)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.w/2-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/Math.min(n.w,n.h)))}],leftUpArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=r*n.adj2/1e5;n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.h-i-e)*2e5/r))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.w-t)*5e4/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/Math.min(n.w,n.h)))}],moon:[function(t,e,n){n.adj=Math.max(0,Math.min(87500,1e5*t/n.w))}],notchedRightArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.t+n.b)/2-e)*2e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.r-t)*1e5/Math.min(n.w,n.h)))}],parallelogram:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj=Math.max(0,Math.min(1e5*n.w/r,2e5*t/r))}],pie:[function(t,e,n){n.adj1=gy(t,e,n)},function(t,e,n){n.adj2=gy(t,e,n)}],plaque:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj=Math.max(0,Math.min(1e5,1e5*t/r))}],plus:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj=Math.max(0,Math.min(1e5,1e5*t/r))}],quadArrow:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.w/2-t)*2e5/r))},function(t,e,n){let r=Math.min(n.w,n.h);n.adj2=Math.max(0,Math.min(5e4,(n.w/2-t)*2e5/r))},function(t,e,n){let r=Math.min(n.w,n.h);n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/r))}],rightArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.t+n.b)/2-e)*2e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.r-t)*1e5/Math.min(n.w,n.h)))}],round1Rect:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],round2DiagRect:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],round2SameRect:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))}],roundRect:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))}],snip1Rect:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],snip2DiagRect:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],snip2SameRect:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))}],snipRoundRect:[function(t,e,n){n.adj1=Math.max(0,Math.min(5e4,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.r-t)*1e5/Math.min(n.w,n.h)))}],star4:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,((n.t+n.b)/2-e)*5e4/(n.h/2)))}],stripedRightArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.t+n.b)/2-e)*2e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.r-t)*1e5/Math.min(n.w,n.h)))}],trapezoid:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj=Math.max(0,Math.min(5e4*n.w/r,1e5*t/r))}],triangle:[function(t,e,n){n.adj=Math.max(0,Math.min(1e5,1e5*t/n.w))}],upDownArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,((n.l+n.r)/2-t)*2e5/n.w))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,1e5*e/Math.min(n.w,n.h)))}],uturnArrow:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(25e3,(n.w-t)*5e4/Math.min(n.w,n.h)))},function(t,e,n){let r=n.h*n.adj5/1e5;n.adj3=Math.max(0,Math.min(n.maxAdj3,(r-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj5=Math.max(n.minAdj5,Math.min(1e5,1e5*e/Math.min(n.w,n.h)))}],accentBorderCallout1:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],accentBorderCallout2:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],accentBorderCallout3:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj7=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj8=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],accentCallout1:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],accentCallout2:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],accentCallout3:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj7=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj8=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],arc:[function(t,e,n){n.adj1=gy(t,e,n)},function(t,e,n){n.adj2=gy(t,e,n)}],borderCallout1:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],borderCallout2:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],borderCallout3:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj7=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj8=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],bracePair:[function(t,e,n){n.adj=Math.max(0,Math.min(25e3,1e5*e/Math.min(n.w,n.h)))}],bracketPair:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,1e5*e/Math.min(n.w,n.h)))}],callout1:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],callout2:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],callout3:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj4=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj5=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj6=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj7=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h)),n.adj8=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],circularArrow:[function(t,e,n){let r=Math.min(n.w,n.h),i=r*n.adj1/1e5,a=r*n.adj5/1e5,s=i/2,o=n.w/2+s-a-i+s,l=n.h/2+s-a-i+s,h=(t-n.w/2)/o,u=Math.atan((e-n.h/2)/l/h*l/o)/gx-n.adj3;u<0&&(u=u%216e5+216e5),n.adj2=Math.max(0,Math.min(n.maxAng,u))},function(t,e,n){n.adj4=gy(t,e,n)},function(t,e,n){n.adj3=gy(t,e,n);let r=Math.sqrt((n.xGp-n.xBp)**2+(n.yGp-n.yBp)**2)/2,i=(n.xGp+n.xBp)/2,a=(n.yGp+n.yBp)/2,s=Math.sqrt((t-i)**2+(e-a)**2),o=Math.sign((t-i)*(n.xGp-i)+(e-a)*(n.yGp-a));n.adj1=Math.max(0,Math.min(n.maxAdj1,o>0?s/r*25e3:0))},function(t,e,n){let r=n.w/2,i=n.h/2,a=Math.atan2(e-i,t-r),s=Math.sqrt((r*Math.cos(a))**2+(i*Math.sin(a))**2);n.adj5=Math.max(1e-10,Math.min(25e3,(s-Math.sqrt((t-r)**2+(e-i)**2))/s*4e4))}],cloudCallout:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,(t-n.w/2)*1e5/n.w)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,(e-n.h/2)*1e5/n.h))}],curvedConnector3:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],curvedConnector4:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h))}],curvedConnector5:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))},function(t,e,n){n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*e/n.h))},function(t,e,n){n.adj3=Math.max(-0x7fffffff,Math.min(0x7fffffff,1e5*t/n.w))}],doubleWave:[function(t,e,n){n.adj1=Math.max(0,Math.min(12500,1e5*e/n.h))},function(t,e,n){n.adj2=Math.max(-1e4,Math.min(1e4,(t-n.w/2)*1e5/n.w))}],downArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.w/2-t)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.w/2-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,(n.h-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,1e5*e/Math.min(n.w,n.h)))}],ellipseRibbon:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,1e5*e/n.h))},function(t,e,n){n.adj2=Math.max(25e3,Math.min(75e3,(n.w/2-t)*2e5/n.w))},function(t,e,n){n.adj3=Math.max(n.minAdj3,Math.min(n.adj1,(n.h-e)*1e5/n.h))}],ellipseRibbon2:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,(n.h-e)*1e5/n.h))},function(t,e,n){n.adj2=Math.max(25e3,Math.min(1e5,(n.w/2-t)*2e5/n.w))},function(t,e,n){n.adj3=Math.max(n.minAdj3,Math.min(n.adj1,1e5*e/n.h))}],horizontalScroll:[function(t,e,n){n.adj=Math.max(0,Math.min(25e3,1e5*t/Math.min(n.w,n.h)))}],leftArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.h/2-e)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.h/2-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,(n.w-t)*1e5/n.w))}],leftBrace:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,1e5*e/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(1e5,1e5*e/n.h))}],leftBracket:[function(t,e,n){n.adj=Math.max(0,Math.min(n.maxAdj,1e5*e/Math.min(n.w,n.h)))}],leftRightArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.h/2-e)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.h/2-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*t/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,(n.w/2-t)*2e5/n.w))}],mathDivide:[function(t,e,n){n.adj1=Math.max(1e3,Math.min(36745,(n.h/2-e)*2e5/n.h))},function(t,e,n){let r=n.h/2-n.h*n.adj1/2e5,i=n.h*n.adj3/1e5;n.adj2=Math.max(0,Math.min(n.maxAdj2,(r-i-e)*1e5/n.h))},function(t,e,n){n.adj3=Math.max(1e3,Math.min(n.maxAdj3,(n.w/2-t)*1e5/n.h))}],mathEqual:[function(t,e,n){let r=n.h/2-n.h*n.adj2/2e5;n.adj1=Math.max(0,Math.min(36745,(r-e)*1e5/n.h))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.mAdj2,(n.h/2-e)*2e5/n.h))}],mathMinus:[function(t,e,n){n.adj1=Math.max(0,Math.min(1e5,(n.h/2-e)*2e5/n.h))}],mathMultiply:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj1=Math.max(0,Math.min(51965,1e5*e/r))}],mathNotEqual:[function(t,e,n){let r=n.h/2-n.h*n.adj3/2e5;n.adj1=Math.max(0,Math.min(5e4,(r-e)*1e5/n.h))},function(t,e,n){let r=t-n.w/2;if(r>0){let t=Math.atan(2*r/n.h);n.adj2=Math.max(42e5,Math.min(66e5,t/gx+54e5))}else{let e=Math.PI/2-Math.atan(2*(t-2*(t-n.w/2)-n.w/2)/n.h);n.adj2=Math.max(42e5,Math.min(66e5,e/gx))}},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,(n.h/2-e)*2e5/n.h))}],mathPlus:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj1=Math.max(0,Math.min(73490,(n.h/2-e)*2e5/r))}],noSmoking:[function(t,e,n){let r=Math.min(n.w,n.h);n.adj=Math.max(0,Math.min(5e4,1e5*t/r))}],quadArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.w/2-t)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(5e4,(n.w/2-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,(n.h/2-e)*2e5/n.h))}],ribbon:[function(t,e,n){n.adj1=Math.max(0,Math.min(33333,1e5*e/n.h))},function(t,e,n){n.adj2=Math.max(25e3,Math.min(75e3,(n.w/2-t)*2e5/n.w))}],ribbon2:[function(t,e,n){n.adj1=Math.max(0,Math.min(33333,(n.h-e)*1e5/n.h))},function(t,e,n){n.adj2=Math.max(25e3,Math.min(75e3,(n.w/2-t)*2e5/n.w))}],rightArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.h/2-e)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.h/2-e)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,(n.w-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,1e5*t/Math.min(n.w,n.h)))}],rightBrace:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,1e5*e/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(1e5,1e5*e/n.h))}],rightBracket:[function(t,e,n){n.adj=Math.max(0,Math.min(n.maxAdj,1e5*e/Math.min(n.w,n.h)))}],smileyFace:[function(t,e,n){n.adj=Math.max(-4653,Math.min(4653,(e-16515*n.h/21600)*1e5/n.h))}],star10:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star12:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star16:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star24:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star32:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star5:[function(t,e,n){let r=n.h/2*1.10557;n.adj=Math.max(0,Math.min(5e4,(r-e)*5e4/r))}],star6:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],star7:[function(t,e,n){let r=n.h/2*1.0521;n.adj=Math.max(0,Math.min(5e4,(r-e)*5e4/r))}],star8:[function(t,e,n){n.adj=Math.max(0,Math.min(5e4,(n.h/2-e)*5e4/(n.h/2)))}],sun:[function(t,e,n){n.adj=Math.max(12500,Math.min(46875,1e5*t/n.w))}],teardrop:[function(t,e,n){let r=n.w/2*Math.sqrt(2);n.adj=Math.max(0,Math.min(2e5,(t-n.w/2)*1e5/r/Math.cos(27e5*gx)))}],upArrowCallout:[function(t,e,n){n.adj1=Math.max(0,Math.min(n.maxAdj1,(n.w/2-t)*2e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj2=Math.max(0,Math.min(n.maxAdj2,(n.w/2-t)*1e5/Math.min(n.w,n.h)))},function(t,e,n){n.adj3=Math.max(0,Math.min(n.maxAdj3,1e5*e/Math.min(n.w,n.h)))},function(t,e,n){n.adj4=Math.max(0,Math.min(n.maxAdj4,(n.h-e)*1e5/n.h))}],verticalScroll:[function(t,e,n){n.adj=Math.max(0,Math.min(25e3,1e5*e/Math.min(n.w,n.h)))}],wave:[function(t,e,n){n.adj1=Math.max(0,Math.min(2e4,1e5*e/n.h))},function(t,e,n){n.adj2=Math.max(-1e4,Math.min(1e4,(t-n.w/2)*1e5/n.w))}],wedgeEllipseCallout:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,(t-n.w/2)*1e5/n.w)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,(e-n.h/2)*1e5/n.h))}],wedgeRectCallout:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,(t-n.w/2)*1e5/n.w)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,(e-n.h/2)*1e5/n.h))}],wedgeRoundRectCallout:[function(t,e,n){n.adj1=Math.max(-0x7fffffff,Math.min(0x7fffffff,(t-n.w/2)*1e5/n.w)),n.adj2=Math.max(-0x7fffffff,Math.min(0x7fffffff,(e-n.h/2)*1e5/n.h))}]};var gv=n(1970);function gb(){}function gw(t){return Object.hasOwn(gv,t)?gv[t]:void 0}function gM(t){return 1e-10>Math.abs(t)?0:t}function g_(t,e){t=gM(t);let n=Math.atan2(e=gM(e),t);return n>=0?n:n+2*Math.PI}function gA(t,e,n){let r=Math.cos(n),i=Math.sin(n);return 0===gM(e)&&0===gM(i)||0===gM(t)&&0===gM(r)?n:g_(e*r,t*i)}function gS(t,e,n,r,i,a){if(0===t&&0===e)return{x:r,y:i};let s=gA(t,e,n),o=gA(t,e,a);return{x:r-t*Math.cos(s)+t*Math.cos(o),y:i-e*Math.sin(s)+e*Math.sin(o)}}Object.keys(gv).forEach(t=>{gv[t].getAdjustHandles=function(e){let n=this._getAdjustHandles(e),r=gm[t];return n.forEach((t,e)=>{"handler"in t||(t.handler=r&&e<r.length?r[e]:gb)}),n}});let gC=new Map([["b",t=>t.b],["h",t=>t.h],["hc",t=>(t.l+t.r)/2],["hd2",t=>t.h/2],["hd3",t=>t.h/3],["hd4",t=>t.h/4],["hd5",t=>t.h/5],["hd6",t=>t.h/6],["hd8",t=>t.h/8],["l",t=>t.l],["ls",t=>Math.max(t.w,t.h)],["r",t=>t.r],["ss",t=>Math.min(t.w,t.h)],["ssd2",t=>Math.min(t.w,t.h)/2],["ssd4",t=>Math.min(t.w,t.h)/4],["ssd6",t=>Math.min(t.w,t.h)/6],["ssd8",t=>Math.min(t.w,t.h)/8],["ssd16",t=>Math.min(t.w,t.h)/16],["ssd32",t=>Math.min(t.w,t.h)/32],["t",t=>t.t],["vc",t=>(t.t+t.b)/2],["w",t=>t.w],["wd2",t=>t.w/2],["wd3",t=>t.w/3],["wd4",t=>t.w/4],["wd5",t=>t.w/5],["wd6",t=>t.w/6],["wd8",t=>t.w/8],["wd10",t=>t.w/10],["wd12",t=>t.w/12],["wd32",t=>t.w/32],["3cd4",t=>162e5],["3cd8",t=>81e5],["5cd8",t=>135e5],["7cd8",t=>189e5],["cd2",t=>108e5],["cd4",t=>54e5],["cd8",t=>27e5]]);function gI(t){if("number"==typeof t)return e=>t;let e=gC.get(t);return e||(e=>e[t]??0)}let gP=t=>0;function gT(t){let e=t.trim().split(/\s+/);if(e.length<2)return gP;let n=[];for(let[t,r]of e.entries()){if(0===t)continue;let e=Number(r);n.push(gI(isFinite(e)?e:r))}switch(e[0]){case"*/":if(3!==n.length)return gP;return t=>n[0](t)*n[1](t)/n[2](t);case"+-":if(3!==n.length)return gP;return t=>n[0](t)+n[1](t)-n[2](t);case"+/":if(3!==n.length)return gP;return t=>(n[0](t)+n[1](t))/n[2](t);case"?:":if(3!==n.length)return gP;return t=>n[0](t)>0?n[1](t):n[2](t);case"abs":if(1!==n.length)return gP;return t=>Math.abs(n[0](t));case"at2":if(2!==n.length)return gP;return t=>108e5*g_(n[0](t),n[1](t))/Math.PI;case"cat2":if(3!==n.length)return gP;return t=>n[0](t)*Math.cos(g_(n[1](t),n[2](t)));case"cos":if(2!==n.length)return gP;return t=>n[0](t)*Math.cos(n[1](t)*Math.PI/108e5);case"max":if(2!==n.length)return gP;return t=>Math.max(n[0](t),n[1](t));case"min":if(2!==n.length)return gP;return t=>Math.min(n[0](t),n[1](t));case"mod":if(3!==n.length)return gP;return t=>Math.sqrt(Math.pow(n[0](t),2)+Math.pow(n[1](t),2)+Math.pow(n[2](t),2));case"pin":if(3!==n.length)return gP;return t=>Math.max(n[0](t),Math.min(n[1](t),n[2](t)));case"sat2":if(3!==n.length)return gP;return t=>n[0](t)*Math.sin(g_(n[1](t),n[2](t)));case"sin":if(2!==n.length)return gP;return t=>n[0](t)*Math.sin(n[1](t)*Math.PI/108e5);case"sqrt":if(1!==n.length)return gP;return t=>Math.sqrt(n[0](t));case"tan":if(2!==n.length)return gP;return t=>n[0](t)*Math.tan(n[1](t)*Math.PI/108e5);case"val":if(1!==n.length)return gP;return t=>n[0](t);default:return gP}}function gk(t,e,n,r){let i=r.w,a=r.h,s=[],o=[];for(let t of e)s.push(gI(t.x)),o.push(gI(t.y));return(e,r)=>{let l={};for(let[t,r]of n.entries()){let n=s[t],h=o[t],u=n(e);i&&(u=e.w*u/i),l["x"+r]=u;let c=h(e);a&&(c=e.h*c/a),l["y"+r]=c}return[{action:t,...l}]}}let gL=new WeakMap;function gD(t){return t.reduce((t,e)=>{switch(e.action){case"M":t+=` M ${e.x} ${e.y}`;break;case"L":t+=` L ${e.x} ${e.y}`;break;case"C":t+=` C ${e.x1} ${e.y1} ${e.x2} ${e.y2} ${e.x} ${e.y}`;break;case"Q":t+=` Q ${e.x1} ${e.y1} ${e.x} ${e.y}`;break;case"A":t+=` A ${e.rx} ${e.ry} ${e.a} ${e.b} ${e.c} ${e.x} ${e.y}`;break;case"Z":t+=" Z "}return t},"").trim()}function gR(t){return"Z"!==t.action}function gN(t){return tj(Math.round(t),0,255)}let gO=(t,e)=>gN(t+(255-t)*(e-1)),gj=(t,e)=>gN(t*e);function gE(t,e){if(t===nx)return t;let n=e>1?gO:gj;return t.startsWith("#")&&(t=t.slice(1)),[t.slice(0,2),t.slice(2,4),t.slice(4,6)].reduce((t,r)=>t+n(parseInt(r,16),e).toString(16).padStart(2,"0"),"#")}function gV(t,e){return e in t&&"number"==typeof t[e]}class gB{constructor(t){this.geometry=this.findGeometry(t),this.adjustValueNames=this.geometry.getAdjustValueNames(),this.defaultAdjustValues=this.geometry.getDefaultAdjustValues(),this.adjustHandles=this.geometry.getAdjustHandles(),this.connections=this.geometry.getConnections()}is(t){return this.getGeometryType()===t}isLine(){let t=this.getGeometryType();return"line"===t||"connect_line"===t||t.startsWith("bentConnector")||t.startsWith("curvedConnector")||t.startsWith("straightConnector")||"lineInv"===t}getPresetType(){return this.geometry.name}findGeometry(t){var e;let n=(e=this.getGeometryType())in gd?gd[e]:null;if("customGeometry"===n){let e;if(!t)return gw("rect");let n=gL.get(t);if(n)return n;try{e={name:"customGeometry",getConnections:function(t){if(!t)return()=>[];let e=[];for(let n of t)e.push(function(t){let e=gI(t.ang),n=gI(t.pos.x),r=gI(t.pos.y);return{ang:e,pos:t=>({x:n(t),y:r(t)})}}(n));return()=>e}(t.connectionList),updateShapeGuides:function(t){if(!t)return t=>{};let e=[];for(let n of t)e.push(gT(n.fmla));return n=>{for(let[r,i]of e.entries())n[t[r].name]=i(n)}}(t.shapeGuideList),getTextRect:function(t){if(!t)return t=>void 0;let e=gI(t.l),n=gI(t.t),r=gI(t.r),i=gI(t.b);return t=>({l:e(t),t:n(t),r:r(t),b:i(t)})}(t.rect),getPaths:function(t){if(!t)return t=>[];let e=[];for(let n of t)e.push(function(t){let e={h:t.h,w:t.w},n=function(t,e){let n=[];for(let r of t){let t;switch(r.action){case"arcTo":{let n=gI(r.arcAttrs.wR),i=gI(r.arcAttrs.hR),a=gI(r.arcAttrs.stAng),s=gI(r.arcAttrs.swAng);t=(t,r)=>{let o=n(t),l=i(t),h=a(t),u=s(t),c=o,d=l,p=h,g=u%216e5,f=0!==u&&0===g;f&&(g=108e5);let y=[];y.push(gS(c,d,p*Math.PI/108e5,r.x,r.y,(p+g)*Math.PI/108e5)),f&&(p-=108e5,y.push(gS(c,d,p*Math.PI/108e5,y[0].x,y[0].y,(p+g)*Math.PI/108e5))),e.w&&(c=c*t.w/e.w),e.h&&(d=d*t.h/e.h);let x=[];for(let n of y)e.w&&(n.x=n.x*t.w/e.w),e.h&&(n.y=n.y*t.h/e.h),x.push({action:"A",rx:c,ry:d,x:n.x,y:n.y,a:0,b:+(Math.abs(g)>108e5),c:g<0?0:1});return x};break}case"cubicBezTo":if(3!==r.points.length)break;t=gk("C",r.points,["1","2",""],e);break;case"lnTo":t=gk("L",[r.point],[""],e);break;case"moveTo":t=gk("M",[r.point],[""],e);break;case"quadBezTo":if(2!==r.points.length)break;t=gk("Q",r.points,["1",""],e);break;case"close":t=(t,e)=>[{action:"Z"}];break;default:continue}t&&n.push(t)}return t=>{let r=[],i={x:0,y:0};for(let a of n)for(let n of a(t,i))"Z"!==n.action&&(i.x=e.w?n.x*e.w/t.w:n.x,i.y=e.h?n.y*e.h/t.h:n.y),r.push(n);return r}}(t.paths,e);return e=>({stroke:t.stroke??!0,fill:t.fill??"norm",path:n(e)})}(n));return t=>{let n=[];for(let r of e)n.push(r(t));return n}}(t.pathList),getAdjustValueNames:function(t){if(!t)return()=>[];let e=[];for(let n of t)e.push(n.name);return()=>e}(t.adjustValueList),getDefaultAdjustValues:function(t){if(!t)return()=>({});let e={},n={l:0,t:0,r:0,b:0,w:0,h:0};for(let r of t)e[r.name]=gT(r.fmla)(n);return()=>e}(t.adjustValueList),getAdjustHandles:function(t){if(!t)return()=>[];let e=[];for(let n of t)e.push(function(t){let e=gI(t.point.x),n=gI(t.point.y);return{pos:t=>({x:e(t),y:n(t)}),handler:t=>({})}}(n));return()=>e}(void 0)}}catch{ad.default.error("Failed to create custom geometry"),e=gv.rect}return gL.set(t,e),e}let r=gw(n);if(!r)throw Error(`Non-supported geometry type \`${n}\`.`);return r}isAdjustable(){return this.adjustValueNames.length>0}getAdjustValueNames(){return this.adjustValueNames}getDefaultAdjustValues(){return this.defaultAdjustValues}getDefaultRectData(){return{w:120,h:120}}getDefaultAdjustData(){return null}createRectData(t){t||(t=this.getDefaultRectData());let e={l:0,t:0,r:0,b:0,w:0,h:0};return t&&(gV(t,"w")?(e.w=t.w,!gV(t,"l")&&gV(t,"r")?(e.r=t.r,e.l=e.r-e.w):(e.l=t.l||0,e.r=e.l+e.w)):(e.l=t.l||0,e.r=t.r||0,e.w=e.r-e.l),gV(t,"h")?(e.h=t.h,!gV(t,"t")&&gV(t,"b")?(e.b=t.b,e.t=e.b-e.h):(e.t=t.t||0,e.b=e.t+e.h)):(e.t=t.t||0,e.b=t.b||0,e.h=e.b-e.t)),e}createAdjustData(t){return this.extractAdjustData(t??this.getDefaultAdjustData()??m)}createGeometryData(t,e){let n={...this.createRectData(t),...this.createAdjustData(e)};return this.updateGeometryData(n),n}extractRectData(t){return V(t,gp)}extractAdjustData(t){let e=this.getDefaultAdjustValues(),n=Object.create(null);for(let r of this.getAdjustValueNames()){let i=t[r];n[r]=Number.isFinite(i)?i:e[r]}return n}getTextRect(t){let e=this.geometry.getTextRect(t);return e?(e.w=e.r-e.l,e.h=e.b-e.t,e):{l:t.l,t:t.t,w:t.w,h:t.h,r:t.r,b:t.b}}getDefaultTransform(){let t=this.createRectData();return{left:t.l,top:t.t,width:t.w,height:t.h,deg:0,skewY:0}}getAdjustHandles(){return this.adjustHandles}getAdjustCount(){return this.getAdjustHandles().length}updateGeometryData(t){this.geometry.updateShapeGuides(t)}adjustGeometryData(t,e,n,r){e.handler(n,r,t),this.updateGeometryData(t)}resizeGeometryData(t,e,n){Object.assign(t,this.createRectData({w:e,h:n})),this.updateGeometryData(t)}getConnectionHandles(){return this.connections}getConnectionCount(){return this.getConnectionHandles().length}getPaths(t){return this.geometry.getPaths(t).map(t=>Object.assign(t,{define:this.pathDataToStr(t.path)}))}getPathsFromSize(t,e,n){return this.getPaths(this.createGeometryData({w:t,h:e},n))}pathDataToStr(t){return gD(t)}fillPathColor(t,e){t.color=this.getFillColor(t.fill,e)}fillAllPathsColor(t,e){for(let n of t)this.fillPathColor(n,e)}getFillColor(t,e){switch(t){case"none":return"none";case"darken":return gE(e,.6);case"darkenLess":return gE(e,.8);case"lightenLess":return gE(e,1.2);case"lighten":return gE(e,1.4);default:return e}}getDefaultStrokeConfig(){return{stroke:"#2e3133","stroke-opacity":1,"stroke-width":1}}getDefaultFillConfig(){return{fill:"#cce6ff","fill-opacity":1}}getDefaultPathConfig(){return{...this.getDefaultStrokeConfig(),...this.getDefaultFillConfig()}}createStrokeConfig(t){if(!1===t)return Object.create(null);let e=this.getDefaultStrokeConfig()||Object.create(null);return t&&E(e,t,gg),e}createFillConfig(t){if(!1===t)return Object.create(null);let e=this.getDefaultFillConfig()||Object.create(null);return t&&E(e,t,gf),e}createPathConfig(t,e){return{...this.createStrokeConfig(t),...this.createFillConfig(e)}}extractStrokeConfig(t){return V(t,gg)}extractFillConfig(t){return V(t,gf)}}class gz{getArrowType(){throw Error()}is(t){return this.getArrowType()===t}getLength(t,e){throw Error()}getPresetPaths(t,e){throw Error()}getPaths(t,e){return this.getPresetPaths(t,e).map(t=>({stroke:!0,fill:this.getArrowType().startsWith("hollow")?"none":"norm",...t}))}}let gF=Math.sqrt(2.21);class gG extends gz{getArrowType(){return"triangle"}getTriangleSize(t){return Math.round(1.4*t)}getTriangleSpace(t){return t*gF}getLength(t,e){return this.getTriangleSpace(e)+this.getTriangleSize(t)+e/2}getPresetPaths(t,e){let n=t/2,r=this.getTriangleSize(t),i=this.getTriangleSpace(e);return[{path:[{action:"M",x:i,y:0},{action:"L",x:i+r,y:-n},{action:"L",x:i+r,y:n},{action:"Z"}]}]}}let gH=Math.sqrt(4.21)/3;class gW extends gz{getArrowType(){return"circle"}getCircleSize(t){return t}getCircleSpace(t){return .5*t}getLength(t,e){return this.getCircleSize(t)+2*this.getCircleSpace(e)}getPresetPaths(t,e){let n=this.getCircleSize(t)/2,r=this.getCircleSpace(e);return[{path:[{action:"M",x:r,y:0},{action:"A",rx:n,ry:n,a:0,b:1,c:0,x:r+t,y:0},{action:"A",rx:n,ry:n,a:0,b:1,c:0,x:r,y:0}]}]}}class gq extends gz{getArrowType(){return"square"}getSquareSize(t){return t}getSquareSpace(t){return .5*t}getLength(t,e){return this.getSquareSize(t)+2*this.getSquareSpace(e)}getPresetPaths(t,e){let n=this.getSquareSize(t)/2,r=this.getSquareSpace(e);return[{path:[{action:"M",x:r,y:-n},{action:"L",x:r+t,y:-n},{action:"L",x:r+t,y:n},{action:"L",x:r,y:n},{action:"Z"}]}]}}let gU=Math.SQRT1_2;class gZ extends gz{getArrowType(){return"diamond"}getDiamondSize(t){return t}getDiamondSpace(t){return t*gU}getLength(t,e){return this.getDiamondSize(t)+2*this.getDiamondSpace(e)}getPresetPaths(t,e){let n=this.getDiamondSize(t)/2,r=this.getDiamondSpace(e);return[{path:[{action:"M",x:r,y:0},{action:"L",x:r+n,y:-n},{action:"L",x:r+t,y:0},{action:"L",x:r+n,y:n},{action:"Z"}]}]}}let g$=t=>class extends t{getArrowType(){return"hollow_"+super.getArrowType()}};class gJ extends g$(gG){}class gY extends g$(gW){}class gX extends g$(gq){}class gQ extends g$(gZ){}let gK=F({none:class extends gz{getArrowType(){return"none"}getLength(t,e){return 0}getPresetPaths(t,e){return[]}},notched_triangle:class extends gG{getArrowType(){return"notched_triangle"}getNotchedTriangleSize(t){return Math.round(2.8*t/3)}getNotchedTriangleSpace(t){return t*gH}getLength(t,e){return this.getTriangleSpace(e)+this.getNotchedTriangleSize(t)+this.getNotchedTriangleSpace(e)}getPresetPaths(t,e){let n=super.getPresetPaths(t,e),r=this.getNotchedTriangleSize(t);return n.forEach(t=>{let e=t.path,n=e[0];e.splice(2,0,{action:"L",x:n.x+r,y:0})}),n}},triangle:gG,circle:gW,square:gq,diamond:gZ,hollow_triangle:gJ,hollow_circle:gY,hollow_square:gX,hollow_diamond:gQ},t=>new t);function g0(t){return gR(t)?t:null}function g1(t,e,n){switch(e.action){case"C":let{x:r,y:i,x1:a,y1:s,x2:o,y2:l}=e;return{x:(1-n)**3*t.x+3*(1-n)**2*n*a+3*(1-n)*n**2*o+n**3*r,y:(1-n)**3*t.y+3*(1-n)**2*n*s+3*(1-n)*n**2*l+n**3*i};case"Q":let{x:h,y:u,x1:c,y1:d}=e;return{x:(1-n)**2*t.x+2*(1-n)*n*c+n**2*h,y:(1-n)**2*t.y+2*(1-n)*n*d+n**2*u};case"L":let{x:p,y:g}=e;return{x:(1-n)*t.x+n*p,y:(1-n)*t.y+n*g}}return null}function g2(t,e,n){switch(t){case"C":case"Q":return X(e.start,e.end);case"L":return X(n.start,n.end)}return null}class g5 extends gB{getGeometryType(){return"line"}getDefaultFillConfig(){return null}getTransformedArrowGeometryPaths(t,e,n,r){if(n=n||"none","none"===(e=e||"none")&&"none"===n||!t.length)return[];let i=t[0],a=1===r?6:4*r,s=[e,n].map((t,e)=>{if("none"===t)return null;let n=0===e?function(t){if(t.length<2)return null;let e=g0(t[0]);if(!e)return null;let n=t[1],r=g1(e,n,"L"===n.action?1:.1);if(!r||!e)return null;let i=Math.atan2(r.y-e.y,r.x-e.x),a=g0(t[t.length-1]);if(!a)return null;let s=g2(n.action,{start:a,end:e},{start:r,end:e});return s?{radian:i,endPoint:e,lineLengthSquare:s}:null}(i.path):function(t){if(t.length<2)return null;let e=g0(t[t.length-2]);if(!e)return null;let n=t[t.length-1],r=g1(e,n,.9*("L"!==n.action)),i=g0(t[t.length-1]);if(!r||!i)return null;let a=Math.atan2(r.y-i.y,r.x-i.x),s=g0(t[0]);if(!s)return null;let o=g2(n.action,{start:s,end:i},{start:r,end:i});return o?{radian:a,endPoint:i,lineLengthSquare:o}:null}(i.path);return n?this.getTransformedArrowPaths(t,a,r,n.radian,n.endPoint,n.lineLengthSquare):null}).reduce((t,e)=>(e&&e.forEach(e=>{t.push(Object.assign(e,{define:gD(e.path)}))}),t),[]);return i.define=gD(i.path),s}getTransformedArrowPaths(t,e,n,r,i,a){let s=t in gK&&gK[t]||null;if(!s)return[];let o=s.getPaths(e,n),l=s.getLength(e,n),h=a<l*l;return this.transformArrowPaths(o,l,i,r,h),h||this.transformLineEndPoint(i,l,r,n),o}transformArrowPaths(t,e,n,r,i){let a;a=aw.createTranslate(n.x,n.y),a=aw.rotate(a,r*tc),i&&(a=aw.translate(a,-(e-1.5),0)),t.forEach(t=>{let{path:e}=t;for(let t=e.length-1;t>=0;--t){let n=e[t];gR(n)&&(e[t]=aw.apply(n,a))}})}transformLineEndPoint(t,e,n,r){let i=e-r/2;t.x+=i*Math.cos(n),t.y+=i*Math.sin(n)}getLineArrowPaths(t,e,n,r){let i=this.getPaths(t),a=this.getTransformedArrowGeometryPaths(i,e,n,r);return{line:i,arrow:a}}}class g4 extends gB{getGeometryType(){return"rect"}}class g8 extends g4{getDefaultTransform(){return null}getDefaultStrokeConfig(){return{stroke:"#000000","stroke-opacity":1,"stroke-width":1}}getDefaultFillConfig(){return{fill:"#ffffff","fill-opacity":1}}}class g3 extends gB{getGeometryType(){return"customGeometry"}}function g6(t){return t.reduce((t,e)=>{let n=new e;return t[n.getGeometryType()]=n,t},Object.create(null))}let g7=g6([g5,class extends g5{getGeometryType(){return"connect_line"}},class extends g5{getGeometryType(){return"curvedConnector2"}},class extends g5{getGeometryType(){return"curvedConnector3"}},class extends g5{getGeometryType(){return"curvedConnector4"}},class extends g5{getGeometryType(){return"curvedConnector5"}},class extends g5{getGeometryType(){return"bentConnector2"}},class extends g5{getGeometryType(){return"bentConnector4"}},class extends g5{getGeometryType(){return"bentConnector5"}},class extends g5{getGeometryType(){return"straightConnector1"}},class extends g5{getGeometryType(){return"lineInv"}}]),g9={text:new g8,title:new g8,sub_title:new g8,body:new g8},ft=g6([g4,class extends gB{getGeometryType(){return"rect_round"}},class extends gB{getGeometryType(){return"rect_single_snip"}},class extends gB{getGeometryType(){return"rect_snip_same_side"}},class extends gB{getGeometryType(){return"rect_snip_diagonal"}},class extends gB{getGeometryType(){return"rect_snip_round"}},class extends gB{getGeometryType(){return"rect_single_round"}},class extends gB{getGeometryType(){return"rect_round_same_side"}},class extends gB{getGeometryType(){return"rect_round_diagonal"}},class extends gB{getGeometryType(){return"ellipse"}},class extends gB{getGeometryType(){return"triangle"}},class extends gB{getGeometryType(){return"right_triangle"}},class extends gB{getGeometryType(){return"parallelogram"}},class extends gB{getGeometryType(){return"trapezoid"}},class extends gB{getGeometryType(){return"diamond"}},class extends gB{getGeometryType(){return"pentagon"}},class extends gB{getGeometryType(){return"hexagon"}},class extends gB{getGeometryType(){return"heptagon"}},class extends gB{getGeometryType(){return"octagon"}},class extends gB{getGeometryType(){return"decagon"}},class extends gB{getGeometryType(){return"dodecagon"}},class extends gB{getGeometryType(){return"pie"}},class extends gB{getGeometryType(){return"chord"}},class extends gB{getGeometryType(){return"rect_frame"}},class extends gB{getGeometryType(){return"half_frame"}},class extends gB{getGeometryType(){return"l_shape"}},class extends gB{getGeometryType(){return"diagonal_stripe"}},class extends gB{getGeometryType(){return"cross"}},class extends gB{getGeometryType(){return"plaque"}},class extends gB{getGeometryType(){return"can"}},class extends gB{getGeometryType(){return"cube"}},class extends gB{getGeometryType(){return"bevel"}},class extends gB{getGeometryType(){return"donut"}},class extends gB{getGeometryType(){return"block_arc"}},class extends gB{getGeometryType(){return"folded_corner"}},class extends gB{getGeometryType(){return"lightning_bolt"}},class extends gB{getGeometryType(){return"moon"}},class extends gB{getGeometryType(){return"4_point_star"}},class extends gB{getGeometryType(){return"arrow"}},class extends gB{getGeometryType(){return"arrow_left"}},class extends gB{getGeometryType(){return"arrow_up"}},class extends gB{getGeometryType(){return"arrow_down"}},class extends gB{getGeometryType(){return"arrow_left_right"}getDefaultRectData(){return{...super.getDefaultRectData(),w:120,h:80}}},class extends gB{getGeometryType(){return"arrow_up_down"}getDefaultRectData(){return{...super.getDefaultRectData(),w:80,h:120}}},class extends gB{getGeometryType(){return"arrow_striped"}},class extends gB{getGeometryType(){return"arrow_notched"}},class extends gB{getGeometryType(){return"arrow_pentagon"}},class extends gB{getGeometryType(){return"arrow_chevron"}},class extends gB{getGeometryType(){return"bentArrow"}},class extends gB{getGeometryType(){return"curvedRightArrow"}},class extends gB{getGeometryType(){return"curvedLeftArrow"}},class extends gB{getGeometryType(){return"curvedUpArrow"}},class extends gB{getGeometryType(){return"curvedDownArrow"}},class extends gB{getGeometryType(){return"bentUpArrow"}},class extends gB{getGeometryType(){return"leftUpArrow"}},class extends gB{getGeometryType(){return"leftRightUpArrow"}},class extends gB{getGeometryType(){return"quadArrow"}},class extends gB{getGeometryType(){return"uturnArrow"}},class extends gB{getGeometryType(){return"accentBorderCallout1"}},class extends gB{getGeometryType(){return"accentBorderCallout2"}},class extends gB{getGeometryType(){return"accentBorderCallout3"}},class extends gB{getGeometryType(){return"accentCallout1"}},class extends gB{getGeometryType(){return"accentCallout2"}},class extends gB{getGeometryType(){return"accentCallout3"}},class extends gB{getGeometryType(){return"arc"}},class extends gB{getGeometryType(){return"borderCallout1"}},class extends gB{getGeometryType(){return"borderCallout2"}},class extends gB{getGeometryType(){return"borderCallout3"}},class extends gB{getGeometryType(){return"bracePair"}},class extends gB{getGeometryType(){return"bracketPair"}},class extends gB{getGeometryType(){return"callout1"}},class extends gB{getGeometryType(){return"callout2"}},class extends gB{getGeometryType(){return"callout3"}},class extends gB{getGeometryType(){return"circularArrow"}},class extends gB{getGeometryType(){return"cloud"}},class extends gB{getGeometryType(){return"cloudCallout"}},class extends gB{getGeometryType(){return"doubleWave"}},class extends gB{getGeometryType(){return"downArrowCallout"}},class extends gB{getGeometryType(){return"ellipseRibbon"}},class extends gB{getGeometryType(){return"ellipseRibbon2"}},class extends gB{getGeometryType(){return"flowChartAlternateProcess"}},class extends gB{getGeometryType(){return"flowChartCollate"}},class extends gB{getGeometryType(){return"flowChartConnector"}},class extends gB{getGeometryType(){return"flowChartDecision"}},class extends gB{getGeometryType(){return"flowChartDelay"}},class extends gB{getGeometryType(){return"flowChartDisplay"}},class extends gB{getGeometryType(){return"flowChartDocument"}},class extends gB{getGeometryType(){return"flowChartExtract"}},class extends gB{getGeometryType(){return"flowChartInputOutput"}},class extends gB{getGeometryType(){return"flowChartInternalStorage"}},class extends gB{getGeometryType(){return"flowChartMagneticDisk"}},class extends gB{getGeometryType(){return"flowChartMagneticDrum"}},class extends gB{getGeometryType(){return"flowChartMagneticTape"}},class extends gB{getGeometryType(){return"flowChartManualInput"}},class extends gB{getGeometryType(){return"flowChartManualOperation"}},class extends gB{getGeometryType(){return"flowChartMerge"}},class extends gB{getGeometryType(){return"flowChartMultidocument"}},class extends gB{getGeometryType(){return"flowChartOffpageConnector"}},class extends gB{getGeometryType(){return"flowChartOnlineStorage"}},class extends gB{getGeometryType(){return"flowChartOr"}},class extends gB{getGeometryType(){return"flowChartPredefinedProcess"}},class extends gB{getGeometryType(){return"flowChartPreparation"}},class extends gB{getGeometryType(){return"flowChartProcess"}},class extends gB{getGeometryType(){return"flowChartPunchedCard"}},class extends gB{getGeometryType(){return"flowChartPunchedTape"}},class extends gB{getGeometryType(){return"flowChartSort"}},class extends gB{getGeometryType(){return"flowChartSummingJunction"}},class extends gB{getGeometryType(){return"flowChartTerminator"}},class extends gB{getGeometryType(){return"heart"}},class extends gB{getGeometryType(){return"horizontalScroll"}},class extends gB{getGeometryType(){return"irregularSeal1"}},class extends gB{getGeometryType(){return"irregularSeal2"}},class extends gB{getGeometryType(){return"leftArrowCallout"}},class extends gB{getGeometryType(){return"leftBrace"}},class extends gB{getGeometryType(){return"leftBracket"}},class extends gB{getGeometryType(){return"leftRightArrowCallout"}},class extends gB{getGeometryType(){return"mathDivide"}},class extends gB{getGeometryType(){return"mathEqual"}},class extends gB{getGeometryType(){return"mathMinus"}},class extends gB{getGeometryType(){return"mathMultiply"}},class extends gB{getGeometryType(){return"mathNotEqual"}},class extends gB{getGeometryType(){return"mathPlus"}},class extends gB{getGeometryType(){return"noSmoking"}},class extends gB{getGeometryType(){return"quadArrowCallout"}},class extends gB{getGeometryType(){return"ribbon"}},class extends gB{getGeometryType(){return"ribbon2"}},class extends gB{getGeometryType(){return"rightArrowCallout"}},class extends gB{getGeometryType(){return"rightBrace"}},class extends gB{getGeometryType(){return"rightBracket"}},class extends gB{getGeometryType(){return"smileyFace"}},class extends gB{getGeometryType(){return"star10"}},class extends gB{getGeometryType(){return"star12"}},class extends gB{getGeometryType(){return"star16"}},class extends gB{getGeometryType(){return"star24"}},class extends gB{getGeometryType(){return"star32"}},class extends gB{getGeometryType(){return"star5"}},class extends gB{getGeometryType(){return"star6"}},class extends gB{getGeometryType(){return"star7"}},class extends gB{getGeometryType(){return"star8"}},class extends gB{getGeometryType(){return"sun"}},class extends gB{getGeometryType(){return"teardrop"}},class extends gB{getGeometryType(){return"upArrowCallout"}},class extends gB{getGeometryType(){return"verticalScroll"}},class extends gB{getGeometryType(){return"wave"}},class extends gB{getGeometryType(){return"wedgeEllipseCallout"}},class extends gB{getGeometryType(){return"wedgeRectCallout"}},class extends gB{getGeometryType(){return"wedgeRoundRectCallout"}}]),fe={...g7,...g9,...ft};function fn(t){return t in fe&&fe[t]||null}let fr=new WeakMap;function fi(t){let e=fr.get(t);if(e)return e;let n=new g3(t);return fr.set(t,n),n}function fa(t,e,n,r){return t<e?Math.min(t,e-n):t>e?Math.max(t,e+n):e+(r?n:-n)}function fs(t){return(t=mod(t,360))<=45||t>=315?"e":t<135?"s":t<=225?"w":"n"}class fo{constructor(t,e,n,r,i){this.geometry=t,this.data=e,this.strokeConfig=n,this.fillConfig=r,this.rectData=null,this.textRect=null,this.displayRect=null,this.adjustData=null,this.rawPaths=null,this.detailedPaths=null,this.allPaths=null}getGeometry(){return this.geometry}getGeometryType(){return this.getGeometry().getGeometryType()}getPresetName(){return this.getGeometry().getPresetType()}isGeometry(t){return this.getGeometry().is(t)}isGeometryLine(){return this.getGeometry().isLine()}getGeometryData(){return this.data}getArrowHead(){return"none"}getArrowTail(){return"none"}getRectLeft(){return this.getGeometryData().l}getRectTop(){return this.getGeometryData().t}getRectRight(){return this.getGeometryData().r}getRectBottom(){return this.getGeometryData().b}getRectWidth(){return this.getGeometryData().w}getRectHeight(){return this.getGeometryData().h}getRectCenter(){let{l:t,t:e,r:n,b:r}=this.getGeometryData();return{x:(t+n)/2,y:(e+r)/2}}computeRectData(){return this.getGeometry().extractRectData(this.getGeometryData())}getRectData(){return this.rectData||(this.rectData=this.computeRectData())}computeTextRect(){return this.getGeometry().getTextRect(this.getGeometryData())}getTextRect(){return this.textRect||(this.textRect=this.computeTextRect())}computeDisplayRect(){if(this.isGeometryLine())return{...this.getRectData()};let t=this.getGeometryData(),e=Math.min(t.l,t.r),n=Math.max(t.l,t.r),r=Math.min(t.t,t.b),i=Math.max(t.t,t.b);return this.getRawPaths().forEach(t=>{t.path.forEach(t=>{gR(t)&&(e=Math.min(e,t.x),n=Math.max(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.y))})}),{l:e,t:r,r:n,b:i,w:n-e,h:i-r}}getDisplayRect(){return this.displayRect||(this.displayRect=this.computeDisplayRect())}computeAdjustData(){return this.getGeometry().extractAdjustData(this.getGeometryData())}getAdjustData(){return this.adjustData||(this.adjustData=this.computeAdjustData())}renderAdjustPoints(){let t=this.getGeometryData();return this.getGeometry().getAdjustHandles().map(e=>e.pos(t))}getAdjustHandles(){return this.getGeometry().getAdjustHandles()}getConnectionHandles(){return this.getGeometry().getConnectionHandles()}getConnectionData(t){let e=this.getConnectionHandles().at(t);if(!e)return;let n=this.getGeometryData();return{pos:e.pos(n),ang:e.ang(n)/6e4}}computeRawPaths(){return this.getGeometry().getPaths(this.getGeometryData())}getRawPaths(){return this.rawPaths||(this.rawPaths=this.computeRawPaths())}computeDetailedPaths(){let t=this.getGeometry();if(!t.isLine())return{content:this.getRawPaths().slice(),decoration:[]};{let e=t.getLineArrowPaths(this.getGeometryData(),this.getArrowHead(),this.getArrowTail(),this.getStrokeWidth());return{content:e.line,decoration:e.arrow}}}getDetailedPaths(){return this.detailedPaths||(this.detailedPaths=this.computeDetailedPaths())}getContentPaths(){return this.getDetailedPaths().content}getDecorationPaths(){return this.getDetailedPaths().decoration}computeAllPaths(){return[...this.getContentPaths(),...this.getDecorationPaths()]}getAllPaths(){return this.allPaths||(this.allPaths=this.computeAllPaths())}getPaths(t){switch(void 0===t&&(t="all"),t){case"raw":return this.getRawPaths();case"content":return this.getContentPaths();case"decoration":return this.getDecorationPaths();default:return this.getAllPaths()}}_drawPathAttrs(t,e){void 0===e&&(e=m);let{stroke:n,fill:r}=e;return t.map(t=>{let e={d:t.define};if(!1!==n&&t.stroke&&Object.assign(e,this.getStrokeConfig(),n&&this.getGeometry().extractStrokeConfig(n)),!1!==r&&"none"!==t.fill){let n;if(this.isGeometryLine()){let t=this.getStrokeConfig();t.stroke&&(n={fill:t.stroke,"fill-opacity":t["stroke-opacity"]||1})}else n=this.getFillConfig();Object.assign(e,n,r&&this.getGeometry().extractFillConfig(r)),e.fill&&(e.fill=this.getGeometry().getFillColor(t.fill,e.fill))}return e})}drawRawPathAttrs(t){return this._drawPathAttrs(this.getRawPaths(),t)}drawContentPathAttrs(t){return this._drawPathAttrs(this.getContentPaths(),t)}drawDecorationPathAttrs(t){return this._drawPathAttrs(this.getDecorationPaths(),t)}drawAllPathAttrs(t){return this._drawPathAttrs(this.getAllPaths(),t)}drawPathAttrs(t){return this._drawPathAttrs(this.getPaths(t?.type),t)}getStrokeConfig(){return this.strokeConfig}getFillConfig(){return this.fillConfig}getStroke(){return this.getStrokeConfig().stroke||"transparent"}getStrokeWidth(){return this.getStrokeConfig()["stroke-width"]||0}copy(t,e,n,r,i){return new this.constructor(t||this.getGeometry(),e||this.getGeometryData(),n||this.getStrokeConfig(),r||this.getFillConfig())}updateGeometryData(t,e){return this.copy(null,this.getGeometry().createGeometryData({...this.getRectData(),...t},{...this.getAdjustData(),...e}),null,null,null)}clearAdjustData(){return this.copy(null,this.getGeometry().createGeometryData(this.getRectData()),null,null,null)}resize(t,e){return this.updateGeometryData({w:t,h:e})}setAdjustPoint(t,e){let n=this.getAdjustHandles().at(t);if(!n)return this;let r={...this.getGeometryData()};return n.handler(e.x,e.y,r),this.getGeometry().updateGeometryData(r),this.copy(null,r,null,null,null)}updateStrokeFillConfig(t,e){let n=this.getGeometry();return this.copy(null,null,null==t?null:n.createStrokeConfig(t?{...this.getStrokeConfig(),...t}:t),null==e?null:n.createFillConfig(e?{...this.getFillConfig(),...e}:e),null)}updatePathConfig(t){return this.updateStrokeFillConfig(t,t)}clearFormat(){let t=this.getGeometry();return this.copy(null,null,t.createStrokeConfig(),t.createFillConfig(),null)}static create(t,e,n,r,i,a,s){let o;return(o="customGeometry"===t?a?fi(a):null:fn(t))?new this(o,o.createGeometryData(e,n),o.createStrokeConfig(r),o.createFillConfig(i),s):null}}function fl(t,e){let{x:n,y:r}=e,{l:i,t:a,r:s,b:o,w:l,h}=t;return{l:n+i,t:r+a,r:n+s,b:r+o,w:l,h}}class fh extends fo{static #t=this.defaults=Object.create(null);constructor(t,e,n,r,i){super(t,e,n,r),this.config=i,this.imageRect=null,this.viewRect=null,this.paddingRect=null,this.clientViewRect=null,this.clientPaddingRect=null}getCustomConfig(){return this.config}extractShapeConfig(){let{w:t,h:e}=this.getRectData();return{...this.getCustomConfig(),schema:void 0,width:t,height:e,customized_points:this.getAdjustData(),...{stroke:"transparent","stroke-opacity":1,"stroke-width":1,...this.getStrokeConfig()},...{fill:"transparent","fill-opacity":1,...this.getFillConfig()}}}getDrawingSchema(){return this.getCustomConfig().schema}getAnchoryType(){return"break"===this.getCustomConfig().alignment?"absolute":"inline"}isInline(){return"inline"===this.getAnchoryType()}getZOrder(){return this.getCustomConfig().order||0}isFlipHorizontal(){return this.getCustomConfig().flip_h||!1}isFlipVertical(){return this.getCustomConfig().flip_v||!1}getRotateDegree(){return this.getCustomConfig().deg||0}getRotateRadian(){return this.getRotateDegree()*tu}getViewDegree(){let t=this.getRotateDegree();return this.isFlipVertical()&&(t=D(t+180,360)),t}getArrowHead(){return this.isGeometryLine()&&"arrow"===this.getCustomConfig().start_marker?"triangle":"none"}getArrowTail(){return this.isGeometryLine()&&"arrow"===this.getCustomConfig().end_marker?"triangle":"none"}getImageFileId(){return this.getCustomConfig().file_id||""}getImageCrop(){return this.getCustomConfig().crop||{l:0,t:0,r:0,b:0}}isImageCropped(){let t=this.getCustomConfig().crop;return!!t&&!!(t.l||t.t||t.r||t.b)}computeImageRect(){let t=this.getImageCrop(),e=this.getRectData();if(!t)return{...e};let n=t.l/1e5,r=t.t/1e5,i=t.r/1e5,a=t.b/1e5,s=e.w/(1-n-i),o=e.h/(1-r-a),l=-(s*n),h=-(o*r);return{l,t:h,w:s,h:o,r:l+s,b:h+o}}getImageRect(){return this.imageRect||(this.imageRect=this.computeImageRect())}getPosition(){let t=this.getCustomConfig();return{x:t.left||0,y:t.top||0}}getCenterPosition(){let{x:t,y:e}=this.getRectCenter(),n=this.getPosition();return n.x+=t,n.y+=e,n}computeViewRect(){let t=this.getRotateRadian(),e=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t)),{l:r,t:i,w:a,h:s}=this.getDisplayRect(),o=a*n+s*e,l=a*e+s*n,h=r+a/2-o/2,u=i+s/2-l/2;return{l:h,t:u,w:o,h:l,r:h+o,b:u+l}}getViewRect(){return this.viewRect||(this.viewRect=this.computeViewRect())}getViewPadding(){let t=this.getStrokeWidth(),e=this.getCustomConfig();return{l:t+(e.paddingLeft||0),t:t+(e.paddingTop||0),r:t+(e.paddingRight||0),b:t+(e.paddingBottom||0)}}computePaddingRect(){let t=this.getViewRect(),e=this.getViewPadding(),n=t.l-e.l,r=t.t-e.t,i=t.r+e.r,a=t.b+e.b;return{l:n,t:r,r:i,b:a,w:i-n,h:a-r}}getPaddingRect(){return this.paddingRect||(this.paddingRect=this.computePaddingRect())}computeClientViewRect(){return fl(this.getViewRect(),this.getPosition())}getClientViewRect(){return this.clientViewRect||(this.clientViewRect=this.computeClientViewRect())}computeClientPaddingRect(){return fl(this.getPaddingRect(),this.getPosition())}getClientPaddingRect(){return this.clientPaddingRect||(this.clientPaddingRect=this.computeClientPaddingRect())}computeViewMatrix(t){let e,{location:n=!1,locationRound:r=!1,flipMode:i,originateCenter:a=!1}=void 0===t?m:t,s=nC.create();if(n){let{x:t,y:e}=this.getPosition();r&&(t=Math.round(t),e=Math.round(e)),s.translate(t,e)}let{x:o,y:l}=this.getRectCenter();s.rotate(this.getRotateDegree(),o,l),i&&("horizontal"===i?e=this.isFlipHorizontal():"vertical"===i&&(e=this.isFlipVertical()));let h=e??this.isFlipHorizontal(),u=e??this.isFlipVertical();if((h||u)&&s.translate(h?2*o:0,u?2*l:0).scale(h?-1:1,u?-1:1),a){let{x:t,y:e}=this.getRectCenter();s.prependTranslate(-t,-e).translate(t,e)}return s}renderTransform(t){return this.computeViewMatrix(t).toString()}copy(t,e,n,r,i){return new this.constructor(t||this.getGeometry(),e||this.getGeometryData(),n||this.getStrokeConfig(),r||this.getFillConfig(),i||this.getCustomConfig())}updateCustomConfig(t){return this.copy(null,null,null,null,{...this.getCustomConfig(),...t})}translateTo(t,e){return this.updateCustomConfig({left:t,top:e})}translate(t,e){let n=this.getPosition();return this.translateTo(n.x+t,n.y+e)}rotateTo(t){return this.updateCustomConfig({deg:D(t,360)})}rotate(t){return this.rotateTo(this.getRotateDegree()+t)}flipTo(t,e){void 0===t&&(t=this.isFlipHorizontal()),void 0===e&&(e=this.isFlipVertical());let n=0;t!==this.isFlipHorizontal()&&++n,e!==this.isFlipVertical()&&++n;let r=this.updateCustomConfig({flip_h:t,flip_v:e});return n%2!=0&&(r=r.rotateTo(-r.getRotateDegree())),r}flip(t,e){let n=this.isFlipHorizontal(),r=this.isFlipVertical();return this.flipTo(t?!n:n,e?!r:r)}clearFormat(){let t="picture"===this.getDrawingSchema()?{"stroke-width":0,fill:"none"}:null,e=this.getGeometry();return this.copy(null,null,e.createStrokeConfig(t),e.createFillConfig(t),null)}resetImage(){return this.updatePathConfig({stroke:"#2E3133","stroke-width":0}).updateCustomConfig({crop:void 0})}static getGraphBaseConfig(t,e){let n=t.createRectData(),r=t.createStrokeConfig(),i=t.createFillConfig();return{prst:t.getPresetType(),left:100,top:100,flip_h:!1,flip_v:!1,deg:0,paddingLeft:2,paddingTop:4,paddingRight:2,paddingBottom:0,width:n.w,height:n.h,customized_points:{},stroke:r.stroke,"stroke-opacity":r["stroke-opacity"],"stroke-width":r["stroke-width"],fill:i.fill,"fill-opacity":i["fill-opacity"]}}static getImageBaseConfig(t,e){return{...this.getGraphBaseConfig(t,e),..."binary"===e.file_type?{width:24,height:24}:null,"stroke-width":0,fill:"none",crop:{r:0,l:0,b:0,t:0}}}static ensureShapeConfig(t){let{width:e,height:n}=t;return e&&e<0&&(t.width=-e,t.flip_h=!t.flip_h),n&&n<0&&(t.height=-n,t.flip_v=!t.flip_v),Array.isArray(t.crop)&&(t.crop=void 0),t}static createFromShape(t){let e,n,r=t.schema;if(!r)return null;e="customGeometry"===t.type?t.custGeomDefinition?fi(t.custGeomDefinition):fn("rect"):fn(t.type)||fn("connector"===r?"line":"rect"),n="picture"===r?this.getImageBaseConfig(e,t):this.getGraphBaseConfig(e,t);let{width:i,height:a}=t=this.ensureShapeConfig({...n,...t}),s=e.isLine();return this.create(e.getGeometryType(),{w:"number"==typeof i&&(s||i)?i:void 0,h:"number"==typeof a&&(s||a)?a:void 0},t.customized_points,t,t,t.custGeomDefinition,{...t,schema:r})}static getDefault(t){let e=this.defaults;if(!e[t]){let n=this.createFromShape({schema:t});if(!n)throw Error(`Failed to create default ${t} geometry info.`);e[t]=n}return e[t]}}class fu extends r0{static getSelfPropertyName(){return"Drawing"}get attrs(){return{id:nH.create({default:J,copyable:!1}),config:nH.create({default:{}})}}getCustomizeColors(t){let e=t.getAttrValue("config");return[e.fill,e.stroke]}getObjectSize(t){let e=t.getState("geometryInfo");if(!e)return{width:0,height:0};let{w:n,h:r}=e.getPaddingRect();return{width:n,height:r}}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.SELF_START,this.name,"set_geometry",null,t=>{t.setState("geometryInfo",fh.createFromShape({...t.getAttrValue("config"),schema:t.type.name}))})}parseAttrsFromDom(t,e,n){let r;super.parseAttrsFromDom(t,e,n);try{let t=e.getAttribute("graph-config");t&&(r=JSON.parse(t))}catch{}if(r&&"object"==typeof r||(r=Object.create(null)),"string"==typeof r.prst&&r.prst&&!r.type){var i;let t=(i=r.prst,B(gd,t=>{if(t===i)return!0}));t&&(r.type=t)}return Object.assign(t,{id:e.getAttribute("synograph")||J(),config:r})}get matchDOMTag(){return{[`span[data-syno-schema="doc:${this.name}"]`]:(t,e)=>this.parseDOM(t,e)}}renderAttrsDom(t,e,n){super.renderAttrsDom(t,e,n);let r=e.getAttrValue("config");return Object.assign(t,{classList:[`${this.classPrefix}drawing`],synograph:"clipboard"===n.target?"":e.getAttrValue("id"),"data-syno-schema":`doc:${this.name}`,"pm-ignore":"picture"===this.name?"self":null,"graph-config":JSON.stringify(r)})}toDOM(t,e){let n,r=e.target;return n=this.is("Leaf")?null:"clipboard"===r?0:["div",null,0],["span",this.renderAttrs(null,t,e),n]}}let fc=nH.create({default:9,empty_value:0}),fd={anchor:nH.create({default:"ctr",empty_value:"t",normalizer:["t","ctr","b"]}),lIns:fc,tIns:fc,rIns:fc,bIns:fc},fp=t=>{class e extends dO(t){static getSelfPropertyName(){return"TextBox"}get needHeightCalculating(){return!0}get attrs(){return{...super.attrs,...fd}}registerSelfLocalAttrsUpdateMap(){this.registerListContainer()}}return pw(e),e};class fg extends fp(rU){static getSelfPropertyName(){return"DocumentTextBox"}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.FROM_PARENT,this.name,"set_size","Shape",(t,e)=>{let n=e.getState("geometryInfo")||fh.getDefault("shape");t.setState("width",n.getRectWidth()),t.setState("height",n.getRectHeight());let r={...n.getTextRect()},[i,a,s,o]=["l","t","r","b"].map(e=>t.getAttrValue(`${e}Ins`));if(n.isFlipHorizontal()!==n.isFlipVertical()){let t=n.getRectWidth()-r.r;r.l=t+i}else r.l+=i;r.t+=a,r.b-=o,r.w-=i+s,r.r=r.l+r.w,r.h-=a+o,t.setState("textRect",r)}),t.register(t.SELF_START,this.name,"set_text_rect_info",null,t=>{t.setState("text_rect_info",{width:Math.max(t.getState("textRect").w,0),left:0})})}toDOM(t,e){if("clipboard"===e.target)return null;let n=t.getState("width",0),r=t.getState("height",0),i=t.getState("textRect",m);return["div",this.renderAttrs({inline_style:{width:n+"px",height:r+"px"}},t,e),["div",{classList:[`${this.className}-area`],inline_style:{left:(i.l||0)+"px",top:(i.t||0)+"px",width:Math.max(i.w||0,0)+"px",height:Math.max(i.h||0,0)+"px",overflow:"hidden"}},["div",{classList:[`${this.className}-content`],inline_style:{width:"100%"}},0],["div",{classList:[`${this.className}-indicator`,"syno-o-pm-plugin-indicator-wrapper"],inline_style:{width:"100%",height:"100%"}}]]]}getIndicatorWrapperDOM(t){let e=t.firstElementChild?.lastElementChild;if(!e)throw Error("Indicator wrapper is missing.");return e}}let ff=ue.mergeSpec(pX,{name:"document",version:13,nodes:{doc:{type:class extends dY{get isDocument(){return!0}get Node(){return p2}get attrs(){let t=dN.getDefaultPageSetup(),e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=new nH({default:t[n]}));return{schema:new nH({default:13}),type:new nH({default:"document"}),page_setup:new nH({deep:e})}}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.UPDATE_START,this.name,"set_global_root_node",null,(function(t,e){e.setRootNode(t)}).bind(this)),t.register(t.SELF_START,this.name,"set_page_setup",null,(function(t,e){let n=t.state,r=t.attrs.page_setup;n.page_setup=r,e.setPageSetup(t.attrs.page_setup);let i=dN.getPageSizeByType(t.attrs.page_setup.page_type,r.orientation);n.page_size=i,e.setPageSize(i);let a=dN.getPagePadding(t.attrs.page_setup);n.page_padding=a,e.setPagePadding(a);let s=dN.getPageContentSize(i,a);n.page_content_size=s,e.setPageContentSize(s);let o=dN.getDecorateMaxHeight(s);return n.page_decorate_height=o,e.setPageDecorateHeight(o),rg.STATE_UPDATE}).bind(this))}},content:"settings style_editor invisible edit_area page_decorate"},settings:{type:class extends dX{static getSelfPropertyName(){return"DocumentSettings"}get attrs(){return{finalSection:p1}}getFileId(t){return t.getAttrValue("finalSection")?.watermark?.config?.fileId}getCustomizeColors(t){return t.getAttrValue("finalSection")?.watermark?.config?.color}}},style_editor:{type:gn,content:p4.map(t=>{let{id:e,level:n}=t;return"style_paragraph"+(n>=0?`[headingId="${e}",headingLevel=${n}]`:"")}).join(" ")},style_paragraph:{type:gi,content:"inline<_>*"},invisible:{type:class extends rZ{get isInvisible(){return!0}get printable(){return!1}get matchDOMTag(){return{"div[syno_invisible]":null}}toDOM(t,e){return["div",this.renderAttrs({syno_invisible:"true"},t,e),0]}},content:"drawing*"},edit_area:{type:gs,content:"basic_block (block | first_level_block)*"},page:{type:class extends rU{get isPage(){return!0}get isPseudoType(){return!0}get attrs(){return{width:nH.create(),height:nH.create(),marginLeft:nH.create(),marginTop:nH.create(),marginRight:nH.create(),marginBottom:nH.create(),decoratorMaxHeight:nH.create()}}getBodyDOM(t){return t.firstChild}getDecoratorDOM(t,e){switch(e){case"header":return this.getHeaderDOM(t);case"footer":return this.getFooterDOM(t);case"page_num":return this.getPageNumberDOM(t);default:throw Error(`Invalid decorator type. (${e})`)}}getHeaderDOM(t){return e3(this.getBodyDOM(t),".syno-o-doc-pm-page-header")}getContentDOM(t){return e3(this.getBodyDOM(t),".syno-o-doc-pm-page-content")}getFooterDOM(t){return e3(this.getBodyDOM(t),".syno-o-doc-pm-page-footer")}getPageNumberDOM(t){return e3(this.getBodyDOM(t),".syno-o-doc-pm-page-page-number")}getEditableAreaDOM(t){return this.getContentDOM(t).firstChild.firstChild}getGraphContainerDOM(t){return this.getContentDOM(t).childNodes[1]}toDOM(t,e){let{width:n,height:r,marginLeft:i,marginTop:a,marginRight:s,marginBottom:o,decoratorMaxHeight:l}=t.attrs;return["div",{class:"syno-o-doc-pm-page",inline_style:{width:n+"px",height:r+"px"}},["div",{class:"syno-o-doc-pm-page-body"},["div",{class:"syno-o-doc-pm-page-decorator syno-o-doc-pm-page-header",inline_style:{width:n+"px",minHeight:a+"px",maxHeight:l+"px"}}],["div",{class:"syno-o-doc-pm-page-content",inline_style:{width:n+"px"}},["div",{class:"syno-o-doc-pm-page-content-padding",inline_style:{marginLeft:i+"px",marginRight:s+"px"}},["div",{class:"syno-o-doc-pm-page-content-container",editable:"true","syno-paginated":"false",synoedit:"true",inline_style:{width:n-i-s+"px"}},0]],["div",{class:"syno-o-doc-graph-container"}]],["div",{class:"syno-o-doc-pm-page-decorator syno-o-doc-pm-page-footer",inline_style:{width:n+"px",minHeight:o+"px",maxHeight:l+"px"}}],["div",{class:"syno-o-doc-pm-page-decorator syno-o-doc-pm-page-page-number"}]]]}},content:"block*"},table:{type:class extends uM{get attrs(){return{...super.attrs,align:dF.textAlign.copy({clearable:!1}),indent:nH.createOptional({empty_value:0})}}getTextRectInfo(t,e){let n,{left:r,width:i}=t.state.parent_text_rect_info||{left:0,width:0},a=t.state.width,s=t.getAttrValue("align");return{left:r+("center"===s||"justify"===s?(i-a)/2:"right"===s?i-a:t.getAttrValue("indent")||0),width:a}}renderAttrsJson(t,e,n){return super.renderAttrsJson(t,e,n),["align","indent"].forEach(n=>{let r=e.getAttrValue(n);null!=r&&(t[n]=r)}),t}toDOM(t,e){let n=super.toDOM(t,e),r=e.target,i="editor"===r||"viewer"===r||"general"===r,a=n[1]={...n[1]},s=a.inline_style={...a.inline_style},o=t.state.parent_text_rect_info.width,l=t.state.width,h=t.getAttrValue("align");if("center"===h||"justify"===h)s["margin-left"]=s["margin-right"]=i?`${(o-l)/2}px`:"auto";else{let e="right"===h?0:t.getAttrValue("indent")||0;s[`margin-${"right"===h?"right":"left"}`]=`${e}px`,s[`margin-${"right"===h?"left":"right"}`]=i?`${o-l-e}px`:"auto"}return n}}},paragraph:{type:class extends ge{static getSelfPropertyName(){return"DocumentParagraph"}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.UPDATE_START,this.name,"inherit_style",null,(t,e)=>{let n=e.getCustomStyle(t.getAttrValue("headingId")?t.getAttrValue("headingLevel"):-1)||m,r=t.state;return r.inherited_text_marks_json===n.marks_json&&r.inherited_text_marks===n.marks&&r.inherited_css_attrs===n.css&&r.inherited_tab_attrs===n.tab?rg.STATE_NONE:(r.inherited_text_marks_json=n.marks_json,r.inherited_text_marks=n.marks,r.inherited_css_attrs=n.css,r.inherited_tab_attrs=n.tab,r.inherit=!0,rg.STATE_UPDATE)}),t.register(t.UPDATE_END,this.name,"clear_inherit_flag",null,t=>{t.state.inherit=!1})}}},navigation:{type:class extends rJ{get isNavigation(){return!0}get unbreakable(){return!0}get selectionExtendable(){return!0}get deleteWhenEmpty(){return!0}getLeftPaddingWidth(t){return 8}getRightPaddingWidth(t){return 12}getTopPaddingHeight(t){return 8}getBottomPaddingHeight(t){return 8}getTextRectInfo(t,e){let n=t.type.getLeftPaddingWidth(t),r=t.type.getRightPaddingWidth(t),i=super.getTextRectInfo(t,e);return{left:i.left+n,width:i.width-(n+r)}}get matchDOMTag(){return{nav:(t,e)=>this.parseDOM(t,e)}}renderBlockStructure(t,e){return["nav",this.renderAttrs(Object.create(null),t,e),0]}},content:"basic_block block*"},horizontal_rule:{type:class extends r${get isHorizontalRule(){return!0}get forceJoinBackward(){return!0}getTopPaddingHeight(t){return 7}getBottomPaddingHeight(t){return 7}get matchDOMTag(){return{hr:(t,e)=>this.parseDOM(t.parentNode&&t.parentNode.hasAttribute("data-syno-hr")?t.parentNode:t,e)}}renderBlockStructure(t,e){return["div",this.renderAttrs({"data-syno-hr":!0,inline_style:{padding:"6px 0"}},t,e),["hr",{class:this.className+"-hr",inline_style:{margin:"0px","border-width":"1px"}}]]}}},page_break:{type:class extends r${get isPageBreak(){return!0}get forceJoinBackward(){return!0}get matchDOMTag(){return{"div[data-syno-page-break]":(t,e)=>this.parseDOM(t,e)}}renderBlockStructure(t,e){return["div",this.renderAttrs({"data-syno-page-break":!0},t,e)]}}},image:{type:class extends r0{get isImage(){return!0}get hasCss(){return!0}get cssAttrs(){return{width:new nH({default:""}),height:new nH({default:""})}}get attrs(){return K(this.cssAttrs,{src:new nH({default:""}),alt:new nH({default:""}),ref:new nH({default:""}),file_id:new nH({default:""}),file_type:new nH({default:"binary"}),config:new nH({default:""})})}getFileId(t){return t.attrs.file_id}getObjectSize(t){let e=ng(t.getAttrValue("width"),"px"),n=ng(t.getAttrValue("height"),"px");return{width:isNaN(e)?0:e,height:isNaN(n)?0:n}}getObjectBorder(t){return{left:2,top:2,right:2,bottom:2}}get matchDOMTag(){return{"img[src]":t=>({src:t.getAttribute("src"),alt:t.getAttribute("alt")||null,ref:t.getAttribute("ref")||"",file_id:t.getAttribute("file-id")||null,file_type:t.getAttribute("file-type")||null,config:t.getAttribute("graph-config")||null,width:t.style.width||"",height:t.style.height||""})}}toDOM(t,e){let n=e.target;return"binary"===(t.attrs.file_type??"binary")?["span",this.renderAttrs({synoimg:"true",inline_style:{border:"2px solid transparent"}},t,e),t.attrs.file_id?t.attrs.alt:""]:["span",this.renderAttrs({synoimg:"true","pm-ignore":!0,inline_style:{position:"relative",width:t.attrs.width,height:t.attrs.height,padding:"clipboard"===n?void 0:"2px"}},t,e),["img",{"file-id":t.attrs.file_id,"file-type":t.attrs.file_type,alt:t.attrs.alt,"graph-config":t.attrs.config,inline_style:{display:"block",position:"absolute",width:t.attrs.width,height:t.attrs.height}}]]}}},chart:{type:class extends r0{get isChart(){return!0}get sizeRatio(){return 410/560}get attrs(){return{synochart:new nH({default:J,copyable:!1}),data:new nH({default:l7.createDefaultData(),normalizer:l7.ensureData.bind(l7)}),config:nH.optional,width:new nH({default:"560px"}),height:new nH({default:"410px"})}}getObjectSize(t){let e=ng(t.getAttrValue("width"),"px"),n=ng(t.getAttrValue("height"),"px");return{width:isNaN(e)?0:e,height:isNaN(n)?0:n}}getObjectBorder(t){return{left:2,top:2,right:2,bottom:2}}get matchDOMTag(){return{"span[synochart]":t=>{let e,n;try{e=JSON.parse(t.getAttribute("data-data"))}catch{}Array.isArray(e)||(e=null);try{n=JSON.parse(t.getAttribute("config"))}catch{}return"[object Object]"!==Object.prototype.toString.call(n)&&(n=null),{synochart:t.getAttribute("synochart")||Y(t.ownerDocument,"synochart"),data:e,config:n,width:t.style.width||"",height:t.style.height||""}}}}toDOM(t,e){let n=e.target;return["span",this.renderAttrs({synochart:t.attrs.synochart,"data-data":JSON.stringify(t.attrs.data),config:JSON.stringify(t.attrs.config),inline_style:{width:t.attrs.width,height:t.attrs.height,padding:"clipboard"===n?void 0:"2px"}},t,e)]}}},shape:{type:class extends fu{static getSelfPropertyName(){return"Shape"}parseContentSyno(t,e){let n=super.parseContentSyno(t,e);if(!n)return null;try{let t=this.create(null,n),e=[];t.descendants((t,n)=>{if(t.is("Shape"))return e.push({from:n,to:n+t.nodeSize}),!1});for(let n=e.length-1;n>=0;--n){let{from:r,to:i}=e[n];t=t.replace(r,i)}return t.content}catch{}return n}renderContentSyno(t,e){return t.content}},content:"text_box"},connector:{type:class extends fu{static getSelfPropertyName(){return"Connector"}}},picture:{type:class extends fu{static getSelfPropertyName(){return"Picture"}getFileId(t){return t.getAttrValue("config")?.file_id}}},text_box:{type:fg,content:"basic_block block*"},page_decorate:{type:class extends rU{get isPageDecorate(){return!0}get printable(){return!1}get attrs(){return{"place-show":new nH({default:!1}),"place-cover":new nH({default:!1}),"place-even":new nH({default:!1}),"num-show":new nH({default:!1}),"num-cover":new nH({default:!1}),"num-even":new nH({default:!1}),"num-pos":new nH({default:"br"})}}registerSelfLocalAttrsUpdateMap(){let t=this.getStateMap();t.register(t.FROM_PARENT,this.name,"set_page_content_size",null,(function(t,e){let n=t.state,r=e.state;return n.page_content_size===r.page_content_size?rg.STATE_NONE:(n.page_content_size=r.page_content_size,rg.STATE_UPDATE)}).bind(this))}get matchDOMTag(){return{"div[synodecorate]":t=>({"place-show":"true"===t.getAttribute("place-show"),"place-cover":"true"===t.getAttribute("place-cover"),"place-even":"true"===t.getAttribute("place-even"),"num-show":"true"===t.getAttribute("num-show"),"num-cover":"true"===t.getAttribute("num-cover"),"num-even":"true"===t.getAttribute("num-even"),"num-pos":t.getAttribute("num-pos")||"br"})}}toDOM(t,e){return["div",this.renderAttrs({class:"syno-o-doc-pm-decorator-container",synodecorate:!0,"place-show":String(t.attrs["place-show"]),"place-cover":String(t.attrs["place-cover"]),"place-even":String(t.attrs["place-even"]),"num-show":String(t.attrs["num-show"]),"num-cover":String(t.attrs["num-cover"]),"num-even":String(t.attrs["num-even"]),"num-pos":t.attrs["num-pos"]},t,e),0]}},content:'header[type="cover"] header[type="even"] header[type="normal"] footer[type="cover"] footer[type="even"] footer[type="normal"] page_num'},header:{type:class extends gu{get isHeader(){return!0}get decoratorType(){return"header"}},content:"basic_block block*"},footer:{type:class extends gu{get isFooter(){return!0}get decoratorType(){return"footer"}},content:"basic_block block*"},page_num:{type:class extends gh{get isPageNumber(){return!0}get decoratorType(){return"page_num"}getIndicatorWrapperDOM(t){return t}get matchDOMTag(){return{"div[synonum]":t=>({type:t.getAttribute("type")})}}getEditableAreaDOM(t){return t}toDOM(t){return["div",{synonum:"true",type:t.attrs.type},0]}},content:"page_num_block"},page_num_block:{type:class extends rY{get isPageNumberBlock(){return!0}get textDraggable(){return!1}get matchDOMTag(){return{"div[synonumblock]":null}}toDOM(t){return["div",{synonumblock:"true"},0]}},content:"page_num_text<_>"},page_num_text:{type:class extends r1{get isPageNumberText(){return!0}get copyable(){return!1}get matchDOMTag(){return{"span[synonumtext]":null}}toDOM(t){return["span",{synonumtext:"true"}]}}}},groups:{basic_block:t=>{let e=t.slice(),n=e.indexOf("paragraph")+1;return e.splice(n,0,"horizontal_rule"),e},block:t=>{let e=t.slice(),n=e.indexOf("paragraph")+1;return e.splice(n,0,"horizontal_rule","navigation"),e},first_level_block:["page_break"],inline:t=>t.concat("shape","connector","picture","image","chart"),drawing:["shape","connector","picture"]},preset:function(t){return t.nodeFrom(["doc",null,null,t.nodeFrom(["style_editor",null,null,...p4.map(t=>{let{id:e,level:n}=t;return["style_paragraph",{...n>=0?{headingId:e,headingLevel:n}:null,lineHeight:1.15}]})])],"fill")},parsers:{heading:t=>new gt},getInitialSelection:t=>{let e=t.resolve(t.queryChildOffset("edit_area",!0)+1);return iR.findNear(e,1,!0).toMultiSelection()}}),fy=new ue(ff);class fx extends oH{constructor(t,e){super(),this.version=t}isVersionMatched(t){let e=this.version;return"number"==typeof e&&e===t.type.schema.getVersion()}shouldBatchReplacement(t,e){return e.length>=5}performReplacement(t,e,n){if(this.shouldBatchReplacement(t,e)){for(let r=e.length-1;r>=0;--r){let i=n(t,e[r],r);i&&(t=t.replaceSimple(i.from,i.to,i.slice))}t=t.updateStateAndTrim()}else for(let r=e.length-1;r>=0;--r){let i=n(t,e[r],r);i&&(t=t.replace(i.from,i.to,i.slice))}return t}doApply(t,e){return this.isVersionMatched(t)?this.applyMigration(t,e):t}applyMigration(t,e){return t}posMap(t){return this.isVersionMatched(t)&&this.getMigrationPosMap(t)||ob.empty}getMigrationPosMap(t){return ob.empty}invert(){return null}map(t){return this}toJSON(t){return{stepType:this.jsonID,version:this.version}}static fromJSON(t,e){return new this(e.version,e.migration_options)}}class fm extends fx{migrateMarks(t,e){return null}migrateJsonMarks(t,e){return null}migrateAndCheckMarks(t,e,n){let r=n?this.migrateJsonMarks(t,e):this.migrateMarks(t,e);return r&&r!==t?r:null}collectActions(t){let e=[];return t.descendants((t,n)=>{if(t.type.isListContainer){let r=t.getAttrValue("listMap",!0);if(r){let i;P(r,(e,n)=>{let a,s=e&&e.configs;s&&(s.forEach((e,n)=>{let r=this.migrateAndCheckMarks(e&&e.marks||nK.none,t,!0);r&&(a||(a=s.slice()),a[n]=Object.assign(Object.create(null),e,{marks:r}))}),a&&(i||(i={...r}),i[n]=Object.assign(Object.create(null),e,{configs:a})))}),i&&e.push({pos:n,attrs:{listMap:i}})}}else if(t.type.isMarksBlock){let r=null,i=this.migrateAndCheckMarks(t.textMarksRawJSON,t,!0);if(i&&(r={textMarks:i}),t.type.isListBlock){let e=this.migrateAndCheckMarks(t.listMarksRawJSON,t,!0);e&&(r=Object.assign(r||Object.create(null),{listMarks:e}))}r&&e.push({pos:n,attrs:r})}else if(t.type.isInline){let r=this.migrateAndCheckMarks(t.marksRaw,t,!1);r&&e.push({pos:n,marks:r})}}),e}applyMigration(t){return this.performReplacement(t,this.collectActions(t),(t,e)=>{let n,{pos:r,attrs:i,marks:a}=e,s=t.resolve(r).self;return s&&(n=s.type.isInline?a?s.mark(a):void 0:i?s.copyWithAttrs(i):void 0)?{from:r,to:r+s.nodeSize,slice:rr.from(n)}:null})}}class fv extends fx{applyMigration(t){let e=this.version;return"number"!=typeof e?t:t.duplicateWithAttrs({schema:e+1})}}function fb(t){let e=nH.createMarksNormalizer(e=>{let n=t[e._];if(!n)return e;let r=n(e);return r&&r._===e._?r:{...r,_:e._}}),n=px(e);return{mixinMark:e=>class extends e{create(e){let n=t[this.name];return super.create(n?n(e):e)}},mixinMarksBlock:t=>class extends t{get attrs(){let t={...super.attrs},n=t.textMarks;if(n){let r=n.normalizer??b;t.textMarks=n.copy({normalizer:t=>e(r(t))})}let r=t.listMarks;if(r){let n=r.normalizer??b;t.listMarks=r.copy({normalizer:t=>e(n(t))})}return t}},mixinListContainer:t=>class extends t{get attrs(){let t={...super.attrs},e=t.listMap;if(e){let r=e.normalizer??b;t.listMap=e.copy({normalizer:t=>n(r(t))})}return t}}}}function fw(t,e,n){void 0===n&&(n=0);let r=e.length;for(;!e[n];){if(n>=r)return e;++n}if(!e[n].schema){let i;for(i=n;i<r&&!e[i].schema;++i);for(i<r&&(t=e[i].schema),--i;i>=n;--i)({schema:t}=function(t,e){let{_schema:n,diff:r}=e;return n?(n.prototype instanceof au||(n=n(t.constructor)),t=new n(n.mergeSpec(t.rawSpec,r))):r&&(t=t.copy(r)),e.schema=t,e.spec=t.spec,e}(t,e[i]))}return e}fv.register("migrateSchema");let fM={DOC_SCHEMA_IS_OLDER:0,DOC_SCHEMA_IS_NEWEST:1,PKG_SCHEMA_IS_OLDER:2};class f_{constructor(t,e){this.doc=t||Object.create(null),this.options=e,this.migrators=this.getMigrators(),this.docSchemaVer=this.getSchemaVer(),this.pkgSchemaVer=this.migrators.length+1}getMigrators(){throw Error("Need to be implemented")}doMigration(){let t=this.checkMigrationStatus();if(t===fM.DOC_SCHEMA_IS_OLDER)for(let t=this.docSchemaVer-1;t<this.pkgSchemaVer-1;++t)this.doc=this.migrators[t].call(this,this.doc)||this.doc;return{status:t,doc:this.doc}}getSchemaVer(){return void 0===this.doc.attrs?1:this.doc.attrs.schema}checkMigrationStatus(){return this.docSchemaVer<this.pkgSchemaVer?fM.DOC_SCHEMA_IS_OLDER:this.docSchemaVer===this.pkgSchemaVer?fM.DOC_SCHEMA_IS_NEWEST:fM.PKG_SCHEMA_IS_OLDER}static getDocType(t){return void 0===t.attrs?"document":t.attrs.type}}function fA(t,e,n,r){let i=t(e,n,r);return void 0===i?e:i}function fS(t,e){var n=t;if(!(n=function t(e,n,r,i,a){if(!(e=i.call(a,e,n,r)))return null;let s=e.content;if(s){let n;for(let r=0;r<s.length;++r){let o=s[r],l=t(o,e,r,i,a);o!==l&&(n||(n=!0,s=s.slice(),e.content=s),l?s[r]=l:(s.splice(r,1),--r))}}return e}(n,null,-1,function(t,n,r){let i=e[t.type];if(i)if(Array.isArray(i))for(let e=0;e<i.length;++e)t=fA(i[e],t,n,r);else t=fA(i,t,n,r);return t},void 0)))throw Error("Doc is null after migration.");return n}function fC(t){return function(e){e.attrs=Object.assign(Object.create(null),e.attrs),e.attrs.schema=t}}class fI{static childCount(t){return t&&t.content&&t.content.length||0}static child(t,e){return t&&t.content&&t.content[e]||null}static copy(t,e,n){let r=Object.create(null);return r.type=t.type,e?r.content=e:t.content&&(r.content=t.content),n?r.attrs=Object.assign({},t.attrs,n):t.attrs&&(r.attrs=t.attrs),t.marks&&(r.marks=t.marks),r}}let fP={type:"table_cell",content:[{type:"paragraph"}]};class fT{constructor(){this.index_map=Object.create(null),this.col_idx_min=void 0,this.col_idx_max=void 0}getAt(t,e){if(t in this.index_map&&e in this.index_map[t])return this.index_map[t][e]}setAt(t,e,n){t in this.index_map||(this.index_map[t]=Object.create(null)),this.index_map[t][e]=n,(isNaN(this.col_idx_min)||e<this.col_idx_min)&&(this.col_idx_min=e),(isNaN(this.col_idx_max)||e>this.col_idx_max)&&(this.col_idx_max=e)}getRectColSize(){return isNaN(this.col_idx_max)?0:this.col_idx_max-this.col_idx_min+1}}function fk(t){t&&t.length>0&&!isNaN(t[t.length-1])&&(t+="px");let e=ng(t,"px");return isNaN(e)?NaN:Math.floor(e)}let fL=["borderLeftWidth","borderTopWidth","borderRightWidth","borderBottomWidth"];function fD(t,e,n,r){let i=0,a=[];for(let e=0;e<t.length;++e){let n=t[e];isNaN(n)?a.push(e):i+=n}if(a.length){let s;for(let o of(s=!isNaN(e)&&e>i?Math.floor((e-i)/a.length):!isNaN(n)&&n>i?Math.floor((n-i)/a.length):r,a))t[o]=s,i+=s}else if(!isNaN(e)&&e>i){let n=e/i;for(let e=0;e<t.length;++e)t[e]=Math.floor(t[e]*n)}if(isNaN(e)&&(e=i),!isNaN(n)&&e>n){let r=n/e;for(let e=0;e<t.length;++e)t[e]=Math.floor(t[e]*r)}return t}function fR(t,e){let n=t.content,r=t.attrs,i=function(t){let e=new fT;for(let n=0;n<t.length;++n){let r=t[n];for(let t=0;t<fI.childCount(r);++t){let i=fI.child(r,t),a=n,s=t;for(;e.getAt(a,s);)s++;e.setAt(a,s,i);let o=i.attrs.colspan||1,l=i.attrs.rowspan||1;for(let t=0;t<l;++t)for(let n=0;n<o;++n){if(0===t&&0===n)continue;let r=a+t,i=s+n;if(e.getAt(r,i))o=n;else{let t=fI.copy(fP,null,{colspan:1,rowspan:1});e.setAt(r,i,t)}}}}return e}(n),a=i.getRectColSize(),s=function(t,e){let n=Array(t.length);for(let e=0;e<t.length;++e){let r=t[e],i=fk(r.attrs&&r.attrs.height);n[e]=isNaN(i)?22:i}return fD(n,e,void 0,22)}(n,fk(r&&r.height)),o=function(t,e,n){let r=Object.assign({},t),i=t.colgroup||[],a=[];for(let t=0;t<e;++t){let e=fk(i[t]&&i[t].width);a.push(e)}fD(a,fk(t.width),n,24);let s=[];for(let t=0;t<e;++t)s.push({width:a[t]});return r.colgroup=s,delete r.width,delete r.grid,r}(r,a,e),l=[];for(let t=0;t<n.length;++t){let e,r=[];for(let e=0;e<a;++e){let n=i.getAt(t,e);n||(n=fP),r.push(function(t){let e;if(!t.attrs)return t;for(let n of fL)t.attrs[n]&&(e||(e=Object.create(null)),e[n]=fk(t.attrs[n]));return e?fI.copy(t,null,e):t}(n))}isNaN(s[t])||(e={height:s[t]});let o=fI.copy(n[t],r,e);l.push(o)}return fI.copy(t,l,o)}function fN(t){var e;let n=t.attrs;if(!n)return;let r=n.config;if(!r)return;let i=n,a=r;if((a=function(t){let e=t.plotArea;if(!e)return t;let{nonNumericAsZero:n,zeroStart:r,xAxisTitle:i,yAxisTitle:a}=e;if(null==n&&!r&&!i&&!a)return t;if((t=Object.assign(Object.create(null),t)).plotArea=e=Object.assign(Object.create(null),e),delete e.nonNumericAsZero,delete e.zeroStart,delete e.xAxisTitle,delete e.yAxisTitle,e.blankAs||null==n||(e.blankAs=n?"zero":"gap"),!e.xAxis&&(i||r)){let t=e.xAxis=Object.create(null);i&&(t.title=i),r&&(t.scaling={min:0})}if(!e.yAxis&&(a||r)){let t=e.yAxis=Object.create(null);a&&(t.title=a),r&&(t.scaling={min:0})}return!e.yAxis2&&r&&(e.yAxis2={scaling:{min:0}}),t}(a=function(t){let e=t.plotArea;if(!e||e.series)return t;let n=e.subCharts;if(!n||!n.length)return t;e=(t=Object.assign(Object.create(null),t)).plotArea=Object.assign(Object.create(null),e),delete e.subCharts;let r=e.series=[];for(let e=0,i=n.length;e<i;++e){let{type:i,series:a,barDir:s,grouping:o}=n[e];for(let t=0,e=a.length;t<e;++t){let e=Object.assign(Object.create(null),a[t]);e.type=i;let n=e.marker;!0===n?delete e.marker:!1===n&&(e.marker={symbol:"none"}),"pie"===i&&(e.label={showPercent:!0}),r.push(e)}s&&(t.barDir=s),o&&(t.grouping=o)}return r.sort(fj),t.chartType=n.length>1?"hybrid":n[0].type,t}(a=(e=fO(e=a,"title"),(e=fO(e,"subtitle"))||a))||a)||a)!==r&&((i=Object.assign(Object.create(null),i)).config=a),!i.data){let t=function(t){let e,n=t.plotArea;if(!n)return null;let r=n.series;if(!r)return null;let i=r.length;if(0===i)return null;let a=n.dataDir,s=!!a&&"row"!==a,o=!1,l=!1;for(let t=0;t<i;++t){let e=r[t];if(null!=e.cat&&(o=!0),null!=e.tx&&(l=!0),o&&l)break}let h=[],u=+!!o,c=+!!l;for(let t=0,n=r.length;t<n;++t){let n=r[t];if(!n)continue;if(o&&!e){let t=n.cat;null!=t&&(fV(h,0,c,function(t){return t}(t),s),e=!0)}if(l){let e=n.tx;if(null!=e){let n=function(t){return t}(e);Array.isArray(n)&&(n=n[0]),fV(h,u+t,0,n,s)}}let i=n.val;null!=i&&fV(h,u+t,c,function(t){return t}(i),s)}return o&&l&&fV(h,0,0,[t.cornerData||""]),function(t){if(Array.isArray(t)&&t.length){let e=t.length,n=null,r;for(let i=0;i<e;++i){let e;Array.isArray(t[i])?e=t[i].length:(e=0,r=!0),null==n?n=e:n!==e&&(r=!0,n=Math.max(n,e))}if(r){let r=[];for(let i=0;i<e;++i){let e=t[i];Array.isArray(e)?e.length!==n&&((e=e.slice()).length=n):e=Array(n),r.push(e)}t=r}}else t=null;return t}(h)}(a);t&&((i=Object.assign(Object.create(null),i)).data=t)}t.attrs=i}function fO(t,e){let n=t[e];return"string"==typeof n&&(t=Object.assign(Object.create(null),t,{title:{text:n}})),t}function fj(t,e){return t.index-e.index}function fE(t){return t}function fV(t,e,n,r,i){var a,s,o,l;if(Array.isArray(r)||(r=[r]),i)for(let i=0,o=r.length;i<o;++i){((a=t)[s=n+i]||(a[s]=[]))[e]=r[i]}else{let i=(o=t)[l=e]||(o[l]=[]);for(let t=0,e=r.length;t<e;++t)i[n+t]=r[t]}}function fB(t){return parseFloat(t.toFixed(2))}class fz{static getPageSizeByType(t,e){let n,r=this.PAGE_SIZE_DEFINE[t];r||(r=this.PAGE_SIZE_DEFINE.a4);let i="landscape"!==e,a=i?this.page_size_portrait_cache:this.page_size_landscape_cache;return t in a?n=a[t]:(n={width:fB(np(r[+!i],"mm","px")),height:fB(np(r[+!!i],"mm","px"))},a[t]=n),n}static getPagePadding(t){return{top:fB(np(t.top,"cm","px")),bottom:fB(np(t.bottom,"cm","px")),left:fB(np(t.left,"cm","px")),right:fB(np(t.right,"cm","px"))}}static getPageContentSize(t,e){return{width:fB(t.width-e.left-e.right),height:fB(t.height-e.top-e.bottom)}}static getDecorateMaxHeight(t){return fB(.2*t.height)}static getDefaultPageSetup(){return{left:2.54,top:2.54,right:2.54,bottom:2.54,orientation:"portrait",page_type:"a4"}}}fz.PAGE_SIZE_DEFINE={letter:[216,279],tabloid:[279,432],legal:[216,356],statement:[140,216],executive:[184,267],folio:[216,330],a3:[297,420],a4:[210,297],a5:[148,210],b4:[250,353],b5:[176,250]},fz.page_size_portrait_cache=Object.create(null),fz.page_size_landscape_cache=Object.create(null);class fF extends f_{getMigrators(){return[this.ver1to2,this.ver2to3,this.ver3to4,this.ver4to5,this.ver5to6,this.ver6to7]}ver1to2(){let t=this.doc.content||[],e=t[0]&&"invisible"===t[0].type,n=e?t[0]:{type:"invisible"},r={type:"edit_area",content:e?t.slice(1):t.slice(0)},i=t=>({type:"header",attrs:{type:t},content:[{type:"paragraph",attrs:{}}]}),a=t=>({type:"footer",attrs:{type:t},content:[{type:"paragraph",attrs:{}}]}),s={type:"page_decorate",attrs:{},content:[i("cover"),i("even"),i("normal"),a("cover"),a("even"),a("normal"),{type:"page_num",attrs:{type:"normal"},content:[{type:"page_num_text"}]}]},o={type:this.doc.type,attrs:{schema:2,type:"document"},content:[n,r,s]};this.doc=o}ver2to3(){return this.options&&this.options.page_setup&&(this.doc.attrs.page_setup=this.options.page_setup),this.doc.attrs.schema=3,this.doc}ver3to4(){let t=this.doc.attrs.page_setup||fz.getDefaultPageSetup(),e=fz.getPageSizeByType(t.page_type,t.orientation),n=fz.getPagePadding(t),r=fz.getPageContentSize(e,n);return fS(this.doc,{doc:function(t){t.attrs=Object.assign({},t.attrs),t.attrs.schema=4},table:function(t){return fR(t,r.width)}})}ver4to5(){let t=this.doc;t.attrs=Object.assign(Object.create(null),t.attrs),t.attrs.schema=5;let e=t.content[2].content[6];return e.content=[{type:"page_num_block",content:e.content}],t}ver5to6(){return fS(this.doc,{doc:fC(6),code_block:function(t){t.type="paragraph"}})}ver6to7(){return fS(this.doc,{doc:fC(7),chart:fN})}}let fG=Object.prototype.hasOwnProperty,fH=()=>{};class fW extends f_{getMigrators(){return[this.toVer2,this.toVer3,fH,fH,fH,this.toVer7]}toVer2(t){let e=function(t,e,n){let r=n.type,i=r.indexOf(t);i>=0&&(n.type=r.substring(0,i)+e+r.substring(i+t.length))},n=function(t){if(!t)return null;let e=!1;for(let n in t)fG.call(t,n)&&(null==t[n]?delete t[n]:e=!0);return e?t:null},r=e.bind(this,"_holder","_master_holder"),i=e.bind(this,"_instance","_slide_holder"),a=["stroke","stroke-opacity","stroke-width","stroke-dasharray"],s=["fill","fill-opacity"],o=function(t,n){if(n.type.indexOf("master")>=0)e("_holder_shape","_master_holder_shape",t);else if(n.type.indexOf("layout")>=0)e("_holder_shape","_layout_holder_shape",t);else throw Error(`Invalid parent type ${n.type} of ${t.type}.`)},l=function(t){let e,r=t.attrs.path_config;if(!("path_config"in t.attrs)||null==r)return;let i=K(r,null,!1,a);r=K(r);for(let t=a.length-1;t>=0;--t)delete r[a[t]];if("stroke-dasharray"in i&&""===i["stroke-dasharray"]&&(i["stroke-dasharray"]="none"),"stroke-opacity"in i){let t=parseFloat(i["stroke-opacity"]);i["stroke-opacity"]=isNaN(t)?1:t}if("stroke-width"in i){let t=parseFloat(i["stroke-width"]);i["stroke-width"]=isNaN(t)?0:t}("none"===i.stroke||"transparent"===i.stroke||""===i.stroke||0===i["stroke-opacity"])&&(e=!1,delete i.stroke,delete i["stroke-opacity"]),0===i["stroke-width"]&&(e=!1,delete i["stroke-width"]),i=n(i),null==e&&null!=i&&(e=!0),t.attrs=K(t.attrs),t.attrs.path_config=r,null!=i&&(t.attrs.stroke_config=i),null!=e&&(t.attrs.stroke=e)},h=function(t){let e,r=t.attrs.path_config;if(!("path_config"in t.attrs)||null==r)return;let i=K(r,null,!1,s);r=K(r);for(let t=s.length-1;t>=0;--t)delete r[s[t]];if("fill-opacity"in i){let t=parseFloat(i["fill-opacity"]);i["fill-opacity"]=isNaN(t)?1:t}("none"===i.fill||"transparent"===i.fill||""===i.fill||0===i["fill-opacity"])&&(e=!1,delete i.fill,delete i["fill-opacity"]),i=n(i),null==e&&null!=i&&(e=!0),t.attrs=K(t.attrs),t.attrs.path_config=r,null!=i&&(t.attrs.fill_config=i),null!=e&&(t.attrs.fill=e)},u=function(t){t.attrs=K(t.attrs),"align_h"in t.attrs&&(t.attrs.align_h<0||(t.attrs.vertical_align=t.attrs.align_h),delete t.attrs.align_h),("padding_left"in t.attrs||"padding_top"in t.attrs||"padding_right"in t.attrs||"padding_bottom"in t.attrs)&&(t.attrs.padding={left:t.attrs.padding_left,top:t.attrs.padding_top,right:t.attrs.padding_right,bottom:t.attrs.padding_bottom},delete t.attrs.padding_left,delete t.attrs.padding_top,delete t.attrs.padding_right,delete t.attrs.padding_bottom)},c=function(t,n){if(n.type.indexOf("master")>=0)e("_text_style","_master_holder_text_block",t);else if(n.type.indexOf("layout")>=0)e("_text_style","_layout_holder_text_block",t);else throw Error(`Invalid parent type ${n.type} of ${t.type}.`)};return fS(t,{doc:fC(2),content_container:function(t){t.type="slide_content_container"},title_holder:r,sub_title_holder:r,body_holder:r,page_number_holder:r,title_holder_shape:[o,l,h],body_holder_shape:[o,l,h],title_text_style:[u,c],body_text_style:[u,c],text_shape:[l,h],shape:[l,h],line:[function(t){let e=t.attrs.path_config;"path_config"in t.attrs&&null!=e&&"arrow-type"in e&&(t.attrs=K(t.attrs),t.attrs.arrow=e["arrow-type"],e=K(e),delete e["arrow-type"],t.attrs.path_config=e)},l],image:[l],chart:[l],title_instance:i,sub_title_instance:i,body_instance:i,page_number_instance:i,title_instance_shape:[i,l,h],sub_title_instance_shape:[i,l,h],body_instance_shape:[i,l,h],page_number_instance_shape:[i,l,h],title_instance_text_block:[i,u],sub_title_instance_text_block:[i,u],body_instance_text_block:[i,u],page_number_instance_text_block:[i,u]})}toVer3(){return fS(this.doc,{doc:fC(3),table_box:function(t){let e=fI.child(t,0);e.content[0]=fR(fI.child(e,0),Math.abs(t.attrs.transform.width))}})}toVer7(){let t=Object.create(null);function e(e){let n=e.content;if(n)for(let e=n.length-1;e>=0;--e){let r=n[e],i=r.attrs;i&&i.id||((r.attrs=Object.assign(Object.create(null),i)).id=function(){let e;do e=J();while(t[e]);return t[e]=!0,e}())}}return fS(this.doc,{doc:fC(7),master_content_container:e,layout_content_container:e,slide_content_container:e,object_group:e,chart:fN,line:function(t){let e=t.attrs;if(!e)return;let n=e.arrow;n&&(t.attrs=e=Object.assign(Object.create(null),e),delete e.arrow,("start"===n||"both"===n)&&(e.arrow_start="triangle"),("end"===n||"both"===n)&&(e.arrow_end="triangle"))}})}}class fq extends Error{constructor(t,e,n,r){super(e,n,r),this.status=t}static #t=this.ERR_SCHEMA_INVALID=0;static #e=this.ERR_MIGRATION_FAILED=1}class fU{constructor(t,e){this.schema=t,Object.assign(this,e)}isMigrated(){return this.migrated}getDoc(){return this.doc||(this.doc=this.schema.nodeFromJSON(this.json_doc),this.doc.updateState()),this.doc}getJsonDoc(){return this.json_doc||(this.json_doc=this.doc.toJSON())}getCommentStore(){return this.comments||(this.comments=oF.fromJSON(this.json_comments))}getJsonCommentStore(){return this.json_comments||(this.json_comments=this.comments.toJSON())}getRemapping(){return this.remapping||(this.remapping=new oD)}getJsonSteps(){return this.json_steps||(this.json_steps=[])}getJsonMigrationSteps(){return this.json_migration_steps||(this.json_migration_steps=[])}}class fZ extends fx{collectActions(t){let e=[];return t.descendants((t,n)=>{this.shouldStartWithBasicBlock(t)&&(t.firstChild?.type.group?.includes("basic_block")||e.push(n+1))}),e}applyMigration(t){let e=t.type.schema.nodeType("paragraph");return this.performReplacement(t,this.collectActions(t),(t,n)=>({from:n,to:n,slice:rr.from(e.createAndFill())}))}getMigrationPosMap(t){let e=[],n=this.collectActions(t);for(let t=0,r=n.length;t<r;++t){let r=n[t];e.push(r,0,2)}return ob.create(e)}}let f$=t=>{if(!t.prototype.isMarksBlock)throw Error("Unable to mixin MarksBlock.");return class extends t{get attrs(){let t=super.attrs;return nH.mergeTypeAttrs(t,{textMark:t.textMarks})}}};class fJ extends fx{applyMigration(t,e){let n=[];t.descendants((t,e)=>{if(!t.type.isMarksBlock||t.getAttrValue("textMarks",!0))return;let r=t.getAttrValue("textMark",!0);r&&r.length&&n.push({pos:e,attrs:{textMark:null,textMarks:r}})});for(let e=n.length-1;e>=0;--e){let{pos:r,attrs:i}=n[e],a=t.resolve(r).self;a&&(t=t.replaceSimple(r,r+a.nodeSize,rr.from(a.copyWithAttrs(i))))}return t.updateState(),t}}oH.jsonID("renameTextMarks",fJ);let fY=t=>t&&parseFloat(t)||null,fX=t=>{if("number"==typeof t)return t||0;let e=ng(t,"px",1);return isNaN(e)?null:e},fQ={normalizer:fX},fK={lineHeight:{empty_value:5566,normalizer:fY},paddingTop:fQ,paddingBottom:fQ},f0={textIndent:nH.create({optional:!0,clearable:!0,normalizer:t=>!!t||null}),paddingLeft:nH.create({optional:!0,empty_value:0,clearable:!0,normalizer:fQ.normalizer})},f1=t=>{if(!t.prototype.isParagraph)throw Error("Unable to mixin Paragraph.");return class extends t{get attrs(){return nH.mergeTypeAttrs(super.attrs,f0,fK)}get cssAttrs(){return nH.mergeTypeAttrs(super.cssAttrs,fK)}}};class f2 extends fx{collectActions(t){let e=t.type.schema.markType("font_size"),n=[];return t.descendants((t,r)=>{let i,a;if(!t.is("BasicParagraph"))return;t.type._getInheritedCssAttrs(t)||null!=t.getAttrValue("lineHeight",!0)||(i=Object.assign(Object.create(null),i,{lineHeight:1.5}));let{paddingLeft:s,textIndent:o}=t.attrs;(s||o)&&(i=Object.assign(Object.create(null),i,{paddingLeft:null,textIndent:null,indentLeft:t.getAttrValue("indentLeft")+(s||0),indentFirst:t.getAttrValue("indentFirst")+(s||0)+30*!!o})),t.childCount&&(a=e.findFromSet(t.textMarks)||void 0),(i||a)&&n.push({node:t,pos:r,attrs:i,mark:a})}),n}applyMigration(t,e){let n=t.type.schema.markType("font_size"),r=this.collectActions(t);for(let e=r.length-1;e>=0;--e){let i,{pos:a,attrs:s,mark:o}=r[e],l=t.resolve(a).self;if(l){if(o&&(l.forEach((t,e,r)=>{let a=t.marks;n.findFromSet(a)?i&&(i[r]=t):(i||(i=l.content.content.slice(0,r)),i[r]=t.mark(o.addToSet(a)))}),!i&&!s))continue;t=t.replaceSimple(a,a+l.nodeSize,rr.from(l.copy(i?rn.from(i):l.content,s)))}}return t.updateState(),t}}oH.jsonID("refineTextblock",f2);class f5 extends fx{collectActions(t){let e=[],n=(t,r)=>{if(!t.type.isTable)return;let i=!1;if(t.forEach(t=>{if(!t.childCount)return i=!0,!0},this,!0),i){let i=1;return t.forEach(t=>{i=Math.max(i,t.childCount)}),e.push({pos:r,max:i}),t.forEach((t,a)=>{let s=r+1+a+1;t.descendants(n,{start:s});let o=i-t.childCount;o&&e.push({pos:s+t.getContentSize(),count:o})}),!1}};return t.descendants(n),e}applyMigration(t,e){let n=t.type.schema.nodeType("table_cell");return this.performReplacement(t,this.collectActions(t),(t,e)=>{let{pos:r,count:i,max:a}=e;if(i)return{from:r,to:r,slice:rr.from(Array.from({length:i},()=>n.createFilled()))};if(a){let e=t.resolve(r).self;if(!e)return null;let n=e.getAttrValue("colgroup");return n.length>=a?null:{from:r,to:r+e.nodeSize,slice:rr.from(e.copyWithAttrs({colgroup:n.concat(Array(a-n.length).fill({width:24}))}))}}return null})}getMigrationPosMap(t){let e=[],n=this.collectActions(t);for(let t=0,r=n.length;t<r;++t){let{pos:r,count:i}=n[t];i&&e.push(r,0,4*i)}return ob.create(e)}}oH.jsonID("fillEmptyTableRow",f5);class f4 extends rZ{get isLegacyDummyContainer(){return!0}}function f8(t,e,n){let r=function t(e){for(let n=e.childCount-1;n>=0;--n){let r=e.child(n);r.type.isLegacyDummyContainer&&(e=e.splice(n,1,t(r.content)))}return e}(t.content),i=0;if(n.canReplace(e,e+1,r)||(r=r.prepend(t.type.schema.nodeType("paragraph").createAndFill()),i=2,n.canReplace(e,e+1,r)))return{content:r,fill:i};throw new rT("Flattened fragment is invalid.")}function f3(t,e,n){let r=t.length-3;r>=0&&t[r]+t[r+1]===e?n>0?t[r+2]+=n:t[r+1]+=-n:(t.push(e),n>0?t.push(0,n):t.push(-n,0))}class f6 extends fx{collectActions(t){let e=[];return t.descendants((t,n,r,i)=>{t.type.isLegacyDummyContainer&&(i.type.isLegacyDummyContainer||e.push({node:t,pos:n,index:r,parent:i}))}),e}applyMigration(t,e){return this.performReplacement(t,this.collectActions(t),(t,e)=>{let{pos:n}=e,r=t.resolve(n),i=r.self;return i?{from:n,to:n+i.nodeSize,slice:rr.from(f8(i,r.index(),r.parent).content)}:null})}getMigrationPosMap(t){let e=this.collectActions(t).map(t=>({...t,fill:f8(t.node,t.index,t.parent).fill})),n=0,r=e[0],i=[];return t.descendants((t,a,s,o,l)=>{t.type.isLegacyDummyContainer&&(l?a+=1+t.content.size:r&&r.pos===a&&(f3(i,a,r.fill),r=e[++n]),f3(i,a,-1))},{enableLeaving:!0}),ob.create(i)}}oH.jsonID("flattenNode",f6);class f7 extends f4{get isLegacyList(){return!0}get isLegacyListType(){return!0}}class f9 extends pa{getNodeType(t){return t.type.isLegacyList?"list":t.type.is("EditableType")&&!(t.type.isLegacyListType||t.type.isInline||t.type.isTextblock)?"wrapper":t.is("ContentEditable")?"container":null}createOrderedListConfig(t,e){let n="decimal",r={format:n,text:d6(n,e)},i=t&&t.getAttrValue("order",!0);return null!=i&&(r.start=i),r}createBulletListConfig(t,e){let n=`bullet_${0===e?"●":1===e?"○":"■"}`;return{format:n,text:d6(n,e)}}createListConfig(t,e){return"ol"===this.getListType(t)?this.createOrderedListConfig(t,e):this.createBulletListConfig(t,e)}getListType(t){return t.type.isLegacyOrderedList?"ol":"ul"}}class yt extends fx{createListParser(){return new f9}applyMigration(t,e){let n=[],r=this.createListParser();return t.descendants((t,e,i,a,s)=>{if(s)return void r.remove(t);if(a.type.isLegacyListItem){let a=r.getList();if(a){let r,{level:s,attrs:o}=a;if(t.type.isListBlock&&0===i)r={listMarks:t.getAttrValue("textMarks",!0),...o};else if(t.type.isIndentBlock){let e=t.type.baseIndent*(s+1);r={indentFirst:t.getAttrValue("indentFirst")+e,indentLeft:t.getAttrValue("indentLeft")+e}}else t.type.isTable;r&&n.push({pos:e,attrs:r})}}if(r.add(t),t.type.isListContainer){let t=r.getContainer();t&&n.push({pos:e,attrs:t.attrs,container:t})}},{skipInlineContent:!0,enableLeaving:!0}),this.performReplacement(t,n,(t,e)=>{let{pos:n,attrs:r,container:i}=e;if(i&&!i.has_list)return null;let a=t.resolve(n).self;return a?{from:n,to:n+a.nodeSize,slice:rr.from(a.copyWithAttrs(r))}:null})}}function ye(t,e){let n=t.maybeMarkType(e._);return n&&!n.isLegacyDummyMark}function yn(t){return!t.type.isLegacyDummyMark}oH.jsonID("flattenList",yt);class yr extends fm{migrateMarks(t,e){if(t.length&&!t.every(yn))return t.filter(yn)}migrateJsonMarks(t,e){if(t.length&&!t.every(s))return t.filter(s)}apply(t,e){return s=ye.bind(null,t.type.schema),super.apply(...arguments)}}oH.jsonID("eraseMark",yr);class yi extends fm{migrateMarks(t,e){if(!t.length)return;let n=e.type.schema;if(!n.markType("link").isInSet(t))return;let r=n.maybeMarkType("color");r&&!r.isInSet(t)&&(t=r.create({value:"#0F7BE9"}).addToSet(t));let i=n.maybeMarkType("underline");return i&&!i.isInSet(t)&&(t=i.create().addToSet(t)),t}}oH.jsonID("separateLinkStyle",yi);let ya={normalizer:t=>nb(t)},ys={normalizer:t=>nm(t)},yo=["Left","Top","Right","Bottom"].reduce((t,e)=>{let n=`border${e}`;return t[n+"Style"]=ya,t[n+"Color"]=ys,t},{verticalAlign:{normalizer:t=>uv(t)},backgroundColor:ys}),yl=t=>class extends t{static getSelfPropertyName(){return"SynoCommentable"}get attrs(){return{...super.attrs,synocomment:nH.createOptional({empty_value:v,copyable:!1,backward:!!this.isTextblock,normalizer:t=>{let e;return t?(Array.isArray(t)?e=t:"string"==typeof t&&(e=t.split(" ")),e&&e.length?e:null):null}})}}},yh=(()=>{let t=["discussion","insertion","deletion"];return nH.createMarksNormalizer(e=>!t.includes(e._))})(),yu=t=>{if(!t.prototype.isMarksBlock)throw Error(`Unable to mixin non-MarksBlock ${t.name}.`);return class extends t{get attrs(){let t={...super.attrs},e=t.textMarks;if(e){let n=e.normalizer??b;t.textMarks=e.copy({normalizer:t=>yh(n(t))})}let n=t.listMarks;if(n){let e=n.normalizer??b;t.listMarks=n.copy({normalizer:t=>yh(e(t))})}return t}}};class yc extends hC{get isLegacyCommentMark(){return!0}}class yd extends yc{get isLegacySuggestionMark(){return!0}}function yp(t,e,n){n.length&&(t[e]=tz(...n))}class yg extends fx{doApply(t,e){let n=t.type.schema.markType("tracking"),r=[],i=t.content.mapDescendants((t,e,i,a,s)=>{if(t.is("EditableType")){if(!s){let i=r.length?r[r.length-1]:null;if(t.is("Inline")){let e=i?i.blockComments:v,r=t.marks,a=null;r.forEach((t,n)=>{t.type.is("Tracking")?(e=tz(e,t.getValue()),a||(a=r.slice(0,n))):a&&a.push(t)});let s=a||r;e.length&&(s=n.create({id:e.slice()}).addToSet(s)),s!==r&&(t=t.mark(s))}else if(t.is("SynoCommentable")){let n,r;if(i){let n,r=i.blockEnds,a=e+t.nodeSize;for(n=r.length;n>0&&a>=r[n-1];--n);n!==r.length&&(i.blockComments.length=n,r.length=n)}let a=t.getAttrValue("synocomment")||v;if(i){n=i.blockComments;let a=i.lastTextblockCommentInfo;a&&(t.is("Textblock")&&a.pos===e&&(r=a.ids),i.lastTextblockCommentInfo=null)}if((!n||!n.length)&&(!r||!r.length)&&!a.length)return t;let s={synocomment:null};if(t.type.isLeaf)yp(s,"trackingLeaf",[t.getAttrValue("trackingLeaf"),n,a]);else if(t.is("Textblock"))yp(s,"trackingStart",[t.getAttrValue("trackingStart"),n,r]),yp(s,"trackingEnd",[t.getAttrValue("trackingEnd"),n,a]),i&&a.length&&(i.lastTextblockCommentInfo={ids:a,pos:e+t.nodeSize});else if(yp(s,"trackingStart",[t.getAttrValue("trackingStart"),n,a]),yp(s,"trackingEnd",[t.getAttrValue("trackingEnd"),n,a]),i&&a.length){let{blockComments:n,blockEnds:r}=i,s=e+t.nodeSize;for(let t of a)n.includes(t)||(n.push(t),r.push(s))}t=t.copyWithAttrs(s)}}}else if(t.is("ContentEditable")&&(s?r.pop():r.push({blockComments:[],blockEnds:[],lastTextblockCommentInfo:null})),!s&&t.is("SynoCommentable")){let e={synocomment:null};yp(e,"trackingSelf",[t.getAttrValue("trackingSelf"),t.getAttrValue("synocomment")]),t=t.copyWithAttrs(e)}return t},{enableLeaving:!0});return t.replace(0,t.getContentSize(),rr.from(i))}}oH.jsonID("flattenComment",yg);class yf extends fx{applyMigration(t,e){if(t.queryChild("settings"))return t;let n=t.schema.nodeType("settings").createFilled();return t.replace(0,0,rr.from(n))}getMigrationPosMap(t){return t.queryChild("settings")?null:ob.create([0,0,1])}}let{mixinMark:yy,mixinMarksBlock:yx,mixinListContainer:ym}=fb({font_family:t=>{let e=t?.value??"Arial";return{...t,value:e,eastAsia:t?.eastAsia??e,complexScript:t?.complexScript??e}}}),{mixinMark:yv,mixinMarksBlock:yb,mixinListContainer:yw}=fb({font_size:t=>{let e=t?.value??11,n="number"==typeof e?e:ng(e,"pt",11);return isFinite(n)||(n=11),{...t,value:n}}});class yM extends fx{applyMigration(t,e){let n=t.type.schema.nodeType("paragraph"),r=[];return t.descendants((t,e)=>{t.is("LegacyHeading")&&r.push(e)}),this.performReplacement(t,r,(t,e)=>{let r=t.resolve(e).self;if(!r)return null;let{synohead:i,level:a}=r.attrs,s=Object.assign(Object.create(null),r.attrs,{headingId:i,headingLevel:(parseInt(a,10)||1)-1});return{from:e,to:e+r.nodeSize,slice:rr.from(n.create(s,r.content))}})}}yM.register("mergeHeadingParagraph");let y_=t=>class extends t{static getSelfPropertyName(){return"LegacyHeading"}get attrs(){return{...super.attrs,synohead:nH.optional,level:nH.optional}}},yA={bold:"strong",italic:"em",fontsize:"font_size",fontfamily:"font_family",color:"color",bgcolor:"background_color",underline:"underline"};class yS extends fx{constructor(t,e){super(t,e),this.styles=e&&e.style}_convertCustomStyle(t){void 0===t&&(t=m);let e=Object.create(null),{attrs:n,marks:r}=t;if(n&&(e.lineHeight=fY(n.lineHeight),e.paddingTop=fX(n.paddingTop),e.paddingBottom=fX(n.paddingBottom)),null==e.lineHeight&&(e.lineHeight=1.5),r){let t=e.textMarks=[];P(r,(e,n)=>{if(!1===e)return;let r=yA[n];if(!r)return;let i={_:r};!0!==e&&(i.value=e),t.push(i)})}return e}convertCustomStyle(t){return p4.map(e=>this._convertCustomStyle(t&&t[e.tag]))}applyMigration(t,e){let n,r,i,a=this.convertCustomStyle(this.styles),s=t.queryChild("style_editor");if(s&&!a)return t;let o=t.type.schema;return s?(n=s.node,i=(r=s.offset)+n.nodeSize):(n=o.nodeType("style_editor").createFilled(),r=i=t.queryChildOffset("edit_area",!0)),a&&(n=n.copyWithContent(n.content.map((t,e,n)=>{let r=a[n];return r?t.copyWithAttrs(r):t}))),t.replace(r,i,rr.from(n))}getMigrationPosMap(t){return t.queryChild("style_editor")?null:ob.create([t.queryChildOffset("edit_area",!0),0,16])}toJSON(t){let e=this.styles;return{...super.toJSON(t),...e&&{migration_options:{style:e}}}}}oH.jsonID("inheritCustomStyle",yS);let yC=["edit_area","header","footer","table_cell","navigation","list_item"];class yI extends fZ{shouldStartWithBasicBlock(t){return yC.includes(t.type.name)}}oH.jsonID("documentPrependBasicBlock",yI);let yP=t=>t=f1(t=f$(t)),yT={diff:{nodes:{paragraph:{type:yP},table_row:{content:"table_cell*"},table_cell:{type:t=>{if(!t.prototype.isTableCell)throw Error("Unable to mixin TableCell.");return class extends t{get attrs(){return nH.mergeTypeAttrs(super.attrs,yo)}}}},ordered_list:{type:class extends f7{get isLegacyOrderedList(){return!0}get attrs(){return{order:nH.create({optional:!0,empty_value:1,normalizer:t=>isNaN(t=parseInt(t,10))||1===t?null:t})}}},content:"list_item+"},bullet_list:{type:class extends f7{get isLegacyBulletList(){return!0}},content:"list_item+"},list_item:{type:class extends f4{get isLegacyListItem(){return!0}get isLegacyListType(){return!0}},content:"basic_block block*"},blockquote:{type:f4,content:"block+"},heading:(t,e)=>Object.assign(Object.create(null),e.paragraph,{type:y_(yP(e.paragraph.type))}),doc:{content:t=>t&&t.replace(/(?:\s*\(\s*(?:style_editor|invisible)\s*\|\s*(?:style_editor|invisible)\s*\)){2}/,t=>`${t}?`)}},groups:{block:t=>t.concat("heading","ordered_list","bullet_list","blockquote"),basic_block:t=>t.concat("heading","ordered_list","bullet_list")},marks:{code:class extends r5{get isLegacyDummyMark(){return!0}get attrs(){return{value:nH.create({default:0,empty_value:0})}}}}},steps:[{stepType:yI.prototype.jsonID},{stepType:fJ.prototype.jsonID},{stepType:f2.prototype.jsonID},{stepType:f5.prototype.jsonID},{stepType:yt.prototype.jsonID},{stepType:f6.prototype.jsonID},{stepType:yr.prototype.jsonID},{stepType:yi.prototype.jsonID},{stepType:yM.prototype.jsonID},{stepType:yS.prototype.jsonID}]},yk={diff:{nodes:{...["paragraph","style_paragraph","table","table_row","table_cell","navigation","horizontal_rule","page_break"].reduce((t,e)=>(t[e]={type:yl},t),Object.create(null)),paragraph:{type:t=>yl(yu(t))},style_paragraph:{type:t=>yl(yu(t))}},marks:{discussion:class extends yc{get isLegacyDiscussionMark(){return!0}},insertion:class extends yd{get isLegacyInsertionMark(){return!0}},deletion:class extends yd{get isLegacyDeletionMark(){return!0}}},preset:null},steps:[{stepType:yg.prototype.jsonID}]};class yL extends fx{determineDrawingNodeTypeName(t){if(t.is("Drawing"))return t.type.name;if(!t.is("LegacyGraph"))return null;switch(t.getAttrValue("config").type){case"image":return"picture";case"line":case"connect_line":return"connector";default:return"shape"}}determineDrawingNodeType(t){let e=this.determineDrawingNodeTypeName(t);return e?t.type.schema.nodeType(e):null}computeDrawingNodeSize(t){if(t.is("Drawing")){let e=t.nodeSize;return t.is("Leaf")||t.descendants((t,n)=>{t.is("LegacyGraph")&&(e+=this.computeDrawingNodeSize(t)-1)}),e}if(!t.is("LegacyGraph"))return 0;{let e=this.determineDrawingNodeType(t);return e?e.is("Leaf")?1:6:0}}convertDrawingNode(t){if(t.is("Drawing")){if(!t.is("Leaf")){let e=[];t.descendants((t,n)=>{t.is("LegacyGraph")&&e.push(n)});for(let n=e.length-1;n>=0;--n){let r=e[n],i=t.nodeAt(r);i&&i.is("LegacyGraph")&&(t=t.replace(r,r+i.nodeSize,rr.from(this.convertDrawingNode(i))))}}return t}if(!t.is("LegacyGraph"))return null;{let e=this.determineDrawingNodeType(t);if(!e)return null;let n=t.getAttrValue("config");return e.createFilled({id:t.getAttrValue("synograph"),config:{paddingLeft:2,paddingTop:4,paddingRight:2,paddingBottom:2,...n,type:"picture"===e.name?"rect":n.type}},null,t.marks)}}doCollectActionsInvisible(t,e,n){t.push({from:n+1,to:n+1+e.getContentSize(),nodes:e.childs().filter(t=>t.is("Drawing")||t.is("LegacyGraph"))})}doCollectActionsOther(t,e,n){e.descendants((e,n)=>{if(e.is("LegacyGraph"))return t.push({from:n,to:n+e.nodeSize,nodes:[e]}),!1},{start:n+1})}collectActions(t){let e=[];return t.forEach((t,n)=>{t.is("Invisible")?this.doCollectActionsInvisible(e,t,n):this.doCollectActionsOther(e,t,n)}),e}applyMigration(t,e){return this.performReplacement(t,this.collectActions(t).map(t=>({...t,nodes:t.nodes.map(this.convertDrawingNode,this).filter(t=>!!t)})),(t,e)=>{let{from:n,to:r,nodes:i}=e;return{from:n,to:r,slice:rr.from(i)}})}getMigrationPosMap(t){let e=[];return this.collectActions(t).forEach(t=>{let{from:n,to:r,nodes:i}=t;ob.appendRange(e,n,r-n,i.reduce((t,e)=>t+this.computeDrawingNodeSize(e),0))}),ob.create(e)}}yL.register("convertGraphMigration");class yD extends fx{collectMoveInfo(t){let e=t.queryAllChild("invisible"),n=t.queryChild("edit_area");return 0!==e.length&&n&&(1!==e.length||e[0].index!==n.index-1)?{sources:e,target:n}:null}applyMigration(t,e){let n=this.collectMoveInfo(t);if(!n)return t;let{sources:r,target:i}=n;if(1===r.length){let e=r[0];return t.replaceAll(rr.from(t.content.moveTo(e.index,e.index<i.index?i.index-1:i.index)))}{let e=t.getContent().slice();for(let{index:t}of r)e[t]=null;let n=[];for(let{node:t}of r)n.push(...t.getContent());return e.splice(i.index,0,r[0].node.copyWithContent(n)),t.replaceAll(rr.from(e.filter(t=>!!t)))}}getMigrationPosMap(t){let e=this.collectMoveInfo(t);if(!e)return null;let{sources:n,target:r}=e;if(1===n.length){let t=n[0];return new ow([t.offset,t.node.nodeSize,t.index<r.index?r.offset-t.node.nodeSize:r.offset])}{let t=[];for(let e of n)t.push(e.offset,e.node.nodeSize,0);let e=n.findIndex(t=>{let{offset:e}=t;return r.offset<e});return t.splice((e<0?t.length:e)*3,0,r.offset,0,n.reduce((t,e)=>{let{node:n}=e;return t+n.getContentSize()},2)),ob.create(t)}}}yD.register("moveInvisiblePositionMigration");let yR={diff:{nodes:{doc:{content:t=>t&&t.replace(/style_editor|invisible/g,t=>"style_editor"===t?"(invisible | style_editor)":"(style_editor | invisible)")},invisible:{content:"(drawing | graph | image)*"},graph:{type:class extends r0{static getSelfPropertyName(){return"LegacyGraph"}get attrs(){return{synograph:nH.create({default:J,copyable:!1}),config:nH.create({default:{}})}}getObjectSize(){return{width:0,height:0}}}}},groups:{inline:t=>t.concat("graph")},preset:t=>{let e=Array.from({length:7},(t,e)=>{let n=e-1;return{id:n>=0?`_heading${n}`:null,level:n}});return t.nodeFrom(["doc",null,null,["invisible"],["style_editor",null,null,...e.map(t=>{let{id:e,level:n}=t;return["style_paragraph",{...n>=0?{headingId:e,headingLevel:n}:null,lineHeight:1.15}]})]],"fill")}},steps:[{stepType:yL.prototype.jsonID},{stepType:yD.prototype.jsonID}]};class yN extends yf{}yN.register("documentAddSettingsMigration");let yO={diff:{nodes:{doc:{content:t=>t&&t.replace(/settings/g,"settings?")}}},steps:[{stepType:yN.prototype.jsonID}]},yj={type:t=>yb(yx(t))},yE={type:t=>yw(ym(t))},yV=new class{constructor(t,e){if(t.getVersion()!==e.length)throw Error(`The legacy schema configs does not match the schema version: ${e.length}, ${t.getVersion()}`);this.schema=t,this.legacySchemas=this.createContexts(e)}createContexts(t){let e=t.findIndex(t=>!!t);e<0&&(e=t.length);let n=Array.from({length:e},()=>({}));for(let r=e;r<t.length;++r)n.push(this.createContext(t[r],r));return n}createContext(t,e){return t||(t={}),this.fillMigrateSchemaStep(t,e),t}fillMigrateSchemaStep(t,e){(t.diff||(t.diff={})).version=e;let n=t.steps||(t.steps=[]);n.push({stepType:fv.prototype.jsonID}),n.forEach(t=>{t.version=e})}buildContext(t){return fw(this.schema,this.legacySchemas,t)[t]}getCurrentSchema(){return this.schema}fetch(t){if(t<0)throw RangeError(`Given schema version is invalid: ${t}`);let{schema:e,legacySchemas:n}=this;return t>=n.length?e:this.buildContext(t).schema}migrate(t,e,n){var r;return r=this.schema,new fU(r,function(t,e,n,r,i){let a,s;void 0===i&&(i=m),t=function(t,e){let n,r=f_.getDocType(t);if("document"===r)n=new fF(t,e);else if("presentation"===r)n=new fW(t,e);else throw Error("Can not migrate file of Invalid type");return n.doMigration()}(t,i).doc,e=e||[];let o=n.version,l=t.attrs&&t.attrs.schema||o;if(l>o)throw new fq(fq.ERR_SCHEMA_INVALID,`Json version (${l}) is newer than schema version (${o}).`);fw(n,r,l);let{apply_steps:h}=i,u=[],c=[],d=oF.fromJSON(e),p=d;function g(t,e){if(!t.length)return t;({doc:s,comment_store:d}=t);let n=t.steps.map(t=>t.toJSON());u.push(...n),e&&c.push(...n);let r=t.toRemapping();return a?a.appendMapping(r):a=r,t}if(l!==o||h)for(let e=l;e<=o&&(e!==o||h);++e){let a=e===o?{schema:n}:r[e];if(!a)break;let{schema:l,steps:u}=a;try{s?s.type.schema!==l&&(s=l.nodeFromJSON(s.toJSON())).updateState():(s=l.nodeFromJSON(t)).updateState()}catch(t){throw ad.default.error(t),new fq(fq.ERR_MIGRATION_FAILED,`Migration failed when loading doc in schema ${e}.`)}if(h){try{g(h(s,d))}catch(t){s.updateState(),ad.default.error("Failed to apply pending steps.",t)}h=null;let t=s.getAttrValue("schema");if(t!==e){e=t-1;continue}}if(u&&u.length)try{let t=new oZ(s,d);u.map(t=>oH.fromJSON(n,Object.assign(Object.create(null),t,{migration_options:i}))).forEach(t.step,t),g(t,!0)}catch(t){throw ad.default.error(t),new fq(fq.ERR_MIGRATION_FAILED,`Migration failed when applying steps in schema ${e}.`)}}return s&&(s.type.schema===n?t=null:(t=s.toJSON(),s=null)),d!==p&&(e=null),{migrated:l!==o,doc:s,comments:d,remapping:a,json_doc:t,json_comments:e,json_steps:u,json_migration_steps:c}}(t,e,r,this.legacySchemas,n))}}(fy,[null,null,null,null,null,null,null,yT,yk,yR,yO,{},{diff:{nodes:{paragraph:yj,style_paragraph:yj,edit_area:yE,text_box:yE,header:yE,footer:yE},marks:{font_family:yy,font_size:yv}}}]);class yB{constructor(t,e){this.pm=t,this.options=e,this._monStoppers=[],this._mons=[]}static get pluginName(){return""}static get pluginGroupName(){return""}static get pluginDependency(){return[]}static get pluginSubscriptions(){return null}get pluginClassPrefix(){let t=this.constructor;return`syno-o-pm-plugin-${(t.pluginGroupName||t.pluginName).replace(/_/g,"-")}-`}detach(){this._monStoppers.forEach(t=>t());let t=this._mons;for(let e=t.length-1;e>=0;--e){let n=t[e];n.target.removeEventListener(n.name,n.eventHandler,n.eventOptions)}}init(){this.bindEvents()}destroy(){this.detach()}monStopper(t){this._monStoppers.push(t)}monitorEvent(t){return this._mons.push(t),t}unmonitorEvent(t){let{target:e,name:n,handler:r,scope:i}=t,a=this._mons;for(let t=a.length-1;t>=0;--t){let s=a[t];if(s.target===e&&s.name===n&&s.handler===r&&s.scope===i)return a.splice(t,1)[0]}return null}bindEvent(t,e,n,r,i){let a,s=!i||!1!==i.monitor,o=!!(i&&i.once);a=s&&o?(function(){for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return this.unmonitorEvent({target:t,name:e,handler:n,scope:r}),n.apply(r,a)}).bind(this):n.bind(r),s&&this.monitorEvent({target:t,name:e,handler:n,scope:r,eventHandler:a,eventOptions:i}),t.addEventListener(e,a,i)}unbindEvent(t,e,n,r,i){let a=this.unmonitorEvent({target:t,name:e,handler:n,scope:r});return!!a&&(t.removeEventListener(e,a.eventHandler,a.eventOptions),!0)}bindEvents(){}}let yz=new Map;class yF extends yB{constructor(t,e){super(t,e),this.hiddenRegion=o??=this.ensureHiddenRegion(),this.hiddenItemMap=yz}static get pluginName(){return"hidden_region"}ensureHiddenRegion(){let t=this.pm.root;return t.querySelector(`.${this.pluginClassPrefix}iframe`)||t.body.appendChild(this.createHiddenRegion())}createHiddenRegion(){return na(["div",{class:this.pluginClassPrefix+"iframe",inline_style:{position:"absolute",left:"-10000px",top:"-10000px",width:"5566px",height:"5566px",opacity:0,overflow:"hidden","pointer-events":"none","z-index":0}}])}has(t){return this.hiddenItemMap.has(t)}get(t){return this.hiddenItemMap.get(t)||null}add(t,e){let n=this.get(t);return n||("function"==typeof e&&(e=e()),this.hiddenRegion.appendChild(e),this.hiddenItemMap.set(t,e),e)}remove(t){let e=this.get(t);return e?(this.hiddenRegion.removeChild(e),this.hiddenItemMap.delete(t),e):null}clear(){e8(this.hiddenRegion),this.hiddenItemMap.clear()}}class yG{constructor(t,e,n){this.module=t,this.options=e||Object.create(null),this.name=String(n||t.pluginName||t.name)}getName(){return this.name}getGroupName(){return this.module.pluginGroupName||""}getSubscriptions(){return this.module.pluginSubscriptions}get(t){return t.getPlugin(this.name)}attach(t){let e=this.module.pluginDependency;if(e&&!e.every(e=>t.getPlugin(e)))throw RangeError(`Plugin dependency of ${this.name} is missing. ${e}`);return new this.module(t,this.options)}detach(t){let e=this.get(t);e&&e.detach&&e.detach()}config(t){return t?new yG(this.module,{...this.options,...t},this.name):this}}let yH=new yG(class extends yF{constructor(t,e){super(t,e)}});class yW{constructor(t,e,n){this.fn=t,this.resolver=e,this.rejecter=n}execute(){let t;try{t=this.fn(this.fn_param)||Promise.resolve()}catch(e){t=Promise.reject(e)}return t.then(this.resolver,this.rejecter)}}class yq{constructor(t){this.queue_=[],this.running_count_=0,this.max_concurrent_=t&&t.max_concurrent||6}enqueue(t){return new Promise((e,n)=>{let r=new yW(t,e,n);this.queue_.push(r),this._scheduleConsume()})}clear(){this.queue_.length=0}isEmpty(){return 0===this.queue_.length}_scheduleConsume(){for(;this.running_count_<this.max_concurrent_&&!this.isEmpty();){let t=this.queue_.shift();this.running_count_++,setTimeout(()=>{t.execute().then(()=>this._onTaskDone())},0)}}_onTaskDone(){this.running_count_--,this._scheduleConsume()}}class yU extends yB{constructor(t,e){super(t,e),this.taskAttrName=e.taskAttrName||"data-image-loader-task",this.taskQueue=new yq,this.urlLoadedMap=new Map,this.taskConfigMap=new Map,this.domLoadingMap=new Map,this.nextTaskId=0}static get pluginName(){return"image_loader"}isUrlLoaded(t){return this.urlLoadedMap.has(t)}async loadImageUrl(t){let e=await t;if(!e)throw Error("Loading empty image url.");let n=this.urlLoadedMap,r=n.get(e);if(r)return r;let i=this.taskQueue.enqueue(this.doLoadImageUrl.bind(this,e));return n.set(e,i),i}doLoadImageUrl(t){return new Promise((e,n)=>{let r=new Image;r.addEventListener("load",()=>{e(t)}),r.addEventListener("error",t=>{n(t)}),r.setAttribute("src",t)})}generateTaskId(){let t=String(this.nextTaskId);return++this.nextTaskId,t}createTask(t){let e=this.generateTaskId();return this.taskConfigMap.set(e,Promise.resolve(t)),e}async getTaskConfig(t){let e=this.taskConfigMap.get(t);if(!e)throw Error(`Given task id is invalid: ${t}`);return e}setImageElementUrl(t,e,n){if("background"===e){if(n){let t=n.match(/^\s*url\s*\((.*)\)\s*$/i);t&&(n=t[1].trim()).length>=2&&n.startsWith('"')&&n.endsWith('"')&&(n=n.slice(1,-1)),n=`url(${n})`}t.style.backgroundImage=n}else{let e=t.nodeName.toLowerCase();switch(e){case"img":t.src=n;return;case"image":t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);return;default:throw Error(`Unknown image element: ${e}`)}}}isDomLoading(t){return this.domLoadingMap.has(t)}isDomLoadable(t){return!!t.getAttribute(this.taskAttrName)}async loadImageTask(t,e){try{let{type:n,url:r}=await this.getTaskConfig(e);return r&&await this.loadImageUrl(r),this.setImageElementUrl(t,n,r),!0}catch(t){return ad.default.warn(t),!1}}async loadImageDom(t,e){let n=this.domLoadingMap,r=n.get(t);if(r)return r;if(e){let n=this.createTask(e);t.setAttribute(this.taskAttrName,n)}let i=t.getAttribute(this.taskAttrName);if(!i)return!1;let a=this.loadImageTask(t,i);n.set(t,a);let s=await a;return t.removeAttribute(this.taskAttrName),n.delete(t),s}loadDescendant(t){let e=t.querySelectorAll(`[${this.taskAttrName}]`);return e.length?Promise.all(Array.prototype.map.call(e,t=>this.loadImageDom(t))).then(t=>t.some(t=>t)):Promise.resolve(!0)}}let yZ=new yG(class extends yU{constructor(t,e){super(t,e)}}),{elt:y$}=d;class yJ extends yB{scan(t,e,n,r,i){let a=new yY(t),s=i.dirty;function o(){for(;a.dom;){let t=sK.fly(a.dom).getOffset();if(!(t<h))return t===h;a.next(!0)}}let l=0,h=0,u=n.firstChild;for(let t=0,c=0;t<e.childCount;t++){let d,p,g,f,y=e.child(t),x=r+c,m=u===y?l:n.index(y,l+1);if(m>-1)for(p=l,d=y;l!==m;)h+=u.nodeSize,u=n.maybeChild(++l);let v=y.getRenderRank();if(y.resetRenderRank(),v===rg.RENDER_NONE&&d&&!s.get(d)&&o())g=!0,f=a.dom;else if(v!==rg.RENDER_REDRAW&&(!this.pm.enableBreakLineHook||!y.type.isTextblock)&&u&&2!==s.get(u)&&!y.isText&&!y.shouldRender(u)&&(!y.type.isTableCell||!u.dom||!!y.state.display==("none"!==u.dom.style.display))&&o()){if(g=!0,f=a.dom,this.linkDOM(y,f),!u.type.isLeaf){let{changed:t}=this.scan(f,y,u,x+1,i);if(t)for(let e=t.length-1;e>=0;--e)a.collectChanged(t[e])}sK.fly(f).syncSize(y.nodeSize)}else{g=!1,i.pos=x,i.offset=c,i.redrawn&&i.redrawn.set(y,x);let t=y.render(i);if(1!==t.childNodes.length)throw Error("not support multi-dom for non-inline node yet.");f=t.firstChild,a.insertBefore(f)}if(this.pm.hook.slidePreview){for(let t=p;t<m;++t){let e=n.child(t);this.pm.hook.slidePreview(-1,e.dom,e,x,-1)}this.pm.hook.slidePreview(+!g,f,y,x,g?l:-1)}if(g){if(y.isText)for(let t=c,e=t+y.nodeSize;t<e;){let e=sK.fly(a.dom);e.setOffset(t),t+=e.getSize(),a.next()}else c!==h&&sK.fly(a.dom).syncOffset(c),a.next();h+=u.nodeSize,u=n.maybeChild(++l)}c+=y.nodeSize}a.end(!0);let c=a.removed;for(let t=c.length-1;t>=0;--t)sK.fly(c[t]).removeAll();let d=a.getChangedArray();if(this.hookChange(e,t,d),this.pm.hook.slidePreview)for(let t=l;t<n.childCount;++t){let i=n.child(t);this.pm.hook.slidePreview(-1,i.dom,i,r+e.nodeSize-2,-1)}return{changed:d}}}class yY extends s3{constructor(t,e){super(t,e),this.removed=[],this.changed=null}checkDOM(t){let e=super.checkDOM(t);return t&&!e&&(this.last_dom=t),e}ensureDOM(){let t=this.parent,e=this.child_container;super.ensureDOM(),t!==this.parent&&(this.last_parent=t,this.last_child_container=e)}next(t){return this.dom&&(this.last_dom=this.dom,(t||this.removing)&&this.collectRemoved(this.dom)),super.next()}end(t){this.removing=!!t;let e=super.end();return this.removing=!1,e}findParent(t){if(!(t=sK.fly(t).parentNode))return null;this.parent_map||(this.parent_map=new Map,sK.fly(this.root).forAll(function(t){this.parent_map.set(t,!0)},this));let e=sK.fly(t).getNode();if(e&&e.type.pseudoType&&(t=sK.fly(t).parentNode),!this.parent_map.has(t)){let e=sK.fly(t).getNode(),n=sK.fly(this.root).getNode();if(!e||!n||e.type!==n.type)return null}return t}getChangedArray(){let t=[];return this.changed&&this.changed.forEach((e,n)=>{t.push(n)}),t}collectChanged(t){this.changed||(this.changed=new Map),(t=this.findParent(t))&&this.changed.set(t,!0)}collectRemoved(t){this.removed.push(t),sK.fly(t).forAll(this.collectChanged,this)}insertBefore(t){this.last_dom?this.last_dom.parentNode.insertBefore(t,this.last_dom.nextSibling):this.last_child_container?this.last_child_container.appendChild(t):this.dom?this.dom.parentNode.insertBefore(t,this.dom):sK.fly(this.root).childContainer.appendChild(t),this.last_dom=t,this.collectChanged(t)}}class yX extends yJ{constructor(t,e){for(let n of(super(t,e),this.progressiveStopThreshold=e.progressiveStopThreshold,this.hooks=this.createHooks(),this.buildDefaultHooks(e.hooks),this.getFreezeList())){let t=this[n];"function"==typeof t&&(this[n]=t.bind(this))}}static get pluginName(){return"draw"}getFreezeList(){return["onChildContainer","onDrawRender","onDrawAfterRender","onDrawChange","onDrawAfterChildRender","onDrawMarkRender","renderInlineFlat","overrideChildContainer","filterContentProgressiveRenderable"]}getDrawTarget(){return this.pm.getMode()}createHooks(){let t,e=this.pm.schema,n=t=>F(e.nodes,t);return{render:n(()=>new nT({pipelineTransformer:(t,e)=>t??e})),afterRender:n(()=>new nP),childContainer:n(()=>new nT({pipelineParameterIndex:2})),afterChildRender:n(()=>new nP),redraw:n(()=>new nP),change:n(()=>new nP),event:n(()=>new nP),markRender:(t=()=>new nP,F(e.marks,t))}}buildDefaultHooks(t){if(!t)return;let e={priority:-100};P(t,(t,n)=>{if(t)for(let{checker:r,handler:i,options:a}of t)this.addEventListener(n,i,{...e,...a,checker:r})})}checkHookType(t){return t in this.hooks}addEventListener(t,e,n){if(!this.checkHookType(t))return void ad.default.error(`Given draw hook type is invalid: ${t}`);let r=n?.checker;if(!r)return void ad.default.error(`Given draw hook checker is invalid: ${r}`);let i=nW.ensureFilter(r),a=this.pm.schema;P(this.hooks[t],(r,s)=>{let o=t.startsWith("mark")?a.markType(s):a.nodeType(s);i.call(null,o)&&r.add(e,n)})}removeEventListener(t,e,n){if(!this.checkHookType(t))return void ad.default.error(`Given draw hook type is invalid: ${t}`);P(this.hooks[t],t=>{t.remove(e)})}hook(t,e,n){return this.hooks[t][e].dispatch(...n)}hookRender(t,e,n,r){return this.hook("render",e.type.name,arguments)}hookAfterRender(t,e,n,r){return this.hook("afterRender",t.type.name,arguments)}hookChildContainer(t,e,n){return this.hook("childContainer",t.type.name,arguments)}hookAfterChildRender(t,e,n,r){return this.hook("afterChildRender",t.type.name,arguments)}hookRedraw(t,e,n){return this.hook("redraw",t.type.name,arguments)}hookChange(t,e,n,r){return t.is("Text")||t.is("RootType")||sK.fly(t.dom).bumpVersion(),this.getPmElement(e).syncDrawSize(),this.hook("change",t.type.name,arguments)}hookEvent(t,e){return this.hook("event",t.type.name,arguments)}hookMarkRender(t,e,n){return this.hook("markRender",e.type.name,arguments)}splitTextDOM(t,e){let n=e5(t);if(!n||!eH(n))return null;let r=n.data;if(!(e>0&&e<r.length))return null;let i=t.cloneNode(!0);e5(i).data=r.slice(e),n.data=r.slice(0,e);let a=this.getPmElement(t,!0);if(a.isOffsetElement){let t=this.getPmElement(i,!0);t.setOffset(a.getOffset()+e),t.setSize(a.getSize()-e);let n=a.getNode();void 0!==n&&t.setNode(n),a.setSize(e),a.insertNextSegment(i)}return this.pm.getPlugin("line_breaker")?.onSplitText(t,e,i),this.pm.getPlugin("font")?.onSplitText(t,e,i),i}ensureDomRenderOptions(t){let e=t?.target;e&&"editor"!==e&&"viewer"!==e||(e="general");let{onChildContainer:n,onRender:r,onAfterRender:i,onAfterChildRender:a,onMarkRender:s}=t??m;return{...t,target:e,onChildContainer:al.isTargetMatch(e,"display")?(t,e)=>{this.onChildContainer(t,e),n?.(t,e)}:n,onRender:(t,e,n,i,a)=>(e=this.hookRender(e,t,a,n),e=r?.(t,e,n,i,a)??e),onAfterRender:(t,e,n,r,a)=>{this.hookAfterRender(t,e,a,n),i?.(t,e,n,r,a)},onAfterChildRender:(t,e,n,r,i)=>{this.hookAfterChildRender(t,e,i,n),a?.(t,e,n,r,i)},onMarkRender:(t,e,n)=>{this.hookMarkRender(e,t,n),s?.(t,e,n)}}}renderNode(t,e){let n=t.render(this.ensureDomRenderOptions(e));if(!n.firstElementChild||1!==n.childNodes.length)throw Error(`Not support multi-element for node ${t.name}.`);return n.firstElementChild}renderFragment(t,e){return t.render(this.ensureDomRenderOptions(e))}renderText(t,e,n){return this.pm.schema.text(t,e).render(this.ensureDomRenderOptions(n))}createDrawOptions(){return{target:this.getDrawTarget(),document,pos:0,ranges:this.pm.ranges.activeRangeTracker(),onChildContainer:this.onChildContainer,onRender:this.onDrawRender,onAfterRender:this.onDrawAfterRender,onChange:this.onDrawChange,onAfterChildRender:this.onDrawAfterChildRender,onMarkRender:this.onDrawMarkRender,renderInlineFlat:this.renderInlineFlat,overrideChildContainer:this.overrideChildContainer,filterContentProgressiveRenderable:this.filterContentProgressiveRenderable,progressiveStopThreshold:this.progressiveStopThreshold??this.getDefaultProgressiveStopThreshold()}}onChildContainer(t,e){sK.fly(e).setChildContainer(t)}onDrawRender(t,e,n,r,i){let a=this.hookRender(e,t,i,n);return t.is("Inline")&&a.setAttribute("data-syno-inline","true"),a}onDrawAfterRender(t,e,n,r,i){t.is("Inline")&&e.setAttribute("data-syno-inline-wrapper",t.is("Text")?"text":"non_text"),this.applyOffsetSize(e,r,t.nodeSize),this.linkDOM(t,e),this.hookAfterRender(t,e,i,n)}onDrawChange(t,e,n,r,i,a){this.hookChange(t,e,n,i?[i.dom]:null)}onDrawAfterChildRender(t,e,n,r,i){t.is("Textblock")&&!t.is("DefaultParagraph")&&function(t,e){let n=sK.fly(t).childContainer,r=0===e.content.size||e.lastChild.is("HardBreak")||e.type.isCode&&e.lastChild.isText&&/\n$/.test(e.lastChild.text),i=n.lastChild,a=i&&i.nodeType===i.ELEMENT_NODE&&"trailing-break"===i.getAttribute("pm-ignore");if(!r||!a)if(r)n.appendChild(y$("span",{linebreak:"true","pm-ignore":"trailing-break",inline_style:nK.setToStyle(e.textMarks)},y$("br")));else{if(!a)return;n.removeChild(i)}}(e,t),this.hookAfterChildRender(t,e,i,n),t.resetRenderRank(),this.hookRedraw(t,e,n),this.hookEvent(t,e)}onDrawMarkRender(t,e,n){this.hookMarkRender(e,t,n)}renderInlineFlat(t,e,n,r,i){if(!t.is("Text"))return;let a=e.parentNode;if(!a)return;let s=e,o=n;for(;s;){i.advanceTo(o);let t=sK.fly(s).getSize(),e=i.nextChangeBefore(o+t);if(e>-1){t=e-o;let n=this.splitTextDOM(s,t);n&&a.insertBefore(n,s.nextSibling)}if(i.current.length&&(s.className=i.current.join(" ")+s.className),i.element){let t=na(["span",{contenteditable:!1,"pm-ignore":!0},i.element]);a.insertBefore(t,s)}s=sK.fly(s).getNextSegment(),o+=t}}overrideChildContainer(t,e,n){return this.hookChildContainer(t,e,n)}filterContentProgressiveRenderable(t){return!1}getDefaultProgressiveStopThreshold(){let t=this.getDrawTarget();return"editor"===t?{preset:"time",value:200}:"viewer"===t?{preset:"time",value:50}:_}applyOffsetSize(t,e,n){let r=sK.fly(t);null!==e&&r.setOffset(e),null!==n&&r.setSize(n)}linkDOM(t,e){t.dom=e,sK.fly(e).syncNode(t)}draw(t,e,n){let r=n?.dirty;return e&&(!r||2!==r.get(e))&&t.getRenderRank()!==rg.RENDER_REDRAW&&t.sameMarkup(e)?this.doRedraw(t,e,n):this.doDraw(t,n)}*doDraw(t,e){let n=document.createDocumentFragment(),r=t.schema.getDomRenderer().getNodeGenerator(t,n,{...this.createDrawOptions(),pos:-1,...e}),{done:i}=r.next();if(i||!n.firstElementChild)throw Error(`Nothing is rendered by node ${t.name}.`);let a=this.pm.content;a.textContent="";let s=sK.fly(n.firstElementChild).childContainer?.childNodes;for(s&&a.append(...s);!r.next().done;)yield;t.dom=void 0}*doRedraw(t,e,n){t.resetRenderRank(),this.scan(this.pm.content,t,e,0,{...this.createDrawOptions(),...n})}getDrawnDom(t){return t.dom||null}getDom(t){return t instanceof rV?this.getDrawnDom(t):t}getPmElement(t,e){void 0===e&&(e=!1);let n=t&&this.getDom(t);return n&&(e?sK.get(n):sK.fly(n))}adaptPmElement(t){let e=t&&this.getDom(t);return e&&sK.adapt(e)}}let yQ=new yG(class extends yX{constructor(t,e){super(t,e)}filterContentProgressiveRenderable(t){return t.is("EditArea")}}),yK=Object.create(null);function y0(t,e){let n=sK.fly(t);if(n.isLineElement){let t,r=n.childContainer;if(e<0){let e=n.firstElementChild;t=e?sf(e):0}else t=sy(r);return{node:r,offset:t}}}class y1 extends yB{constructor(t,e){super(t,e)}ensureDOM(t){return t&&t!==this.pm.content&&aI(this.pm.content,t)?t:null}posBeforeFromDOM(t,e){let n,r=0,i=!0;for(n=sK.fly(t).isPmElement?t:sK.fly(t).parentNode;n&&!sK.fly(n).isPmContent;n=sK.fly(n).parentNode)sK.fly(n).isOffsetElement&&(sK.fly(n).isTextElement||(n=sK.fly(n).getFirstSegment()),r+=sK.fly(n).getOffset()+(!i&&sK.fly(n).isNodeElement?1:0),i=!1);return n?i?-1:r:NaN}posFromDOM(t,e,n){let r,i,a=!1;null==e?(a=!0,r=t,sK.fly(t).isTextElement||(t=sK.fly(t).getFirstSegment()),e=sf(t),t=t.parentNode):r=t.nodeType===t.TEXT_NODE?t:t.childNodes[e];let s=sK.get(t);if(s&&!s.isPmElement&&(s=sK.fly(s.parentNode,s)),!s)return null;let o=this.posBeforeFromDOM(s.dom);if(isNaN(o))return null;let l=s.getNode(),h=s.childContainer,u=h&&aI(h,t);if(!u||l&&l.type.pseudoType)if(s.isTextElement){let n;i={pos:o+(n=t.nodeType===t.TEXT_NODE?e:t.childNodes[e]?0:s.getSize()),inner_offset:n,exact:a}}else i={pos:o,exact:!u&&s.isNodeElement};else{let n,r,l=t===h?t.childNodes[e]:sp(t,h);new s3(s.dom,!0).forEach(function(t,e){if(t.parentNode!==h||l&&(l===t||l.compareDocumentPosition(t)&l.DOCUMENT_POSITION_FOLLOWING))return n=t,!0},this,!0),r=n?sK.fly(n).getOffset():s.isLineElement?s.getSize():(s.isNodeElement?s:sK.fly(s.parentNode)).getSize()-2,i={pos:o+ +!s.isLineElement+r,exact:a&&l&&n&&l===n&&sK.fly(n).isNodeElement}}return n&&n.resolve&&(i.$pos=this.pm.doc.resolve(i.pos)),i.dom=r,i}posOnlyFromDOM(t){let e=this.posFromDOM(t);return e?e.pos-(e.inner_offset||0):-1}DOMFromOffset(t,e,n){let r=n&&n.bias;for(;;){let n,s=!sK.fly(t).isLineElement,o=sK.fly(t).forEachElement(function(t,i,a){let o=sK.fly(t),l=o.getOffset()+o.getSize();return e<l||s&&r<0&&e===l?(n=t,!1):a.dom?void 0:(n=t.parentNode,!0)},this,!0);if(!n&&sK.fly(t).childContainer&&(n=sK.fly(t).childContainer,o=!0),!n){for(var i=t,a=e;i.nodeType===i.ELEMENT_NODE&&i.firstChild;)i=i.firstChild;return{node:i,offset:a}}let l=sK.fly(n);if(o){let t=l.lastChild;return t&&y0(t,1)||{node:n,offset:sy(n)}}let h=l.getOffset();if(e===h)return y0(n,-1)||{node:n.parentNode,offset:sf(n)};t=n,e=e-h-(!l.childContainer||l.isLineElement?0:1)}}DOMFromPos(t,e,n){let r=this.pm.hasOperation()?this.pm.getOperation().doc:this.pm.doc;if(!e&&r!==this.pm.doc)throw RangeError("Resolving a position in an outdated DOM structure");let i=r.resolve(t);return this.DOMFromOffset(0===i.depth?this.pm.content:i.parent.dom,i.parentOffset,n)}DOMAfterPos(t,e){let n=this.DOMFromPos(t,!1,e),r=n.node.childNodes[n.offset];if(!r)throw RangeError("No node after pos "+t);return r}DOMAtCoords(t,e){return this.ensureDOM(this.pm.root.elementFromPoint(t.x,t.y+1))}posAtCoords2(t,e){let n=this.DOMAtCoords(t,e);return n&&this.posFromDOM(n,null,e)}_posAtCoordsInside(t,e,n,r){let i=sK.fly(e);if(i.isLineElement){let r=i.getOffset()+i.getSize(),a=this.pm.doc.resolve(n),{offset:s,bias:o}=this.inlineOffsetAtCoordsX(a,e,t.x);return{pos:a.start()+s,bias:s===r?-1:1,coordsBias:o}}{let a,s=i.getNode();if(s){if(s.type.isInline)return{pos:n,bias:1,coordsBias:1};else if(s.type.isTableRow){let i,a=sK.fly(r).getNode(),o=a.attrs.colgroup,l=s.childCount-1,h=0;for(let e=0;e<l;++e)if(h+=o[e].width,t.x<=h){l=e;break}let u=!0===s.child(l).state.display;i=u?s.child(l):a.getDisplayCellNode(a.index(s),l);let c=sK.fly(i.dom).forAll(function(t){if(aI(r,t))return t},this,!0);if(!u){let i,a=sK.fly(c).getFirstSegment();sK.fly(r).forAll(t=>{if(i=sp(a,sK.fly(t).childContainer))return!0},this,!0),n=n-sK.fly(e).getOffset()+sK.fly(i).getOffset();let s=sp(c,sK.fly(r).childContainer);for(let n=s;n!==e;n=n.nextSibling)t.y+=sK.fly(n).getHeight();e=s}return this._posAtCoordsInside(t,c,n+1+sK.fly(c).getOffset(),e)}else if(s.type.isEditArea){let r=this.pm.getPlugin("paginator").pageIndexFromTop(t.y,!0,{bound:!0});return t.y=r.inner,this._posAtCoordsInside(t,sK.fly(e).child(r.index),n,e)}}if(i=sK.fly(e),s)s.is("ContentEditable")||(t.y-=i.getTopPaddingHeight()+i.getBlockerPadding());else if(i.isPageElement){let e=this.pm,n=i.getData("page_index");t.x=e.getPlugin("paginator").convertInnerLeft(n,t.x,!0),t.y=e.getPlugin("paginator").convertInnerTop(n,t.y,!0)}return(i.forEach(function(e){var n;let r,i;if(a&&(n=a,i=(r=sK.fly(n)).getHeight()+r.getBlockerPadding(),t.y<=i||(t.y-=i,0)))return!0;a=e},this,!0),a)?this._posAtCoordsInside(t,a,n+1+sK.fly(a).getOffset(),e):{pos:iR.findNear(this.pm.doc.resolve(n),sK.fly(r).isPageElement?-1:1,!0).from,bias:1,coordsBias:1}}}posAtCoordsInside(t,e,n){let r=e.findData("ContentEditable");if(!r)return null;if(iN.checkAvailable(e)){let t=sK.fly(e.parent.dom);n&&(n=sp(n,t.childContainer)),n||(n=t.elementInfoAtOffset(e.parentOffset,{bias:1,bound:!0}).dom)}else if(n){if(!sK.fly(n).isNodeElement){let t=sK.fly(e.self.dom).forAll(function(t){if(aI(t,n))return t},this,!0);if(!t){let r=sK.fly(n).parentNode;t=sK.fly(e.self.dom).forAll(function(t){if(sK.fly(t).parentNode===r)return t},this,!0)}n=t}}else n=e.self.dom;if(!n)return null;t={x:t.x,y:t.y};let i={residingPmEditor:e.shrink(r.depth-1)};return e.pos===r.pos?(r.node.type.isEditArea&&(i.residingPmEditor=void 0),t=this.convertCoords(t,i)):(t=this.convertCoords(t,i),i.side=-1,t.y-=this.rectAtDOM(n,i).top),this._posAtCoordsInside(t,n,e.pos,sK.fly(n).parentNode)}convertCoords(t,e){if(void 0===e&&(e=yK),!e.useClientCoords){let n=e.residingPmEditor;if(n&&n.self.type.coordsFixed||(t=this.pm.on.transformClientCoords.dispatch(t,n)),n){let e=n.self,r=e.type;if(r.isNote){let n=r.getEditableAreaDOM(e.dom).getBoundingClientRect();t.x-=n.left,t.y-=n.top}else r.isAbstractTextBlock?t=aw.apply(t,e.state.reverse_matrix):r.is("TextBox")&&(t=this.pm.getPlugin("text_box").onTransformCoordinateSystem(t,n)||t)}}return t}coordsAtRectCenter(t,e){var n;return this.convertCoords({x:((n=t).left+n.right)/2,y:(n.top+n.bottom)/2},e)}coordsAtDOMCenter(t,e){return this.coordsAtRectCenter(t.getBoundingClientRect(),e)}coordsAtTextCenter(t,e,n,r){return this.coordsAtRectCenter(a1(t,e,n),r)}rectAtDOM(t,e){var n;let r=(n=e&&e.side)?n>0?1:-1:0,i=this.coordsAtDOMCenter(t,e),a=0,s=0;return r>=0&&(a=t.offsetWidth/2),r<=0&&(s=t.offsetHeight/2),{left:i.x-a,top:i.y-s,right:i.x+a,bottom:i.y+s}}rectAtText(t,e,n,r){var i;let a,s=(i=r&&r.side)?i>0?1:-1:0,o=Object.create(null);if(s>=0){let i=this.coordsAtTextCenter(t,e,e,r),s=n===e||null==n?i:this.coordsAtTextCenter(t,n,n,r);o.left=i.x,o.right=s.x,a=i.y}else{let i=this.coordsAtTextCenter(t,e,n,r);o.left=o.right=i.x,a=i.y}if(s<=0){let e=t.parentNode.offsetHeight/2;o.top=a-e,o.bottom=a+e}else o.top=o.bottom=a;return o}cursorAtDOM(t,e,n){let r,i=0>(n&&n.bias)?-1:1;null==e&&(e=sf(t),t=t.parentNode);let a=sy(t);return e=tj(e,0,a),t.nodeType===t.TEXT_NODE?r=this.rectAtText(t,e,e,n):i>0&&e===a||i<0&&e>0?(t=t.childNodes[e-1],(r=this.rectAtDOM(t,n)).left=r.right):(t=t.childNodes[e],(r=this.rectAtDOM(t,n)).right=r.left),r.dom=t,r}cursorAtPos(t,e){void 0===e&&(e=Object.create(null)),e.editor||e.skip_editor||(e.editor=this.pm.doc.resolve(t).findNode("ContentEditable"));let n=this.DOMFromPos(t,!1,e);return this.cursorAtDOM(n.node,n.offset,e)}coordsAtPos(t,e){var n,r,i;let a,s;void 0===e&&(e=1);let o=this.DOMFromPos(t);return n=o.node,r=o.offset,void 0===(i=e)&&(i=1),null==r&&(r=sf(n),n=n.parentNode),n.nodeType===window.Node.TEXT_NODE?(s=n.length,i>0?(y3(r,s)&&(a=y4(n,r,r+1,-1)),!y6(a)&&y3(r-1,s)&&(a=y4(n,r-1,r,1)||a)):(y3(r-1,s)&&(a=y4(n,r-1,r,1)),!y6(a)&&y3(r,s)&&(a=y4(n,r,r+1,-1)||a))):n.childNodes.length>0&&(s=n.childNodes.length,i>0?(y3(r,s)&&(a=y8(n.childNodes[r],-1)),!y6(a)&&y3(r-1,s)&&(a=y8(n.childNodes[r-1],1)||a)):(y3(r-1,s)&&(a=y8(n.childNodes[r-1],1)),!y6(a)&&y3(r,s)&&(a=y8(n.childNodes[r],-1)||a))),a||(a=y2(a_.copy(n.getBoundingClientRect()),-1)),delete a.zero_width,a}inlineOffsetAtCoordsX(t,e,n){let r=t.findNode("Textblock");if(!r)return null;let i=sK.fly(e),a=i.getOffset();if(n<=r.state.text_rect_info.left)return{offset:a,bias:-1};let s=1;function o(t,e){return n>t.right?(a+=e,!1):(n<(t.left+t.right)/2?s=1:(s=-1,a+=e),!0)}let l={side:1,residingPmEditor:t.shrink("ContentEditable")};return i.forEachElement(function(t){let e=sK.fly(t).getSize();if(sK.fly(t).isTextElement){let n=e5(t)||t,r=n.nodeType===n.TEXT_NODE?n.data:null,i=0;for(;i<e;){let t;if(r){let e=r.codePointAt(i);t=void 0!==e&&t4(e)?2:1}else t=1;if(o(this.rectAtText(n,i,i+t,l),t))return!0;i+=t}}else{if(t.matches("[synobr]")||t.querySelector("[synobr]"))return s=1,!0;if(o(this.rectAtDOM(t,l),e))return!0}},this,!0),{offset:a,bias:s}}}function y2(t,e){return R(t.left,t.right)||(t.zero_width=!0),e<0?t.right=t.left:t.left=t.right,t}function y5(t,e){var n,r;let i;return y2(a_.copy((n=t,r=e,(i=n.getClientRects()).length?i[r<0?0:i.length-1]:n.getBoundingClientRect())),e)}function y4(t,e,n,r){var i,a,s;let o,l=(i=t,a=e,s=n,(o=document.createRange()).setEnd(i,null==s?i.length:s),o.setStart(i,a||0),o),h=y5(l,r);return l.detach(),h}function y8(t,e){return t.nodeType===window.Node.TEXT_NODE?y4(t,null,null,e):(sK.fly(t).isLineElement&&(e>0&&t.lastChild&&t.lastChild.nodeType!==window.Node.TEXT_NODE?t=t.lastChild:e<0&&t.firstChild&&t.firstChild.nodeType!==window.Node.TEXT_NODE&&(t=t.firstChild)),y5(t,e))}function y3(t,e){return t>=0&&t<e}function y6(t){return t&&!t.zero_width}class y7 extends y1{constructor(t,e){super(t,e)}static get pluginName(){return"dompos"}getDom(t){return this.pm.getPlugin("draw")?.getDom(t)??null}findResidingEditor(t,e){let n=this.posFromDOM(t,null,e);return n?this.pm.doc.resolve(n.pos).maybeShrink("ContentEditable"):null}ensureComputeRectOptions(t,e){if(e)return(e={...e}).useClientCoords||e.residingPmEditor||(e.residingPmEditor=this.findResidingEditor(t,e)||void 0),e}findInlineRangesByLine(t,e,n,r){return[{lineDom:t,startOffset:e,endOffset:n}]}findInlineRangesByTextblock(t,e,n,r){void 0===r&&(r=m);let i=[],a=r.startBias??1,s=r.endBias??1,o=sK.fly(t).getData("line_count");if(sK.fly(t).forEachElement((t,r)=>{let l=sK.fly(t).getOffset(),h=sK.fly(t).getSize(),u=l+h;if(!(e>u)&&(e!==u||!(a>0)||r===o-1)){if(n<l||n===l&&s<0)return!0;i.push({lineDom:t,startOffset:e<=l?0:e-l,endOffset:n>=u?h:n-l})}},this,!0),!i.length)return i;let l=r.inlineRangeMode;return l&&("firstline"===l?i=[i[0]]:"lastline"===l&&(i=[i[i.length-1]])),i}findInlineRanges(t,e,n,r){void 0===n&&(n=e),void 0===r&&(r=m);let i=this.getDom(t);if(!i)return null;let a=r.startBias??1,s=e===n&&"number"==typeof r.endBias&&r.endBias<0&&a>0?1:r.endBias;r={...r,startBias:a,endBias:s};let o=sK.fly(i).getNodeType();return sK.fly(i).isLineElement?this.findInlineRangesByLine(i,e,n,r):o&&o.is("Textblock")?this.findInlineRangesByTextblock(i,e,n,r):null}computeFontMetrics(t){void 0===t&&(t=nK.none);let e=this.pm.schema,n=e.markType("font_size"),r=(n.findFromSet(t)??n.getDefaultMark()).getValue(),i=null,a=e.markType("superscript").findFromSet(t);(!a||!a.getValue())&&((a=e.markType("subscript").findFromSet(t))&&a.getValue()||(a=null));let s=(i=a)?i.type.scriptType:null,o=i?r*i.type.fontSizeRatio:r;return{fontSize:r,scriptType:s,finalFontSize:o}}computeInlineHeightRectForText(t,e,n){let r=sK.fly(t).childContainer;if(!r)return{top:0,bottom:0};let i=this.pm.schema.getDefaultContentStyles(),a=this.rectAtDOM(r,n).top-e.top,s=sS({family:i["font-family"],size:i["font-size"]}).top,{fontSize:o,scriptType:l,finalFontSize:h}=this.computeFontMetrics(n.inlineMarks),u=a-s+(l?sC({size:o},l):0),c=np(h,"pt","px"),d=Math.floor(c),p=Math.floor(c*(n.inlineHeightTextScale||1)),g=sS({size:h}),f=Math.floor(u+g.bottom-(-g.top+g.bottom-d)*.5+(p-d)*.5);return{top:f-p,bottom:f}}computeInlineHeightRectForLine(t,e,n){return{top:0,bottom:e.bottom-e.top}}computeInlineHeightRect(t,e,n){switch(void 0===n&&(n=m),n.inlineHeightMode){case"text":return this.computeInlineHeightRectForText(t,e,n);case"line":return this.computeInlineHeightRectForLine(t,e,n);default:return null}}computeInlineCoordsOffsetsForEditor(t,e,n){let r=n.residingPmEditor;if(!r)return null;let i=this.getDom(r.self);if(!i)return null;let a=this.rectAtDOM(i,n),s=this.computeInset(i);return{x:e.left-(a.left+(s?s.l:0)),y:e.top-(a.top+(s?s.t:0))}}computeInlineCoordsOffsets(t,e,n){return(void 0===n&&(n=m),"editor"===n.coordsOrigin)?this.computeInlineCoordsOffsetsForEditor(t,e,n):null}computeCursorRect(t,e,n){n=this.ensureComputeRectOptions(t,n);let r=this.cursorAtDOM(t,e,n);return{left:r.left,top:r.top,right:r.right,bottom:r.bottom}}doComputeInlineCursorRect(t,e,n,r){let{node:i,offset:a}=this.DOMFromOffset(t,n),s=this.computeCursorRect(i,a,r);return s.left-=e.left,s.top-=e.top,s.right-=e.left,s.bottom-=e.top,s}computeInlineRect(t,e,n,r){let i;void 0===r&&(r=m),r=this.ensureComputeRectOptions(t,r);let a=this.rectAtDOM(t,r),s=this.doComputeInlineCursorRect(t,a,e,{...r,bias:r.startBias});if(e===n)i=s;else{let e=this.doComputeInlineCursorRect(t,a,n,{...r,bias:r.endBias});i={left:Math.min(s.left,e.left),top:Math.min(s.top,e.top),right:Math.max(s.right,e.right),bottom:Math.max(s.bottom,e.bottom)}}let o=this.computeInlineHeightRect(t,a,r);o&&(i.top=o.top,i.bottom=o.bottom);let l=this.computeInlineCoordsOffsets(t,a,r);return l&&(i.left+=l.x,i.top+=l.y,i.right+=l.x,i.bottom+=l.y),i}computeInlineOverlays(t,e,n,r){void 0===n&&(n=e),void 0===r&&(r=m);let i=this.findInlineRanges(t,e,n,r);return i?i.map(t=>{let{lineDom:e,startOffset:n,endOffset:i}=t;return{lineDom:e,rect:this.computeInlineRect(e,n,i,r)}}):null}computeNodeInsetTableCell(t,e){let n=this.pm.getPlugin("table");return n?n.getTableCellInset(t):null}computeNodeInset(t,e){return e.is("TableCell")?this.computeNodeInsetTableCell(t,e):null}doComputeInset(t,e){let n;return n=e?this.computeNodeInset(t,e):null,(!e||e.is("EditableType")&&!e.is("Inline"))&&(n||(n={l:0,t:0,r:0,b:0}),n.l+=sK.fly(t).getLeftPaddingWidth(),n.t+=sK.fly(t).getTopPaddingHeight(),n.r+=sK.fly(t).getRightPaddingWidth(),n.b+=sK.fly(t).getBottomPaddingHeight()),n}computeInset(t){let e=this.getDom(t);if(!e)return null;let n=sK.fly(e).getNodeType();return this.doComputeInset(e,n)}computePreviousWidth(t,e){let n=0;if(e&&e.is("TableCell"))for(let e=sK.fly(t).previousSibling;e;e=sK.fly(e).previousSibling){if(!sK.fly(e).isFirstSegment)continue;let t=sK.fly(e).getNode();if(t&&t.is("TableCell")){if(!t.getState("display",!1)){let e=t.getState("row_index");if(void 0===e)continue;let n=t.getState("covered_idx");if(!n||n.row_index===e)continue}n+=sK.fly(e).getWidth()}}return n}computePreviousHeight(t,e){let n=0;if((!e||e.is("EditableType")&&!e.is("Inline"))&&(n+=sK.fly(t).getBlockerPadding(),!e||!e.is("TableCell")))for(let e=sK.fly(t).previousSibling;e;e=sK.fly(e).previousSibling)n+=sK.fly(e).getHeight()+sK.fly(e).getBlockerPadding();return n}doComputeOffsetInside(t,e,n,r){if(void 0===r&&(r=m),!e.contains(t))return NaN;let i=0;for(let a=t;a&&a!==e;a=sK.fly(a).parentNode){let e=sK.fly(a).getNodeType();if(r.includeSourceInset||a!==t){let t=this.doComputeInset(a,e);t&&(i+=n?t.t:t.l)}i+=n?this.computePreviousHeight(a,e):this.computePreviousWidth(a,e)}return i}computeOffsetInside(t,e,n,r){let i=this.getDom(t),a=this.getDom(e);return i&&a?this.doComputeOffsetInside(i,a,n,r):NaN}computeLeftInside(t,e,n){return this.computeOffsetInside(t,e,!1,n)}computeTopInside(t,e,n){return this.computeOffsetInside(t,e,!0,n)}computeOffsets(t,e,n){return{x:this.computeLeftInside(t,e,n),y:this.computeTopInside(t,e,n)}}}let y9=new yG(class extends y7{constructor(t,e){super(t,e)}ensureDomVisible(t){if(aV(t))return;let e=this.pm.getPlugin("page_display");e&&e.showPageByChild(t)}computeNodeInsetTextBox(t,e){let n=this.pm.getPlugin("text_box");return n?n.getTextBoxInset(t):null}computeNodeInsetShape(t,e){let n=e.queryDom(t,".syno-o-doc-pm-shape")?.getAttribute("synograph");if(!n)return null;let r=this.pm.getPlugin("geometry")?.getGeometryInfo(n);if(!r)return null;let i=r.getAnchoryType();if("absolute"===i){let t=this.pm.getPlugin("paginator");if(!t)return null;let e=t.getBlocker(n);if(!e)return null;let i=r.getClientViewRect(),a=r.getViewPadding(),s=(i.l+i.r)/2-t.getPagePadding(e.page_index).left,o=(e.inner_top+a.t+(e.inner_bottom-a.b))/2,l=r.getRectWidth()/2,h=r.getRectHeight()/2;return{l:s-l,t:o-h,r:t.getPageContentSize(e.page_index).width-s-l,b:t.getPageContentSize(e.page_index).height-o-h}}if("inline"!==i)return null;{let n=sK.fly(t).parentNode;if(!n)return null;let i=e.queryDom(t,".syno-o-doc-pm-drawing-text");if(!i)return null;let a={residingPmEditor:this.pm.doc.resolve(this.pm.doc.queryChildOffset("edit_area",!0))},s=this.coordsAtDOMCenter(n,a),o=this.coordsAtDOMCenter(i,a),l=sK.fly(n).getData("line_content_range"),h=l?(l[1]-l[0])/2:0,u=sK.fly(n).getHeight()/2,c=r.getRectWidth()/2,d=r.getRectHeight()/2;return{l:o.x-c-(s.x-h),t:o.y-d-(s.y-u),r:s.x+h-(o.x+c),b:s.y+u-(o.y+d)}}}computeNodeInsetTable(t,e){let n={l:0,t:0,r:0,b:0},r=this.pm.getPlugin("table");if(r){let e=r.getTableIndent(t);n.l+=e.left,n.r+=e.right}return n}computeNodeInsetEditArea(t,e){let n=this.pm.getPlugin("paginator");if(!n)return n;let r=n.getPagePadding(0),i=n.getPagePadding(-1);return{l:r.left,t:r.top,r:i.right,b:i.bottom}}computeNodeInset(t,e){return e.is("TextBox")?this.computeNodeInsetTextBox(t,e):e.is("Shape")?this.computeNodeInsetShape(t,e):e.is("Table")?this.computeNodeInsetTable(t,e):e.is("EditArea")?this.computeNodeInsetEditArea(t,e):super.computeNodeInset(t,e)}maybeChangeContainerDom(t,e){let n=this.pm.getPlugin("draw");if(!n)return null;let r=n.getDrawnDom(this.pm.showDoc.queryChildNode("invisible",!0));return r&&sK.fly(e).isPageElement&&r.contains(t)?r:null}doComputeOffsetInside(t,e,n,r){return e=this.maybeChangeContainerDom(t,e)||e,this.ensureDomVisible(e),super.doComputeOffsetInside(t,e,n,r)}}),xt=()=>"latin",xe=()=>"eastAsia",xn=(t,e)=>"eastAsia"===e.hint?"eastAsia":"latin",xr=[[[0,127],xt],[[160,255],(()=>{let t=en([161,164,[167,168],170,173,175,[176,180],[182,186],[188,191],215,247]),e=en([[224,225],[232,234],[236,237],[242,243],[249,250],252]);return(n,r)=>"eastAsia"===r.hint&&(r.lang.eastAsia?.startsWith("zh")&&er(e,n)||er(t,n))?"eastAsia":"latin"})()],[[256,687],(t,e)=>"eastAsia"===e.hint&&e.lang.eastAsia?.startsWith("zh")?"eastAsia":"latin"],[[688,975],xn],[[1024,1279],xn],[[1424,1983],xt],[[4352,4607],xe],[[7680,7935],(t,e)=>"eastAsia"===e.hint&&e.lang.eastAsia?.startsWith("zh")?"eastAsia":"latin"],[[8192,10175],xn],[[11904,12031],xn],[[12032,12255],xe],[[12272,12703],xe],[[12800,19903],xe],[[19968,40879],xe],[[40960,42191],xe],[[44032,55215],xe],[[55296,57343],xe],[[57344,63743],xn],[[63744,64255],xe],[[64256,64335],(t,e)=>t>=64256&&t<=64284?xn(t,e):"latin"],[[64336,65023],xt],[[65072,65135],xe],[[65136,65278],xt],[[65280,65519],xe],[[131072,196607],xe]];function xi(t){let e=e5(t.dom);return e&&eH(e)?e.data.length:0}function xa(t){return t.getSize()}class xs extends yB{constructor(t,e){super(t,e)}static get pluginName(){return"font"}static get pluginDependency(){return["draw"]}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"markRender",this.onFontFamilyDrawMarkRender,this,{checker:"FontFamily",priority:-100}),this.bindEvent(t,"afterRender",this.onInlineDrawAfterRender,this,{checker:"Inline"}),this.bindEvent(t,"afterChildRender",this.onTextDrawAfterChildRender,this,{checker:"Text"})}onFontFamilyDrawMarkRender(t,e,n){(n.isTarget("display")||n.isTarget("clipboard"))&&this.pm.getPlugin("draw").getPmElement(t).setData("font:is_font_family",!0)}onInlineDrawAfterRender(t,e,n){if(!n.isTarget("display")&&!n.isTarget("clipboard")||!t.schema.markType("font_family").findFromSet(t.marks))return;let r=this.pm.getPlugin("draw"),i=e,a=0;for(;i&&void 0===r.getPmElement(i).getData("font:is_font_family");)i=i.firstElementChild,++a;i&&r.getPmElement(e).setData("font:font_family_mark_info",{dom:i,distance:a})}onTextDrawAfterChildRender(t,e,n){if(!n.isTarget("display")&&!n.isTarget("clipboard"))return;let r=t.schema.markType("font_family").findFromSet(t.marks);if(!r)return;let i=e.parentNode;if(!i)return;let a=this.pm.getPlugin("draw"),s=this.splitTextByFontFamilyMark(t.text,r);if(a.getPmElement(e).setData("font:font_face_chunks",s),0===s.length)return;let o=n.isTarget("major")?xa:xi,l=a.getPmElement(e,!0),h=0;for(let{text:{length:t},font:e}of s){let n=0;for(;n<t;){this.applyInlineFontFamily(l.dom,e);let r=t-n,s=o(l)-h;if(r<s){let t=a.splitTextDOM(l.dom,h+r);if(!t)return;i.insertBefore(t,l.dom.nextSibling),n+=r,l=a.getPmElement(t,!0),h=0}else{let t=l.getNextSegment();if(!t)return;n+=s,l=a.getPmElement(t,!0),h=0}}}}onSplitText(t,e,n){let r=this.pm.getPlugin("draw"),i=r.getPmElement(t).getData("font:font_family_mark_info");if(!i)return;let a=n;for(let t=0;a&&t<i.distance;++t)a=a.firstElementChild;a&&r.getPmElement(n).setData("font:font_family_mark_info",{dom:a,distance:i.distance})}applyInlineFontFamily(t,e){let n=this.pm.getPlugin("draw").getPmElement(t,!0),r=n.getData("font:font_family_mark_info")?.dom;if(!r||nw(e)===n_(r.style.fontFamily))return;e=this.pm.schema.markType("font_family").ensureFontFamilyCssValue(e),r.style.fontFamily=e;let i=n.getData("line_breaker:inline_item");if(i&&i.style){let t={...i.style,fontFamily:e};t.verticalAlignReferenceStyle&&(t.verticalAlignReferenceStyle={...t.verticalAlignReferenceStyle,fontFamily:e}),n.setData("line_breaker:inline_item",{...i,style:t})}}splitTextByFontFamilyMark(t,e){return function(t,e,n){if(0===t.length)return[];let{latin:r,eastAsia:i,complexScript:a}=e;return r===i&&r===a?[{text:t,font:r}]:function(t,e,n){if(0===t.length)return[];let r=[],i={index:0,font:null};for(let{index:a}of function*(t,e){yield*t9(t,void 0)}(t)){let s=t.codePointAt(a);if(void 0===s)continue;let o=e(function(t,e){let n=function(t){let e;void 0===t&&(t={});let{hint:n="default",lang:r,preferCs:i=!1}=t;return{hint:n,lang:"string"==typeof r?{latin:r,eastAsia:r,complexScript:r}:{latin:r?.latin,eastAsia:r?.eastAsia,complexScript:r?.complexScript},preferCs:i}}(e);if(n.preferCs)return"complexScript";for(let[e,r]of xr)if(t>=e[0]&&t<=e[1])return r(t,n);else if(t<e[0])break;return"latin"}(s,n));i.font?i.font!==o&&(r.push({text:t.slice(i.index,a),font:i.font}),i.index=a,i.font=o):i.font=o}return i.font&&r.push({text:t.slice(i.index),font:i.font}),r}(t,t=>e[t],n)}(t,{latin:e.getValue(),eastAsia:e.getAttrValue("eastAsia")??e.type.getDefaultMark().getValue(),complexScript:e.getAttrValue("complexScript")??e.type.getDefaultMark().getValue()},{hint:e.getAttrValue("hint")??void 0})}}let xo=new yG(class extends xs{constructor(t,e){super(t,e)}});function xl(t,e){t.href=e,e.startsWith("#")?(t.removeAttribute("target"),t.removeAttribute("rel")):(t.target="_blank",t.rel="noreferrer noopener")}function xh(t){l||(l=document.createElement("a")),xl(l,t);try{return l.click(),!0}catch(e){return console.error(`failed to open link: ${t}`,e),!1}}let xu="#dlink=";function xc(t){return t.endsWith("/")?t.slice(0,-1):t}function xd(t){if("string"!=typeof t)return()=>xc(t());{let e=xc(t);return()=>e}}class xp extends yB{constructor(t,e){super(t,e),this.sourceOfficeUrl=xd(e.sourceOfficeUrl??""),this.baseDriveUrl=xd(e.baseDriveUrl??"")}static get pluginName(){return"link"}static get pluginDependency(){return["draw"]}bindEvents(){super.bindEvents();let t=this.pm,e=t.getPlugin("draw");this.bindEvent(e,"markRender",this.onLinkDrawMarkRender,this,{checker:"Link"}),t.getPlugin("input_data_transfer")&&this.bindEvent(t,"transformPastedDOM",this.onTransformPastedDOM,this)}onLinkDrawMarkRender(t,e,n){let r=e.getValue(),{type:i,href:a}=this.parseLinkValue(r,n.isTarget("clipboard")),s=n.getTarget();"viewer"===s||"clipboard"===s?("A"===t.tagName&&xl(t,a),(2===i||1===i)&&"clipboard"===s&&t.setAttribute("synohref",r)):t.setAttribute("synohref",a),"viewer"===s&&t.addEventListener("click",t=>{t.defaultPrevented||(t.preventDefault(),this.onViewerLinkClick(t,r))})}onViewerLinkClick(t,e){this.openLink(e)}onTransformPastedDOM(t){for(let e of t.querySelectorAll("a[synohref]")){let t=e.getAttribute("synohref");t&&(this.checkLinkValid(t)||e.removeAttribute("synohref"))}return t}getSourceOfficeUrl(){return this.sourceOfficeUrl.call(null)}getAbsoluteDriveLink(t){return t.startsWith(xu)&&(t=t.slice(xu.length)),this.baseDriveUrl.call(null)+(t.startsWith("/")?"":"/")+t}getAbsoluteLocalLink(t){return t.startsWith("#")?this.getAbsoluteLocalLinkById(t.slice(1)):""}getAbsoluteLocalLinkById(t){return""}parseLinkValue(t,e){let n,r,i=this.pm.schema.markType("link").sanitizeLink(t);return i.startsWith(xu)?(n=2,r=this.getAbsoluteDriveLink(i)):i.startsWith("#")?(n=1,r=e?this.getAbsoluteLocalLink(i):i):(n=0,r=i),{type:n,href:r,value:i}}checkLocalLinkValueValid(t){return!1}checkLinkValid(t){let{type:e,value:n}=this.parseLinkValue(t);return 2===e||0===e||1===e&&this.checkLocalLinkValueValid(n)}openLocalLink(t){return!1}openLink(t){if(!t)return!1;let{type:e,href:n,value:r}=this.parseLinkValue(t);return 2===e||0===e?xh(n):1===e&&this.openLocalLink(r)}openLinkBySelection(){let t=this.pm.getPlugin("status")?.getStatus().format.basic.marks.link;return!!t&&this.openLink(t)}getLink(t){if(!t)return"";let{href:e}=this.parseLinkValue(t,!0);return e}}let xg=new yG(class extends xp{constructor(t,e){super(t,e)}bindEvents(){super.bindEvents();let t=this.pm;if("viewer"===t.getPlugin("draw").getDrawTarget()){let e=t.getPlugin("draw");this.bindEvent(e,"render",this.onViewerHeadingBlockDrawRender,this,{checker:"HeadingBlock"})}}onViewerHeadingBlockDrawRender(t,e,n,r){if(!n.isTarget("viewer"))return t;let i=t.firstElementChild;return i&&(i.id=e.getAttrValue("headingId")??""),t}getAbsoluteLocalLinkById(t){return`${this.getSourceOfficeUrl()}#heading_id=${t}`}checkLocalLinkValueValid(t){return t.startsWith("#")?!!this.pm.getPlugin("operator")?.getAction("text").selectHeadingId(this.pm.multiSelection,t.slice(1)):super.checkLocalLinkValueValid(t)}openLocalLink(t){let e=this.pm.getPlugin("navigate"),n="viewer"===this.pm.getPlugin("draw").getDrawTarget();return t.startsWith("#")?e?(e.navigateById(t.slice(1)),!0):!!n&&(xh(t),!0):super.openLocalLink(t)}});class xf extends yB{constructor(t,e){super(t,e)}static get pluginName(){return"list"}static get pluginDependency(){return["draw","font"]}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"render",this.onParagraphDrawRender,this,{checker:"Paragraph"})}onParagraphDrawRender(t,e,n,r){if(!n.isTarget("display"))return t;let i=this.renderListItem(e);return i&&this.getParagraphPrefixWrapper(t)?.append(i),t}getParagraphPrefixWrapper(t){let e=this.pm.getPlugin("draw").getPmElement(t).childContainer;if(!e||!e.parentNode)return null;let n=e.previousElementSibling;return n||(n=document.createElement("span"),e.parentNode.prepend(n)),n}renderListItemText(t){let e=t.getState("list_configs"),n=t.getState("list_path");if(!e||!n)return null;let r=function(t,e){let n=d9(e),r=[],i=0;for(let e of t.matchAll(d8)){let a=e.index;a>i&&r.push({level:-1,text:t.slice(i,a)});let s=e[1];if("0"!==s){let t=Number(s)-1;r.push({level:t,text:n(t)})}i=a+e[0].length}return i!==t.length&&r.push({level:-1,text:t.slice(i)}),r}(e[n.length-1].text,t=>{let r=n[t];return null!=r?d7(e[t].format,r):""}),i=t.schema.markType("font_family").findFromSet(t.listMarks),a=this.pm.root,s=a.createDocumentFragment();if(i){var o;let t=i.getValue(),n=(o=(o=t).toLowerCase(),!!(nA.includes(o)||/dingbats|symbol/i.test(o)));for(let{level:o,text:l}of r)if(o>=0){let r,h,u=e[o].format;if(dQ(u))n||(r="Arial",h="normal");else if(function(t){var e;return"ideographDigital"===t||"ideographLegalTraditional"===t||"taiwaneseCounting"===t||"taiwaneseCountingThousand"===t||"taiwaneseDigital"===t||"chineseCounting"===(e=t)||"chineseCountingThousand"===e||"chineseLegalSimplified"===e}(u)){let e=i.getAttrValue("eastAsia")??i.type.getDefaultMark().getValue();e!==t&&(r=e)}if(r){let t=na(["span",{inline_style:{"font-family":i.type.ensureFontFamilyCssValue(r),"font-weight":h}},l],a);s.appendChild(t)}else s.appendChild(a.createTextNode(l))}else for(let{text:t,font:e}of this.pm.getPlugin("font").splitTextByFontFamilyMark(l,i)){let n=na(["span",{inline_style:{"font-family":i.type.ensureFontFamilyCssValue(e)}},t],a);s.appendChild(n)}}else{let t=r.map(t=>{let{text:e}=t;return e}).join("");s.appendChild(document.createTextNode(t))}return s}renderListItem(t){let e=this.renderListItemText(t);if(!e)return null;let n=t.type,r=n.listItemPadding+"px";return na(["span",{class:n.classPrefix+"list-item"},["span",{class:n.classPrefix+"list-item-padding",inline_style:{display:"inline-block"}},["span",{class:n.classPrefix+"list-item-text",inline_style:{display:"inline-block","padding-left":r,"padding-right":r,...nK.setToStyle(t.listMarks)}},e]]])}getListLinePmElement(t){let e=this.pm.getPlugin("draw"),n=e.getPmElement(t,!0);if(!n)return null;let r=n.getNodeType();return n.isLineElement?n:r&&r.is("Textblock")?e.getPmElement(n.firstElementChild,!0):null}getListItemWidth(t){let e=this.getListLinePmElement(t);return e&&e.getData("list_item_width")||0}getListItemPadding(t){let e=this.getListLinePmElement(t);return e&&e.getData("list_item_padding")||0}}let xy=new yG(class extends xf{constructor(t,e){super(t,e)}});class xx extends yB{constructor(t,e){super(t,e),this.tableRepaintObserver=void 0,this.lastTableDom=null}static get pluginName(){return"table"}static get pluginDependency(){return["draw"]}static get pluginSubscriptions(){return{tableChange:new nP}}ensureTableRepaintObserver(){return this.tableRepaintObserver??=new IntersectionObserver(t=>{for(let{isIntersecting:e,target:n}of t){if(!e)continue;let t=n.style.borderStyle;n.style.borderStyle="solid",window.getComputedStyle(n).borderStyle,n.style.borderStyle=t}})}destroy(){super.destroy(),this.tableRepaintObserver?.disconnect()}bindEvents(){super.bindEvents();let t=this.pm;if(this.bindEvent(t,"statusChange",this.onStatusChange,this),"firefox"===ej){let t=this.pm.getPlugin("draw");this.bindEvent(t,"event",this.onFirefoxTableDrawEvent,this,{checker:"Table"})}}onStatusChange(t,e){let n=t.selection.table.sel?.getResolvedTable()||null,r=n&&this.pm.getPlugin("draw").getDrawnDom(n.self);r!==this.lastTableDom&&(this.lastTableDom=r,this.pm.dispatchEvent("tableChange",n))}onFirefoxTableDrawEvent(t,e){this.ensureTableRepaintObserver().observe(this.pm.schema.nodeType("table").getTableDOM(e))}getTableCellInset(t){let e=sK.fly(t).parentNode;if(!e)return null;let n=0,r=0,i=sK.fly(e).getContentHeight()-sK.fly(t).getHeight(),a=t.style.verticalAlign;if("top"===a)r+=i;else if("bottom"===a)n+=i;else if("middle"===a){let t=i/2;n+=t,r+=t}else r+=i;return{l:0,t:n,r:0,b:r}}async pasteTableDom(t){let e=this.pm.selection.$from.findNode("ListContainer"),n=this.pm.getPlugin("input:editor")?.parseTable(t,{parserOptions:{list:{currentListMap:e&&e.getAttrValue("listMap",!0)}}});if(!n)return!1;let{node:r,custom:i}=n,a=this.pm.getPlugin("operator");return!!a&&a.getOperator("table").replaceCells(r,{list_map:i.list?.listMap})}}let xm=new yG(class extends xx{constructor(t,e){super(t,e)}getTableIndent(t){return{left:ng(t.style.marginLeft,"px")||0,right:ng(t.style.marginRight,"px")||0}}});class xv extends yB{constructor(t,e){super(t,e),this.itemMap=new Map}static get pluginName(){return"geometry"}static get pluginDependency(){return["draw"]}addItem(t,e){this.removeItem(t),this.itemMap.set(t,e)}removeItem(t){this.itemMap.delete(t)}getItem(t){return this.itemMap.get(t)}getGeometryInfo(t){return this.getItem(t)?.info}getElement(t){return this.getItem(t)?.dom}createGeometryInfo(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return null}}let xb=new yG(class extends xv{constructor(t,e){super(t,e)}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"render",this.onDrawingDrawRender,this,{checker:"Drawing",priority:100})}onDrawingDrawRender(t,e,n,r){if(!n.isTarget("major"))return t;let i=e.getAttrValue("id");if(!i)return t;let a=e.getState("geometryInfo")||this.createGeometryInfo({...e.getAttrValue("config"),schema:e.type.name});return a&&"picture"!==a.getDrawingSchema()&&this.pm.doc.resolve(r).exists("Drawing",{excludeSelf:!0})&&(a=null),a?this.addItem(i,{info:a,dom:t}):this.removeItem(i),t}createGeometryInfo(t){return t?fh.createFromShape(t):null}});class xw extends yB{constructor(t,e){super(t,e),e=this.options,this.requestImageUrl=e.requestImageUrl,this.loadingImageFill=e.loadingImageFill,this.fallbackImageFill=e.fallbackImageFill,this.preparingIconUrl=e.preparingIconUrl,this.preparingIconSize=e.preparingIconSize??{width:0,height:0},this.loadingImageUrl=void 0,this.fallbackImageUrl=void 0}static get pluginName(){return"image"}static get pluginDependency(){return["draw","image_loader"]}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t,"beforePrint",this.onBeforePrint,this)}onBeforePrint(t,e){return this.pm.getPlugin("image_loader").loadDescendant(this.pm.content).then(b)}generatePlainFillImageUrl(t){if(!t)return"";let e=document.createElement("canvas");e.width=1,e.height=1;let n=e.getContext("2d");if(!n)return"";n.fillStyle=t,n.fillRect(0,0,e.width,e.height);try{return e.toDataURL("image/png")}catch{return""}}getLoadingImageUrl(){return this.loadingImageUrl??(this.loadingImageUrl=this.generatePlainFillImageUrl(this.loadingImageFill))}getFallbackImageUrl(){return this.fallbackImageUrl??(this.fallbackImageUrl=this.generatePlainFillImageUrl(this.fallbackImageFill))}getPreparingIconUrl(){return this.preparingIconUrl}getPreparingIconSize(){return this.preparingIconSize}getImageUrl(t,e){let n=this.requestImageUrl;if(!n)return null;let r=null;try{r=n(t,e)}catch(e){ad.default.warn(`Failed to request image [${t}].`,e)}return r&&"object"==typeof r&&"then"in r?r.catch(e=>(ad.default.warn(`Failed to request image [${t}].`,e),null)):r}renderImageUrl(t,e){if(void 0===e&&(e=m),!t)return null;let n="clipboard"===e.renderTarget,r=!!n||e.sync||!1;return this.getImageUrl(t,{raw:n,absolute:n,...e,sync:r})}renderImageUrlSync(t,e){let n=this.renderImageUrl(t,{...e,sync:!0});return"string"==typeof n?n:null}renderImageUrlAsync(t,e){return Promise.resolve(this.renderImageUrl(t,e))}loadImageDom(t,e,n,r){let i=this.pm.getPlugin("image_loader");return r?.useLoadingImage&&i.setImageElementUrl(t,e,this.getLoadingImageUrl()),i.loadImageDom(t,this.renderImageUrlAsync(n,r).then(t=>(!t&&r?.useFallbackImage&&(t=this.getFallbackImageUrl()),{type:e,url:t||""})))}shouldShowPreparingIcon(t,e){let{width:n,height:r}=this.getPreparingIconSize();return t>=n&&e>=r}createPreparingIcon(t,e){let n=this.getPreparingIconUrl();if(!n)return null;let r=na([e]),{width:i,height:a}=this.getPreparingIconSize();return"image"===e?(r.setAttribute("width",String(i)),r.setAttribute("height",String(a))):(r.style.width=i+"px",r.style.height=a+"px"),this.pm.getPlugin("image_loader").setImageElementUrl(r,t,n),r}}let xM=new yG(class extends xw{constructor(t,e){super(t,e)}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"render",this.onPictureDrawRender,this,{checker:"Picture"}),this.bindEvent(t,"render",this.onFileDrawRender,this,{checker:"Image"})}onPictureDrawRender(t,e,n){let r=n.getTarget();if("clipboard"!==r)return t;let i=e.getAttrValue("id");if(!i)return t;let a=this.pm.getPlugin("geometry").getGeometryInfo(i);if(!a||"picture"!==a.getDrawingSchema())return t;let s=a.getImageFileId();if(!s)return t;let o=this.renderImageUrlSync(s,{renderTarget:r});if(!o)return t;let l=a.getRectData(),h=aW(o,l.w,l.h);return h.setAttribute("graph-config",JSON.stringify(a.extractShapeConfig())),h}onFileDrawRender(t,e,n){if(!n.isTarget("major")||"temp"!==e.getAttrValue("file_type"))return t;let r=t.firstElementChild;if(!r||"img"!==r.nodeName.toLowerCase())return t;r.src=this.getFallbackImageUrl();let i=ng(e.getAttrValue("width")??"","px"),a=ng(e.getAttrValue("height")??"","px");if(!this.shouldShowPreparingIcon(i,a))return t;let s=this.createPreparingIcon("background","span");if(!s)return t;let{left:o,top:l}=e.type.getObjectBorder(e);return Object.assign(s.style,{display:"block",position:"absolute",left:o+"px",top:l+"px",width:i+"px",height:a+"px","background-position":"50%","background-repeat":"no-repeat"}),t.appendChild(s),t}},{loadingImageFill:"#F6F8FA",fallbackImageFill:"#F6F8FA"});var x_=n(65969),xA=n.n(x_);class xS{constructor(){this.implementation=xA().init(aG(),void 0,{width:100,height:100,devicePixelRatio:window.devicePixelRatio})}resize(t){this.implementation.resize(t)}draw(t){let e=t.getEchartParameters(this.implementation.getWidth(),this.implementation.getHeight());e&&this.implementation.setOption(e,!0)}getDataURL(t){return this.implementation.getDataURL(t)}dispose(){this.implementation.dispose()}}function xC(t){return`${t.width}x${t.height}`}var xI=1/0;let xP=function(t){var e,n=(e=t)?(e=tO(e))===xI||e===-xI?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0,r=n%1;return n==n?r?n-r:n:0};var xT=tm.isFinite,xk=Math.min,xL=function(t){var e=Math[t];return function(t,n){if(t=tO(t),(n=null==n?0:xk(xP(n),292))&&xT(t)){var r=(iC(t)+"e").split("e");return+((r=(iC(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}("round");let xD=new WeakMap,xR=new class{constructor(){this.map=new WeakMap}set(t,e,n){let r=this.map.get(t);r||(r=new Map,this.map.set(t,r)),r.set(xC(e),n)}get(t,e){return this.map.get(t)?.get(xC(e))}};function xN(t){let e=xD.get(t);if(e)return e;let n=new l7(t.config,t);return xD.set(t,n),n}class xO extends yB{constructor(t,e){var n,r;super(t,e),this.chartPainter=null,this.emptyImage=null;let{emptyImageUrl:i,emptyImageSize:a}=e;i&&(n=a?.width,r=a?.height,new Promise((t,e)=>{let a=new Image(n,r);a.src=i,a.onload=()=>{t(a)},a.onerror=e})).then(t=>{this.emptyImage=t})}static get pluginName(){return"chart"}static get pluginDependency(){return["draw"]}destroy(){if(this.chartPainter){try{this.chartPainter.dispose()}catch(t){ad.default.warn("Failed to dispose chart painter.",t)}this.chartPainter=null}super.destroy()}ensureChartPainter(){return this.chartPainter??=new xS}getChartInfo(t){return xN(t)}getEmptyUrl(t,e){let n=aG();n.width=t,n.height=e;let r=this.emptyImage;if(r){let i=n.getContext("2d");if(i){let n=Math.min(t,r.width),a=Math.min(e,r.height);i.drawImage(r,(t-n)/2,(e-a)/2,n,a)}}let i=function(t,e){void 0===e&&(e=Object.create(null));var n=e;void 0===n&&(n=Object.create(null));let{background:r}=n;if(r){let e=t.getContext("2d");e&&(e.globalCompositeOperation="destination-over",e.fillStyle="string"==typeof r?r:"#FFF",e.fillRect(0,0,t.width,t.height))}try{return t.toDataURL("image/png")}catch{return"data:,"}}(n,{background:!0});return n.remove(),i}doGetChartUrl(t,e){let n,r=xN(t);if(!r.isDrawable())return;let i=this.ensureChartPainter();try{i.resize(e),i.draw(r),n=i.getDataURL({pixelRatio:2*window.devicePixelRatio})}catch(t){ad.default.error(t)}return n}getChartUrl(t,e){var n;e={width:xL((n=e).width,6),height:xL(n.height,6)};let r=xR.get(t,e);if(void 0!==r)return r||void 0;let i=this.doGetChartUrl(t,e);return xR.set(t,e,i??""),i}renderChartUrl(t,e,n){if("clipboard"===n)return this.getChartUrl(t,e);{let n=this.getChartUrl(t,e);return n?(this.pm.getPlugin("color")?.collectColors(xN(t).getAllColors()),n):this.getEmptyUrl(e.width,e.height)}}}let xj=new yG(class extends xO{constructor(t,e){super(t,e)}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"render",this.onChartDrawRender,this,{checker:"Chart"})}onChartDrawRender(t,e,n){let r=n.getTarget(),i=parseFloat(e.getAttrValue("width")),a=parseFloat(e.getAttrValue("height")),s=this.renderChartUrl(e.attrs,{width:i,height:a},r);if(s){let e=aW(s,i,a);e.style.display="block",e.style.position="absolute",t.appendChild(e)}return t}});class xE extends yB{constructor(t,e){super(t,e),this.shapeRenderers=this.createShapeRenderers()}static get pluginName(){return"shape"}static get pluginDependency(){return["draw","geometry","image"]}createShapeRenderers(){return F(this.getShapeRendererConstructors(),t=>new t(this.pm))}getShapeRenderer(t){return this.shapeRenderers[t]||null}}class xV{constructor(t){this.pm=t}drawShape(t,e,n){}drawStroke(t,e,n){}}class xB extends xV{createGraphPath(){return na(["path"])}drawShape(t,e,n){this.drawGraphPaths(t,e,n)}drawGraphPaths(t,e,n){let r=t.firstElementChild;for(let i of e.drawPathAttrs({type:n.pathType}))r||(r=t.appendChild(this.createGraphPath())),ne(r,i),r=r.nextElementSibling}}class xz extends xB{}class xF extends xV{createImagePath(){return na(["path"])}createImageClipPath(){return na(["clipPath",null,this.createImagePath()])}createImage(){return na(["image",{preserveAspectRatio:"none"}])}createImageGroup(){return na(["g",null,this.createImage()])}drawShape(t,e,n){t.firstChild||(t.appendChild(this.createImageClipPath()),t.appendChild(this.createImageGroup()),this.drawImageClipId(t,e,n));let r=t.firstElementChild,i=r.nextElementSibling;this.drawImagePaths(r,e,n),this.drawImageGroup(i,e,n)}drawImageClipId(t,e,n){let r=`crop_${J()}`,i=t.firstElementChild,a=i.nextElementSibling;ne(i,{id:r}),ne(a,{"clip-path":`url(#${r})`})}drawImagePaths(t,e,n){let r=t.firstElementChild;for(let i of e.drawPathAttrs({type:n.pathType,stroke:!1,fill:!1}))r||(r=t.appendChild(this.createImagePath())),ne(r,i),r=r.nextElementSibling}drawImageGroup(t,e,n){this.drawImage(t.firstElementChild||t.appendChild(this.createImage()),e,n)}drawImage(t,e,n){let r=this.getImageRect(e);ne(t,{width:r.w,height:r.h,transform:nC.createTranslate(r.l,r.t).toString()}),this.pm.getPlugin("image").loadImageDom(t,"foreground",this.getImageFileId(e),{sync:this.pm.isWritable(),useLoadingImage:!0,useFallbackImage:!0})}createStrokeMaskRect(){return na(["rect",{fill:"#FFFFFF","fill-opacity":1}])}createStrokeMaskPath(){return na(["path"])}createStrokeMask(){return na(["mask",null])}createStrokeBodyPath(){return na(["path"])}createStrokeBodyGroup(){return na(["g"])}drawStroke(t,e,n){t.firstChild||(t.appendChild(this.createStrokeMask()),t.appendChild(this.createStrokeBodyGroup()),this.drawStrokeMaskId(t,e,n));let r=t.firstElementChild,i=r.nextElementSibling;this.drawStrokeMask(r,e,n),this.drawStrokeBodyGroup(i,e,n)}drawStrokeMaskId(t,e,n){let r=`mask_${J()}`,i=t.firstElementChild,a=i.nextElementSibling;ne(i,{id:r}),ne(a,{mask:`url(#${r})`})}drawStrokeMask(t,e,n){this.drawStrokeMaskPaths(t,e,n),this.drawStrokeMaskRect(t,e,n)}drawStrokeMaskPaths(t,e,n){let r=t.firstElementChild;for(let i of e.drawPathAttrs({type:n.pathType,stroke:!1,fill:{fill:"#000000","fill-opacity":1}}))r||(r=t.appendChild(this.createStrokeMaskPath())),ne(r,i),r=r.nextElementSibling}drawStrokeMaskRect(t,e,n){let r=e.getDisplayRect(),i=2*Math.ceil(e.getStrokeWidth()),a=Math.floor(r.l)-i,s=Math.floor(r.t)-i,o={x:a,y:s,width:Math.ceil(r.r)+i-a,height:Math.ceil(r.b)+i-s};ne(t,o),ne(t.insertBefore(this.createStrokeMaskRect(),t.firstChild),o)}drawStrokeBodyGroup(t,e,n){this.drawStrokeBodyPaths(t,e,n)}drawStrokeBodyPaths(t,e,n){let r=t.firstElementChild;for(let i of e.drawPathAttrs({type:n.pathType,stroke:{"stroke-width":2*e.getStrokeWidth()},fill:{fill:"transparent","fill-opacity":1}}))r||(r=t.appendChild(this.createStrokeBodyPath())),ne(r,i),r=r.nextElementSibling}}class xG extends xB{}class xH extends xz{}class xW extends xF{getImageRect(t){return t.getImageRect()}getImageFileId(t){return t.getImageFileId()}}let xq=new yG(class extends xE{constructor(t,e){super(t,e),this.drawingClassName=`${this.pm.schema.nodeType("doc").classPrefix}drawing`}getShapeRendererConstructors(){return{shape:xG,connector:xH,picture:xW}}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"afterChildRender",this.onDrawingDrawAfterChildRender,this,{checker:"Drawing"})}onDrawingDrawAfterChildRender(t,e,n){if(!n.isTarget("display"))return;let r=t.getAttrValue("id"),i=r?this.pm.getPlugin("geometry").getGeometryInfo(r):void 0,a=this.pm.getPlugin("draw").getPmElement(e).childContainer?.parentElement??e4(e)??e;if(i){this.drawWrapper(a,i);let t=this.getShapeRenderer(i.getDrawingSchema());if(t){let e={pathType:"all",target:n.getTarget()},r=this.findGraphicLocation(a).childNodes;t.drawShape(r[0],i,e),t.drawStroke(r[1],i,e)}}else this.hideWrapper(a)}findGraphicLocation(t){return t.firstElementChild.firstElementChild}createGraphicFrame(){return na(["svg",{classList:`${this.drawingClassName}-graphic`,fill:"none",stroke:"none","fill-rule":"evenodd",overflow:"visible"}])}createLocationGroup(){return na(["g"])}createShapeGroup(){return na(["g"])}createStrokeGroup(){return na(["g"])}drawWrapper(t,e){let n=e.getPaddingRect();ne(t,{inline_style:{width:n.w+"px",height:n.h+"px","z-index":e.isInline()?void 0:e.getZOrder()}}),"shape"===e.getDrawingSchema()&&this.drawTextFrame(t.firstElementChild,e);let r=this.createGraphicFrame();t.prepend(r),this.drawGraphicFrame(r,e)}drawGraphicFrame(t,e){let{l:n,t:r,w:i,h:a}=e.getPaddingRect();ne(t,{width:i,height:a,viewBox:`${n} ${r} ${i} ${a}`}),this.drawGraphicLocation(t.appendChild(this.createLocationGroup()),e)}drawGraphicLocation(t,e){ne(t,{transform:e.renderTransform()}),this.drawGraphicShape(t.appendChild(this.createShapeGroup()),e),this.drawGraphicStroke(t.appendChild(this.createStrokeGroup()),e)}drawGraphicShape(t,e){ne(t,{"pointer-events":"visiblePainted"})}drawGraphicStroke(t,e){ne(t,{"pointer-events":"visiblePainted"})}drawTextFrame(t,e){let{l:n,t:r}=e.getViewPadding(),{w:i,h:a}=e.getViewRect();ne(t,{classList:[`${this.drawingClassName}-text`],inline_style:{left:n+"px",top:r+"px",width:i+"px",height:a+"px"}}),this.drawTextLocation(t.firstElementChild,e)}drawTextLocation(t,e){let{l:n,t:r}=e.getViewRect();ne(t,{inline_style:{left:-n+"px",top:-r+"px",transform:e.renderTransform({flipMode:"vertical"}),"transform-origin":"0 0"}})}hideWrapper(t){Array.prototype.forEach.call(t.children,t=>{t.style.display="none"})}});class xU extends yB{constructor(t,e){super(t,e),this.currentTextBoxDom=null,this.currentTextBoxPointer=!0}static get pluginName(){return"text_box"}static get pluginDependency(){return["draw"]}onCurrentTextBoxChange(t){let e=t&&this.pm.getPlugin("draw").getDrawnDom(t);e!==this.currentTextBoxDom&&(this.currentTextBoxDom&&this.updateTextBoxPointerEvents(this.currentTextBoxDom,this.currentTextBoxPointer),this.currentTextBoxDom=e,this.currentTextBoxPointer=!t||!e||this.computeTextBoxPointerEvents(t),e&&this.updateTextBoxPointerEvents(e,!0))}onTextBoxDrawChange(t){let e=this.pm.getPlugin("draw").getDrawnDom(t);if(!e)return;let n=this.computeTextBoxPointerEvents(t);e===this.currentTextBoxDom?this.currentTextBoxPointer=n:this.updateTextBoxPointerEvents(e,n)}computeTextBoxPointerEvents(t){if(t.nodeSize>4)return!0;let e=t.firstChild;return!!(e&&e.is("ListBlock")&&e.type.isValidListBlock(e))}updateTextBoxPointerEvents(t,e){let n=this.findTextBoxPointerTarget(t);n&&(n.style.pointerEvents=e?"auto":"none")}}let xZ=new WeakMap,x$=new yG(class extends xU{constructor(t,e){super(t,e);let n=t.schema.nodeType("shape").matchDOMTag;this.shapeSelector=n?Object.keys(n).join(","):void 0}static get pluginDependency(){return super.pluginDependency.concat(["shape"])}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t,"statusChange",this.onStatusChange,this);let e=t.getPlugin("draw");this.bindEvent(e,"change",this.onTextBoxDrawChange,this,{checker:"TextBox"}),t.getPlugin("input:editor")&&t.getPlugin("operator")&&this.bindEvent(t,"doubleClick",this.onDrawingDoubleClick,this);let n=t.getPlugin("input_data_transfer");n&&this.bindEvent(n,"dom",this.onInputDataTransferDom,this)}onStatusChange(t){let e=t.selection.basic.sel.getResolvedEditor();e&&this.onCurrentTextBoxChange(e.self.is("TextBox")?e.self:null)}onTextBoxDrawChange(t){super.onTextBoxDrawChange(t),this.onTextBoxAnchor(t)}onTextBoxAnchor(t){let e=this.pm.getPlugin("draw").getDrawnDom(t);if(!e)return;let n=0,r=t.getAttrValue("anchor");if("ctr"===r||"b"===r){let i=Math.max(t.getState("textRect")?.h||0,0),a=sK.fly(e).getContentHeight();n="ctr"===r?(i-a)/2:i-a}else n=0;let i=this.pm.schema.nodeType("text_box").queryDom(e,".syno-o-doc-pm-text-box-content",!0);i.style.left="0",i.style.top=n+"px"}onTransformCoordinateSystem(t,e){if(!e.self.is("TextBox"))return;let n=e.parent;if(!n.is("Drawing"))return;let r=n.getAttrValue("id");if(!r)return;let i=this.pm.getPlugin("geometry").getGeometryInfo(r);if(!i)return;let a=n.queryChildNode("TextBox",!0).getState("textRect",m);return this.getTextBoxInverseMatrix(i,a).apply(t)}onDrawingDoubleClick(){let t=this.pm.getPlugin("operator");if(!t)return;let e=this.pm.selection;e.is("Node")&&e.node.is("Drawing")&&t.getOperator("drawing").selectBeforeText()}onInputDataTransferDom(t,e){let n=this.pm.multiSelection.getResolvedEditor();if(!n||!n.self.is("TextBox"))return t;let r=this.shapeSelector;return r&&t.querySelectorAll(r).forEach(t=>{t.remove()}),t}getTextBoxInset(t){let e=this.pm.schema.nodeType("text_box"),n=ng(t.style.width,"px")||0,r=ng(t.style.height,"px")||0,i=e.queryDom(t,".syno-o-doc-pm-text-box-area",!0),a=e.queryDom(t,".syno-o-doc-pm-text-box-content",!0),s=ng(i.style.left,"px")||0,o=(ng(i.style.top,"px")||0)+(ng(a.style.top,"px")||0);return{l:s,t:o,r:n-s-(ng(i.style.width,"px")||0),b:r-o-(ng(a.style.height,"px")||0)}}getTextBoxSize(t){let e=this.pm.schema.nodeType("text_box"),n=e.queryDom(t,".syno-o-doc-pm-text-box-area",!0),r=e.queryDom(t,".syno-o-doc-pm-text-box-content",!0);return{width:ng(n.style.width,"px")||0,height:ng(r.style.height,"px")||0}}computeTextBoxInverseMatrix(t,e){let{x:n,y:r}=t.getRectCenter();return t.computeViewMatrix({flipMode:"vertical",originateCenter:!0}).translate(-n+(e.l||0),-r+(e.t||0)).inverse()}getTextBoxInverseMatrix(t,e){let n=xZ.get(t);if(n&&te(n.textRect,e,tn,void 0))return n.matrix;let r=this.computeTextBoxInverseMatrix(t,e);return xZ.set(t,{textRect:e,matrix:r}),r}findTextBoxPointerTarget(t){return t.firstElementChild}});var xJ=n(39074);class xY extends yB{constructor(t,e){super(t,e),this.scheduler=this.createScheduler(),this.queue=new xJ.HibernationTaskQueue({mode:"manual-sync"}),this.hibernationDomMap=new Map,this.lineTaskConcurrency=Math.max(e.lineTaskConcurrency||5,1),this.computeInlineOverlays=this.computeInlineOverlays.bind(this)}static get pluginName(){return"line"}static get pluginDependency(){return["draw","dompos"]}static get pluginSubscriptions(){return{lineDomUpdate:new nP}}createScheduler(){return this.pm.createFlushScheduler({actions:{handleLineDisplay:{handler:this.handleLineDisplay.bind(this),merger:this.mergeChangedLines.bind(this)},handleLineUpdate:{handler:this.handleLineUpdate.bind(this),merger:this.mergeChangedLines.bind(this)}}})}handleLineDisplay(t){let{displayedLines:e,pendingSet:n}=this.findDisplayedLineInfo(t);if(e.length>0){for(let{controller:t}of e)t.wake();this.queue.consume()}n.size>0&&Promise.resolve().then(()=>{this.scheduleHandleLineDisplay(n)})}mergeChangedLines(t,e){if(!0===t||!0===e)return!0;{let n;return!e&&t&&t instanceof Set?t:(n=e?e instanceof Set?e:new Set([e]):new Set,t instanceof Set?t.forEach(n.add,n):n.add(t),n)}}ensureLineSet(t){return!0===t?new Set(this.hibernationDomMap.keys()):t instanceof Set?t:new Set([t])}findDisplayedLineInfo(t){let e=this.ensureLineSet(t),n=[],r=this.hibernationDomMap;for(let t of e){e.delete(t);let i=r.get(t);if(i)if(t.isConnected){if(aV(t)&&(r.delete(t),n.push({dom:t,controller:i}),n.length===this.lineTaskConcurrency))break}else r.delete(t)}return{displayedLines:n,pendingSet:e}}handleLineUpdate(t){this.pm.dispatchEvent("lineDomUpdate",Array.from(this.ensureLineSet(t).values()))}ensureHibernationController(t){let e=this.hibernationDomMap,n=e.get(t);return n||((n=new xJ.HibernationController).signal.addEventListener("abort",()=>{e.delete(t)}),e.set(t,n)),n}scheduleHandleLineDisplay(t){this.scheduler.schedule("handleLineDisplay",t)}scheduleHandleLineUpdate(t){this.scheduler.schedule("handleLineUpdate",t)}async requestDrawingInlineOverlays(t,e,n,r){r={startBias:1,endBias:-1,...r};let i=this.pm.getPlugin("draw").getDrawnDom(t);if(!i)return[];let a=this.pm.getPlugin("dompos").findInlineRanges(i,e,n,r);return a?Promise.all(a.map(t=>this.requestDrawingInlineOverlaysByRange(t,r))).then(t=>t.reduce((t,e)=>(e&&t.push(...e),t),[])):[]}requestDrawingInlineOverlaysByRange(t,e){void 0===e&&(e=m);let{lineDom:n,startOffset:r,endOffset:i}=t,a=sK.fly(n).getVersion(),s=new xJ.HibernationController,o=this.ensureHibernationController(n);o.signal.addEventListener("abort",s.abort.bind(s)),o.signal.addEventListener("wake",s.wake.bind(s)),o.signal.addEventListener("sleep",s.sleep.bind(s)),e.signal&&e.signal.addEventListener("abort",s.abort.bind(s));let l=e.onProgress,h=this.queue.enqueue(this.computeInlineOverlays,{arg:{lineDom:n,lineDomVersion:a,startOffset:r,endOffset:i,options:e},priority:e.priority,signal:s.signal}).then(t=>(l&&t.length&&(l(t)??!0)&&this.scheduleHandleLineUpdate(n),t)).catch(w);return this.scheduleHandleLineDisplay(n),h}async computeInlineOverlays(t){let{lineDom:e,lineDomVersion:n,startOffset:r,endOffset:i,options:a}=t;if(n!==sK.fly(e).getVersion())throw Error("Line dom is out-of-date.");let s=this.pm.getPlugin("dompos").computeInlineOverlays(e,r,i,a);if(!s)throw Error("No available inline overlays.");return s}appendLineDecoration(t,e){t.appendChild(e)}}let xX=new yG(class extends xY{constructor(t,e){super(t,e)}bindEvents(){super.bindEvents();let t=this.pm;t.getPlugin("page_display")&&this.bindEvent(t,"pageViewChange",this.onPageViewChange,this)}onPageViewChange(t,e){e&&e.start.index<=t.start.index&&e.end.index>=t.end.index||this.scheduleHandleLineDisplay(!0)}});function xQ(t){return 32===t||9===t||10===t}function xK(t){return 12288===t}function x0(t){return xQ(t)||xK(t)}let x1=(()=>{function t(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];let[r,i,a,s,o,l,h,u]=e;return r|i<<1|a<<2|s<<3|o<<4|l<<5|h<<6|u<<7}let e=[0,0,0,0,0,0,0,0,0,0,0,0];return[[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,1,1,0,1,1,1,1),t(0,1,1,0,1,0,0,0),0,t(0,0,0,1,1,1,0,1),255,255,255,t(1,1,1,1,0,1,1,1),255,255,255,t(1,1,1,1,0,1,1,1)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,1,1,1,1,0,1),t(0,1,1,0,1,0,0,1),255,t(1,0,0,1,1,1,0,1),255,255,255,t(1,1,1,1,0,1,1,1),255,255,255,t(1,1,1,1,0,1,1,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,1),t(0,0,0,0,0,0,0,0),0,t(0,0,0,1,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0),0,0,0,t(0,0,1,0,0,0,0,0)],[t(0,0,0,0,0,0,0,0),t(0,0,0,0,0,0,0,0),0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0),0,0,0,t(0,0,0,0,0,0,0,0)]]})();function x2(t){return t>=48&&t<=57}function x5(t){return"string"!=typeof t?{textWrapping:t?.textWrapping??"wrap",endOfLineSpace:t?.endOfLineSpace??"wrap",endOfLineOtherSpace:t?.endOfLineOtherSpace??"wrap"}:"pre-wrap"===t?{textWrapping:"wrap",endOfLineSpace:"hang",endOfLineOtherSpace:"hang"}:{textWrapping:"wrap",endOfLineSpace:"wrap",endOfLineOtherSpace:"wrap"}}let x4={preceding:!1,subsequent:!1};function x8(t){return x4.preceding=t?.preceding??!1,x4.subsequent=t?.subsequent??!1,x4}let x3={text:"",hasPrecedingJoiner:!1,hasSubsequentJoiner:!1,prefixedJoiner:"",suffixedJoiner:""},x6=[0,0];function x7(t){if(t)return"verticalAlign"in t||"verticalAlignReferenceStyle"in t||"additionalLineStyles"in t?{...t,verticalAlign:void 0,verticalAlignReferenceStyle:void 0,additionalLineStyles:void 0}:t}function x9(t){t.font=sT(t)}function mt(t){if(x9(t),t.verticalAlignReferenceStyle&&x9(t.verticalAlignReferenceStyle),t.additionalLineStyles){let e=t.additionalLineStyles;Array.isArray(e)?e.forEach(x9):x9(e)}return t}function me(t,e){if(t){let n={...e,...t};if(t.verticalAlignReferenceStyle&&(n.verticalAlignReferenceStyle={...e,...t.verticalAlignReferenceStyle}),t.additionalLineStyles){let r=t.additionalLineStyles;Array.isArray(r)?n.additionalLineStyles=r.map(t=>({...e,...t})):n.additionalLineStyles={...e,...r}}return mt(n)}if(e)return mt({...e})}function mn(t,e){return{width:t.width,height:t.height,textBoxAscent:t.fontBoundingBoxAscent,textBoxDescent:t.fontBoundingBoxDescent,lineBoxAscent:e.lineBoundingBoxAscent,lineBoxDescent:e.lineBoundingBoxDescent}}function mr(t){let e=t?.textBoxAscent??0,n=t?.textBoxDescent??0,r=t?.lineBoxAscent??0,i=t?.lineBoxDescent??0;return{width:t?.width??0,height:e+n,textBoxAscent:e,textBoxDescent:n,lineBoxAscent:r,lineBoxDescent:i}}function mi(t,e){let n=Math.max(t.textBoxAscent,e.textBoxAscent),r=Math.max(t.textBoxDescent,e.textBoxDescent),i=Math.max(t.lineBoxAscent,e.lineBoxAscent),a=Math.max(t.lineBoxDescent,e.lineBoxDescent);return{width:t.width+e.width,height:n+r,textBoxAscent:n,textBoxDescent:r,lineBoxAscent:i,lineBoxDescent:a}}function ma(t,e){return{text:sR(t,e),line:sV(e)}}function ms(t,e){return e?t=function(t,e){let n=e.additionalLineStyles;if(!n)return t;for(let e of(t={...t},Array.isArray(n)?n:[n])){let{lineBoundingBoxAscent:n,lineBoundingBoxDescent:r}=sV(e);t.lineBoxAscent=Math.max(t.lineBoxAscent,n),t.lineBoxDescent=Math.max(t.lineBoxDescent,r)}return t}(t=function(t,e){let n=e.verticalAlign;if("super"!==n&&"sub"!==n)return t;let r=sV(e.verticalAlignReferenceStyle??e),i="super"===n?r.superBaselineAscent:r.subBaselineAscent;return{width:t.width,height:t.height,textBoxAscent:t.textBoxAscent+i,textBoxDescent:t.textBoxDescent-i,lineBoxAscent:Math.max(t.lineBoxAscent+i,r.lineBoundingBoxAscent),lineBoxDescent:Math.max(t.lineBoxDescent-i,r.lineBoundingBoxDescent)}}(t,e),e):t}function mo(t){if("number"==typeof t)return{total:t,width:t,margin:[0,0],filled:void 0};{let{width:e,margin:n=[0,0],filled:r}=t;return{total:e-n[0]-n[1],width:e,margin:n,filled:r&&mr(r)}}}function ml(t,e){return me(t.style,e?.defaultStyle)}function mh(t){let e="border"in t?t.border:void 0;return{left:e?.left??0,top:e?.top??0,right:e?.right??0,bottom:e?.bottom??0}}function mu(t,e,n){let{text:r,line:i}=ma(t,e),a=mh(n),s=r.fontBoundingBoxAscent+a.top,o=r.fontBoundingBoxDescent+a.bottom,l=i.lineBoundingBoxAscent+a.top,h=i.lineBoundingBoxDescent+a.bottom;return ms({width:r.width+a.left+a.right,height:s+o,textBoxAscent:s,textBoxDescent:o,lineBoxAscent:l,lineBoxDescent:h},e)}var mc=n(9981),md=n(6799),mp={};let mg=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,1,1,1,0,0,4,2,4,1,1,1,1,1,0,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,4,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,1,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0]],mf=new mc(md.toByteArray("AAgOAAAAAAAQ4QAAAQ0P8vDtnQuMXUUZx+eyu7d7797d9m5bHoWltKVUlsjLWE0VJNigQoMVqkStEoNQQUl5GIo1KKmogEgqkKbBRki72lYabZMGKoGAjQRtJJDaCCIRiiigREBQS3z+xzOTnZ3O+3HOhd5NfpkzZx7fN9988zivu2M9hGwB28F94DnwEngd/Asc1EtIs9c/bIPDwCxwLDgezHcodyo4w5C+CCwBS8FnwSXgCnA1uFbI93XwbXAbWAfWgx+CzWAb+An4KfgFeAzsYWWfYuFz4CXwGvgb+Dfo6yNkEEwGh4CZYB44FpwI3g1OY+kfBItZOo2fB84Hy8DF4HJwNbiWpV8PVoO1LH4n2NRXyN+KcAd4kNVP9XsY4aPgcfAbsBfs6SniL4K/sPjfEf6HlanXCRkCw2BGvUh/keWfXS/CY+pFXs7x9XHmM94LTmWIeU2cgbxnS/k/B3kf86jDhU8L9V2E40vAFWAlWFUfb++NOL4F3C7JX4/4GiE+hvgWsF0oS7mXldspnN+F493gyXrh9xTav0cg3EvzgVfBG6wsmVSEkxBOBgdPGpd7JI6PnqRvJ68/xlbHof53gPeA94OzwLngk+ACsAwsByvASrAK3MB0Ws3CtQjvBJvAVrADPMDSHkb4CNijaccTwvnf4fiPEs8Lxy+D18A/QU8/xjgYBjPAbDAKTgYLwOngTHAO+EQ/8wuEF4EvsPiVCFf2+9tsFStzA8LVHuXXBsi6QyqzUYiPMR/7Mc7dAx7oL8bzw/3u/Bw8Bp4Az4AXwCtgHzsmDXP5fiF9iiVvly5d0sHngar16NKlS5cuXbp06fLmYlqHXrcd3ph4P0THUY3iXh49novju4S0tzfs5d+JPKewfAsRntZb3K9ZhOMlrO6lCC8An28U9+OuovcPcPxlVu5rCL/VmHh/iHIrzn3fIPu7SN8Axmg+8AOwEWwCm7tp3bRuWjetm5Y8bSu4B9zbKO6ZVsnORrVU3f4uXTqZ2H3sLoyx3eDXjfDndE9qyj6L838CfwVvgFpzYnof4oNgOhgBc8Fos9DrZIQLmtXPP1MmF6wGj4H+KXoWguvADkXaPil+YpuQy8Am8Ey7ODdtmJDF4HowBp4De6HDTNjhfHAHeBr0DBBy0kDxfPbcgSIusgrcWhtnJ8vL+TPix7UIOQtcBq4C28Cr4KRBnANbwSuDE+s50JgyNNFuXbp06XIgsXjIvPafjvXozKY+fVFz/z0LT1uCtKVSWbrOLWPnztG8e0Xfy7ol8XtZJi7WtG+5od2UFXQ/A12vUeS7jp27yVKHjdsU9lXB869TyNvAzt0lpP2oWbwLdjiO78bx/Sz+EMJHwK9Y/LcIfw+eZ3F67/Hl5vh9xX80J+rwX8SvRDhpgL17iPAQMHNArfPrqHPewLheI+AERV6efwV418B4nOZ/H+IfYHV8GOF5LJ3eAz0fx8sM9S0fUNud39O9CulfGZhY5huI3wzWgNvBelbHZoTbNPVpfYjKQpkHwUNgl0LWblbnk0LbbDxr0OMFpL3iqWdu9nWYPlVAWkXY39LnGdCkDbeqv1YNbfcMQ3t9oe8lzm6NH9N1ZB6Ln4BwfkJZJk7RyFnYKt6b/JDQXx9p5X+eFdqOjzM9P9MB/lUlFzr20aXIdzlY4dmn9F3YqtvoO76/2hp/D/xA5Zue88nNyL8GbFbs075X0tyUig3Qd2MCnf//HjnzpbsR3g9+1kHzzVjdnE71/qVBX9rGPUh/ysNWe1neFzvIDi5zAufV1sT0N0poR22wkFUfTOPfA4N2mbZ5fSrqOHSw+IbkSBbOGSzSRgf91/GTUWYBOB2cIZQ/G8cfBZ8CFwrnL8XxF8FKcA24jqXdiPA7Qr61OF7H4mMItwzuv2/YLth1ISt3Hzu3k4W7EH5JqPdRHD/O4k+z8A8IX5Lq3y7Z4nXE9xn6kX6vQ4bKfy+ok+hH+xf3hq9dnTTHhjKd2GmDuWA242iHMq4cC7A8kJ7i8o1+skSa7Jieo38HCWnoNjKFhdSFBxzpZ7QE6lI8N4S14aASZcryaV/WWHw66f6NHuCoxuQxmvM56GX9QMd8Q4D65ywGP+ZzRJuM+zQvx/MOS2VFeqQ4IXnH26zM9Xe6/E6D+4foAzzuajPZp8Qyw5ayZVDWuH0z0BtYRkeIDqH9KO9VbH1btd/lhNqCzvl8zeLnG0S/hnU6baHfpiuO6yy0rd+DHURo/zYF5H26j03rQsip2ndzz82u1z9N4VjWKWeb68Tedpt95HRVXp7H1R6p+/Wt4FPy/PpWwscOLRJ+PVWF/+W0iVyGzs18TIvXkOJ1Wxm66vSXz+vylenrZcj1ub439W+K8RNCGTJi2p/TJ1K23VaXr35tRpnzmjxequgfcfyk6B/TGBVlyedsNgpdd/h+W1U3P99QyFPNo1X3TwpM/WLTIWYfoBqXrv6iskHZ/RFr79R6hIyHBrH3f1nrUVnjP8SnZZ+rYtzr9Exld5MNbPNErusAPg+77u/eDOPftU9yj39TH7rezxd1LvsZQJlzkWlOirG/79zjMj/mtHUKu7vKy+3/LnXr9okyKedjX5/0He9iP/j63LwOQdarEVlfy8OO/Lqw023j6xcqmwxLiOd6heM2i9cV9LJy8jMJ23yQ+rpbfu7EQ/pXE8KYvUSqvVnb4XzZa6LrHMXHR+zcLvqWbm/Bn0/HzIs6fWPHoat8XfnDKmZGxRxeMbn2UqZ5Q94nmcZRbqqUXbZ8+lcjE+cPX11t814orvvAXNcG8vqj2vvk1MGn3anlj0bIT72v47bvE+Lc98T9b6r7AKn6j+8Duf7D0nnZx/j7Zjn0j9nbpSTndaLr9WNLivP+iN23xF7L+fqv6ZouFyb78jxVXvv5jJ9YUs9/sddO8h7KNg5jrhfaJGztT6G7KF+1d6yCmD5Kdb2fan60rSc552fZr3zeQ9DpnPp+Si5cx5Ktv2QfSzF/mMbWdOm46rFI4XstnU9xeqX4NKb7TKEdcr6pZOK3ID1k/LvFHkVczEuZLEDr499YqvqBym1aEHWgcvoYOtv0M91qQl5TfpO/in6rWx8OVpT1Wedkv3f5xom3T/xeR/6Gx6V86PWAOB4bBpqWdN+yTcVxjIyGRz/FrDGu6w/3d7kPm8StX8RyPu+uuvpNju/vTLJV37GpvoM0oZPnW87VLnL/5pDno1NoW1R6yedU6TyUv3u19a3KFnIbTLYz+ZCLP4T0tU1uivFgso0pnsJ/UtXvarNY28Xq5cvkBDrQP/E5ZaiuQwwfmTlsOiQRU1fMuqrDd/3ISSuwjOwXOfTyGUMpZIXq4GpLn3pUcdfzch2x7XO1u2uZHOPb1G6b3Xg9PH1IIWeEpJlPQtqos2EKW8b0u8rnuP1UeVLoXJb9be0uG9nnbchjU+XTszT5VeNBThPHnc5OKj1U9aj0GTHIVaGy1YhEWT4ixns00DT+XEzWn/7VAsIc63Cov3OdyhwjrnaqQqZvWKXdypRdlq+k8msZ031U+Rm4fA+3TtyeR9hwfW9G9yxDN0fZMN33F+9TE6md4hwoxumfaUzI9fN3PFT3xVV2msrQ3UsnChm6Nulk8TndpS28D3zX9tTIPsF/z7Am5OkTjm1tI1JZW74+4VgsZ0N3L1yXV3WeP5uR7TGHHdvC3JQlxybfpd22tDlk/2eofRK8TzrN/qnar/K/OUTth6I/+jAnEptNbPvFHP2gs40N3+dfMWtwqvVct7/wfd8gtQ7imifial9ZJ9/3IHLYU6eDj3+4PhsNhX+vwvcWLnu6kGfEMe8DuciPfUfGZB8X/7HJy/Gefe5n+VRGFd/wyP2ta7/LO4yh/sbLV/k9lev6kfO9Dt/5U67b1/6u/epqB1U9Me23jfHY9sscAg4tkbLl+e4/U36rJ9ddxfd6sg5vq5ice42Wpk/pb9FOJ36/W9tpv4kbC79nUbZceX8Zu6/qJ+P3WvhvA8v3reh7Jbn2d6rrNC7XNZTLma4Ba0JI9efX2uLzF5scG/w9UNU1ZxW+ymUfzELeTllXlQ1rUuhzjS5fp9c964iFBOqeSz63bU065nZKdU+mDEz3qHIjjifquw0pnb/raRtvrnsYcb46ihT3taoYz6brdNW9l6rWRnE/navdPn1XlR1km7hcz1WlH/elKuSOSvLLuE8U6m8uzwRdfcGl73VyTHuyMvzJ1Sa2cWDTP/Z63Kc94n2B1PYr24dz1JlyHLlcP+S4B6vD1c9EW4q2LWstCvUjeVy63k/LMYdUNd5D1xQfvVTzX1VjkMsUv88N8VH5fReVn/Fjn++/h6X6Q8a6b1/q3g/i/ewi0/Scs8zxXeV6mWIOUPlPzBgdFerW+bZrm2P18dnjuK6HunEp+rHvPMXbr+sHVb/lnL+pTP57jPw9Cvk3PW178JD9qChfzuvTf7Htl38L1QUf/VKu9SFjwWbTWPvFEvu7Uq76y7+31g6QlYPc669pbsm9Xur2LWI9Pu8ypfDXqm3A2z8s1FWGn4ntL9NfQu2oSlftX9uetvTtv7J8Ql4zxfXGZ3zk8PeQ9w59x2uMfqI8/q5eKh/l9cb2rwsu9rSNl06ZP2Pmxtz+rNMx93yno0n2/82rVH7rQ+y9P15H6FyRun9ViH81ATmffI7nJ5r8uXXW6enbP6b/B8/l5OifVHYLnb9S39s2zcc+Ph+rh8+eQgVPS72elzGWY/tUtbbabBpDiI7yN1q6/4th2y+ErAc5+9BVvu/7KamJbWNZeuqI/R4tRf+YyD1HmOZM1bMV3/14Sn10c0Xu+Sj1nOXb5jL73ncdy02uvlXZNde65dOHYl7Vs4KYuS6FzWLn2zJlpZqPXPVPOa5yzKOyn1VhT9lmMfdbfH7D11Wf2PXN5h9y+dD287+qxgSnaYmnIrRtIb8pJe6/Uv9OVer6Whn0zfGO/BEloZI9ojmfAlUflClDd178bTmVHVTpZXOkAlk/lb42UujmI89HH5V+cl7XtowY6vTxLVWok6UrGzoGTHN+bB+6ri05687VNpvfuvRfaP2uMlNQth1D5JjGelm/8yn+9p3p/7qk9gnfeddXZmq/Sm333PJT659Kv1zjNbZ9uv2Oi//67CV8/N1nj1DmviyXDNVeJkaeaX8UsyesYg8cu2+NvdaPfb+lLDu5tvt/")),my=function(t){switch(t){case 33:case 39:case 40:case 42:return 12;case 35:return 5;default:return t}},mx=function(t){switch(t){case 37:case 38:return 34;case 41:return 22;default:return t}};class mm{constructor(t,e=!1){this.position=t,this.required=e}}mp=class{nextCodePoint(){let t=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos);return 55296<=t&&t<=56319&&56320<=e&&e<=57343?(this.pos++,(t-55296)*1024+(e-56320)+65536):t}nextCharClass(){return my(mf.get(this.nextCodePoint()))}getSimpleBreak(){switch(this.nextClass){case 41:return!1;case 34:case 37:case 38:return this.curClass=34,!1;case 36:return this.curClass=36,!1}return null}getPairTableBreak(t){let e=!1;switch(mg[this.curClass][this.nextClass]){case 0:e=!0;break;case 1:e=41===t;break;case 2:if(!(e=41===t))return!1;break;case 3:if(41!==t)return e}return this.LB8a&&(e=!1),this.LB21a&&(16===this.curClass||17===this.curClass)?(e=!1,this.LB21a=!1):this.LB21a=13===this.curClass,28===this.curClass?(this.LB30a++,2==this.LB30a&&28===this.nextClass&&(e=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,e}nextBreak(){if(null==this.curClass){let t=this.nextCharClass();this.curClass=mx(t),this.nextClass=t,this.LB8a=31===t,this.LB30a=0}for(;this.pos<this.string.length;){this.lastPos=this.pos;let t=this.nextClass;if(this.nextClass=this.nextCharClass(),34===this.curClass||36===this.curClass&&37!==this.nextClass)return this.curClass=mx(my(this.nextClass)),new mm(this.lastPos,!0);let e=this.getSimpleBreak();if(null===e&&(e=this.getPairTableBreak(t)),this.LB8a=31===this.nextClass,e)return new mm(this.lastPos)}return this.lastPos<this.string.length?(this.lastPos=this.string.length,new mm(this.string.length)):null}constructor(t){this.string=t,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}};class mv{constructor(t,e={}){this.implementation=new mp(t),this.breakOpportunityCaches=[],this.pos=0}get textLength(){return this.implementation.string.length}nextToPos(){let{pos:t}=this;if(t>=this.textLength)return null;let{implementation:e,breakOpportunityCaches:n}=this;for(;n.length<=t;){let t=e.lastPos,r=e.nextBreak();if(!r)return null;let{position:i}=r;for(let e=t;e<i;++e)n.push(r)}let r=n[t];return this.seek(r.position),r}seek(t){let e=this.textLength;return(t<0&&(t+=e),t>=0&&t<=e)?(this.pos=t,!0):(this.pos=e,!1)}next(t){return"number"==typeof t&&this.seek(t),this.nextToPos()}}function mb(t){return t>127&&160!==t}class mw{constructor(t,e={}){this.text=t,this.breakSpaceType=e.breakSpaceType??"after_every_spaces",this.icuLineBreaker=void 0}getBreakSpaceType(){return this.breakSpaceType}ensureIcuLineBreaker(){return this.icuLineBreaker??(this.icuLineBreaker=new mv(this.text))}next(t){let e,n,{text:r,breakSpaceType:i}=this,a=r.length;if(!(t>=0&&t<a))return -1;let s=-1,o=++t>=2?r.charCodeAt(t-2):0,l=r.charCodeAt(t-1),h=xQ(l);for(let u=t;u<a;++u,o=l,l=e,h=n){switch(n=xQ(e=r.charCodeAt(u)),i){case"before_every_spaces":if(n||xK(e))return u;break;case"before_space_run":if(n){if(!h)return u;continue}break;case"after_space_run":if(h){if(!n)return u;continue}break;case"after_every_spaces":if(h||xK(l))return u;if(n||xK(e))return u+1}if(function(t,e,n){if(45===e&&x2(n))return x2(t)||(32|t)>=97&&(32|t)<=122;if(e>=33&&e<=127&&n>=33&&n<=127){let t=n-33,r=t%8;return!!(x1[e-33][(t-r)/8]&1<<r)}return!1}(o,l,e)||(mb(e)||mb(l))&&(s<u&&(s=this.ensureIcuLineBreaker().next(u-1)?.position??-1),u===s&&!h))return u}return a}}function mM(t,e,n){let r=t.at(-1)?.to??0;e<=r||t.push({from:r,to:e,forceBreak:n})}class m_{constructor(t,e,n={}){this.textMetas=e,this.textChunks=[],this.lastTextMetaIndex=-1,this.initTextChunks(t,n)}collectTextChunks(t,e,n,r,i){for(let e=r;e<i;++e){let n=t.charCodeAt(e);10===n?mM(this.textChunks,e+1,!0):9===n&&"tab"===this.findTextMeta(e).item.type&&mM(this.textChunks,e,!1)}(9!==t.charCodeAt(n-1)||"tab"!==this.findTextMeta(n-1).item.type)&&mM(this.textChunks,n,!1)}initTextChunksForWrap(t,e){let n=new mw(t,e),{spaceBefore:r,spaceChecker:i}=function(t){let e,n;switch(t){case"before_every_spaces":e=!0,n=x0;break;case"before_space_run":e=!0,n=xQ;break;case"after_space_run":e=!1,n=xQ;break;case"after_every_spaces":e=!1,n=x0;break;default:throw Error(`Invalid break space type: ${t}`)}return{spaceBefore:e,spaceChecker:n}}(n.getBreakSpaceType()),a=0;for(;;){let e=n.next(a);if(e<0)break;let s=a,o=e;if(r){for(let n=a;n<e;++n)if(!i(t.charCodeAt(n))){o=n;break}}else for(let n=e-1;n>=a;--n)if(!i(t.charCodeAt(n))){s=n+1;break}this.collectTextChunks(t,a,e,s,o),a=e}}initTextChunksForNoWrap(t,e){for(let e=0,n=t.length;e<n;++e)10===t.charCodeAt(e)&&mM(this.textChunks,e+1,!0)}initTextChunks(t,e){let{textWrapping:n}=x5(e.whiteSpaceRule);"wrap"===n?this.initTextChunksForWrap(t,e):this.initTextChunksForNoWrap(t,e),mM(this.textChunks,t.length,!1)}findTextMeta(t){let{textMetas:e,lastTextMetaIndex:n}=this,r=function(t,e,n){let r=e>=0?t[e]:null;if(r&&n>=r.from&&n<r.to)return e;let i=r&&n>=r.to?e+1:0;for(let e=i,r=t.length;e<r;++e)if(n<t[e].to)return e;throw Error(`Given position is out of range. pos: ${n}, range: ${[t.at(0)?.from,t.at(-1)?.to]}`)}(e,n,t);return this.lastTextMetaIndex=r,e[r]}*iterateTextChunks(){yield*this.textChunks}}let mA={preceding:!1,subsequent:!1},mS=(()=>{let t;return function(){return void 0!==t?t:t=aH()}})();class mC{constructor(t={}){let e=t.canvas?t.canvas.getContext("2d"):mS();if(!e)throw Error("The canvas does not have 2D context.");this.whiteSpaceRule=x5(t.whiteSpaceRule),this.overflowWrapType=t.overflowWrapType??"normal",this.renderingContext=e,this.defaultStyle=t.defaultStyle,this.hangingSpaceChecker=function(t){let e="hang"===t.endOfLineSpace,n="hang"===t.endOfLineOtherSpace;return e&&n?x0:e?xQ:n?xK:void 0}(this.whiteSpaceRule),this.canvasStyle={direction:e.direction,font:e.font,fontStretch:e.fontStretch}}getWhiteSpaceRule(){return this.whiteSpaceRule}getOverflowWrapType(){return this.overflowWrapType}generateEffectiveTextDrawingStyle(t){return sk(this.defaultStyle?{...this.defaultStyle,...t}:t)}doSetupCanvasContext(t){let e=this.canvasStyle=this.generateEffectiveTextDrawingStyle(t);Object.assign(this.renderingContext,e)}createTextResult(t,e){let n={...function(t,e){let{preceding:n,subsequent:r}=x8(e),i="",a=function(t,e,n){for(let{value:e}of t8(t,{from:0}))if(er(el,e))return n?e:void 0;else if(er(eu,e))n=!0;else if(!er(eh,e))break}(t,0,n);void 0!==a&&(t=(i=er(ec,a)?"‏‍":"‍")+t);let s="",o=function(t,e,n){for(let{value:r}of t8(t,{to:e,reversed:!0}))if(er(eo,r))return n?r:void 0;else if(er(eu,r))n=!0;else if(!er(eh,r))break}(t,t.length,r);return void 0!==o&&(t+=s=er(ec,o)?"‍‏":"‍"),x3.text=t,x3.hasPrecedingJoiner=n,x3.hasSubsequentJoiner=r,x3.prefixedJoiner=i,x3.suffixedJoiner=s,x3}(t,e)};return{text:t,displayTextResult:n,displayStyle:this.canvasStyle,metrics:new sD(this.renderingContext.measureText(n.text))}}measureText(t,e){return this.doSetupCanvasContext(e?.style),this.createTextResult(t,e?.joiningRule)}fitText(t,e,n){return(this.doSetupCanvasContext(n?.style),n?.enableOverflowWrap)?this.fitTextWithWrap(t,e,n):this.fitTextSimple(t,e,n)}fitTextWithWrap(t,e,n){return"break-word"===this.overflowWrapType?this.fitTextWithWrapBreakWord(t,e,n):this.fitTextWithWrapNormal(t,e,n)}fitTextWithWrapBreakWord(t,e,n){let r=this.findHangingSpaceOffset(e);if(0===r)return this.createTextResultForFit(e,e.length,n);let i=n?.enableOverflowWrap==="allow_overflow";if(t>=0){let a=e.slice(0,r),s=function(t,e){let n=function(t){let e=t?.fontSize;return"number"==typeof e?e:10}(e);if(!(n>0))return null;let r=n*t.length,[i,a]=h??(h=function(){let t={font:"240px Arial"};return[Math.min(...["i","l"].map(e=>sR(e,t).width))/240,Math.max(...[" "].map(e=>sR(e,t).width))/240]}());return x6[0]=r*i,x6[1]=r*a,x6}(a,n?.style);if(s&&t>=s[1]){let s;for(let i of et(a,{reversed:!0})){let o=this.createTextResultForFit(a,i,n);if(o.metrics.width<=t)return this.maybeExtendTextResultForFit(o,e,r,n);s=o}if(s)return i?this.maybeExtendTextResultForFit(s,e,r,n):null}else if(s&&t<=s[0]){let s;for(let o of et(a)){let l=this.createTextResultForFit(a,o,n);if(l.metrics.width>t)if(s)return this.maybeExtendTextResultForFit(s,e,r,n);else return i?this.maybeExtendTextResultForFit(l,e,r,n):null;s=l}if(s)return this.maybeExtendTextResultForFit(s,e,r,n)}else{let i,s=new ee(a);if(function(t,e,n){let r=-1,i=0,a=t.length;for(;i<a;){let n=Math.floor((i+a)/2),s=e.call(void 0,t[n],n);if(s>0)i=n+1;else if(s<0)a=n;else{r=n;break}}let s=r>=0;}(a,(e,r)=>{let o=s.next(r);if(i&&i.text.length>=o)return 1;let l=this.createTextResultForFit(a,o,n);return l.metrics.width<=t?(i=l,1):-1}),i)return this.maybeExtendTextResultForFit(i,e,r,n)}}if(!i)return null;let a=function(t,e){let n=t7();return t2(t.charCodeAt(0))?0+n.nextBreak(t.slice(e),0):n.nextBreak(t,e)}(e,0);return this.createTextResultForFit(e,a<r?a:e.length,n)}fitTextWithWrapNormal(t,e,n){return n?.enableOverflowWrap==="allow_overflow"?this.createTextResultForFit(e,e.length,n):this.fitTextSimple(t,e,n)}fitTextSimple(t,e,n){let r=this.findHangingSpaceOffset(e);if(0===r)return this.createTextResultForFit(e,e.length,n);{if(t<0)return null;let i=this.createTextResultForFit(e,r,n);return t<i.metrics.width?null:r===e.length?i:this.createTextResultForFit(e,e.length,n)}}findHangingSpaceOffset(t){let e=this.hangingSpaceChecker;if(!e)return t.length;for(let n=t.length-1;n>=0;--n)if(!e(t.charCodeAt(n)))return n+1;return 0}createTextResultForFit(t,e,n){let r;return e===t.length?r=n?.joiningRule:(t=t.slice(0,e),mA.preceding=x8(n?.joiningRule).preceding,mA.subsequent=!1,r=mA),this.createTextResult(t,r)}maybeExtendTextResultForFit(t,e,n,r){return t.text.length===n&&e.length!==n?this.createTextResultForFit(e,e.length,r):t}}class mI{constructor(t={}){this.tabStops=t.tabStops??[],this.defaultTabStopStep=Math.max(t.defaultTabStopStep??0,0),this.tabStopIndexCache=0}getDefaultTabStopStep(){return this.defaultTabStopStep}findNextTabStop(t){let e=this.tabStops;if(0===e.length)return null;for(this.tabStopIndexCache>0&&t<e[Math.min(this.tabStopIndexCache,e.length)-1].pos&&(this.tabStopIndexCache=0);this.tabStopIndexCache<e.length;++this.tabStopIndexCache){let n=e[this.tabStopIndexCache];if(t<n.pos)return n}return null}computeNextDefaultTabStopDiff(t){let e=this.getDefaultTabStopStep();return e<=0?0:e-D(t,e)}doComputeTabInitialWidth(t,e){return t?"left"===t.type?t.pos-e:0:this.computeNextDefaultTabStopDiff(e)}doComputeTabExtraWidth(t,e,n){if(!t)return 0;{let r=t.type;return"right"===r?Math.max(t.pos-e-n,0):"center"===r?Math.max(t.pos-e-n/2,0):0}}computeTabInitialWidth(t,e){return void 0===e&&(e=this.findNextTabStop(t)),this.doComputeTabInitialWidth(e,t)}computeTabExtraWidth(t,e,n){return void 0===n&&(n=this.findNextTabStop(t)),this.doComputeTabExtraWidth(n,t,e)}computeTabWidth(t,e,n){return void 0===n&&(n=this.findNextTabStop(t)),this.doComputeTabInitialWidth(n,t)+this.doComputeTabExtraWidth(n,t,e)}}function mP(t,e){let n=t.text+e.text,{hasPrecedingJoiner:r,prefixedJoiner:i}=t.displayTextResult,{hasSubsequentJoiner:a,suffixedJoiner:s}=e.displayTextResult;return{item:t.item,text:n,displayTextResult:{text:i+n+s,hasPrecedingJoiner:r,hasSubsequentJoiner:a,prefixedJoiner:i,suffixedJoiner:s},displayStyle:t.displayStyle,displayTabStop:t.displayTabStop,metrics:mi(t.metrics,e.metrics)}}class mT{constructor(t,e){this.lineSpaceGetter=function(t){if("function"==typeof t)return e=>mo(t(e));{let e=mo(t);return()=>e}}(t),this.defaultLineBoxMetrics=e?.defaultLineBoxMetrics,this.onBeforeWrap=e?.onBeforeWrap,this.onAfterWrap=e?.onAfterWrap,this.lines=[],this.tagMap=new Map;let n=this.getNextLineSpace();this.lineResult={from:0,to:0,reason:"overflow",space:n,metrics:this.createLineBoxMetrics(n),inlines:[]},this.pos=0,this.filledWidth=this.lineResult.metrics.width,this.committedInlineCount=0,this.committedPos=this.pos,this.committedFilledWidth=this.filledWidth,this.firstInlineExtend=null}getNextLineSpace(){return this.lineSpaceGetter.call(null,this.lines.length)}createLineBoxMetrics(t){let e=this.defaultLineBoxMetrics,n=t.filled;return e&&n?mi(e,n):e?{...e}:n?{...n}:mr()}getMargin(){return this.lineResult.space.margin}getPosition(){return this.pos}getCommittedPosition(){return this.committedPos}getFilledWidth(){return this.filledWidth}getFilledWidthTo(t){let e=this.lineResult.inlines;if(t>=e.length)return this.getFilledWidth();{let n=this.lineResult.metrics.width;for(let r=0;r<t;++r)n+=e[r].metrics.width;return this.firstInlineExtend&&t>=this.committedInlineCount&&(n+=this.firstInlineExtend.metrics.width),n}}getRemainingWidth(){return this.lineResult.space.total-this.filledWidth}getInlineWidth(t){let e=this.lineResult.inlines;if(t<0||t>=e.length)return 0;let n=e[t].metrics.width;return this.firstInlineExtend&&t===this.committedInlineCount-1&&(n+=this.firstInlineExtend.metrics.width),n}getCommittedCount(){return this.committedInlineCount}hasCommittedChanges(){return 0!==this.committedInlineCount}getUncommittedCount(){return this.lineResult.inlines.length-this.committedInlineCount+ +!!this.firstInlineExtend}hasUncommittedChanges(){return this.committedInlineCount!==this.lineResult.inlines.length||!!this.firstInlineExtend}getInlineCount(){return this.lineResult.inlines.length}getInlineResult(t){return this.lineResult.inlines[t]}getLineResults(){return this.lines}addInline(t){this.lineResult.inlines.push(t),this.pos+=t.text.length,this.filledWidth+=t.metrics.width}extendInline(t){if("text"!==t.item.type)return this.addInline(t);let e=this.lineResult.inlines,n=e.length;if(0===n)e.push(t);else if(n!==this.committedInlineCount){let r=n-1;"text"===e[r].item.type?e[r]=mP(e[r],t):e.push(t)}else this.firstInlineExtend?this.firstInlineExtend=mP(this.firstInlineExtend,t):"text"===e[n-1].item.type?this.firstInlineExtend=t:e.push(t);this.pos+=t.text.length,this.filledWidth+=t.metrics.width}squash(t,e){let n=this.lineResult.inlines;if(t>=n.length)return;let r=n[t];if(void 0!==e.displayTextResult&&(r.displayTextResult=e.displayTextResult),void 0!==e.displayStyle&&(r.displayStyle=e.displayStyle),e.metrics&&void 0!==e.metrics.width){let t=r.metrics.width;r.metrics={...r.metrics,width:e.metrics.width},this.filledWidth+=e.metrics.width-t}}tag(t){let e=this.lineResult.inlines.length;if(0===e)return;let n={id:t,inlineIndex:e-1};return this.tagMap.set(t,n),n}getTag(t){return this.tagMap.get(t)}deleteTag(t){return this.tagMap.delete(t)}commit(){if(this.firstInlineExtend){let t=this.lineResult.inlines;t[this.committedInlineCount-1]=mP(t[this.committedInlineCount-1],this.firstInlineExtend),this.firstInlineExtend=null}this.committedInlineCount=this.lineResult.inlines.length,this.committedPos=this.pos,this.committedFilledWidth=this.filledWidth}rollback(){let t={pos:0,width:0,inlines:[],tags:[]},e=-this.committedInlineCount+ +!!this.firstInlineExtend;this.firstInlineExtend&&(t.inlines.push(this.firstInlineExtend),this.firstInlineExtend=null);let n=this.lineResult.inlines;for(let e=this.committedInlineCount,r=n.length;e<r;++e)t.inlines.push(n[e]);n.length=this.committedInlineCount,t.pos=this.pos-this.committedPos,t.width=this.filledWidth-this.committedFilledWidth,this.pos=this.committedPos,this.filledWidth=this.committedFilledWidth;let r=this.tagMap;for(let n of r.values())n.inlineIndex>=this.committedInlineCount&&(n.inlineIndex+=e,t.tags.push(n),r.delete(n.id));return t}fillLineBoxMetrics(t){let e=t.metrics,n=e.width,r=e.lineBoxAscent,i=e.lineBoxDescent;for(let{metrics:{width:e,lineBoxAscent:a,lineBoxDescent:s}}of t.inlines)n+=e,r<a&&(r=a),i<s&&(i=s);e.width=n,e.height=r+i,e.textBoxAscent=r,e.textBoxDescent=i,e.lineBoxAscent=r,e.lineBoxDescent=i}wrap(t){let e=this.rollback();this.onBeforeWrap&&(this.onBeforeWrap.call(null,this),this.commit()),this.lineResult.to=this.committedPos,this.lineResult.reason=t,this.fillLineBoxMetrics(this.lineResult),this.lines.push(this.lineResult);let n=this.getNextLineSpace();for(let t of(this.lineResult={from:this.committedPos,to:this.committedPos,reason:"overflow",space:n,metrics:this.createLineBoxMetrics(n),inlines:e.inlines},this.pos+=e.pos,this.filledWidth=this.lineResult.metrics.width+e.width,this.committedInlineCount=0,this.committedFilledWidth=this.lineResult.metrics.width,e.tags))this.tagMap.set(t.id,t);this.onAfterWrap&&this.onAfterWrap.call(null,this)}commitWrap(t){this.commit(),this.wrap(t)}}class mk{constructor(t,e,n={}){this.textSegmenter=new m_(t,e,n),this.textFitter=new mC({...n,defaultStyle:void 0}),this.tabHandler=new mI(n),this.text=t,this.splitInlinesByBreakOpportunities=n.splitInlinesByBreakOpportunities??!1,this.defaultLineBoxMetrics=function(t){let{text:e,line:n}=ma("",t);return ms(mn(e,n),t)}(me(n.defaultStyle)),this.suppressEmptyLine=n.suppressEmptyLine??!1}breakLines(t){let e=new mT(t,{defaultLineBoxMetrics:this.defaultLineBoxMetrics,onBeforeWrap:this.onContextBeforeWrap.bind(this),onAfterWrap:this.onContextAfterWrap.bind(this)}),n=0;for(let t of this.textSegmenter.iterateTextChunks()){if(e.getRemainingWidth()===1/0&&!t.forceBreak&&t.to!==this.text.length)continue;let r=t.to;for(;e.getPosition()<r;)this.handleLineBreakOpportunity(e,n,r,t.forceBreak);n=r}return(!this.suppressEmptyLine||e.hasCommittedChanges())&&e.commitWrap("end"),e.getLineResults()}handleLineBreakOpportunity(t,e,n,r){let i="normal"!==this.textFitter.getOverflowWrapType(),a=this.computeEnableOverflowWrap(t);for(;;){let s=t.getPosition(),{item:o,from:l,to:h,style:u,metrics:c}=this.textSegmenter.findTextMeta(s),d="tab"===o.type&&c;d&&this.handlePreviousTab(t);let p=0;if(c){let e="allow_overflow"===a;if(e||t.getRemainingWidth()>=0){let n,r;if(d){let e=t.getMargin()[0]+t.getFilledWidth();r=this.tabHandler.findNextTabStop(e),n={...c,width:this.tabHandler.computeTabInitialWidth(e,r)}}else r=null,n=c;if(e||n.width<=t.getRemainingWidth()){let e=this.text.slice(s,h),i={item:o,text:e,displayTextResult:{text:e,hasPrecedingJoiner:!1,hasSubsequentJoiner:!1,prefixedJoiner:"",suffixedJoiner:""},displayStyle:this.textFitter.generateEffectiveTextDrawingStyle(u),displayTabStop:r,metrics:n};t.addInline(i),p=1,d&&t.tag("tab")}}}else{let r=Math.min(h,n),i=this.text.slice(s,r),c=this.textFitter.fitText(t.getRemainingWidth(),i,{joiningRule:{preceding:0!==t.getInlineCount()&&void 0!==function(t,e){for(let{value:n}of t8(t,{to:e,reversed:!0}))if(er(eo,n)||er(eu,n))return n;else if(!er(eh,n))break}(this.text,s),subsequent:void 0!==function(t,e){for(let{value:n}of t8(t,{from:e}))if(er(el,n)||er(eu,n))return n;else if(!er(eh,n))break}(this.text,r)},style:u,enableOverflowWrap:a});if(c){let{text:n,displayTextResult:r,displayStyle:a,metrics:h}=c,d={item:o,text:n,displayTextResult:r,displayStyle:a,displayTabStop:null,metrics:ms(mn(h,sV(u)),u)};s===l||this.splitInlinesByBreakOpportunities&&s===e?t.addInline(d):t.extendInline(d),p=n.length===i.length?1:2}}if(0===p){void 0===a?t.wrap("overflow"):t.commitWrap("overflow");break}if(2===p){t.commitWrap("overflow");break}if(h>=n){r?t.commitWrap("break"):t.commit();break}i&&(a=this.computeEnableOverflowWrap(t))}}computeEnableOverflowWrap(t){if(!t.hasCommittedChanges()){if("normal"===this.textFitter.getOverflowWrapType())return"allow_overflow";let e=t.getUncommittedCount();if(0===e)return"allow_overflow";if(1!==e)return"prevent_overflow";{let e=t.getTag("tab");return e&&e.inlineIndex===t.getInlineCount()-1?"allow_overflow":"prevent_overflow"}}}onContextBeforeWrap(t){this.handleLastJoiner(t),this.handlePreviousTab(t)}handleLastJoiner(t){let e=t.getInlineCount();if(0===e)return;let{item:n,text:r,displayTextResult:i,displayStyle:a}=t.getInlineResult(e-1);if("text"!==n.type||!i.hasSubsequentJoiner)return;let s=this.textFitter.measureText(r,{joiningRule:{preceding:i.hasPrecedingJoiner,subsequent:!1},style:a});t.squash(e-1,{displayTextResult:s.displayTextResult,displayStyle:s.displayStyle,metrics:{width:s.metrics.width}})}handlePreviousTab(t){let e=t.getTag("tab");if(!e)return;t.deleteTag("tab");let{inlineIndex:n}=e,r=t.getMargin(),i=t.getFilledWidthTo(n),a=t.getInlineWidth(n),s=Math.min(this.tabHandler.computeTabExtraWidth(r[0]+i,t.getFilledWidth()-i-a),t.getRemainingWidth()+Math.max(r[1],0));s<=0||t.squash(n,{metrics:{width:a+s}})}onContextAfterWrap(t){this.handleFirstJoiner(t),this.handleWrappedTab(t)}handleFirstJoiner(t){if(0===t.getInlineCount())return;let{item:e,text:n,displayTextResult:r,displayStyle:i}=t.getInlineResult(0);if("text"!==e.type||!r.hasPrecedingJoiner)return;let a=this.textFitter.measureText(n,{joiningRule:{preceding:!1,subsequent:r.hasSubsequentJoiner},style:i});t.squash(0,{displayTextResult:a.displayTextResult,displayStyle:a.displayStyle,metrics:{width:a.metrics.width}})}handleWrappedTab(t){let e=t.getTag("tab");if(!e)return;let{inlineIndex:n}=e,r=this.tabHandler.computeTabInitialWidth(t.getMargin()[0]+t.getFilledWidthTo(n));t.squash(n,{metrics:{width:r}})}static create(t,e){let{text:n,textMetas:r}=function(t,e){let n=[],r=[],i=0;for(let a of t)switch(a.type){case"text":i=function(t,e,n,r,i){let a=r.text;if(0===a.length)throw Error("Inline text item should not be empty.");let s=ml(r,i),o=n+a.length;return t.push(a),e.push({item:r,from:n,to:o,style:s}),o}(n,r,i,a,e);break;case"break":i=function(t,e,n,r,i){let a=ml(r,i),s=n+1;return t.push("\n"),e.push({item:r,from:n,to:s,style:a,metrics:mu("",a,r)}),s}(n,r,i,a,e);break;case"tab":i=function(t,e,n,r,i){let a=ml(r,i),s=n+1;return t.push("	"),e.push({item:r,from:n,to:s,style:a,metrics:mu("",a,r)}),s}(n,r,i,a,e);break;case"object":i=function(t,e,n,r,i){let a,{inlineText:s,size:o}=r,l=ml(r,i),h=n+1;return a=void 0!==s?mu(s,l,r):function(t,e,n){let{text:r,line:i}=ma("",e),a=mh(n),s=t.width+a.left+a.right,o=t.height+a.top+a.bottom,l=Math.max(r.fontBoundingBoxAscent,o),h=r.fontBoundingBoxDescent;return ms({width:s,height:l+h,textBoxAscent:l,textBoxDescent:h,lineBoxAscent:Math.max(i.lineBoundingBoxAscent,o),lineBoxDescent:i.lineBoundingBoxDescent},e)}({width:o?.width??0,height:o?.height??0},l,r),t.push(""),e.push({item:r,from:n,to:h,style:l,metrics:a}),h}(n,r,i,a,e);break;default:throw Error(`Unknown inline item: ${a.type}`)}return{text:n.join(""),textMetas:r}}(t,e=function(t){if(!t)return t;let e=t.defaultStyle,n=x7(e);return e===n?t:{...t,defaultStyle:n}}(e));return new this(n,r,e)}}class mL{constructor(t=m){this.getListBaseIndent=t.getListBaseIndent??(()=>0),this.getListRightSpace=t.getListRightSpace??(()=>0),this.isListAlignRight=t.isListAlignRight??_,this.getListDrawingStyle=t.getListDrawingStyle??b}extractLineDecoration(t,e){let n=sK.fly(e).childContainer;if(!n)return{prefix:null,suffix:null};let r=n.previousSibling,i=n.nextSibling;r?.remove(),i?.remove();let a=this.collectLinePrefixDecoration(t,r),s=this.collectLineSuffixDecoration(t,i);return a&&this.applyLineDecorationPosition(a),s&&this.applyLineDecorationPosition(s),{prefix:a,suffix:s}}collectListInlineItems(t,e){let n=this.getListDrawingStyle(t),r=[];for(let t of e.childNodes)if(eH(t)){let e=t.data;e&&r.push({type:"text",text:e,style:n})}else if(eG(t)){let e=t.textContent;e&&r.push({type:"text",text:e,style:{...n,...function(t){let e={};for(let n of["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight"]){let r=t[n];r&&(e[n]=r)}return e}(t.style),additionalLineStyles:n}})}return r}measureListMetrics(t,e){let n=mk.create(this.collectListInlineItems(t,e)).breakLines(1/0),r=mr(n.at(-1)?.metrics);if(n.length>1)for(let{metrics:{width:t,height:e}}of n.slice(0,-1))r.width=Math.max(r.width,t),r.height+=e,r.lineBoxAscent+=e;return r.width+=2*t.type.listItemPadding,r}collectLinePrefixList(t,e){let n,r,i=e.firstElementChild,a=i?.firstElementChild;if(!i||!a)return{textBoxLeft:0,textBoxRight:0,metrics:mr()};let s=this.measureListMetrics(t,a),o=s.width,l=this.getListBaseIndent(t);if(this.isListAlignRight(t))n=o+this.getListRightSpace(t)-l,r=l;else{let t=l?l/4:1;n=0,r=Math.ceil(Math.max(l,Math.ceil(o/t)*t))}let h=n+r,u=h-o;return i.style.paddingRight=u+"px",{textBoxLeft:n,textBoxRight:r,metrics:{...s,width:h},customData:{list_item_width:o,list_item_padding:u}}}collectLinePrefixDecoration(t,e){let n;if(!e)return null;for(let r of e.children){let i;r.classList.contains("syno-o-doc-pm-list-item")&&(i=this.collectLinePrefixList(t,r),n?(n.textBoxRight+=i.textBoxLeft+i.textBoxRight,n.metrics=mi(n.metrics,i.metrics),i.customData&&(n.customData?Object.assign(n.customData,i.customData):n.customData=i.customData)):n={...i,dom:e})}return n??{textBoxLeft:0,textBoxRight:0,metrics:mr(),dom:e}}collectLineSuffixDecoration(t,e){return e?{textBoxLeft:0,textBoxRight:0,metrics:mr(),dom:e}:null}applyLineDecorationPosition(t){t.textBoxLeft&&(t.dom.style.marginLeft=-t.textBoxLeft+"px")}applyLineDecoration(t,e){t.length&&(e.prefix&&this.applyLineDecorationItem(t[0],e.prefix,!0),e.suffix&&this.applyLineDecorationItem(t[t.length-1],e.suffix,!1))}applyLineDecorationItem(t,e,n){let r=sK.fly(t).childContainer?.parentNode;if(!r)return;let{dom:i,metrics:a,customData:s}=e;r[n?"prepend":"append"](i),sK.fly(t).setData("line_breaker:list_metrics",a),s&&P(s,(e,n)=>{sK.fly(t).setData(n,e)})}}class mD{constructor(t,e){this.lineType=t,this.lineRenderer=e.lineRenderer}getLineLocationEl(t){return this.lineType.getLocationDOM(t)}renderLine(){return this.lineRenderer.call(null)}resetBaseOffset(t,e){let n=0;for(let r=t.firstElementChild;r;r=r.nextElementSibling){let t=sK.get(r);t.isOffsetElement&&(t.setOffset(t.getOffset()-e),n+=t.getSize())}return{offset:e,size:n}}setupLine(t,e){if(void 0!==e.offset&&sK.fly(t).setOffset(e.offset),void 0!==e.size&&sK.fly(t).setSize(e.size),void 0!==e.index&&sK.fly(t).setData("line_index",e.index),void 0!==e.height&&sK.fly(t)._setContentHeight(Math.round(e.height)),void 0!==e.lineHeight&&sK.fly(t).setData("line_height",e.lineHeight),void 0!==e.lineLength&&sK.fly(t).setData("line_length",e.lineLength),void 0!==e.lineContentRange){sK.fly(t).setData("line_content_range",e.lineContentRange);let n=this.getLineLocationEl(t);if(n){let r=sK.fly(t).getData("line_length")||0;n.style.marginLeft=e.lineContentRange[0]+"px",n.style.marginRight=r-e.lineContentRange[1]+"px"}}void 0!==e.inlineRange&&sK.fly(t).setData("inline_range",e.inlineRange),void 0!==e.inlineContentRange&&sK.fly(t).setData("inline_content_range",e.inlineContentRange)}createLine(t,e){let n=this.renderLine(),r=this.resetBaseOffset(t,e.offset).size,i=sK.get(n);return i.childContainer?.appendChild(t),i.bumpVersion(),i.updatePaddingSize(!0),this.setupLine(n,{...e,size:r}),n}}class mR{constructor(t,e){this.textAlign=t}getTextAlign(){return this.textAlign}computeAlignedContentRange(t,e){let n;switch(this.getTextAlign()){case"right":n=Math.max(e-t,0);break;case"center":n=Math.max((e-t)/2,0);break;default:n=0}return[n,n+t]}applyTextAlign(t,e){"justify"===this.getTextAlign()&&"overflow"===e&&(t.style.textAlignLast="justify")}}function mN(t){if(!t.fontSize)return t;let n=e??(e=function(){if("chrome"===ej||eE()){let t=function(){let t=a$({preset:"metrics",inheritFontFaces:!1}),e=t.contentDocument?function(t){let e=t.createElement("span");Object.assign(e.style,{fontSize:"1px",display:"none"}),t.body.appendChild(e);let n=ng(window.getComputedStyle(e).fontSize,"px");return(e.remove(),isNaN(n)||.01>Math.abs(n-1))?-1:n}(t.contentDocument):-1;return t.remove(),e}();if(t>=0)return t}else{let t=function(){let t=a$({preset:"metrics",inheritFontFaces:!1}),e=function(t){let e=t.contentDocument;if(!e)return -1;let n=e.createElement("span");e.body.appendChild(n);let r=aH({document:e});if(!r)return -1;for(let t=12;t>=1;--t)if(!sP(n,r,t))if(12!==t)return t+1;else{for(let t=13;t<=25;++t)if(sP(n,r,t))return t;return 26}return -1}(t);return t.remove(),e}();if(t>=0)return t}return -1}());if(n<=0)return t;let r=t.fontSize;return t.fontSize=Math.max("number"==typeof r?r:ng(r,"px"),n),t}class mO{constructor(t,e){this.createRawInlineItem=e.createRawInlineItem,this.styleNameMappings=this.buildStyleNameMappings(t),this.defaultBlockDrawingStyle=mN(this.mapInlineDrawingStyle(t.getDefaultContentStyles()))}buildStyleNameMappings(t){return[["font-style","fontStyle"],["font-weight","fontWeight"],["font-size","fontSize"],["font-family","fontFamily"],["vertical-align","verticalAlign"]]}mapInlineDrawingStyle(t){let e={};for(let[n,r]of this.styleNameMappings)t[n]&&(e[r]=t[n]);return e}createInlineDrawingStyle(t){let e=this.mapInlineDrawingStyle(nK.setToStyle(t));return("super"===e.verticalAlign||"sub"===e.verticalAlign)&&(e.verticalAlignReferenceStyle=this.mapInlineDrawingStyle(nK.setToStyle(t,{ignoreMarks:"Script"}))),e.fontSize&&e.fontFamily&&(e.additionalLineStyles=this.mapInlineDrawingStyle(nK.setToStyle(t,{ignoreMarks:["FontFamily","Script"]}))),e}createParagraphDrawingStyle(t){return x7({...this.defaultBlockDrawingStyle,lineHeight:1.2*t.type.getCssAttrs(t).lineHeight})}createListDrawingStyle(t){let e=this.createParagraphDrawingStyle(t),n={...e,...this.mapInlineDrawingStyle(nK.setToStyle(t.listMarks))};return("super"===n.verticalAlign||"sub"===n.verticalAlign)&&(n.verticalAlignReferenceStyle=e),n}createInlineItemByNode(t){let e=this.createInlineDrawingStyle(t.marks),n=this.createRawInlineItem.call(null,t);return n.style?n.style={...e,...n.style}:n.style=e,n}createInlineItemByItem(t){let e,n=t.style;return n&&Array.isArray(n)?{...t,style:this.createInlineDrawingStyle(n)}:t}createInlineItem(t){let e;return(e="type"in t&&"string"==typeof t.type?this.createInlineItemByItem(t):this.createInlineItemByNode(t)).style&&mN(e.style),e}}class mj{constructor(t,e,n){this.container=t,this.dataGetter=e,this.value=n?.reversed?this.find(this.container.lastElementChild,!0):this.find(this.container.firstElementChild,!1)}getContainer(){return this.container}getValue(){return this.value}find(t,e){if(!t)return null;let n=t;for(;;){let t=this.dataGetter.call(null,n);if(null!==t)return{el:n,data:t};let r=e?n.previousElementSibling:n.nextElementSibling;if(!r)break;n=r}return null}peek(t){let e=this.value?.el;return e?this.find(t?e.previousElementSibling:e.nextElementSibling,t):null}peekPrev(){return this.peek(!0)}peekNext(){return this.peek(!1)}iterate(t){return this.value=this.peek(t)}prev(){return this.iterate(!0)}next(){return this.iterate(!1)}end(){return this.value=null}}function mE(t,e){void 0===e&&(e=!1);let{left:n=0,width:r=0}=t.getState(e?"first_text_rect_info":"text_rect_info")??m,{left:i=0,width:a=0}=t.getState("parent_text_rect_info")??m,s=n-i;return{length:a,contentStart:s,contentEnd:s+r}}class mV extends yB{constructor(t,e){super(t,e),this.lineDecorator=this.createLineDecorator(),this.lineCreator=this.createLineCreator(),this.inlineItemManager=this.createInlineItemManager()}static get pluginName(){return"line_breaker"}static get pluginDependency(){return["draw"]}createLineDecorator(){return new mL({getListBaseIndent:this.getListBaseIndent.bind(this),getListRightSpace:this.getListRightSpace.bind(this),isListAlignRight:this.isListAlignRight.bind(this),getListDrawingStyle:t=>this.inlineItemManager.createListDrawingStyle(t)})}createLineCreator(){let t=this.pm.schema.nodeType("text_line"),e=t.create();return new mD(t,{lineRenderer:()=>this.pm.getPlugin("draw").renderNode(e)})}createInlineItemManager(){return new mO(this.pm.schema,{createRawInlineItem:t=>this.createRawInlineItem(t)})}createTextAligner(t){return new mR(t.type.getCssAttrs(t).textAlign)}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"afterRender",this.onInlineDrawAfterRender,this,{checker:"Inline"}),this.bindEvent(t,"afterChildRender",this.onParagraphDrawAfterChildRender,this,{checker:"Paragraph",priority:10})}onSplitText(t,e,n){let r=this.pm.getPlugin("draw").getPmElement(t).getData("line_breaker:inline_item");if(!r||"text"!==r.type)return;let i=r.text;r.text=i.slice(0,e),this.pm.getPlugin("draw").getPmElement(n).setData("line_breaker:inline_item",{...r,text:i.slice(e)})}onInlineDrawAfterRender(t,e,n){!n.isTarget("display")||n.options&&n.options.disableBreakLine||this.setInlineItem(e,t)}onParagraphDrawAfterChildRender(t,e,n){if(!n.isTarget("display")||n.options&&n.options.disableBreakLine)return;let r=this.pm.getPlugin("draw"),i=r.getPmElement(e).childContainer?.lastElementChild;i?.getAttribute("pm-ignore")==="trailing-break"&&this.setInlineItem(i,{type:"object",style:t.textMarks}),this.breakLine(t,e),r.getPmElement(e).syncDrawSize()}getListBaseIndent(t){return 30}getListRightSpace(t){return 15}isListAlignRight(t){var e;let n=t.is("ListBlock")?t.getState("list_config"):null;return!!n&&("right"===n.align||"lowerRoman"===(e=n.format)||"upperRoman"===e)}setInlineItem(t,e){this.pm.getPlugin("draw").getPmElement(t).setData("line_breaker:inline_item",this.inlineItemManager.createInlineItem(e))}createRawInlineItem(t){if(t.is("Text"))return{type:"text",text:t.text};if(t.is("HardBreak"))return{type:"break"};if(t.is("Tab"))return{type:"tab"};if(t.is("InlineObject"))return{type:"object",size:t.type.getObjectSize(t),border:t.type.getObjectBorder(t)};throw Error(`Unhandled inline node: ${t.name}`)}collectInlineItems(t){let e=this.pm.getPlugin("draw"),n=[];for(let r of t.children){let t=e.getPmElement(r).getData("line_breaker:inline_item");t&&n.push(t)}return n}breakLine(t,e){let n=this.extractLines(t,e);n.forEach(this.replaceSpace,this),this.putBackLines(t,e,n)}computeLineBreakResults(t,e,n){let r=[null,null],i=n.prefix?{...n.prefix.metrics,width:n.prefix.textBoxRight}:void 0,a=mk.create(this.collectInlineItems(e),{lineBreakType:"normal",breakSpaceType:"after_every_spaces",whiteSpaceRule:"break-spaces",overflowWrapType:"break-word",defaultStyle:this.inlineItemManager.createParagraphDrawingStyle(t),tabStops:t.type.getTabAttrValues(t).tabStops,defaultTabStopStep:30}).breakLines(e=>{let n=0===e,a=function(t,e,n){if(void 0===e&&(e=!1),!n)return mE(t,e);{let r=+!e;return n[r]??(n[r]=mE(t,e))}}(t,n,r);return{width:a.length,margin:[a.contentStart,a.length-a.contentEnd],filled:n?i:void 0}});if(a.length>=0&&n.suffix){let t=a.length-1;a[t]={...a[t],metrics:mi(a[t].metrics,n.suffix.metrics)}}return a}extractLineFragment(t,e){let n=this.pm.getPlugin("draw"),r=t.getContainer();for(let i of e){let e=t.getValue();if(!e)break;let{el:a,data:s}=e;if(i.item.type!==s.type){t.end();break}if("text"===s.type){let e=s.text.length,o=i.text.length;if(e<o){t.end();break}if(e>o){let t=n.splitTextDOM(a,o);t&&r.insertBefore(t,a.nextSibling)}}else if("tab"===s.type){let t=a.querySelector(".syno-o-doc-pm-tab");if(t){let e=i.metrics.width;t.style.width=e+"px";let n=this.getTabStopLeaderTextContent(i);""!==n&&(t.textContent=n,t.style.overflow="clip")}}n.getPmElement(a).setData("line_breaker:inline_result",i),t.next()}let i=r.ownerDocument.createDocumentFragment(),a=t.getValue()?.el??null;for(;r.firstChild&&r.firstChild!==a;)i.appendChild(r.firstChild);return i}getTabStopLeaderTextContent(t){let e=t.displayTabStop,n=t.metrics.width,r=t.displayStyle,i=null!==e?function(t){switch(t){case"dot":return".";case"hyphen":return"-";case"underscore":case"heavy":return"_";case"middleDot":return"\xb7";default:return""}}(e.leader??"none"):"",a=""!==i?sR(i,r).width:0,s=0!==a?Math.floor(n/a):0,o=sR(" ",r).width,l=0!==o?Math.ceil((n-a*s)/o):0;return i.repeat(s)+" ".repeat(l)}extractLines(t,e){let n=this.pm.getPlugin("draw"),r=this.lineDecorator.extractLineDecoration(t,e),i=this.extractInlineContainer(e),a=[],s=1.2*t.type.getCssAttrs(t).lineHeight,o=r.prefix?r.prefix.textBoxLeft:0,l=r.prefix?r.prefix.textBoxRight:0,h=this.computeLineBreakResults(t,i,r),u=this.createTextAligner(t),c=new mj(i,t=>n.getPmElement(t).getData("line_breaker:inline_item")??null),d=0;for(let[t,e]of h.entries()){let{reason:r,space:i,metrics:h,inlines:p}=e,g=this.extractLineFragment(c,p),f=0===t,y=u.computeAlignedContentRange(h.width,i.total),x=i.margin[0]+y[0],m=i.margin[0]+y[1],v=this.lineCreator.createLine(g,{offset:d,index:t,height:h.height,lineHeight:s,lineLength:i.width,lineContentRange:[i.margin[0],i.margin[0]+i.total],inlineRange:[x-(f?o:0),m],inlineContentRange:[x+(f?l:0),m]});u.applyTextAlign(v,r),n.getPmElement(v).setData("line_breaker:line_result",e),d+=n.getPmElement(v).getSize(),a.push(v)}return this.lineDecorator.applyLineDecoration(a,r),a.forEach((e,n)=>{sK.fly(e).setData("text_rect_info",t.getState(0===n?"first_text_rect_info":"text_rect_info"))}),a}extractInlineContainer(t){let e=sK.fly(t).childContainer,n=e.parentElement;return n&&(this.pm.getPlugin("draw").onChildContainer(n,t),e8(n),sK.fly(t).reset()),e}replaceSpace(t){a4(t,t=>{eH(t)&&(t.data=t.data.replace(/ /g,"\xa0"))},NodeFilter.SHOW_TEXT)}putBackLines(t,e,n){sK.fly(e).childContainer?.append(...n),sK.fly(e).setData("line_count",n.length)}}let mB=new yG(class extends mV{constructor(t,e){super(t,e)}createRawInlineItem(t){if(t.is("Image"))if((t.getAttrValue("file_type")??"binary")==="binary")return{type:"object",inlineText:t.getAttrValue("file_id")?t.getAttrValue("alt")??"":"",border:t.type.getObjectBorder(t)};else return{type:"object",size:t.type.getObjectSize(t),border:t.type.getObjectBorder(t)};return t.is("PageNumberText")?{type:"object",inlineText:"0"}:super.createRawInlineItem(t)}});class mz extends yB{constructor(t,e){super(t,e)}setPaginationMode(t){return this.getModeControl().setPaginationMode(t)}isPaginatedMode(){return this.getModeControl().isPaginatedMode()}resolvePaginatedMode(t){return"boolean"==typeof t?t:this.isPaginatedMode()}updatePageOffsetHeightSum(){this.height_sum=[];let t=0,e=0,n=0;for(let r=0,i=this.getPageCount();r<i;++r)t+=this.getPageOffsetHeight(r,!0,{forcePaginated:!0}),e+=this.getPageOffsetHeight(r,!0,{forcePaginated:!1}),n+=this.getPageOffsetHeight(r,!1),this.height_sum.push({view_paginated:t,view_compress:e,content:n})}getPageOffsetHeight(t,e,n){if(!e)return this.getPageControl().getPageContentHeight(t);if(this.resolvePaginatedMode(n&&n.forcePaginated))return this.getPageControl().getPageFullHeight(t);{let e=this.getPageDOM(t);if(!e)return NaN;{let n;return n=t===this.getPageCount()-1?this.getPageControl().getPageContentHeight(t)+this.getPageControl().getPageSettingPadding(t).bottom:sK.fly(e).getData("page_content_bottom"),0===t&&(n+=this.getPageControl().getPageSettingPadding(t).top),n}}}pageIndexFromTop(t,e,n){void 0===n&&(n=m);let r=n.start||0,i=n.bound?this.getPageCount()-1:-1;for(;r!==i;++r){let i=this.getPageOffsetHeight(r,e,n);if(isNaN(i)||t<i)break;t-=i}return{index:r,inner:t}}topFromPageIndex(t,e,n){if(void 0===n&&(n=m),n.bound&&(t=Math.min(this.getPageCount(),t)),0===t)return 0;let r=this.height_sum[t-1];return r?e?this.resolvePaginatedMode(n&&n.forcePaginated)?r.view_paginated:r.view_compress:r.content:NaN}convertInnerTop(t,e,n,r){void 0===r&&(r=m);let i=this.resolvePaginatedMode(r.forcePaginated)?this.getPageControl().getPageHeaderHeight(t):0===t?this.getPageControl().getPageSettingPadding(t).top:0;return n?tj(e-i,1,this.getPageControl().getPageContentHeight(t)-1):i+e}convertTopByIndex(t,e,n){return this.topFromPageIndex(t.index,!e,n)+this.convertInnerTop(t.index,t.inner,e,n)}convertTop(t,e,n){return this.convertTopByIndex(this.pageIndexFromTop(t,e,n),e,n)}convertTopDiff(t,e,n){return this.convertTop(t,e,n)-t}convertInnerLeft(t,e,n,r){let i=this.getPageControl().getPageSettingPadding(t).left;return n?tj(e-i,0,this.getPageControl().getPageContentWidth(t)):i+e}convertLeft(t,e,n){return this.convertInnerLeft(0,t,e,n)}convertLeftDiff(t,e,n){return this.convertLeft(t,e,n)-t}getBlockerObj(t){return this.getBlocker(t)}getBlocker(t){return this.getBlockerControl().getBlocker(t)}getPageObj(t){return this.getPageBlocker(t)}getPageBlocker(t){return this.getBlockerControl().getPageBlocker(t)}}class mF{constructor(t,e){this.doc=t,this.oldDoc=e,this.floatingDrawings=[],this.pageLayoutChanged=!1,this.pageDirtyAll=!1,this.pageDirtySet=new Set}getRootNode(){return this.doc}getOldRootNode(){return this.oldDoc}reset(){this.pageDirtyAll=!1,this.pageDirtySet.clear()}collectFloatingDrawings(t){this.floatingDrawings.push(t)}getCollectedFloatingDrawings(){return this.floatingDrawings}isPageLayoutChanged(){return this.pageLayoutChanged}setPageLayoutChanged(){this.pageLayoutChanged=!0}isPagesAllDirty(){return this.pageDirtyAll}setPagesAllDirty(){this.pageDirtyAll=!0}getDirtyPages(){return this.isPagesAllDirty()?[]:Array.from(this.pageDirtySet).sort((t,e)=>t-e)}addDirtyPages(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];for(let t of e)this.pageDirtySet.add(t)}}function mG(t,e,n,r){for(let i=go.length-(e?2:1);i>=0;--i)mH(t,go[i],n,r)}function mH(t,e,n,r){for(let i=gl.length-1;i>=0;--i){let a=gl[i];n.call(r,t[e][a],e,a)}}class mW{constructor(t){this.control=t,this.data={page_gap:8,page_gap_top:12,page_gap_bottom:24};let e=t.pm.doc,n=e.queryChildNode("PageDecorate",!0),r=n.childs();this._update({update_doc:e,update_page_decorate:n,update_decorators:r})}ensureOperation(){return this.operation||(this.operation=Object.create(null))}_update(t){let e=0;return t.update_doc&&(e|=this.updateDoc(e,t.update_doc)),t.update_page_decorate&&(e|=this.updatePageDecorate(e,t.update_page_decorate)),t.update_decorators&&(e|=this.updateDecorators(e,t.update_decorators)),t.update_page_decorate&&(e|=this.updateDecoratorInfo(e)),this.operation=null,e}updateDoc(t,e){this.ensureOperation().doc=e;let n=this.data,r=e.state;return n.page_size===r.page_size&&n.page_padding===r.page_padding&&n.page_decorate_height===r.page_decorate_height?0:(n.page_size=r.page_size,n.page_padding=r.page_padding,n.page_decorate_height=r.page_decorate_height,7)}updatePageDecorate(t,e){let n=this.data,r=e.attrs;if(n.page_decorate===r&&(!this.operation||!this.operation.doc))return 0;n.page_decorate=r;let i=n.dec_info;if(i?(this.ensureOperation().dec_info=i,i=Q(i)):i=function(){let t=Object.create(null);for(let e=go.length-1;e>=0;--e){let n=t[go[e]]=Object.create(null);for(let t=gl.length-1;t>=0;--t)n[gl[t]]=Object.create(null)}return t}(),n.dec_info=i,r["place-show"])for(let t=gl.length-1;t>=0;--t){let e=gl[t],n="normal"!==e&&r["place-"+e]?e:"normal";!function(t,e,n,r,i){for(let a=go.length-(n?2:1);a>=0;--a){let n=go[a];r.call(i,t[n][e],n,e)}}(i,e,!0,function(t,e,r){t.view_type=n,t.view_height=i[e][n].height},this)}else mG(i,!0,function(t,e,n){t.view_type=null,t.view_height=this.getMinDecoratorHeight(e)},this);if(r["num-show"])for(let t=gl.length-1;t>=0;--t){let e=gl[t],n=i.page_num[e];"cover"===e&&r["num-cover"]?(n.view_type=null,n.view_pos=null):(n.view_type="normal",n.view_pos=r["num-pos"][0]+("r"===r["num-pos"][1]==!!("even"===e&&r["num-even"])?"l":"r"))}else mH(i,"page_num",function(t,e,n){t.view_type=null,t.view_pos=null},this);return 0}updateDecorators(t,e){for(let n=e.length-1;n>=0;--n)t|=this.updateDecorator(t,e[n]);return t}updateDecorator(t,e){if(e.type.isPageNumber)return 0;let n=this.data.dec_info,r=e.attrs.type,i=e.type.decoratorType,a=n[i][r],s=e.dom?tj(sK.fly(e.dom).getHeight(),this.getMinDecoratorHeight(i),this.getMaxDecoratorHeight(i)):-1;return a.height===s?0:(a.height=s,mH(n,i,function(e,n,i){e.view_type===r&&(e.view_height=s,t|=this.getResizeEnum(i))},this),t)}updateDecoratorInfo(t){if(7===t)return 7;let e=this.operation&&this.operation.dec_info;if(!e)return 7;let n=this.data.dec_info;return mG(e,!0,function(e,r,i){e.view_height!==n[r][i].view_height&&(t|=this.getResizeEnum(i))},this),t}getResizeEnum(t){switch(t){case"cover":return 1;case"even":return 2;case"normal":return 4;default:throw Error("Invalid type.")}}}class mq extends mW{constructor(t){super(t)}update(t){let e=this._update(t);if(0!==e&&(t.setPageLayoutChanged(),!t.isPagesAllDirty()))if(7===e)t.setPagesAllDirty();else{if(1&e&&t.addDirtyPages(0),2&e)for(let e=1,n=this.control.getPageCount();e<n;e+=2)t.addDirtyPages(e);if(4&e)for(let e=2,n=this.control.getPageCount();e<n;e+=2)t.addDirtyPages(e)}}getTypeFromIndex(t){return 0===t?"cover":t%2==0?"normal":"even"}getDecoratorInfo(t,e){return this.data.dec_info[t][e]}getMinDecoratorHeight(t){return"header"===t?this.getMinHeaderHeight():this.getMinFooterHeight()}getMinHeaderHeight(){return this.data.page_padding.top}getMinFooterHeight(){return this.data.page_padding.bottom}getMaxDecoratorHeight(t){return"header"===t?this.getMaxHeaderHeight():this.getMaxFooterHeight()}getMaxHeaderHeight(){return this.data.page_decorate_height}getMaxFooterHeight(){return this.data.page_decorate_height}getViewTypeFromIndex(t,e){return this.getDecoratorInfo(e,this.getTypeFromIndex(t)).view_type}getPageDecoratorHeight(t,e){return this.getDecoratorInfo(e,this.getTypeFromIndex(t)).view_height}getPageHeaderHeight(t){return this.getPageDecoratorHeight(t,"header")}getPageFooterHeight(t){return this.getPageDecoratorHeight(t,"footer")}getPageGap(){return this.data.page_gap}getPageGapTop(){return this.data.page_gap_top}getPageGapBottom(){return this.data.page_gap_bottom}getPageSize(t){return this.data.page_size}getPageHeight(t){return this.getPageSize(t).height}getPageWidth(t){return this.getPageSize(t).width}getPageFullHeight(t){return this.getPageHeight(t)+this.getPageGap()}getPageSettingPadding(t){return this.data.page_padding}getPagePadding(t){let e=this.getPageSettingPadding(t);return{left:e.left,top:this.getPageHeaderHeight(t),right:e.right,bottom:this.getPageFooterHeight(t)}}getPageContentSize(t){let e=this.getPageSize(t),n=this.getPagePadding(t);return{width:e.width-n.left-n.right,height:e.height-n.top-n.bottom}}getPageContentHeight(t){return this.getPageContentSize(t).height}getPageContentWidth(t){return this.getPageContentSize(t).width}}class mU{constructor(t){this.control=t,this.reset()}reset(){this.resetDirtyMap(),this.pages=[]}resetDirtyMap(){this.dirty_map=Object.create(null)}getPage(t){return this.pages[t]}ensurePage(t){return this.pages[t]||(this.pages[t]=this.createPage(t))}setPageDirty(t){this.dirty_map[t]=!0}createPage(t){return{subpages:[this.createSubPage(0,this.control.getPageControl().getPageContentHeight(t))],blockers:[],blocker_bottom:0}}createSubPage(t,e){return[t,e]}removeBlocker(t){let e=t.page_index,n=this.getPage(e);if(!n)return!1;let r=n.blockers,i=r.indexOf(t);return!(i<0)&&(r.splice(i,1),this.setPageDirty(e),!0)}addBlocker(t){let e=t.page_index,n=this.ensurePage(e).blockers,r=0,i=t.inner_top;for(;r<n.length;++r){let e=n[r];if(t===e)return!1;if(i<e.inner_top)break}return n.splice(r,0,t),this.setPageDirty(e),!0}update(){for(let t in this.dirty_map){t*=1;let e=this.getPage(t);if(!e)continue;let n=e.blockers,r=e.subpages=[],i=0,a=this.control.getPageControl().getPageContentHeight(t);for(let t=0,e=n.length;t<e;++t){let e=n[t];i>=e.inner_bottom||(i<=a&&(i<e.inner_top?r.push(this.createSubPage(i,e.inner_top)):0===i&&r.push(this.createSubPage(0,0))),i=e.inner_bottom)}i<a&&r.push(this.createSubPage(i,a)),e.blocker_bottom=i}this.resetDirtyMap()}}class mZ{constructor(t){this.control=t,this.pageStore=new mU(t),this.floatingRectMap=new Map,this.blockerMap=new Map}getBlocker(t){return this.blockerMap.get(t)}getPageBlocker(t){return this.pageStore.getPage(t)}ensurePageBlocker(t){return this.pageStore.ensurePage(t)}update(t){let{add:e,remove:n}=this.findChangedFloatingDrawingIds(t);this.updateFloatingDrawings(e,n),this.updateBlockers(t,e,n)}findChangedFloatingDrawingIds(t){let e=[];for(let n of t.getCollectedFloatingDrawings()){let t=n.getAttrValue("id");t&&e.push(t)}let n=new Set;t.getRootNode().queryChildNode("invisible",!0).forEach(t=>{let e=t.getAttrValue("id");e&&n.add(e)});let r=[];return t.getOldRootNode().queryChildNode("invisible",!0).forEach(t=>{let e=t.getAttrValue("id");e&&!n.has(e)&&r.push(e)}),{add:e,remove:r}}updateFloatingDrawings(t,e){for(let t of e)this.removeFloatingDrawing(t);for(let e of t)this.addFloatingDrawing(e)}addFloatingDrawing(t){this.removeFloatingDrawing(t);let e=this.control.pm.getPlugin("geometry").getGeometryInfo(t);if(!e)return;let n=e.getClientPaddingRect();this.floatingRectMap.set(t,{left:n.l,top:n.t,right:n.r,bottom:n.b})}removeFloatingDrawing(t){this.floatingRectMap.delete(t)}updateBlockers(t,e,n){if(t.isPageLayoutChanged()){for(let[e]of(this.pageStore.reset(),this.blockerMap))this.removeBlocker(t,e);for(let[e]of this.floatingRectMap)this.addBlocker(t,e);this.control.pm.getPlugin("floating")?.relocateAll()}else{for(let e of n)this.removeBlocker(t,e);for(let n of e)this.addBlocker(t,n)}this.pageStore.update()}addBlocker(t,e){this.removeBlocker(t,e);let n=this.floatingRectMap.get(e);if(!n)return;let r=this.createBlocker(e,n);this.blockerMap.set(e,r),t.addDirtyPages(r.page_index),this.pageStore.addBlocker(r)}removeBlocker(t,e){let n=this.blockerMap.get(e);n&&(this.blockerMap.delete(e),t.addDirtyPages(n.page_index),this.pageStore.removeBlocker(n))}createBlocker(t,e){let{index:n,inner:r}=this.control.pageIndexFromTop(e.top);return{id:t,rect:e,page_index:n,inner_top:r,inner_bottom:r+(e.bottom-e.top)}}}let m$=tt("ALL","PARTIAL","NONE"),mJ=tt("BLOCK","LOCAL","NONE");function mY(t){let e=sK.fly(t),n=e.getNode();return n&&n.type.isTableCell?{visible:!!n.state.display,row_span:t.rowSpan,isolated:!!e.getData("pagination_table_cell_isolated")}:null}function mX(t,e){return t.state.row_index+t.state.view_rowspan-e.state.row_index}class mQ{constructor(t){this.paginator=t,this.pm=t.pm,this.filler=new mK(this),this.table_filler=new m0(this),this.table_row_filler=new m1(this),this.table_cell_filler=new m2(this)}getFiller(t){let e=sK.fly(t).getNode();if(e)switch(e.type.name){case"table":return this.table_filler;case"table_row":return this.table_row_filler;case"table_cell":return this.table_cell_filler}return this.filler}updateSegmentInfo(t,e){return this.getFiller(t).updateSegmentInfo(...arguments)}splitDOM(t,e,n){return this.getFiller(t).splitDOM(...arguments)}mergeDOM(t,e,n,r,i){return this.getFiller(t).mergeDOM(...arguments)}trimResultDOM(t){return this.filler.trimResultDOM(t)}fillSpace(t,e,n,r){return this.getFiller(t).fillSpace(t,e,n,r)}fillPage(t,e,n){return void 0===n&&(n=m),this.getFiller(t).fillPage(t,e,n)}}class mK{constructor(t){this.control=t,this.pm=t.pm}_updateSegmentInfoSelf(t){sK.fly(t).updateContentSize()}_updateSegmentInfoNext(t,e){}updateSegmentInfo(t,e){if(this._updateSegmentInfoSelf(t),e!==t){for(let n=t,r=sK.fly(t).getNextSegment();r;n=r,r=sK.fly(r).getNextSegment())if(this._updateSegmentInfoSelf(r),this._updateSegmentInfoNext(n,r),r===e)return;if(e)throw Error("Given segments are not valid segment in order.")}}_splitDOM(t,e,n){let r=sK.fly(t).childContainer,i=r.cloneNode(!1),a=r,s=i;if(e){let t=[n||e];for(let n=e.nextSibling;n;n=n.nextSibling)t.push(n);s.append(...t)}for(;a!==t;){let t=a.parentNode,e=t.cloneNode(!1);for(let n=t.firstChild;n;n=n.nextSibling)n===a?e.appendChild(s):e.appendChild(n.cloneNode(!0));a=t,s=e}return sK.fly(s).setChildContainer(i),sK.fly(a).insertNextSegment(s),sK.fly(s).setClonedInfo(a),s}splitDOM(t,e,n){let r=this._splitDOM(t,e,n);this.updateSegmentInfo(t,r);let i=sK.fly(r).getNode();return i&&this.pm.getPlugin("draw").hookEvent(i,r),r}_mergeDOM(t,e,n,r){if(!e)return;let i=sK.fly(t).childContainer,a=[],s=n||e;if(r<0){for(let t=e.parentNode.firstChild;t!==e;t=t.nextSibling)a.push(t);a.push(s),i.append(...a)}else{a.push(s);for(let t=e.nextSibling;t;t=t.nextSibling)a.push(t);i.prepend(...a)}}mergeDOM(t,e,n,r,i){this._mergeDOM(t,n,r,i),i<0?this.updateSegmentInfo(t,e):this.updateSegmentInfo(e,t)}isSegmentEmpty(t){return!sK.fly(t).childContainer.firstChild}_shouldTrimSegment(t){return!sK.fly(t).isFirstSegment&&this.isSegmentEmpty(t)}shouldTrimSegment(t,e){if(e)return this._shouldTrimSegment(t);do if(!this._shouldTrimSegment(t))return!1;while(t=sK.fly(t).getNextSegment());return!0}trimNextSegment(t,e){let n=!1;for(let r=sK.fly(t).getNextSegment();r&&this.isSegmentEmpty(r)&&(sK.fly(t).removeNextSegment(),n=!0,!e);r=sK.fly(t).getNextSegment());return n}trimCurSegment(t,e){let n=sK.fly(t).getPrevSegment();return!!n&&this.trimNextSegment(n,e)}trimResultDOM(t,e){return t.type===m$.ALL&&!!this.trimCurSegment(t.dom,e)&&(t.dom=null,!0)}resolveChildTop(t){return t===mJ.NONE?mJ.LOCAL:t}resolveForceFit(t,e){return!!(t.top===mJ.BLOCK&&e.page_empty)}calcChildHeight(t){return t.type===mJ.NONE?0:sK.fly(t.dom).getHeight()}handleChildFillAll(t,e,n){t.type=m$.ALL;let r=this.trimResultDOM(e),{dom:i,parent:a}=t;i===a?e.dirty&&(t.dirty=!0):(r||this._mergeDOM(t.dom,e.dom,null,-1),t.dirty=!0)}handleChildFillNone(t,e,n){if(e.top!==mJ.NONE)t.type=m$.NONE;else{t.type=m$.PARTIAL;let{dom:n,parent:r}=t,i=e.dom;n===r?(t.merge?this.mergeDOM(t.merge,r,i,null,1):t.split=this.splitDOM(r,i),t.dirty=!0):t.dirty&&this.updateSegmentInfo(n,r)}}handleChildFillPartial(t,e,n){t.type=m$.PARTIAL;let{dom:r,parent:i}=t,{dom:a,split:s}=e;r===i?t.merge?s?(this.mergeDOM(t.merge,i,a,s,1),t.dirty=!0):a.nextSibling?(this.mergeDOM(t.merge,i,a.nextSibling,null,1),t.dirty=!0):e.dirty&&(this.updateSegmentInfo(i,sK.fly(e.merge).parentNode),t.dirty=!0):(t.split=s?this.splitDOM(i,a,s):this.splitDOM(i,a.nextSibling),t.dirty=!0):(s&&st(a,s),this.mergeDOM(r,i,a,null,-1),t.dirty=!0)}handleChildFill(t,e,n){switch(e.type){case m$.ALL:this.handleChildFillAll(t,e,n);break;case m$.NONE:this.handleChildFillNone(t,e,n);break;case m$.PARTIAL:this.handleChildFillPartial(t,e,n);break;default:throw Error(`Invalid filling type. ${e.type}`)}e.dom&&(t.space-=this.calcChildHeight(e))}_handleChildAction(t,e,n,r,i){let a=this.control.fillSpace(e,t.space,r,i);return i.check_top_type?(t.type=a.type,!0):(this.handleChildFill(t,a,i),t.type!==m$.ALL)}handleChildAction(t,e){let n=t.parent=t.dom,r=this.resolveChildTop(t.top),i=null,a=new s4(n,!0);for(;a.dom&&(t.parent!==a.parent&&(t.parent=a.parent,t.merge=sK.fly(a.parent).getNextSegment()),!this._handleChildAction(t,a.dom,t.space,r,e));)r=mJ.NONE,t.parent===n?(a.dom.parentNode||(a.dom=i||a.child_container.firstChild,a.ensureDOM()),i=a.dom,a.next()):(i=null,a.dom=a.child_container.firstChild,a.ensureDOM());t.parent=null}handleChildTrim(t,e){let n=t.dom;this.trimNextSegment(n),t.merge&&t.merge.parentNode||(t.merge=sK.fly(n).getNextSegment())}handleChild(t,e){this.handleChildAction(t,e),!e.check_top_type&&(this.handleChildTrim(t,e),t.type===m$.ALL&&t.dirty&&this.updateSegmentInfo(t.dom,t.merge))}handleSelf(t,e){let n=t.dom,r=this.resolveForceFit(t,e),i=sK.fly(n).getNode();if(!i||i.type.isLeaf){let e=sK.fly(n).getHeight();return r||e<=t.space?t.type=m$.ALL:t.type=m$.NONE,!0}return t.space-=sK.fly(n).getPaddingHeight(),!r&&t.space<0&&(t.type=m$.NONE,!0)}createResult(t,e,n,r){return{type:m$.ALL,dom:t,space:e,top:n,dirty:!1,merge:sK.fly(t).getNextSegment()}}fillSpace(t,e,n,r){let i=this.createResult(t,e,n,r);return this.handleSelf(i,r)||this.handleChild(i,r),i}fillPage(t,e,n){let r=sK.fly(t).getNode();if(r&&r.type.isPageBreak)return{...this.createResult(t,e,m$.ALL,n),page_break:!0};let i=this.control.fillSpace(t,e,mJ.BLOCK,n),a=i.split;return a&&st(t,a),i}}class m0 extends mK{_updateSegmentInfoSelf(t){super._updateSegmentInfoSelf(t),sK.fly(t).updatePaddingSize()}_updateSegmentInfoNext(t,e){super._updateSegmentInfoNext(t,e),sK.fly(e).updatePaddingSize()}calcChildHeight(t){return sK.fly(t.dom).updateTableRowSpanInfo(),super.calcChildHeight(...arguments)}handleChildFill(t,e,n){return e.table_dirty&&(t.dirty=!0),e.isolated_results&&e.isolated_results.length&&(t.update_segment=!0),super.handleChildFill(...arguments)}handleChild(t,e){super.handleChild(...arguments),e.check_top_type||t.type===m$.ALL&&!t.dirty&&t.update_segment&&this.updateSegmentInfo(t.dom,t.dom)}}class m1 extends mK{updateTableRowInfo(t){let e=t.dom;t.dirty?this.updateSegmentInfo(e):t.isolated_results.length&&this.updateSegmentInfo(e,e)}splitTableRow(t,e){let n=document.createDocumentFragment();return n.append(...e),this.splitDOM(t,n)}trimTableCellResultDOM(t){let e=t.dom;return!sK.fly(e).isFirstSegment&&((1===t.cell_row_span||this.shouldTrimSegment(e,!0))&&this.trimCurSegment(e,!0),se(e),t.dom=null,!0)}syncContent(t,e){let n=!1,r=0,i=sK.fly(t).childContainer,a=i.firstChild;for(;a;){let t=e.indexOf(a,r);if(t!==r&&(n=!0),t>=0){for(;r<t;++r)i.insertBefore(e[r],a);++r,a=a.nextSibling}else{let t=a.nextSibling;i.removeChild(a),a=t}}for(let t=e.length;r<t;++r)i.appendChild(e[r]),n=!0;return n}updateContent(t,e){let n=this.syncContent(t.dom,e.reduce(function(t,e){return e.dom&&t.push(e.dom),t},[]));return!t.dirty&&(n||e.some(t=>t.dirty))&&(t.dirty=!0),n}findContent(t,e,n,r){let i;void 0===r&&(r=m);let{find_isolated:a}=r,s=sK.fly(sK.fly(t).parentNode).getNode(),o=sK.fly(t).getNode(),l=0,h=!1,u=r=>{let o=mY(r);if(!o)return;if(o.isolated){i=r;return}let u=sK.fly(r).getNode().state.col_index;for(;l<u;)if(c(l))return!0;if(a&&!o.visible){let{row_index:o,col_index:l}=sK.fly(r).getNode().state,u=s.getDisplayCellNode(o,l);if(u.state.col_index===l){let s=a(t,r,u,i);if(s&&(!0===s||e.call(n,s,mY(s))))return h=!0}}if(e.call(n,r,o))return h=!0;++l},c=t=>{let e=sK.fly(o.child(t).dom).getLastSegment();return e.parentNode&&(e=this.control.splitDOM(e)),u(e)};if(sK.fly(t).forEachDOM(u,this,!0),!h){let t=o.childCount;for(;l<t&&!c(l););}}setupIsolatedTableCell(t,e){let n=mX(sK.fly(t).getNode(),sK.fly(e).getNode());return t.rowSpan!==n&&(t.rowSpan=n),sK.fly(t).setData("pagination_table_cell_isolated",!0),t}canTableCellMoveTo(t,e){if(sK.fly(t).isFirstSegment)return!1;let n=sK.fly(t).parentNode;if(!n||n===t||!aI(this.pm.content,t))return!0;let r=sK.fly(e).getOffset(),i=sK.fly(n).getOffset();if(r!==i)return r<i;for(;;){if(e=sK.fly(e).getPrevSegment(),n=sK.fly(n).getPrevSegment(),!e)return!0;if(!n)return!1}}findPrevIsolatedTableCell(t,e,n){let r;if(n&&sK.fly(n).getNode()===e){r=n;do r=sK.fly(r).getPrevSegment();while(this.canTableCellMoveTo(r,t))}else for(r=e.dom;;){let e=sK.fly(r).getNextSegment();if(e&&!this.canTableCellMoveTo(e,t))r=e;else break}return r}handleChildFillSpanned(t,e,n){t.spanned_results.some(t=>t.dirty)&&(t.table_dirty=t.dirty=!0)}handleChildFillAllTop(t,e,n){let r=t.dom;sK.fly(r).isLastSegment&&t.non_spanned_results.forEach(function(t){t.cell_isolated&&this.trimNextSegment(t.dom)},this),!sK.fly(r).isFirstSegment&&t.non_spanned_results.every(t=>this.shouldTrimSegment(t.dom,!0))&&e.forEach(this.trimTableCellResultDOM,this),this.updateContent(t,e),this.updateTableRowInfo(t)}handleChildFillAllNonTop(t,e,n){let r=t.dom,i=sK.fly(r).getNode(),a=[];if(this.findContent(r,function(t,e){a.push({dom:t})},this,{find_isolated:(t,e,n,r)=>(1===mX(n,i)&&a.push({dom:this.findPrevIsolatedTableCell(t,n,r),isolated:!0}),null)}),sK.fly(r).isLastSegment){let e=!1;a.forEach(function(t){t.isolated&&(this.trimNextSegment(t.dom),sK.fly(t.dom).getNextSegment()&&(e=!0))},this),e&&(sK.fly(r).isFirstSegment?t.type=m$.PARTIAL:t.type=m$.NONE)}t.type!==m$.ALL||sK.fly(r).isFirstSegment||(a.every(function(t){let e=t.dom;if(!t.isolated)return this.shouldTrimSegment(e,!0);{let t=sK.fly(e).getNextSegment();return!t||this.shouldTrimSegment(t)}},this)?(t.type=m$.ALL,e.forEach(this.trimTableCellResultDOM,this)):t.type=m$.NONE),t.type!==m$.NONE&&(this.updateContent(t,e),t.type===m$.PARTIAL?(t.split=this.splitTableRow(r,a.map(t=>{let e=t.dom;return t.isolated?(e=sK.fly(e).getNextSegment()||this.control.splitDOM(e),this.setupIsolatedTableCell(e,r)):e=this.control.splitDOM(e),e},this)),t.dirty=!0):this.updateTableRowInfo(t))}handleChildFillAll(t,e,n){t.type=m$.ALL,t.top!==mJ.NONE?this.handleChildFillAllTop(t,e,n):this.handleChildFillAllNonTop(t,e,n)}handleChildFillPartial(t,e,n){t.type=m$.PARTIAL,this.updateContent(t,e);let r=t.dom;t.merge?this.updateTableRowInfo(t):t.split=this.splitTableRow(r,e.map(t=>(t.cell_isolated?sK.fly(t.dom).getNextSegment():t.split)||this.control.splitDOM(t.dom),this))}handleChildFill(t,e,n){this.handleChildFillSpanned(t,e,n),t.non_spanned_results.every(t=>t.type===m$.ALL)?this.handleChildFillAll(t,e,n):this.handleChildFillPartial(t,e,n)}_handleChildAction(t,e,n,r,i,a){let{visible:s,row_span:o,isolated:l}=e,h=this.control.fillSpace(n,s?r:1/0,i,a);h.cell_visible=s,h.cell_row_span=o,h.cell_isolated=l,t.child_results.push(h),l&&t.isolated_results.push(h),1!==o?t.spanned_results.push(h):t.non_spanned_results.push(h)}handleChildAction(t,e,n){let{space:r,top:i}=t;t.child_results=[],t.isolated_results=[],t.spanned_results=[],t.non_spanned_results=[];let a=this.resolveChildTop(i);for(let i=0,s=e.length;i<s;++i){let s=e[i];this._handleChildAction(t,s.analysis,s.dom,r,a,n)}this.handleChildFill(t,t.child_results,n)}handleChildNone(t,e){t.type=m$.NONE}handleChild(t,e){let{dom:n,space:r,top:i}=t,a=this.resolveForceFit(t,e),s=e.check_top_type,o=!0,l;if(!a&&r<sK.fly(n).getData("table_row_min_height"))o=!1;else{let t,h;e.check_top_type=!0,i!==mJ.NONE&&(h=[],t=(t,e,n,r)=>{let i=this.findPrevIsolatedTableCell(t,n,r),a=sK.fly(i).getNextSegment();return a?this.setupIsolatedTableCell(a,t):(h.push(l.length),l.push({dom:i}),null)});let u=this.resolveChildTop(i);if(l=[],this.findContent(n,function(t,n){if((l.push({dom:t,analysis:n}),!a&&n.visible)&&this.control.fillSpace(t,r,u,e).type===m$.NONE)return o=!1,!0},this,{find_isolated:t}),!s&&o&&h&&h.length)for(let t=h.length-1;t>=0;--t){let e=l[h[t]];e.dom=this.setupIsolatedTableCell(this.control.splitDOM(e.dom),n),e.analysis=mY(e.dom)}e.check_top_type=s}if(s){t.type=o?m$.ALL:m$.NONE;return}o?this.handleChildAction(t,l,e):this.handleChildNone(t,e)}}class m2 extends mK{handleChildTrim(t,e){}}class m5{constructor(t){this.control=t,this.pm=t.pm,this.space_filler=new mQ(this),this._page_count=0,this.pages=[],this.bindEvents()}bindEvents(){this.control.bindEvent(this.pm.getPlugin("draw"),"afterRender",this.onEditAreaDrawAfterRender,this,{checker:"EditArea"}),this.control.bindEvent(this.pm.getPlugin("draw"),"childContainer",this.onEditAreaDrawChildContainer,this,{checker:"EditArea"})}onEditAreaDrawAfterRender(t,e,n){n.isTarget("major")&&(this.pages=[],this.ensurePageDOM(0))}onEditAreaDrawChildContainer(t,e,n){let r=this.pm.getPlugin("draw"),i=r.getPmElement(e).lastChild;if(!i)throw Error("There is no page element.");let a=r.getPmElement(i).childContainer;if(!i)throw Error("The page element must has a child container.");return a}getPageCount(){return this.pages.length}getPageDOM(t){return this.pages[t<0?this.getPageCount()+t:t||0]}ensurePageDOM(t){let e=this.getPageCount();if(t<e)return this.getPageDOM(t);let n=this.pm.doc.queryChildNode("EditArea",!0),r=n.type.createPseudoNode(n),i=this.pm.getPlugin("draw").getPmElement(n).childContainer;for(let n=e;n<=t;++n){let t=this.pm.getPlugin("draw").renderNode(r);sK.fly(t).setData("page_index",n);let e=n>=0?this.getPageDOM(n-1):null;e&&sK.fly(e).insertNextSegment(t),this.pages[n]=t,i.appendChild(t)}return this.getPageDOM(t)}ensurePageBlocker(t){return this.control.getBlockerControl().ensurePageBlocker(t)}_handlePage(t){let e=t.space_index,n=this.getPageDOM(e);sK.fly(n).setData("page_break",!1);let r=[],i=e===t.content_index,a=t.space_info.subpage_empty?t.space_info.padding:0,s=!1,o={page_empty:!1,subpage_empty:!1};for(;t.space_info;){let l,h;if(!t.dom){if(!t.ensureContent())break;i=e===t.content_index}let u=t.dom,{page_empty:c,subpage_empty:d,space:p}=t.space_info;o.page_empty=c,o.subpage_empty=d;let g=this.space_filler.fillPage(u,p,o),{type:f}=g,y=f===m$.PARTIAL||f===m$.ALL,x=f===m$.PARTIAL||f===m$.NONE;if(g.page_break?(sK.fly(n).setData("page_break",!0),t.nextSpace(!0),l=h=!0):x&&(t.nextSpace(),l=!t.space_info,h=!0),y&&t.nextContent(),!this.space_filler.trimResultDOM(g)){if(y&&(p-=sK.fly(u).getHeight()),!h){let e=t.space_info;e.space=p,e.page_empty=e.subpage_empty=!1}if(y&&(d?(sK.fly(u).setBlockerPadding(a),a=0):sK.fly(u).removeBlockerPadding()),x&&!l&&(a+=t.space_info.padding+p),i){if(l){for(let e=t.dom;e;e=e.nextSibling)r.push(e);t.dom=null,g.dirty&&(s=!0)}}else y&&r.push(u)}}return r.length&&(i?sK.fly(this.ensurePageDOM(e+1)).childContainer.prepend(...r):sK.fly(this.getPageDOM(e)).childContainer.append(...r)),!!r.length||s}handlePage(t,e){let n=t.length?t[t.length-1]:-1;if(e<=n)return;let r=new m4(this,e,n),i=e,a=e;for(;r.space_index<=a;){if(!r.dom){a=this.getPageCount()-1;break}let t=this._handlePage(r),{space_index:e,content_index:n}=r;r.ensureValue(),t&&(i=Math.min(i,e),a=Math.max(a,e===n?r.content_index:n))}if(a>=this.getPageCount())throw Error();for(let e=i;e<=a;++e)t.push(e)}trimEmptyPage(){let t=sK.fly(this.getPageDOM(-1));for(;!sy(t.childContainer);)t=sK.fly(t.getPrevSegment());let e=t.getData("page_index")+1,n=this.getPageCount();if(e!==n){for(let t=n-1;t>=e;--t)sK.fly(this.getPageDOM(t-1)).removeNextSegment();this.pages.length=e}let r=this._page_count;e!==r&&(this._page_count=e,this.pm.on.pageCountChange.dispatch(e,r))}updatePageContentHeight(t){for(let e=0,n=t.length;e<n;++e){let n=t[e],r=this.getPageDOM(n),i=0;sK.fly(r).forEachDOM(function(t){let e=sK.fly(t);i+=e.getHeight()+e.getBlockerPadding()}),sK.fly(r).setData("page_content_height",i),sK.fly(r).setData("page_content_bottom",Math.max(i,this.control.getPageBlocker(n).blocker_bottom))}}paginate(t){let e=[];if(t.isPagesAllDirty())for(let t=0;t<this.getPageCount();t=e[e.length-1]+1)this.handlePage(e,t);else for(let n of t.getDirtyPages())this.handlePage(e,n);if(e.length){if(e[e.length-1]===this.getPageCount()-1){this.trimEmptyPage();let t=this.getPageCount();for(let n=e.length-1;n>=0;--n)e[n]>=t&&(e.length=n)}this.updatePageContentHeight(e),this.control.updatePageOffsetHeightSum(),(t.update_page_decorate||t.update_decorators)&&this.pm.dispatchEvent("pageLayoutChange"),this.pm.dispatchEvent("paginate",e)}}}class m4{constructor(t,e,n){this.paginator=t,this.space_index=e,this.space_sub_index=0,this.space_info=null,this.content_index=e,this.dom=null,this.findLastSpace(e,n)}findLastSpace(t,e){let n,r,i,a;--t;let s=!1;for(let o=Math.max(0,e+1);t>=o;--t){let e=this.paginator.getPageDOM(t);if(sK.fly(e).getData("page_break"))break;if(!(a=sK.fly(e).childContainer.lastChild))continue;let o=sK.fly(e).getData("page_content_height"),l=this.paginator.ensurePageBlocker(t).subpages;for(n=l.length-1;n>=0;--n){let t=l[n];if(o>=t[0]){r=t[1]-o,i=0,sK.fly(a).getNextSegment()?(r+=sK.fly(a).getHeight(),i+=sK.fly(a).getBlockerPadding()):a=null,s=!0;break}}if(s)break}if(s||(++t,n=0,a=sK.fly(this.paginator.getPageDOM(t)).childContainer.firstChild),this.space_index=t,this.space_sub_index=n,this.content_index=t,this.dom=a,this.ensureValue(),s){let t=this.space_info;t&&(a&&(!a.previousSibling||sK.fly(a).getBlockerPadding())||(t.page_empty=t.subpage_empty=!1),t.space=r,t.padding=i),a&&(this.dom=a)}}updateSpace(){let t=null,e=this.space_index;if(e<this.paginator.getPageCount()){let n=this.paginator.ensurePageBlocker(e),r=n.subpages,i=this.space_sub_index,a=r[i];a&&(t={page_empty:!n.blockers.length,subpage_empty:!0,space:a[1]-a[0],padding:a[0]-(i?r[i-1][1]:0)})}return this.space_info=t}updateContent(){let t=null,e=this.paginator.getPageDOM(this.content_index);return e&&(t=sK.fly(e).childContainer.firstChild),this.dom=t}ensureSpace(){if(!this.space_info)for(let t=this.paginator.getPageCount();this.space_index<t&&!this.updateSpace();++this.space_index,this.space_sub_index=0);return this.space_info}ensureContent(){!this.dom&&++this.content_index;for(let t=this.paginator.getPageCount();this.content_index<t&&!this.updateContent();++this.content_index);return this.dom}ensureValue(){this.ensureSpace(),this.ensureContent()}nextSpace(t){let e=this.space_info;return e&&(t?this.space_sub_index=1/0:++this.space_sub_index,this.updateSpace()),e}nextContent(){let t=this.dom;return t&&(this.dom=this.dom.nextSibling),t}}class m8{constructor(t){this.control=t,this.pm=t.pm,this.paginated=!0,this.bindEvents()}bindEvents(){this.control.bindEvent(this.pm,"paginate",this.onPaginate,this,{priority:100}),this.control.bindEvent(this.pm,"beforePrint",this.onBeforePrint,this),this.control.bindEvent(this.pm,"afterPrint",this.onAfterPrint,this)}onPaginate(t){if(!this.isPaginatedMode()){for(let e=0,n=t.length;e<n;++e){let n=this.control.getPageDOM(t[e]);n.style.height=sK.fly(n).getData("page_content_bottom")+"px"}0===t[0]&&this.setupFirstPagePadding(),t[t.length-1]>=this.control.getPageCount()-1&&this.setupLastPagePadding()}}onBeforePrint(t,e){this.paginatedBefore=this.isPaginatedMode(),this.setPaginationMode(!0)}onAfterPrint(t,e){let n=this.paginatedBefore;null!=n&&(this.setPaginationMode(n),this.paginatedBefore=null)}setupFirstPagePadding(){let t=this.control.getPageDOM(0);if(!t)return;let e=t.firstChild;if(e)if(this.isPaginatedMode())t.style.paddingTop="",e.style.paddingTop="",e.style.marginTop="";else{let n=this.control.getPageControl().getPageSettingPadding(0).top;t.style.paddingTop=n+"px",e.style.paddingTop=n+"px",e.style.marginTop=-n+"px"}}setupLastPagePadding(){let t=this.control.getPageCount()-1,e=this.isPaginatedMode()?null:Math.max(0,this.control.getPageControl().getPageContentHeight(t)+this.control.getPageControl().getPageSettingPadding(t).bottom-sK.fly(this.control.getPageDOM(t)).getData("page_content_bottom"))+"px",n=this.pm.showDoc.queryChildNode("EditArea",!0);n.type.getPageFillingDOM(n.dom).style.height=e}_setPaginationMode(t){if(this.pm.content.classList[t?"remove":"add"]("syno-o-doc-pm-pagination-compress"),0===this.control.getPageCount())return;let e=t?this.control.getPageControl().getPageHeight(0):0;sK.fly(this.control.getPageDOM(0)).forAll(function(n){n.style.height=(t?e:sK.fly(n).getData("page_content_bottom"))+"px"},this),this.setupFirstPagePadding(),this.setupLastPagePadding()}setPaginationMode(t){if(null==t)t=!this.paginated;else if(t=!!t,this.paginated===t)return;this.paginated=t,this._setPaginationMode(t),this.pm.on.paginationModeChange.dispatch(t),this.pm.on.pageLayoutChange.dispatch()}isPaginatedMode(){return this.paginated}}let m3=new yG(class extends mz{constructor(t,e){super(t,e),this.pageManager=new mq(this),this.blockerManager=new mZ(this),this.paginatorManager=new m5(this),this.modeManager=new m8(this),this.disablePageGapClickHandler=e.disablePageGapClickHandler??!1,this.context=null}static get pluginName(){return"paginator"}static get pluginDependency(){return["draw","geometry"]}static get pluginSubscriptions(){return{paginate:new nP,paginationModeChange:new nP,pageCountChange:new nP,pageLayoutChange:new nP}}getPageControl(){return this.pageManager}getBlockerControl(){return this.blockerManager}getPaginator(){return this.paginatorManager}getModeControl(){return this.modeManager}createPaginateContext(t,e){return new mF(t,e)}getPaginateContext(){if(!this.context)throw Error("Context does not exist.");return this.context}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t,"startDraw",this.onStartDraw,this);let e=t.getPlugin("draw");function n(t){return(e,n,r,i)=>{r.isTarget("major")&&t(e,n,r,i)}}this.bindEvent(e,"change",this.onDecoratorChange,this,{checker:"Decorator"}),this.bindEvent(e,"change",this.onEditAreaChange,this,{checker:"EditArea"}),this.bindEvent(e,"afterRender",n(this.onDocumentDrawAfterRender.bind(this)),null,{checker:"Document"}),this.bindEvent(e,"afterRender",n(this.onPageDecorateDrawAfterRender.bind(this)),null,{checker:"PageDecorate"}),this.bindEvent(e,"afterRender",n(this.onDrawingDrawAfterRender.bind(this)),null,{checker:"Drawing"}),this.bindEvent(this.pm,"drawProgressive",this.onDrawProgressive,this),t.getPlugin("input:editor")&&!this.disablePageGapClickHandler&&this.bindEvent(t,"doubleClick",this.onDoubleClick,this),this.bindEvent(this.pm,"paginationModeChange",this.onPaginationModeChange,this,{priority:100})}onStartDraw(t,e){this.context=this.createPaginateContext(t,e)}onDocumentDrawAfterRender(t){this.getPaginateContext().update_doc=t}onPageDecorateDrawAfterRender(t){this.getPaginateContext().update_page_decorate=t}onDecoratorChange(t){let e=this.getPaginateContext();(e.update_decorators||(e.update_decorators=[])).push(t)}onDrawingDrawAfterRender(t){"break"===t.getAttrValue("config").alignment&&this.getPaginateContext().collectFloatingDrawings(t)}onEditAreaChange(t,e,n,r){let i=this.getPaginateContext();if(!i.isPagesAllDirty())if(r){let t=this.pm.getPlugin("draw"),n=t.getPmElement(e).firstChild;if(n)for(let e of r){let r=t.getPmElement(n).getContainingSegment(e);if(!r)continue;let a=t.getPmElement(r).getData("page_index");null!=a&&i.addDirtyPages(a)}}else i.setPagesAllDirty()}onDrawProgressive(t,e,n){let{first:r,last:i}=n,a=this.getPaginateContext();r&&(this.updatePageInfo(),this.updateSubpageInfo()),this.getPaginator().paginate(a),a.reset(),i&&(this.context=null)}onDoubleClick(t,e){if(e&&e.classList.contains("syno-o-doc-pm-edit-area-page-container"))return void this.setPaginationMode()}onPaginationModeChange(){this.updateIndicatorWrapperOffsets()}updatePageInfo(){let t=this.getPaginateContext();this.getPageControl().update(t),this.updateIndicatorWrapperOffsets()}updateSubpageInfo(){let t=this.getPaginateContext();this.getBlockerControl().update(t)}updateIndicatorWrapperOffsets(){let t=this.pm.doc.queryChildNode("EditArea",!0),e=this.pm.getPlugin("draw").getDom(t);if(!e)return;let n=t.type.getIndicatorWrapperDOM(e),{left:r,top:i}=this.resolvePaginatedMode()?this.getPageControl().getPagePadding(0):this.getPageControl().getPageSettingPadding(0);n.style.left=r+"px",n.style.top=i+"px"}resolvePageIndex(t,e){return(t<0&&(t=this.getPageCount()+t),e?.clampIndex)?tj(t,0,this.getPageCount()-1):t}getPageCount(){return this.getPaginator().getPageCount()}getPageDOM(t){return this.getPaginator().getPageDOM(t)}findResidingPageDOM(t){let e=eG(t)?t:t.parentElement;if(!e)return null;let n=this.pm.getPlugin("draw").getDrawnDom(this.pm.showDoc.queryChildNode("invisible",!0));if(!(n&&n.contains(e)))return e.closest(".syno-o-doc-pm-page");{let t=e.closest(".syno-o-doc-pm-drawing");if(!t)return null;let n=t.getAttribute("synograph");if(!n)return null;let r=this.getBlocker(n);return r?this.getPageDOM(r.page_index):null}}findResidingPageIndex(t){let e=this.findResidingPageDOM(t);return e?this.getPaginator().pages.indexOf(e):-1}getPagePadding(t,e){void 0===e&&(e=m),t=this.resolvePageIndex(t,e);let n=this.getPageControl();if(this.resolvePaginatedMode(e.forcePaginated))return n.getPagePadding(t);{let e=n.getPageSettingPadding(t),r=0,i=0,a=this.getPageCount();return a>0&&(0===t&&(r=e.top),t===a-1&&(i=e.bottom)),{left:e.left,top:r,right:e.right,bottom:i}}}getPageContentSize(t,e){void 0===e&&(e=m),t=this.resolvePageIndex(t,e);let n=this.getPageControl();if(this.resolvePaginatedMode(e.forcePaginated))return n.getPageContentSize(t);{let e=n.getPageContentSize(t),r=0,i=this.getPageCount();if(i>0){let n=this.getPageDOM(t);n&&(r=t===i-1?e.height:sK.fly(n).getData("page_content_bottom")??0)}return{width:e.width,height:r}}}getPageSize(t,e){void 0===e&&(e=m),t=this.resolvePageIndex(t,e);let n=this.getPageControl();if(this.resolvePaginatedMode(e.forcePaginated))return n.getPageSize(t);{let n=this.getPagePadding(t,e),r=this.getPageContentSize(t,e);return{width:r.width+n.left+n.right,height:r.height+n.top+n.bottom}}}getPageOffsets(t,e){return void 0===e&&(e=m),{x:0,y:this.topFromPageIndex(t,!0,{bound:e.clampIndex,forcePaginated:e.forcePaginated})}}}),m6=new yG(class extends yB{constructor(t,e){super(t,e),this.scheduler=this.createScheduler(),this.trimItems=!1,this.itemMap=new Map,this.floatingClassName=`${this.pm.schema.nodeType("doc").classPrefix}drawing-floating`,this.lastActiveDom=null}static get pluginName(){return"floating"}static get pluginDependency(){return["draw","geometry","image_loader","paginator"]}static get pluginSubscriptions(){return{floatingChange:new nP}}createScheduler(){return this.pm.createFlushScheduler({actions:{locateFloatings:{handler:this.handleChangedFloatingIds.bind(this),merger:this.mergeChangedFloatingIds.bind(this)},updateActiveFloating:{handler:t=>{this.updateActiveFloating(t||null)}}}})}ensureFloatingIdSet(t){if(!0===t){let t=new Set;return this.forEachFloatingNode(e=>{let n=e.getAttrValue("id");n&&t.add(n)}),t}return"string"==typeof t?new Set([t]):t}handleChangedFloatingIds(t){let e=this.ensureFloatingIdSet(t);this.forEachFloatingNode(t=>{let n=t.getAttrValue("id");if(!n||!e.has(n))return;let r=this.pm.getPlugin("draw").getDrawnDom(t);if(!r)return;let i=this.pm.getPlugin("geometry").getGeometryInfo(n);i&&"absolute"===i.getAnchoryType()&&this.locateFloating(n,t,r,i)})}mergeChangedFloatingIds(t,e){if(!0===t||!0===e)return!0;{let n;return!e&&t&&t instanceof Set?t:(n=e?e instanceof Set?e:new Set([e]):new Set,t instanceof Set?t.forEach(n.add,n):n.add(t),n)}}scheduleLocateFloatings(t){let e;(e=t instanceof rV?t.getAttrValue("id")||"":t)&&this.scheduler.schedule("locateFloatings",e)}scheduleUpdateActiveFloating(t){this.scheduler.schedule("updateActiveFloating",t||!1)}bindEvents(){super.bindEvents();let t=this.pm,e=t.getPlugin("draw");this.bindEvent(e,"redraw",this.onEditAreaDrawRedraw,this,{checker:"EditArea"}),this.bindEvent(e,"change",this.onDrawingDrawChange,this,{checker:"Drawing"}),this.bindEvent(t,"pageCountChange",this.onPageCountChange,this),this.pm.getPlugin("line")&&this.bindEvent(t,"lineDomUpdate",this.onLineDomUpdate,this),this.bindEvent(e,"change",this.onFloatingContainerChange,this,{checker:"Invisible"}),this.bindEvent(t,"draw",this.onDraw,this),this.bindEvent(t,"paginationModeChange",this.onPaginationModeChange,this),t.getPlugin("status")&&this.bindEvent(t,"statusChange",this.onStatus,this),t.getPlugin("input:editor")&&this.bindEvent(t,"beforeMouseDown",this.onBeforeMouseDown,this);let n=t.getPlugin("input_mouse");n&&n.addMouseHandler({mouseDown:(t,e)=>this.onMouseSelect(e),contextMenu:(t,e)=>this.onMouseSelect(e)})}onEditAreaDrawRedraw(){this.scheduleLocateFloatings(!0)}onDrawingDrawChange(t){this.scheduleLocateFloatings(t)}onPageCountChange(t,e){let n=Math.min(t,e),r=Math.max(t,e)-1;this.forEachFloatingNode(t=>{let e=t.getAttrValue("id");if(!e)return;let i=this.getFloatingItem(e);if(!i)return;let a=i.pageIndex;a>=n&&a<=r&&this.scheduleLocateFloatings(t)})}onLineDomUpdate(t){let e=this.pm.getPlugin("draw").getDrawnDom(this.pm.doc.queryChildNode("invisible",!0));if(!e)return;let n=new Set;for(let r of t){if(!e.contains(r))continue;let t=sp(r,e);if(!t)continue;let i=t.getAttribute("synograph");i&&n.add(i)}this.scheduleLocateFloatings(n)}onFloatingContainerChange(){this.trimItems=!0}onDraw(){this.trimItems&&(this.trimFloatingItems(),this.trimItems=!1)}onPaginationModeChange(t){t&&this.itemMap.forEach((t,e)=>{let{clientInfo:n}=this.getLocationData(t.info);this.updateFloatingItem(e,{...t,clientInfo:n})})}onStatus(t){let e=t.operation.object,n=e.adapted||e.top_adapted?e.sel_top:null;this.onTopDrawingSelectionChange(n)}onTopDrawingSelectionChange(t){let e=t&&t.isMultiBreakGraphSelection?t.getRange().node:null;this.scheduleUpdateActiveFloating(e)}onBeforeMouseDown(t){if(!this.pm.getPlugin("input:editor").getEventHandler("mousedown").isMouseActionEnabled()||t.defaultPrevented)return;let e=t.target;if(!e||!eG(e))return;let n=e.closest(".syno-o-doc-pm-text-box")?.closest(".syno-o-doc-pm-drawing-floating");if(!n||!n.parentElement?.classList.contains("syno-o-doc-graph-container"))return;let r=null,i=n.getAttribute("synograph");i&&this.pm.showDoc.queryChildNode("invisible",!0).forEach(t=>{if(t.getAttrValue("id")===i)return r=t,!0},null,!0),r&&this.updateActiveFloating(r)}onMouseSelect(t){return!!t.closest(".syno-o-doc-graph-container")}clearFloatingItem(t){let e=this.getFloatingItem(t);e&&e.dom&&e.dom.remove()}getFloatingItem(t){return t?this.itemMap.get(t):void 0}updateFloatingItem(t,e){e?this.itemMap.set(t,e):this.itemMap.delete(t),this.pm.dispatchEvent("floatingChange",t,e&&e.clientInfo)}setFloatingItem(t,e){this.clearFloatingItem(t),this.updateFloatingItem(t,e)}deleteFloatingItem(t){this.clearFloatingItem(t),this.updateFloatingItem(t,null)}getFloatingClientGeometryInfo(t){let e=this.getFloatingItem(t);return e?this.pm.getPlugin("paginator").isPaginatedMode()?e.clientInfo:this.getLocationData(e.info).clientInfo:null}getFloatingDom(t){return this.getFloatingItem(t)?.dom||null}forEachFloatingInfo(t,e){this.itemMap.forEach((n,r)=>{t.call(e,n.info,r)})}forEachFloatingNode(t){let{node:e,offset:n}=this.pm.doc.queryChild("invisible",!0),r=n+1;e.forEach((e,n)=>t(e,r+n),null,!0)}relocateAll(){this.scheduleLocateFloatings(!0)}getLocationData(t){let e=this.pm.getPlugin("paginator"),n=t.getClientPaddingRect(),r=e.pageIndexFromTop(n.t,!1);return{pageIndex:r.index,pageInner:r.inner,clientInfo:t.translate(0,e.convertTopByIndex(r,!1)-n.t)}}getFloatingContainer(t){let e=this.pm.getPlugin("paginator").getPageDOM(t);return e?this.pm.schema.nodeType("page").getGraphContainerDOM(e):null}insertFloating(t,e,n){let r=n.getZOrder();e.setAttribute("data-graph-order",String(r));for(let n=t.firstElementChild;n;n=n.nextElementSibling){let i=parseInt(n.getAttribute("data-graph-order")||"",10);if(!isNaN(i)&&r<i)return void t.insertBefore(e,n)}t.appendChild(e)}cloneFloating(t,e,n){let r=e.cloneNode(!0),i=r.ownerDocument.createElement(r.tagName.toLowerCase());for(let e of(["synograph","class","style"].forEach(t=>{i.setAttribute(t,r.getAttribute(t)||"")}),i.classList.remove(`${this.floatingClassName}-active`),i.append(...r.childNodes),i.querySelectorAll(".syno-o-pm-plugin-indicator-wrapper").forEach(t=>{t.remove()}),this.pm.getPlugin("indicator")?.clearIndicators(i),this.pm.getPlugin("formatting_marks")?.maybeHideClonedFormattingMarks(t,i),i.querySelectorAll("[pm-offset],[pm-size],[pm-container]")))e.removeAttribute("pm-offset"),e.removeAttribute("pm-size"),e.removeAttribute("pm-container");let a=i.querySelector(".syno-o-doc-pm-text-box-area");if(a){for(let t of a.querySelectorAll("[pointer-events]"))t.removeAttribute("pointer-events");Array.prototype.forEach.call(a.children,t=>{t.style.pointerEvents="none"})}let s=n.getDrawingSchema();if("shape"===s||"picture"===s){for(let t of(this.pm.getPlugin("image_loader").loadDescendant(i),i.querySelectorAll("clipPath[id]")))this.pm.getPlugin("shape").getShapeRenderer("picture").drawImageClipId(t.parentNode,n,{});for(let t of i.querySelectorAll("mask[id]"))this.pm.getPlugin("shape").getShapeRenderer("picture").drawStrokeMaskId(t.parentNode,n,{})}return this.pm.getPlugin("draw").hookEvent(t,i),i}locateFloating(t,e,n,r){if(!n.firstChild)return;ne(n,{classList:[this.floatingClassName],inline_style:{display:""}});let{pageIndex:i,pageInner:a,clientInfo:s}=this.getLocationData(r),o=s.getClientPaddingRect().l,l=null,h=this.getFloatingContainer(i);h&&(e7(l=this.cloneFloating(e,n,s),{left:o+"px",top:a+"px"}),this.insertFloating(h,l,s)),this.setFloatingItem(t,{info:r,clientInfo:s,pageIndex:i,dom:l})}trimFloatingItems(){let t=Object.create(null);this.forEachFloatingNode(e=>{let n=e.getAttrValue("id");n&&(t[n]=!0)}),this.forEachFloatingInfo((e,n)=>{t[n]||this.deleteFloatingItem(n)})}updateActiveFloating(t){let e=t?this.pm.getPlugin("draw").getDrawnDom(t):null;e&&!this.setupActiveFloatingDom(e)&&(e=null),this.setActiveFloatingDom(e)}setupActiveFloatingDom(t){let e=this.getFloatingClientGeometryInfo(t.getAttribute("synograph"));if(!e)return!1;let{l:n,t:r}=e.getClientPaddingRect();return e7(t,{left:n+"px",top:r+"px"}),!0}setActiveFloatingDom(t){let e=this.lastActiveDom;if(t===e)return;this.lastActiveDom=t;let n=`${this.floatingClassName}-active`;e&&e.classList.remove(n),t&&t.classList.add(n)}});class m7{constructor(t){}computeScale(t,e,n){let{width:r,height:i}=t,{width:a,height:s}=e,o=n*tu,l=Math.abs(Math.sin(o)),h=Math.abs(Math.cos(o)),u=a*h+s*l,c=a*l+s*h;return u&&c?Math.min(r/u,i/c):0}computeTransformMatrixString(t,e,n){return nC.create().rotate(n,t.width/2,t.height/2).translate((t.width-e.width)/2,(t.height-e.height)/2).toString()}onClone(t){}}class m9 extends m7{constructor(t=m){super(t),this.imageLoader=t.imageLoader,this.fadedIntensity=t.fadedIntensity??.3,this.fadedBrightness=t.fadedBrightness??.35,this.serialNumber=0}computeColorMatrixString(t,e){let n=1+-t*(1-e);return[t,0,0,0,n,0,t,0,0,n,0,0,t,0,n,0,0,0,1,0].join(" ")}computeImageSize(t,e){let{config:{angle:n,imageWidth:r,imageHeight:i,scale:a}}=t,s=a||this.computeScale(e,{width:r,height:i},n);return{width:r*s,height:i*s}}getNextFilterId(){return`filter_${this.serialNumber++}`}create(t,e){let{config:{angle:n,fileId:r,faded:i}}=t;if(!r)return null;let a=this.computeImageSize(t,e),s=i?this.getNextFilterId():"";return na(["svg",{width:"100%",height:"100%"},i?["filter",{id:s,x:0,y:0,width:"100%",height:"100%",filterUnits:"objectBoundingBox",primitiveUnits:"objectBoundingBox"},["feColorMatrix",{type:"matrix",values:this.computeColorMatrixString(this.fadedIntensity,this.fadedBrightness),"color-interpolation-filters":"sRGB"}]]:null,["g",{filter:i?`url(#${s})`:null,transform:this.computeTransformMatrixString(e,a,n)},["image",{width:a.width,height:a.height,preserveAspectRatio:"none"},t=>{this.imageLoader?.call(null,t,r)}]]])}onClone(t){let e=t.querySelector("filter");if(!e)return;let n=this.getNextFilterId();e.id=n;let r=t.querySelector("[filter]");r&&r.setAttribute("filter",`url(#${n})`)}}class vt extends m7{constructor(t=m){super(t),this.textSizeComputer=t.textSizeComputer}computeFontSyle(t,e){return`400 ${Math.max(Math.floor(np(e,"pt","px")),1)}px "${t.replaceAll('"',"")}"`}computeTextSize(t,e){return this.textSizeComputer?this.textSizeComputer.call(null,t,e):null}computeFontSize(t,e){let{config:{angle:n,content:r,fontFamily:i,fontSize:a}}=t;if(a)return a;let s=this.computeTextSize(r,this.computeFontSyle(i,108));return s?108*this.computeScale(e,s,n):0}computeSizeInfo(t,e){let{config:{content:n,fontFamily:r}}=t,i=this.computeFontSize(t,e);if(!i)return null;let a=this.computeFontSyle(r,i),s=this.computeTextSize(n,a);return s?{fontStyle:a,size:s}:null}create(t,e){let{config:{angle:n,content:r,opacity:i,color:a}}=t;if(!r)return null;let s=this.computeSizeInfo(t,e);if(!s)return null;let{fontStyle:o,size:l}=s;return na(["svg",{width:"100%",height:"100%"},["g",{transform:this.computeTransformMatrixString(e,l,n)},["text",{x:0,y:-1*sS(o).top,fill:a,opacity:i,"text-rendering":"geometricPrecision",inline_style:{font:o,"white-space":"pre"}},r]]])}}let ve=new yG(class extends yB{constructor(t,e){super(t,e),this.pageSynchronizer=this.syncPages.bind(this),this.watermarkCreators=this.buildWatermarkCreatorMap(e),this.serialVersion=0,this.watermarkInfo=null}static get pluginName(){return"watermark"}static get pluginDependency(){return["draw","image","paginator"]}static get pluginSubscriptions(){return{watermarkSettingsChange:new nP}}buildWatermarkCreatorMap(t){return{image:new m9({fadedIntensity:t.fadedIntensity,fadedBrightness:t.fadedBrightness,imageLoader:(t,e)=>{this.pm.getPlugin("image").loadImageDom(t,"foreground",e)}}),text:new vt({textSizeComputer:(t,e)=>sR(t,{font:e})})}}bindEvents(){super.bindEvents();let t=this.pm,e=t.getPlugin("draw");this.bindEvent(e,"render",this.onPageDrawRender,this,{checker:"Page"}),t.getPlugin("page_view")?(this.bindEvent(e,"afterRender",this.onSettingsDrawAfterRender,this,{checker:"Settings"}),this.bindEvent(t,"pageLayoutChange",this.onPageLayoutChange,this),this.bindEvent(t,"pageSync",this.onPageSync,this)):this.bindEvent(t,"paginate",this.onPaginate,this),t.getPlugin("page_clone")&&this.bindEvent(t,"pageClone",this.onPageClone,this)}onPageDrawRender(t,e,n){n.isTarget("display")&&this.ensureWatermarkWrapper(t)}onSettingsDrawAfterRender(t,e,n){n.isTarget("major")&&(this.updateWatermarkSettingsAll(),this.requestSyncPages())}onPageLayoutChange(){this.updateWatermarkWrapperVersionAll(),this.requestSyncPages()}onPageSync(t,e){this.syncPages(t,e)}onPaginate(){this.updateWatermarkWrapperVersionAll(),this.updateWatermarkSettingsAll(),this.syncAll()}onPageClone(t){for(let e of t.querySelectorAll(`.${this.pluginClassPrefix}page-wrapper`)){let t=e.firstElementChild;if(t)for(let e in this.watermarkCreators)this.watermarkCreators[e].onClone(t)}}getNextSerialVersion(){return String(this.serialVersion++)}isCurrentSection(t){return!0}getSectionId(t){return"_"}getSectionSettings(t){return this.pm.doc.queryChildNode("settings",!0).getAttrValue("finalSection")}getSectionWatermarkInfo(t){return this.getSectionId(t)?this.watermarkInfo||(this.watermarkInfo={wrapperVersion:this.getNextSerialVersion(),settings:null,settingsVersion:this.getNextSerialVersion()}):null}updateWatermarkWrapperVersion(t){let e=this.getSectionWatermarkInfo(t);e&&(e.wrapperVersion=this.getNextSerialVersion())}updateWatermarkWrapperVersionAll(){return this.updateWatermarkWrapperVersion(void 0)}computeWatermarkSettings(t){let e=p0.getEmptyValue();if(!e)return null;let n=this.getSectionSettings(t)?.watermark;return n?{...e,...n,config:{...e.config,...n.config}}:null}updateWatermarkSettings(t){let e=this.getSectionWatermarkInfo(t);if(!e)return;let n=this.computeWatermarkSettings(t);!dw(n,e.settings)&&(e.settings=n,e.settingsVersion=this.getNextSerialVersion(),this.isCurrentSection(t)&&this.pm.dispatchEvent("watermarkSettingsChange",e.settings))}updateWatermarkSettingsAll(){return this.updateWatermarkSettings(void 0)}createWatermarkWrapper(){return na(["div",{class:`${this.pluginClassPrefix}page-wrapper`}])}ensureWatermarkWrapper(t){let e=this.pm.getPlugin("draw").getPmElement(t,!0),n=e.getData("watermark_dom");if(n)return n;let r=this.pm.schema.nodeType("page").queryDom(t,".syno-o-doc-pm-page-body");if(!r)return null;let i=this.createWatermarkWrapper();return e.setData("watermark_dom",i),r.prepend(i),i}createWatermark(t){let e=this.getWatermarkSettings(t);if(!e)return null;let n=e.type;return"none"===n?null:this.watermarkCreators[n].create(e,this.pm.getPlugin("paginator").getPageContentSize(t))}requestSyncPages(t){this.pm.getPlugin("page_view")?.requestSyncPages(this.pageSynchronizer,t)}getWatermarkSettings(t){let e=this.getSectionWatermarkInfo(t);return e?e.settings:null}syncAll(){this.syncPages(0,1/0)}syncPages(t,e){t=Math.max(t,0),e=Math.min(e,this.pm.getPlugin("paginator").getPageCount());for(let n=t;n<=e;++n)this.syncPage(n)}syncPage(t){let e=this.pm.getPlugin("paginator").getPageDOM(t);if(!e)return;let n=this.ensureWatermarkWrapper(e);if(!n)return;let r=this.pm.getPlugin("draw").getPmElement(e,!0),i=this.getSectionWatermarkInfo(t);r.syncData("watermark_wrapper_version",i?i.wrapperVersion:"")&&this.syncWatermarkWrapper(t,n),r.syncData("watermark_settings_version",i?i.settingsVersion:"")&&this.syncWatermark(t,n)}syncWatermarkWrapper(t,e){let n=this.pm.getPlugin("paginator"),{width:r,height:i}=n.getPageContentSize(t),{left:a,top:s}=n.getPagePadding(t);Object.assign(e.style,{left:a+"px",top:s+"px",width:r+"px",height:i+"px"})}syncWatermark(t,e){e8(e);let n=this.createWatermark(t);n&&e.append(n)}});class vn extends yB{getSelectionRect(t,e){let n,r=t.selection();if(t.isSpecial||t.is("BreakGraph")||t.is("InlineNode")){let e=[];if(t.is("BreakGraph")){let t=this.pm.getPlugin("floating")?.getFloatingDom(r.node.attrs.id);t&&e.push(t)}else if(t.is("InlineNode")){let n=t.selection().node.dom;for(;!sK.fly(n).isUnwrappedInlineElement&&n.firstChild;)n=n.firstChild;e.push(n)}else if(t.isMultiCellSelection){let n=t.$table,r=t.headIndex,i=this.pm.dompos.DOMFromPos(n.pos+1+n.self.getDisplayCellOffset(r.row,r.col));e.push(sa(i.node,i.offset))}else t.isMultiFloatingSelection?t.forEachBox(function(t,n){let r=t.getSvgElementNode();r?e.push(r.type.getSvgDOM(r.dom)):(r=t.getTextBlockNode(),e.push(r.type.getEditableAreaDOM(r.dom)))}):t.isMultiSlideSelection?t.forEach(function(t){e.push(t.node.getBackgroundNode().dom)}):t.forEach(function(t){e.push(t.node.dom)});if(e.length){n=a_.createSmallest();for(let t=e.length-1;t>=0;--t){let r=e[t];this.pm.ensureDOMVisible(r,!0)&&(n=a_.expand(n,r.getBoundingClientRect()))}}}else{let i=t.isMultiTextSelection?t.bias:1,a=r.is("Text")?r.getSidePos(e?.textRangeSide||"head"):r.$from,s=this.pm.dompos.DOMFromPos(a.pos,!1,i);if(this.pm.ensureDOMVisible(s.node,!0)&&(n=this.pm.dompos.cursorAtDOM(s.node,s.offset,{bias:i,useClientCoords:!0}),e&&e.fix_line_height&&iN.checkAvailable(a))){let t=sK.fly(s.node.nodeType===s.node.ELEMENT_NODE?s.node:s.node.parentNode);for(;!t.isLineElement;)t=sK.fly(t.parentNode);let e=t.dom.getBoundingClientRect();n.top=e.top,n.bottom=e.bottom}}return n}}function vr(t){if(t===t.ownerDocument.body)return{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};{let e=t.getBoundingClientRect(),n={x:(e.left+e.right)/2,y:(e.top+e.bottom)/2},r=t.clientWidth/2,i=t.clientHeight/2;return{left:n.x-r,top:n.y-i,right:n.x+r,bottom:n.y+i}}}function vi(t,e,n,r,i){var a;let s,o,l=i?.side??0,{horizontal:h,vertical:u}=function(t){let e,n,r=t?t.split("-"):void 0;return r?(r.includes("left")?e="left":r.includes("right")&&(e="right"),r.includes("top")?n="top":r.includes("bottom")&&(n="bottom"),{horizontal:e,vertical:n}):{horizontal:void 0,vertical:void 0}}(i?.edge),{horizontal:c,vertical:d}="boolean"==typeof(a=i?.force)?{horizontal:a,vertical:a}:"horizontal"===a?{horizontal:!0,vertical:!1}:"vertical"===a?{horizontal:!1,vertical:!0}:{horizontal:!1,vertical:!1};return l>=0&&(h&&c?s=h:t.left<e.left+n?s=h??"left":t.right>e.right-n&&(s=h??"right")),l<=0&&(u&&d?o=u:t.top<e.top+n?o=u??"top":t.bottom>e.bottom-n&&(o=u??"bottom")),{x:s?va(t,e,r,s):0,y:o?va(t,e,r,o):0}}function va(t,e,n,r){return t[r]-e[r]+n*("left"===r||"top"===r?-1:1)}function vs(t){return isNaN(t)?0:tj(t,-1e9,1e9)}async function vo(t,e,n){let r=t===t.ownerDocument.body?t.ownerDocument.scrollingElement:t;if(r)return vl(t,null==e?e:e-r.scrollLeft,null==n?n:n-r.scrollTop)}async function vl(t,e,n){e=vs(e??0),n=vs(n??0),(e||n)&&(t===t.ownerDocument.body?window.scrollBy(e,n):(e&&(t.scrollLeft+=e),n&&(t.scrollTop+=n)))}async function vh(t,e,n,r){let{dom:i}=t;return vo(i,e,n)}async function vu(t,e,n,r){let{dom:i}=t;return vl(i,e,n)}async function vc(t,e,n){let{dom:r,threshold:i,margin:a}=t,s=vi(e,vr(r),i,a,n);return vl(r,s.x,s.y)}let vd=function(){return tm.Date.now()};var vp=Math.max,vg=Math.min;let vf=function(t,e,n){var r,i,a,s,o,l,h=0,u=!1,c=!1,d=!0;if("function"!=typeof t)throw TypeError("Expected a function");function p(e){var n=r,a=i;return r=i=void 0,h=e,s=t.apply(a,n)}function g(t){var n=t-l,r=t-h;return void 0===l||n>=e||n<0||c&&r>=a}function f(){var t,n,r,i=vd();if(g(i))return y(i);o=setTimeout(f,(t=i-l,n=i-h,r=e-t,c?vg(r,a-n):r))}function y(t){return(o=void 0,d&&r)?p(t):(r=i=void 0,s)}function x(){var t,n=vd(),a=g(n);if(r=arguments,i=this,l=n,a){if(void 0===o)return h=t=l,o=setTimeout(f,e),u?p(t):s;if(c)return clearTimeout(o),o=setTimeout(f,e),p(l)}return void 0===o&&(o=setTimeout(f,e)),s}return e=tO(e)||0,tf(n)&&(u=!!n.leading,a=(c="maxWait"in n)?vp(tO(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),x.cancel=function(){void 0!==o&&clearTimeout(o),h=0,r=l=i=o=void 0},x.flush=function(){return void 0===o?s:y(vd())},x},vy=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw TypeError("Expected a function");return tf(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),vf(t,e,{leading:r,maxWait:e,trailing:i})};function vx(t){t.stopPropagation()}function vm(t,e){return e in t&&"number"==typeof t[e]}class vv extends vn{constructor(t,e){super(t,e),this.defaultScrollerResizeObserver=new ResizeObserver(vy(()=>{this.onDefaultScrollerResize()},16)),this.defaultScrollerInfo=function(t){return"dom"in t?{dom:t.dom,threshold:t.threshold??0,margin:t.margin??5}:{dom:t,threshold:0,margin:5}}(e.defaultScrollerInfo??this.pm.root.body),this.scrollClientSize={width:0,height:0},this.scrollOffsets={x:0,y:0}}static get pluginName(){return"scroll"}static get pluginSubscriptions(){return{scrollClientSizeChange:new nP,scrollOffsetsChange:new nP,scroll:new nP}}destroy(){this.defaultScrollerResizeObserver.disconnect(),super.destroy()}bindEvents(){super.bindEvents();let{dom:t}=this.getDefaultScrollerInfo();this.defaultScrollerResizeObserver.observe(t),this.bindEvent(t,"scroll",this.onDefaultScrollerScroll,this,{passive:!0}),this.updateScrollClientSize(),this.updateScrollOffsets();let e=this.pm.getPlugin("draw");e&&this.bindEvent(e,"event",this.onIndependentScrollerDrawEvent,this,{checker:"IndependentScroller"})}onDefaultScrollerResize(){this.updateScrollClientSize()}onDefaultScrollerScroll(){this.updateScrollOffsets(),this.pm.dispatchEvent("scroll")}onIndependentScrollerDrawEvent(t,e){e.addEventListener("wheel",vx),e.addEventListener("mousewheel",vx)}getDefaultScrollerInfo(){return this.defaultScrollerInfo}getActiveScrollerInfo(t){void 0===t&&(t=this.pm.selection.$from);let e=t.findNode("IndependentScroller");if(!e)return this.getDefaultScrollerInfo();let n=this.pm.getPlugin("draw")?.getDom(e);if(!n)return null;let r=e.type.getScrollerInfo(n);return r?{dom:r.dom,threshold:r.threshold??this.getDefaultScrollerInfo().threshold,margin:r.margin??this.getDefaultScrollerInfo().margin}:null}updateScrollClientSize(){let{dom:t}=this.getDefaultScrollerInfo(),e=this.scrollClientSize,n={width:t.clientWidth,height:t.clientHeight};(e.width!==n.width||e.height!==n.height)&&(this.scrollClientSize=n,this.pm.dispatchEvent("scrollClientSizeChange",n,e))}updateScrollOffsets(){let{dom:t}=this.getDefaultScrollerInfo(),e=this.scrollOffsets,n={x:t.scrollLeft,y:t.scrollTop};(e.x!==n.x||e.y!==n.y)&&(this.scrollOffsets=n,this.pm.dispatchEvent("scrollOffsetsChange",n,e))}getScrollClientSize(){return this.scrollClientSize}getScrollOffsets(){return this.scrollOffsets}async scroll(t,e){if("number"==typeof t)return this.scrollWithSelection(iN.create(this.pm.doc,t).toMultiSelection(),e);if("object"==typeof t){if(!t)return;if(t instanceof iV)return this.scrollWithSelection(t,e);if("getBoundingClientRect"in t)return this.scrollWithClientRect(t.getBoundingClientRect(),e);if(vm(t,"right")||vm(t,"bottom"))return this.scrollWithClientRect(t,e);else if(vm(t,"x")||vm(t,"y"))return this.scrollBy(t.x??0,t.y??0,e);else if(vm(t,"left")||vm(t,"top"))return this.scrollTo(t.left,t.top,e)}}async scrollTo(t,e,n){let r=this.getActiveScrollerInfo();if(r)return vh(r,t,e,n)}async scrollBy(t,e,n){let r=this.getActiveScrollerInfo();if(r)return vu(r,t,e,n)}async scrollWithClientRect(t,e){let n=this.getActiveScrollerInfo();if(n)return vc(n,t,e)}async scrollWithSelection(t,e){if(!this.isSelectionScrollable(t))return;let n=this.getActiveScrollerInfo();if(!n)return;let r=this.getSelectionRect(t,e);if(r){if("document"===this.pm.schema.name&&(!e||!e.edge)){let n=t.isMultiTextSelection&&t.getRange().$from.parent;n&&n.type.isHeadingBlock&&n.getAttrValue("headingId")&&(e={...e,edge:"top"})}return vc(n,r,e)}}isSelectionScrollable(t){return!t.is("Cell")||"editor"!==this.pm.getMode()}shouldScroll(t,e,n,r,i){let a=vi(t,e,n,r,i);return!!(a.x||a.y)}getScrollerRect(t){return vr(t)}}let vb=new yG(class extends vv{constructor(t,e){super(t,e)}isSelectionScrollable(t){return!(t.is("PageNumber")||t.is("CustomText"))&&super.isSelectionScrollable(t)}});class vw extends yB{constructor(t,e){super(t,e),this.fitLevelName=e.fitLevelName||"fit",this.minValue=e.minValue??.1,this.maxValue=e.maxValue??5,this.valuePrecision=e.valuePrecision??3,this.doComputeFitZoomValue=e.computeFitZoomValue||(()=>1),this.fitZoomValue=1,this.zoomLevel="100",this.zoomValue=1;let n=e.defaultLevel&&this.computeZoomData(e.defaultLevel);n&&(this.zoomLevel=n.level,this.zoomValue=n.value)}static get pluginName(){return"zoom"}static get pluginSubscriptions(){return{zoomLevelChange:new nP,zoomValueChange:new nP}}getFitZoomValue(){return this.fitZoomValue}getZoomLevel(){return this.zoomLevel}getZoomValue(){return this.zoomValue}isZoomLevelFit(t){return(t||this.getZoomLevel())===this.fitLevelName}clampZoomValue(t,e){return void 0===e&&(e=this.valuePrecision),t=tj(t,this.minValue,this.maxValue),"number"==typeof e&&Number.isFinite(e)&&(t=xL(t,e)),t}computeLevelZoomValue(t){let e="number"==typeof t?t:parseInt(t,10)/100;return this.clampZoomValue(e)}computeZoomData(t){if("string"==typeof t&&this.isZoomLevelFit(t))return{level:t,value:this.getFitZoomValue()};{let e=this.computeLevelZoomValue(t);return isNaN(e)?null:{level:String(Math.round(100*e)),value:e}}}setZoomLevel(t){let e=this.computeZoomData(t);if(!e)return;let{level:n,value:r}=e,i=this.getZoomLevel(),a=this.getZoomValue();this.zoomLevel=n,this.zoomValue=r,n!==i&&this.pm.dispatchEvent("zoomLevelChange",n,i),r!==a&&this.pm.dispatchEvent("zoomValueChange",r,a)}updateFitZoomValue(){let t=this.clampZoomValue(this.doComputeFitZoomValue.call(null));!isNaN(t)&&this.fitZoomValue!==t&&(this.fitZoomValue=t,this.isZoomLevelFit()&&this.setZoomLevel(this.fitLevelName))}}let vM=new yG(class extends vw{constructor(t,e){super(t,e)}}),v_=tt("SELECTION_CURSOR","SELECTION_OVERLAY","COLLAB_CURSOR","DROP_CURSOR","SPELLING_OVERLAY");class vA{constructor(){this.doms=[],this.hidden=!1}static get indicatorType(){return"cursor"}static get indicatorName(){return""}get dom(){return this.doms[0]}isVisible(){return!this.hidden}setVisible(t){let e=this.hidden,n=this.hidden=!(null==t?this.hidden:t);e!==n&&this.forEach(t=>{t.classList[n?"add":"remove"]("ProseMirror-indicator-hide")})}show(){return this.setVisible(!0)}hide(){return this.setVisible(!1)}clear(){this.forEach(se,d)}forEach(t,e,n){let r=this.doms;for(let i=0,a=r.length;i<a;++i){let a=t.call(e,r[i]);if(n&&null!=a)return a}}get className(){return`ProseMirror-indicator-${this.constructor.indicatorType}-${this.constructor.indicatorName}`}get classStr(){return`ProseMirror-non-printable ProseMirror-indicator ProseMirror-indicator-${this.constructor.indicatorType} ProseMirror-indicator-${this.constructor.indicatorName} ${this.className}`}create(){return S()}setup(t,e){return S()}generate(t){return this.setup(t.dom||this.create(),t)}_add(t){return this.doms.push(t),t}add(t){return this._add(this.generate(t))}static getIndicatorCls(t){switch(t){case v_.SELECTION_CURSOR:return vI;case v_.SELECTION_OVERLAY:return vP;case v_.COLLAB_CURSOR:return vT;case v_.DROP_CURSOR:return vk;case v_.SPELLING_OVERLAY:return vL;default:throw Error(`Unknown indicator type. ${t}`)}}static create(t){return new(this.getIndicatorCls(t))}}class vS extends vA{static get indicatorType(){return"cursor"}get isCursor(){return!0}create(){return na(["div",{class:this.classStr}])}setup(t,e){let n=e.rect;return t.style.left=Math.round(n.left)-1+"px",t.style.top=n.top+"px",t.style.width="2px",t.style.height=n.bottom-n.top+"px",t}}class vC extends vA{static get indicatorType(){return"overlay"}get isOverlay(){return!0}create(){return na(["div",{class:this.classStr}])}setup(t,e){let n=e.rect;return t.style.left=n.left+"px",t.style.top=n.top+"px",t.style.width=n.right-n.left+"px",t.style.height=n.bottom-n.top+"px",t}}class vI extends vS{static get indicatorName(){return"selection"}create(){return na(["div",{class:this.classStr},["svg",{class:this.className+"-svg"},["rect",{class:this.className+"-rect",width:"100%",height:"100%"}]]])}setup(t,e){return(t=super.setup(t,e)).firstChild.firstChild.setAttribute("fill",e.color||"#000"),t}}class vP extends vC{static get indicatorName(){return"selection"}}class vT extends vS{constructor(t){super(),this.onLabelHide=t?.onLabelHide,this.label_dom=null,this.label_hidden=!0,this.label_delay_task=new O(this.hideLabel.bind(this))}static get indicatorName(){return"collab"}_add(t){return this.label_dom=t.lastChild,super._add(t)}addLabel(t){return this._add(this.generateLabel(t))}showLabel(){this.label_delay_task.cancel(),this.label_dom&&this.label_hidden&&(this.label_hidden=!1,this.label_dom.style.display="block")}hideLabel(){this.label_delay_task.cancel(),this.label_dom&&!this.label_hidden&&(this.label_hidden=!0,this.label_dom.style.display="",this.onLabelHide?.call(null))}delayHideLabel(t){this.label_dom&&!this.label_hidden&&this.label_delay_task.delay(t)}syncLabelState(t){t.label_hidden?this.hideLabel():this.showLabel(),t.label_delay_task.isDelaying()&&this.label_delay_task.delay(t.label_delay_task.getRemainingTime())}_createLabel(){return na(["div",{class:this.className+"-label"}])}createLabel(){return na(["div",{class:this.classStr},this._createLabel()])}create(){return na(["div",{class:this.classStr},["div",{class:this.className+"-caret"}],["div",{class:this.className+"-head"}],this._createLabel()])}_setupLabel(t,e){return t.style.backgroundColor=e.color||"#000",t.innerText=e.name||"",t}setupLabel(t,e){let n=e.rect;t.style.left=n.left-3.5+"px",t.style.top=n.top-3.5+"px",t.style.width="0px",t.style.height="0px";let r=t.lastChild;return this._setupLabel(r,e),r.style.left="0px",t}setup(t,e){t=super.setup(t,e);let n=e.color||"#000";return t.firstChild.style.backgroundColor=n,t.firstChild.nextSibling.style.backgroundColor=n,this._setupLabel(t.lastChild,e),t.addEventListener("mouseover",()=>{this.showLabel()}),t.addEventListener("mouseout",()=>{this.delayHideLabel(3e3)}),t}generateLabel(t){return this.setupLabel(t.dom||this.createLabel(),t)}}class vk extends vS{static get indicatorName(){return"drop"}}class vL extends vC{static get indicatorName(){return"spelling"}create(){return na(["div",{class:this.classStr},["svg",{class:this.className+"-svg"},["rect",{class:this.className+"-rect",width:"100%",height:"100%",fill:"url(#ProseMirror-indicator-overlay-spelling-style-pattern)"}]]])}}let vD=tt("SELECTION","COLLAB","DROP","SPELLING");class vR{constructor(t){this.control=t,this.pm=t.pm,this._indicator_data=null,this._pending_data=null}static get controlType(){return S()}onTrigger(){let t=this._indicator_data;t&&!this._pending_data&&t.sel.doc===this.pm.doc&&this._trigger(t)}onClear(){this.clear()}getIndicatorData(){return this._indicator_data}getIndicator(){let t=this.getIndicatorData();return t&&t.indicator}canUpdate(t){return t.sel.doc===this.pm.doc&&t.update}boundSelection(t){return t.insideEditor?{sel:t,update:!1}:null}_show(t){t.indicator&&t.indicator.show()}show(){let t=this.getIndicatorData();t&&this._show(t)}_hide(t){t.indicator&&t.indicator.hide()}hide(){let t=this.getIndicatorData();t&&this._hide(t)}_clear(t){t.indicator&&t.indicator.clear(),this._indicator_data=null,this._pending_data=null}clear(){let t=this.getIndicatorData();t&&this._clear(t)}_trigger(t){this._pending_data=t,this.pm.ensureOperation()}trigger(){}_draw(t){let e=t.options;e&&e.onDraw&&e.onDraw(t)}draw(){let t=this._pending_data;null!=t&&(this._pending_data=null,this._draw(t))}_update(t){null==this._pending_data&&this.canUpdate(t)&&this._trigger(t)}update(){let t=this.getIndicatorData();t&&this._update(t)}_create(t,e){let n=this.boundSelection(t)||m;return{indicator:n.sel&&this.createIndicator(n.sel,e),update:!!n.update,sel:t,options:e}}create(t,e){return t.doc!==this.pm.doc?null:this._create(t,e)}initIndicator(t){let e;switch(this.constructor.controlType){case vD.SELECTION:e=t?v_.SELECTION_OVERLAY:v_.SELECTION_CURSOR;break;case vD.COLLAB:e=v_.COLLAB_CURSOR;break;case vD.DROP:e=v_.DROP_CURSOR;break;case vD.SPELLING:e=v_.SPELLING_OVERLAY;break;default:throw Error(`Unknown indicator control type. ${this.constructor.controlType}`)}return vA.create(e)}createIndicator(t,e){return t.isMultiCellSelection?this.createTableCellIndicator(...arguments):t.isMultiListSelection?this.createListIndicator(...arguments):t.insideEditor?this.createTextIndicator(...arguments):void 0}createTextIndicator(t,e){return t.selection().empty?this.createTextCursor(t,e):this.createTextOverlay(t,e)}getCursorMarks(t,e){return t.doc.marksAt(t.pos)}fixTextCursorRect(t,e,n){let r=sK.fly(t.dom.nodeType===t.dom.ELEMENT_NODE?t.dom:t.dom.parentElement);for(;r&&!r.isLineElement;)r=sK.fly(r.parentNode);if(!r)return null;let i=r.childContainer.firstChild;n.side=-1;let a=this.pm.dompos.rectAtDOM(i,n).top,s=window.getComputedStyle(i),o=-sS({family:s.fontFamily,size:ng(s.fontSize,"pt")}).top,l=this.getCursorMarks(e,n),h=this.pm.schema,u=function(t,e){let n=t.markType("font_size"),r=n.isInSet(e);return r?r.getValue():n.getDefaultValue()}(h,l),c=h.markType("superscript").isInSet(l);(!c||!c.getValue())&&((c=h.markType("subscript").isInSet(l))&&c.getValue()||(c=null));let d=c?c.type.scriptType:"",p=d?sC({size:u},d):0,g=np(u,"pt","px");c&&(g*=c.type.fontSizeRatio);let f=Math.floor(g),y=Math.floor(1.2*g),x=sS({size:np(g,"px","pt")});return t.bottom=Math.floor(a+o+p+x.bottom-(-x.top+x.bottom-f)/2+(y-f)/2),t.top=t.bottom-y,t}calcTextCursorRect(t,e){void 0===e&&(e=m);let n=t.selection().$head,r=e.dom_result||this.pm.dompos.DOMFromPos(n.pos,!1,{bias:null!=e.bias?e.bias:t.bias});if(!this.pm.ensureDOMVisible(r.node,e.force_visible))return null;let i={bias:-1,side:1,residingPmEditor:t.$editor},a=this.pm.dompos.cursorAtDOM(r.node,r.offset,i);return this.fixTextCursorRect(a,n,i)}createTextCursor(t,e){let n=this.initIndicator(!1),r=this.calcTextCursorRect(t,e);if(r){let i=this.pm.schema.marks.color.isInSet(this.getCursorMarks(t.$head())),a=i&&i.getValue(),s=t.$editor.self;s.is("TextBox")&&r.left<1&&(r.left=1,r.right=1),s.type.getIndicatorWrapperDOM(s.dom).appendChild(n.add(Object.assign({rect:r,color:a},e)))}return n}createTextOverlay(t,e){void 0===e&&(e=m);let n=this.initIndicator(!0),r=this.pm,i={side:1,residingPmEditor:t.$editor},{$from:a,$to:s}=t.selection().getExpandedRange(),o=a.pos,l=s.pos,h=(function(t,a){if(t.type.isTable)return sK.fly(t.dom).forAll(function(e){t.type.getIndicatorWrapperDOM(e).appendChild(n.add({rect:{left:0,top:0,right:t.state.width,bottom:sK.fly(e).getContentHeight()}}))},this),!1;if(t.type.isTextblock){let s=t.type.isHolderParagraph,h=sK.fly(t.dom).getData("line_count")??0;return sK.fly(t.dom).forEachElement(function(t,u){let c=sK.fly(t),d=c.childContainer,p=c.getOffset(),g=c.getSize(),f=u===h-1,y=a+1+p,x=y+g;if(!s){if(x<o||x===o&&!f)return;else if(y>=l)return!0}let m={top:0,bottom:c.getContentHeight()};if(d.firstChild){if(y>=o||s)m.left=sK.fly(t).getData("inline_content_range")[0]-sK.fly(t).getData("line_content_range")[0];else{let e=r.dompos.DOMFromOffset(t,o-y);m.left=r.dompos.cursorAtDOM(e.node,e.offset,i).left-sK.fly(t).getData("text_rect_info").left}if(x<=l||s){let t=d.lastChild;m.right=t.offsetLeft+t.offsetWidth,e.extend_line_end&&(f&&x<l||sK.fly(t).getNodeType()?.is("HardBreak"))&&(m.right+=6)}else{let e=r.dompos.DOMFromOffset(t,l-y);m.right=r.dompos.cursorAtDOM(e.node,e.offset,i).left-sK.fly(t).getData("text_rect_info").left}}else m.left=m.right=0;r.schema.nodes.text_line.getIndicatorWrapperDOM(t).appendChild(n.add(Object.assign({rect:m},e)))},this,!0),!1}}).bind(this),u=a.commonDepth(s),c=a.node(u),d=a.start(u);return c.type.isTextblock?h(c,d-1):c.nodesInside(a.pos-d,s.pos-d,h,{start:d,preset:"editor"}),n}createTableCellIndicator(t,e){void 0===e&&(e=m);let n=this.initIndicator(!0);return t.forEachDisplayCell(function(t,r,i,a){let s=t.state.text_rect_info.width+12;sK.fly(t.dom).forAll(function(r){t.type.getIndicatorWrapperDOM(r).appendChild(n.add(Object.assign({rect:{left:0,top:0,right:s,bottom:sK.fly(r).getContentHeight()}},e)))},this)},this),n}createListIndicator(t,e){let n=this.initIndicator(!0),r=this.pm.schema.nodeType("text_line");return t.forEachList(t=>{let i=sK.fly(t.dom).firstChild,a=sK.fly(i).getData("inline_range")[0]-sK.fly(i).getData("line_content_range")[0],s={left:a,top:0,right:a+sK.fly(i).getData("list_item_width")||0,bottom:sK.fly(i).getContentHeight()};r.getIndicatorWrapperDOM(i).appendChild(n.add(Object.assign({rect:s},e)))}),n}}class vN extends vR{constructor(t){super(t),this.control.bindEvent(this.pm,"activeMarkChange",this.onTrigger,this),this.control.bindEvent(this.pm,"selectionChange",this.onTrigger,this),this.control.bindEvent(this.pm,"draw",this.onTrigger,this)}static get controlType(){return vD.SELECTION}onTrigger(){this.trigger()}trigger(t){let e,n=this._pending_data;e=t&&null!=n&&n!==m?Object.assign(Object.create(null),n.options,t):t?{options:t}:n||m,this._trigger(e)}_draw(t){let e=this.pm.multiSelection,n=Object.assign({extend_line_end:!0},t.options);!this.pm.on.beforeDrawSelection.dispatch(e,n)&&(this.clear(),this.pm.on.drawingSelection.dispatch(e,n)||(this._indicator_data=this.create(e,n)),this.pm.on.drawSelection.dispatch(e,n),(t=this._indicator_data)&&super._draw(t))}getCursorMarks(t,e){return this.pm.getActiveMarks()}}class vO extends vR{constructor(t){super(t),this._indicator_data_map=new Map,this._pending_data_map=new Map}static get controlType(){return vD.COLLAB}onTrigger(){this._indicator_data_map.forEach(function(t){this._pending_data_map.has(t.id)||t.sel.doc!==this.pm.doc||this._trigger(t)},this)}onClear(){this._indicator_data_map.forEach(this._clear,this)}getIndicatorData(t){return this._indicator_data_map.get(t)}boundSelection(t){if(t.insideEditor)if(t.isMultiTextSelection){let e=t.selection();e.empty||(t=e.collapse().toMultiSelection())}else t=iR.findNear(t.$from(),1,!0).toMultiSelection();return super.boundSelection(t)}showLabel(t){this.getIndicatorData(t)?.indicator?.showLabel()}hideLabel(t){this.getIndicatorData(t)?.indicator?.hideLabel()}delayHideLabel(t,e){this.getIndicatorData(t)?.indicator?.delayHideLabel(e)}show(t){let e=this.getIndicatorData(t);e&&this._show(e)}hide(t){let e=this.getIndicatorData(t);e&&this._hide(e)}_clear(t){super._clear(t);let e=t.id;this._indicator_data_map.delete(e),this._pending_data_map.delete(e)}clear(t){let e=this.getIndicatorData(t);e?this._clear(e):this._pending_data_map.delete(t)}_trigger(t){this._pending_data_map.set(t.id,t),this.pm.ensureOperation()}trigger(t,e,n){this._trigger({id:t,sel:e,options:n})}_draw(t){let e=t.id,n=this.getIndicatorData(e)?.indicator;this.clear(e),(t=this.create(t.sel,t.options))&&(t.indicator&&n&&t.indicator.syncLabelState(n),t.id=e,this._indicator_data_map.set(e,t),super._draw(t))}draw(){super.draw();let t=this._pending_data_map;t.forEach(this._draw,this),t.clear()}_update(t){this._pending_data_map.has(t.id)||super._update(t)}update(){this._indicator_data_map.forEach(this._update,this)}}class vj extends vR{static get controlType(){return vD.DROP}boundSelection(t){if(t.insideEditor)if(t.isMultiTextSelection){let e=t.selection();e.empty||(t=e.collapse().toMultiSelection())}else t=iR.findNear(t.$from(),1,!0).toMultiSelection();return super.boundSelection(t)}clear(t){return t||this.control.getSelectionControl().show(),super.clear()}trigger(t,e){this._trigger({sel:t,options:e})}_draw(t){this.clear(!0),this.control.getSelectionControl().hide(),this._indicator_data=this.create(t.sel,t.options),(t=this._indicator_data)&&super._draw(t)}}class vE extends vR{constructor(t){super(t),this.control.pm.getPlugin("hidden_region").add("indicator_spelling",()=>na(["svg",{class:`${this.control.pluginClassPrefix}spelling-style-svg`},["defs",null,["pattern",{id:"ProseMirror-indicator-overlay-spelling-style-pattern",width:4,height:3,patternUnits:"userSpaceOnUse"},this.createSvgStyleSpellingPath(),this.createSvgStyleSpellingPath({transform:"translate(0 1)",stroke:"#EE0000"})]]]))}static get controlType(){return vD.SPELLING}createSvgStyleSpellingPath(t){return na(["path",t=Object.assign({d:"M 0 0 L 2 2 L 4 0",fill:"none",stroke:"rgba(255, 255, 255, 0.8)","stroke-width":1,"stroke-linecap":"square","stroke-linejoin":"round"},t)])}trigger(){}_draw(t){}draw(){}update(){}}class vV extends yB{constructor(t,e){super(t,e),this.selection_control=this.createSelectionControl(),this.collab_control=this.createCollabControl(),this.drop_control=this.createDropControl(),this.spelling_control=this.createSpellingControl(),this._update_indicator=!1}static get pluginName(){return"indicator"}static get pluginDependency(){return["hidden_region","draw"]}destroy(){super.destroy(),this.getSelectionControl().onClear(),this.getCollabControl().onClear(),this.getDropControl().onClear(),this.getSpellingControl().onClear()}createSelectionControl(){return new vN(this)}createCollabControl(){return new vO(this)}createDropControl(){return new vj(this)}createSpellingControl(){return new vE(this)}getSelectionControl(){return this.selection_control}getCollabControl(){return this.collab_control}getDropControl(){return this.drop_control}getSpellingControl(){return this.spelling_control}bindEvents(){super.bindEvents();let t=this.pm;"editor"===t.getMode()&&this.bindEvent(t,"flush",this.onFlush,this)}onFlush(){Promise.resolve().then(()=>{if(!this.pm.isViewSync())return void this.pm.ensureFlush();this.drawIndicator()})}triggerUpdateIndicator(t){this._update_indicator=!0,!1!==t&&this.pm.ensureOperation()}drawIndicator(){this._update_indicator&&(this.getSelectionControl().update(),this.getCollabControl().update(),this.getDropControl().update()),this.getSelectionControl().draw(),this.getCollabControl().draw(),this.getDropControl().draw(),this.pm.dispatchEvent("drawIndicator")}clearIndicators(t){t.querySelectorAll(".ProseMirror-indicator").forEach(t=>{t.remove()})}createSpelling(t,e){return this.getSpellingControl().createIndicator(t,e)}}let vB={canUpdate:function(t,e){if(!t.call(this,e))return!1;if(this.pm.schema.isDocument&&this.pm.getPlugin("page_display")){let t=e.view_page;if(t){let e=this.pm.getPlugin("page_view").getPageViewInfo();if(t.start.index<=e.start.index&&t.end.index>=e.end.index)return!1}}return!0},boundSelection:function(t,e){if(this.pm.schema.isDocument&&this.pm.getPlugin("page_display")){if(e.isMultiPageNumberSelection)return null;if(e.insideEditor&&!e.isMultiCellSelection&&e.$editor.self.type.isEditArea){let t,n,r=this.pm.getPlugin("paginator"),i=null,a=this.pm.getPlugin("page_view").getPageViewInfo(),s=a.start.index,o=a.end.index;for(;s<=o;++s){let e=sK.fly(r.getPageDOM(s)).childContainer;if(e.firstChild){t=e;break}}if(t){for(;s<=o;--o){let t=sK.fly(r.getPageDOM(o)).childContainer;if(t.firstChild){n=t;break}}let a=this.pm.dompos.posFromDOM(t.firstChild)?.pos,l=this.pm.dompos.posFromDOM(n,sy(n))?.pos,h=e.selection(),{from:u,to:c}=h;if(a<=c&&u<=l){let t,n;u<a&&(t=iR.findFrom(this.pm.doc.resolve(a),1,!0).$from),c>l&&(n=iR.findFrom(this.pm.doc.resolve(l),-1,!0).$to),i=t||n?iN.createResolved(t||iR.findFrom(h.$from,1,!0).$from,n||iR.findFrom(h.$to,-1,!0).$to).toMultiSelection():e}}return{sel:i,update:i!==e}}}return t.call(this,e)},_create:function(t,e,n){let r=t.call(this,e,n);return this.pm.schema.isDocument&&this.pm.getPlugin("page_display")&&(r.view_page=this.pm.getPlugin("page_view").getPageViewInfo()),r},createIndicator:function(t,e,n){return e.isMultiBreakGraphSelection?this.createBreakGraphIndicator(e,n):t.call(this,e,n)},createBreakGraphIndicator:function(t,e,n){let r=this.initIndicator(),i=this.pm.getPlugin("paginator");if(i){let t=e.selection(),a=i.getBlockerObj(t.node.attrs.id);if(a){let e=a.page_index;if(e<i.getPageCount()){let s=i.topFromPageIndex(e,!0),o=i.getPagePadding(e).left,l=a.rect,h=t.doc.queryChildNode("EditArea",!0);h.type.getIndicatorWrapperDOM(h.dom).appendChild(r.add(Object.assign({rect:{left:l.left-o,top:s+l.top,right:l.right-o,bottom:s+l.bottom}},n)))}}}return r}},vz={use_super:!0};for(let t in vB)Object.prototype.hasOwnProperty.call(vB,t)&&function(t,e,n,r){if(void 0===r&&(r=m),r.use_super){let r=b;for(let n=t;n;n=Object.getPrototypeOf(n)){let t=Object.getOwnPropertyDescriptor(n,e);if(t){"function"==typeof t.value&&(r=t.value);break}}let i=n;n=function(){return i.call(this,r,...arguments)}}t[e]=n}(vR.prototype,t,vB[t],vz);vR.useFloatingHighlight=!1;class vF extends vN{constructor(t){super(t),this.control.bindEvent(this.pm,"paginationModeChange",this.onTrigger,this)}boundSelection(t){if(t.isMultiInlineNodeSelection){let e=t.node();if(e.type.isChart||e.type.isImage||e.type.is("Drawing"))return null}return super.boundSelection(t)}}class vG extends vO{constructor(t){super(t),this.control.bindEvent(this.pm,"paginationModeChange",this.onTrigger,this)}boundSelection(t){return t.isMultiBreakGraphSelection?{sel:t,update:!1}:super.boundSelection(t)}}class vH extends vj{constructor(t){super(t),this.control.bindEvent(this.pm,"paginationModeChange",this.onTrigger,this)}}class vW extends vE{}let vq=new yG(class extends vV{constructor(t,e){super(t,e)}createSelectionControl(){return new vF(this)}createCollabControl(){return new vG(this)}createDropControl(){return new vH(this)}createSpellingControl(){return new vW(this)}bindEvents(){super.bindEvents();let t=this.pm;t.getPlugin("page_display")&&this.bindEvent(t,"pageViewChange",this.onPageViewChange,this)}onPageViewChange(t,e){e&&e.start.index<=t.start.index&&e.end.index>=t.end.index||this.triggerUpdateIndicator()}}),vU=1;class vZ extends yB{constructor(t,e){super(t,e)}static get pluginGroupName(){return"page_decorator"}static get pluginDependency(){return["draw","paginator","image_loader"]}bindEvents(){super.bindEvents();let t=this.pm.getPlugin("draw");this.bindEvent(t,"change",this.onDecoratorDrawChange,this,{checker:"Decorator"})}onDecoratorDrawChange(t){this.advanceDecoratorVersion(t)}advanceDecoratorVersion(t){let e=this.pm.getPlugin("draw").getDrawnDom(t);return!!e&&(sK.fly(e).setData("version",vU),++vU,!0)}syncAll(){return this.syncPages(0,1/0)}syncView(){let t=this.pm.getPlugin("page_view");if(!t)return this.syncAll();this.syncPages(...t.getPageViewIndexRange())}syncPages(t,e){let n=this.pm.getPlugin("paginator");if(n.isPaginatedMode()){t=Math.max(t,0),e=Math.min(e,n.getPageCount()-1);for(let n=t;n<=e;++n)this.syncPage(n)}}syncPage(t){let e=this.pm.getPlugin("paginator"),n=e.getPageDOM(t);if(!n)return;let r=this.pm.showDoc,i=r.queryChildNode("PageDecorate",!0),a=r.queryChildNode("EditArea",!0).type.pseudoType,s=e.getPageControl(),o=s.getTypeFromIndex(t);go.forEach(r=>{let l,h,u="page_num"===r,c=s.getDecoratorInfo(r,o),d=c.view_type,p=a.getDecoratorDOM(n,r),g=sK.fly(p).getData("version");if(d&&(l=gc(i,r,d).node,h=sK.fly(l.dom).getData("version")),g===h&&(!u||c.view_pos===sK.fly(p).getData("view_pos")))return;if(e8(p),d){let n=this.cloneDecoratorDom(l);if(n){if(u){let r=c.view_pos,a=Object.create(null);if("t"===r[0]){let t=gc(i,"header",d).node;a.top=t.type.getTopPaddingHeight(t)+"px",a.bottom=null}else{let t=gc(i,"footer",d).node;a.top=null,a.bottom=t.type.getBottomPaddingHeight(t)+"px"}"l"===r[1]?(a.left=null,a.right=e.getPagePadding(t).right+s.getPageContentWidth(t)+"px"):(a.left=e.getPagePadding(t).left+s.getPageContentWidth(t)+"px",a.right=null),Object.assign(p.style,a),(e5(n)||n).appendChild(document.createTextNode(String(t+ +!i.getAttrValue("num-cover"))))}p.appendChild(n)}}let f=sK.fly(p);u&&f.setData("view_pos",c.view_pos),f.setData("version",h)})}cloneDecoratorDom(t){let e=this.pm.getPlugin("draw").getDrawnDom(t);if(!e)return null;let n=null;if(t.is("HeaderFooter")){n=t.type.getEditableAreaDOM(e).cloneNode(!0);let r=t.type.decoratorType;n.classList.remove("syno-o-doc-pm-"+r+"-padding"),n.classList.add("syno-o-doc-pm-page-"+r+"-padding"),n.firstChild.classList.add("syno-o-doc-pm-page-"+r+"-container")}else t.is("PageNumber")&&((n=t.type.getEditableAreaDOM(e).cloneNode(!0)).classList.add("syno-o-doc-pm-page-page-number-padding"),n.firstChild.style.height="");return n?(this.pm.getPlugin("indicator")?.clearIndicators(n),this.pm.getPlugin("formatting_marks")?.maybeHideClonedFormattingMarks(t,n),this.pm.getPlugin("image_loader").loadDescendant(n),n):null}}let v$=new yG(class extends vZ{constructor(t,e){super(t,e)}static get pluginName(){return"page_decorator_viewer"}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t,"paginate",this.onPaginate,this)}onPaginate(){this.syncAll()}});class vJ{constructor(t){this.markSelection=t.markSelection.bind(null),this.markPage=t.markPage.bind(null),this.scrollToSelection=t.scrollToSelection.bind(null),this.scrollToPage=t.scrollToPage.bind(null)}highlight(t,e,n){switch(void 0===n&&(n=m),e.type){case"watermark":return this.highlightWatermark(t,e,n);case"drawing":return this.highlightDrawing(t,e.drawingId,e,n);case"edit_area":return this.highlightEditArea(t,e.childPath,e,n);case"comment":return this.highlightComment(t,e.commentId,e,n);default:return null}}highlightWatermark(t,e,n){return{removeMarker:n.skipMarker?void 0:this.markPage(0,e,n),scrollPromise:n.skipScroll?void 0:this.scrollToPage(0,e,n)}}highlightDrawing(t,e,n,r){let i=function(t,e){let n;if(t.descendants((t,r)=>{if(t.is("Drawing")&&t.getAttrValue("id")===e||t.is("Chart")&&t.getAttrValue("synochart")===e)return n={node:t,offset:r},!0}),!n)return null;let r=iO.create(t,n.offset,void 0,!0)?.toMultiSelection();return r&&r.is("Node")?r:null}(t.root,e);return i?{removeMarker:r.skipMarker?void 0:this.markSelection(i,n,r),scrollPromise:r.skipScroll?void 0:this.scrollToSelection(i,n,r)}:null}highlightEditArea(t,e,n,r){let i,a=function(t,e){if(t.self.isEmpty())return null;let n=t;for(let t of e)if((n=n.extendIndex(tj(t,0,n.self.childCount-1))).self.is("Textblock")||n.self.isEmpty())break;return n}(t.root.queryChildResolvedPos("EditArea",!0),e);if(!a)return null;let s=a.self;return(s.is("Textblock")?i=iN.createResolved(a.extend(0),a.extend(a.self.getContentSize()),!0)?.toMultiSelection():(s.is("Table")||s.is("TableRow")||s.is("TableCell"))&&(i=i1.createAdapted([a],!0,{dir_col:-1,dir_row:-1})),i||(i=iR.findNear(a,1,!0,!0)?.toMultiSelection()))?{removeMarker:r.skipMarker?void 0:this.markSelection(i,n,r),scrollPromise:r.skipScroll?void 0:this.scrollToSelection(i,n,r)}:null}highlightComment(t,e,n,r){let i=t.commentStore.getBy(e);if(!i||i.ranges.length<2)return null;let a=iR.findNear(t.root.resolve(i.ranges[0]),1,void 0,!0)?.toMultiSelection();return a?{removeMarker:r.skipMarker?void 0:this.markSelection(a,n,r),scrollPromise:r.skipScroll?void 0:this.scrollToSelection(a,n,r)}:null}}function vY(){let t=document.createElement("div");return Object.assign(t.style,{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none"}),t}class vX extends yB{constructor(t,e){super(t,e),this.highlightConfig=function(t){let e={...t};for(let t of["default","media"])e[t]||(e[t]={});return e}(e.highlightConfig)}static get pluginName(){return"viewer"}static get pluginDependency(){return["draw"]}init(){if(super.init(),"viewer"!==this.pm.getMode())throw Error(`Plugin viewer requires ProseMirror in "viewer" mode: ${this.pm.getMode()}`)}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t.wrapper,"dragstart",t=>{t.preventDefault()})}getZoomValue(){return this.pm.getPlugin("zoom")?.getZoomValue()??1}getClientPageSize(){let t=this.getPageSize(),e=this.getZoomValue();return{width:Math.round(t.width*e),height:Math.round(t.height*e)}}async highlight(t,e){let n=Array.isArray(t)?t:[t];await this.pm.nextTick();let r={...e,skipScroll:!0},i=n.map((t,n)=>this.doHighlight(t,0===n?e:r));return{removeMarker:()=>{for(let t of i)t?.removeMarker?.()},scrollPromise:Promise.all(i.map(t=>t?.scrollPromise)).then(()=>{})}}fillHighlightMarkerStyle(t,e,n){var r=this.highlightConfig;let{markerColor:i,markerClass:a}=e.fileId?r.media:r.default;a?t.classList.add(a):i&&(t.style.background=i)}}let vQ=new yG(class extends vX{constructor(t,e){super(t,e),this.highlightManager=this.createHighlightManager()}static get pluginDependency(){return super.pluginDependency.concat("shape","paginator")}createHighlightManager(){return new vJ({markSelection:(t,e,n)=>{if(t.is("BreakGraph")||t.is("InlineNode")){let r=this.pm.getPlugin("scroll")?.getSelectionRect(t);if(!r)return;let i=1/(this.pm.getPlugin("zoom")?.getZoomValue()??1),{left:a,top:s}=this.pm.wrapper.getBoundingClientRect(),o=(r.left-a)*i,l=(r.top-s)*i,h=(r.right-a)*i,u=(r.bottom-s)*i,c=vY();return Object.assign(c.style,{left:o+"px",top:l+"px",width:h-o+"px",height:u-l+"px"}),this.fillHighlightMarkerStyle(c,e,n),this.pm.wrapper.appendChild(c),()=>{c.remove()}}if(t.insideEditor){let r=this.pm.getPlugin("indicator")?.getSelectionControl().createIndicator(t,{extend_line_end:!0});if(!r)return;for(let t of r.doms)t.classList.remove("ProseMirror-non-printable","ProseMirror-indicator-overlay-selection"),this.fillHighlightMarkerStyle(t,e,n);return()=>{r?.clear()}}},markPage:(t,e,n)=>{let r=this.pm.getPlugin("paginator").getPageDOM(t);if(!r)return;let i=vY();return this.fillHighlightMarkerStyle(i,e,n),r.appendChild(i),()=>{i.remove()}},scrollToSelection:async t=>{await this.pm.getPlugin("scroll")?.scroll(t,{edge:"left-top",force:!0,fix_line_height:!0})},scrollToPage:async t=>{let e=this.pm.getPlugin("paginator").getPageDOM(t);e&&await this.pm.getPlugin("scroll")?.scroll(e,{edge:"left-top",force:!0,fix_line_height:!0})}})}bindEvents(){super.bindEvents();let t=this.pm;this.bindEvent(t,"transformClientCoords",this.onTransformClientCoords,this);let e=t.getPlugin("draw");this.bindEvent(e,"afterChildRender",this.onDrawingDrawAfterChildRender,this,{checker:"Drawing"}),t.getPlugin("zoom")&&(this.bindEvent(e,"render",this.onZoomedPageDrawRender,this,{checker:"Page"}),this.bindEvent(t,"zoomValueChange",this.onZoomValueChange,this))}onTransformClientCoords(t,e){let n;if(e){let t=e.self;if(t.is("EditArea")){let t=this.pm.wrapper.getBoundingClientRect(),e=this.pm.getPlugin("paginator").getPagePadding(0);n={left:t.left+e.left,top:t.top+e.top}}else n=t.type.getIndicatorWrapperDOM(t.dom).getBoundingClientRect()}else n=this.pm.wrapper.getBoundingClientRect();t.x-=n.left,t.y-=n.top;let r=1/(this.pm.getPlugin("zoom")?.getZoomValue()??1);return t.x*=r,t.y*=r,t}onDrawingDrawAfterChildRender(t,e,n){if("viewer"!==n.getTarget())return;e.style.pointerEvents="none";let r=e.firstElementChild;r&&r.querySelectorAll("[pointer-events]").forEach(t=>{t.removeAttribute("pointer-events")})}onZoomedPageDrawRender(t,e,n){(n.isTarget("viewer")||n.isTarget("general"))&&this.updatePageSize(t)}onZoomValueChange(){let t=this.getPageCount();for(let e=0;e<t;++e){let t=this.pm.getPlugin("paginator").getPageDOM(e);t&&this.updatePageSize(t)}}getPageSize(){return this.pm.doc.getState("page_size")??{width:0,height:0}}getPageCount(){return this.pm.getPlugin("paginator").getPageCount()}updatePageSize(t){let e=this.pm.getPlugin("draw").getDom(t);if(!e)return;let n=this.getPageSize(),r=this.getClientPageSize(),i=this.getZoomValue();Object.assign(e.style,{width:r.width+"px",height:r.height+"px"}),e.firstElementChild&&Object.assign(e.firstElementChild.style,{width:n.width+"px",height:n.height+"px",transform:`scale(${i})`,"transform-origin":"0 0"})}doHighlight(t,e){return this.highlightManager.highlight({root:this.pm.doc,commentStore:this.pm.commentStore},t,e)}});function vK(t){return new Promise(e=>{var n,r;let i=t.place,a=document.createElement("div");a.classList.add("syno-o-doc-viewer"),i&&i.appendChild(a);let s=(n={...t,place:a},r=dS.mergeConfigs(function(t){let{doc:e,comments:n}=t,r=yV.migrate(e||fy.getPresetJson(),n);return dS.mergeConfigs({place:t.place,mode:"viewer"},{schema:fy,doc:r.getDoc(),comments:r.getCommentStore(),plugins:[yH,yZ,yQ,y9,xo,xg,xy,xm,xb,xM,xj,xq,x$,xX,mB,m3,m6,ve,vb,vM,vq,v$,vQ]})}(n),function(t){let e=t.baseUrl||"";e&&"/"!==e[e.length-1]&&(e+="/");let n=`${e}webman/3rdparty/Spreadsheet/`;return{pluginConfigs:{image:{requestImageUrl:t.requestImageUrl},chart:{emptyImageUrl:n+"images/_Asset/2x/_Common/icon_chart_invalid.png",emptyImageSize:{width:144,height:144}},link:{baseDriveUrl:e}}}}(n)),new dS(r));s.ensureOperation(),s.addEventListener("flush",()=>{e(s)},{once:!0});let{viewMargin:o=0,contentWidth:l=0}={viewMargin:8,contentWidth:s.doc.state.page_size.width};document.body.style.margin=o+"px",function(t){let e,n=((e=document.head.querySelector('meta[name="viewport"]'))||((e=document.head.appendChild(document.createElement("meta"))).name="viewport"),e),r=n.content?n.content.split(","):[],i=`width=${t||"device-width"}`,a=r.findIndex(t=>t.trim().startsWith("width"));a>=0?r[a]=i:r.push(i),n.content=r.join(",")}(l?2*o+l:0)})}})(),window.OF=r})();