import{r as ref,d as defineComponent,c as useUserStore,x as watch,f as createVNode,dn as NSkeleton,ce as commonjsGlobal,cf as getDefaultExportFromCjs,Z as computed,n as onMounted,bj as openBlock,at as createElementBlock,b9 as normalizeStyle,bL as toRefs,C as nextTick,e as reactive,k as createTextVNode,a as useRoute,a1 as px2vw,a2 as onUnmounted,a3 as withDirectives,a4 as vModelText,F as Fragment,b as useMessage,T as Transition,H as NTooltip,dp as NDrawer,dq as NDrawerContent,t as NModal,v as NSpace,j as NButton,G as NPopover,b3 as isVNode}from"./index-a6d6496c.js";import{e as iconplay,f as iconpause,g as iconReplay$1,P as Plyr,t as tickMp3,V as Vudio,C as CardType}from"./index-b88fa978.js";import{b as beatIcon,t as toneIcon,s as setTimeIcon,a as toolbox,M as Moveable}from"./toneIcon-2a45bec1.js";import{N as NSlider}from"./icon-collect-active-f4557525.js";import{T as TrainSettings}from"./index-3c496e68.js";import{i as lessonPreTrainingPage,q as queryCourseware}from"./catchData-f90464b5.js";import{g as getImage,s as styles$5}from"./index-5275be7c.js";import{v as vaildUrl}from"./urlUtils-b7caaee8.js";import{T as TimerMeter}from"./index-84cd6470.js";import"./index-f5050233.js";import"./index-b2ac38ee.js";import"./index-e957e953.js";import"./index-aee93935.js";import"./index-a8268a6c.js";import"./index-cf806cc5.js";import"./Scrollbar-e8335014.js";import"./contants-e12e4ed1.js";const playContent="_playContent_1d3al_1",assignHomework="_assignHomework_1d3al_10",sectionAnimateUp="_sectionAnimateUp_1d3al_23",coursewarePlay="_coursewarePlay_1d3al_29",playModel="_playModel_1d3al_35",headerContainer="_headerContainer_1d3al_44",backBtn="_backBtn_1d3al_62",headRight="_headRight_1d3al_74",rightBtn="_rightBtn_1d3al_83",menu="_menu_1d3al_95",tabsContent="_tabsContent_1d3al_106",wraps="_wraps_1d3al_117",itemDiv="_itemDiv_1d3al_124",itemActive="_itemActive_1d3al_137",acitveAnimation="_acitveAnimation_1d3al_140",show="_show_1d3al_143",hide$1="_hide_1d3al_146",rightFixedBtns="_rightFixedBtns_1d3al_159",fullBtn="_fullBtn_1d3al_166",point="_point_1d3al_171",btnsDisabled="_btnsDisabled_1d3al_181",loadWrap="_loadWrap_1d3al_210",drawerContainer="_drawerContainer_1d3al_221",sectionAnimate$1="_sectionAnimate_1d3al_23",switchDisplaySection="_switchDisplaySection_1d3al_266",displayBtn="_displayBtn_1d3al_274",attendClassModal="_attendClassModal_1d3al_286",modelAttendContent="_modelAttendContent_1d3al_310",modelAttendBtnGroup="_modelAttendBtnGroup_1d3al_316",trainClassModal="_trainClassModal_1d3al_324",workContainer="_workContainer_1d3al_330",toolboxImg="_toolboxImg_1d3al_337",isDragIng="_isDragIng_1d3al_346",toolClassImg="_toolClassImg_1d3al_350",booxToolWrap="_booxToolWrap_1d3al_365",booxToolItem="_booxToolItem_1d3al_378",setTimeImage="_setTimeImage_1d3al_393",beatImage="_beatImage_1d3al_399",changePwdModal="_changePwdModal_1d3al_405",imChatModal="_imChatModal_1d3al_408",modeWrap="_modeWrap_1d3al_411",showModalTone="_showModalTone_1d3al_415",studentRemove="_studentRemove_1d3al_418",styles$4={playContent,assignHomework,sectionAnimateUp,coursewarePlay,playModel,headerContainer,backBtn,headRight,rightBtn,menu,tabsContent,wraps,itemDiv,itemActive,acitveAnimation,show,hide:hide$1,rightFixedBtns,fullBtn,point,btnsDisabled,loadWrap,drawerContainer,sectionAnimate:sectionAnimate$1,switchDisplaySection,displayBtn,attendClassModal,modelAttendContent,modelAttendBtnGroup,trainClassModal,workContainer,toolboxImg,isDragIng,toolClassImg,booxToolWrap,booxToolItem,setTimeImage,beatImage,changePwdModal,imChatModal,modeWrap,showModalTone,studentRemove},musicScore="_musicScore_10wpn_1",container="_container_10wpn_8",musicModel="_musicModel_10wpn_16",errorModel="_errorModel_10wpn_23",startBtn="_startBtn_10wpn_35",loading="_loading_10wpn_45",skeletonWrap="_skeletonWrap_10wpn_51",skeleton="_skeleton_10wpn_51",styles$3={musicScore,container,musicModel,errorModel,startBtn,loading,skeletonWrap,skeleton};var inBrowser=typeof window<"u",visibility;function usePageVisibility(){if(!visibility&&(visibility=ref("visible"),inBrowser)){const e=()=>{visibility.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return visibility}const MusicScore=defineComponent({name:"musicScore",props:{music:{type:Object,default:()=>({})},activeModel:{type:Boolean}},emits:["setIframe"],setup(e,{emit:t}){const r=useUserStore(),i=ref(!1),s=usePageVisibility();watch(s,u=>{console.log("🚀 ~ value:",u),u=="hidden"&&(i.value=!1)});const a=ref(),n=ref(!1),l=ref(!1),o=ref(!1),y=`${/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":location.origin}/instrument?platform=pc&zoom=1.2&modelType=practise&id=${e.music.content}&Authorization=${r.getToken}`,x=()=>{fetch(y).then(()=>{o.value=!0,l.value=!1}).catch(()=>{l.value=!0})};return watch(e.music,()=>{o.value||(l.value=!1,e.music.display&&x())}),()=>createVNode("div",{class:styles$3.musicScore},[createVNode("iframe",{ref:a,onLoad:()=>{t("setIframe",a.value),n.value=!0},class:[styles$3.container,"musicIframe"],frameborder:"0",src:y},null),n.value&&createVNode("div",{class:styles$3.skeletonWrap},[createVNode("div",null,[createVNode(NSkeleton,{text:!0,repeat:8},null)])])])}}),iconMenu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAAAM1BMVEUAAAAAAAD39/fi4uKDg4PBwcEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///+Tuw5aAAAAEHRSTlNNAO3Jd6JIHQdGNilDPhgRTgnLQQAAAU5JREFUaN7s1usKgzAMhuFvtiZp62H3f7VzG1rQbVDRFEeen4HwgodS3DaGFDvCYaiLadhWVmHhSDgBRZYfYUmE01CSb2EOOFXgj2HpcbpetuExQEEY12GGEs5hrW4u5/AIRWMOS4CiIEu4h6p+DjOU8TssAcqCvMIJ6tIzLAR1JFOYUQFP4YgK4hQmVEA3DKhiQEIVCRFVRHSoogOhCoIxx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ZxvgaV5irl1gJ5ki3WOBAtjjDQd5iggM6ocNFR4GLggQXCQEuAhguGMuyLGf25mQ5QSiKougZSTu2iy0qaIIYsUXj+f/PSqUx4b5ChAdD1nzXbjQajWxO93TsOijNCs+D0cSEJnfJbysL5Wx9ful40DPlr8RFGe8Gfxhz6Oi3eDcuc94avEugI+K/m42iPl74p+1CwytTukXPsw5TZtAQMm1Z7NwXX5rQ4FFYoYD5QTQL6LADCm8FvgMKPWiZGRQmeCJeUBhDk9OmMEWunU9hZKGuc4gc5pFCYEGf16JwyfkOKQz3qGKjnNd4YK9+TVTTU84RMlkBhZOJqq6UrpnfEQV/h+oiCq1exvdMYRGjDmvlvIHCTSgMYtTjopw95TumcJijLiGFtoMU+0ah00d9po/P9if7dY+DMAxDAfhtVHCBNl0KHaCNikBUgAD5/seiS4c81ZvjKd+Y5Sn/dk25PSx1ktjdsLpIov3B1kjJd3Xc2rA5s6ishKE9r2mv7IAV/RQF5czZJ/N9jZR7Qib8Uqgvmn3y2zGXfyFNA+KU/EVm81m2XJEH11ZsgoPqJewDF4+npI7wwZV7Bx/cq0T44O5shKuwJg9wVtWyaBv4C810mFEURVH827cDGgAAEIZh/l2jgvckTEf3fYdT5IYhI8aqGCRjdE5hQcYjGQhlBFahX8WcGexWlN3j/fCu0DBoJJeUlgkntR01jVb7a1njTBfcBwf8k/vmN0H/ugAAAABJRU5ErkJggg==",iconNote=""+new URL("icon-note-e717c676.png",import.meta.url).href,iconWhiteboard=""+new URL("icon-whiteboard-c1022e62.png",import.meta.url).href,iconAssignHomework=""+new URL("icon-assignHomework-0794bd30.png",import.meta.url).href,iconOverPreivew=""+new URL("icon-over-preview-791959ba.png",import.meta.url).href;var lottie={exports:{}};(function(module,exports){typeof navigator<"u"&&function(e,t){module.exports=t()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,i=e.length,s;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(e[0]*255,e[1]*255,e[2]*255);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e=[],t,r;for(t=0;t<256;t+=1)r=t.toString(16),e[t]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+e[i]+e[s]+e[a]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(e)}var dataManager=function(){var e=1,t=[],r,i,s={onmessage:function(){},postMessage:function(S){r({data:S})}},a={postMessage:function(S){s.onmessage({data:S})}};function n(u){if(window.Worker&&window.Blob&&getWebWorker()){var S=new Blob(["var _workerSelf = self; self.onmessage = ",u.toString()],{type:"text/javascript"}),b=URL.createObjectURL(S);return new Worker(b)}return r=u,s}function l(){i||(i=n(function(S){function b(){function T(B,C){var _,p,P=B.length,k,V,R,H;for(p=0;p
=0;C-=1)if(B[C].ty==="sh")if(B[C].ks.k.i)E(B[C].ks.k);else for(P=B[C].ks.k.length,p=0;p
_[0]?!0:_[0]>B[0]?!1:B[1]>_[1]?!0:_[1]>B[1]?!1:B[2]>_[2]?!0:_[2]>B[2]?!1:null}var I=function(){var B=[4,4,14];function C(p){var P=p.t.d;p.t.d={k:[{s:P,t:0}]}}function _(p){var P,k=p.length;for(P=0;P e?this.textSpans[e].span:createNS(l?"g":"text"),d<=e){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=o,l){var E=createNS("g");o.appendChild(E),this.textSpans[e].childSpan=E}this.textSpans[e].span=o,this.layerElement.appendChild(o)}o.style.display="inherit"}if(f.reset(),x&&(n[e].n&&(u=-m,S+=r.yOffset,S+=b?1:0,b=!1),this.applyTextPropertiesToMatrix(r,f,n[e].line,u,S),u+=n[e].l||0,u+=m),l){A=this.globalData.fontManager.getCharData(r.finalText[e],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var M;if(A.t===1)M=new SVGCompElement(A.data,this.globalData,this);else{var I=emptyShapeData;A.data&&A.data.shapes&&(I=this.buildShapeData(A.data,r.finalSize)),M=new SVGShapeElement(I,this.globalData,this)}if(this.textSpans[e].glyph){var F=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(F.layerElement),F.destroy()}this.textSpans[e].glyph=M,M._debug=!0,M.prepareFrame(0),M.renderFrame(),this.textSpans[e].childSpan.appendChild(M.layerElement),A.t===1&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else x&&o.setAttribute("transform","translate("+f.props[12]+","+f.props[13]+")"),o.textContent=n[e].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}x&&o&&o.setAttribute("d",y)}for(;e p?s.isAnimation=!1:s.isAnimation=!0}else s.isAnimation=!((P==null?void 0:P.adviseStudyTimeSecond)<8)},O=_=>{D(_==="up"?b.activeIndex-1:b.activeIndex+1)},L=()=>{var p,P;const _=i.itemList[b.activeIndex];(_==null?void 0:_.type)=="VIDEO"&&!((p=_.videoEle)!=null&&p.paused)&&g(),(_==null?void 0:_.type)=="SONG"&&!((P=_.audioEle)!=null&&P.paused)&&g()};document.body.addEventListener("keyup",_=>{if(_.code==="ArrowUp"){if(b.activeIndex===0)return;O("up")}else if(_.code==="ArrowDown"){if(b.activeIndex===i.itemList.length-1)return;O("down")}});const N=reactive({type:"",penShow:!1,whiteboardShow:!1}),z=_=>{var P,k;const p=i.itemList[b.activeIndex];switch(p.type==="VIDEO"&&p.videoEle&&p.videoEle.pause(),p.type==="SONG"&&p.audioEle&&p.audioEle.stop(),p.type==="MUSIC"&&((k=(P=p.iframeRef)==null?void 0:P.contentWindow)==null||k.postMessage({api:"setPlayState"},"*")),d(),b.toolOpen=!1,N.type=_.type,_.type){case"pen":N.penShow=!0;break;case"whiteboard":N.whiteboardShow=!0}},B=()=>{N.type="init",A()},C=_=>{_=="setTimeIcon"&&(y.value=!0),_=="beatIcon"&&(o.value=!0),_=="toneIcon"&&(f.value=!0)};return()=>{let _;return createVNode("div",{id:"playContent",class:[styles$4.playContent,"wrap"]},[createVNode("div",{onClick:()=>{clearTimeout(s.timer),s.model=!s.model,Object.values(i.videoRefs).map(p=>p.toggleHideControl(s.model)),Object.values(i.audioRefs).map(p=>p.toggleHideControl(s.model))}},[createVNode("div",{class:styles$4.coursewarePlay,style:{width:r.width},onClick:p=>{p.stopPropagation(),g()}},[createVNode("div",{class:styles$4.wraps},[i.itemList.map((p,P)=>{const k=p.isRender||Math.abs(b.activeIndex-P)<2,V=Math.abs(b.activeIndex-P)>4;return k&&(p.isRender=!0),k?createVNode("div",{key:"index"+P,class:[styles$4.itemDiv,b.activeIndex===P&&styles$4.itemActive,s.isAnimation&&styles$4.acitveAnimation,Math.abs(b.activeIndex-P)<2?styles$4.show:styles$4.hide],style:P-.001&&g<.001}function r(u,S,b,m,T,c,g,d,A){if(b===0&&c===0&&A===0)return t(u,S,m,T,g,d);var E=e.sqrt(e.pow(m-u,2)+e.pow(T-S,2)+e.pow(c-b,2)),M=e.sqrt(e.pow(g-u,2)+e.pow(d-S,2)+e.pow(A-b,2)),I=e.sqrt(e.pow(g-m,2)+e.pow(d-T,2)+e.pow(A-c,2)),F;return E>M?E>I?F=E-M-I:F=I-M-E:I>M?F=I-M-E:F=M-E-I,F>-1e-4&&F<1e-4}var i=function(){return function(u,S,b,m){var T=getDefaultCurveSegments(),c,g,d,A,E,M=0,I,F=[],D=[],G=bezierLengthPool.newElement();for(d=b.length,c=0;c.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e1&&l&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;tt);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t=[],r=0,i=e.length,s,a,n=!1,l=!1,o="";r=55296&&s<=56319?FontManager.isRegionalFlag(e,r)?o=e.substr(r,14):(a=e.charCodeAt(r+1),a>=56320&&a<=57343&&(FontManager.isModifier(s,a)?(o=e.substr(r,2),n=!0):FontManager.isFlagEmoji(e.substr(r,4))?o=e.substr(r,4):o=e.substr(r,2))):s>56319?(a=e.charCodeAt(r+1),FontManager.isVariationSelector(s)&&(n=!0)):FontManager.isZeroWidthJoiner(s)&&(n=!0,l=!0),n?(t[t.length-1]+=o,n=!1):t.push(o),r+=o.length;return t},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,r=this.data,i=[],s,a,n,l=0,o,f=r.m.g,y=0,x=0,u=0,S=[],b=0,m=0,T,c,g=t.getFontByName(e.f),d,A=0,E=getFontProperties(g);e.fWeight=E.weight,e.fStyle=E.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var M=e.tr/1e3*e.finalSize,I;if(e.sz)for(var F=!0,D=e.sz[0],G=e.sz[1],O,L;F;){L=this.buildFinalText(e.t),O=0,b=0,a=L.length,M=e.tr/1e3*e.finalSize;var N=-1;for(s=0;sD&&L[s]!==" "?(N===-1?a+=1:s=N,O+=e.finalLineHeight||e.finalSize*1.2,L.splice(s,N===s?1:0,"\r"),N=-1,b=0):(b+=A,b+=M);O+=g.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Gs&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:f==="xMax"&&(as&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,y==="YMid"&&(a>s&&l==="meet"||as&&l==="meet"||a=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var r,i=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();e.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var e,t=15;for(e=0;eg){var I=d,F=m.c&&d===A-1?0:d+1,D=(g-E)/c[d].addedLength;M=bez.getPointInSegment(m.v[I],m.v[F],m.o[I],m.i[F],D,c[d]);break}else E+=c[d].addedLength;d+=1}return M||(M=m.c?[m.v[0][0],m.v[0][1]]:[m.v[m._length-1][0],m.v[m._length-1][1]]),M},vectorOnPath:function(S,b,m){S==1?S=this.v.c:S==0&&(S=.999);var T=this.pointOnPath(S,b),c=this.pointOnPath(S+.001,b),g=c[0]-T[0],d=c[1]-T[1],A=Math.sqrt(Math.pow(g,2)+Math.pow(d,2));if(A===0)return[0,0];var E=m==="tangent"?[g/A,d/A]:[-d/A,g/A];return E},tangentOnPath:function(S,b){return this.vectorOnPath(S,b,"tangent")},normalOnPath:function(S,b){return this.vectorOnPath(S,b,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([y],o),extendPrototype([y],f),f.prototype.getValueAtTime=l,f.prototype.initiateExpression=ExpressionManager.initiateExpression;var x=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(u,S,b,m,T){var c=x(u,S,b,m,T);return c.propertyIndex=S.ix,c.lock=!1,b===3?expressionHelpers.searchExpressions(u,S.pt,c):b===4&&expressionHelpers.searchExpressions(u,S.ks,c),c.k&&u.addDynamicProperty(c),c}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function e(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(t,r){var i=this.calculateExpression(r);if(t.t!==i){var s={};return this.copyData(s,t),s.t=i.toString(),s.__complete=!1,s}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),r=this.searchExpressions();return this.kf=t||r,this.kf},TextProperty.prototype.searchExpressions=e}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function e(t,r){var i=createNS("feMerge");i.setAttribute("result",t);var s,a;for(a=0;a