!/**
 * Highcharts JS v11.4.8 (2024-08-29)
 *
 * (c) 2009-2024 Torstein Honsi
 *
 * License: www.highcharts.com/license
 */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/textpath-support",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function a(e,a,s,n){e.hasOwnProperty(a)||(e[a]=n.apply(null,s),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:a,module:e[a]}})))}a(e,"Extensions/TextPath.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){let{deg2rad:a}=t,{addEvent:s,merge:n,uniqueKey:h,defined:r,extend:o}=e;function i(t,e){e=n(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);let a=this.renderer.url,i=this.text||this,l=i.textPath,{attributes:d,enabled:u}=e;if(t=t||l&&l.path,l&&l.undo(),t&&u){let e=s(i,"afterModifyTree",e=>{if(t&&u){let s=t.attr("id");s||t.attr("id",s=h());let n={x:0,y:0};r(d.dx)&&(n.dx=d.dx,delete d.dx),r(d.dy)&&(n.dy=d.dy,delete d.dy),i.attr(n),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let l=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:o(d,{"text-anchor":d.textAnchor,href:`${a}#${s}`}),children:l}}});i.textPath={path:t,undo:e}}else i.attr({dx:0,dy:0}),delete i.textPath;return this.added&&(i.textCache="",this.renderer.buildText(i)),this}function l(t){let e=t.bBox,s=this.element?.querySelector("textPath");if(s){let t=[],{b:n,h}=this.renderer.fontMetrics(this.element),r=h-n,o=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),i=s.innerHTML.replace(o,"").split(/<tspan class="highcharts-br"[^>]*>/),l=i.length,d=(t,e)=>{let{x:h,y:o}=e,i=(s.getRotationOfChar(t)-90)*a,l=Math.cos(i),d=Math.sin(i);return[[h-r*l,o-r*d],[h+n*l,o+n*d]]};for(let e=0,a=0;a<l;a++){let n=i[a].length;for(let h=0;h<n;h+=5)try{let n=e+h+a,[r,o]=d(n,s.getStartPositionOfChar(n));0===h?(t.push(o),t.push(r)):(0===a&&t.unshift(o),a===l-1&&t.push(r))}catch(t){break}e+=n-1;try{let n=e+a,h=s.getEndPositionOfChar(n),[r,o]=d(n,h);t.unshift(o),t.unshift(r)}catch(t){break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}function d(t){let e=t.labelOptions,a=t.point,s=e[a.formatPrefix+"TextPath"]||e.textPath;s&&!e.useHTML&&(this.setTextPath(a.getDataLabelPath?.(this)||a.graphic,s),a.dataLabelPath&&!s.enabled&&(a.dataLabelPath=a.dataLabelPath.destroy()))}return{compose:function(t){s(t,"afterGetBBox",l),s(t,"beforeAddingDataLabel",d);let e=t.prototype;e.setTextPath||(e.setTextPath=i)}}}),a(e,"masters/modules/textpath.src.js",[e["Core/Globals.js"],e["Extensions/TextPath.js"]],function(t,e){return t.TextPath=e,t.TextPath.compose(t.SVGElement),t})});