/*! * MotionPathHelper 3.13.0 * https://gsap.com * * @license Copyright 2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license. * @author: Jack Doyle, jack@greensock.com */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(t){"use strict";function n(t){return Math.round(1e5*t)/1e5||0}function o(t,e){return e.totalLength=t.totalLength,t.samples?(e.samples=t.samples.slice(0),e.lookup=t.lookup.slice(0),e.minLength=t.minLength,e.resolution=t.resolution):t.totalPoints&&(e.totalPoints=t.totalPoints),e}var P,C=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,w=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,Y=Math.PI/180,F=Math.sin,W=Math.cos,Q=Math.abs,U=Math.sqrt,A=1e8;function copyRawPath(t){for(var e=[],n=0;n=e&&this._anchors[i].j===r.j&&(this._anchors[i].i+=6);s=new lt(this,this._rawPath,r.j,e,h),this._selection.appendChild(this._handle1),this._selection.appendChild(this._handle2),s._draggable._onPress(t),X=s,this._anchors.push(s),this._selectedAnchors.length=0,this._selectedAnchors.push(s),this._updateAnchors(),this.update(),this._saveState()}Ja(),Ba(c,"touchforcechange",na),Ha("onPress",this)},ct._onClickHandle1=function _onClickHandle1(){var t=this._editingAnchor,e=t.i,n=t.segment,i=t.isClosedStart?n.length-4:e-2;u&&Math.abs(n[e]-n[i])<5&&Math.abs(n[e+1]-n[1+i])<5&&this._onClickAnchor(t)},ct._onClickHandle2=function _onClickHandle2(){var t=this._editingAnchor,e=t.i,n=t.segment;u&&Math.abs(n[e]-n[e+2])<5&&Math.abs(n[e+1]-n[e+3])<5&&this._onClickAnchor(t)},ct._onDragEndAnchor=function _onDragEndAnchor(){X=null,this._saveState()},ct.isSelected=function isSelected(){return 0=e&&this._anchors[n].j===i&&(this._anchors[n].i-=6);this._updateAnchors(),this.update(),this._saveState(),this.vars.onDeleteAnchor&&this.vars.onDeleteAnchor.call(this.vars.callbackScope||this)},ct._onClickAnchor=function _onClickAnchor(t){var e,n,i,s,a,o,r=t.i,h=t.segment,l=t.isClosedStart?h.length-4:r-2,c=1e3,d=!r||r>=h.length-2;u&&X!==t&&this._editingAnchor?(t.smooth=!t.smooth,d&&!t.isClosedStart&&(t.smooth=!1),t.element.setAttribute("d",t.smooth?this._circleHandle:this._squareHandle),!t.smooth||d&&!t.isClosedStart?t.smooth||d&&!t.isClosedStart||((r||t.isClosedStart)&&(h[l]=h[r],h[1+l]=h[r+1]),r