@pixeasy/customizer 0.0.38-beta.uat → 0.0.40-beta.uat

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4612,7 +4612,7 @@ void main() {
4612
4612
  `,bi=class i{elementRef=Z(Oi);renderer=Z(Es);document=Z(Tn);appTooltip=ye("");tooltipDelay=ye(150);tooltipPosition=ye("top");tooltipElement=null;timeoutId;scrollListeners=[];static stylesInjected=!1;ngOnInit(){if(!i.stylesInjected){let e=this.renderer.createElement("style");this.renderer.setProperty(e,"textContent",XZ),this.renderer.appendChild(this.document.head,e),i.stylesInjected=!0}}onMouseEnter(){this.showProgressive()}onMouseLeave(){this.hideProgressive()}onMouseDown(){this.hideProgressive()}ngOnDestroy(){this.hideProgressive()}showProgressive(){let e=this.appTooltip();if(!e)return;let t=this.elementRef.nativeElement;if(t.hasAttribute("title")){let n=t.getAttribute("title");t.setAttribute("data-original-title",n),t.removeAttribute("title")}this.timeoutId=setTimeout(()=>{this.createTooltip(e)},this.tooltipDelay())}hideProgressive(){this.timeoutId&&clearTimeout(this.timeoutId);let e=this.elementRef.nativeElement,t=e.getAttribute("data-original-title");if(t&&(e.setAttribute("title",t),e.removeAttribute("data-original-title")),this.tooltipElement){let n=this.tooltipElement;this.renderer.addClass(n,"tooltip-exit"),this.tooltipElement=null,this.scrollListeners.forEach(r=>r()),this.scrollListeners=[],setTimeout(()=>{n.parentNode&&this.renderer.removeChild(n.parentNode,n)},150)}}createTooltip(e){this.tooltipElement||(this.tooltipElement=this.renderer.createElement("div"),this.tooltipElement.innerHTML=`<div class="tooltip-content">${e}</div><div class="tooltip-arrow"></div>`,this.renderer.addClass(this.tooltipElement,"pixeasy-tooltip"),this.renderer.setStyle(this.tooltipElement,"position","fixed"),this.renderer.setStyle(this.tooltipElement,"z-index","10000"),this.renderer.setStyle(this.tooltipElement,"pointer-events","none"),this.renderer.appendChild(this.document.body,this.tooltipElement),this.renderer.setStyle(this.tooltipElement,"visibility","hidden"),setTimeout(()=>{if(this.tooltipElement){this.renderer.setStyle(this.tooltipElement,"visibility","visible"),this.positionTooltip();let t=this.document.defaultView||window,n=this.renderer.listen(t,"scroll",()=>{this.positionTooltip()});this.scrollListeners.push(n);let r=this.renderer.listen(t,"resize",()=>{this.positionTooltip()});this.scrollListeners.push(r);let o=this.elementRef.nativeElement.parentElement,s=0,a=10;for(;o&&s<a;){let l=this.renderer.listen(o,"scroll",()=>{this.positionTooltip()});this.scrollListeners.push(l),o=o.parentElement,s++}}},0))}positionTooltip(){if(!this.tooltipElement)return;let e=this.elementRef.nativeElement.getBoundingClientRect(),t=this.tooltipElement.getBoundingClientRect(),n=this.tooltipPosition(),r=this.document.defaultView||window,o=0,s=0;switch(this.renderer.removeClass(this.tooltipElement,"tooltip-top"),this.renderer.removeClass(this.tooltipElement,"tooltip-bottom"),this.renderer.removeClass(this.tooltipElement,"tooltip-left"),this.renderer.removeClass(this.tooltipElement,"tooltip-right"),n){case"top":o=e.top-t.height-10,s=e.left+(e.width-t.width)/2,this.renderer.addClass(this.tooltipElement,"tooltip-top");break;case"bottom":o=e.bottom+10,s=e.left+(e.width-t.width)/2,this.renderer.addClass(this.tooltipElement,"tooltip-bottom");break;case"left":o=e.top+(e.height-t.height)/2,s=e.left-t.width-10,this.renderer.addClass(this.tooltipElement,"tooltip-left");break;case"right":o=e.top+(e.height-t.height)/2,s=e.right+10,this.renderer.addClass(this.tooltipElement,"tooltip-right");break}n==="top"&&o<10?(o=e.bottom+10,this.renderer.removeClass(this.tooltipElement,"tooltip-top"),this.renderer.addClass(this.tooltipElement,"tooltip-bottom")):n==="bottom"&&o+t.height>r.innerHeight-10&&(o=e.top-t.height-10,this.renderer.removeClass(this.tooltipElement,"tooltip-bottom"),this.renderer.addClass(this.tooltipElement,"tooltip-top")),s<10&&(s=10),s+t.width>r.innerWidth-10&&(s=r.innerWidth-t.width-10),this.renderer.setStyle(this.tooltipElement,"top",`${o}px`),this.renderer.setStyle(this.tooltipElement,"left",`${s}px`)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=In({type:i,selectors:[["","appTooltip",""]],hostBindings:function(t,n){t&1&&W("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()})("mousedown",function(){return n.onMouseDown()})},inputs:{appTooltip:[1,"appTooltip"],tooltipDelay:[1,"tooltipDelay"],tooltipPosition:[1,"tooltipPosition"]}})};var W3="customizer-app-theme",$3="customizer-primary-palette",Y3="customizer-secondary-palette",X3="customizer-accent-palette",$x=[{id:"light",label:"Light",mode:"light",className:"theme-light"},{id:"dark",label:"Dark",mode:"dark",className:"theme-dark"},{id:"ocean",label:"Ocean",mode:"light",className:"theme-ocean"}],Um=[{id:"violet",label:"Violet",colorRgb:"98 101 241"},{id:"cyan",label:"Cyan",colorRgb:"14 165 233"},{id:"emerald",label:"Emerald",colorRgb:"16 185 129"},{id:"rose",label:"Rose",colorRgb:"244 63 94"},{id:"amber",label:"Amber",colorRgb:"245 158 11"},{id:"indigo",label:"Indigo",colorRgb:"99 102 241"}],th=class i{document=Z(Tn);themes=F($x);palettes=F(Um);activeThemeId=F(this.getInitialThemeId());activePrimaryId=F(this.getInitialPaletteId($3,"violet"));activeSecondaryId=F(this.getInitialPaletteId(Y3,"emerald"));activeAccentId=F(this.getInitialPaletteId(X3,"amber"));activeTheme=Me(()=>this.themes().find(e=>e.id===this.activeThemeId())??this.themes()[0]);activePrimary=Me(()=>this.palettes().find(e=>e.id===this.activePrimaryId())??this.palettes()[0]);activeSecondary=Me(()=>this.palettes().find(e=>e.id===this.activeSecondaryId())??this.palettes()[0]);activeAccent=Me(()=>this.palettes().find(e=>e.id===this.activeAccentId())??this.palettes()[0]);distributorBrandingOverride=F(null);distributorThemeLockState=F(!1);isDistributorThemeLocked=Me(()=>this.distributorThemeLockState());constructor(){Yt(()=>{let e=this.distributorBrandingOverride(),t=e?this.themes().find(n=>n.id===e.themeId)??this.themes()[0]:this.activeTheme();this.applyTheme({theme:t,primaryColorRgb:e?.primaryColorRgb??this.activePrimary()?.colorRgb,secondaryColorRgb:e?.secondaryColorRgb??this.activeSecondary()?.colorRgb,accentColorRgb:e?.accentColorRgb??this.activeAccent()?.colorRgb,shouldPersist:!this.distributorThemeLockState()})})}setTheme(e){this.distributorThemeLockState()||!this.themes().find(n=>n.id===e)||this.activeThemeId.set(e)}cycleTheme(){if(this.distributorThemeLockState())return;let e=this.themes();if(!e.length)return;let t=e.findIndex(r=>r.id===this.activeThemeId()),n=t<0?0:(t+1)%e.length;this.activeThemeId.set(e[n].id)}setPrimaryPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activePrimaryId.set(e)}setSecondaryPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activeSecondaryId.set(e)}setAccentPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activeAccentId.set(e)}applyDistributorBranding(e,t){let n=this.activePrimary()?.colorRgb??Um[0].colorRgb,r=this.activeSecondary()?.colorRgb??Um[0].colorRgb,o=this.activeAccent()?.colorRgb??Um[0].colorRgb;this.distributorBrandingOverride.set({primaryColorRgb:this.parseColorToRgbTriplet(e.themePrimaryColor)??n,secondaryColorRgb:this.parseColorToRgbTriplet(e.themeSecondaryColor)??r,accentColorRgb:this.parseColorToRgbTriplet(e.themeAccentColor)??o,themeId:this.resolveThemeIdFromMode(e.themeMode)}),this.distributorThemeLockState.set(t?.lock??!0)}clearDistributorBranding(){this.distributorBrandingOverride.set(null),this.distributorThemeLockState.set(!1)}getInitialThemeId(){if(typeof localStorage>"u")return $x[0].id;let e=localStorage.getItem(W3);return e&&$x.some(t=>t.id===e)?e:$x[0].id}getInitialPaletteId(e,t){if(typeof localStorage>"u")return t;let n=localStorage.getItem(e);return n&&Um.some(r=>r.id===n)?n:t}applyTheme(e){let{theme:t,primaryColorRgb:n,secondaryColorRgb:r,accentColorRgb:o,shouldPersist:s}=e;if(!t||!n||!r||!o)return;let a=this.document.body;a.classList.remove(...this.themes().map(l=>l.className)),a.classList.add(t.className),t.mode==="dark"?a.classList.add("dark-mode"):a.classList.remove("dark-mode"),a.setAttribute("data-theme",t.id),a.style.setProperty("--primary-color",n),a.style.setProperty("--secondary-color",r),a.style.setProperty("--accent-color",o),typeof localStorage<"u"&&s&&(localStorage.setItem(W3,t.id),localStorage.setItem($3,this.activePrimaryId()),localStorage.setItem(Y3,this.activeSecondaryId()),localStorage.setItem(X3,this.activeAccentId()))}parseColorToRgbTriplet(e){if(!e)return null;let t=e.trim();if(!t)return null;let n=/^#([0-9a-fA-F]{3})$/,r=/^#([0-9a-fA-F]{6})$/,o=/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,s=/^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})$/,a=(f,h,p)=>f<0||f>255||h<0||h>255||p<0||p>255?null:`${f} ${h} ${p}`,l=t.match(n);if(l){let f=parseInt(l[1][0]+l[1][0],16),h=parseInt(l[1][1]+l[1][1],16),p=parseInt(l[1][2]+l[1][2],16);return a(f,h,p)}let c=t.match(r);if(c){let f=parseInt(c[1].slice(0,2),16),h=parseInt(c[1].slice(2,4),16),p=parseInt(c[1].slice(4,6),16);return a(f,h,p)}let d=t.match(o);if(d)return a(Number.parseInt(d[1],10),Number.parseInt(d[2],10),Number.parseInt(d[3],10));let u=t.match(s);return u?a(Number.parseInt(u[1],10),Number.parseInt(u[2],10),Number.parseInt(u[3],10)):null}resolveThemeIdFromMode(e){let t=(e??"").trim().toLowerCase();return t==="dark"?"dark":"light"}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var jl="#111827",Wl="#ffffff",nh="rgba(15,23,42,0.45)",aD="#ffffff";var q3="design-export";var K3="jersey-design";var Z3="f99808af-8dc9-467a-8acb-08de5fd2bd0f";var Kr={TWO_D_GRID_SIZE:24,THREE_D_GRID_SIZE:.05,TWO_D_SNAP_TOLERANCE_PX:5,THREE_D_SNAP_TOLERANCE_NORMALIZED:.01,SNAP_RELEASE_MULTIPLIER:1.8,RULER_THICKNESS_PX:18,INCH_IN_PIXELS:96},yi={GUIDE_STROKE:"#2563eb",GUIDE_STROKE_ALT:"#0ea5e9",GRID_STROKE:"rgba(30,41,59,0.48)",GRID_STROKE_BOLD:"rgba(15,23,42,0.70)",GRID_TEXTURE_STROKE:"rgba(2,6,23,0.70)",GRID_TEXTURE_STROKE_BOLD:"rgba(2,6,23,0.96)",RULER_BG:"rgba(248,250,252,0.92)",RULER_BORDER:"rgba(148,163,184,0.6)",RULER_TEXT:"#334155"},J3={GRID:"Grid",SNAP:"Snap",UV_GRID:"UV Grid",RULER:"Ruler"};var Ot={manifestLoadFailed:"Unable to load manifest",missingProductId:"Missing product id.",manifestAssetsLoadFailed:"Unable to load assets",manifestAssetsLoadDetail:"Unable to load one or more manifest assets.",noSvgLoadedToExport:"No SVG loaded to export",noSvgDocumentLoaded:"No SVG document is loaded.",failedToSerializeSvg:"Failed to serialize SVG.",missingApiKey:"Missing API key for design submission.",designSubmissionFailed:"Design submission failed.",submissionLoadFailed:"Unable to load submission for editing.",submissionNotFound:"Submission not found.",submissionInvalidPayload:"Submission payload is invalid for editing.",submissionProductMismatch:"Submission product does not match the current product and cannot be edited here.",designSubmittedTitle:"Design Submitted",no3dModelForThumbnail:"3D model is not available for thumbnail generation.",noSvgDesignLoaded:"No SVG design is loaded.",failedSerializeSvgForThumbnail:"Failed to serialize SVG for thumbnail generation.",noThumbnailsGenerated:"No thumbnails were generated.",invalidSubmissionThumbnails:"Submission requires exactly 4 thumbnails: front, right, back, left.",failedGenerateSubmissionThumbnails:"Failed to generate thumbnails for design submission.",failedGenerateThumbnails:"Failed to generate and download thumbnails.",nothingToCopy:"Nothing to copy.",jsonCopied:"JSON copied.",copyFailed:"Copy failed. Please copy manually.",errorLoadingFilesFromUrls:"Error loading files from URLs:",failedRenderSvgOnCanvas:"Failed to render SVG on canvas",overlaySyncFailed:"Overlay synchronization failed"},os={svgRequired:"The design is not available. Please try again later or refresh the page.",svgUrlRequired:"Unable to load the design. Please try again.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",unableToParseSvg:"We couldn't process the design. Please refresh the page and try again.",noPathElements:"No customizable areas found in the design. Please contact support.",failedApplyPatternSvg:"Unable to apply the pattern. Please try again or select a different pattern.",invalidSvgPath:"The pattern could not be applied to this design. Please try a different pattern.",missingPathData:"The pattern is incomplete. Please select a different pattern and try again.",addPatternFromUrlFailed:"Error loading pattern:"},$s={svgRequired:"Design Unavailable",svgUrlRequired:"Design Load Failed",invalidSvgContent:"Design Error",unableToParseSvg:"Design Error",noPathElements:"No Customizable Areas",failedApplyPatternSvg:"Pattern Failed",invalidSvgPath:"Pattern Not Compatible",missingPathData:"Pattern Error"},Ys={garmentSvgRequired:"The design is not available. Please try again later or refresh the page.",patternSvgUrlRequired:"Unable to load the pattern. Please try again.",targetIdRequired:"This pattern cannot be applied to the current design. Please select a different pattern.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",noPatternDefinitionsImported:"This pattern is not compatible with the current design. Please try a different pattern.",noMatchingTargetIds:"This pattern cannot be applied to this area. Please select a different pattern or try another area.",skippedMissingTargetIds:"Some pattern areas are not available:",applyPatternFromUrlFailed:"Error loading pattern:",failedApplyPattern:"Unable to apply this pattern. Please try again or select a different pattern."},$l={garmentSvgRequired:"Design Unavailable",patternSvgUrlRequired:"Pattern Load Failed",targetIdRequired:"Pattern Not Compatible",invalidSvgContent:"Design Error",noPatternDefinitionsImported:"Pattern Not Available",noMatchingTargetIds:"Cannot Apply Pattern",failedApplyPattern:"Pattern Failed"},Va={failedFetchEffectSvg:"Failed to fetch effect SVG",failedIngestWarpEnvelope:"Failed to ingest warp envelope",unableLoadEffectSvgUrl:"Unable to load effect SVG from the configured URL.",warpSvgParsingError:"The warp SVG contains parsing errors.",warpSvgNeedsViewBox:"Warp SVG must define a viewBox attribute.",warpSvgInvalidViewBox:"Warp SVG viewBox is invalid.",warpSvgNeedsTopBottomPath:'Warp SVG must contain <path id="top"> and <path id="bottom"> elements with d attributes.',warpEnvelopeReadFailed:"Unable to read the warp envelope SVG."},Q3={errorLoading3dModel:"Error loading 3D model:",errorLoadingObjFile:"Error loading OBJ file:"},Bm={failedLoadSvg:"Failed to load SVG:",failedSampleWarpPath:"Failed to sample warp path",failedMeasureWarpPath:"Failed to measure warp path"};var eU=i=>`Failed to convert text overlay "${i}"`,Yx=i=>`Failed to load font face "${i}"`,tU=i=>`Unable to prepare font face "${i}"`,nU=i=>`Unable to download font "${i}"`,iU=i=>`Failed to parse font "${i}"`,rU=i=>`Failed to create FontFace for "${i}"`;var ss="image/svg+xml",Wd="image/svg+xml;charset=utf-8",Di="http://www.w3.org/2000/svg",$d="http://www.w3.org/1999/xlink",Xx="<svg",Yd="parsererror";function qZ(i,e){for(let t of e.horizontal)i.remove(t);for(let t of e.vertical)i.remove(t)}function oU(i,e){return qZ(i,e),{horizontal:[],vertical:[]}}function sU(i,e,t,n,r,o,s){let a=Math.max(.5,n),l=Math.max(.5,r),c=Math.max(1,Math.round((o??a)/a)),d=Math.max(1,Math.round((s??l)/l));i.save(),i.shadowColor="rgba(255,255,255,0.28)",i.shadowBlur=.8;for(let u=0,f=0;u<=e+.5;u+=a,f+=1){let h=f%c===0;i.beginPath(),i.strokeStyle=h?yi.GRID_TEXTURE_STROKE_BOLD:yi.GRID_TEXTURE_STROKE,i.lineWidth=h?1.8:1.1,i.moveTo(u,0),i.lineTo(u,t),i.stroke()}for(let u=0,f=0;u<=t+.5;u+=l,f+=1){let h=f%d===0;i.beginPath(),i.strokeStyle=h?yi.GRID_TEXTURE_STROKE_BOLD:yi.GRID_TEXTURE_STROKE,i.lineWidth=h?1.8:1.1,i.moveTo(0,u),i.lineTo(e,u),i.stroke()}i.restore()}function aU(i,e,t,n,r,o,s,a){let l=n[0],c=n[4],d=n[5],u=Math.max(2,r*l),f=Math.max(2,o*l),h=Math.max(1,(s??r)*l),p=Math.max(1,(a??o)*l),v=Math.max(1,Math.round(h/u)),g=Math.max(1,Math.round(p/f)),m=c%u,b=d%f,y=i.canvas?.width??e,_=i.canvas?.height??t,w=e>0?y/e:1,D=t>0?_/t:1,A=Number.isFinite(w)&&Number.isFinite(D)?Math.max(w,D,1):1;i.save(),i.setTransform(A,0,0,A,0,0);for(let P=m;P<=e+u;P+=u){let E=Math.abs(Math.round((P-c)/u))%v===0;i.beginPath(),i.strokeStyle=E?yi.GRID_STROKE_BOLD:yi.GRID_STROKE,i.lineWidth=E?1:.6,i.moveTo(P,0),i.lineTo(P,t),i.stroke()}for(let P=b;P<=t+f;P+=f){let E=Math.abs(Math.round((P-d)/f))%g===0;i.beginPath(),i.strokeStyle=E?yi.GRID_STROKE_BOLD:yi.GRID_STROKE,i.lineWidth=E?1:.6,i.moveTo(0,P),i.lineTo(e,P),i.stroke()}for(let P=m-u;P>=-u;P-=u){let E=Math.abs(Math.round((P-c)/u))%v===0;i.beginPath(),i.strokeStyle=E?yi.GRID_STROKE_BOLD:yi.GRID_STROKE,i.lineWidth=E?1:.6,i.moveTo(P,0),i.lineTo(P,t),i.stroke()}for(let P=b-f;P>=-f;P-=f){let E=Math.abs(Math.round((P-d)/f))%g===0;i.beginPath(),i.strokeStyle=E?yi.GRID_STROKE_BOLD:yi.GRID_STROKE,i.lineWidth=E?1:.6,i.moveTo(0,P),i.lineTo(e,P),i.stroke()}i.restore()}function lU(i,e){for(let t of e.lines)i.remove(t)}function lD(i,e){return lU(i,e),{lines:[]}}function cU(i,e,t,n,r){if(lU(i,t),!e.length)return{lines:[]};let o=[];for(let s of e){let a=s.axis==="x"?new Vs([s.value,0,s.value,r],{stroke:yi.GUIDE_STROKE,strokeWidth:1,selectable:!1,evented:!1,excludeFromExport:!0}):new Vs([0,s.value,n,s.value],{stroke:yi.GUIDE_STROKE_ALT,strokeWidth:1,selectable:!1,evented:!1,excludeFromExport:!0});i.add(a),o.push(a)}return{lines:o}}function dU(i,e,t,n){if(e.length){i.save(),i.lineWidth=1.25;for(let r of e){if(i.beginPath(),i.strokeStyle=r.axis==="x"?yi.GUIDE_STROKE:yi.GUIDE_STROKE_ALT,r.axis==="x"){let o=r.value*t;i.moveTo(o,0),i.lineTo(o,n)}else{let o=r.value*n;i.moveTo(0,o),i.lineTo(t,o)}i.stroke()}i.restore()}}function uU(i,e){let t=[];for(let n of e){t.push({axis:"x",value:n.cx,reason:"object-center",sourceId:n.id}),t.push({axis:"y",value:n.cy,reason:"object-center",sourceId:n.id});let r=n.cx-n.halfW,o=n.cx+n.halfW,s=n.cy-n.halfH,a=n.cy+n.halfH;t.push({axis:"x",value:r+i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:o-i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:r-i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:o+i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:s+i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:a-i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:s-i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:a+i.halfH,reason:"object-edge",sourceId:n.id})}return t}function cD(i,e,t,n,r,o){let s=t.filter(c=>c.axis===i);if(!s.length)return{value:e,guide:null,lock:{active:!1,lockedValue:0}};if(o.active&&Math.abs(e-o.lockedValue)<=r){let d=s.find(u=>Math.abs(u.value-o.lockedValue)<=n);return{value:o.lockedValue,guide:d?{axis:i,value:o.lockedValue,reason:d.reason,sourceId:d.sourceId}:null,lock:o}}let a=null,l=Number.POSITIVE_INFINITY;for(let c of s){let d=Math.abs(e-c.value);d<l&&(a=c,l=d)}return!a||l>n?{value:e,guide:null,lock:{active:!1,lockedValue:0}}:{value:a.value,guide:{axis:i,value:a.value,reason:a.reason,sourceId:a.sourceId},lock:{active:!0,lockedValue:a.value}}}function fU(i,e,t){if(!e||e<=0)return null;let n=Math.round(i/e)*e;return Math.abs(i-n)<=t?n:null}function zi(){return{lockX:{active:!1,lockedValue:0},lockY:{active:!1,lockedValue:0}}}function qx(i,e,t,n,r,o){if(!r.snapEnabled)return{x:i.x,y:i.y,guides:[],state:zi()};let s=[],a=Math.max(r.tolerance,1e-4),l=a*Kr.SNAP_RELEASE_MULTIPLIER,c=[{axis:"x",value:n.x,reason:"canvas-center"},{axis:"y",value:n.y,reason:"canvas-center"},...uU(e,t)];if(r.snapToGrid){let f=fU(i.x,r.gridStepX,a);f!=null&&c.push({axis:"x",value:f,reason:"grid"});let h=fU(i.y,r.gridStepY,a);h!=null&&c.push({axis:"y",value:h,reason:"grid"})}let d=cD("x",i.x,c,a,l,o.lockX),u=cD("y",i.y,c,a,l,o.lockY);return d.guide&&s.push(d.guide),u.guide&&s.push(u.guide),{x:d.value,y:u.value,guides:s,state:{lockX:d.lock,lockY:u.lock}}}var Yl=class i{getScale(e,t){let n=Number.isFinite(e)?Math.max(e,0):0,r=Number.isFinite(t)?Math.max(t,0):0;return n<=0||r<=0?0:n/r}getScaleX(e,t){return this.getScale(e,t)}getScaleY(e,t){return this.getScale(e,t)}inchesToSvgUnits(e,t,n){let r=this.getScale(t,n);return r<=0||!Number.isFinite(e)?0:e*r}inchesToSvgUnitsX(e,t,n){return this.inchesToSvgUnits(e,t,n)}inchesToSvgUnitsY(e,t,n){return this.inchesToSvgUnits(e,t,n)}svgUnitsToInches(e,t,n){let r=this.getScale(t,n);return r<=0||!Number.isFinite(e)?0:e/r}svgUnitsToInchesX(e,t,n){return this.svgUnitsToInches(e,t,n)}svgUnitsToInchesY(e,t,n){return this.svgUnitsToInches(e,t,n)}clampSvgUnitsToPrintArea(e,t,n){let r=this.inchesToSvgUnits(Number.isFinite(n)?n:0,t,n);return Number.isFinite(e)?r<=0?Math.max(e,0):Math.min(Math.max(e,0),r):0}clampSvgUnitsToPrintAreaX(e,t,n){return this.clampSvgUnitsToPrintArea(e,t,n)}clampSvgUnitsToPrintAreaY(e,t,n){return this.clampSvgUnitsToPrintArea(e,t,n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ih=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-three-d-loader"]],decls:10,vars:0,consts:[[1,"pyramid-loader-overlay"],[1,"pyramid-loader"],[1,"wrapper"],[1,"side","side1"],[1,"side","side2"],[1,"side","side3"],[1,"side","side4"],[1,"shadow"],[1,"loading-model-text"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),kt(3,"span",3)(4,"span",4)(5,"span",5)(6,"span",6)(7,"span",7),ve()(),ue(8,"div",8),R(9,"Loading 3D Model..."),ve()())},styles:[".pyramid-loader-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#ffffffb3;z-index:50;border-radius:inherit;gap:20px}.loading-model-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#333;margin-top:10px;animation:_ngcontent-%COMP%_pulse 1.5s infinite ease-in-out}@keyframes _ngcontent-%COMP%_pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.pyramid-loader[_ngcontent-%COMP%]{position:relative;width:300px;height:300px;display:block;transform-style:preserve-3d;transform:rotateX(-20deg)}.wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;transform-style:preserve-3d;animation:_ngcontent-%COMP%_spin 4s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotateY(360deg)}}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side[_ngcontent-%COMP%]{width:70px;height:70px;position:absolute;inset:0;margin:auto;transform-origin:center top;clip-path:polygon(50% 0%,0% 100%,100% 100%)}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side1[_ngcontent-%COMP%]{transform:rotate(-30deg) rotateY(90deg);background:conic-gradient(rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--accent-color, 245 158 11)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side2[_ngcontent-%COMP%]{transform:rotate(30deg) rotateY(90deg);background:conic-gradient(rgb(var(--accent-color, 245 158 11)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--primary-color, 98 101 241)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side3[_ngcontent-%COMP%]{transform:rotateX(30deg);background:conic-gradient(rgb(var(--accent-color, 245 158 11)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--primary-color, 98 101 241)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side4[_ngcontent-%COMP%]{transform:rotateX(-30deg);background:conic-gradient(rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--accent-color, 245 158 11)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .shadow[_ngcontent-%COMP%]{width:60px;height:60px;background:rgb(var(--primary-color, 98 101 241));position:absolute;inset:0;margin:auto;transform:rotateX(90deg) translateZ(-40px);filter:blur(12px)}"],changeDetection:0})};var JZ=["canvasContainer"],QZ=(i,e)=>e.key,eJ=(i,e)=>e.id;function tJ(i,e){if(i&1){let t=Ae();x(0,"button",25),W("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onSelectThreeDVariant(r.id))}),R(1),C()}if(i&2){let t=e.$implicit,n=S(2);dt("active",t.id===n.selectedThreeDVariantId()),T(),wt(" ",t.name||t.key||"Model"," ")}}function nJ(i,e){if(i&1&&(x(0,"div",4),mt(1,tJ,2,3,"button",24,eJ),C()),i&2){let t=S();T(),gt(t.threeDVariants())}}function iJ(i,e){if(i&1){let t=Ae();x(0,"button",26),W("click",function(){let r=z(t).$implicit,o=S();return V(o.onApplyCameraPreset(r.key))}),R(1),C()}if(i&2){let t=e.$implicit,n=S();dt("active",t.key===n.currentCameraPreset()),q("disabled",!n.hasCurrentObject()),T(),wt(" ",t.label," ")}}function rJ(i,e){i&1&&U(0,"app-three-d-loader")}function oJ(i,e){if(i&1){let t=Ae();x(0,"div",27),W("click",function(){z(t);let r=S();return V(r.dismissTouchHint())}),x(1,"button",28),W("click",function(r){z(t);let o=S();return r.stopPropagation(),V(o.dismissTouchHint())}),U(2,"i",29),C(),x(3,"div",30)(4,"div",31),U(5,"span",32)(6,"span",33),C(),x(7,"div",34)(8,"h4"),R(9,"Tap text/logo, then drag to transform"),C(),x(10,"p"),R(11," Single-finger drag rotates the 3D model. Tap text/logo, then single-touch drag to move it. "),C()()(),x(12,"div",30)(13,"div",35),U(14,"span",32)(15,"span",32)(16,"span",36),C(),x(17,"div",34)(18,"h4"),R(19,"Pinch to zoom"),C(),x(20,"p"),R(21,"Use two fingers to zoom in and out."),C()()(),x(22,"div",30)(23,"div",37),U(24,"span",32)(25,"span",32)(26,"span",38),C(),x(27,"div",34)(28,"h4"),R(29,"Two-finger drag to pan"),C(),x(30,"p"),R(31,"Move your camera target without changing rotation."),C()()()()}}function sJ(i,e){if(i&1){let t=Ae();x(0,"button",39),W("click",function(){z(t);let r=S();return V(r.replayTouchHint())}),U(1,"i",40),C()}if(i&2){let t=S();q("disabled",!t.isTouchDevice())}}var Kx=class i{static TOUCH_HINT_STORAGE_KEY="designkit.3d.touchHintSeen";container=Lu("canvasContainer");svgText=Ds(null);isActive=ye(!0);threeDVariants=ye([]);selectedThreeDVariantId=ye(null);isModelLoading=ye(!1);mtlText=Ds(null);objText=Ds(null);materialSourceUrl=ye(null);showPlacementGuides=Ds(!1);placementZones=Ds([]);overlays=Ds([]);activeOverlayId=Ds(null);svgDimensions=Ds(null);overlayBounds=ye(null);gridEnabled=ye(!0);snapEnabled=ye(!0);gridSize=ye(Kr.THREE_D_GRID_SIZE);gridSizeInches=ye(1);printAreaWidthInches=ye(null);printAreaHeightInches=ye(null);svgViewBox=Ds({minX:0,minY:0,width:1e3,height:1e3});onUndo=Pt();onRedo=Pt();activeOverlayChange=Pt();overlayPositionChange=Pt();overlayResizeChange=Pt();overlayRotationChange=Pt();threeDVariantSelected=Pt();scene;camera;renderer;controls;raycaster=new sm;pointer=new yt;defaultCameraPosition=new $(0,50,200);defaultCameraTarget=new $(0,0,0);objectCenter=new $(0,0,0);animationId=F(0);svgTexture=F(null);currentObject=F(null);hasCurrentObject=Me(()=>!!this.currentObject());cameraPresets=F([{key:"front",label:"Front"},{key:"back",label:"Back"},{key:"left",label:"Left"},{key:"right",label:"Right"},{key:"top",label:"Top"},{key:"iso",label:"Iso"}]);hasThreeDVariantSwitch=Me(()=>this.threeDVariants().length>1);isDraggingOverlay3D=F(!1);draggingOverlayId=F(null);draggingOverlayOffset=F(null);pointerDownState=F(null);dragStartThresholdPx=F(6);objectFitDistance=F(200);resizeHandler=()=>this.onWindowResize();isAutoRotateEnabled=F(!1);textureMetrics=F(null);textureSize=F(2048);zoomInFactor=F(.85);zoomOutFactor=F(1.18);resizeEdgeTolerance=F(.012);rotateHandleMinOffsetNormalized=.06;rotateHandleOffsetFactor=.5;rotateHandleHitRadiusMultiplier=1.8;overlayControlColor="#6366f1";containerResizeObserver=null;overlayBoxCache=new Map;textMeasureContext=null;document=Z(Tn);originalMapByMaterial=new WeakMap;originalColorByMaterial=new WeakMap;compositeMapByMaterial=new WeakMap;activeCompositeMaps=new Set;handleThreePointerDown=e=>this.onThreePointerDown(e);handleThreePointerMove=e=>this.onThreePointerMove(e);handleThreePointerUp=()=>this.onThreePointerUp();handleThreeKeyDown=e=>this.onThreeKeyDown(e);keyboardMoveStepPx=1;keyboardRotationStepDeg=5;alignmentLabel=J3;uvGridModeEnabled=F(!1);gridSizeNormalized=F(Kr.THREE_D_GRID_SIZE);snapRuntimeState=F(zi());activeDragGuides=F([]);activeWorldPoint=F(null);sceneReady=F(!1);rotationAccumulatorDeg=0;currentCameraPreset=F(void 0);designHistory=Z(Gl);themeService=Z(th);printAreaMeasurementService=Z(Yl);canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;showTouchHint=F(!1);isTouchDevice=F(!1);touchHintTimerId=null;touchHintShownForSession=!1;constructor(){this.initializeTouchHintState(),Yt(()=>{let e=this.isActive();if(!this.isTouchDevice()){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}if(!e){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}this.touchHintShownForSession||(this.touchHintShownForSession=!0,this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}),Yt(()=>{this.overlays(),this.activeOverlayId(),this.svgDimensions(),this.svgViewBox(),this.overlayBoxCache.clear()}),Yt(()=>{this.themeService.activeThemeId(),this.themeService.activePrimaryId(),this.themeService.activeSecondaryId(),this.themeService.activeAccentId(),this.applySceneBackgroundFromTheme()}),Yt(()=>{let e=this.gridSize();this.gridSizeNormalized.set(e),hn(()=>this.rebuildSVGTexture())}),Yt(()=>{this.gridSizeInches(),this.printAreaWidthInches(),this.printAreaHeightInches(),hn(()=>this.rebuildSVGTexture())}),Yt(()=>{let e=this.sceneReady(),t=this.objText();this.mtlText(),this.materialSourceUrl(),!(!e||!t)&&hn(()=>{this.load3DModel()})})}initializeTouchHintState(){if(typeof window>"u")return;let e="ontouchstart"in window||navigator.maxTouchPoints>0;this.isTouchDevice.set(e)}clearTouchHintTimer(){this.touchHintTimerId&&(clearTimeout(this.touchHintTimerId),this.touchHintTimerId=null)}dismissTouchHint(){this.clearTouchHintTimer(),this.showTouchHint.set(!1)}replayTouchHint(){this.isTouchDevice()&&(this.touchHintShownForSession=!0,this.clearTouchHintTimer(),this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}ngAfterViewInit(){this.initScene(),this.animate(),this.rebuildSVGTexture(),this.sceneReady.set(!0)}initScene(){let e=this.container().nativeElement.clientWidth,t=this.container().nativeElement.clientHeight;this.scene=new id,this.applySceneBackgroundFromTheme(),this.camera=new pi(45,e/t,.1,1e3),this.camera.position.set(0,50,200),this.renderer=new Af({antialias:!0,logarithmicDepthBuffer:!0}),this.renderer.setSize(e,t),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),this.renderer.outputColorSpace=_n,this.renderer.toneMapping=dd,this.renderer.toneMappingExposure=1,this.applySceneBackgroundFromTheme(),this.container()?.nativeElement.appendChild(this.renderer.domElement);let n=new cd(16777215,.6);this.scene.add(n);let r=new Wo(16777215,1.2);r.position.set(100,150,100),r.castShadow=!1,this.scene.add(r);let o=new Wo(16777215,.6);o.position.set(-100,50,100),this.scene.add(o);let s=new Wo(16777215,.8);s.position.set(0,100,-150),this.scene.add(s);let a=new ld(16777215,13421772,.5);a.position.set(0,200,0),this.scene.add(a),this.controls=new Hx(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.1,this.controls.enablePan=!0,this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.autoRotateSpeed=8;let l=this.renderer.domElement;l.tabIndex=0,l.addEventListener("pointerdown",this.handleThreePointerDown),l.addEventListener("pointermove",this.handleThreePointerMove),l.addEventListener("pointerup",this.handleThreePointerUp),l.addEventListener("pointerleave",this.handleThreePointerUp),l.addEventListener("pointercancel",this.handleThreePointerUp),l.addEventListener("keydown",this.handleThreeKeyDown),typeof ResizeObserver<"u"&&(this.containerResizeObserver?.disconnect(),this.containerResizeObserver=new ResizeObserver(()=>this.onWindowResize()),this.container()?.nativeElement&&this.containerResizeObserver.observe(this.container().nativeElement)),window.addEventListener("resize",this.resizeHandler)}applySceneBackgroundFromTheme(){let t=(getComputedStyle(this.document.body).getPropertyValue("--surface-100").trim()||"248 250 252").match(/\d+(?:\.\d+)?/g)?.slice(0,3).map(o=>Number(o)),r=(t&&t.length===3&&t.every(o=>Number.isFinite(o))?new ut(Qt.clamp(t[0],0,255)/255,Qt.clamp(t[1],0,255)/255,Qt.clamp(t[2],0,255)/255):new ut(16317180)).clone().convertSRGBToLinear();this.scene&&(this.scene.background=r),this.renderer&&this.renderer.setClearColor(r,1)}onWindowResize(){let e=this.container().nativeElement.clientWidth,t=this.container().nativeElement.clientHeight;!e||!t||!this.camera||!this.renderer||(this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)))}resetCameraMetrics(){this.objectCenter.set(0,0,0);let e=200,t=this.defaultCameraPosition.distanceTo(this.defaultCameraTarget);this.objectFitDistance.set(t>0?t:e)}resetCameraPosition(){!this.camera||!this.controls||(this.camera.position.copy(this.defaultCameraPosition),this.camera.near=.1,this.camera.far=1e3,this.camera.up.set(0,1,0),this.camera.updateProjectionMatrix(),this.controls.target.copy(this.defaultCameraTarget),this.controls.autoRotate=this.isAutoRotateEnabled()&&!!this.currentObject(),this.controls.update())}async load3DModel(){try{this.resetCameraMetrics(),this.resetCameraPosition(),this.disposeCompositeMaterialMaps();let e=new Qf,t=new eh;if(this.mtlText()){let d=this.resolveMaterialResourcePath(this.materialSourceUrl()),u=this.normalizeMtlTexturePaths(this.mtlText(),d);debugger;let f=t.parse(u,d);f.preload(),e.setMaterials(f)}let n=e.parse(this.objText());this.stabilizeMeshGeometry(n);let r=new Ji().setFromObject(n),o=r.getSize(new $),s=Math.max(o.x,o.y,o.z);n.scale.setScalar(4/s);let a=r.getCenter(new $);n.position.sub(a);let l=d=>d?new Da({map:d.map??null,color:d.color??new ut(16777215),roughness:.8,metalness:.1}):new Da({color:16777215});n.traverse(d=>{d.isMesh&&(d.castShadow=!0,d.receiveShadow=!0,Array.isArray(d.material)?d.material=d.material.map(u=>l(u)):d.material=l(d.material))});let c=this.currentObject();c&&(this.restoreOriginalMaterialMaps(c),this.scene.remove(c)),this.scene.add(n),this.currentObject.set(n),this.svgTexture()&&this.applySVGTextureToOBJ(),this.fitCameraToObject(n)}catch(e){console.error(Q3.errorLoading3dModel,e)}}resolveMaterialResourcePath(e){if(!e)return"";try{if(typeof window<"u")return new URL(".",new URL(e,window.location.href)).toString()}catch{}let t=e.split("?")[0].split("#")[0],n=t.lastIndexOf("/");return n>=0?t.slice(0,n+1):""}normalizeMtlTexturePaths(e,t){return e.trim()?e.split(/\r?\n/).map(n=>this.normalizeMtlMapLine(n,t)).join(`
4613
4613
  `):e}normalizeMtlMapLine(e,t){let n=e.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!n)return e;let[,r,o,s]=n,a=s.trim().split(/\s+/);if(!a.length)return e;let l=a[a.length-1];if(this.isAbsoluteOrOnlineTexturePath(l))return e;let c=this.buildAbsoluteTexturePath(t,l);return c?(a[a.length-1]=c,`${r}${o} ${a.join(" ")}`):e}isAbsoluteOrOnlineTexturePath(e){let t=e.trim();return/^https?:\/\//i.test(t)||/^\/\//.test(t)}buildAbsoluteTexturePath(e,t){let r=t.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!r)return t;if(!e)return r;try{return new URL(r,e).toString()}catch{let o=e.endsWith("/")?"":"/";return`${e}${o}${r}`}}processSVGToTexture(e){this.renderSVGToTexture(e)}renderSVGToTexture(e){let t=this.textureSize(),n=document.createElement("canvas");n.width=t,n.height=t;let r=n.getContext("2d");r.clearRect(0,0,t,t);let o=new Blob([e],{type:Wd}),s=URL.createObjectURL(o),a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let l=a.width/a.height,c=t,d=t;l>1?d=t/l:c=t*l,r.drawImage(a,0,0,c,d),this.drawPlacementGuidesOnTexture(r,c,d),this.textureMetrics.set({drawWidth:c,drawHeight:d}),URL.revokeObjectURL(s);let u=new Rs(n);u.colorSpace=_n,u.minFilter=bo,u.magFilter=Wn,u.anisotropy=this.renderer.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Li,u.wrapT=Li,u.needsUpdate=!0,this.svgTexture()?.dispose(),this.svgTexture.set(u),this.applySVGTextureToOBJ()},a.src=s}rebuildSVGTexture(){if(!this.svgText()){this.svgTexture()?.dispose(),this.svgTexture.set(null),this.restoreOriginalMaterialMaps(this.currentObject()),this.disposeCompositeMaterialMaps();return}this.overlayBoxCache.clear();let e=this.textureSize(),t=document.createElement("canvas");t.width=e,t.height=e;let n=t.getContext("2d");n.clearRect(0,0,e,e);let r=new Blob([this.svgText()],{type:Wd}),o=URL.createObjectURL(r),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let a=s.width/s.height,l=e,c=e;a>1?c=e/a:l=e*a,n.drawImage(s,0,0,l,c),this.drawPlacementGuidesOnTexture(n,l,c),this.textureMetrics.set({drawWidth:l,drawHeight:c}),URL.revokeObjectURL(o);let d=new Rs(t);d.colorSpace=_n,d.flipY=!0,d.needsUpdate=!0,this.svgTexture()?.dispose(),this.svgTexture.set(d),this.applySVGTextureToOBJ()},s.src=o}applySVGTextureToOBJ(){let e=this.currentObject(),t=this.svgTexture();if(!e||!t)return;let n=this.getTextureSourceData(t);n&&e.traverse(r=>{r.isMesh&&r.material&&(Array.isArray(r.material)?r.material.forEach(o=>{this.applyBlendedMapToMaterial(o,t,n)}):this.applyBlendedMapToMaterial(r.material,t,n))})}applyBlendedMapToMaterial(e,t,n){if(!this.isMapCapableMaterial(e))return;this.originalMapByMaterial.has(e)||this.originalMapByMaterial.set(e,e.map??null);let r=this.originalMapByMaterial.get(e)??null;if(this.normalizeMaterialColorForTexture(e,!!r),!r){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let o=this.getTextureSourceData(r);if(!o){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let s=this.getSourceDimensions(o);if(!s){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let a=this.buildTextureDetailPreservingCompositeCanvas(o,n,s.width,s.height);if(!a){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}this.disposeCompositeMaterialMapFor(e);let l=new Rs(a);this.copyTextureSamplingAndTransformSettings(l,r,t),l.needsUpdate=!0,this.compositeMapByMaterial.set(e,l),this.activeCompositeMaps.add(l),e.map=l,e.needsUpdate=!0}copyTextureSamplingAndTransformSettings(e,t,n){e.colorSpace=t.colorSpace??n.colorSpace,e.flipY=t.flipY,e.wrapS=t.wrapS,e.wrapT=t.wrapT,e.magFilter=t.magFilter,e.minFilter=t.minFilter,e.anisotropy=t.anisotropy||n.anisotropy,e.generateMipmaps=t.generateMipmaps,e.premultiplyAlpha=t.premultiplyAlpha,e.unpackAlignment=t.unpackAlignment,e.repeat.copy(t.repeat),e.offset.copy(t.offset),e.center.copy(t.center),e.rotation=t.rotation,e.matrixAutoUpdate=t.matrixAutoUpdate,e.matrix.copy(t.matrix)}buildTextureDetailPreservingCompositeCanvas(e,t,n,r){let o=document.createElement("canvas");o.width=n,o.height=r;let s=o.getContext("2d");if(!s)return null;try{return s.clearRect(0,0,n,r),s.globalCompositeOperation="source-over",s.globalAlpha=1,s.drawImage(e,0,0,n,r),s.globalCompositeOperation="multiply",s.globalAlpha=1,s.drawImage(t,0,0,n,r),s.globalCompositeOperation="source-over",s.globalAlpha=1,o}catch{let a=document.createElement("canvas");a.width=n,a.height=r;let l=a.getContext("2d");return l?(l.clearRect(0,0,n,r),l.drawImage(e,0,0,n,r),l.drawImage(t,0,0,n,r),a):null}}getTextureSourceData(e){let t=e.source?.data??e.image;if(!t)return null;let n=this.getSourceDimensions(t);return!n||n.width<=0||n.height<=0?null:t}getSourceDimensions(e){if(e instanceof HTMLVideoElement)return!e.videoWidth||!e.videoHeight?null:{width:e.videoWidth,height:e.videoHeight};let t=e;return!t.width||!t.height?null:{width:t.width,height:t.height}}isMapCapableMaterial(e){return"map"in e}isColorCapableMaterial(e){return"color"in e&&e.color instanceof ut}normalizeMaterialColorForTexture(e,t){if(this.isColorCapableMaterial(e)){if(this.originalColorByMaterial.has(e)||this.originalColorByMaterial.set(e,e.color.clone()),t){e.color.copy(this.originalColorByMaterial.get(e));return}e.color.set(aD)}}disposeCompositeMaterialMapFor(e){let t=this.compositeMapByMaterial.get(e);t&&(this.activeCompositeMaps.delete(t),t.dispose(),this.compositeMapByMaterial.delete(e))}disposeCompositeMaterialMaps(){this.activeCompositeMaps.forEach(e=>e.dispose()),this.activeCompositeMaps.clear()}restoreOriginalMaterialMaps(e){e&&e.traverse(t=>{if(!t.isMesh||!t.material)return;(Array.isArray(t.material)?t.material:[t.material]).forEach(r=>{let o=!1;this.isMapCapableMaterial(r)&&(this.disposeCompositeMaterialMapFor(r),this.originalMapByMaterial.has(r)&&(r.map=this.originalMapByMaterial.get(r)??null,o=!0)),this.isColorCapableMaterial(r)&&this.originalColorByMaterial.has(r)&&(r.color.copy(this.originalColorByMaterial.get(r)),o=!0),o&&(r.needsUpdate=!0)})})}drawPlacementGuidesOnTexture(e,t,n){let r=this.svgViewBox()??{minX:0,minY:0,width:this.svgDimensions()?.width??t,height:this.svgDimensions()?.height??n},o=Math.max(r.width,1),s=Math.max(r.height,1),a=t/o,l=n/s,c=-r.minX*a,d=-r.minY*l;if(this.gridEnabled()){let u=this.getGridStepInches(),f=this.getTextureGridStepPixels(t,n,u),h=this.getTextureMajorStepPixels(t,n);sU(e,t,n,f.x,f.y,h.x,h.y)}if(this.showPlacementGuides()&&this.placementZones().length){e.save();let u=Math.max(6,Math.min(t,n)/48);e.setLineDash([u,u*.6]),e.lineWidth=Math.max(1,Math.min(a,l)),e.strokeStyle="#df1616",e.shadowColor="rgba(15,23,42,0.35)",e.shadowBlur=4;for(let f of this.placementZones()){if(!(f.allowedKinds.includes("text")||f.allowedKinds.includes("logo")))continue;let p=f.bounds.width*a,v=f.bounds.height*l;if(p<=0||v<=0)continue;let g=c+f.bounds.x*a,m=d+f.bounds.y*l;e.strokeRect(g,m,p,v)}e.restore()}dU(e,this.activeDragGuides(),t,n),this.drawActiveOverlayBoundsOnTexture(e,t,n)}drawActiveOverlayBoundsOnTexture(e,t,n){let r=this.findOverlayById(this.activeOverlayId());if(!r)return;let o=this.svgViewBox()??{minX:0,minY:0,width:this.svgDimensions()?.width??t,height:this.svgDimensions()?.height??n},s=Math.max(o.width,1),a=Math.max(o.height,1),l=t/s,c=n/a,d=-o.minX*l,u=-o.minY*c,f=this.getOverlayBoundingRect();if(!f.width||!f.height)return;let h=this.getOverlayBoxInfo(r,!1);if(!h)return;let p=f.x+h.cx*f.width,v=f.y+h.cy*f.height,g=h.halfW*2*f.width*l,m=h.halfH*2*f.height*c,b=f.height*c,y=d+p*l,_=u+v*c;e.save(),e.translate(y,_),e.rotate(h.angleRad),e.strokeStyle=this.overlayControlColor,e.lineWidth=Math.max(1.75,Math.min(l,c)*1.2),e.lineJoin="round",e.lineCap="round",e.shadowColor="rgba(15, 23, 42, 0.15)",e.shadowBlur=2,e.strokeRect(-g/2,-m/2,g,m),e.fillStyle=aD;let w=Math.max(4,Math.min(g,m)*.025),D=[[-g/2,-m/2],[g/2,-m/2],[-g/2,m/2],[g/2,m/2],[0,-m/2],[0,m/2],[-g/2,0],[g/2,0]];for(let[E,I]of D)e.beginPath(),e.arc(E,I,w,0,Math.PI*2),e.fill(),e.stroke();let P={x:0,y:this.getRotationHandleLocal(h).y*b};e.beginPath(),e.moveTo(0,-m/2),e.lineTo(P.x,P.y),e.stroke(),e.beginPath(),e.arc(P.x,P.y,w,0,Math.PI*2),e.fill(),e.stroke(),e.restore()}animate=()=>{this.animationId.set(requestAnimationFrame(this.animate)),this.controls.update(),this.renderer.render(this.scene,this.camera)};fitCameraToObject(e){let t=new Ji().setFromObject(e),n=t.getSize(new $),r=t.getCenter(new $),o=Math.max(n.x,n.y,n.z),s=this.camera.fov*(Math.PI/180),a=Math.abs(o/2/Math.tan(s/2));a*=1.5,this.camera.position.set(r.x,r.y,a),this.camera.near=Math.max(a/25,.1),this.camera.far=Math.max(a*25,this.camera.near+50),this.camera.updateProjectionMatrix(),this.objectCenter.copy(r),this.objectFitDistance.set(Math.max(a,1)),this.camera.up.set(0,1,0),this.controls.target.copy(r),this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.update()}ngOnDestroy(){if(cancelAnimationFrame(this.animationId()),this.clearTouchHintTimer(),this.restoreOriginalMaterialMaps(this.currentObject()),this.disposeCompositeMaterialMaps(),this.svgTexture()?.dispose(),this.svgTexture.set(null),this.containerResizeObserver?.disconnect(),this.containerResizeObserver=null,this.renderer){let e=this.renderer.domElement;e.removeEventListener("pointerdown",this.handleThreePointerDown),e.removeEventListener("pointermove",this.handleThreePointerMove),e.removeEventListener("pointerup",this.handleThreePointerUp),e.removeEventListener("pointerleave",this.handleThreePointerUp),e.removeEventListener("pointercancel",this.handleThreePointerUp),e.removeEventListener("keydown",this.handleThreeKeyDown),this.renderer.dispose()}window.removeEventListener("resize",this.resizeHandler)}normalizeModelUVs(e){e.traverse(t=>{if(!t.isMesh)return;let n=t.geometry;if(!n?.attributes?.uv)return;let r=n.attributes.uv.array,o=1/0,s=1/0,a=-1/0,l=-1/0;for(let u=0;u<r.length;u+=2)o=Math.min(o,r[u]),s=Math.min(s,r[u+1]),a=Math.max(a,r[u]),l=Math.max(l,r[u+1]);let c=a-o,d=l-s;for(let u=0;u<r.length;u+=2)r[u]=(r[u]-o)/c,r[u+1]=(r[u+1]-s)/d;n.attributes.uv.needsUpdate=!0})}getUVBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;if(e.traverse(s=>{if(!s.isMesh)return;let a=s.geometry;if(!a?.attributes?.uv)return;let l=a.attributes.uv.array;for(let c=0;c<l.length;c+=2)t=Math.min(t,l[c]),n=Math.min(n,l[c+1]),r=Math.max(r,l[c]),o=Math.max(o,l[c+1])}),!isFinite(t))throw new Error("Model has no UVs");return{minU:t,minV:n,maxU:r,maxV:o,width:r-t,height:o-n,aspect:(r-t)/(o-n)}}cloneMaterial(e){return Array.isArray(e)?e.map(t=>t.clone()):e?.clone?e.clone():e}stabilizeMeshGeometry(e){e.traverse(t=>{let n=t;if(!n.isMesh||!(n.geometry instanceof ni))return;let r=jx(n.geometry.clone(),1e-5);r.deleteAttribute("normal"),r.computeVertexNormals(),r.normalizeNormals(),r.computeBoundingBox(),r.computeBoundingSphere(),n.geometry.dispose(),n.geometry=r,(Array.isArray(n.material)?n.material:[n.material]).forEach(s=>{s&&("flatShading"in s&&(s.flatShading=!1),s.side=Zi,s.needsUpdate=!0)})})}onThreePointerDown(e){if(e.button!==0)return;this.renderer?.domElement?.focus(),e.preventDefault(),this.updatePointerFromEvent(e);let t=this.pickModelIntersection();if(!t?.uv){this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null),this.pointerDownState.set(null),this.activeDragGuides.set([]),this.snapRuntimeState.set(zi()),this.controls.enabled=!0,this.activeOverlayId()&&this.activeOverlayChange.emit(null);return}let n=this.resolveOverlayUnderPointer(t.uv.clone());if(!n){this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null),this.pointerDownState.set(null),this.activeDragGuides.set([]),this.snapRuntimeState.set(zi()),this.controls.enabled=!0,this.activeOverlayId()&&this.activeOverlayChange.emit(null);return}let{overlay:r,point:o}=n;this.activeOverlayChange.emit(r);let s=this.getOverlayBoxInfo(r,!0),a=this.resizeEdgeTolerance(),l="move",c=s?.halfW??.1,d=s?.halfH??.1,u=s?.angleRad??0,f,h;if(s){let p=this.toOverlayLocal(o,s),v=Math.abs(Math.abs(p.x)-s.halfW)<=a,g=Math.abs(Math.abs(p.y)-s.halfH)<=a;this.isNearRotationHandle(p,s,a)?(l="rotate",f=Math.atan2(p.y,p.x),this.rotationAccumulatorDeg=0):(v||g)&&(l="resize",h=v&&g?"both":v?"x":"y")}this.isDraggingOverlay3D.set(l!=="move"),this.draggingOverlayId.set(l!=="move"?r.id:null),this.draggingOverlayOffset.set(null),this.pointerDownState.set({overlayId:r.id,startClientX:e.clientX,startClientY:e.clientY,startNormalizedPoint:o,overlayStart:{x:r.normalizedX,y:r.normalizedY},mode:l,bounds:{width:c*2,height:d*2},startFontSize:this.isTextOverlay(r)?r.fontSize:void 0,startHorizontalScale:this.isTextOverlay(r)?r.horizontalScale??1:void 0,startVerticalScale:this.isTextOverlay(r)?r.verticalScale??1:void 0,startNormalizedWidth:this.isLogoOverlay(r)?r.normalizedWidth:void 0,startNormalizedHeight:this.isLogoOverlay(r)?r.normalizedHeight:void 0,angleRad:u,startAngleDeg:r.angle??0,accumulatedAngleDeg:0,startPointerAngleRad:f,resizeAxis:h}),this.controls.enabled=!1}onThreePointerMove(e){if(!this.pointerDownState()&&(!this.isDraggingOverlay3D()||!this.draggingOverlayId())){if(!this.overlays().length){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}this.updatePointerFromEvent(e);let c=this.pickModelIntersection();if(!c?.uv){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}let d=this.resolveOverlayUnderPointer(c.uv.clone());if(!d){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}this.setResizeCursor(d.overlay,d.point);return}e.preventDefault(),this.updatePointerFromEvent(e);let t=this.pickModelIntersection();if(!t?.uv)return;let n=this.pointerDownState();if(n?.mode==="resize"){let c=this.findOverlayById(n.overlayId);if(!c)return;let d=this.getNormalizedPointForView(t.uv.clone());if(!d)return;let u=this.getOverlayBoxInfo(c,!0);if(!u)return;let f=this.toOverlayLocal(d,{cx:n.overlayStart.x,cy:n.overlayStart.y,halfW:u.halfW,halfH:u.halfH,angleRad:n.angleRad??0}),h=Math.max(Math.abs(f.x),.01),p=Math.max(Math.abs(f.y),.01),v=Math.max(n.bounds.width,.02),g=Math.max(n.bounds.height,.02),m=h*2/v,b=p*2/g,y=n.resizeAxis??"both",_=y==="both"?(m+b)/2:y==="x"?m:b;if(this.isTextOverlay(c)&&n.startFontSize)if(c.lockAspectRatio??!0){let D=Math.max(6,n.startFontSize*_);this.overlayResizeChange.emit({overlay:c,fontSize:D})}else{let D=Math.max(n.startHorizontalScale??1,.1),A=Math.max(n.startVerticalScale??1,.1),P=y==="y"?D:Math.min(Math.max(D*m,.1),10),E=y==="x"?A:Math.min(Math.max(A*b,.1),10);this.overlayResizeChange.emit({overlay:c,horizontalScale:P,verticalScale:E})}else if(this.isLogoOverlay(c)&&n.startNormalizedWidth&&n.startNormalizedHeight){let w=c.lockAspectRatio??!0,D=y==="y"?n.startNormalizedWidth:Math.min(Math.max(n.startNormalizedWidth*m,.02),1),A=y==="x"?n.startNormalizedHeight:Math.min(Math.max(n.startNormalizedHeight*b,.02),1),P=w?Math.min(Math.max(n.startNormalizedWidth*_,n.startNormalizedWidth*.02),1):D,E=w?Math.min(Math.max(n.startNormalizedHeight*_,n.startNormalizedHeight*.02),1):A;this.overlayResizeChange.emit({overlay:c,normalizedWidth:P,normalizedHeight:E})}return}if(n?.mode==="rotate"){let c=this.findOverlayById(n.overlayId);if(!c)return;let d=this.getOverlayBoxInfo(c,!0);if(!d)return;let u=this.getNormalizedPointForView(t.uv.clone());if(!u)return;let f=this.toOverlayLocal(u,d),h=Math.atan2(f.y,f.x),p=n.startPointerAngleRad??0,v=(h-p)*(180/Math.PI);v>180?v-=360:v<=-180&&(v+=360),this.rotationAccumulatorDeg+=v;let g=(n.startAngleDeg??0)+this.rotationAccumulatorDeg;Math.abs(v)>.1&&this.overlayRotationChange.emit({overlay:c,angle:g}),n.startPointerAngleRad=h,this.renderer.domElement.style.cursor="crosshair";return}if(!this.isDraggingOverlay3D()){let c=this.pointerDownState();if(!c||c.overlayId!==this.activeOverlayId()||Math.hypot(e.clientX-c.startClientX,e.clientY-c.startClientY)<this.dragStartThresholdPx())return;let u=this.findOverlayById(c.overlayId);if(!u)return;this.isDraggingOverlay3D.set(!0),this.draggingOverlayId.set(u.id),this.draggingOverlayOffset.set({dx:c.startNormalizedPoint.x-c.overlayStart.x,dy:c.startNormalizedPoint.y-c.overlayStart.y}),this.renderer.domElement.style.cursor="grabbing"}if(!this.draggingOverlayId())return;let r=this.findOverlayById(this.draggingOverlayId());if(!r)return;let o=this.getNormalizedPointForView(t.uv.clone());if(!o)return;this.activeWorldPoint.set(t.point?.clone?.()??null);let s=this.draggingOverlayOffset()??{dx:0,dy:0},a=o.x-s.dx,l=o.y-s.dy;if(this.snapEnabled()){let c=this.getOverlayBoxInfo(r,!1),d={id:r.id,cx:a,cy:l,halfW:c?.halfW??.05,halfH:c?.halfH??.05},u=this.overlays().filter(h=>h.id!==r.id).map(h=>{let p=this.getOverlayBoxInfo(h,!1);return p?{id:h.id,cx:p.cx,cy:p.cy,halfW:p.halfW,halfH:p.halfH}:null}).filter(h=>!!h),f=qx({x:a,y:l},d,u,{x:.5,y:.5},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:this.getGridStepNormalizedX(),gridStepY:this.getGridStepNormalizedY(),tolerance:Kr.THREE_D_SNAP_TOLERANCE_NORMALIZED},this.snapRuntimeState());a=f.x,l=f.y,this.activeDragGuides.set(f.guides),this.snapRuntimeState.set(f.state)}else this.snapRuntimeState.set(zi()),this.activeDragGuides.set([]);Math.abs(a-r.normalizedX)<2e-4&&Math.abs(l-r.normalizedY)<2e-4||(this.overlayPositionChange.emit({overlay:r,normalizedX:a,normalizedY:l}),this.renderer.domElement.style.cursor="grabbing")}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}onThreeKeyDown(e){let t=e.key.toLowerCase();if(e.ctrlKey||e.metaKey){if(t==="z"){e.shiftKey?this.onRedo.emit():this.onUndo.emit(),e.preventDefault(),e.stopPropagation();return}t==="y"&&(this.onRedo.emit(),e.preventDefault(),e.stopPropagation());return}let n=this.resolveKeyboardTargetOverlay();if(!n)return;let r=e.shiftKey?10:this.keyboardMoveStepPx,o=e.shiftKey?this.keyboardRotationStepDeg*3:this.keyboardRotationStepDeg;switch(t){case"arrowup":this.emitOverlayNudge(n,0,-r);break;case"arrowdown":this.emitOverlayNudge(n,0,r);break;case"arrowleft":this.emitOverlayNudge(n,-r,0);break;case"arrowright":this.emitOverlayNudge(n,r,0);break;case"q":case"[":this.overlayRotationChange.emit({overlay:n,angle:this.normalizeAngle((n.angle??0)-o)});break;case"e":case"]":this.overlayRotationChange.emit({overlay:n,angle:this.normalizeAngle((n.angle??0)+o)});break;default:return}e.preventDefault(),e.stopPropagation()}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.activeOverlayChange.emit(n),n):null}emitOverlayNudge(e,t,n){let r=this.getOverlayBoundingRect();r.width<=0||r.height<=0||this.overlayPositionChange.emit({overlay:e,normalizedX:e.normalizedX+t/r.width,normalizedY:e.normalizedY+n/r.height})}onThreePointerUp(){let e=this.isDraggingOverlay3D();this.pointerDownState.set(null),this.rotationAccumulatorDeg=0,this.isDraggingOverlay3D()&&(this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null)),this.controls.enabled=!0,this.activeDragGuides.set([]),this.snapRuntimeState.set(zi()),this.activeWorldPoint.set(null),e&&this.rebuildSVGTexture(),this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto")}getRotationHandleLocal(e){return{x:0,y:-(e.halfH+Math.max(this.rotateHandleMinOffsetNormalized,e.halfH*this.rotateHandleOffsetFactor))}}isNearRotationHandle(e,t,n){let r=this.getRotationHandleLocal(t),o=Math.max(.012,n*this.rotateHandleHitRadiusMultiplier);return Math.hypot(e.x-r.x,e.y-r.y)<=o}normalizeAngle(e){return Number.isFinite(e)?Math.round(e*10)/10:0}onSelectThreeDVariant(e){let t=e?.trim()??"";!t||t===this.selectedThreeDVariantId()||this.threeDVariantSelected.emit(t)}onApplyCameraPreset(e){if(!this.currentObject()||!this.controls||!this.camera)return;this.currentCameraPreset.set(e);let t=this.objectCenter.clone(),n=Math.max(this.objectFitDistance(),1),r=new $;switch(e){case"front":r.set(0,0,n),this.camera.up.set(0,1,0);break;case"back":r.set(0,0,-n),this.camera.up.set(0,1,0);break;case"left":r.set(-n,0,0),this.camera.up.set(0,1,0);break;case"right":r.set(n,0,0),this.camera.up.set(0,1,0);break;case"top":r.set(0,n,0),this.camera.up.set(0,0,-1);break;case"iso":{let s=n*.85;r.set(s,s,s),this.camera.up.set(0,1,0);break}default:return}let o=t.clone().add(r);this.camera.position.copy(o),this.camera.lookAt(t),this.controls.target.copy(t),this.controls.update()}onCameraZoom(e){if(!this.currentObject()||!this.controls||!this.camera)return;let t=this.controls.target.clone(),n=this.camera.position.clone().sub(t),r=e==="in"?this.zoomInFactor():this.zoomOutFactor();n.multiplyScalar(r);let o=t.clone().add(n),s=o.clone().sub(t).length(),a=Math.max(this.objectFitDistance()*.25,5),l=Math.max(this.objectFitDistance()*8,this.objectFitDistance()+1);s<a||s>l||(this.camera.position.copy(o),this.camera.lookAt(t),this.controls.update())}onToggleAutoRotate(){!this.currentObject()||!this.controls||(this.isAutoRotateEnabled.update(e=>!e),this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.update())}onUvGridToggle(){this.uvGridModeEnabled.update(e=>!e),this.rebuildSVGTexture()}onGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&(this.gridSizeNormalized.set(Math.max(.01,Math.min(.2,t))),this.rebuildSVGTexture())}getGridStepInches(){let e=this.gridSizeInches();return Number.isFinite(e)&&e>0?Math.max(.01,e):1}getGridStepNormalizedX(){let e=this.printAreaWidthInches();return Number.isFinite(e)&&e>0?this.getGridStepInches()/e:Math.max(this.gridSizeNormalized(),.01)}getGridStepNormalizedY(){let e=this.printAreaHeightInches();return Number.isFinite(e)&&e>0?this.getGridStepInches()/e:Math.max(this.gridSizeNormalized(),.01)}getTextureGridStepPixels(e,t,n){let r=this.printAreaWidthInches(),o=this.printAreaHeightInches(),s=Number.isFinite(r)&&r>0?e*n/r:Math.max(e*this.gridSizeNormalized(),1),a=Number.isFinite(o)&&o>0?t*n/o:Math.max(t*this.gridSizeNormalized(),1);return{x:Math.max(s,.5),y:Math.max(a,.5)}}getTextureMajorStepPixels(e,t){let r=this.printAreaWidthInches(),o=this.printAreaHeightInches(),s=Number.isFinite(r)&&r>0?e*1/r:Math.max(e*this.gridSizeNormalized(),1),a=Number.isFinite(o)&&o>0?t*1/o:Math.max(t*this.gridSizeNormalized(),1);return{x:Math.max(s,.5),y:Math.max(a,.5)}}onResetCamera(){let e=this.currentObject();if(e){this.fitCameraToObject(e);return}this.resetCameraPosition()}updatePointerFromEvent(e){let t=this.renderer?.domElement;if(!t)return;let n=t.getBoundingClientRect();this.pointer.x=(e.clientX-n.left)/n.width*2-1,this.pointer.y=-((e.clientY-n.top)/n.height)*2+1}pickModelIntersection(){let e=this.currentObject();if(!e)return null;this.raycaster.setFromCamera(this.pointer,this.camera);let t=this.raycaster.intersectObject(e,!0);return t.length?t[0]:null}isTextOverlay(e){return e.kind==="text"}isLogoOverlay(e){return e.kind==="logo"}resolveOverlayUnderPointer(e){let t=this.getNormalizedPointForView(e);if(!t)return null;let n=[...this.overlays()].reverse();for(let r of n){if(this.isTextOverlay(r)&&r.text.trim().length===0)continue;let o=this.getOverlayBoxInfo(r,!0);if(!o)continue;let s=this.toOverlayLocal(t,o),a=Math.abs(s.x)<=o.halfW&&Math.abs(s.y)<=o.halfH,l=this.isNearRotationHandle(s,o,this.resizeEdgeTolerance());if(a||l)return{overlay:r,point:t}}return null}setResizeCursor(e,t){let n=this.getOverlayBoxInfo(e,!0);if(!n||!this.renderer?.domElement)return;let r=this.resizeEdgeTolerance(),o=this.toOverlayLocal(t,n),s=Math.abs(Math.abs(o.x)-n.halfW)<=r,a=Math.abs(Math.abs(o.y)-n.halfH)<=r,l=this.isNearRotationHandle(o,n,r),c="grab";l?c="crosshair":s&&a?c="nwse-resize":s?c="ew-resize":a&&(c="ns-resize"),this.renderer.domElement.style.cursor=c}toOverlayLocal(e,t){let n=e.x-t.cx,r=e.y-t.cy,o=Math.cos(-t.angleRad),s=Math.sin(-t.angleRad);return{x:n*o-r*s,y:n*s+r*o}}getNormalizedPointForView(e){let t=this.textureMetrics()??{drawWidth:this.textureSize(),drawHeight:this.textureSize()};if(!this.svgViewBox().width||!this.svgViewBox().height)return null;let n=Qt.clamp(e.x,0,1),r=Qt.clamp(e.y,0,1),o=n*this.textureSize(),s=(1-r)*this.textureSize(),a=Math.min(Math.max(o,0),t.drawWidth),l=Math.min(Math.max(s,0),t.drawHeight),c=this.svgViewBox().minX+(t.drawWidth?a/t.drawWidth*this.svgViewBox().width:0),d=this.svgViewBox().minY+(t.drawHeight?l/t.drawHeight*this.svgViewBox().height:0),u=this.getOverlayBoundingRect();return!u.width||!u.height?null:{x:(c-u.x)/u.width,y:(d-u.y)/u.height}}getOverlayBoundingRect(){let e=this.overlayBounds();if(e&&e.width>0&&e.height>0)return e;let t=this.svgViewBox();if(t.width>0&&t.height>0)return{x:t.minX,y:t.minY,width:t.width,height:t.height};let n=null,r=this.svgDimensions(),o=r?{width:r.width,height:r.height,x:t.minX,y:t.minY}:null;return Wx(n,o)}getTextMeasureContext(){if(this.textMeasureContext)return this.textMeasureContext;if(typeof document>"u")return null;let e=document.createElement("canvas");return this.textMeasureContext=e.getContext("2d"),this.textMeasureContext}measureTextOverlaySizeInSvg(e){let t=Math.max(e.fontSize,1),n=e.lineHeight??1.2,r=Math.max(t*n,t),o=(e.text||"").split(/\r?\n/),s=o.length?o:[""],a=e.letterSpacing??0,l=e.fontStyle??"normal",c=e.fontWeight??"normal",d=(e.fontFamily??"sans-serif").trim()||"sans-serif",u=t*.6,f=this.getTextMeasureContext();f&&(f.font=`${l} ${c} ${t}px ${d}`);for(let _ of s){let w=_.length?_:" ",D=f?f.measureText(w).width:w.length*t*.58,A=Math.max(w.length-1,0)*a;u=Math.max(u,D+A)}let h=Number.isFinite(e.horizontalScale)?Math.max(e.horizontalScale,.1):1,p=Number.isFinite(e.verticalScale)?Math.max(e.verticalScale,.1):1,v=Number.isFinite(e.strokeWidth)?e.strokeWidth:0,g=Number.isFinite(e.secondStrokeWidth)?e.secondStrokeWidth:0,m=g>0?(v+g)*2:v*2,b=Math.max(u+m,t*.6),y=Math.max(r*s.length+m,r);return{width:b*h,height:y*p}}getOverlayBoxInfo(e,t=!0){let n=this.getOverlayBoundingRect();if(!n.width||!n.height)return null;let r=`${e.id}:${t?"hit":"draw"}`,o=e.kind==="text"?[e.kind,e.text,e.fontSize,e.fontFamily??"",e.fontStyle??"",e.fontWeight??"",e.letterSpacing??"",e.lineHeight??"",e.horizontalScale??1,e.verticalScale??1,e.strokeWidth??0,e.secondStrokeWidth??0,e.normalizedX,e.normalizedY,e.angle??0,n.width,n.height,t?1:0].join("|"):[e.kind,e.normalizedWidth,e.normalizedHeight,e.normalizedX,e.normalizedY,e.angle??0,n.width,n.height,t?1:0].join("|"),s=this.overlayBoxCache.get(r);if(s&&s.signature===o)return s.value;let a,l,c=t?.004:.0015,d=.0025;if(e.kind==="text"){let p=e,v=this.measureTextOverlaySizeInSvg(p);a=v.width,l=v.height,c=t?.005:.002,d=.002}else{let p=e,v=Math.max(p.normalizedWidth,.02),g=Math.max(p.normalizedHeight,.02);a=v*n.width,l=g*n.height,c=t?.008:.004,d=.01}let u=Math.max(a/Math.max(n.width,1)/2,0),f=Math.max(l/Math.max(n.height,1)/2,0),h={cx:e.normalizedX,cy:e.normalizedY,halfW:Math.max(u+c,d),halfH:Math.max(f+c,d),angleRad:(e.angle??0)*Math.PI/180};return this.overlayBoxCache.set(r,{signature:o,value:h}),h}onRedoClick(){this.canRedo()&&this.onRedo.emit()}onUndoClick(){this.canUndo()&&this.onUndo.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-three-d-ui"]],viewQuery:function(t,n){t&1&&ll(n.container,JZ,5),t&2&&Vc()},inputs:{svgText:[1,"svgText"],isActive:[1,"isActive"],threeDVariants:[1,"threeDVariants"],selectedThreeDVariantId:[1,"selectedThreeDVariantId"],isModelLoading:[1,"isModelLoading"],mtlText:[1,"mtlText"],objText:[1,"objText"],materialSourceUrl:[1,"materialSourceUrl"],showPlacementGuides:[1,"showPlacementGuides"],placementZones:[1,"placementZones"],overlays:[1,"overlays"],activeOverlayId:[1,"activeOverlayId"],svgDimensions:[1,"svgDimensions"],overlayBounds:[1,"overlayBounds"],gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],gridSize:[1,"gridSize"],gridSizeInches:[1,"gridSizeInches"],printAreaWidthInches:[1,"printAreaWidthInches"],printAreaHeightInches:[1,"printAreaHeightInches"],svgViewBox:[1,"svgViewBox"]},outputs:{svgText:"svgTextChange",mtlText:"mtlTextChange",objText:"objTextChange",showPlacementGuides:"showPlacementGuidesChange",placementZones:"placementZonesChange",overlays:"overlaysChange",activeOverlayId:"activeOverlayIdChange",svgDimensions:"svgDimensionsChange",svgViewBox:"svgViewBoxChange",onUndo:"onUndo",onRedo:"onRedo",activeOverlayChange:"activeOverlayChange",overlayPositionChange:"overlayPositionChange",overlayResizeChange:"overlayResizeChange",overlayRotationChange:"overlayRotationChange",threeDVariantSelected:"threeDVariantSelected"},decls:28,vars:15,consts:[["canvasContainer",""],[1,"view-section"],[1,"view-header"],[1,"flex","items-center","gap-4"],[1,"variant-controls"],[1,"view-controls"],["type","button",1,"view-btn",3,"active","disabled"],[1,"relative","w-full","canvas-container","overflow-hidden","shadow-inner"],[1,"absolute","inset-0","w-full","h-full"],[1,"touch-gesture-coach"],[1,"canvas-toolbar"],["appTooltip","Undo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-back-line"],["appTooltip","Redo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-forward-line"],["appTooltip","Zoom In","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-in-line"],["appTooltip","Zoom Out","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-out-line"],["appTooltip","Reset","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-refresh-line"],["tooltipPosition","top",1,"toolbar-btn",3,"click","disabled","appTooltip"],[1,"ri-loop-right-line"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"disabled"],["type","button",1,"variant-btn",3,"active"],["type","button",1,"variant-btn",3,"click"],["type","button",1,"view-btn",3,"click","disabled"],[1,"touch-gesture-coach",3,"click"],["type","button","aria-label","Dismiss gesture tips",1,"touch-gesture-close",3,"click"],[1,"ri-close-line"],[1,"gesture-row"],["aria-hidden","true",1,"gesture-visual","rotate-visual"],[1,"finger"],[1,"arc"],[1,"gesture-copy"],["aria-hidden","true",1,"gesture-visual","pinch-visual"],[1,"pulse"],["aria-hidden","true",1,"gesture-visual","pan-visual"],[1,"arrow"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-question-line"]],template:function(t,n){t&1&&(x(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),R(4,"3D View"),C(),ae(5,nJ,3,0,"div",4),C(),x(6,"div",5),mt(7,iJ,2,4,"button",6,QZ),C()(),x(9,"div",7),ae(10,rJ,1,0,"app-three-d-loader"),U(11,"div",8,0),ae(13,oJ,32,0,"div",9),x(14,"div",10)(15,"button",11),W("click",function(){return n.onUndoClick()}),U(16,"i",12),C(),x(17,"button",13),W("click",function(){return n.onRedoClick()}),U(18,"i",14),C(),x(19,"button",15),W("click",function(){return n.onCameraZoom("in")}),U(20,"i",16),C(),x(21,"button",17),W("click",function(){return n.onCameraZoom("out")}),U(22,"i",18),C(),x(23,"button",19),W("click",function(){return n.onResetCamera()}),U(24,"i",20),C(),x(25,"button",21),W("click",function(){return n.onToggleAutoRotate()}),U(26,"i",22),C(),ae(27,sJ,2,1,"button",23),C()()()),t&2&&(T(5),le(n.hasThreeDVariantSwitch()?5:-1),T(2),gt(n.cameraPresets()),T(3),le(n.isModelLoading()?10:-1),T(3),le(n.isTouchDevice()&&n.showTouchHint()?13:-1),T(2),q("disabled",!n.canUndo()),T(2),q("disabled",!n.canRedo()),T(2),q("disabled",!n.hasCurrentObject()),T(2),q("disabled",!n.hasCurrentObject()),T(2),q("disabled",!n.hasCurrentObject()),T(2),dt("ring-2",n.isAutoRotateEnabled())("ring-primary-400",n.isAutoRotateEnabled()),q("disabled",!n.hasCurrentObject())("appTooltip",n.isAutoRotateEnabled()?"Stop Rotate":"Auto Rotate"),T(2),le(n.isTouchDevice()?27:-1))},dependencies:[Ut,bi,ih],styles:['[_nghost-%COMP%]{display:block;height:100%;min-height:0}.view-controls[_ngcontent-%COMP%], .variant-controls[_ngcontent-%COMP%]{display:flex;gap:5px;flex-wrap:wrap}.variant-btn[_ngcontent-%COMP%]{padding:6px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color-secondary, 100 116 139));font-size:12px;cursor:pointer;border-radius:999px;transition:all .2s}.variant-btn.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241));color:#fff}.variant-btn[_ngcontent-%COMP%]:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12);border-color:rgb(var(--primary-color, 98 101 241) / .35)}.view-header[_ngcontent-%COMP%] .view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.view-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 20px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.alignment-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.grid-size-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));background:rgb(var(--surface-100, 248 250 252));border-radius:6px;padding:4px 6px}.measurement-badge[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;z-index:9;background:rgb(var(--surface-card, 255 255 255) / .88);color:rgb(var(--text-color-secondary, 100 116 139));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:8px;padding:6px 10px;font-size:12px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active[_ngcontent-%COMP%], .view-btn-2d.active[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn[_ngcontent-%COMP%]:hover:not(.active), .view-btn-2d[_ngcontent-%COMP%]:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.view-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.canvas-container[_ngcontent-%COMP%]{width:100%;flex:1 1 auto;min-height:260px;height:100%;position:relative;overflow:hidden;background:rgb(var(--surface-100, 248 250 252))}.touch-gesture-coach[_ngcontent-%COMP%]{position:absolute;right:10px;bottom:10px;width:min(285px,calc(100% - 20px));display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(145deg,#0f172aeb,#1e293bdb);color:#f8fafc;box-shadow:0 8px 24px #02061752;z-index:20;animation:_ngcontent-%COMP%_coach-enter .26s ease-out}.touch-gesture-close[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;width:24px;height:24px;border:0;border-radius:999px;background:#ffffff29;color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.gesture-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:10px}.gesture-copy[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:12px;font-weight:600}.gesture-copy[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;font-size:11px;line-height:1.35;color:#cbd5e1}.gesture-visual[_ngcontent-%COMP%]{position:relative;width:56px;height:40px}.gesture-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{position:absolute;width:12px;height:20px;border-radius:999px;background:#94a3b8;border:1px solid rgb(226 232 240 / .55)}.rotate-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{left:22px;top:11px;animation:_ngcontent-%COMP%_finger-rotate 1.7s ease-in-out infinite}.rotate-visual[_ngcontent-%COMP%] .arc[_ngcontent-%COMP%]{position:absolute;left:10px;top:7px;width:36px;height:24px;border-top:2px dashed rgb(125 211 252 / .9);border-radius:50%;animation:_ngcontent-%COMP%_arc-rotate 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-left 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){right:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-right 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .pulse[_ngcontent-%COMP%]{position:absolute;inset:10px 18px;border-radius:999px;border:1px solid rgb(125 211 252 / .9);animation:_ngcontent-%COMP%_pinch-pulse 1.7s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:14px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){left:30px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;left:9px;top:28px;width:38px;height:2px;background:#7dd3fc;animation:_ngcontent-%COMP%_arrow-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before, .pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-3px;width:8px;height:8px;border-top:2px solid rgb(125 211 252);border-right:2px solid rgb(125 211 252)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before{left:0;transform:rotate(-135deg)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{right:0;transform:rotate(45deg)}@keyframes _ngcontent-%COMP%_coach-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_finger-rotate{0%,to{transform:translate(-4px) rotate(-8deg)}50%{transform:translate(4px) rotate(8deg)}}@keyframes _ngcontent-%COMP%_arc-rotate{0%,to{opacity:.5;transform:rotate(-6deg)}50%{opacity:1;transform:rotate(6deg)}}@keyframes _ngcontent-%COMP%_finger-pinch-left{0%,to{transform:translate(-2px)}50%{transform:translate(3px)}}@keyframes _ngcontent-%COMP%_finger-pinch-right{0%,to{transform:translate(2px)}50%{transform:translate(-3px)}}@keyframes _ngcontent-%COMP%_pinch-pulse{0%,to{opacity:.3;transform:scaleX(1)}50%{opacity:1;transform:scaleX(.7)}}@keyframes _ngcontent-%COMP%_finger-pan{0%,to{transform:translate(-3px)}50%{transform:translate(4px)}}@keyframes _ngcontent-%COMP%_arrow-pan{0%,to{transform:translate(-3px);opacity:.7}50%{transform:translate(4px);opacity:1}}.toolbar-btn[_ngcontent-%COMP%]{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252))}.toolbar-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed;background:rgb(var(--surface-100, 248 250 252));color:rgb(var(--text-color-secondary, 100 116 139));box-shadow:none}.toolbar-btn[_ngcontent-%COMP%]:disabled:hover{background:rgb(var(--surface-100, 248 250 252))}@media(max-width:1024px){.canvas-toolbar[_ngcontent-%COMP%]{left:10px;top:10px;gap:6px;padding:8px}}@media(max-width:640px){.view-header[_ngcontent-%COMP%]{padding:10px 12px;gap:8px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14px}.canvas-toolbar[_ngcontent-%COMP%]{top:8px;left:8px;gap:4px;padding:6px 8px}.canvas-container[_ngcontent-%COMP%]{min-height:200px}.touch-gesture-coach[_ngcontent-%COMP%]{right:8px;bottom:8px;width:min(260px,calc(100% - 16px));padding:10px}.toolbar-btn[_ngcontent-%COMP%]{width:32px;height:32px;font-size:16px}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:4px 10px;font-size:12px}}@media(max-width:480px){.view-header[_ngcontent-%COMP%]{padding:8px 10px;gap:6px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:13px}.canvas-toolbar[_ngcontent-%COMP%]{top:6px;left:6px;gap:3px;padding:4px 5px}.toolbar-btn[_ngcontent-%COMP%]{width:30px;height:30px;font-size:15px}.canvas-container[_ngcontent-%COMP%]{min-height:160px}.touch-gesture-coach[_ngcontent-%COMP%]{right:6px;bottom:6px;width:min(240px,calc(100% - 12px))}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.canvas-toolbar[_ngcontent-%COMP%]{top:6px;left:6px;flex-direction:column;gap:4px;padding:6px}.view-header[_ngcontent-%COMP%]{padding:6px 10px}.canvas-container[_ngcontent-%COMP%]{min-height:120px}}']})};var aJ=["fabricCanvas"];function lJ(i,e){if(i&1){let t=Ae();x(0,"button",18),W("click",function(){z(t);let r=S();return V(r.onLayerToggle(null))}),R(1," All Layers "),C()}if(i&2){let t=S();dt("active",t.selectedLayerKey()==null)("bg-primary-600",t.layerIsActive(null))("text-white",t.layerIsActive(null))("border-primary-600",t.layerIsActive(null))("shadow-sm",t.layerIsActive(null))("bg-white",!t.layerIsActive(null))("text-gray-700",!t.layerIsActive(null))("border-gray-300",!t.layerIsActive(null))}}function cJ(i,e){if(i&1){let t=Ae();x(0,"button",18),W("click",function(){let r=z(t).$implicit,o=S();return V(o.onLayerToggle(r))}),R(1),C()}if(i&2){let t=e.$implicit,n=S();dt("active",n.selectedLayerKey()==t)("bg-primary-600",n.layerIsActive(t))("text-white",n.layerIsActive(t))("border-primary-600",n.layerIsActive(t))("shadow-sm",n.layerIsActive(t))("bg-white",!n.layerIsActive(t))("text-gray-700",!n.layerIsActive(t))("border-gray-300",!n.layerIsActive(t)),T(),wt(" ",t," ")}}function dJ(i,e){if(i&1){let t=Ae();x(0,"button",19),W("click",function(){z(t);let r=S();return V(r.replayTouchHint())}),U(1,"i",20),C()}if(i&2){let t=S();q("disabled",!t.isTouchDevice())}}function uJ(i,e){if(i&1){let t=Ae();x(0,"div",24),W("click",function(){z(t);let r=S(2);return V(r.dismissTouchHint())}),x(1,"button",25),W("click",function(r){z(t);let o=S(2);return r.stopPropagation(),V(o.dismissTouchHint())}),U(2,"i",26),C(),x(3,"div",27)(4,"div",28),U(5,"span",29)(6,"span",29)(7,"span",30),C(),x(8,"div",31)(9,"h4"),R(10,"Pinch to zoom"),C(),x(11,"p"),R(12,"Use two fingers to zoom in and out."),C()()(),x(13,"div",27)(14,"div",32),U(15,"span",29)(16,"span",29)(17,"span",33),C(),x(18,"div",31)(19,"h4"),R(20,"Two-finger drag to pan"),C(),x(21,"p"),R(22,"Move the design area with two fingers."),C()()(),x(23,"div",27)(24,"div",34),U(25,"span",35)(26,"span",29)(27,"span",36),C(),x(28,"div",31)(29,"h4"),R(30,"Single-touch to move logo/text"),C(),x(31,"p"),R(32,"Tap a logo or text, then drag with one finger to transform its position."),C()()()()}}function fJ(i,e){if(i&1&&(x(0,"div",21),U(1,"canvas",22,0),C(),ae(3,uJ,33,0,"div",23)),i&2){let t=S();T(3),le(t.isTouchDevice()&&t.showTouchHint()?3:-1)}}var Zx=class i{static TOUCH_HINT_STORAGE_KEY="designkit.2d.touchHintSeen";svgText=ye(null);isActive=ye(!0);layers=ye([]);selectedLayerKey=ye(null);isShowAllLayersOption=ye(!0);showPlacementGuides=ye(!1);gridEnabled=ye(!1);snapEnabled=ye(!0);gridSize=ye(24);cursorLabel=ye("");objectLabel=ye("");layerToggle=Pt();canvasReady=Pt();canvasDetached=Pt();showPlacementGuidesChange=Pt();gridSizeChange=Pt();zoomIn=Pt();zoomOut=Pt();resetView=Pt();onUndo=Pt();onRedo=Pt();fabricCanvasRef=Lu("fabricCanvas");designHistory=Z(Gl);canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;showTouchHint=F(!1);isTouchDevice=F(!1);touchHintTimerId=null;touchHintShownForSession=!1;constructor(){this.initializeTouchHintState(),Yt(()=>{let e=this.isActive();if(!this.isTouchDevice()){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}if(!e){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}this.touchHintShownForSession||(this.touchHintShownForSession=!0,this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}),Yt(()=>{let e=this.fabricCanvasRef();e?this.canvasReady.emit(e.nativeElement):this.canvasDetached.emit()})}initializeTouchHintState(){if(typeof window>"u")return;let e="ontouchstart"in window||navigator.maxTouchPoints>0;this.isTouchDevice.set(e)}clearTouchHintTimer(){this.touchHintTimerId&&(clearTimeout(this.touchHintTimerId),this.touchHintTimerId=null)}dismissTouchHint(){this.clearTouchHintTimer(),this.showTouchHint.set(!1)}replayTouchHint(){this.isTouchDevice()&&(this.touchHintShownForSession=!0,this.clearTouchHintTimer(),this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}onLayerToggle(e){this.layerToggle.emit(e)}layerIsActive(e){let t=this.selectedLayerKey();return e===null?t===null:t===e}onZoomIn(){this.zoomIn.emit()}onZoomOut(){this.zoomOut.emit()}onResetCamera(){this.resetView.emit()}onRedoClick(){this.canRedo()&&this.onRedo.emit()}onUndoClick(){this.canUndo()&&this.onUndo.emit()}onGuidesToggle(){this.showPlacementGuidesChange.emit(!this.showPlacementGuides())}onGridSizeInput(e){let t=Number(e);Number.isFinite(t)&&this.gridSizeChange.emit(Math.max(8,Math.min(120,Math.round(t))))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-two-d-ui"]],viewQuery:function(t,n){t&1&&ll(n.fabricCanvasRef,aJ,5),t&2&&Vc()},inputs:{svgText:[1,"svgText"],isActive:[1,"isActive"],layers:[1,"layers"],selectedLayerKey:[1,"selectedLayerKey"],isShowAllLayersOption:[1,"isShowAllLayersOption"],showPlacementGuides:[1,"showPlacementGuides"],gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],gridSize:[1,"gridSize"],cursorLabel:[1,"cursorLabel"],objectLabel:[1,"objectLabel"]},outputs:{layerToggle:"layerToggle",canvasReady:"canvasReady",canvasDetached:"canvasDetached",showPlacementGuidesChange:"showPlacementGuidesChange",gridSizeChange:"gridSizeChange",zoomIn:"zoomIn",zoomOut:"zoomOut",resetView:"resetView",onUndo:"onUndo",onRedo:"onRedo"},decls:22,vars:8,consts:[["fabricCanvas",""],[1,"view-header"],[1,"view-controls"],["type","button",1,"view-btn-2d",3,"active","bg-primary-600","text-white","border-primary-600","shadow-sm","bg-white","text-gray-700","border-gray-300"],[1,"canvas-content"],[1,"jersey-2d","relative","w-full"],[1,"canvas-toolbar","canvas-toolbar-2d"],["appTooltip","Undo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-back-line"],["appTooltip","Redo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-forward-line"],["appTooltip","Zoom In","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-in-line"],["appTooltip","Zoom Out","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-out-line"],["appTooltip","Reset","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-refresh-line"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"disabled"],["type","button",1,"view-btn-2d",3,"click"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-question-line"],[1,"canvas-stage"],[1,"fabric-stage-canvas"],[1,"touch-gesture-coach"],[1,"touch-gesture-coach",3,"click"],["type","button","aria-label","Dismiss gesture tips",1,"touch-gesture-close",3,"click"],[1,"ri-close-line"],[1,"gesture-row"],["aria-hidden","true",1,"gesture-visual","pinch-visual"],[1,"finger"],[1,"pulse"],[1,"gesture-copy"],["aria-hidden","true",1,"gesture-visual","pan-visual"],[1,"arrow"],["aria-hidden","true",1,"gesture-visual","drag-visual"],[1,"target"],[1,"trail"]],template:function(t,n){t&1&&(x(0,"div",1)(1,"h3"),R(2,"2D View"),C(),x(3,"div",2),ae(4,lJ,2,16,"button",3),mt(5,cJ,2,17,"button",3,fp),C()(),x(7,"div",4)(8,"div",5)(9,"div",6)(10,"button",7),W("click",function(){return n.onUndoClick()}),U(11,"i",8),C(),x(12,"button",9),W("click",function(){return n.onRedoClick()}),U(13,"i",10),C(),x(14,"button",11),W("click",function(){return n.onZoomIn()}),U(15,"i",12),C(),x(16,"button",13),W("click",function(){return n.onZoomOut()}),U(17,"i",14),C(),x(18,"button",15),W("click",function(){return n.onResetCamera()}),U(19,"i",16),C(),ae(20,dJ,2,1,"button",17),C(),ae(21,fJ,4,1),C()()),t&2&&(T(4),le(n.isShowAllLayersOption()?4:-1),T(),gt(n.layers()),T(5),q("disabled",!n.canUndo()),T(2),q("disabled",!n.canRedo()),T(2),q("disabled",!n.svgText()),T(2),q("disabled",!n.svgText()),T(2),q("disabled",!n.svgText()),T(2),le(n.isTouchDevice()?20:-1),T(),le(n.svgText()?21:-1))},dependencies:[Ut,bi],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;flex-wrap:wrap}.view-header[_ngcontent-%COMP%] .view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.view-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.alignment-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.grid-size-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));background:rgb(var(--surface-100, 248 250 252));border-radius:6px;padding:4px 6px}.unit-select[_ngcontent-%COMP%]{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:6px;padding:4px 8px;font-size:12px;background:rgb(var(--surface-card, 255 255 255))}.ruler-readout[_ngcontent-%COMP%]{display:flex;gap:12px;padding:6px 20px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));border-bottom:1px dashed rgb(var(--border-color, 203 213 225))}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active[_ngcontent-%COMP%], .view-btn-2d.active[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn[_ngcontent-%COMP%]:hover:not(.active), .view-btn-2d[_ngcontent-%COMP%]:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center}.jersey-2d[_ngcontent-%COMP%]{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center}.canvas-stage[_ngcontent-%COMP%]{position:relative;width:min(100%,760px);aspect-ratio:1 / 1;max-height:100%}.fabric-stage-canvas[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.touch-gesture-coach[_ngcontent-%COMP%]{position:absolute;right:10px;bottom:10px;width:min(280px,calc(100% - 20px));display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(140deg,#0f172aeb,#1e293be0);color:#f8fafc;box-shadow:0 8px 24px #0206174d;z-index:20;animation:_ngcontent-%COMP%_coach-enter .26s ease-out}.touch-gesture-close[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;width:24px;height:24px;border:0;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#ffffff24;color:inherit;cursor:pointer}.gesture-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:10px}.gesture-copy[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:12px;font-weight:600;letter-spacing:.2px}.gesture-copy[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;color:#cbd5e1;font-size:11px;line-height:1.35}.gesture-visual[_ngcontent-%COMP%]{position:relative;width:56px;height:40px}.gesture-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{position:absolute;width:12px;height:20px;border-radius:999px;background:#94a3b8;border:1px solid rgb(226 232 240 / .55)}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-left 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){right:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-right 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .pulse[_ngcontent-%COMP%]{position:absolute;inset:10px 18px;border-radius:999px;border:1px solid rgb(125 211 252 / .9);animation:_ngcontent-%COMP%_pinch-pulse 1.7s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:14px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){left:30px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;left:9px;top:28px;width:38px;height:2px;background:#7dd3fc;animation:_ngcontent-%COMP%_arrow-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before, .pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-3px;width:8px;height:8px;border-top:2px solid rgb(125 211 252);border-right:2px solid rgb(125 211 252)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before{left:0;transform:rotate(-135deg)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{right:0;transform:rotate(45deg)}.drag-visual[_ngcontent-%COMP%] .target[_ngcontent-%COMP%]{position:absolute;left:7px;top:10px;width:18px;height:18px;border-radius:50%;border:2px solid rgb(125 211 252 / .95);background:#0f172a47}.drag-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{left:12px;top:12px;animation:_ngcontent-%COMP%_finger-drag 1.7s ease-in-out infinite}.drag-visual[_ngcontent-%COMP%] .trail[_ngcontent-%COMP%]{position:absolute;left:19px;top:20px;width:24px;height:2px;background:linear-gradient(to right,#7dd3fc33,#7dd3fcf2);transform-origin:left center;animation:_ngcontent-%COMP%_trail-drag 1.7s ease-in-out infinite}@keyframes _ngcontent-%COMP%_coach-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_finger-pinch-left{0%,to{transform:translate(-2px)}50%{transform:translate(3px)}}@keyframes _ngcontent-%COMP%_finger-pinch-right{0%,to{transform:translate(2px)}50%{transform:translate(-3px)}}@keyframes _ngcontent-%COMP%_pinch-pulse{0%,to{opacity:.3;transform:scaleX(1)}50%{opacity:1;transform:scaleX(.7)}}@keyframes _ngcontent-%COMP%_finger-pan{0%,to{transform:translate(-3px)}50%{transform:translate(4px)}}@keyframes _ngcontent-%COMP%_arrow-pan{0%,to{transform:translate(-3px);opacity:.7}50%{transform:translate(4px);opacity:1}}@keyframes _ngcontent-%COMP%_finger-drag{0%,to{transform:translate(0)}50%{transform:translate(16px)}}@keyframes _ngcontent-%COMP%_trail-drag{0%,to{opacity:.2;transform:scaleX(.2)}50%{opacity:1;transform:scaleX(1)}}.toolbar-btn[_ngcontent-%COMP%]{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252))}.toolbar-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed;background:rgb(var(--surface-100, 248 250 252));color:rgb(var(--text-color-secondary, 100 116 139));box-shadow:none}.toolbar-btn[_ngcontent-%COMP%]:disabled:hover{background:rgb(var(--surface-100, 248 250 252))}@media(max-width:1024px){.canvas-toolbar[_ngcontent-%COMP%]{gap:6px;padding:8px}}@media(max-width:640px){.view-header[_ngcontent-%COMP%]{padding:10px 12px;gap:8px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14px}.canvas-toolbar[_ngcontent-%COMP%]{margin:6px 10px 0;width:max-content;padding:6px 8px;border-radius:6px}.toolbar-btn[_ngcontent-%COMP%]{width:32px;height:32px;font-size:16px}.canvas-stage[_ngcontent-%COMP%]{width:100%;max-height:100%}.touch-gesture-coach[_ngcontent-%COMP%]{right:8px;bottom:8px;width:min(260px,calc(100% - 16px));padding:10px}}@media(max-width:480px){.view-header[_ngcontent-%COMP%]{padding:8px 10px;gap:6px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:13px}.canvas-toolbar[_ngcontent-%COMP%]{gap:4px;padding:4px 6px}.toolbar-btn[_ngcontent-%COMP%]{width:30px;height:30px;font-size:15px}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:4px 10px;font-size:12px}.touch-gesture-coach[_ngcontent-%COMP%]{width:min(240px,calc(100% - 12px));right:6px;bottom:6px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:8px;margin:0;flex-direction:column;gap:4px;padding:6px}.view-header[_ngcontent-%COMP%]{padding:6px 10px}}'],changeDetection:0})};var si={OVERLAY_SELECT:"overlay-select",SELECTION_CLEARED:"selection-cleared",WHEEL:"wheel",PINCH:"pinch",POINTER_MOVE:"pointer-move",RESIZE:"resize"};function pU(i){let e=i.parentElement,t=new EventTarget,n=new Yf(i,{selection:!0,preserveObjectStacking:!0}),r=()=>{let de=e?.getBoundingClientRect(),Pe=Math.round(de?.width??0),At=Math.round(de?.height??0),zt=Pe||i.clientWidth||0,fe=At||i.clientHeight||0;return{width:zt,height:fe}},{width:o,height:s}=r();o>0&&s>0?(n.setDimensions({width:o,height:s}),n.requestRenderAll()):n.setDimensions({width:320,height:320});let a=null,l=!1,c=0,d=0,u=!0,f=!1,h="none",p=!1,v=0,g=0,m=0,b=()=>{let{width:de,height:Pe}=r();if(de<=0||Pe<=0){a==null&&typeof requestAnimationFrame<"u"&&(a=requestAnimationFrame(()=>{a=null,b()}));return}n.getWidth()===de&&n.getHeight()===Pe||(n.setDimensions({width:de,height:Pe}),t.dispatchEvent(new Event(si.RESIZE)),n.requestRenderAll())},y=typeof ResizeObserver<"u"?new ResizeObserver(()=>b()):null;e?y?.observe(e):y?.observe(i),typeof window<"u"&&window.addEventListener("resize",b),b();let _=de=>{let At=de.target?.dataOverlayId;At&&t.dispatchEvent(new CustomEvent(si.OVERLAY_SELECT,{detail:{overlayId:At}}))},w=()=>{t.dispatchEvent(new Event(si.SELECTION_CLEARED))},D=de=>{let Pe=de.e;t.dispatchEvent(new CustomEvent(si.WHEEL,{detail:{deltaY:Pe.deltaY}})),Pe.preventDefault(),Pe.stopPropagation()},A=de=>{let Pe=de.scenePoint??de.pointer;!Pe||!Number.isFinite(Pe.x)||!Number.isFinite(Pe.y)||t.dispatchEvent(new CustomEvent(si.POINTER_MOVE,{detail:{x:Pe.x,y:Pe.y}}))},P=de=>h!=="none"&&h!==de?!1:(h==="none"&&(u=n.selection,f=n.skipTargetFind,n.selection=!1,n.skipTargetFind=!0),h=de,!0),E=de=>{h===de&&(h="none",n.selection=u,n.skipTargetFind=f,n.defaultCursor="default")},I=de=>{de.button===2&&P("right-pan")&&(l=!0,c=de.clientX,d=de.clientY,n.defaultCursor="grabbing",de.preventDefault())},L=de=>{if(!l)return;let Pe=n.viewportTransform;Pe&&(Pe[4]+=de.clientX-c,Pe[5]+=de.clientY-d,c=de.clientX,d=de.clientY,n.requestRenderAll(),de.preventDefault())},Y=()=>{if(!l)return;l=!1,E("right-pan");let de=n.viewportTransform;de&&n.setViewportTransform([de[0],de[1],de[2],de[3],de[4],de[5]]),n.requestRenderAll()},G=(de,Pe)=>{let At=Pe.clientX-de.clientX,zt=Pe.clientY-de.clientY;return Math.hypot(At,zt)},Q=(de,Pe)=>{P("touch-gesture")&&(p=!0,v=(de.clientX+Pe.clientX)/2,g=(de.clientY+Pe.clientY)/2,m=G(de,Pe))},ee=()=>{if(!p)return;p=!1,m=0,E("touch-gesture");let de=n.viewportTransform;de&&n.setViewportTransform([de[0],de[1],de[2],de[3],de[4],de[5]]),n.requestRenderAll()},te=de=>{de.touches.length<2||(Q(de.touches[0],de.touches[1]),p&&de.preventDefault())},X=de=>{if(!p||de.touches.length<2)return;let Pe=de.touches[0],At=de.touches[1],zt=(Pe.clientX+At.clientX)/2,fe=(Pe.clientY+At.clientY)/2,be=G(Pe,At),Be=n.viewportTransform;if(Be&&(Be[4]+=zt-v,Be[5]+=fe-g,n.requestRenderAll()),m>0&&Number.isFinite(be)){let xt=be/m;if(xt>1.02||xt<.98){let je=Math.min(1.2,Math.max(.8,xt));t.dispatchEvent(new CustomEvent(si.PINCH,{detail:{multiplier:je}})),m=be}}v=zt,g=fe,de.preventDefault()},ie=de=>{if(p){if(de.touches.length>=2){v=(de.touches[0].clientX+de.touches[1].clientX)/2,g=(de.touches[0].clientY+de.touches[1].clientY)/2,m=G(de.touches[0],de.touches[1]),de.preventDefault();return}ee()}},Se=de=>{de.preventDefault()},Ce=n.upperCanvasEl.style.touchAction;return n.upperCanvasEl.style.touchAction="none",n.upperCanvasEl.addEventListener("contextmenu",Se),n.upperCanvasEl.addEventListener("mousedown",I),n.upperCanvasEl.addEventListener("mousemove",L),n.upperCanvasEl.addEventListener("touchstart",te,{passive:!1}),n.upperCanvasEl.addEventListener("touchmove",X,{passive:!1}),n.upperCanvasEl.addEventListener("touchend",ie,{passive:!1}),n.upperCanvasEl.addEventListener("touchcancel",ie,{passive:!1}),typeof window<"u"&&window.addEventListener("mouseup",Y),n.on("mouse:down",_),n.on("mouse:move",A),n.on("selection:cleared",w),n.on("mouse:wheel",D),{canvas:n,events:t,syncDimensions:b,cleanup:()=>{a!=null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(a),a=null),typeof window<"u"&&(window.removeEventListener("resize",b),window.removeEventListener("mouseup",Y)),y?.disconnect(),n.upperCanvasEl.style.touchAction=Ce,n.upperCanvasEl.removeEventListener("contextmenu",Se),n.upperCanvasEl.removeEventListener("mousedown",I),n.upperCanvasEl.removeEventListener("mousemove",L),n.upperCanvasEl.removeEventListener("touchstart",te),n.upperCanvasEl.removeEventListener("touchmove",X),n.upperCanvasEl.removeEventListener("touchend",ie),n.upperCanvasEl.removeEventListener("touchcancel",ie),n.off("mouse:down",_),n.off("mouse:move",A),n.off("selection:cleared",w),n.off("mouse:wheel",D),n.dispose()}}}function mU(i){return!!(i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.width)&&Number.isFinite(i.height)&&i.width>0&&i.height>0)}function pJ(i,e,t,n){return mU(i)?i:mU(e)?e:t.width>0&&t.height>0?{x:t.minX,y:t.minY,width:t.width,height:t.height}:n&&n.width>0&&n.height>0?{x:0,y:0,width:n.width,height:n.height}:{x:0,y:0,width:1e3,height:1e3}}async function gU(i){let{canvas:e,svgMarkup:t,fabricViewZoom:n,svgViewBox:r,svgDimensions:o,targetBounds:s,baseBounds:a,loadToken:l}=i;if(!t)return e.clear(),e.backgroundImage=void 0,e.requestRenderAll(),null;let c=new Blob([t],{type:Wd}),d=URL.createObjectURL(c);try{let u=await mJ(d),f=Math.max(e.getWidth(),1),h=Math.max(e.getHeight(),1),p=24,v=u.naturalWidth||u.width,g=u.naturalHeight||u.height,m=Math.max(f-p*2,1),b=Math.max(h-p*2,1),y=pJ(s,a,r,o),_=Math.max(y.width,1),w=Math.max(y.height,1),D=Math.min(m/_,b/w);if(!Number.isFinite(D)||D<=0){let Se=Math.max(a.width,1),Ce=Math.max(a.height,1);D=Math.min(m/Se,b/Ce)}(!Number.isFinite(D)||D<=0)&&(D=1);let A=D*n,P=y.width*A,E=y.height*A,I=(f-P)/2-y.x*A,L=(h-E)/2-y.y*A,Y=r.width||o?.width||v,G=r.height||o?.height||g,Q=Y>0&&v>0?v/Y:1,ee=G>0&&g>0?g/G:1,te=Number.isFinite(Q)&&Q>0?Q:Number.isFinite(ee)&&ee>0?ee:1,X=A/te,ie=await jr.fromURL(d);return ie.set({left:I,top:L,scaleX:X,scaleY:X,selectable:!1,evented:!1,originX:"left",originY:"top"}),{transform:{scale:A,offsetX:I,offsetY:L},layout:{baseScale:D,targetBounds:y,canvasWidth:f,canvasHeight:h,pxPerUnit:te},image:ie,token:l}}finally{URL.revokeObjectURL(d)}}function mJ(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=r=>t(r),n.src=i})}var Xl={fillColor:"rgba(14,165,233,0.04)",strokeColor:"#df1616",minDashUnit:6,dashScaleMultiplier:2,dashGapMultiplier:.6,minStrokeWidth:1,strokeWidthRatio:.005};var gJ=new Set(["text","logo"]);function vU(i,e){let{show:t,transform:n,zones:r,state:o}=e,s=new Map(o.objects);if(!t||!n)return uD(i,s),{objects:s};let a=new Set,l=Math.max(Xl.minDashUnit,n.scale*Xl.dashScaleMultiplier);for(let c of r){if(!c.allowedKinds.some(b=>gJ.has(b)))continue;let u=c.bounds.width*n.scale,f=c.bounds.height*n.scale;if(u<=0||f<=0)continue;let h=n.offsetX+c.bounds.x*n.scale,p=n.offsetY+c.bounds.y*n.scale,v=Math.max(Xl.minStrokeWidth,Math.min(u,f)*Xl.strokeWidthRatio),g=[l,l*Xl.dashGapMultiplier],m=s.get(c.placementKey);m?(m.canvas||i.add(m),m.set({left:h,top:p,width:u,height:f,strokeDashArray:g,strokeWidth:v,visible:!0})):(m=new Zo({left:h,top:p,width:u,height:f,originX:"left",originY:"top",fill:Xl.fillColor,stroke:Xl.strokeColor,strokeDashArray:g,strokeWidth:v,selectable:!1,evented:!1,excludeFromExport:!0,hoverCursor:"default"}),s.set(c.placementKey,m),i.add(m)),m.setCoords(),a.add(c.placementKey)}for(let[c,d]of Array.from(s.entries()))a.has(c)||(i.remove(d),s.delete(c));return{objects:s}}function uD(i,e){for(let t of e.values())i.remove(t);e.clear()}var ql="#aa001f",Xs={scale:1,rotation:0,translateX:0,translateY:0,opacity:1},rh={scale:1,rotation:0,translateX:0,translateY:0,opacity:1};function Dt(i){return i.kind==="text"}function ai(i){return i.kind==="logo"}var Jx=[{label:"Anton",value:"Anton",source:"https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/anton/Anton-Regular.ttf"}],fD=Jx.reduce((i,e)=>(i[e.value]=e.source,i),{});var qs=class i{COMPRESSION_3D_QUALITY_OPAQUE=.25;COMPRESSION_3D_QUALITY_TRANSPARENT=.7;COMPRESSION_3D_MAX_RESOLUTION_OPAQUE=1200;COMPRESSION_3D_MAX_RESOLUTION_TRANSPARENT=900;compressionLog=[];constructor(){}async compressImageToDataUrl(e){try{let t=e?.trim()??"";if(!t)return e;let n=await this.resolveSourceToDataUrl(t);if(!n||!n.startsWith("data:image"))return e;let r=await this.detectTransparency(n),o=r?this.COMPRESSION_3D_QUALITY_TRANSPARENT:this.COMPRESSION_3D_QUALITY_OPAQUE,s=r?this.COMPRESSION_3D_MAX_RESOLUTION_TRANSPARENT:this.COMPRESSION_3D_MAX_RESOLUTION_OPAQUE,a=await this.downscaleAndReencodeImage(n,o,s,r);return a.length>=n.length?n:(this.logCompressionMetrics(n,a),a)}catch(t){return console.warn("[ImageCompressionService] Compression failed, returning original image:",t),e}}async resolveSourceToDataUrl(e){if(e.startsWith("data:image"))return e;if(!this.isFetchableImageUrl(e))return null;try{let t=await fetch(e);if(!t.ok)return null;let n=await t.blob();return n.type.startsWith("image/")?await this.blobToDataUrl(n):null}catch{return null}}isFetchableImageUrl(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Failed to convert blob to data URL"))},r.onerror=()=>n(r.error??new Error("FileReader error")),r.readAsDataURL(e)})}detectTransparency(e){return new Promise(t=>{try{let n=new Image;n.onload=()=>{let r=document.createElement("canvas");r.width=n.width,r.height=n.height;let o=r.getContext("2d");if(!o){t(!1);return}o.drawImage(n,0,0);let s=this.hasAlphaChannel(o,n.width,n.height);t(s)},n.onerror=()=>{t(!1)},n.crossOrigin="Anonymous",n.src=e}catch{t(!1)}})}downscaleAndReencodeImage(e,t,n,r){return new Promise((o,s)=>{let a=new Image;a.onload=()=>{try{let l=a.width,c=a.height,d=l,u=c;if(l>n||c>n){let p=l/c;p>1?(d=n,u=Math.round(n/p)):(u=n,d=Math.round(n*p))}let f=document.createElement("canvas");f.width=d,f.height=u;let h=f.getContext("2d");if(!h){s(new Error("Failed to get canvas 2D context"));return}if(h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(a,0,0,d,u),this.storeDimensionInfo(l,c,d,u),r){let p=null;try{if(p=f.toDataURL("image/webp",t),!p.startsWith("data:image/webp"))throw new Error("WebP not supported, falling back to PNG");o(p)}catch{let v=f.toDataURL("image/png",t);o(v)}}else{let p=f.toDataURL("image/jpeg",t);o(p)}}catch(l){s(l)}},a.onerror=()=>{s(new Error("Failed to load image for compression"))},a.crossOrigin="Anonymous",a.src=e})}storeDimensionInfo(e,t,n,r){if(this.compressionLog.length>0){let o=this.compressionLog[this.compressionLog.length-1];o&&!o.originalResolution&&(o.originalResolution=`${e}\xD7${t}`,o.compressedResolution=`${n}\xD7${r}`)}}logCompressionMetrics(e,t){let n=e.length,r=t.length,o=((1-r/n)*100).toFixed(1),s="JPEG";if(t.startsWith("data:image/webp")?s="WebP":t.startsWith("data:image/png")&&(s="PNG"),this.compressionLog.push({original:n,compressed:r}),typeof console<"u"&&console.debug){let a=this.compressionLog[this.compressionLog.length-1],l=a?.originalResolution?` (${a.originalResolution} \u2192 ${a.compressedResolution})`:"";console.debug(`[ImageCompressionService] 3D Texture [${s}]: ${(n/1024).toFixed(1)}KB \u2192 ${(r/1024).toFixed(1)}KB (${o}% reduction)${l}`)}}getCompressionStats(){let e=this.compressionLog.length,t=this.compressionLog.reduce((o,s)=>o+s.original,0),n=this.compressionLog.reduce((o,s)=>o+s.compressed,0),r=e===0?0:(1-n/t)*100;return{totalCompressed:e,totalOriginalSize:t,totalCompressedSize:n,averageReductionPercent:parseFloat(r.toFixed(1))}}hasAlphaChannel(e,t,n){try{let o=e.getImageData(0,0,t,n).data,s=4;for(let a=3;a<o.length;a+=4*s)if(o[a]<255)return!0;return!1}catch{return!1}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Ha=(r=>(r.TEXT="TEXT",r.LOGO="LOGO",r.OVERLAY="OVERLAY",r.BACKGROUND="BACKGROUND",r))(Ha||{}),Ga={OVERLAY:"overlay",EFFECTS:"effects",COLOR:"color",EFFECT:"effect"},bU={removeWhiteBg:"Remove white bg",removingBg:"Removing...",removeWhiteBgTooltip:"Remove white background",logoToEdit:"Logo",widthLabel:"Width",heightLabel:"Height",resetTextDimensions:"Reset Width/Height",dimensionOutOfRange:"Value is out of allowed range for this overlay."};var me={DATA_OVERLAY_KIND:"data-overlay-kind",DATA_OVERLAY_TEXT:"data-overlay-text",DATA_PLACEMENT_KEY:"data-placement-key",PLACEMENT_KEY:"placement-key",DATA_OVERLAY_FILL:"data-overlay-fill",DATA_OVERLAY_FONT_SIZE:"data-overlay-font-size",DATA_OVERLAY_SCALE_X:"data-overlay-scale-x",DATA_OVERLAY_SCALE_Y:"data-overlay-scale-y",DATA_OVERLAY_FONT_FAMILY:"data-overlay-font-family",DATA_OVERLAY_FONT_WEIGHT:"data-overlay-font-weight",DATA_OVERLAY_FONT_STYLE:"data-overlay-font-style",DATA_OVERLAY_LETTER_SPACING:"data-overlay-letter-spacing",DATA_OVERLAY_LINE_HEIGHT:"data-overlay-line-height",DATA_OVERLAY_STROKE:"data-overlay-stroke",DATA_OVERLAY_STROKE_WIDTH:"data-overlay-stroke-width",DATA_OVERLAY_SECOND_STROKE:"data-overlay-second-stroke",DATA_OVERLAY_SECOND_STROKE_WIDTH:"data-overlay-second-stroke-width",DATA_OVERLAY_CURVE_AMOUNT:"data-overlay-curve-amount",DATA_OVERLAY_SHADOW_BLUR:"data-overlay-shadow-blur",DATA_OVERLAY_SHADOW_OFFSET_X:"data-overlay-shadow-offset-x",DATA_OVERLAY_SHADOW_OFFSET_Y:"data-overlay-shadow-offset-y",DATA_OVERLAY_SHADOW_COLOR:"data-overlay-shadow-color",DATA_OVERLAY_WARP_ENABLED:"data-overlay-warp-enabled",DATA_OVERLAY_LOCK_RATIO:"data-overlay-lock-ratio",DATA_SOURCE_NAME:"data-source-name",DATA_OVERLAY_original_WIDTH:"data-overlay-original-width",DATA_OVERLAY_original_HEIGHT:"data-overlay-original-height",DATA_PLACEMENT:"data-placement",PLACEMENTKEY:"placementKey",DATA_OVERLAY_KEY:"data-overlay",DATA_PATTERN_FILL:"data-pattern-fill",DATA_PATTERN_ORIGINAL_FILL:"data-original-fill",DATA_PATTERN_ORIGINAL_STYLE_FILL:"data-original-style-fill",DATA_PATTERN_SCALE:"data-pattern-scale",DATA_PATTERN_ROTATION:"data-pattern-rotation",DATA_PATTERN_TRANSLATE_X:"data-pattern-translate-x",DATA_PATTERN_TRANSLATE_Y:"data-pattern-translate-y",DATA_PATTERN_OPACITY:"data-pattern-opacity",DATA_PATTERN_SOURCE_ID:"data-pattern-source-id",DATA_PATTERN_SOURCE_URL:"data-pattern-source-url",DATA_PATTERN_THUMBNAIL_URL:"data-pattern-thumbnail-url",DATA_PATTERN_PLACEMENT_ID:"data-pattern-placement-id",DATA_PATTERN_OVERLAY:"data-pattern-overlay",DATA_PATTERN_LAYER:"data-pattern-layer",DATA_BG_NAME:"data-bg-name",DATA_BG_SCALE:"data-bg-scale",DATA_BG_ROTATION:"data-bg-rotation",DATA_BG_TRANSLATE_X:"data-bg-translate-x",DATA_BG_TRANSLATE_Y:"data-bg-translate-y",DATA_BG_OPACITY:"data-bg-opacity",DATA_BASE_TRANSFORM:"data-base-transform",DATA_ALLOWED:"data-allowed",DATA_LABEL:"data-label",DATA_REQUIRED:"data-required",DATA_OVERLAY_FILTER:"data-overlay-filter",DATA_LAYER_HIDDEN:"data-layer-hidden"};var Kl=class i{ensureMeasurementHost(e,t,n){if(!n())return null;if(this.isHostAttached(e()))return e();if(typeof document>"u"||!document.body)return null;let r=document.createElement("div");return r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.overflow="hidden",r.style.opacity="0",r.style.pointerEvents="none",r.style.zIndex="-1",document.body.appendChild(r),e.set(r),t.set(!0),r}ensureMeasurementSvgClone(e,t,n,r,o){if(!e())return null;let s=this.ensureMeasurementHost(t,r,o);return s?(!r()&&n()&&s.contains(n())||(s.innerHTML=e(),n.set(s.querySelector("svg")),r.set(!1)),n()):null}queryMeasurementElementById(e,t){if(!e||!t)return null;let n=`[id="${this.escapeAttributeSelector(t)}"]`;try{return e.querySelector(n)}catch{return null}}disposeMeasurementHost(e){let t=e();t?.parentNode&&t.parentNode.removeChild(t),e.set(null)}escapeAttributeSelector(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}isHostAttached(e){return!!e&&typeof document<"u"&&document.body.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Dn=class i{constructor(e){this.measurementService=e}syncCommandIdSeq=0;syncCommandResolvers=new Map;measurementHost=F(null);measurementSvgRoot=F(null);measurementCloneDirty=F(!0);isBrowser=F(typeof window<"u");svgDocState=F(null);svgTextState=F(null);fabricReadyState=F(!1);fabricCanvasState=F(null);canvasTransformState=F(null);render2dCommandId=F(0);textureRebuildCommandId=F(0);overlaySyncCommandId=F(0);baseElementCache=F(null);baseBBoxCache=F(null);layerBoundsCache=F(new Map);backgroundPivotCache=F(new Map);patternPivotCache=F(new Map);overlays=F([]);textWarpEnvelope=F(null);textGlyphPlanCache=F(new Map);textGlyphPlanSignatures=F(new Map);textGlyphPlanPendingSignatures=F(new Map);textGlyphPlanPromises=F(new Map);textLayoutCache=F(new Map);warpPathCache=F({top:null,bottom:null});warpMeasurementSvg=F(null);activeOverlayId=F(null);overlayRuntimeDimensionsPx=F(new Map);printAreaWidthInches=F(null);printAreaHeightInches=F(null);_personalizationPlacements=[];personalizationPlacements(){return this._personalizationPlacements}setPersonalizationPlacements(e){this._personalizationPlacements=e}ensureMeasurementHost(){return this.measurementService.ensureMeasurementHost(this.measurementHost,this.measurementCloneDirty,this.isBrowser)}ensureMeasurementSvgClone(e){return this.measurementService.ensureMeasurementSvgClone(e,this.measurementHost,this.measurementSvgRoot,this.measurementCloneDirty,this.isBrowser)}invalidateBaseCaches(e){this.baseElementCache.set(null),this.baseBBoxCache.set(null),this.layerBoundsCache.set(new Map),this.backgroundPivotCache.set(new Map),this.patternPivotCache.set(new Map),this.measurementCloneDirty.set(!0),this.measurementSvgRoot.set(null),e&&e()}setActiveOverlay(e){this.activeOverlayId.set(e?.id??null)}setOverlayRuntimeDimensionsPx(e,t,n){!e||!Number.isFinite(t)||!Number.isFinite(n)||this.overlayRuntimeDimensionsPx.update(r=>{let o=new Map(r);return o.set(e,{width:Math.max(t,1),height:Math.max(n,1)}),o})}clearOverlayRuntimeDimensions(e){e&&this.overlayRuntimeDimensionsPx.update(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}setPrintAreaInches(e,t){let n=Number.isFinite(e)&&e>0?e:null,r=Number.isFinite(t)&&t>0?t:null;this.printAreaWidthInches.set(n),this.printAreaHeightInches.set(r)}clearPrintAreaInches(){this.printAreaWidthInches.set(null),this.printAreaHeightInches.set(null)}svgDoc(){return this.svgDocState()}svgText(){return this.svgTextState()}markSvgMutated(e){this.svgTextState.set(new XMLSerializer().serializeToString(e)),this.measurementCloneDirty.set(!0),this.invalidateBaseCaches(),this.render2d(),this.requestTextureRebuild()}measurementDirty(){return this.measurementCloneDirty}syncOverlaysToSvgDoc(){let e=++this.syncCommandIdSeq,t=new Promise((n,r)=>{this.syncCommandResolvers.set(e,{resolve:n,reject:r})});return this.overlaySyncCommandId.set(e),t}completeOverlaySyncCommand(e,t){let n=this.syncCommandResolvers.get(e);if(n){if(this.syncCommandResolvers.delete(e),t){n.reject(t);return}n.resolve()}}render2d(){this.render2dCommandId.update(e=>e+1)}requestTextureRebuild(){this.textureRebuildCommandId.update(e=>e+1)}shouldApplyWarp(e){return!!(this.textWarpEnvelope()&&e.warpEnabled)}getWarpEnvelopeSignature(){if(!this.textWarpEnvelope())return"warp:none";let{viewBox:e,topPathD:t,bottomPathD:n}=this.textWarpEnvelope();return`${e.minX},${e.minY},${e.width},${e.height}|${t}|${n}`}resetWarpResources(){if(!this.isBrowser()){this.warpPathCache.set({top:null,bottom:null}),this.warpMeasurementSvg.set(null);return}["top","bottom"].forEach(t=>{let n=this.warpPathCache()[t];n?.path?.parentNode&&n.path.parentNode.removeChild(n.path)}),this.warpPathCache.set({top:null,bottom:null});let e=this.warpMeasurementSvg();e?.parentNode&&e.parentNode.removeChild(e),this.warpMeasurementSvg.set(null)}sampleWarpEdge(e,t,n){let r=this.ensureWarpPath(e,n??this.textWarpEnvelope());if(!r||r.length<=0)return null;let o=Math.min(Math.max(t,0),1),s=r.length*o;try{let a=r.path.getPointAtLength(s);return{x:a.x,y:a.y}}catch(a){return console.error(Bm.failedSampleWarpPath,a),null}}getTextGlyphPlanIfFresh(e,t){return this.textGlyphPlanSignatures().get(e)!==t?null:this.textGlyphPlanCache().get(e)??null}storeTextGlyphPlan(e,t,n){this.setTextGlyphPlan(e,n,t)}queueTextGlyphPlanBuild(e,t,n){if(this.textGlyphPlanSignatures().get(e)===t||this.textGlyphPlanPendingSignatures().get(e)===t)return;this.textGlyphPlanPendingSignatures.update(a=>{let l=new Map(a);return l.set(e,t),l});let s=n.then(a=>(a&&this.setTextGlyphPlan(e,a,t),a)).finally(()=>{this.textGlyphPlanPendingSignatures().get(e)===t&&this.textGlyphPlanPendingSignatures.update(a=>{let l=new Map(a);return l.delete(e),l}),this.textGlyphPlanPromises.update(a=>{let l=new Map(a);return l.delete(e),l}),this.refreshFabricOverlays()});this.textGlyphPlanPromises.update(a=>{let l=new Map(a);return l.set(e,s),l})}clearAllTextGlyphPlans(){this.textGlyphPlanCache.set(new Map),this.textGlyphPlanSignatures.set(new Map),this.textGlyphPlanPendingSignatures.set(new Map),this.textGlyphPlanPromises.set(new Map),this.textLayoutCache.set(new Map)}clearTextGlyphPlan(e){let t=this.textGlyphPlanCache();t.delete(e),this.textGlyphPlanCache.set(t);let n=this.textGlyphPlanSignatures();n.delete(e),this.textGlyphPlanSignatures.set(n);let r=this.textGlyphPlanPendingSignatures();r.delete(e),this.textGlyphPlanPendingSignatures.set(r);let o=this.textGlyphPlanPromises();o.delete(e),this.textGlyphPlanPromises.set(o),this.clearTextLayoutCache(e)}refreshFabricOverlays(){let e=this.fabricReadyState(),t=this.fabricCanvasState(),n=this.canvasTransformState();!e||!t||!n||this.render2d()}setTextWarpEnvelope(e){this.textWarpEnvelope.set(e)}clearTextLayoutCache(e){let t=this.textLayoutCache();t.delete(e),this.textLayoutCache.set(t)}ensureWarpMeasurementRoot(){if(!this.isBrowser())return null;let e=this.ensureMeasurementHost();if(!e)return null;if(this.warpMeasurementSvg()&&e.contains(this.warpMeasurementSvg()))return this.warpMeasurementSvg();let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","0"),t.setAttribute("height","0"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none",e.appendChild(t),this.warpMeasurementSvg.set(t),t}ensureWarpPath(e,t){if(!this.isBrowser())return null;let n=t;if(!n)return null;let r=e==="top"?n.topPathD:n.bottomPathD;if(!r||r.trim().length===0)return null;let o=this.warpPathCache()[e];if(o&&o.sourceD===r&&o.path.isConnected)return o.length=o.path.getTotalLength(),o;let s=this.ensureWarpMeasurementRoot();if(!s)return null;o?.path?.parentNode===s&&s.removeChild(o.path);let a=s.ownerDocument.createElementNS(s.namespaceURI,"path");a.setAttribute("d",r),s.appendChild(a);try{let l=a.getTotalLength(),c={path:a,length:l,sourceD:r};return this.warpPathCache.set(he(k({},this.warpPathCache()),{[e]:c})),c}catch(l){return console.error(Bm.failedMeasureWarpPath,l),a.parentNode?.removeChild(a),this.warpPathCache.set(he(k({},this.warpPathCache()),{[e]:null})),null}}setTextGlyphPlan(e,t,n){this.textGlyphPlanCache.update(r=>{let o=new Map(r);return o.set(e,t),o}),this.textGlyphPlanSignatures.update(r=>{let o=new Map(r);return o.set(e,n),o})}static \u0275fac=function(t){return new(t||i)(Ke(Kl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var oh=class i{constructor(e,t=Z(qs)){this.customizerState=e;this.imageCompressionService=t}templates=F([]);backgroundImages=F({});selectedBackgroundKey=F(null);backgroundBaseTransforms=F(new Map);backgroundPivotCache=F(new Map);mediaLibraryBackgroundLoadingKey=F(null);state=Me(()=>({images:this.backgroundImages(),selectedKey:this.selectedBackgroundKey(),templates:this.templates()}));minScale=.25;maxScale=6;scaleStep=.05;minRotation=-180;maxRotation=180;rotationStep=1;minTranslate=-500;maxTranslate=500;translateStep=1;minOpacity=0;maxOpacity=1;opacityStep=.05;xlinkNamespace="http://www.w3.org/1999/xlink";setTemplates(e){this.templates.set(e??[])}reset(){this.backgroundImages.set({}),this.selectedBackgroundKey.set(null),this.backgroundBaseTransforms.set(new Map),this.backgroundPivotCache.set(new Map)}refreshFromSvg(){let e=this.customizerState.svgDoc(),t={};if(this.backgroundBaseTransforms.set(new Map),this.backgroundPivotCache.set(new Map),!e){this.backgroundImages.set(t),this.selectedBackgroundKey.set(null);return}for(let n of this.templates()){let r=this.getTemplateImageElements(e,n),o=r[0]??null;if(!o){t[n.actionItemId]={src:null,fileName:null,transform:k({},rh)};continue}for(let c of r){let d=c.id?.trim();if(!d)continue;let u=c.getAttribute("data-base-transform")??c.getAttribute("transform")??"";this.backgroundBaseTransforms.update(f=>{let h=new Map(f);return h.set(d,u),h})}let s=o.getAttribute("href")??o.getAttributeNS(this.xlinkNamespace,"href"),a=o.getAttribute(me.DATA_BG_NAME),l={scale:this.normalizeScale(Number.parseFloat(o.getAttribute(me.DATA_BG_SCALE)??"1")),rotation:this.normalizeRotation(Number.parseFloat(o.getAttribute(me.DATA_BG_ROTATION)??"0")),translateX:this.normalizeTranslate(Number.parseFloat(o.getAttribute(me.DATA_BG_TRANSLATE_X)??"0")),translateY:this.normalizeTranslate(Number.parseFloat(o.getAttribute(me.DATA_BG_TRANSLATE_Y)??"0")),opacity:this.normalizeOpacity(Number.parseFloat(o.getAttribute(me.DATA_BG_OPACITY)??"1"))};t[n.actionItemId]={src:s&&s.trim().length>0?s:null,fileName:a&&a.trim().length>0?a.trim():null,transform:l}}this.backgroundImages.set(t),this.selectedBackgroundKey()&&!this.backgroundImages()[this.selectedBackgroundKey()]&&this.selectedBackgroundKey.set(null)}select(e){this.selectedBackgroundKey.set(e)}resolveLabel(e){return this.findTemplate(e)?.name??e}async onFileSelected(e,t){if(!t)return null;if(t.size>26214400){let l=`Background image file size must not exceed ${25}MB`;return console.warn(`[BackgroundService] Background upload rejected: file exceeds ${25} MB limit.`),l}if(!(t.type.startsWith("image/")||/\.(png|jpg|jpeg|webp|gif|svg)$/i.test(t.name)))return null;let r=await this.readFileAsDataUrl(t);if(!r)return null;let o=await this.imageCompressionService.compressImageToDataUrl(r),s=this.getBackgroundState(e),a={src:r,fileName:t.name,src3d:o,transform:k({},s.transform)};return this.backgroundImages.set(he(k({},this.backgroundImages()),{[e]:a})),this.selectedBackgroundKey.set(e),await this.applyBackgroundToSvg(e,a),null}async onMediaLibraryBackgroundSelected(e,t,n,r){if(!e||!t||!n)return;this.mediaLibraryBackgroundLoadingKey.set(e);let o=this.getBackgroundState(e),s=await this.imageCompressionService.compressImageToDataUrl(n).catch(()=>n),a={src:n,fileName:r??null,src3d:s,transform:k({},o.transform),blobResourceId:t};this.backgroundImages.set(he(k({},this.backgroundImages()),{[e]:a})),this.selectedBackgroundKey.set(e),await this.applyBackgroundToSvg(e,a),setTimeout(()=>{this.mediaLibraryBackgroundLoadingKey()===e&&this.mediaLibraryBackgroundLoadingKey.set(null)},500)}async remove(e){let t=this.findTemplate(e),n=this.customizerState.svgDoc();if(n&&t){let o=this.getTemplateImageElements(n,t);for(let s of o){let a=s.id?.trim(),l=(a?this.backgroundBaseTransforms().get(a):null)??s.getAttribute(me.DATA_BASE_TRANSFORM)??s.getAttribute("transform")??"";a&&this.backgroundBaseTransforms.update(c=>{let d=new Map(c);return d.set(a,l),d}),this.applyBackgroundSourceAttributes(s,null,null),this.applyBackgroundTransformAttributes(s,l,k({},rh))}}let r={src:null,fileName:null,transform:k({},rh)};this.backgroundImages.set(he(k({},this.backgroundImages()),{[e]:r})),this.customizerState.svgDoc()&&this.customizerState.markSvgMutated(this.customizerState.svgDoc())}async applyToAll(e){let t=this.getBackgroundState(e);if(!t.src)return;let n=this.templates().filter(a=>a.type=="BACKGROUND").map(a=>a.actionItemId).filter(a=>a!==e);if(!n.length)return;let r={src:t.src,fileName:t.fileName,transform:k({},t.transform)},o=k({},this.backgroundImages());for(let a of n)o[a]={src:r.src,fileName:r.fileName,transform:k({},r.transform)};this.backgroundImages.set(o),await Promise.all(n.map(a=>this.applyBackgroundToSvg(a,{src:r.src,fileName:r.fileName,transform:k({},r.transform)},!1)));let s=this.customizerState.svgDoc();s&&this.customizerState.markSvgMutated(s)}async ensureCompressedSourcesFor3d(){let e=Object.entries(this.backgroundImages()).map(([a,l])=>({key:a,src:l.src?.trim()??"",hasCompressed:!!l.src3d})).filter(a=>a.src.length>0&&!a.hasCompressed);if(!e.length)return;let n=(await Promise.all(e.map(async a=>{try{return{key:a.key,src:a.src,src3d:await this.imageCompressionService.compressImageToDataUrl(a.src)}}catch(l){return console.warn("[BackgroundService] Failed to compress background image, using original",l),null}}))).filter(a=>!!a);if(!n.length)return;this.backgroundImages.update(a=>{let l=k({},a),c=!1;for(let d of n){let u=l[d.key];if(!u)continue;let f=u.src?.trim()??"";!f||u.src3d||f!==d.src||(l[d.key]=he(k({},u),{src3d:d.src3d}),c=!0)}return c?l:a});let r=this.backgroundImages(),o=n.map(a=>a.key).filter(a=>{let l=r[a];return!!l?.src&&!!l.src3d});if(!o.length)return;await Promise.all(o.map(a=>this.applyBackgroundToSvg(a,r[a],!1)));let s=this.customizerState.svgDoc();s&&this.customizerState.markSvgMutated(s)}updateTransform(e,t,n){let r=n??this.selectedBackgroundKey();if(!r)return;this.selectedBackgroundKey()!==r&&this.selectedBackgroundKey.set(r);let o=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(o))return;let s=this.normalizeTransform(e,o),a=this.getBackgroundState(r);if(Math.abs(a.transform[e]-s)<1e-4)return;let l=he(k({},a.transform),{[e]:s}),c=he(k({},a),{transform:l});this.backgroundImages.set(he(k({},this.backgroundImages()),{[r]:c})),this.applyBackgroundToSvg(r,c)}stepTransform(e,t,n){let r=n??this.selectedBackgroundKey();if(!r)return;this.selectedBackgroundKey()!==r&&this.selectedBackgroundKey.set(r);let s=this.getBackgroundState(r).transform[e]+t,a=Math.round(s*100)/100;this.updateTransform(e,a,r)}resetTransform(e){let t=e??this.selectedBackgroundKey();if(!t)return;this.selectedBackgroundKey()!==t&&this.selectedBackgroundKey.set(t);let n=this.getBackgroundState(t),r=he(k({},n),{transform:k({},rh)});this.backgroundImages.set(he(k({},this.backgroundImages()),{[t]:r})),this.applyBackgroundToSvg(t,r)}findTemplate(e){return this.templates().find(t=>t.actionItemId===e)}getBackgroundState(e){let t=this.backgroundImages()[e];return t?{src:t.src,fileName:t.fileName,src3d:t.src3d,transform:k({},t.transform)}:{src:null,fileName:null,transform:k({},rh)}}async syncBackgroundsToSvgWithQuality(e="compressed"){let t=this.customizerState.svgDoc();if(!t)return;let n=this.backgroundImages(),r=Object.keys(n).filter(o=>!!n[o]?.src);r.length&&(await Promise.all(r.map(o=>this.applyBackgroundToSvg(o,n[o],!1,e))),this.customizerState.markSvgMutated(t))}async applyBackgroundToSvg(e,t,n=!0,r="compressed"){let o=this.customizerState.svgDoc();if(!o)return;let s=this.findTemplate(e);if(!s)return;let a=!!t.src,l=[];if(a?l=await this.ensureBackgroundImageElements(s):l=this.getTemplateImageElements(o,s),!l.length)return;let c;r==="compressed"?c=t.src3d||t.src:c=t.src;for(let d of l){let u=d.id?.trim(),f=(u?this.backgroundBaseTransforms().get(u):null)??d.getAttribute(me.DATA_BASE_TRANSFORM)??d.getAttribute("transform")??"";u&&this.backgroundBaseTransforms.update(h=>{let p=new Map(h);return p.set(u,f),p}),this.applyBackgroundSourceAttributes(d,c,t.fileName),this.applyBackgroundTransformAttributes(d,f,t.transform)}n&&this.customizerState.markSvgMutated(o)}async ensureBackgroundImageElements(e){let t=this.customizerState.svgDoc();if(!t)return[];let n=this.getTemplateImageElements(t,e);if(!n.length){let r=t.documentElement;if(!r)return[];if(r.getAttribute("xmlns:xlink")||r.setAttribute("xmlns:xlink",this.xlinkNamespace),!e.specificAreaSvgLink)return[];let o=await fetch(e.specificAreaSvgLink);if(!o.ok)return console.error(Bm.failedLoadSvg,e.specificAreaSvgLink),[];let a=(await o.text()).replace(/<svg[^>]*>/i,"").replace(/<\/svg>/i,""),l=new DOMParser,c=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="${this.xlinkNamespace}">${a}</svg>`,d=l.parseFromString(c,"image/svg+xml");Array.from(d.documentElement.childNodes).forEach(f=>{let h=t.importNode(f,!0);r.appendChild(h)}),n=this.getTemplateImageElements(t,e)}if(!n.length)return[];for(let r of n){let o=r.id?.trim(),s=r.getAttribute("data-base-transform"),a=r.getAttribute("transform")??"",l=s!==null?s:a;r.setAttribute("data-base-transform",l),o&&(this.backgroundBaseTransforms.update(c=>{let d=new Map(c);return d.set(o,l),d}),this.backgroundPivotCache.update(c=>{let d=new Map(c);return d.delete(o),d}))}return n}getTemplateImageElements(e,t){let n=this.parseTemplateTargetIds(t);if(!n.length)return[];let r=[];for(let o of n){let s=e.getElementById(o);!s||s.tagName.toLowerCase()!=="image"||r.push(s)}return r}parseTemplateTargetIds(e){return this.parseTargetIds(e.actionPathIdsCsv??e.actionItemId)}parseTargetIds(e){if(!e)return[];let t=new Set,n=[];for(let r of e.split(",")){let o=r.trim();if(!o)continue;let s=o.startsWith("#")?o.slice(1).trim():o;!s||t.has(s)||(t.add(s),n.push(s))}return n}applyBackgroundSourceAttributes(e,t,n){if(!t){e.removeAttribute("href"),e.removeAttributeNS(this.xlinkNamespace,"href"),e.removeAttribute(me.DATA_BG_NAME);return}e.setAttribute("href",t),n&&n.trim().length>0?e.setAttribute(me.DATA_BG_NAME,n.trim()):e.removeAttribute(me.DATA_BG_NAME)}applyBackgroundTransformAttributes(e,t,n){let r={scale:this.normalizeScale(n.scale),rotation:this.normalizeRotation(n.rotation),translateX:this.normalizeTranslate(n.translateX),translateY:this.normalizeTranslate(n.translateY),opacity:this.normalizeOpacity(n.opacity)};e.setAttribute(me.DATA_BASE_TRANSFORM,t),e.setAttribute(me.DATA_BG_SCALE,r.scale.toString()),e.setAttribute(me.DATA_BG_ROTATION,r.rotation.toString()),e.setAttribute(me.DATA_BG_TRANSLATE_X,r.translateX.toString()),e.setAttribute(me.DATA_BG_TRANSLATE_Y,r.translateY.toString()),e.setAttribute(me.DATA_BG_OPACITY,r.opacity.toString());let o=this.computeBackgroundPivot(e,t),s=this.composeCenteredTransformMatrix({scale:r.scale,rotation:r.rotation,translateX:r.translateX,translateY:r.translateY},o),a=this.matrixToTransform(s),l=[t,a].filter(c=>c&&c.trim().length>0).join(" ").trim();l.length>0?e.setAttribute("transform",l):e.removeAttribute("transform"),Math.abs(r.opacity-1)<1e-4?e.removeAttribute("opacity"):e.setAttribute("opacity",r.opacity.toString())}computeBackgroundPivot(e,t){let n=e.id??"";if(n&&this.backgroundPivotCache().has(n))return this.backgroundPivotCache().get(n);let r=e.getAttribute("transform");t&&t.trim().length>0?e.setAttribute("transform",t):e.removeAttribute("transform");let o;try{let a=e.getBBox();if(a.width>0&&a.height>0)o={cx:a.x+a.width/2,cy:a.y+a.height/2};else{let l=e.width?.baseVal?.value??0,c=e.height?.baseVal?.value??0,d=e.x?.baseVal?.value??0,u=e.y?.baseVal?.value??0;l>0&&c>0?o={cx:d+l/2,cy:u+c/2}:o={cx:.5,cy:.5}}}catch{let a=e.width?.baseVal?.value??0,l=e.height?.baseVal?.value??0,c=this.parseMatrixFromTransform(t),d=this.applyMatrixToPoint(c,a/2,l/2);o={cx:d.x,cy:d.y}}r!=null?e.setAttribute("transform",r):e.removeAttribute("transform");let s=Number.isFinite(o.cx)&&Number.isFinite(o.cy);return n&&s&&this.backgroundPivotCache.update(a=>{let l=new Map(a);return l.set(n,o),l}),o}composeCenteredTransformMatrix(e,t){let n=this.identityMatrix();return e.scale!==void 0&&!this.isNearlyZero(e.scale-1)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.scaleMatrix(e.scale,e.scale)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),e.rotation!==void 0&&!this.isNearlyZero(e.rotation)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.rotateMatrix(e.rotation)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),(e.translateX!==void 0&&!this.isNearlyZero(e.translateX)||e.translateY!==void 0&&!this.isNearlyZero(e.translateY))&&(n=this.multiplyMatrices(n,this.translateMatrix(e.translateX??0,e.translateY??0))),n}matrixToTransform(e){if(this.isNearlyZero(e.a-1)&&this.isNearlyZero(e.b)&&this.isNearlyZero(e.c)&&this.isNearlyZero(e.d-1)&&this.isNearlyZero(e.e)&&this.isNearlyZero(e.f))return null;let n=this.roundMatrixValue(e.a),r=this.roundMatrixValue(e.b),o=this.roundMatrixValue(e.c),s=this.roundMatrixValue(e.d),a=this.roundMatrixValue(e.e),l=this.roundMatrixValue(e.f);return`matrix(${n} ${r} ${o} ${s} ${a} ${l})`}parseMatrixFromTransform(e){if(!e)return this.identityMatrix();let t=e.match(/matrix\(([^)]+)\)/i);if(t){let r=t[1].split(/[\s,]+/).map(o=>Number.parseFloat(o)).filter(o=>Number.isFinite(o));if(r.length>=6)return{a:r[0],b:r[1],c:r[2],d:r[3],e:r[4],f:r[5]}}let n=this.customizerState.svgDoc();if(n)try{let r=n.createElementNS("http://www.w3.org/2000/svg","g");r.setAttribute("transform",e),n.documentElement.appendChild(r);let o=r.transform.baseVal.consolidate();if(r.remove(),o)return{a:o.matrix.a,b:o.matrix.b,c:o.matrix.c,d:o.matrix.d,e:o.matrix.e,f:o.matrix.f}}catch{}return this.identityMatrix()}applyMatrixToPoint(e,t,n){return{x:e.a*t+e.c*n+e.e,y:e.b*t+e.d*n+e.f}}isNearlyZero(e,t=1e-4){return Math.abs(e)<=t}roundMatrixValue(e,t=6){if(this.isNearlyZero(e))return 0;let n=Math.pow(10,t);return Math.round(e*n)/n}identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}multiplyMatrices(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}translateMatrix(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}scaleMatrix(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}rotateMatrix(e){let t=e*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return{a:n,b:r,c:-r,d:n,e:0,f:0}}normalizeTransform(e,t){switch(e){case"scale":return this.normalizeScale(t);case"rotation":return this.normalizeRotation(t);case"translateX":case"translateY":return this.normalizeTranslate(t);case"opacity":return this.normalizeOpacity(t);default:return t}}normalizeScale(e){let t=Math.max(this.minScale,Math.min(this.maxScale,e));return Number.isFinite(t)?t:1}normalizeRotation(e){let t=Math.max(this.minRotation,Math.min(this.maxRotation,e));return Number.isFinite(t)?t:0}normalizeTranslate(e){let t=Math.max(this.minTranslate,Math.min(this.maxTranslate,e));return Number.isFinite(t)?t:0}normalizeOpacity(e){let t=Math.max(this.minOpacity,Math.min(this.maxOpacity,e));return Number.isFinite(t)?t:1}readFileAsDataUrl(e){return new Promise(t=>{let n=new FileReader;n.onload=()=>{let r=n.result;t(typeof r=="string"?r:null)},n.onerror=()=>t(null),n.readAsDataURL(e)})}static \u0275fac=function(t){return new(t||i)(Ke(Dn),Ke(qs))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};String.prototype.codePointAt||(function(){var i=(function(){try{var t={},n=Object.defineProperty,r=n(t,t,t)&&n}catch{}return r})(),e=function(t){if(this==null)throw TypeError();var n=String(this),r=n.length,o=t?Number(t):0;if(o!=o&&(o=0),!(o<0||o>=r)){var s=n.charCodeAt(o),a;return s>=55296&&s<=56319&&r>o+1&&(a=n.charCodeAt(o+1),a>=56320&&a<=57343)?(s-55296)*1024+a-56320+65536:s}};i?i(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e})();var OD=0,sB=-3;function Gm(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function bJ(i,e){this.source=i,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new Gm,this.dtree=new Gm}var aB=new Gm,lB=new Gm,RD=new Uint8Array(30),kD=new Uint16Array(30),cB=new Uint8Array(30),dB=new Uint16Array(30),yJ=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_U=new Gm,Ks=new Uint8Array(320);function uB(i,e,t,n){var r,o;for(r=0;r<t;++r)i[r]=0;for(r=0;r<30-t;++r)i[r+t]=r/t|0;for(o=n,r=0;r<30;++r)e[r]=o,o+=1<<i[r]}function xJ(i,e){var t;for(t=0;t<7;++t)i.table[t]=0;for(i.table[7]=24,i.table[8]=152,i.table[9]=112,t=0;t<24;++t)i.trans[t]=256+t;for(t=0;t<144;++t)i.trans[24+t]=t;for(t=0;t<8;++t)i.trans[168+t]=280+t;for(t=0;t<112;++t)i.trans[176+t]=144+t;for(t=0;t<5;++t)e.table[t]=0;for(e.table[5]=32,t=0;t<32;++t)e.trans[t]=t}var SU=new Uint16Array(16);function pD(i,e,t,n){var r,o;for(r=0;r<16;++r)i.table[r]=0;for(r=0;r<n;++r)i.table[e[t+r]]++;for(i.table[0]=0,o=0,r=0;r<16;++r)SU[r]=o,o+=i.table[r];for(r=0;r<n;++r)e[t+r]&&(i.trans[SU[e[t+r]]++]=r)}function _J(i){i.bitcount--||(i.tag=i.source[i.sourceIndex++],i.bitcount=7);var e=i.tag&1;return i.tag>>>=1,e}function Zs(i,e,t){if(!e)return t;for(;i.bitcount<24;)i.tag|=i.source[i.sourceIndex++]<<i.bitcount,i.bitcount+=8;var n=i.tag&65535>>>16-e;return i.tag>>>=e,i.bitcount-=e,n+t}function CD(i,e){for(;i.bitcount<24;)i.tag|=i.source[i.sourceIndex++]<<i.bitcount,i.bitcount+=8;var t=0,n=0,r=0,o=i.tag;do n=2*n+(o&1),o>>>=1,++r,t+=e.table[r],n-=e.table[r];while(n>=0);return i.tag=o,i.bitcount-=r,e.trans[t+n]}function SJ(i,e,t){var n,r,o,s,a,l;for(n=Zs(i,5,257),r=Zs(i,5,1),o=Zs(i,4,4),s=0;s<19;++s)Ks[s]=0;for(s=0;s<o;++s){var c=Zs(i,3,0);Ks[yJ[s]]=c}for(pD(_U,Ks,0,19),a=0;a<n+r;){var d=CD(i,_U);switch(d){case 16:var u=Ks[a-1];for(l=Zs(i,2,3);l;--l)Ks[a++]=u;break;case 17:for(l=Zs(i,3,3);l;--l)Ks[a++]=0;break;case 18:for(l=Zs(i,7,11);l;--l)Ks[a++]=0;break;default:Ks[a++]=d;break}}pD(e,Ks,0,n),pD(t,Ks,n,r)}function CU(i,e,t){for(;;){var n=CD(i,e);if(n===256)return OD;if(n<256)i.dest[i.destLen++]=n;else{var r,o,s,a;for(n-=257,r=Zs(i,RD[n],kD[n]),o=CD(i,t),s=i.destLen-Zs(i,cB[o],dB[o]),a=s;a<s+r;++a)i.dest[i.destLen++]=i.dest[a]}}}function CJ(i){for(var e,t,n;i.bitcount>8;)i.sourceIndex--,i.bitcount-=8;if(e=i.source[i.sourceIndex+1],e=256*e+i.source[i.sourceIndex],t=i.source[i.sourceIndex+3],t=256*t+i.source[i.sourceIndex+2],e!==(~t&65535))return sB;for(i.sourceIndex+=4,n=e;n;--n)i.dest[i.destLen++]=i.source[i.sourceIndex++];return i.bitcount=0,OD}function wJ(i,e){var t=new bJ(i,e),n,r,o;do{switch(n=_J(t),r=Zs(t,2,0),r){case 0:o=CJ(t);break;case 1:o=CU(t,aB,lB);break;case 2:SJ(t,t.ltree,t.dtree),o=CU(t,t.ltree,t.dtree);break;default:o=sB}if(o!==OD)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}xJ(aB,lB);uB(RD,kD,4,3);uB(cB,dB,2,1);RD[28]=0;kD[28]=258;var EJ=wJ;function sh(i,e,t,n,r){return Math.pow(1-r,3)*i+3*Math.pow(1-r,2)*r*e+3*(1-r)*Math.pow(r,2)*t+Math.pow(r,3)*n}function rc(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}rc.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)};rc.prototype.addPoint=function(i,e){typeof i=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=i,this.x2=i),i<this.x1&&(this.x1=i),i>this.x2&&(this.x2=i)),typeof e=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))};rc.prototype.addX=function(i){this.addPoint(i,null)};rc.prototype.addY=function(i){this.addPoint(null,i)};rc.prototype.addBezier=function(i,e,t,n,r,o,s,a){var l=[i,e],c=[t,n],d=[r,o],u=[s,a];this.addPoint(i,e),this.addPoint(s,a);for(var f=0;f<=1;f++){var h=6*l[f]-12*c[f]+6*d[f],p=-3*l[f]+9*c[f]-9*d[f]+3*u[f],v=3*c[f]-3*l[f];if(p===0){if(h===0)continue;var g=-v/h;0<g&&g<1&&(f===0&&this.addX(sh(l[f],c[f],d[f],u[f],g)),f===1&&this.addY(sh(l[f],c[f],d[f],u[f],g)));continue}var m=Math.pow(h,2)-4*v*p;if(!(m<0)){var b=(-h+Math.sqrt(m))/(2*p);0<b&&b<1&&(f===0&&this.addX(sh(l[f],c[f],d[f],u[f],b)),f===1&&this.addY(sh(l[f],c[f],d[f],u[f],b)));var y=(-h-Math.sqrt(m))/(2*p);0<y&&y<1&&(f===0&&this.addX(sh(l[f],c[f],d[f],u[f],y)),f===1&&this.addY(sh(l[f],c[f],d[f],u[f],y)))}}};rc.prototype.addQuad=function(i,e,t,n,r,o){var s=i+.6666666666666666*(t-i),a=e+2/3*(n-e),l=s+1/3*(r-i),c=a+1/3*(o-e);this.addBezier(i,e,s,a,l,c,r,o)};function Xn(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Xn.prototype.moveTo=function(i,e){this.commands.push({type:"M",x:i,y:e})};Xn.prototype.lineTo=function(i,e){this.commands.push({type:"L",x:i,y:e})};Xn.prototype.curveTo=Xn.prototype.bezierCurveTo=function(i,e,t,n,r,o){this.commands.push({type:"C",x1:i,y1:e,x2:t,y2:n,x:r,y:o})};Xn.prototype.quadTo=Xn.prototype.quadraticCurveTo=function(i,e,t,n){this.commands.push({type:"Q",x1:i,y1:e,x:t,y:n})};Xn.prototype.close=Xn.prototype.closePath=function(){this.commands.push({type:"Z"})};Xn.prototype.extend=function(i){if(i.commands)i=i.commands;else if(i instanceof rc){var e=i;this.moveTo(e.x1,e.y1),this.lineTo(e.x2,e.y1),this.lineTo(e.x2,e.y2),this.lineTo(e.x1,e.y2),this.close();return}Array.prototype.push.apply(this.commands,i)};Xn.prototype.getBoundingBox=function(){for(var i=new rc,e=0,t=0,n=0,r=0,o=0;o<this.commands.length;o++){var s=this.commands[o];switch(s.type){case"M":i.addPoint(s.x,s.y),e=n=s.x,t=r=s.y;break;case"L":i.addPoint(s.x,s.y),n=s.x,r=s.y;break;case"Q":i.addQuad(n,r,s.x1,s.y1,s.x,s.y),n=s.x,r=s.y;break;case"C":i.addBezier(n,r,s.x1,s.y1,s.x2,s.y2,s.x,s.y),n=s.x,r=s.y;break;case"Z":n=e,r=t;break;default:throw new Error("Unexpected path command "+s.type)}}return i.isEmpty()&&i.addPoint(0,0),i};Xn.prototype.draw=function(i){i.beginPath();for(var e=0;e<this.commands.length;e+=1){var t=this.commands[e];t.type==="M"?i.moveTo(t.x,t.y):t.type==="L"?i.lineTo(t.x,t.y):t.type==="C"?i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y):t.type==="Q"?i.quadraticCurveTo(t.x1,t.y1,t.x,t.y):t.type==="Z"&&i.closePath()}this.fill&&(i.fillStyle=this.fill,i.fill()),this.stroke&&(i.strokeStyle=this.stroke,i.lineWidth=this.strokeWidth,i.stroke())};Xn.prototype.toPathData=function(i){i=i!==void 0?i:2;function e(s){return Math.round(s)===s?""+Math.round(s):s.toFixed(i)}function t(){for(var s=arguments,a="",l=0;l<arguments.length;l+=1){var c=s[l];c>=0&&l>0&&(a+=" "),a+=e(c)}return a}for(var n="",r=0;r<this.commands.length;r+=1){var o=this.commands[r];o.type==="M"?n+="M"+t(o.x,o.y):o.type==="L"?n+="L"+t(o.x,o.y):o.type==="C"?n+="C"+t(o.x1,o.y1,o.x2,o.y2,o.x,o.y):o.type==="Q"?n+="Q"+t(o.x1,o.y1,o.x,o.y):o.type==="Z"&&(n+="Z")}return n};Xn.prototype.toSVG=function(i){var e='<path d="';return e+=this.toPathData(i),e+='"',this.fill&&this.fill!=="black"&&(this.fill===null?e+=' fill="none"':e+=' fill="'+this.fill+'"'),this.stroke&&(e+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),e+="/>",e};Xn.prototype.toDOMElement=function(i){var e=this.toPathData(i),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",e),t};function fB(i){throw new Error(i)}function wU(i,e){i||fB(e)}var St={fail:fB,argument:wU,assert:wU},EU=32768,MU=2147483648,lh={},Le={},Mt={};function ds(i){return function(){return i}}Le.BYTE=function(i){return St.argument(i>=0&&i<=255,"Byte value should be between 0 and 255."),[i]};Mt.BYTE=ds(1);Le.CHAR=function(i){return[i.charCodeAt(0)]};Mt.CHAR=ds(1);Le.CHARARRAY=function(i){typeof i>"u"&&(i="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var e=[],t=0;t<i.length;t+=1)e[t]=i.charCodeAt(t);return e};Mt.CHARARRAY=function(i){return typeof i>"u"?0:i.length};Le.USHORT=function(i){return[i>>8&255,i&255]};Mt.USHORT=ds(2);Le.SHORT=function(i){return i>=EU&&(i=-(2*EU-i)),[i>>8&255,i&255]};Mt.SHORT=ds(2);Le.UINT24=function(i){return[i>>16&255,i>>8&255,i&255]};Mt.UINT24=ds(3);Le.ULONG=function(i){return[i>>24&255,i>>16&255,i>>8&255,i&255]};Mt.ULONG=ds(4);Le.LONG=function(i){return i>=MU&&(i=-(2*MU-i)),[i>>24&255,i>>16&255,i>>8&255,i&255]};Mt.LONG=ds(4);Le.FIXED=Le.ULONG;Mt.FIXED=Mt.ULONG;Le.FWORD=Le.SHORT;Mt.FWORD=Mt.SHORT;Le.UFWORD=Le.USHORT;Mt.UFWORD=Mt.USHORT;Le.LONGDATETIME=function(i){return[0,0,0,0,i>>24&255,i>>16&255,i>>8&255,i&255]};Mt.LONGDATETIME=ds(8);Le.TAG=function(i){return St.argument(i.length===4,"Tag should be exactly 4 ASCII characters."),[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]};Mt.TAG=ds(4);Le.Card8=Le.BYTE;Mt.Card8=Mt.BYTE;Le.Card16=Le.USHORT;Mt.Card16=Mt.USHORT;Le.OffSize=Le.BYTE;Mt.OffSize=Mt.BYTE;Le.SID=Le.USHORT;Mt.SID=Mt.USHORT;Le.NUMBER=function(i){return i>=-107&&i<=107?[i+139]:i>=108&&i<=1131?(i=i-108,[(i>>8)+247,i&255]):i>=-1131&&i<=-108?(i=-i-108,[(i>>8)+251,i&255]):i>=-32768&&i<=32767?Le.NUMBER16(i):Le.NUMBER32(i)};Mt.NUMBER=function(i){return Le.NUMBER(i).length};Le.NUMBER16=function(i){return[28,i>>8&255,i&255]};Mt.NUMBER16=ds(3);Le.NUMBER32=function(i){return[29,i>>24&255,i>>16&255,i>>8&255,i&255]};Mt.NUMBER32=ds(5);Le.REAL=function(i){var e=i.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));e=(Math.round(i*n)/n).toString()}for(var r="",o=0,s=e.length;o<s;o+=1){var a=e[o];a==="e"?r+=e[++o]==="-"?"c":"b":a==="."?r+="a":a==="-"?r+="e":r+=a}r+=r.length&1?"f":"ff";for(var l=[30],c=0,d=r.length;c<d;c+=2)l.push(parseInt(r.substr(c,2),16));return l};Mt.REAL=function(i){return Le.REAL(i).length};Le.NAME=Le.CHARARRAY;Mt.NAME=Mt.CHARARRAY;Le.STRING=Le.CHARARRAY;Mt.STRING=Mt.CHARARRAY;lh.UTF8=function(i,e,t){for(var n=[],r=t,o=0;o<r;o++,e+=1)n[o]=i.getUint8(e);return String.fromCharCode.apply(null,n)};lh.UTF16=function(i,e,t){for(var n=[],r=t/2,o=0;o<r;o++,e+=2)n[o]=i.getUint16(e);return String.fromCharCode.apply(null,n)};Le.UTF16=function(i){for(var e=[],t=0;t<i.length;t+=1){var n=i.charCodeAt(t);e[e.length]=n>>8&255,e[e.length]=n&255}return e};Mt.UTF16=function(i){return i.length*2};var wD={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};lh.MACSTRING=function(i,e,t,n){var r=wD[n];if(r!==void 0){for(var o="",s=0;s<t;s++){var a=i.getUint8(e+s);a<=127?o+=String.fromCharCode(a):o+=r[a&127]}return o}};var Qx=typeof WeakMap=="function"&&new WeakMap,e_,MJ=function(i){if(!e_){e_={};for(var e in wD)e_[e]=new String(e)}var t=e_[i];if(t!==void 0){if(Qx){var n=Qx.get(t);if(n!==void 0)return n}var r=wD[i];if(r!==void 0){for(var o={},s=0;s<r.length;s++)o[r.charCodeAt(s)]=s+128;return Qx&&Qx.set(t,o),o}}};Le.MACSTRING=function(i,e){var t=MJ(e);if(t!==void 0){for(var n=[],r=0;r<i.length;r++){var o=i.charCodeAt(r);if(o>=128&&(o=t[o],o===void 0))return;n[r]=o}return n}};Mt.MACSTRING=function(i,e){var t=Le.MACSTRING(i,e);return t!==void 0?t.length:0};function ED(i){return i>=-128&&i<=127}function TJ(i,e,t){for(var n=0,r=i.length;e<r&&n<64&&i[e]===0;)++e,++n;return t.push(128|n-1),e}function DJ(i,e,t){for(var n=0,r=i.length,o=e;o<r&&n<64;){var s=i[o];if(!ED(s)||s===0&&o+1<r&&i[o+1]===0)break;++o,++n}t.push(n-1);for(var a=e;a<o;++a)t.push(i[a]+256&255);return o}function AJ(i,e,t){for(var n=0,r=i.length,o=e;o<r&&n<64;){var s=i[o];if(s===0||ED(s)&&o+1<r&&ED(i[o+1]))break;++o,++n}t.push(64|n-1);for(var a=e;a<o;++a){var l=i[a];t.push(l+65536>>8&255,l+256&255)}return o}Le.VARDELTAS=function(i){for(var e=0,t=[];e<i.length;){var n=i[e];n===0?e=TJ(i,e,t):n>=-128&&n<=127?e=DJ(i,e,t):e=AJ(i,e,t)}return t};Le.INDEX=function(i){for(var e=1,t=[e],n=[],r=0;r<i.length;r+=1){var o=Le.OBJECT(i[r]);Array.prototype.push.apply(n,o),e+=o.length,t.push(e)}if(n.length===0)return[0,0];for(var s=[],a=1+Math.floor(Math.log(e)/Math.log(2))/8|0,l=[void 0,Le.BYTE,Le.USHORT,Le.UINT24,Le.ULONG][a],c=0;c<t.length;c+=1){var d=l(t[c]);Array.prototype.push.apply(s,d)}return Array.prototype.concat(Le.Card16(i.length),Le.OffSize(a),s,n)};Mt.INDEX=function(i){return Le.INDEX(i).length};Le.DICT=function(i){for(var e=[],t=Object.keys(i),n=t.length,r=0;r<n;r+=1){var o=parseInt(t[r],0),s=i[o];e=e.concat(Le.OPERAND(s.value,s.type)),e=e.concat(Le.OPERATOR(o))}return e};Mt.DICT=function(i){return Le.DICT(i).length};Le.OPERATOR=function(i){return i<1200?[i]:[12,i-1200]};Le.OPERAND=function(i,e){var t=[];if(Array.isArray(e))for(var n=0;n<e.length;n+=1)St.argument(i.length===e.length,"Not enough arguments given for type"+e),t=t.concat(Le.OPERAND(i[n],e[n]));else if(e==="SID")t=t.concat(Le.NUMBER(i));else if(e==="offset")t=t.concat(Le.NUMBER32(i));else if(e==="number")t=t.concat(Le.NUMBER(i));else if(e==="real")t=t.concat(Le.REAL(i));else throw new Error("Unknown operand type "+e);return t};Le.OP=Le.BYTE;Mt.OP=Mt.BYTE;var t_=typeof WeakMap=="function"&&new WeakMap;Le.CHARSTRING=function(i){if(t_){var e=t_.get(i);if(e!==void 0)return e}for(var t=[],n=i.length,r=0;r<n;r+=1){var o=i[r];t=t.concat(Le[o.type](o.value))}return t_&&t_.set(i,t),t};Mt.CHARSTRING=function(i){return Le.CHARSTRING(i).length};Le.OBJECT=function(i){var e=Le[i.type];return St.argument(e!==void 0,"No encoding function for type "+i.type),e(i.value)};Mt.OBJECT=function(i){var e=Mt[i.type];return St.argument(e!==void 0,"No sizeOf function for type "+i.type),e(i.value)};Le.TABLE=function(i){for(var e=[],t=i.fields.length,n=[],r=[],o=0;o<t;o+=1){var s=i.fields[o],a=Le[s.type];St.argument(a!==void 0,"No encoding function for field type "+s.type+" ("+s.name+")");var l=i[s.name];l===void 0&&(l=s.value);var c=a(l);s.type==="TABLE"?(r.push(e.length),e=e.concat([0,0]),n.push(c)):e=e.concat(c)}for(var d=0;d<n.length;d+=1){var u=r[d],f=e.length;St.argument(f<65536,"Table "+i.tableName+" too big."),e[u]=f>>8,e[u+1]=f&255,e=e.concat(n[d])}return e};Mt.TABLE=function(i){for(var e=0,t=i.fields.length,n=0;n<t;n+=1){var r=i.fields[n],o=Mt[r.type];St.argument(o!==void 0,"No sizeOf function for field type "+r.type+" ("+r.name+")");var s=i[r.name];s===void 0&&(s=r.value),e+=o(s),r.type==="TABLE"&&(e+=2)}return e};Le.RECORD=Le.TABLE;Mt.RECORD=Mt.TABLE;Le.LITERAL=function(i){return i};Mt.LITERAL=function(i){return i.length};function xi(i,e,t){if(e.length&&(e[0].name!=="coverageFormat"||e[0].value===1))for(var n=0;n<e.length;n+=1){var r=e[n];this[r.name]=r.value}if(this.tableName=i,this.fields=e,t)for(var o=Object.keys(t),s=0;s<o.length;s+=1){var a=o[s],l=t[a];this[a]!==void 0&&(this[a]=l)}}xi.prototype.encode=function(){return Le.TABLE(this)};xi.prototype.sizeOf=function(){return Mt.TABLE(this)};function jm(i,e,t){t===void 0&&(t=e.length);var n=new Array(e.length+1);n[0]={name:i+"Count",type:"USHORT",value:t};for(var r=0;r<e.length;r++)n[r+1]={name:i+r,type:"USHORT",value:e[r]};return n}function MD(i,e,t){var n=e.length,r=new Array(n+1);r[0]={name:i+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:i+o,type:"TABLE",value:t(e[o],o)};return r}function Wm(i,e,t){var n=e.length,r=[];r[0]={name:i+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(t(e[o],o));return r}function s_(i){i.format===1?xi.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(jm("glyph",i.glyphs))):i.format===2?xi.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(Wm("rangeRecord",i.ranges,function(e){return[{name:"startGlyphID",type:"USHORT",value:e.start},{name:"endGlyphID",type:"USHORT",value:e.end},{name:"startCoverageIndex",type:"USHORT",value:e.index}]}))):St.assert(!1,"Coverage format must be 1 or 2.")}s_.prototype=Object.create(xi.prototype);s_.prototype.constructor=s_;function a_(i){xi.call(this,"scriptListTable",Wm("scriptRecord",i,function(e,t){var n=e.script,r=n.defaultLangSys;return St.assert(!!r,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new xi("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new xi("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(jm("featureIndex",r.featureIndexes)))}].concat(Wm("langSys",n.langSysRecords,function(o,s){var a=o.langSys;return[{name:"langSysTag"+s,type:"TAG",value:o.tag},{name:"langSys"+s,type:"TABLE",value:new xi("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(jm("featureIndex",a.featureIndexes)))}]})))}]}))}a_.prototype=Object.create(xi.prototype);a_.prototype.constructor=a_;function l_(i){xi.call(this,"featureListTable",Wm("featureRecord",i,function(e,t){var n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new xi("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(jm("lookupListIndex",n.lookupListIndexes)))}]}))}l_.prototype=Object.create(xi.prototype);l_.prototype.constructor=l_;function c_(i,e){xi.call(this,"lookupListTable",MD("lookup",i,function(t){var n=e[t.lookupType];return St.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new xi("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(MD("subtable",t.subtables,n)))}))}c_.prototype=Object.create(xi.prototype);c_.prototype.constructor=c_;var $e={Table:xi,Record:xi,Coverage:s_,ScriptList:a_,FeatureList:l_,LookupList:c_,ushortList:jm,tableList:MD,recordList:Wm};function TU(i,e){return i.getUint8(e)}function d_(i,e){return i.getUint16(e,!1)}function IJ(i,e){return i.getInt16(e,!1)}function FD(i,e){return i.getUint32(e,!1)}function hB(i,e){var t=i.getInt16(e,!1),n=i.getUint16(e+2,!1);return t+n/65535}function PJ(i,e){for(var t="",n=e;n<e+4;n+=1)t+=String.fromCharCode(i.getInt8(n));return t}function OJ(i,e,t){for(var n=0,r=0;r<t;r+=1)n<<=8,n+=i.getUint8(e+r);return n}function RJ(i,e,t){for(var n=[],r=e;r<t;r+=1)n.push(i.getUint8(r));return n}function kJ(i){for(var e="",t=0;t<i.length;t+=1)e+=String.fromCharCode(i[t]);return e}var FJ={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function oe(i,e){this.data=i,this.offset=e,this.relativeOffset=0}oe.prototype.parseByte=function(){var i=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,i};oe.prototype.parseChar=function(){var i=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,i};oe.prototype.parseCard8=oe.prototype.parseByte;oe.prototype.parseUShort=function(){var i=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,i};oe.prototype.parseCard16=oe.prototype.parseUShort;oe.prototype.parseSID=oe.prototype.parseUShort;oe.prototype.parseOffset16=oe.prototype.parseUShort;oe.prototype.parseShort=function(){var i=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,i};oe.prototype.parseF2Dot14=function(){var i=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,i};oe.prototype.parseULong=function(){var i=FD(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,i};oe.prototype.parseOffset32=oe.prototype.parseULong;oe.prototype.parseFixed=function(){var i=hB(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,i};oe.prototype.parseString=function(i){var e=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=i;for(var r=0;r<i;r++)n+=String.fromCharCode(e.getUint8(t+r));return n};oe.prototype.parseTag=function(){return this.parseString(4)};oe.prototype.parseLongDateTime=function(){var i=FD(this.data,this.offset+this.relativeOffset+4);return i-=2082844800,this.relativeOffset+=8,i};oe.prototype.parseVersion=function(i){var e=d_(this.data,this.offset+this.relativeOffset),t=d_(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,i===void 0&&(i=4096),e+t/i/10};oe.prototype.skip=function(i,e){e===void 0&&(e=1),this.relativeOffset+=FJ[i]*e};oe.prototype.parseULongList=function(i){i===void 0&&(i=this.parseULong());for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint32(n),n+=4;return this.relativeOffset+=i*4,e};oe.prototype.parseOffset16List=oe.prototype.parseUShortList=function(i){i===void 0&&(i=this.parseUShort());for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint16(n),n+=2;return this.relativeOffset+=i*2,e};oe.prototype.parseShortList=function(i){for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getInt16(n),n+=2;return this.relativeOffset+=i*2,e};oe.prototype.parseByteList=function(i){for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint8(n++);return this.relativeOffset+=i,e};oe.prototype.parseList=function(i,e){e||(e=i,i=this.parseUShort());for(var t=new Array(i),n=0;n<i;n++)t[n]=e.call(this);return t};oe.prototype.parseList32=function(i,e){e||(e=i,i=this.parseULong());for(var t=new Array(i),n=0;n<i;n++)t[n]=e.call(this);return t};oe.prototype.parseRecordList=function(i,e){e||(e=i,i=this.parseUShort());for(var t=new Array(i),n=Object.keys(e),r=0;r<i;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],l=e[a];o[a]=l.call(this)}t[r]=o}return t};oe.prototype.parseRecordList32=function(i,e){e||(e=i,i=this.parseULong());for(var t=new Array(i),n=Object.keys(e),r=0;r<i;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],l=e[a];o[a]=l.call(this)}t[r]=o}return t};oe.prototype.parseStruct=function(i){if(typeof i=="function")return i.call(this);for(var e=Object.keys(i),t={},n=0;n<e.length;n++){var r=e[n],o=i[r];t[r]=o.call(this)}return t};oe.prototype.parseValueRecord=function(i){if(i===void 0&&(i=this.parseUShort()),i!==0){var e={};return i&1&&(e.xPlacement=this.parseShort()),i&2&&(e.yPlacement=this.parseShort()),i&4&&(e.xAdvance=this.parseShort()),i&8&&(e.yAdvance=this.parseShort()),i&16&&(e.xPlaDevice=void 0,this.parseShort()),i&32&&(e.yPlaDevice=void 0,this.parseShort()),i&64&&(e.xAdvDevice=void 0,this.parseShort()),i&128&&(e.yAdvDevice=void 0,this.parseShort()),e}};oe.prototype.parseValueRecordList=function(){for(var i=this.parseUShort(),e=this.parseUShort(),t=new Array(e),n=0;n<e;n++)t[n]=this.parseValueRecord(i);return t};oe.prototype.parsePointer=function(i){var e=this.parseOffset16();if(e>0)return new oe(this.data,this.offset+e).parseStruct(i)};oe.prototype.parsePointer32=function(i){var e=this.parseOffset32();if(e>0)return new oe(this.data,this.offset+e).parseStruct(i)};oe.prototype.parseListOfLists=function(i){for(var e=this.parseOffset16List(),t=e.length,n=this.relativeOffset,r=new Array(t),o=0;o<t;o++){var s=e[o];if(s===0){r[o]=void 0;continue}if(this.relativeOffset=s,i){for(var a=this.parseOffset16List(),l=new Array(a.length),c=0;c<a.length;c++)this.relativeOffset=s+a[c],l[c]=i.call(this);r[o]=l}else r[o]=this.parseUShortList()}return this.relativeOffset=n,r};oe.prototype.parseCoverage=function(){var i=this.offset+this.relativeOffset,e=this.parseUShort(),t=this.parseUShort();if(e===1)return{format:1,glyphs:this.parseUShortList(t)};if(e===2){for(var n=new Array(t),r=0;r<t;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}}throw new Error("0x"+i.toString(16)+": Coverage format must be 1 or 2.")};oe.prototype.parseClassDef=function(){var i=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(e===2)return{format:2,ranges:this.parseRecordList({start:oe.uShort,end:oe.uShort,classId:oe.uShort})};throw new Error("0x"+i.toString(16)+": ClassDef format must be 1 or 2.")};oe.list=function(i,e){return function(){return this.parseList(i,e)}};oe.list32=function(i,e){return function(){return this.parseList32(i,e)}};oe.recordList=function(i,e){return function(){return this.parseRecordList(i,e)}};oe.recordList32=function(i,e){return function(){return this.parseRecordList32(i,e)}};oe.pointer=function(i){return function(){return this.parsePointer(i)}};oe.pointer32=function(i){return function(){return this.parsePointer32(i)}};oe.tag=oe.prototype.parseTag;oe.byte=oe.prototype.parseByte;oe.uShort=oe.offset16=oe.prototype.parseUShort;oe.uShortList=oe.prototype.parseUShortList;oe.uLong=oe.offset32=oe.prototype.parseULong;oe.uLongList=oe.prototype.parseULongList;oe.struct=oe.prototype.parseStruct;oe.coverage=oe.prototype.parseCoverage;oe.classDef=oe.prototype.parseClassDef;var DU={reserved:oe.uShort,reqFeatureIndex:oe.uShort,featureIndexes:oe.uShortList};oe.prototype.parseScriptList=function(){return this.parsePointer(oe.recordList({tag:oe.tag,script:oe.pointer({defaultLangSys:oe.pointer(DU),langSysRecords:oe.recordList({tag:oe.tag,langSys:oe.pointer(DU)})})}))||[]};oe.prototype.parseFeatureList=function(){return this.parsePointer(oe.recordList({tag:oe.tag,feature:oe.pointer({featureParams:oe.offset16,lookupListIndexes:oe.uShortList})}))||[]};oe.prototype.parseLookupList=function(i){return this.parsePointer(oe.list(oe.pointer(function(){var e=this.parseUShort();St.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:e,lookupFlag:t,subtables:this.parseList(oe.pointer(i[e])),markFilteringSet:n?this.parseUShort():void 0}})))||[]};oe.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var i=this.parseUShort(),e=this.parseUShort();St.argument(i===1&&e<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:oe.offset32,featureTableSubstitutionOffset:oe.offset32});return t})||[]};var et={getByte:TU,getCard8:TU,getUShort:d_,getCard16:d_,getShort:IJ,getULong:FD,getFixed:hB,getTag:PJ,getOffset:OJ,getBytes:RJ,bytesToString:kJ,Parser:oe};function NJ(i,e){e.parseUShort(),i.length=e.parseULong(),i.language=e.parseULong();var t;i.groupCount=t=e.parseULong(),i.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var r=e.parseULong(),o=e.parseULong(),s=e.parseULong(),a=r;a<=o;a+=1)i.glyphIndexMap[a]=s,s++}function LJ(i,e,t,n,r){i.length=e.parseUShort(),i.language=e.parseUShort();var o;i.segCount=o=e.parseUShort()>>1,e.skip("uShort",3),i.glyphIndexMap={};for(var s=new et.Parser(t,n+r+14),a=new et.Parser(t,n+r+16+o*2),l=new et.Parser(t,n+r+16+o*4),c=new et.Parser(t,n+r+16+o*6),d=n+r+16+o*8,u=0;u<o-1;u+=1)for(var f=void 0,h=s.parseUShort(),p=a.parseUShort(),v=l.parseShort(),g=c.parseUShort(),m=p;m<=h;m+=1)g!==0?(d=c.offset+c.relativeOffset-2,d+=g,d+=(m-p)*2,f=et.getUShort(t,d),f!==0&&(f=f+v&65535)):f=m+v&65535,i.glyphIndexMap[m]=f}function UJ(i,e){var t={};t.version=et.getUShort(i,e),St.argument(t.version===0,"cmap table version should be 0."),t.numTables=et.getUShort(i,e+2);for(var n=-1,r=t.numTables-1;r>=0;r-=1){var o=et.getUShort(i,e+4+r*8),s=et.getUShort(i,e+4+r*8+2);if(o===3&&(s===0||s===1||s===10)||o===0&&(s===0||s===1||s===2||s===3||s===4)){n=et.getULong(i,e+4+r*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var a=new et.Parser(i,e+n);if(t.format=a.parseUShort(),t.format===12)NJ(t,a);else if(t.format===4)LJ(t,a,i,e,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function BJ(i,e,t){i.segments.push({end:e,start:e,delta:-(e-t),offset:0,glyphIndex:t})}function zJ(i){i.segments.push({end:65535,start:65535,delta:1,offset:0})}function VJ(i){var e=!0,t;for(t=i.length-1;t>0;t-=1){var n=i.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),e=!1;break}}var r=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:e?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:e?12:20}];e||(r=r.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),r=r.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var o=new $e.Table("cmap",r);for(o.segments=[],t=0;t<i.length;t+=1){for(var s=i.get(t),a=0;a<s.unicodes.length;a+=1)BJ(o,s.unicodes[a],t);o.segments=o.segments.sort(function(b,y){return b.start-y.start})}zJ(o);var l=o.segments.length,c=0,d=[],u=[],f=[],h=[],p=[],v=[];for(t=0;t<l;t+=1){var g=o.segments[t];g.end<=65535&&g.start<=65535?(d=d.concat({name:"end_"+t,type:"USHORT",value:g.end}),u=u.concat({name:"start_"+t,type:"USHORT",value:g.start}),f=f.concat({name:"idDelta_"+t,type:"SHORT",value:g.delta}),h=h.concat({name:"idRangeOffset_"+t,type:"USHORT",value:g.offset}),g.glyphId!==void 0&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:g.glyphId}))):c+=1,!e&&g.glyphIndex!==void 0&&(v=v.concat({name:"cmap12Start_"+t,type:"ULONG",value:g.start}),v=v.concat({name:"cmap12End_"+t,type:"ULONG",value:g.end}),v=v.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:g.glyphIndex}))}if(o.segCountX2=(l-c)*2,o.searchRange=Math.pow(2,Math.floor(Math.log(l-c)/Math.log(2)))*2,o.entrySelector=Math.log(o.searchRange/2)/Math.log(2),o.rangeShift=o.segCountX2-o.searchRange,o.fields=o.fields.concat(d),o.fields.push({name:"reservedPad",type:"USHORT",value:0}),o.fields=o.fields.concat(u),o.fields=o.fields.concat(f),o.fields=o.fields.concat(h),o.fields=o.fields.concat(p),o.cmap4Length=14+d.length*2+2+u.length*2+f.length*2+h.length*2+p.length*2,!e){var m=16+v.length*4;o.cmap12Offset=20+o.cmap4Length,o.fields=o.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:m},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:v.length/3}]),o.fields=o.fields.concat(v)}return o}var pB={parse:UJ,make:VJ},r_=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],HJ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],GJ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],qd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function mB(i){this.font=i}mB.prototype.charToGlyphIndex=function(i){var e=i.codePointAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var r=t.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===e)return n}return null};function gB(i){this.cmap=i}gB.prototype.charToGlyphIndex=function(i){return this.cmap.glyphIndexMap[i.codePointAt(0)]||0};function u_(i,e){this.encoding=i,this.charset=e}u_.prototype.charToGlyphIndex=function(i){var e=i.codePointAt(0),t=this.encoding[e];return this.charset.indexOf(t)};function ND(i){switch(i.version){case 1:this.names=qd.slice();break;case 2:this.names=new Array(i.numberOfGlyphs);for(var e=0;e<i.numberOfGlyphs;e++)i.glyphNameIndex[e]<qd.length?this.names[e]=qd[i.glyphNameIndex[e]]:this.names[e]=i.names[i.glyphNameIndex[e]-qd.length];break;case 2.5:this.names=new Array(i.numberOfGlyphs);for(var t=0;t<i.numberOfGlyphs;t++)this.names[t]=qd[t+i.glyphNameIndex[t]];break;case 3:this.names=[];break;default:this.names=[];break}}ND.prototype.nameToGlyphIndex=function(i){return this.names.indexOf(i)};ND.prototype.glyphIndexToName=function(i){return this.names[i]};function jJ(i){for(var e,t=i.tables.cmap.glyphIndexMap,n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r],s=t[o];e=i.glyphs.get(s),e.addUnicode(parseInt(o))}for(var a=0;a<i.glyphs.length;a+=1)e=i.glyphs.get(a),i.cffEncoding?i.isCIDFont?e.name="gid"+a:e.name=i.cffEncoding.charset[a]:i.glyphNames.names&&(e.name=i.glyphNames.glyphIndexToName(a))}function WJ(i){i._IndexToUnicodeMap={};for(var e=i.tables.cmap.glyphIndexMap,t=Object.keys(e),n=0;n<t.length;n+=1){var r=t[n],o=e[r];i._IndexToUnicodeMap[o]===void 0?i._IndexToUnicodeMap[o]={unicodes:[parseInt(r)]}:i._IndexToUnicodeMap[o].unicodes.push(parseInt(r))}}function $J(i,e){e.lowMemory?WJ(i):jJ(i)}function YJ(i,e,t,n,r){i.beginPath(),i.moveTo(e,t),i.lineTo(n,r),i.stroke()}var Xd={line:YJ};function XJ(i,e){var t=e||new Xn;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function Eo(i){this.bindConstructorValues(i)}Eo.prototype.bindConstructorValues=function(i){this.index=i.index||0,this.name=i.name||null,this.unicode=i.unicode||void 0,this.unicodes=i.unicodes||i.unicode!==void 0?[i.unicode]:[],"xMin"in i&&(this.xMin=i.xMin),"yMin"in i&&(this.yMin=i.yMin),"xMax"in i&&(this.xMax=i.xMax),"yMax"in i&&(this.yMax=i.yMax),"advanceWidth"in i&&(this.advanceWidth=i.advanceWidth),Object.defineProperty(this,"path",XJ(this,i.path))};Eo.prototype.addUnicode=function(i){this.unicodes.length===0&&(this.unicode=i),this.unicodes.push(i)};Eo.prototype.getBoundingBox=function(){return this.path.getBoundingBox()};Eo.prototype.getPath=function(i,e,t,n,r){i=i!==void 0?i:0,e=e!==void 0?e:0,t=t!==void 0?t:72;var o,s;n||(n={});var a=n.xScale,l=n.yScale;if(n.hinting&&r&&r.hinting&&(s=this.path&&r.hinting.exec(this,t)),s)o=r.hinting.getCommands(s),i=Math.round(i),e=Math.round(e),a=l=1;else{o=this.path.commands;var c=1/(this.path.unitsPerEm||1e3)*t;a===void 0&&(a=c),l===void 0&&(l=c)}for(var d=new Xn,u=0;u<o.length;u+=1){var f=o[u];f.type==="M"?d.moveTo(i+f.x*a,e+-f.y*l):f.type==="L"?d.lineTo(i+f.x*a,e+-f.y*l):f.type==="Q"?d.quadraticCurveTo(i+f.x1*a,e+-f.y1*l,i+f.x*a,e+-f.y*l):f.type==="C"?d.curveTo(i+f.x1*a,e+-f.y1*l,i+f.x2*a,e+-f.y2*l,i+f.x*a,e+-f.y*l):f.type==="Z"&&d.closePath()}return d};Eo.prototype.getContours=function(){if(this.points===void 0)return[];for(var i=[],e=[],t=0;t<this.points.length;t+=1){var n=this.points[t];e.push(n),n.lastPointOfContour&&(i.push(e),e=[])}return St.argument(e.length===0,"There are still points left in the current contour."),i};Eo.prototype.getMetrics=function(){for(var i=this.path.commands,e=[],t=[],n=0;n<i.length;n+=1){var r=i[n];r.type!=="Z"&&(e.push(r.x),t.push(r.y)),(r.type==="Q"||r.type==="C")&&(e.push(r.x1),t.push(r.y1)),r.type==="C"&&(e.push(r.x2),t.push(r.y2))}var o={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,e),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o};Eo.prototype.draw=function(i,e,t,n,r){this.getPath(e,t,n,r).draw(i)};Eo.prototype.drawPoints=function(i,e,t,n){function r(u,f,h,p){i.beginPath();for(var v=0;v<u.length;v+=1)i.moveTo(f+u[v].x*p,h+u[v].y*p),i.arc(f+u[v].x*p,h+u[v].y*p,2,0,Math.PI*2,!1);i.closePath(),i.fill()}e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24;for(var o=1/this.path.unitsPerEm*n,s=[],a=[],l=this.path,c=0;c<l.commands.length;c+=1){var d=l.commands[c];d.x!==void 0&&s.push({x:d.x,y:-d.y}),d.x1!==void 0&&a.push({x:d.x1,y:-d.y1}),d.x2!==void 0&&a.push({x:d.x2,y:-d.y2})}i.fillStyle="blue",r(s,e,t,o),i.fillStyle="red",r(a,e,t,o)};Eo.prototype.drawMetrics=function(i,e,t,n){var r;e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24,r=1/this.path.unitsPerEm*n,i.lineWidth=1,i.strokeStyle="black",Xd.line(i,e,-1e4,e,1e4),Xd.line(i,-1e4,t,1e4,t);var o=this.xMin||0,s=this.yMin||0,a=this.xMax||0,l=this.yMax||0,c=this.advanceWidth||0;i.strokeStyle="blue",Xd.line(i,e+o*r,-1e4,e+o*r,1e4),Xd.line(i,e+a*r,-1e4,e+a*r,1e4),Xd.line(i,-1e4,t+-s*r,1e4,t+-s*r),Xd.line(i,-1e4,t+-l*r,1e4,t+-l*r),i.strokeStyle="green",Xd.line(i,e+c*r,-1e4,e+c*r,1e4)};function n_(i,e,t){Object.defineProperty(i,e,{get:function(){return i.path,i[t]},set:function(n){i[t]=n},enumerable:!0,configurable:!0})}function LD(i,e){if(this.font=i,this.glyphs={},Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];n.path.unitsPerEm=i.unitsPerEm,this.glyphs[t]=n}this.length=e&&e.length||0}LD.prototype.get=function(i){if(this.glyphs[i]===void 0){this.font._push(i),typeof this.glyphs[i]=="function"&&(this.glyphs[i]=this.glyphs[i]());var e=this.glyphs[i],t=this.font._IndexToUnicodeMap[i];if(t)for(var n=0;n<t.unicodes.length;n++)e.addUnicode(t.unicodes[n]);this.font.cffEncoding?this.font.isCIDFont?e.name="gid"+i:e.name=this.font.cffEncoding.charset[i]:this.font.glyphNames.names&&(e.name=this.font.glyphNames.glyphIndexToName(i)),this.glyphs[i].advanceWidth=this.font._hmtxTableData[i].advanceWidth,this.glyphs[i].leftSideBearing=this.font._hmtxTableData[i].leftSideBearing}else typeof this.glyphs[i]=="function"&&(this.glyphs[i]=this.glyphs[i]());return this.glyphs[i]};LD.prototype.push=function(i,e){this.glyphs[i]=e,this.length++};function qJ(i,e){return new Eo({index:e,font:i})}function KJ(i,e,t,n,r,o){return function(){var s=new Eo({index:e,font:i});return s.path=function(){t(s,n,r);var a=o(i.glyphs,s);return a.unitsPerEm=i.unitsPerEm,a},n_(s,"xMin","_xMin"),n_(s,"xMax","_xMax"),n_(s,"yMin","_yMin"),n_(s,"yMax","_yMax"),s}}function ZJ(i,e,t,n){return function(){var r=new Eo({index:e,font:i});return r.path=function(){var o=t(i,r,n);return o.unitsPerEm=i.unitsPerEm,o},r}}var Qs={GlyphSet:LD,glyphLoader:qJ,ttfGlyphLoader:KJ,cffGlyphLoader:ZJ};function vB(i,e){if(i===e)return!0;if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(var t=0;t<i.length;t+=1)if(!vB(i[t],e[t]))return!1;return!0}else return!1}function TD(i){var e;return i.length<1240?e=107:i.length<33900?e=1131:e=32768,e}function ec(i,e,t){var n=[],r=[],o=et.getCard16(i,e),s,a;if(o!==0){var l=et.getByte(i,e+2);s=e+(o+1)*l+2;for(var c=e+3,d=0;d<o+1;d+=1)n.push(et.getOffset(i,c,l)),c+=l;a=s+n[o]}else a=e+2;for(var u=0;u<n.length-1;u+=1){var f=et.getBytes(i,s+n[u],s+n[u+1]);t&&(f=t(f)),r.push(f)}return{objects:r,startOffset:e,endOffset:a}}function JJ(i,e){var t=[],n=et.getCard16(i,e),r,o;if(n!==0){var s=et.getByte(i,e+2);r=e+(n+1)*s+2;for(var a=e+3,l=0;l<n+1;l+=1)t.push(et.getOffset(i,a,s)),a+=s;o=r+t[n]}else o=e+2;return{offsets:t,startOffset:e,endOffset:o}}function QJ(i,e,t,n,r){var o=et.getCard16(t,n),s=0;if(o!==0){var a=et.getByte(t,n+2);s=n+(o+1)*a+2}var l=et.getBytes(t,s+e[i],s+e[i+1]);return r&&(l=r(l)),l}function eQ(i){for(var e="",t=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var r=i.parseByte(),o=r>>4,s=r&15;if(o===t||(e+=n[o],s===t))break;e+=n[s]}return parseFloat(e)}function tQ(i,e){var t,n,r,o;if(e===28)return t=i.parseByte(),n=i.parseByte(),t<<8|n;if(e===29)return t=i.parseByte(),n=i.parseByte(),r=i.parseByte(),o=i.parseByte(),t<<24|n<<16|r<<8|o;if(e===30)return eQ(i);if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return t=i.parseByte(),(e-247)*256+t+108;if(e>=251&&e<=254)return t=i.parseByte(),-(e-251)*256-t-108;throw new Error("Invalid b0 "+e)}function nQ(i){for(var e={},t=0;t<i.length;t+=1){var n=i[t][0],r=i[t][1],o=void 0;if(r.length===1?o=r[0]:o=r,e.hasOwnProperty(n)&&!isNaN(e[n]))throw new Error("Object "+e+" already has key "+n);e[n]=o}return e}function bB(i,e,t){e=e!==void 0?e:0;var n=new et.Parser(i,e),r=[],o=[];for(t=t!==void 0?t:i.length;n.relativeOffset<t;){var s=n.parseByte();s<=21?(s===12&&(s=1200+n.parseByte()),r.push([s,o]),o=[]):o.push(tQ(n,s))}return nQ(r)}function Hm(i,e){return e<=390?e=r_[e]:e=i[e-391],e}function yB(i,e,t){for(var n={},r,o=0;o<e.length;o+=1){var s=e[o];if(Array.isArray(s.type)){var a=[];a.length=s.type.length;for(var l=0;l<s.type.length;l++)r=i[s.op]!==void 0?i[s.op][l]:void 0,r===void 0&&(r=s.value!==void 0&&s.value[l]!==void 0?s.value[l]:null),s.type[l]==="SID"&&(r=Hm(t,r)),a[l]=r;n[s.name]=a}else r=i[s.op],r===void 0&&(r=s.value!==void 0?s.value:null),s.type==="SID"&&(r=Hm(t,r)),n[s.name]=r}return n}function iQ(i,e){var t={};return t.formatMajor=et.getCard8(i,e),t.formatMinor=et.getCard8(i,e+1),t.size=et.getCard8(i,e+2),t.offsetSize=et.getCard8(i,e+3),t.startOffset=e,t.endOffset=e+4,t}var xB=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],_B=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function rQ(i,e){var t=bB(i,0,i.byteLength);return yB(t,xB,e)}function SB(i,e,t,n){var r=bB(i,e,t);return yB(r,_B,n)}function AU(i,e,t,n){for(var r=[],o=0;o<t.length;o+=1){var s=new DataView(new Uint8Array(t[o]).buffer),a=rQ(s,n);a._subrs=[],a._subrsBias=0,a._defaultWidthX=0,a._nominalWidthX=0;var l=a.private[0],c=a.private[1];if(l!==0&&c!==0){var d=SB(i,c+e,l,n);if(a._defaultWidthX=d.defaultWidthX,a._nominalWidthX=d.nominalWidthX,d.subrs!==0){var u=c+d.subrs,f=ec(i,u+e);a._subrs=f.objects,a._subrsBias=TD(a._subrs)}a._privateDict=d}r.push(a)}return r}function oQ(i,e,t,n){var r,o,s=new et.Parser(i,e);t-=1;var a=[".notdef"],l=s.parseCard8();if(l===0)for(var c=0;c<t;c+=1)r=s.parseSID(),a.push(Hm(n,r));else if(l===1)for(;a.length<=t;){r=s.parseSID(),o=s.parseCard8();for(var d=0;d<=o;d+=1)a.push(Hm(n,r)),r+=1}else if(l===2)for(;a.length<=t;){r=s.parseSID(),o=s.parseCard16();for(var u=0;u<=o;u+=1)a.push(Hm(n,r)),r+=1}else throw new Error("Unknown charset format "+l);return a}function sQ(i,e,t){var n,r={},o=new et.Parser(i,e),s=o.parseCard8();if(s===0)for(var a=o.parseCard8(),l=0;l<a;l+=1)n=o.parseCard8(),r[n]=l;else if(s===1){var c=o.parseCard8();n=1;for(var d=0;d<c;d+=1)for(var u=o.parseCard8(),f=o.parseCard8(),h=u;h<=u+f;h+=1)r[h]=n,n+=1}else throw new Error("Unknown encoding format "+s);return new u_(r,t)}function IU(i,e,t){var n,r,o,s,a=new Xn,l=[],c=0,d=!1,u=!1,f=0,h=0,p,v,g,m;if(i.isCIDFont){var b=i.tables.cff.topDict._fdSelect[e.index],y=i.tables.cff.topDict._fdArray[b];p=y._subrs,v=y._subrsBias,g=y._defaultWidthX,m=y._nominalWidthX}else p=i.tables.cff.topDict._subrs,v=i.tables.cff.topDict._subrsBias,g=i.tables.cff.topDict._defaultWidthX,m=i.tables.cff.topDict._nominalWidthX;var _=g;function w(P,E){u&&a.closePath(),a.moveTo(P,E),u=!0}function D(){var P;P=l.length%2!==0,P&&!d&&(_=l.shift()+m),c+=l.length>>1,l.length=0,d=!0}function A(P){for(var E,I,L,Y,G,Q,ee,te,X,ie,Se,Ce,Ee=0;Ee<P.length;){var de=P[Ee];switch(Ee+=1,de){case 1:D();break;case 3:D();break;case 4:l.length>1&&!d&&(_=l.shift()+m,d=!0),h+=l.pop(),w(f,h);break;case 5:for(;l.length>0;)f+=l.shift(),h+=l.shift(),a.lineTo(f,h);break;case 6:for(;l.length>0&&(f+=l.shift(),a.lineTo(f,h),l.length!==0);)h+=l.shift(),a.lineTo(f,h);break;case 7:for(;l.length>0&&(h+=l.shift(),a.lineTo(f,h),l.length!==0);)f+=l.shift(),a.lineTo(f,h);break;case 8:for(;l.length>0;)n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 10:G=l.pop()+v,Q=p[G],Q&&A(Q);break;case 11:return;case 12:switch(de=P[Ee],Ee+=1,de){case 35:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),ee=o+l.shift(),te=s+l.shift(),X=ee+l.shift(),ie=te+l.shift(),Se=X+l.shift(),Ce=ie+l.shift(),f=Se+l.shift(),h=Ce+l.shift(),l.shift(),a.curveTo(n,r,o,s,ee,te),a.curveTo(X,ie,Se,Ce,f,h);break;case 34:n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),ee=o+l.shift(),te=s,X=ee+l.shift(),ie=s,Se=X+l.shift(),Ce=h,f=Se+l.shift(),a.curveTo(n,r,o,s,ee,te),a.curveTo(X,ie,Se,Ce,f,h);break;case 36:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),ee=o+l.shift(),te=s,X=ee+l.shift(),ie=s,Se=X+l.shift(),Ce=ie+l.shift(),f=Se+l.shift(),a.curveTo(n,r,o,s,ee,te),a.curveTo(X,ie,Se,Ce,f,h);break;case 37:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),ee=o+l.shift(),te=s+l.shift(),X=ee+l.shift(),ie=te+l.shift(),Se=X+l.shift(),Ce=ie+l.shift(),Math.abs(Se-f)>Math.abs(Ce-h)?f=Se+l.shift():h=Ce+l.shift(),a.curveTo(n,r,o,s,ee,te),a.curveTo(X,ie,Se,Ce,f,h);break;default:console.log("Glyph "+e.index+": unknown operator 1200"+de),l.length=0}break;case 14:l.length>0&&!d&&(_=l.shift()+m,d=!0),u&&(a.closePath(),u=!1);break;case 18:D();break;case 19:case 20:D(),Ee+=c+7>>3;break;case 21:l.length>2&&!d&&(_=l.shift()+m,d=!0),h+=l.pop(),f+=l.pop(),w(f,h);break;case 22:l.length>1&&!d&&(_=l.shift()+m,d=!0),f+=l.pop(),w(f,h);break;case 23:D();break;case 24:for(;l.length>2;)n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);f+=l.shift(),h+=l.shift(),a.lineTo(f,h);break;case 25:for(;l.length>6;)f+=l.shift(),h+=l.shift(),a.lineTo(f,h);n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 26:for(l.length%2&&(f+=l.shift());l.length>0;)n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o,h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 27:for(l.length%2&&(h+=l.shift());l.length>0;)n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s,a.curveTo(n,r,o,s,f,h);break;case 28:E=P[Ee],I=P[Ee+1],l.push((E<<24|I<<16)>>16),Ee+=2;break;case 29:G=l.pop()+i.gsubrsBias,Q=i.gsubrs[G],Q&&A(Q);break;case 30:for(;l.length>0&&(n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h),l.length!==0);)n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),h=s+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h);break;case 31:for(;l.length>0&&(n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),h=s+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h),l.length!==0);)n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h);break;default:de<32?console.log("Glyph "+e.index+": unknown operator "+de):de<247?l.push(de-139):de<251?(E=P[Ee],Ee+=1,l.push((de-247)*256+E+108)):de<255?(E=P[Ee],Ee+=1,l.push(-(de-251)*256-E-108)):(E=P[Ee],I=P[Ee+1],L=P[Ee+2],Y=P[Ee+3],Ee+=4,l.push((E<<24|I<<16|L<<8|Y)/65536))}}}return A(t),e.advanceWidth=_,a}function aQ(i,e,t,n){var r=[],o,s=new et.Parser(i,e),a=s.parseCard8();if(a===0)for(var l=0;l<t;l++){if(o=s.parseCard8(),o>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+o+" (FD count "+n+")");r.push(o)}else if(a===3){var c=s.parseCard16(),d=s.parseCard16();if(d!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var u,f=0;f<c;f++){if(o=s.parseCard8(),u=s.parseCard16(),o>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+o+" (FD count "+n+")");if(u>t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+u);for(;d<u;d++)r.push(o);d=u}if(u!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+u)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);return r}function lQ(i,e,t,n){t.tables.cff={};var r=iQ(i,e),o=ec(i,r.endOffset,et.bytesToString),s=ec(i,o.endOffset),a=ec(i,s.endOffset,et.bytesToString),l=ec(i,a.endOffset);t.gsubrs=l.objects,t.gsubrsBias=TD(t.gsubrs);var c=AU(i,e,s.objects,a.objects);if(c.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+c.length);var d=c[0];if(t.tables.cff.topDict=d,d._privateDict&&(t.defaultWidthX=d._privateDict.defaultWidthX,t.nominalWidthX=d._privateDict.nominalWidthX),d.ros[0]!==void 0&&d.ros[1]!==void 0&&(t.isCIDFont=!0),t.isCIDFont){var u=d.fdArray,f=d.fdSelect;if(u===0||f===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");u+=e;var h=ec(i,u),p=AU(i,e,h.objects,a.objects);d._fdArray=p,f+=e,d._fdSelect=aQ(i,f,t.numGlyphs,p.length)}var v=e+d.private[1],g=SB(i,v,d.private[0],a.objects);if(t.defaultWidthX=g.defaultWidthX,t.nominalWidthX=g.nominalWidthX,g.subrs!==0){var m=v+g.subrs,b=ec(i,m);t.subrs=b.objects,t.subrsBias=TD(t.subrs)}else t.subrs=[],t.subrsBias=0;var y;n.lowMemory?(y=JJ(i,e+d.charStrings),t.nGlyphs=y.offsets.length):(y=ec(i,e+d.charStrings),t.nGlyphs=y.objects.length);var _=oQ(i,e+d.charset,t.nGlyphs,a.objects);if(d.encoding===0?t.cffEncoding=new u_(HJ,_):d.encoding===1?t.cffEncoding=new u_(GJ,_):t.cffEncoding=sQ(i,e+d.encoding,_),t.encoding=t.encoding||t.cffEncoding,t.glyphs=new Qs.GlyphSet(t),n.lowMemory)t._push=function(A){var P=QJ(A,y.offsets,i,e+d.charStrings);t.glyphs.push(A,Qs.cffGlyphLoader(t,A,IU,P))};else for(var w=0;w<t.nGlyphs;w+=1){var D=y.objects[w];t.glyphs.push(w,Qs.cffGlyphLoader(t,w,IU,D))}}function CB(i,e){var t,n=r_.indexOf(i);return n>=0&&(t=n),n=e.indexOf(i),n>=0?t=n+r_.length:(t=r_.length+e.length,e.push(i)),t}function cQ(){return new $e.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function dQ(i){var e=new $e.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);e.names=[];for(var t=0;t<i.length;t+=1)e.names.push({name:"name_"+t,type:"NAME",value:i[t]});return e}function wB(i,e,t){for(var n={},r=0;r<i.length;r+=1){var o=i[r],s=e[o.name];s!==void 0&&!vB(s,o.value)&&(o.type==="SID"&&(s=CB(s,t)),n[o.op]={name:o.name,type:o.type,value:s})}return n}function PU(i,e){var t=new $e.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=wB(xB,i,e),t}function OU(i){var e=new $e.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return e.topDicts=[{name:"topDict_0",type:"TABLE",value:i}],e}function uQ(i){var e=new $e.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);e.strings=[];for(var t=0;t<i.length;t+=1)e.strings.push({name:"string_"+t,type:"STRING",value:i[t]});return e}function fQ(){return new $e.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function hQ(i,e){for(var t=new $e.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<i.length;n+=1){var r=i[n],o=CB(r,e);t.fields.push({name:"glyph_"+n,type:"SID",value:o})}return t}function pQ(i){var e=[],t=i.path;e.push({name:"width",type:"NUMBER",value:i.advanceWidth});for(var n=0,r=0,o=0;o<t.commands.length;o+=1){var s=void 0,a=void 0,l=t.commands[o];if(l.type==="Q"){var c=.3333333333333333,d=2/3;l={type:"C",x:l.x,y:l.y,x1:Math.round(c*n+d*l.x1),y1:Math.round(c*r+d*l.y1),x2:Math.round(c*l.x+d*l.x1),y2:Math.round(c*l.y+d*l.y1)}}if(l.type==="M")s=Math.round(l.x-n),a=Math.round(l.y-r),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),r=Math.round(l.y);else if(l.type==="L")s=Math.round(l.x-n),a=Math.round(l.y-r),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),r=Math.round(l.y);else if(l.type==="C"){var u=Math.round(l.x1-n),f=Math.round(l.y1-r),h=Math.round(l.x2-l.x1),p=Math.round(l.y2-l.y1);s=Math.round(l.x-l.x2),a=Math.round(l.y-l.y2),e.push({name:"dx1",type:"NUMBER",value:u}),e.push({name:"dy1",type:"NUMBER",value:f}),e.push({name:"dx2",type:"NUMBER",value:h}),e.push({name:"dy2",type:"NUMBER",value:p}),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),r=Math.round(l.y)}}return e.push({name:"endchar",type:"OP",value:14}),e}function mQ(i){for(var e=new $e.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),t=0;t<i.length;t+=1){var n=i.get(t),r=pQ(n);e.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return e}function gQ(i,e){var t=new $e.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=wB(_B,i,e),t}function vQ(i,e){for(var t=new $e.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/e.unitsPerEm,r={version:e.version,fullName:e.fullName,familyName:e.familyName,weight:e.weightName,fontBBox:e.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},o={},s=[],a,l=1;l<i.length;l+=1)a=i.get(l),s.push(a.name);var c=[];t.header=cQ(),t.nameIndex=dQ([e.postScriptName]);var d=PU(r,c);t.topDictIndex=OU(d),t.globalSubrIndex=fQ(),t.charsets=hQ(s,c),t.charStringsIndex=mQ(i),t.privateDict=gQ(o,c),t.stringIndex=uQ(c);var u=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return r.charset=u,r.encoding=0,r.charStrings=r.charset+t.charsets.sizeOf(),r.private[1]=r.charStrings+t.charStringsIndex.sizeOf(),d=PU(r,c),t.topDictIndex=OU(d),t}var EB={parse:lQ,make:vQ};function bQ(i,e){var t={},n=new et.Parser(i,e);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),St.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function yQ(i){var e=Math.round(new Date().getTime()/1e3)+2082844800,t=e;return i.createdTimestamp&&(t=i.createdTimestamp+2082844800),new $e.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:e},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],i)}var MB={parse:bQ,make:yQ};function xQ(i,e){var t={},n=new et.Parser(i,e);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function _Q(i){return new $e.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],i)}var TB={parse:xQ,make:_Q};function SQ(i,e,t,n,r){for(var o,s,a=new et.Parser(i,e),l=0;l<n;l+=1){l<t&&(o=a.parseUShort(),s=a.parseShort());var c=r.get(l);c.advanceWidth=o,c.leftSideBearing=s}}function CQ(i,e,t,n,r){i._hmtxTableData={};for(var o,s,a=new et.Parser(e,t),l=0;l<r;l+=1)l<n&&(o=a.parseUShort(),s=a.parseShort()),i._hmtxTableData[l]={advanceWidth:o,leftSideBearing:s}}function wQ(i,e,t,n,r,o,s){s.lowMemory?CQ(i,e,t,n,r):SQ(e,t,n,r,o)}function EQ(i){for(var e=new $e.Table("hmtx",[]),t=0;t<i.length;t+=1){var n=i.get(t),r=n.advanceWidth||0,o=n.leftSideBearing||0;e.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:r}),e.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:o})}return e}var DB={parse:wQ,make:EQ};function MQ(i){for(var e=new $e.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:i.length}]),t="",n=12+i.length*4,r=0;r<i.length;++r){var o=t.indexOf(i[r]);o<0&&(o=t.length,t+=i[r]),e.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),e.fields.push({name:"length "+r,type:"USHORT",value:i[r].length})}return e.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),e}function TQ(i,e){var t=new et.Parser(i,e),n=t.parseULong();St.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);for(var r=t.parseULong(),o=[],s=0;s<r;s++){for(var a="",l=e+t.parseUShort(),c=t.parseUShort(),d=l;d<l+c;++d)a+=String.fromCharCode(i.getInt8(d));o.push(a)}return o}var AB={make:MQ,parse:TQ};function DQ(i,e){var t={},n=new et.Parser(i,e);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function AQ(i){return new $e.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:i}])}var IB={parse:DQ,make:AQ},PB=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],OB={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},IQ={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},RB={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function PQ(i,e,t){switch(i){case 0:if(e===65535)return"und";if(t)return t[e];break;case 1:return OB[e];case 3:return RB[e]}}var DD="utf-16",OQ={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},RQ={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function kB(i,e,t){switch(i){case 0:return DD;case 1:return RQ[t]||OQ[e];case 3:if(e===1||e===10)return DD;break}}function kQ(i,e,t){for(var n={},r=new et.Parser(i,e),o=r.parseUShort(),s=r.parseUShort(),a=r.offset+r.parseUShort(),l=0;l<s;l++){var c=r.parseUShort(),d=r.parseUShort(),u=r.parseUShort(),f=r.parseUShort(),h=PB[f]||f,p=r.parseUShort(),v=r.parseUShort(),g=PQ(c,u,t),m=kB(c,d,u);if(m!==void 0&&g!==void 0){var b=void 0;if(m===DD?b=lh.UTF16(i,a+v,p):b=lh.MACSTRING(i,a+v,p,m),b){var y=n[h];y===void 0&&(y=n[h]={}),y[g]=b}}}var _=0;return o===1&&(_=r.parseUShort()),n}function mD(i){var e={};for(var t in i)e[i[t]]=parseInt(t);return e}function RU(i,e,t,n,r,o){return new $e.Record("NameRecord",[{name:"platformID",type:"USHORT",value:i},{name:"encodingID",type:"USHORT",value:e},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function FQ(i,e){var t=i.length,n=e.length-t+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<t;o++)if(e[r+o]!==i[o])continue e;return r}return-1}function kU(i,e){var t=FQ(i,e);if(t<0){t=e.length;for(var n=0,r=i.length;n<r;++n)e.push(i[n])}return t}function NQ(i,e){var t,n=[],r={},o=mD(PB);for(var s in i){var a=o[s];if(a===void 0&&(a=s),t=parseInt(a),isNaN(t))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');r[t]=i[s],n.push(t)}for(var l=mD(OB),c=mD(RB),d=[],u=[],f=0;f<n.length;f++){t=n[f];var h=r[t];for(var p in h){var v=h[p],g=1,m=l[p],b=IQ[m],y=kB(g,b,m),_=Le.MACSTRING(v,y);_===void 0&&(g=0,m=e.indexOf(p),m<0&&(m=e.length,e.push(p)),b=4,_=Le.UTF16(v));var w=kU(_,u);d.push(RU(g,b,m,t,_.length,w));var D=c[p];if(D!==void 0){var A=Le.UTF16(v),P=kU(A,u);d.push(RU(3,1,D,t,A.length,P))}}}d.sort(function(L,Y){return L.platformID-Y.platformID||L.encodingID-Y.encodingID||L.languageID-Y.languageID||L.nameID-Y.nameID});for(var E=new $e.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:d.length},{name:"stringOffset",type:"USHORT",value:6+d.length*12}]),I=0;I<d.length;I++)E.fields.push({name:"record_"+I,type:"RECORD",value:d[I]});return E.fields.push({name:"strings",type:"LITERAL",value:u}),E}var FB={parse:kQ,make:NQ},AD=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function LQ(i){for(var e=0;e<AD.length;e+=1){var t=AD[e];if(i>=t.begin&&i<t.end)return e}return-1}function UQ(i,e){var t={},n=new et.Parser(i,e);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(var r=0;r<10;r++)t.panose[r]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function BQ(i){return new $e.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],i)}var ID={parse:UQ,make:BQ,unicodeRanges:AD,getUnicodeRange:LQ};function zQ(i,e){var t={},n=new et.Parser(i,e);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=qd.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(var r=0;r<t.numberOfGlyphs;r++)t.glyphNameIndex[r]=n.parseUShort();t.names=[];for(var o=0;o<t.numberOfGlyphs;o++)if(t.glyphNameIndex[o]>=qd.length){var s=n.parseChar();t.names.push(n.parseString(s))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(var a=0;a<t.numberOfGlyphs;a++)t.offset[a]=n.parseChar();break}return t}function VQ(){return new $e.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}var NB={parse:zQ,make:VQ},as=new Array(9);as[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(oe.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(oe.coverage),substitute:this.parseOffset16List()};St.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")};as[2]=function(){var e=this.parseUShort();return St.argument(e===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),sequences:this.parseListOfLists()}};as[3]=function(){var e=this.parseUShort();return St.argument(e===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),alternateSets:this.parseListOfLists()}};as[4]=function(){var e=this.parseUShort();return St.argument(e===1,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var ah={sequenceIndex:oe.uShort,lookupListIndex:oe.uShort};as[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(oe.coverage),ruleSets:this.parseListOfLists(function(){var o=this.parseUShort(),s=this.parseUShort();return{input:this.parseUShortList(o-1),lookupRecords:this.parseRecordList(s,ah)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(oe.coverage),classDef:this.parsePointer(oe.classDef),classSets:this.parseListOfLists(function(){var o=this.parseUShort(),s=this.parseUShort();return{classes:this.parseUShortList(o-1),lookupRecords:this.parseRecordList(s,ah)}})};if(t===3){var n=this.parseUShort(),r=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,oe.pointer(oe.coverage)),lookupRecords:this.parseRecordList(r,ah)}}St.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")};as[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(oe.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ah)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(oe.coverage),backtrackClassDef:this.parsePointer(oe.classDef),inputClassDef:this.parsePointer(oe.classDef),lookaheadClassDef:this.parsePointer(oe.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ah)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(oe.pointer(oe.coverage)),inputCoverage:this.parseList(oe.pointer(oe.coverage)),lookaheadCoverage:this.parseList(oe.pointer(oe.coverage)),lookupRecords:this.parseRecordList(ah)};St.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")};as[7]=function(){var e=this.parseUShort();St.argument(e===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new oe(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:as[t].call(n)}};as[8]=function(){var e=this.parseUShort();return St.argument(e===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),backtrackCoverage:this.parseList(oe.pointer(oe.coverage)),lookaheadCoverage:this.parseList(oe.pointer(oe.coverage)),substitutes:this.parseUShortList()}};function HQ(i,e){e=e||0;var t=new oe(i,e),n=t.parseVersion(1);return St.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(as)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(as),variations:t.parseFeatureVariationsList()}}var ch=new Array(9);ch[1]=function(e){return e.substFormat===1?new $e.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new $e.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)}].concat($e.ushortList("substitute",e.substitute)))};ch[2]=function(e){return St.assert(e.substFormat===1,"Lookup type 2 substFormat must be 1."),new $e.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)}].concat($e.tableList("seqSet",e.sequences,function(t){return new $e.Table("sequenceSetTable",$e.ushortList("sequence",t))})))};ch[3]=function(e){return St.assert(e.substFormat===1,"Lookup type 3 substFormat must be 1."),new $e.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)}].concat($e.tableList("altSet",e.alternateSets,function(t){return new $e.Table("alternateSetTable",$e.ushortList("alternate",t))})))};ch[4]=function(e){return St.assert(e.substFormat===1,"Lookup type 4 substFormat must be 1."),new $e.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)}].concat($e.tableList("ligSet",e.ligatureSets,function(t){return new $e.Table("ligatureSetTable",$e.tableList("ligature",t,function(n){return new $e.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat($e.ushortList("component",n.components,n.components.length+1)))}))})))};ch[6]=function(e){if(e.substFormat===1){var t=new $e.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new $e.Coverage(e.coverage)}].concat($e.tableList("chainRuleSet",e.chainRuleSets,function(o){return new $e.Table("chainRuleSetTable",$e.tableList("chainRule",o,function(s){var a=$e.ushortList("backtrackGlyph",s.backtrack,s.backtrack.length).concat($e.ushortList("inputGlyph",s.input,s.input.length+1)).concat($e.ushortList("lookaheadGlyph",s.lookahead,s.lookahead.length)).concat($e.ushortList("substitution",[],s.lookupRecords.length));return s.lookupRecords.forEach(function(l,c){a=a.concat({name:"sequenceIndex"+c,type:"USHORT",value:l.sequenceIndex}).concat({name:"lookupListIndex"+c,type:"USHORT",value:l.lookupListIndex})}),new $e.Table("chainRuleTable",a)}))})));return t}else if(e.substFormat===2)St.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(e.substFormat===3){var n=[{name:"substFormat",type:"USHORT",value:e.substFormat}];n.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach(function(o,s){n.push({name:"backtrackCoverage"+s,type:"TABLE",value:new $e.Coverage(o)})}),n.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach(function(o,s){n.push({name:"inputCoverage"+s,type:"TABLE",value:new $e.Coverage(o)})}),n.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach(function(o,s){n.push({name:"lookaheadCoverage"+s,type:"TABLE",value:new $e.Coverage(o)})}),n.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach(function(o,s){n=n.concat({name:"sequenceIndex"+s,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+s,type:"USHORT",value:o.lookupListIndex})});var r=new $e.Table("chainContextTable",n);return r}St.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function GQ(i){return new $e.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new $e.ScriptList(i.scripts)},{name:"features",type:"TABLE",value:new $e.FeatureList(i.features)},{name:"lookups",type:"TABLE",value:new $e.LookupList(i.lookups,ch)}])}var LB={parse:HQ,make:GQ};function jQ(i,e){var t=new et.Parser(i,e),n=t.parseULong();St.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();for(var r=t.parseULong(),o={},s=0;s<r;s++){var a=t.parseTag(),l=t.parseULong(),c=t.parseULong(),d=lh.UTF8(i,e+l,c);o[a]=d}return o}function WQ(i){var e=Object.keys(i).length,t="",n=16+e*12,r=new $e.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:e}]);for(var o in i){var s=t.length;t+=i[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+s}),r.fields.push({name:"length "+o,type:"ULONG",value:i[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),r}var UB={parse:jQ,make:WQ};function FU(i){return Math.log(i)/Math.log(2)|0}function UD(i){for(;i.length%4!==0;)i.push(0);for(var e=0,t=0;t<i.length;t+=4)e+=(i[t]<<24)+(i[t+1]<<16)+(i[t+2]<<8)+i[t+3];return e%=Math.pow(2,32),e}function NU(i,e,t,n){return new $e.Record("Table Record",[{name:"tag",type:"TAG",value:i!==void 0?i:""},{name:"checkSum",type:"ULONG",value:e!==void 0?e:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function BB(i){var e=new $e.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);e.tables=i,e.numTables=i.length;var t=Math.pow(2,FU(e.numTables));e.searchRange=16*t,e.entrySelector=FU(t),e.rangeShift=e.numTables*16-e.searchRange;for(var n=[],r=[],o=e.sizeOf()+NU().sizeOf()*e.numTables;o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<i.length;s+=1){var a=i[s];St.argument(a.tableName.length===4,"Table name"+a.tableName+" is invalid.");var l=a.sizeOf(),c=NU(a.tableName,UD(a.encode()),o,l);for(n.push({name:c.tag+" Table Record",type:"RECORD",value:c}),r.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=l,St.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(d,u){return d.value.tag>u.value.tag?1:-1}),e.fields=e.fields.concat(n),e.fields=e.fields.concat(r),e}function LU(i,e,t){for(var n=0;n<e.length;n+=1){var r=i.charToGlyphIndex(e[n]);if(r>0){var o=i.glyphs.get(r);return o.getMetrics()}}return t}function $Q(i){for(var e=0,t=0;t<i.length;t+=1)e+=i[t];return e/i.length}function YQ(i){for(var e=[],t=[],n=[],r=[],o=[],s=[],a=[],l,c=0,d=0,u=0,f=0,h=0,p=0;p<i.glyphs.length;p+=1){var v=i.glyphs.get(p),g=v.unicode|0;if(isNaN(v.advanceWidth))throw new Error("Glyph "+v.name+" ("+p+"): advanceWidth is not a number.");(l>g||l===void 0)&&g>0&&(l=g),c<g&&(c=g);var m=ID.getUnicodeRange(g);if(m<32)d|=1<<m;else if(m<64)u|=1<<m-32;else if(m<96)f|=1<<m-64;else if(m<123)h|=1<<m-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(v.name!==".notdef"){var b=v.getMetrics();e.push(b.xMin),t.push(b.yMin),n.push(b.xMax),r.push(b.yMax),s.push(b.leftSideBearing),a.push(b.rightSideBearing),o.push(v.advanceWidth)}}var y={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,r),advanceWidthMax:Math.max.apply(null,o),advanceWidthAvg:$Q(o),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,a)};y.ascender=i.ascender,y.descender=i.descender;var _=MB.make({flags:3,unitsPerEm:i.unitsPerEm,xMin:y.xMin,yMin:y.yMin,xMax:y.xMax,yMax:y.yMax,lowestRecPPEM:3,createdTimestamp:i.createdTimestamp}),w=TB.make({ascender:y.ascender,descender:y.descender,advanceWidthMax:y.advanceWidthMax,minLeftSideBearing:y.minLeftSideBearing,minRightSideBearing:y.minRightSideBearing,xMaxExtent:y.maxLeftSideBearing+(y.xMax-y.xMin),numberOfHMetrics:i.glyphs.length}),D=IB.make(i.glyphs.length),A=ID.make(Object.assign({xAvgCharWidth:Math.round(y.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:c,ulUnicodeRange1:d,ulUnicodeRange2:u,ulUnicodeRange3:f,ulUnicodeRange4:h,sTypoAscender:y.ascender,sTypoDescender:y.descender,sTypoLineGap:0,usWinAscent:y.yMax,usWinDescent:Math.abs(y.yMin),ulCodePageRange1:1,sxHeight:LU(i,"xyvw",{yMax:Math.round(y.ascender/2)}).yMax,sCapHeight:LU(i,"HIKLEFJMNTZBDPRAGOQSUVWXY",y).yMax,usDefaultChar:i.hasChar(" ")?32:0,usBreakChar:i.hasChar(" ")?32:0},i.tables.os2)),P=DB.make(i.glyphs),E=pB.make(i.glyphs),I=i.getEnglishName("fontFamily"),L=i.getEnglishName("fontSubfamily"),Y=I+" "+L,G=i.getEnglishName("postScriptName");G||(G=I.replace(/\s/g,"")+"-"+L);var Q={};for(var ee in i.names)Q[ee]=i.names[ee];Q.uniqueID||(Q.uniqueID={en:i.getEnglishName("manufacturer")+":"+Y}),Q.postScriptName||(Q.postScriptName={en:G}),Q.preferredFamily||(Q.preferredFamily=i.names.fontFamily),Q.preferredSubfamily||(Q.preferredSubfamily=i.names.fontSubfamily);var te=[],X=FB.make(Q,te),ie=te.length>0?AB.make(te):void 0,Se=NB.make(),Ce=EB.make(i.glyphs,{version:i.getEnglishName("version"),fullName:Y,familyName:I,weightName:L,postScriptName:G,unitsPerEm:i.unitsPerEm,fontBBox:[0,y.yMin,y.ascender,y.advanceWidthMax]}),Ee=i.metas&&Object.keys(i.metas).length>0?UB.make(i.metas):void 0,de=[_,w,D,A,X,E,Se,Ce,P];ie&&de.push(ie),i.tables.gsub&&de.push(LB.make(i.tables.gsub)),Ee&&de.push(Ee);for(var Pe=BB(de),At=Pe.encode(),zt=UD(At),fe=Pe.fields,be=!1,Be=0;Be<fe.length;Be+=1)if(fe[Be].name==="head table"){fe[Be].value.checkSumAdjustment=2981146554-zt,be=!0;break}if(!be)throw new Error("Could not find head table with checkSum to adjust.");return Pe}var XQ={make:BB,fontToTable:YQ,computeCheckSum:UD};function gD(i,e){for(var t=0,n=i.length-1;t<=n;){var r=t+n>>>1,o=i[r].tag;if(o===e)return r;o<e?t=r+1:n=r-1}return-t-1}function UU(i,e){for(var t=0,n=i.length-1;t<=n;){var r=t+n>>>1,o=i[r];if(o===e)return r;o<e?t=r+1:n=r-1}return-t-1}function BU(i,e){for(var t,n=0,r=i.length-1;n<=r;){var o=n+r>>>1;t=i[o];var s=t.start;if(s===e)return t;s<e?n=o+1:r=o-1}if(n>0)return t=i[n-1],e>t.end?0:t}function Ym(i,e){this.font=i,this.tableName=e}Ym.prototype={searchTag:gD,binSearch:UU,getTable:function(i){var e=this.font.tables[this.tableName];return!e&&i&&(e=this.font.tables[this.tableName]=this.createDefaultTable()),e},getScriptNames:function(){var i=this.getTable();return i?i.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){var i=this.getTable();if(i){for(var e=!1,t=0;t<i.scripts.length;t++){var n=i.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(e=!0)}if(e)return"latn"}},getScriptTable:function(i,e){var t=this.getTable(e);if(t){i=i||"DFLT";var n=t.scripts,r=gD(t.scripts,i);if(r>=0)return n[r].script;if(e){var o={tag:i,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(i,e,t){var n=this.getScriptTable(i,t);if(n){if(!e||e==="dflt"||e==="DFLT")return n.defaultLangSys;var r=gD(n.langSysRecords,e);if(r>=0)return n.langSysRecords[r].langSys;if(t){var o={tag:e,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(i,e,t,n){var r=this.getLangSysTable(i,e,n);if(r){for(var o,s=r.featureIndexes,a=this.font.tables[this.tableName].features,l=0;l<s.length;l++)if(o=a[s[l]],o.tag===t)return o.feature;if(n){var c=a.length;return St.assert(c===0||t>=a[c-1].tag,"Features must be added in alphabetical order."),o={tag:t,feature:{params:0,lookupListIndexes:[]}},a.push(o),s.push(c),o.feature}}},getLookupTables:function(i,e,t,n,r){var o=this.getFeatureTable(i,e,t,r),s=[];if(o){for(var a,l=o.lookupListIndexes,c=this.font.tables[this.tableName].lookups,d=0;d<l.length;d++)a=c[l[d]],a.lookupType===n&&s.push(a);if(s.length===0&&r){a={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var u=c.length;return c.push(a),l.push(u),[a]}}return s},getGlyphClass:function(i,e){switch(i.format){case 1:return i.startGlyph<=e&&e<i.startGlyph+i.classes.length?i.classes[e-i.startGlyph]:0;case 2:var t=BU(i.ranges,e);return t?t.classId:0}},getCoverageIndex:function(i,e){switch(i.format){case 1:var t=UU(i.glyphs,e);return t>=0?t:-1;case 2:var n=BU(i.ranges,e);return n?n.index+e-n.start:-1}},expandCoverage:function(i){if(i.format===1)return i.glyphs;for(var e=[],t=i.ranges,n=0;n<t.length;n++)for(var r=t[n],o=r.start,s=r.end,a=o;a<=s;a++)e.push(a);return e}};function Xm(i){Ym.call(this,i,"gpos")}Xm.prototype=Ym.prototype;Xm.prototype.init=function(){var i=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(i)};Xm.prototype.getKerningValue=function(i,e,t){for(var n=0;n<i.length;n++)for(var r=i[n].subtables,o=0;o<r.length;o++){var s=r[o],a=this.getCoverageIndex(s.coverage,e);if(!(a<0))switch(s.posFormat){case 1:for(var l=s.pairSets[a],c=0;c<l.length;c++){var d=l[c];if(d.secondGlyph===t)return d.value1&&d.value1.xAdvance||0}break;case 2:var u=this.getGlyphClass(s.classDef1,e),f=this.getGlyphClass(s.classDef2,t),h=s.classRecords[u][f];return h.value1&&h.value1.xAdvance||0}}return 0};Xm.prototype.getKerningTables=function(i,e){if(this.font.tables.gpos)return this.getLookupTables(i,e,"kern",2)};function Zr(i){Ym.call(this,i,"gsub")}function qQ(i,e){var t=i.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(i[n]!==e[n])return!1;return!0}function BD(i,e,t){for(var n=i.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===e)return o}if(t)return n.push(t),t}Zr.prototype=Ym.prototype;Zr.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}};Zr.prototype.getSingle=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,1),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var l=s[a],c=this.expandCoverage(l.coverage),d=void 0;if(l.substFormat===1){var u=l.deltaGlyphId;for(d=0;d<c.length;d++){var f=c[d];n.push({sub:f,by:f+u})}}else{var h=l.substitute;for(d=0;d<c.length;d++)n.push({sub:c[d],by:h[d]})}}return n};Zr.prototype.getMultiple=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,2),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var l=s[a],c=this.expandCoverage(l.coverage),d=void 0;for(d=0;d<c.length;d++){var u=c[d],f=l.sequences[d];n.push({sub:u,by:f})}}return n};Zr.prototype.getAlternates=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,3),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var l=s[a],c=this.expandCoverage(l.coverage),d=l.alternateSets,u=0;u<c.length;u++)n.push({sub:c[u],by:d[u]});return n};Zr.prototype.getLigatures=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,4),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var l=s[a],c=this.expandCoverage(l.coverage),d=l.ligatureSets,u=0;u<c.length;u++)for(var f=c[u],h=d[u],p=0;p<h.length;p++){var v=h[p];n.push({sub:[f].concat(v.components),by:v.ligGlyph})}return n};Zr.prototype.addSingle=function(i,e,t,n){var r=this.getLookupTables(t,n,i,1,!0)[0],o=BD(r,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});St.assert(o.coverage.format===1,"Single: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.substitute.splice(a,0,0)),o.substitute[a]=e.by};Zr.prototype.addMultiple=function(i,e,t,n){St.assert(e.by instanceof Array&&e.by.length>1,'Multiple: "by" must be an array of two or more ids');var r=this.getLookupTables(t,n,i,2,!0)[0],o=BD(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});St.assert(o.coverage.format===1,"Multiple: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.sequences.splice(a,0,0)),o.sequences[a]=e.by};Zr.prototype.addAlternate=function(i,e,t,n){var r=this.getLookupTables(t,n,i,3,!0)[0],o=BD(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});St.assert(o.coverage.format===1,"Alternate: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.alternateSets.splice(a,0,0)),o.alternateSets[a]=e.by};Zr.prototype.addLigature=function(i,e,t,n){var r=this.getLookupTables(t,n,i,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),St.assert(o.coverage.format===1,"Ligature: unable to modify coverage table format "+o.coverage.format);var s=e.sub[0],a=e.sub.slice(1),l={ligGlyph:e.by,components:a},c=this.binSearch(o.coverage.glyphs,s);if(c>=0){for(var d=o.ligatureSets[c],u=0;u<d.length;u++)if(qQ(d[u].components,a))return;d.push(l)}else c=-1-c,o.coverage.glyphs.splice(c,0,s),o.ligatureSets.splice(c,0,[l])};Zr.prototype.getFeature=function(i,e,t){if(/ss\d\d/.test(i))return this.getSingle(i,e,t);switch(i){case"aalt":case"salt":return this.getSingle(i,e,t).concat(this.getAlternates(i,e,t));case"dlig":case"liga":case"rlig":return this.getLigatures(i,e,t);case"ccmp":return this.getMultiple(i,e,t).concat(this.getLigatures(i,e,t));case"stch":return this.getMultiple(i,e,t)}};Zr.prototype.add=function(i,e,t,n){if(/ss\d\d/.test(i))return this.addSingle(i,e,t,n);switch(i){case"aalt":case"salt":return typeof e.by=="number"?this.addSingle(i,e,t,n):this.addAlternate(i,e,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(i,e,t,n);case"ccmp":return e.by instanceof Array?this.addMultiple(i,e,t,n):this.addLigature(i,e,t,n)}};function KQ(){return typeof window<"u"}function ZQ(i){for(var e=new Buffer(i.byteLength),t=new Uint8Array(i),n=0;n<e.length;++n)e[n]=t[n];return e}function Vm(i,e){if(!i)throw e}function zU(i,e,t,n,r){var o;return(e&n)>0?(o=i.parseByte(),(e&r)===0&&(o=-o),o=t+o):(e&r)>0?o=t:o=t+i.parseShort(),o}function zB(i,e,t){var n=new et.Parser(e,t);i.numberOfContours=n.parseShort(),i._xMin=n.parseShort(),i._yMin=n.parseShort(),i._xMax=n.parseShort(),i._yMax=n.parseShort();var r,o;if(i.numberOfContours>0){for(var s=i.endPointIndices=[],a=0;a<i.numberOfContours;a+=1)s.push(n.parseUShort());i.instructionLength=n.parseUShort(),i.instructions=[];for(var l=0;l<i.instructionLength;l+=1)i.instructions.push(n.parseByte());var c=s[s.length-1]+1;r=[];for(var d=0;d<c;d+=1)if(o=n.parseByte(),r.push(o),(o&8)>0)for(var u=n.parseByte(),f=0;f<u;f+=1)r.push(o),d+=1;if(St.argument(r.length===c,"Bad flags."),s.length>0){var h=[],p;if(c>0){for(var v=0;v<c;v+=1)o=r[v],p={},p.onCurve=!!(o&1),p.lastPointOfContour=s.indexOf(v)>=0,h.push(p);for(var g=0,m=0;m<c;m+=1)o=r[m],p=h[m],p.x=zU(n,o,g,2,16),g=p.x;for(var b=0,y=0;y<c;y+=1)o=r[y],p=h[y],p.y=zU(n,o,b,4,32),b=p.y}i.points=h}else i.points=[]}else if(i.numberOfContours===0)i.points=[];else{i.isComposite=!0,i.points=[],i.components=[];for(var _=!0;_;){r=n.parseUShort();var w={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(r&1)>0?(r&2)>0?(w.dx=n.parseShort(),w.dy=n.parseShort()):w.matchedPoints=[n.parseUShort(),n.parseUShort()]:(r&2)>0?(w.dx=n.parseChar(),w.dy=n.parseChar()):w.matchedPoints=[n.parseByte(),n.parseByte()],(r&8)>0?w.xScale=w.yScale=n.parseF2Dot14():(r&64)>0?(w.xScale=n.parseF2Dot14(),w.yScale=n.parseF2Dot14()):(r&128)>0&&(w.xScale=n.parseF2Dot14(),w.scale01=n.parseF2Dot14(),w.scale10=n.parseF2Dot14(),w.yScale=n.parseF2Dot14()),i.components.push(w),_=!!(r&32)}if(r&256){i.instructionLength=n.parseUShort(),i.instructions=[];for(var D=0;D<i.instructionLength;D+=1)i.instructions.push(n.parseByte())}}}function vD(i,e){for(var t=[],n=0;n<i.length;n+=1){var r=i[n],o={x:e.xScale*r.x+e.scale01*r.y+e.dx,y:e.scale10*r.x+e.yScale*r.y+e.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};t.push(o)}return t}function JQ(i){for(var e=[],t=[],n=0;n<i.length;n+=1){var r=i[n];t.push(r),r.lastPointOfContour&&(e.push(t),t=[])}return St.argument(t.length===0,"There are still points left in the current contour."),e}function VB(i){var e=new Xn;if(!i)return e;for(var t=JQ(i),n=0;n<t.length;++n){var r=t[n],o=null,s=r[r.length-1],a=r[0];if(s.onCurve)e.moveTo(s.x,s.y);else if(a.onCurve)e.moveTo(a.x,a.y);else{var l={x:(s.x+a.x)*.5,y:(s.y+a.y)*.5};e.moveTo(l.x,l.y)}for(var c=0;c<r.length;++c)if(o=s,s=a,a=r[(c+1)%r.length],s.onCurve)e.lineTo(s.x,s.y);else{var d=o,u=a;o.onCurve||(d={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5}),a.onCurve||(u={x:(s.x+a.x)*.5,y:(s.y+a.y)*.5}),e.quadraticCurveTo(s.x,s.y,u.x,u.y)}e.closePath()}return e}function HB(i,e){if(e.isComposite)for(var t=0;t<e.components.length;t+=1){var n=e.components[t],r=i.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(n.matchedPoints===void 0)o=vD(r.points,n);else{if(n.matchedPoints[0]>e.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+e.name);var s=e.points[n.matchedPoints[0]],a=r.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};a=vD([a],l)[0],l.dx=s.x-a.x,l.dy=s.y-a.y,o=vD(r.points,l)}e.points=e.points.concat(o)}}return VB(e.points)}function QQ(i,e,t,n){for(var r=new Qs.GlyphSet(n),o=0;o<t.length-1;o+=1){var s=t[o],a=t[o+1];s!==a?r.push(o,Qs.ttfGlyphLoader(n,o,zB,i,e+s,HB)):r.push(o,Qs.glyphLoader(n,o))}return r}function eee(i,e,t,n){var r=new Qs.GlyphSet(n);return n._push=function(o){var s=t[o],a=t[o+1];s!==a?r.push(o,Qs.ttfGlyphLoader(n,o,zB,i,e+s,HB)):r.push(o,Qs.glyphLoader(n,o))},r}function tee(i,e,t,n,r){return r.lowMemory?eee(i,e,t,n):QQ(i,e,t,n)}var GB={getPath:VB,parse:tee},jB,Zd,WB,PD;function $B(i){this.font=i,this.getCommands=function(e){return GB.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function nee(i){return i}function YB(i){return Math.sign(i)*Math.round(Math.abs(i))}function iee(i){return Math.sign(i)*Math.round(Math.abs(i*2))/2}function ree(i){return Math.sign(i)*(Math.round(Math.abs(i)+.5)-.5)}function oee(i){return Math.sign(i)*Math.ceil(Math.abs(i))}function see(i){return Math.sign(i)*Math.floor(Math.abs(i))}var XB=function(i){var e=this.srPeriod,t=this.srPhase,n=this.srThreshold,r=1;return i<0&&(i=-i,r=-1),i+=n-t,i=Math.trunc(i/e)*e,i+=t,i<0?t*r:i*r},Js={x:1,y:0,axis:"x",distance:function(i,e,t,n){return(t?i.xo:i.x)-(n?e.xo:e.x)},interpolate:function(i,e,t,n){var r,o,s,a,l,c,d;if(!n||n===this){if(r=i.xo-e.xo,o=i.xo-t.xo,l=e.x-e.xo,c=t.x-t.xo,s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){i.x=i.xo+(l+c)/2;return}i.x=i.xo+(l*a+c*s)/d;return}if(r=n.distance(i,e,!0,!0),o=n.distance(i,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){Js.setRelative(i,i,(l+c)/2,n,!0);return}Js.setRelative(i,i,(l*a+c*s)/d,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(i,e,t,n,r){if(!n||n===this){i.x=(r?e.xo:e.x)+t;return}var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y;i.x=a+(i.y-l)/n.normalSlope},slope:0,touch:function(i){i.xTouched=!0},touched:function(i){return i.xTouched},untouch:function(i){i.xTouched=!1}},ja={x:0,y:1,axis:"y",distance:function(i,e,t,n){return(t?i.yo:i.y)-(n?e.yo:e.y)},interpolate:function(i,e,t,n){var r,o,s,a,l,c,d;if(!n||n===this){if(r=i.yo-e.yo,o=i.yo-t.yo,l=e.y-e.yo,c=t.y-t.yo,s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){i.y=i.yo+(l+c)/2;return}i.y=i.yo+(l*a+c*s)/d;return}if(r=n.distance(i,e,!0,!0),o=n.distance(i,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){ja.setRelative(i,i,(l+c)/2,n,!0);return}ja.setRelative(i,i,(l*a+c*s)/d,n,!0)},normalSlope:0,setRelative:function(i,e,t,n,r){if(!n||n===this){i.y=(r?e.yo:e.y)+t;return}var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y;i.y=l+n.normalSlope*(i.x-a)},slope:Number.POSITIVE_INFINITY,touch:function(i){i.yTouched=!0},touched:function(i){return i.yTouched},untouch:function(i){i.yTouched=!1}};Object.freeze(Js);Object.freeze(ja);function qm(i,e){this.x=i,this.y=e,this.axis=void 0,this.slope=e/i,this.normalSlope=-i/e,Object.freeze(this)}qm.prototype.distance=function(i,e,t,n){return this.x*Js.distance(i,e,t,n)+this.y*ja.distance(i,e,t,n)};qm.prototype.interpolate=function(i,e,t,n){var r,o,s,a,l,c,d;if(s=n.distance(i,e,!0,!0),a=n.distance(i,t,!0,!0),r=n.distance(e,e,!1,!0),o=n.distance(t,t,!1,!0),l=Math.abs(s),c=Math.abs(a),d=l+c,d===0){this.setRelative(i,i,(r+o)/2,n,!0);return}this.setRelative(i,i,(r*c+o*l)/d,n,!0)};qm.prototype.setRelative=function(i,e,t,n,r){n=n||this;var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y,c=n.normalSlope,d=this.slope,u=i.x,f=i.y;i.x=(d*u-c*a+l-f)/(d-c),i.y=d*(i.x-u)+f};qm.prototype.touch=function(i){i.xTouched=!0,i.yTouched=!0};function Km(i,e){var t=Math.sqrt(i*i+e*e);return i/=t,e/=t,i===1&&e===0?Js:i===0&&e===1?ja:new qm(i,e)}function Wa(i,e,t,n){this.x=this.xo=Math.round(i*64)/64,this.y=this.yo=Math.round(e*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Wa.prototype.nextTouched=function(i){for(var e=this.nextPointOnContour;!i.touched(e)&&e!==this;)e=e.nextPointOnContour;return e};Wa.prototype.prevTouched=function(i){for(var e=this.prevPointOnContour;!i.touched(e)&&e!==this;)e=e.prevPointOnContour;return e};var $m=Object.freeze(new Wa(0,0)),aee={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function tc(i,e){switch(this.env=i,this.stack=[],this.prog=e,i){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Js,this.round=YB}}$B.prototype.exec=function(i,e){if(typeof e!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var t=this.font,n=this._prepState;if(!n||n.ppem!==e){var r=this._fpgmState;if(!r){tc.prototype=aee,r=this._fpgmState=new tc("fpgm",t.tables.fpgm),r.funcs=[],r.font=t,exports.DEBUG&&(console.log("---EXEC FPGM---"),r.step=-1);try{Zd(r)}catch(c){console.log("Hinting error in FPGM:"+c),this._errorState=3;return}}tc.prototype=r,n=this._prepState=new tc("prep",t.tables.prep),n.ppem=e;var o=t.tables.cvt;if(o)for(var s=n.cvt=new Array(o.length),a=e/t.unitsPerEm,l=0;l<o.length;l++)s[l]=o[l]*a;else n.cvt=[];exports.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{Zd(n)}catch(c){this._errorState<2&&console.log("Hinting error in PREP:"+c),this._errorState=2}}if(!(this._errorState>1))try{return WB(i,n)}catch(c){this._errorState<1&&(console.log("Hinting error:"+c),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}};WB=function(i,e){var t=e.ppem/e.font.unitsPerEm,n=t,r=i.components,o,s,a;if(tc.prototype=e,!r)a=new tc("glyf",i.instructions),exports.DEBUG&&(console.log("---EXEC GLYPH---"),a.step=-1),PD(i,a,t,n),s=a.gZone;else{var l=e.font;s=[],o=[];for(var c=0;c<r.length;c++){var d=r[c],u=l.glyphs.get(d.glyphIndex);a=new tc("glyf",u.instructions),exports.DEBUG&&(console.log("---EXEC COMP "+c+"---"),a.step=-1),PD(u,a,t,n);for(var f=Math.round(d.dx*t),h=Math.round(d.dy*n),p=a.gZone,v=a.contours,g=0;g<p.length;g++){var m=p[g];m.xTouched=m.yTouched=!1,m.xo=m.x=m.x+f,m.yo=m.y=m.y+h}var b=s.length;s.push.apply(s,p);for(var y=0;y<v.length;y++)o.push(v[y]+b)}i.instructions&&!a.inhibitGridFit&&(a=new tc("glyf",i.instructions),a.gZone=a.z0=a.z1=a.z2=s,a.contours=o,s.push(new Wa(0,0),new Wa(Math.round(i.advanceWidth*t),0)),exports.DEBUG&&(console.log("---EXEC COMPOSITE---"),a.step=-1),Zd(a),s.length-=2)}return s};PD=function(i,e,t,n){for(var r=i.points||[],o=r.length,s=e.gZone=e.z0=e.z1=e.z2=[],a=e.contours=[],l,c=0;c<o;c++)l=r[c],s[c]=new Wa(l.x*t,l.y*n,l.lastPointOfContour,l.onCurve);for(var d,u,f=0;f<o;f++)l=s[f],d||(d=l,a.push(f)),l.lastPointOfContour?(l.nextPointOnContour=d,d.prevPointOnContour=l,d=void 0):(u=s[f+1],l.nextPointOnContour=u,u.prevPointOnContour=l);if(!e.inhibitGridFit){if(exports.DEBUG){console.log("PROCESSING GLYPH",e.stack);for(var h=0;h<o;h++)console.log(h,s[h].x,s[h].y)}if(s.push(new Wa(0,0),new Wa(Math.round(i.advanceWidth*t),0)),Zd(e),s.length-=2,exports.DEBUG){console.log("FINISHED GLYPH",e.stack);for(var p=0;p<o;p++)console.log(p,s[p].x,s[p].y)}}};Zd=function(i){var e=i.prog;if(e){var t=e.length,n;for(i.ip=0;i.ip<t;i.ip++){if(exports.DEBUG&&i.step++,n=jB[e[i.ip]],!n)throw new Error("unknown instruction: 0x"+Number(e[i.ip]).toString(16));n(i)}}};function f_(i){for(var e=i.tZone=new Array(i.gZone.length),t=0;t<e.length;t++)e[t]=new Wa(0,0)}function qB(i,e){var t=i.prog,n=i.ip,r=1,o;do if(o=t[++n],o===88)r++;else if(o===89)r--;else if(o===64)n+=t[n+1]+1;else if(o===65)n+=2*t[n+1]+1;else if(o>=176&&o<=183)n+=o-176+1;else if(o>=184&&o<=191)n+=(o-184+1)*2;else if(e&&r===1&&o===27)break;while(r>0);i.ip=n}function VU(i,e){exports.DEBUG&&console.log(e.step,"SVTCA["+i.axis+"]"),e.fv=e.pv=e.dpv=i}function HU(i,e){exports.DEBUG&&console.log(e.step,"SPVTCA["+i.axis+"]"),e.pv=e.dpv=i}function GU(i,e){exports.DEBUG&&console.log(e.step,"SFVTCA["+i.axis+"]"),e.fv=i}function jU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log("SPVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.pv=e.dpv=Km(a,l)}function WU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log("SFVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.fv=Km(a,l)}function lee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SPVFS[]",t,n),i.pv=i.dpv=Km(n,t)}function cee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SPVFS[]",t,n),i.fv=Km(n,t)}function dee(i){var e=i.stack,t=i.pv;exports.DEBUG&&console.log(i.step,"GPV[]"),e.push(t.x*16384),e.push(t.y*16384)}function uee(i){var e=i.stack,t=i.fv;exports.DEBUG&&console.log(i.step,"GFV[]"),e.push(t.x*16384),e.push(t.y*16384)}function fee(i){i.fv=i.pv,exports.DEBUG&&console.log(i.step,"SFVTPV[]")}function hee(i){var e=i.stack,t=e.pop(),n=e.pop(),r=e.pop(),o=e.pop(),s=e.pop(),a=i.z0,l=i.z1,c=a[t],d=a[n],u=l[r],f=l[o],h=i.z2[s];exports.DEBUG&&console.log("ISECT[], ",t,n,r,o,s);var p=c.x,v=c.y,g=d.x,m=d.y,b=u.x,y=u.y,_=f.x,w=f.y,D=(p-g)*(y-w)-(v-m)*(b-_),A=p*m-v*g,P=b*w-y*_;h.x=(A*(b-_)-P*(p-g))/D,h.y=(A*(y-w)-P*(v-m))/D}function pee(i){i.rp0=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP0[]",i.rp0)}function mee(i){i.rp1=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP1[]",i.rp1)}function gee(i){i.rp2=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP2[]",i.rp2)}function vee(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP0[]",e),i.zp0=e,e){case 0:i.tZone||f_(i),i.z0=i.tZone;break;case 1:i.z0=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function bee(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP1[]",e),i.zp1=e,e){case 0:i.tZone||f_(i),i.z1=i.tZone;break;case 1:i.z1=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function yee(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP2[]",e),i.zp2=e,e){case 0:i.tZone||f_(i),i.z2=i.tZone;break;case 1:i.z2=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function xee(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZPS[]",e),i.zp0=i.zp1=i.zp2=e,e){case 0:i.tZone||f_(i),i.z0=i.z1=i.z2=i.tZone;break;case 1:i.z0=i.z1=i.z2=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function _ee(i){i.loop=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SLOOP[]",i.loop)}function See(i){exports.DEBUG&&console.log(i.step,"RTG[]"),i.round=YB}function Cee(i){exports.DEBUG&&console.log(i.step,"RTHG[]"),i.round=ree}function wee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SMD[]",e),i.minDis=e/64}function Eee(i){exports.DEBUG&&console.log(i.step,"ELSE[]"),qB(i,!1)}function Mee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"JMPR[]",e),i.ip+=e-1}function Tee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCVTCI[]",e),i.cvCutIn=e/64}function Dee(i){var e=i.stack;exports.DEBUG&&console.log(i.step,"DUP[]"),e.push(e[e.length-1])}function bD(i){exports.DEBUG&&console.log(i.step,"POP[]"),i.stack.pop()}function Aee(i){exports.DEBUG&&console.log(i.step,"CLEAR[]"),i.stack.length=0}function Iee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SWAP[]"),e.push(t),e.push(n)}function Pee(i){var e=i.stack;exports.DEBUG&&console.log(i.step,"DEPTH[]"),e.push(e.length)}function Oee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LOOPCALL[]",t,n);var r=i.ip,o=i.prog;i.prog=i.funcs[t];for(var s=0;s<n;s++)Zd(i),exports.DEBUG&&console.log(++i.step,s+1<n?"next loopcall":"done loopcall",s);i.ip=r,i.prog=o}function Ree(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"CALL[]",e);var t=i.ip,n=i.prog;i.prog=i.funcs[e],Zd(i),i.ip=t,i.prog=n,exports.DEBUG&&console.log(++i.step,"returning from",e)}function kee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"CINDEX[]",t),e.push(e[e.length-t])}function Fee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"MINDEX[]",t),e.push(e.splice(e.length-t,1)[0])}function Nee(i){if(i.env!=="fpgm")throw new Error("FDEF not allowed here");var e=i.stack,t=i.prog,n=i.ip,r=e.pop(),o=n;for(exports.DEBUG&&console.log(i.step,"FDEF[]",r);t[++n]!==45;);i.ip=n,i.funcs[r]=t.slice(o+1,n)}function $U(i,e){var t=e.stack.pop(),n=e.z0[t],r=e.fv,o=e.pv;exports.DEBUG&&console.log(e.step,"MDAP["+i+"]",t);var s=o.distance(n,$m);i&&(s=e.round(s)),r.setRelative(n,$m,s,o),r.touch(n),e.rp0=e.rp1=t}function YU(i,e){var t=e.z2,n=t.length-2,r,o,s;exports.DEBUG&&console.log(e.step,"IUP["+i.axis+"]");for(var a=0;a<n;a++)r=t[a],!i.touched(r)&&(o=r.prevTouched(i),o!==r&&(s=r.nextTouched(i),o===s&&i.setRelative(r,r,i.distance(o,o,!1,!0),i,!0),i.interpolate(r,o,s,i)))}function XU(i,e){for(var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=e.loop,l=e.z2;a--;){var c=t.pop(),d=l[c],u=s.distance(r,r,!1,!0);o.setRelative(d,d,u,s),o.touch(d),exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"SHP["+(i?"rp1":"rp2")+"]",c)}e.loop=1}function qU(i,e){var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=t.pop(),l=e.z2[e.contours[a]],c=l;exports.DEBUG&&console.log(e.step,"SHC["+i+"]",a);var d=s.distance(r,r,!1,!0);do c!==r&&o.setRelative(c,c,d,s),c=c.nextPointOnContour;while(c!==l)}function KU(i,e){var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=t.pop();exports.DEBUG&&console.log(e.step,"SHZ["+i+"]",a);var l;switch(a){case 0:l=e.tZone;break;case 1:l=e.gZone;break;default:throw new Error("Invalid zone")}for(var c,d=s.distance(r,r,!1,!0),u=l.length-2,f=0;f<u;f++)c=l[f],o.setRelative(c,c,d,s)}function Lee(i){for(var e=i.stack,t=i.loop,n=i.fv,r=e.pop()/64,o=i.z2;t--;){var s=e.pop(),a=o[s];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-t)+": ":"")+"SHPIX[]",s,r),n.setRelative(a,a,r),n.touch(a)}i.loop=1}function Uee(i){for(var e=i.stack,t=i.rp1,n=i.rp2,r=i.loop,o=i.z0[t],s=i.z1[n],a=i.fv,l=i.dpv,c=i.z2;r--;){var d=e.pop(),u=c[d];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-r)+": ":"")+"IP[]",d,t,"<->",n),a.interpolate(u,o,s,l),a.touch(u)}i.loop=1}function ZU(i,e){var t=e.stack,n=t.pop()/64,r=t.pop(),o=e.z1[r],s=e.z0[e.rp0],a=e.fv,l=e.pv;a.setRelative(o,s,n,l),a.touch(o),exports.DEBUG&&console.log(e.step,"MSIRP["+i+"]",n,r),e.rp1=e.rp0,e.rp2=r,i&&(e.rp0=r)}function Bee(i){for(var e=i.stack,t=i.rp0,n=i.z0[t],r=i.loop,o=i.fv,s=i.pv,a=i.z1;r--;){var l=e.pop(),c=a[l];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-r)+": ":"")+"ALIGNRP[]",l),o.setRelative(c,n,0,s),o.touch(c)}i.loop=1}function zee(i){exports.DEBUG&&console.log(i.step,"RTDG[]"),i.round=iee}function JU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z0[r],s=e.fv,a=e.pv,l=e.cvt[n];exports.DEBUG&&console.log(e.step,"MIAP["+i+"]",n,"(",l,")",r);var c=a.distance(o,$m);i&&(Math.abs(c-l)<e.cvCutIn&&(c=l),c=e.round(c)),s.setRelative(o,$m,c,a),e.zp0===0&&(o.xo=o.x,o.yo=o.y),s.touch(o),e.rp0=e.rp1=r}function Vee(i){var e=i.prog,t=i.ip,n=i.stack,r=e[++t];exports.DEBUG&&console.log(i.step,"NPUSHB[]",r);for(var o=0;o<r;o++)n.push(e[++t]);i.ip=t}function Hee(i){var e=i.ip,t=i.prog,n=i.stack,r=t[++e];exports.DEBUG&&console.log(i.step,"NPUSHW[]",r);for(var o=0;o<r;o++){var s=t[++e]<<8|t[++e];s&32768&&(s=-((s^65535)+1)),n.push(s)}i.ip=e}function Gee(i){var e=i.stack,t=i.store;t||(t=i.store=[]);var n=e.pop(),r=e.pop();exports.DEBUG&&console.log(i.step,"WS",n,r),t[r]=n}function jee(i){var e=i.stack,t=i.store,n=e.pop();exports.DEBUG&&console.log(i.step,"RS",n);var r=t&&t[n]||0;e.push(r)}function Wee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"WCVTP",t,n),i.cvt[n]=t/64}function $ee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"RCVT",t),e.push(i.cvt[t]*64)}function QU(i,e){var t=e.stack,n=t.pop(),r=e.z2[n];exports.DEBUG&&console.log(e.step,"GC["+i+"]",n),t.push(e.dpv.distance(r,$m,i,!1)*64)}function eB(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z1[n],s=e.z0[r],a=e.dpv.distance(s,o,i,i);exports.DEBUG&&console.log(e.step,"MD["+i+"]",n,r,"->",a),e.stack.push(Math.round(a*64))}function Yee(i){exports.DEBUG&&console.log(i.step,"MPPEM[]"),i.stack.push(i.ppem)}function Xee(i){exports.DEBUG&&console.log(i.step,"FLIPON[]"),i.autoFlip=!0}function qee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LT[]",t,n),e.push(n<t?1:0)}function Kee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LTEQ[]",t,n),e.push(n<=t?1:0)}function Zee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"GT[]",t,n),e.push(n>t?1:0)}function Jee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"GTEQ[]",t,n),e.push(n>=t?1:0)}function Qee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"EQ[]",t,n),e.push(t===n?1:0)}function ete(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"NEQ[]",t,n),e.push(t!==n?1:0)}function tte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"ODD[]",t),e.push(Math.trunc(t)%2?1:0)}function nte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"EVEN[]",t),e.push(Math.trunc(t)%2?0:1)}function ite(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"IF[]",e),e||(qB(i,!0),exports.DEBUG&&console.log(i.step,"EIF[]"))}function rte(i){exports.DEBUG&&console.log(i.step,"EIF[]")}function ote(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"AND[]",t,n),e.push(t&&n?1:0)}function ste(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"OR[]",t,n),e.push(t||n?1:0)}function ate(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"NOT[]",t),e.push(t?0:1)}function yD(i,e){var t=e.stack,n=t.pop(),r=e.fv,o=e.pv,s=e.ppem,a=e.deltaBase+(i-1)*16,l=e.deltaShift,c=e.z0;exports.DEBUG&&console.log(e.step,"DELTAP["+i+"]",n,t);for(var d=0;d<n;d++){var u=t.pop(),f=t.pop(),h=a+((f&240)>>4);if(h===s){var p=(f&15)-8;p>=0&&p++,exports.DEBUG&&console.log(e.step,"DELTAPFIX",u,"by",p*l);var v=c[u];r.setRelative(v,v,p*l,o)}}}function lte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"SDB[]",t),i.deltaBase=t}function cte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"SDS[]",t),i.deltaShift=Math.pow(.5,t)}function dte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"ADD[]",t,n),e.push(n+t)}function ute(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SUB[]",t,n),e.push(n-t)}function fte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"DIV[]",t,n),e.push(n*64/t)}function hte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MUL[]",t,n),e.push(n*t/64)}function pte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"ABS[]",t),e.push(Math.abs(t))}function mte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"NEG[]",t),e.push(-t)}function gte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"FLOOR[]",t),e.push(Math.floor(t/64)*64)}function vte(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"CEILING[]",t),e.push(Math.ceil(t/64)*64)}function i_(i,e){var t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ROUND[]"),t.push(e.round(n/64)*64)}function bte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"WCVTF[]",t,n),i.cvt[n]=t*i.ppem/i.font.unitsPerEm}function xD(i,e){var t=e.stack,n=t.pop(),r=e.ppem,o=e.deltaBase+(i-1)*16,s=e.deltaShift;exports.DEBUG&&console.log(e.step,"DELTAC["+i+"]",n,t);for(var a=0;a<n;a++){var l=t.pop(),c=t.pop(),d=o+((c&240)>>4);if(d===r){var u=(c&15)-8;u>=0&&u++;var f=u*s;exports.DEBUG&&console.log(e.step,"DELTACFIX",l,"by",f),e.cvt[l]+=f}}}function yte(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SROUND[]",e),i.round=XB;var t;switch(e&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(i.srPeriod=t,e&48){case 0:i.srPhase=0;break;case 16:i.srPhase=.25*t;break;case 32:i.srPhase=.5*t;break;case 48:i.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}e&=15,e===0?i.srThreshold=0:i.srThreshold=(e/8-.5)*t}function xte(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"S45ROUND[]",e),i.round=XB;var t;switch(e&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(i.srPeriod=t,e&48){case 0:i.srPhase=0;break;case 16:i.srPhase=.25*t;break;case 32:i.srPhase=.5*t;break;case 48:i.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}e&=15,e===0?i.srThreshold=0:i.srThreshold=(e/8-.5)*t}function _te(i){exports.DEBUG&&console.log(i.step,"ROFF[]"),i.round=nee}function Ste(i){exports.DEBUG&&console.log(i.step,"RUTG[]"),i.round=oee}function Cte(i){exports.DEBUG&&console.log(i.step,"RDTG[]"),i.round=see}function wte(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCANCTRL[]",e)}function tB(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log(e.step,"SDPVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.dpv=Km(a,l)}function Ete(i){var e=i.stack,t=e.pop(),n=0;exports.DEBUG&&console.log(i.step,"GETINFO[]",t),t&1&&(n=35),t&32&&(n|=4096),e.push(n)}function Mte(i){var e=i.stack,t=e.pop(),n=e.pop(),r=e.pop();exports.DEBUG&&console.log(i.step,"ROLL[]"),e.push(n),e.push(t),e.push(r)}function Tte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MAX[]",t,n),e.push(Math.max(n,t))}function Dte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MIN[]",t,n),e.push(Math.min(n,t))}function Ate(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCANTYPE[]",e)}function Ite(i){var e=i.stack.pop(),t=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"INSTCTRL[]",e,t),e){case 1:i.inhibitGridFit=!!t;return;case 2:i.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Jl(i,e){var t=e.stack,n=e.prog,r=e.ip;exports.DEBUG&&console.log(e.step,"PUSHB["+i+"]");for(var o=0;o<i;o++)t.push(n[++r]);e.ip=r}function Ql(i,e){var t=e.ip,n=e.prog,r=e.stack;exports.DEBUG&&console.log(e.ip,"PUSHW["+i+"]");for(var o=0;o<i;o++){var s=n[++t]<<8|n[++t];s&32768&&(s=-((s^65535)+1)),r.push(s)}e.ip=t}function Je(i,e,t,n,r,o){var s=o.stack,a=i&&s.pop(),l=s.pop(),c=o.rp0,d=o.z0[c],u=o.z1[l],f=o.minDis,h=o.fv,p=o.dpv,v,g,m,b;g=v=p.distance(u,d,!0,!0),m=g>=0?1:-1,g=Math.abs(g),i&&(b=o.cvt[a],n&&Math.abs(g-b)<o.cvCutIn&&(g=b)),t&&g<f&&(g=f),n&&(g=o.round(g)),h.setRelative(u,d,m*g,p),h.touch(u),exports.DEBUG&&console.log(o.step,(i?"MIRP[":"MDRP[")+(e?"M":"m")+(t?">":"_")+(n?"R":"_")+(r===0?"Gr":r===1?"Bl":r===2?"Wh":"")+"]",i?a+"("+o.cvt[a]+","+b+")":"",l,"(d =",v,"->",m*g,")"),o.rp1=o.rp0,o.rp2=l,e&&(o.rp0=l)}jB=[VU.bind(void 0,ja),VU.bind(void 0,Js),HU.bind(void 0,ja),HU.bind(void 0,Js),GU.bind(void 0,ja),GU.bind(void 0,Js),jU.bind(void 0,0),jU.bind(void 0,1),WU.bind(void 0,0),WU.bind(void 0,1),lee,cee,dee,uee,fee,hee,pee,mee,gee,vee,bee,yee,xee,_ee,See,Cee,wee,Eee,Mee,Tee,void 0,void 0,Dee,bD,Aee,Iee,Pee,kee,Fee,void 0,void 0,void 0,Oee,Ree,Nee,void 0,$U.bind(void 0,0),$U.bind(void 0,1),YU.bind(void 0,ja),YU.bind(void 0,Js),XU.bind(void 0,0),XU.bind(void 0,1),qU.bind(void 0,0),qU.bind(void 0,1),KU.bind(void 0,0),KU.bind(void 0,1),Lee,Uee,ZU.bind(void 0,0),ZU.bind(void 0,1),Bee,zee,JU.bind(void 0,0),JU.bind(void 0,1),Vee,Hee,Gee,jee,Wee,$ee,QU.bind(void 0,0),QU.bind(void 0,1),void 0,eB.bind(void 0,0),eB.bind(void 0,1),Yee,void 0,Xee,void 0,void 0,qee,Kee,Zee,Jee,Qee,ete,tte,nte,ite,rte,ote,ste,ate,yD.bind(void 0,1),lte,cte,dte,ute,fte,hte,pte,mte,gte,vte,i_.bind(void 0,0),i_.bind(void 0,1),i_.bind(void 0,2),i_.bind(void 0,3),void 0,void 0,void 0,void 0,bte,yD.bind(void 0,2),yD.bind(void 0,3),xD.bind(void 0,1),xD.bind(void 0,2),xD.bind(void 0,3),yte,xte,void 0,void 0,_te,void 0,Ste,Cte,bD,bD,void 0,void 0,void 0,void 0,void 0,wte,tB.bind(void 0,0),tB.bind(void 0,1),Ete,void 0,Mte,Tte,Dte,Ate,Ite,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Jl.bind(void 0,1),Jl.bind(void 0,2),Jl.bind(void 0,3),Jl.bind(void 0,4),Jl.bind(void 0,5),Jl.bind(void 0,6),Jl.bind(void 0,7),Jl.bind(void 0,8),Ql.bind(void 0,1),Ql.bind(void 0,2),Ql.bind(void 0,3),Ql.bind(void 0,4),Ql.bind(void 0,5),Ql.bind(void 0,6),Ql.bind(void 0,7),Ql.bind(void 0,8),Je.bind(void 0,0,0,0,0,0),Je.bind(void 0,0,0,0,0,1),Je.bind(void 0,0,0,0,0,2),Je.bind(void 0,0,0,0,0,3),Je.bind(void 0,0,0,0,1,0),Je.bind(void 0,0,0,0,1,1),Je.bind(void 0,0,0,0,1,2),Je.bind(void 0,0,0,0,1,3),Je.bind(void 0,0,0,1,0,0),Je.bind(void 0,0,0,1,0,1),Je.bind(void 0,0,0,1,0,2),Je.bind(void 0,0,0,1,0,3),Je.bind(void 0,0,0,1,1,0),Je.bind(void 0,0,0,1,1,1),Je.bind(void 0,0,0,1,1,2),Je.bind(void 0,0,0,1,1,3),Je.bind(void 0,0,1,0,0,0),Je.bind(void 0,0,1,0,0,1),Je.bind(void 0,0,1,0,0,2),Je.bind(void 0,0,1,0,0,3),Je.bind(void 0,0,1,0,1,0),Je.bind(void 0,0,1,0,1,1),Je.bind(void 0,0,1,0,1,2),Je.bind(void 0,0,1,0,1,3),Je.bind(void 0,0,1,1,0,0),Je.bind(void 0,0,1,1,0,1),Je.bind(void 0,0,1,1,0,2),Je.bind(void 0,0,1,1,0,3),Je.bind(void 0,0,1,1,1,0),Je.bind(void 0,0,1,1,1,1),Je.bind(void 0,0,1,1,1,2),Je.bind(void 0,0,1,1,1,3),Je.bind(void 0,1,0,0,0,0),Je.bind(void 0,1,0,0,0,1),Je.bind(void 0,1,0,0,0,2),Je.bind(void 0,1,0,0,0,3),Je.bind(void 0,1,0,0,1,0),Je.bind(void 0,1,0,0,1,1),Je.bind(void 0,1,0,0,1,2),Je.bind(void 0,1,0,0,1,3),Je.bind(void 0,1,0,1,0,0),Je.bind(void 0,1,0,1,0,1),Je.bind(void 0,1,0,1,0,2),Je.bind(void 0,1,0,1,0,3),Je.bind(void 0,1,0,1,1,0),Je.bind(void 0,1,0,1,1,1),Je.bind(void 0,1,0,1,1,2),Je.bind(void 0,1,0,1,1,3),Je.bind(void 0,1,1,0,0,0),Je.bind(void 0,1,1,0,0,1),Je.bind(void 0,1,1,0,0,2),Je.bind(void 0,1,1,0,0,3),Je.bind(void 0,1,1,0,1,0),Je.bind(void 0,1,1,0,1,1),Je.bind(void 0,1,1,0,1,2),Je.bind(void 0,1,1,0,1,3),Je.bind(void 0,1,1,1,0,0),Je.bind(void 0,1,1,1,0,1),Je.bind(void 0,1,1,1,0,2),Je.bind(void 0,1,1,1,0,3),Je.bind(void 0,1,1,1,1,0),Je.bind(void 0,1,1,1,1,1),Je.bind(void 0,1,1,1,1,2),Je.bind(void 0,1,1,1,1,3)];function dh(i){this.char=i,this.state={},this.activeState=null}function zD(i,e,t){this.contextName=t,this.startIndex=i,this.endOffset=e}function Pte(i,e,t){this.contextName=i,this.openRange=null,this.ranges=[],this.checkStart=e,this.checkEnd=t}function ls(i,e){this.context=i,this.index=e,this.length=i.length,this.current=i[e],this.backtrack=i.slice(0,e),this.lookahead=i.slice(e+1)}function h_(i){this.eventId=i,this.subscribers=[]}function Ote(i){var e=this,t=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];t.forEach(function(r){Object.defineProperty(e.events,r,{value:new h_(r)})}),i&&t.forEach(function(r){var o=i[r];typeof o=="function"&&e.events[r].subscribe(o)});var n=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];n.forEach(function(r){e.events[r].subscribe(e.updateContextsRanges)})}function Hn(i){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],Ote.call(this,i)}dh.prototype.setState=function(i,e){return this.state[i]=e,this.activeState={key:i,value:this.state[i]},this.activeState};dh.prototype.getState=function(i){return this.state[i]||null};Hn.prototype.inboundIndex=function(i){return i>=0&&i<this.tokens.length};Hn.prototype.composeRUD=function(i){var e=this,t=!0,n=i.map(function(o){return e[o[0]].apply(e,o.slice(1).concat(t))}),r=function(o){return typeof o=="object"&&o.hasOwnProperty("FAIL")};if(n.every(r))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:n.filter(r)};this.dispatch("composeRUD",[n.filter(function(o){return!r(o)})])};Hn.prototype.replaceRange=function(i,e,t,n){e=e!==null?e:this.tokens.length;var r=t.every(function(s){return s instanceof dh});if(!isNaN(i)&&this.inboundIndex(i)&&r){var o=this.tokens.splice.apply(this.tokens,[i,e].concat(t));return n||this.dispatch("replaceToken",[i,e,t]),[o,t]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}};Hn.prototype.replaceToken=function(i,e,t){if(!isNaN(i)&&this.inboundIndex(i)&&e instanceof dh){var n=this.tokens.splice(i,1,e);return t||this.dispatch("replaceToken",[i,e]),[n[0],e]}else return{FAIL:"replaceToken: invalid token or index."}};Hn.prototype.removeRange=function(i,e,t){e=isNaN(e)?this.tokens.length:e;var n=this.tokens.splice(i,e);return t||this.dispatch("removeRange",[n,i,e]),n};Hn.prototype.removeToken=function(i,e){if(!isNaN(i)&&this.inboundIndex(i)){var t=this.tokens.splice(i,1);return e||this.dispatch("removeToken",[t,i]),t}else return{FAIL:"removeToken: invalid token index."}};Hn.prototype.insertToken=function(i,e,t){var n=i.every(function(r){return r instanceof dh});return n?(this.tokens.splice.apply(this.tokens,[e,0].concat(i)),t||this.dispatch("insertToken",[i,e]),i):{FAIL:"insertToken: invalid token(s)."}};Hn.prototype.registerModifier=function(i,e,t){this.events.newToken.subscribe(function(n,r){var o=[n,r],s=e===null||e.apply(this,o)===!0,a=[n,r];if(s){var l=t.apply(this,a);n.setState(i,l)}}),this.registeredModifiers.push(i)};h_.prototype.subscribe=function(i){return typeof i=="function"?this.subscribers.push(i)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}};h_.prototype.unsubscribe=function(i){this.subscribers.splice(i,1)};ls.prototype.setCurrentIndex=function(i){this.index=i,this.current=this.context[i],this.backtrack=this.context.slice(0,i),this.lookahead=this.context.slice(i+1)};ls.prototype.get=function(i){switch(!0){case i===0:return this.current;case(i<0&&Math.abs(i)<=this.backtrack.length):return this.backtrack.slice(i)[0];case(i>0&&i<=this.lookahead.length):return this.lookahead[i-1];default:return null}};Hn.prototype.rangeToText=function(i){if(i instanceof zD)return this.getRangeTokens(i).map(function(e){return e.char}).join("")};Hn.prototype.getText=function(){return this.tokens.map(function(i){return i.char}).join("")};Hn.prototype.getContext=function(i){var e=this.registeredContexts[i];return e||null};Hn.prototype.on=function(i,e){var t=this.events[i];return t?t.subscribe(e):null};Hn.prototype.dispatch=function(i,e){var t=this,n=this.events[i];n instanceof h_&&n.subscribers.forEach(function(r){r.apply(t,e||[])})};Hn.prototype.registerContextChecker=function(i,e,t){if(this.getContext(i))return{FAIL:"context name '"+i+"' is already registered."};if(typeof e!="function")return{FAIL:"missing context start check."};if(typeof t!="function")return{FAIL:"missing context end check."};var n=new Pte(i,e,t);return this.registeredContexts[i]=n,this.contextCheckers.push(n),n};Hn.prototype.getRangeTokens=function(i){var e=i.startIndex+i.endOffset;return[].concat(this.tokens.slice(i.startIndex,e))};Hn.prototype.getContextRanges=function(i){var e=this.getContext(i);return e?e.ranges:{FAIL:"context checker '"+i+"' is not registered."}};Hn.prototype.resetContextsRanges=function(){var i=this.registeredContexts;for(var e in i)if(i.hasOwnProperty(e)){var t=i[e];t.ranges=[]}};Hn.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var i=this.tokens.map(function(n){return n.char}),e=0;e<i.length;e++){var t=new ls(i,e);this.runContextCheck(t)}this.dispatch("updateContextsRanges",[this.registeredContexts])};Hn.prototype.setEndOffset=function(i,e){var t=this.getContext(e).openRange.startIndex,n=new zD(t,i,e),r=this.getContext(e).ranges;return n.rangeId=e+"."+r.length,r.push(n),this.getContext(e).openRange=null,n};Hn.prototype.runContextCheck=function(i){var e=this,t=i.index;this.contextCheckers.forEach(function(n){var r=n.contextName,o=e.getContext(r).openRange;if(!o&&n.checkStart(i)&&(o=new zD(t,null,r),e.getContext(r).openRange=o,e.dispatch("contextStart",[r,t])),o&&n.checkEnd(i)){var s=t-o.startIndex+1,a=e.setEndOffset(s,r);e.dispatch("contextEnd",[r,a])}})};Hn.prototype.tokenize=function(i){this.tokens=[],this.resetContextsRanges();var e=Array.from(i);this.dispatch("start");for(var t=0;t<e.length;t++){var n=e[t],r=new ls(e,t);this.dispatch("next",[r]),this.runContextCheck(r);var o=new dh(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens};function nc(i){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(i)}function KB(i){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(i)}function ic(i){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(i)}function o_(i){return/[A-z]/.test(i)}function Rte(i){return/\s/.test(i)}function Jr(i){this.font=i,this.features={}}function Kd(i){this.id=i.id,this.tag=i.tag,this.substitution=i.substitution}function Zm(i,e){if(!i)return-1;switch(e.format){case 1:return e.glyphs.indexOf(i);case 2:for(var t=e.ranges,n=0;n<t.length;n++){var r=t[n];if(i>=r.start&&i<=r.end){var o=i-r.start;return r.index+o}}break;default:return-1}return-1}function kte(i,e){var t=Zm(i,e.coverage);return t===-1?null:i+e.deltaGlyphId}function Fte(i,e){var t=Zm(i,e.coverage);return t===-1?null:e.substitute[t]}function _D(i,e){for(var t=[],n=0;n<i.length;n++){var r=i[n],o=e.current;o=Array.isArray(o)?o[0]:o;var s=Zm(o,r);s!==-1&&t.push(s)}return t.length!==i.length?-1:t}function Nte(i,e){var t=e.inputCoverage.length+e.lookaheadCoverage.length+e.backtrackCoverage.length;if(i.context.length<t)return[];var n=_D(e.inputCoverage,i);if(n===-1)return[];var r=e.inputCoverage.length-1;if(i.lookahead.length<e.lookaheadCoverage.length)return[];for(var o=i.lookahead.slice(r);o.length&&ic(o[0].char);)o.shift();var s=new ls(o,0),a=_D(e.lookaheadCoverage,s),l=[].concat(i.backtrack);for(l.reverse();l.length&&ic(l[0].char);)l.shift();if(l.length<e.backtrackCoverage.length)return[];var c=new ls(l,0),d=_D(e.backtrackCoverage,c),u=n.length===e.inputCoverage.length&&a.length===e.lookaheadCoverage.length&&d.length===e.backtrackCoverage.length,f=[];if(u)for(var h=0;h<e.lookupRecords.length;h++)for(var p=e.lookupRecords[h],v=p.lookupListIndex,g=this.getLookupByIndex(v),m=0;m<g.subtables.length;m++){var b=g.subtables[m],y=this.getLookupMethod(g,b),_=this.getSubstitutionType(g,b);if(_==="12")for(var w=0;w<n.length;w++){var D=i.get(w),A=y(D);A&&f.push(A)}}return f}function Lte(i,e){var t=i.current,n=Zm(t,e.coverage);if(n===-1)return null;for(var r,o=e.ligatureSets[n],s=0;s<o.length;s++){r=o[s];for(var a=0;a<r.components.length;a++){var l=i.lookahead[a],c=r.components[a];if(l!==c)break;if(a===r.components.length-1)return r}}return null}function Ute(i,e){var t=Zm(i,e.coverage);return t===-1?null:e.sequences[t]}Jr.prototype.getDefaultScriptFeaturesIndexes=function(){for(var i=this.font.tables.gsub.scripts,e=0;e<i.length;e++){var t=i[e];if(t.tag==="DFLT")return t.script.defaultLangSys.featureIndexes}return[]};Jr.prototype.getScriptFeaturesIndexes=function(i){var e=this.font.tables;if(!e.gsub)return[];if(!i)return this.getDefaultScriptFeaturesIndexes();for(var t=this.font.tables.gsub.scripts,n=0;n<t.length;n++){var r=t[n];if(r.tag===i&&r.script.defaultLangSys)return r.script.defaultLangSys.featureIndexes;var o=r.langSysRecords;if(o)for(var s=0;s<o.length;s++){var a=o[s];if(a.tag===i){var l=a.langSys;return l.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()};Jr.prototype.mapTagsToFeatures=function(i,e){for(var t={},n=0;n<i.length;n++){var r=i[n].tag,o=i[n].feature;t[r]=o}this.features[e].tags=t};Jr.prototype.getScriptFeatures=function(i){var e=this.features[i];if(this.features.hasOwnProperty(i))return e;var t=this.getScriptFeaturesIndexes(i);if(!t)return null;var n=this.font.tables.gsub;return e=t.map(function(r){return n.features[r]}),this.features[i]=e,this.mapTagsToFeatures(e,i),e};Jr.prototype.getSubstitutionType=function(i,e){var t=i.lookupType.toString(),n=e.substFormat.toString();return t+n};Jr.prototype.getLookupMethod=function(i,e){var t=this,n=this.getSubstitutionType(i,e);switch(n){case"11":return function(r){return kte.apply(t,[r,e])};case"12":return function(r){return Fte.apply(t,[r,e])};case"63":return function(r){return Nte.apply(t,[r,e])};case"41":return function(r){return Lte.apply(t,[r,e])};case"21":return function(r){return Ute.apply(t,[r,e])};default:throw new Error("lookupType: "+i.lookupType+" - substFormat: "+e.substFormat+" is not yet supported")}};Jr.prototype.lookupFeature=function(i){var e=i.contextParams,t=e.index,n=this.getFeature({tag:i.tag,script:i.script});if(!n)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+i.tag+"' for script '"+i.script+"'.");for(var r=this.getFeatureLookups(n),o=[].concat(e.context),s=0;s<r.length;s++)for(var a=r[s],l=this.getLookupSubtables(a),c=0;c<l.length;c++){var d=l[c],u=this.getSubstitutionType(a,d),f=this.getLookupMethod(a,d),h=void 0;switch(u){case"11":h=f(e.current),h&&o.splice(t,1,new Kd({id:11,tag:i.tag,substitution:h}));break;case"12":h=f(e.current),h&&o.splice(t,1,new Kd({id:12,tag:i.tag,substitution:h}));break;case"63":h=f(e),Array.isArray(h)&&h.length&&o.splice(t,1,new Kd({id:63,tag:i.tag,substitution:h}));break;case"41":h=f(e),h&&o.splice(t,1,new Kd({id:41,tag:i.tag,substitution:h}));break;case"21":h=f(e.current),h&&o.splice(t,1,new Kd({id:21,tag:i.tag,substitution:h}));break}e=new ls(o,t),!(Array.isArray(h)&&!h.length)&&(h=null)}return o.length?o:null};Jr.prototype.supports=function(i){if(!i.script)return!1;this.getScriptFeatures(i.script);var e=this.features.hasOwnProperty(i.script);if(!i.tag)return e;var t=this.features[i.script].some(function(n){return n.tag===i.tag});return e&&t};Jr.prototype.getLookupSubtables=function(i){return i.subtables||null};Jr.prototype.getLookupByIndex=function(i){var e=this.font.tables.gsub.lookups;return e[i]||null};Jr.prototype.getFeatureLookups=function(i){return i.lookupListIndexes.map(this.getLookupByIndex.bind(this))};Jr.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};function Bte(i){var e=i.current,t=i.get(-1);return t===null&&nc(e)||!nc(t)&&nc(e)}function zte(i){var e=i.get(1);return e===null||!nc(e)}var Vte={startCheck:Bte,endCheck:zte};function Hte(i){var e=i.current,t=i.get(-1);return(nc(e)||ic(e))&&!nc(t)}function Gte(i){var e=i.get(1);switch(!0){case e===null:return!0;case(!nc(e)&&!ic(e)):var t=Rte(e);if(!t)return!0;if(t){var n=!1;if(n=i.lookahead.some(function(r){return nc(r)||ic(r)}),!n)return!0}break;default:return!1}}var jte={startCheck:Hte,endCheck:Gte};function Wte(i,e,t){e[t].setState(i.tag,i.substitution)}function $te(i,e,t){e[t].setState(i.tag,i.substitution)}function Yte(i,e,t){i.substitution.forEach(function(n,r){var o=e[t+r];o.setState(i.tag,n)})}function Xte(i,e,t){var n=e[t];n.setState(i.tag,i.substitution.ligGlyph);for(var r=i.substitution.components.length,o=0;o<r;o++)n=e[t+o+1],n.setState("deleted",!0)}var nB={11:Wte,12:$te,63:Yte,41:Xte};function VD(i,e,t){i instanceof Kd&&nB[i.id]&&nB[i.id](i,e,t)}function qte(i){for(var e=[].concat(i.backtrack),t=e.length-1;t>=0;t--){var n=e[t],r=KB(n),o=ic(n);if(!r&&!o)return!0;if(r)return!1}return!1}function Kte(i){if(KB(i.current))return!1;for(var e=0;e<i.lookahead.length;e++){var t=i.lookahead[e],n=ic(t);if(!n)return!0}return!1}function Zte(i){var e=this,t="arab",n=this.featuresTags[t],r=this.tokenizer.getRangeTokens(i);if(r.length!==1){var o=new ls(r.map(function(a){return a.getState("glyphIndex")}),0),s=new ls(r.map(function(a){return a.char}),0);r.forEach(function(a,l){if(!ic(a.char)){o.setCurrentIndex(l),s.setCurrentIndex(l);var c=0;qte(s)&&(c|=1),Kte(s)&&(c|=2);var d;switch(c){case 1:d="fina";break;case 2:d="init";break;case 3:d="medi";break}if(n.indexOf(d)!==-1){var u=e.query.lookupFeature({tag:d,script:t,contextParams:o});if(u instanceof Error)return console.info(u.message);u.forEach(function(f,h){f instanceof Kd&&(VD(f,r,h),o.context[h]=f.substitution)})}}})}}function iB(i,e){var t=i.map(function(n){return n.activeState.value});return new ls(t,e||0)}function Jte(i){var e=this,t="arab",n=this.tokenizer.getRangeTokens(i),r=iB(n);r.context.forEach(function(o,s){r.setCurrentIndex(s);var a=e.query.lookupFeature({tag:"rlig",script:t,contextParams:r});a.length&&(a.forEach(function(l){return VD(l,n,s)}),r=iB(n))})}function Qte(i){var e=i.current,t=i.get(-1);return t===null&&o_(e)||!o_(t)&&o_(e)}function ene(i){var e=i.get(1);return e===null||!o_(e)}var tne={startCheck:Qte,endCheck:ene};function rB(i,e){var t=i.map(function(n){return n.activeState.value});return new ls(t,e||0)}function nne(i){var e=this,t="latn",n=this.tokenizer.getRangeTokens(i),r=rB(n);r.context.forEach(function(o,s){r.setCurrentIndex(s);var a=e.query.lookupFeature({tag:"liga",script:t,contextParams:r});a.length&&(a.forEach(function(l){return VD(l,n,s)}),r=rB(n))})}function us(i){this.baseDir=i||"ltr",this.tokenizer=new Hn,this.featuresTags={}}us.prototype.setText=function(i){this.text=i};us.prototype.contextChecks={latinWordCheck:tne,arabicWordCheck:Vte,arabicSentenceCheck:jte};function SD(i){var e=this.contextChecks[i+"Check"];return this.tokenizer.registerContextChecker(i,e.startCheck,e.endCheck)}function ine(){return SD.call(this,"latinWord"),SD.call(this,"arabicWord"),SD.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function rne(){var i=this,e=this.tokenizer.getContextRanges("arabicSentence");e.forEach(function(t){var n=i.tokenizer.getRangeTokens(t);i.tokenizer.replaceRange(t.startIndex,t.endOffset,n.reverse())})}us.prototype.registerFeatures=function(i,e){var t=this,n=e.filter(function(r){return t.query.supports({script:i,tag:r})});this.featuresTags.hasOwnProperty(i)?this.featuresTags[i]=this.featuresTags[i].concat(n):this.featuresTags[i]=n};us.prototype.applyFeatures=function(i,e){if(!i)throw new Error("No valid font was provided to apply features");this.query||(this.query=new Jr(i));for(var t=0;t<e.length;t++){var n=e[t];this.query.supports({script:n.script})&&this.registerFeatures(n.script,n.tags)}};us.prototype.registerModifier=function(i,e,t){this.tokenizer.registerModifier(i,e,t)};function HD(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function one(){var i=this,e="arab";if(this.featuresTags.hasOwnProperty(e)){HD.call(this);var t=this.tokenizer.getContextRanges("arabicWord");t.forEach(function(n){Zte.call(i,n)})}}function sne(){var i=this,e="arab";if(this.featuresTags.hasOwnProperty(e)){var t=this.featuresTags[e];if(t.indexOf("rlig")!==-1){HD.call(this);var n=this.tokenizer.getContextRanges("arabicWord");n.forEach(function(r){Jte.call(i,r)})}}}function ane(){var i=this,e="latn";if(this.featuresTags.hasOwnProperty(e)){var t=this.featuresTags[e];if(t.indexOf("liga")!==-1){HD.call(this);var n=this.tokenizer.getContextRanges("latinWord");n.forEach(function(r){nne.call(i,r)})}}}us.prototype.checkContextReady=function(i){return!!this.tokenizer.getContext(i)};us.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(one.call(this),sne.call(this)),this.checkContextReady("latinWord")&&ane.call(this),this.checkContextReady("arabicSentence")&&rne.call(this)};us.prototype.processText=function(i){(!this.text||this.text!==i)&&(this.setText(i),ine.call(this),this.applyFeaturesToContexts())};us.prototype.getBidiText=function(i){return this.processText(i),this.tokenizer.getText()};us.prototype.getTextGlyphs=function(i){this.processText(i);for(var e=[],t=0;t<this.tokenizer.tokens.length;t++){var n=this.tokenizer.tokens[t];if(!n.state.deleted){var r=n.activeState.value;e.push(Array.isArray(r)?r[0]:r)}}return e};function Cn(i){i=i||{},i.tables=i.tables||{},i.empty||(Vm(i.familyName,"When creating a new Font object, familyName is required."),Vm(i.styleName,"When creating a new Font object, styleName is required."),Vm(i.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Vm(i.ascender,"When creating a new Font object, ascender is required."),Vm(i.descender<=0,"When creating a new Font object, negative descender value is required."),this.names={fontFamily:{en:i.familyName||" "},fontSubfamily:{en:i.styleName||" "},fullName:{en:i.fullName||i.familyName+" "+i.styleName},postScriptName:{en:i.postScriptName||(i.familyName+i.styleName).replace(/\s/g,"")},designer:{en:i.designer||" "},designerURL:{en:i.designerURL||" "},manufacturer:{en:i.manufacturer||" "},manufacturerURL:{en:i.manufacturerURL||" "},license:{en:i.license||" "},licenseURL:{en:i.licenseURL||" "},version:{en:i.version||"Version 0.1"},description:{en:i.description||" "},copyright:{en:i.copyright||" "},trademark:{en:i.trademark||" "}},this.unitsPerEm=i.unitsPerEm||1e3,this.ascender=i.ascender,this.descender=i.descender,this.createdTimestamp=i.createdTimestamp,this.tables=Object.assign(i.tables,{os2:Object.assign({usWeightClass:i.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:i.widthClass||this.usWidthClasses.MEDIUM,fsSelection:i.fsSelection||this.fsSelectionValues.REGULAR},i.tables.os2)})),this.supported=!0,this.glyphs=new Qs.GlyphSet(this,i.glyphs||[]),this.encoding=new mB(this),this.position=new Xm(this),this.substitution=new Zr(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new $B(this)}})}Cn.prototype.hasChar=function(i){return this.encoding.charToGlyphIndex(i)!==null};Cn.prototype.charToGlyphIndex=function(i){return this.encoding.charToGlyphIndex(i)};Cn.prototype.charToGlyph=function(i){var e=this.charToGlyphIndex(i),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};Cn.prototype.updateFeatures=function(i){return this.defaultRenderOptions.features.map(function(e){return e.script==="latn"?{script:"latn",tags:e.tags.filter(function(t){return i[t]})}:e})};Cn.prototype.stringToGlyphs=function(i,e){var t=this,n=new us,r=function(u){return t.charToGlyphIndex(u.char)};n.registerModifier("glyphIndex",null,r);var o=e?this.updateFeatures(e.features):this.defaultRenderOptions.features;n.applyFeatures(this,o);for(var s=n.getTextGlyphs(i),a=s.length,l=new Array(a),c=this.glyphs.get(0),d=0;d<a;d+=1)l[d]=this.glyphs.get(s[d])||c;return l};Cn.prototype.nameToGlyphIndex=function(i){return this.glyphNames.nameToGlyphIndex(i)};Cn.prototype.nameToGlyph=function(i){var e=this.nameToGlyphIndex(i),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};Cn.prototype.glyphIndexToName=function(i){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(i):""};Cn.prototype.getKerningValue=function(i,e){i=i.index||i,e=e.index||e;var t=this.position.defaultKerningTables;return t?this.position.getKerningValue(t,i,e):this.kerningPairs[i+","+e]||0};Cn.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]};Cn.prototype.forEachGlyph=function(i,e,t,n,r,o){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72,r=Object.assign({},this.defaultRenderOptions,r);var s=1/this.unitsPerEm*n,a=this.stringToGlyphs(i,r),l;if(r.kerning){var c=r.script||this.position.getDefaultScriptName();l=this.position.getKerningTables(c,r.language)}for(var d=0;d<a.length;d+=1){var u=a[d];if(o.call(this,u,e,t,n,r),u.advanceWidth&&(e+=u.advanceWidth*s),r.kerning&&d<a.length-1){var f=l?this.position.getKerningValue(l,u.index,a[d+1].index):this.getKerningValue(u,a[d+1]);e+=f*s}r.letterSpacing?e+=r.letterSpacing*n:r.tracking&&(e+=r.tracking/1e3*n)}return e};Cn.prototype.getPath=function(i,e,t,n,r){var o=new Xn;return this.forEachGlyph(i,e,t,n,r,function(s,a,l,c){var d=s.getPath(a,l,c,r,this);o.extend(d)}),o};Cn.prototype.getPaths=function(i,e,t,n,r){var o=[];return this.forEachGlyph(i,e,t,n,r,function(s,a,l,c){var d=s.getPath(a,l,c,r,this);o.push(d)}),o};Cn.prototype.getAdvanceWidth=function(i,e,t){return this.forEachGlyph(i,0,0,e,t,function(){})};Cn.prototype.draw=function(i,e,t,n,r,o){this.getPath(e,t,n,r,o).draw(i)};Cn.prototype.drawPoints=function(i,e,t,n,r,o){this.forEachGlyph(e,t,n,r,o,function(s,a,l,c){s.drawPoints(i,a,l,c)})};Cn.prototype.drawMetrics=function(i,e,t,n,r,o){this.forEachGlyph(e,t,n,r,o,function(s,a,l,c){s.drawMetrics(i,a,l,c)})};Cn.prototype.getEnglishName=function(i){var e=this.names[i];if(e)return e.en};Cn.prototype.validate=function(){var i=this;function e(n,r){}function t(n){var r=i.getEnglishName(n);r&&r.trim().length>0}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm>0};Cn.prototype.toTables=function(){return XQ.fontToTable(this)};Cn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()};Cn.prototype.toArrayBuffer=function(){for(var i=this.toTables(),e=i.encode(),t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e[r];return t};Cn.prototype.download=function(i){var e=this.getEnglishName("fontFamily"),t=this.getEnglishName("fontSubfamily");i=i||e.replace(/\s/g,"")+"-"+t+".otf";var n=this.toArrayBuffer();if(KQ())if(window.URL=window.URL||window.webkitURL,window.URL){var r=new DataView(n),o=new Blob([r],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=i;var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!1),s.dispatchEvent(a)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var l=xU(),c=ZQ(n);l.writeFileSync(i,c)}};Cn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512};Cn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9};Cn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function ZB(i,e){var t=JSON.stringify(i),n=256;for(var r in e){var o=parseInt(r);if(!(!o||o<256)){if(JSON.stringify(e[r])===t)return o;n<=o&&(n=o+1)}}return e[n]=i,n}function lne(i,e,t){var n=ZB(e.name,t);return[{name:"tag_"+i,type:"TAG",value:e.tag},{name:"minValue_"+i,type:"FIXED",value:e.minValue<<16},{name:"defaultValue_"+i,type:"FIXED",value:e.defaultValue<<16},{name:"maxValue_"+i,type:"FIXED",value:e.maxValue<<16},{name:"flags_"+i,type:"USHORT",value:0},{name:"nameID_"+i,type:"USHORT",value:n}]}function cne(i,e,t){var n={},r=new et.Parser(i,e);return n.tag=r.parseTag(),n.minValue=r.parseFixed(),n.defaultValue=r.parseFixed(),n.maxValue=r.parseFixed(),r.skip("uShort",1),n.name=t[r.parseUShort()]||{},n}function dne(i,e,t,n){for(var r=ZB(e.name,n),o=[{name:"nameID_"+i,type:"USHORT",value:r},{name:"flags_"+i,type:"USHORT",value:0}],s=0;s<t.length;++s){var a=t[s].tag;o.push({name:"axis_"+i+" "+a,type:"FIXED",value:e.coordinates[a]<<16})}return o}function une(i,e,t,n){var r={},o=new et.Parser(i,e);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var s=0;s<t.length;++s)r.coordinates[t[s].tag]=o.parseFixed();return r}function fne(i,e){var t=new $e.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:i.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:i.instances.length},{name:"instanceSize",type:"USHORT",value:4+i.axes.length*4}]);t.offsetToData=t.sizeOf();for(var n=0;n<i.axes.length;n++)t.fields=t.fields.concat(lne(n,i.axes[n],e));for(var r=0;r<i.instances.length;r++)t.fields=t.fields.concat(dne(r,i.instances[r],i.axes,e));return t}function hne(i,e,t){var n=new et.Parser(i,e),r=n.parseULong();St.argument(r===65536,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var s=n.parseUShort(),a=n.parseUShort(),l=n.parseUShort(),c=n.parseUShort(),d=[],u=0;u<s;u++)d.push(cne(i,e+o+u*a,t));for(var f=[],h=e+o+s*a,p=0;p<l;p++)f.push(une(i,h+p*c,d,t));return{axes:d,instances:f}}var pne={make:fne,parse:hne},mne=function(){return{coverage:this.parsePointer(oe.coverage),attachPoints:this.parseList(oe.pointer(oe.uShortList))}},gne=function(){var i=this.parseUShort();if(St.argument(i===1||i===2||i===3,"Unsupported CaretValue table version."),i===1)return{coordinate:this.parseShort()};if(i===2)return{pointindex:this.parseShort()};if(i===3)return{coordinate:this.parseShort()}},vne=function(){return this.parseList(oe.pointer(gne))},bne=function(){return{coverage:this.parsePointer(oe.coverage),ligGlyphs:this.parseList(oe.pointer(vne))}},yne=function(){return this.parseUShort(),this.parseList(oe.pointer(oe.coverage))};function xne(i,e){e=e||0;var t=new oe(i,e),n=t.parseVersion(1);St.argument(n===1||n===1.2||n===1.3,"Unsupported GDEF table version.");var r={version:n,classDef:t.parsePointer(oe.classDef),attachList:t.parsePointer(mne),ligCaretList:t.parsePointer(bne),markAttachClassDef:t.parsePointer(oe.classDef)};return n>=1.2&&(r.markGlyphSets=t.parsePointer(yne)),r}var _ne={parse:xne},cs=new Array(10);cs[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(oe.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(oe.coverage),values:this.parseValueRecordList()};St.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};cs[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();St.assert(t===1||t===2,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(oe.coverage),r=this.parseUShort(),o=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:o,pairSets:this.parseList(oe.pointer(oe.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}})))};if(t===2){var s=this.parsePointer(oe.classDef),a=this.parsePointer(oe.classDef),l=this.parseUShort(),c=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:o,classDef1:s,classDef2:a,class1Count:l,class2Count:c,classRecords:this.parseList(l,oe.list(c,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}}))}}};cs[3]=function(){return{error:"GPOS Lookup 3 not supported"}};cs[4]=function(){return{error:"GPOS Lookup 4 not supported"}};cs[5]=function(){return{error:"GPOS Lookup 5 not supported"}};cs[6]=function(){return{error:"GPOS Lookup 6 not supported"}};cs[7]=function(){return{error:"GPOS Lookup 7 not supported"}};cs[8]=function(){return{error:"GPOS Lookup 8 not supported"}};cs[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function Sne(i,e){e=e||0;var t=new oe(i,e),n=t.parseVersion(1);return St.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(cs)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(cs),variations:t.parseFeatureVariationsList()}}var Cne=new Array(10);function wne(i){return new $e.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new $e.ScriptList(i.scripts)},{name:"features",type:"TABLE",value:new $e.FeatureList(i.features)},{name:"lookups",type:"TABLE",value:new $e.LookupList(i.lookups,Cne)}])}var Ene={parse:Sne,make:wne};function Mne(i){var e={};i.skip("uShort");var t=i.parseUShort();St.argument(t===0,"Unsupported kern sub-table version."),i.skip("uShort",2);var n=i.parseUShort();i.skip("uShort",3);for(var r=0;r<n;r+=1){var o=i.parseUShort(),s=i.parseUShort(),a=i.parseShort();e[o+","+s]=a}return e}function Tne(i){var e={};i.skip("uShort");var t=i.parseULong();t>1&&console.warn("Only the first kern subtable is supported."),i.skip("uLong");var n=i.parseUShort(),r=n&255;if(i.skip("uShort"),r===0){var o=i.parseUShort();i.skip("uShort",3);for(var s=0;s<o;s+=1){var a=i.parseUShort(),l=i.parseUShort(),c=i.parseShort();e[a+","+l]=c}}return e}function Dne(i,e){var t=new et.Parser(i,e),n=t.parseUShort();if(n===0)return Mne(t);if(n===1)return Tne(t);throw new Error("Unsupported kern table version ("+n+").")}var Ane={parse:Dne};function Ine(i,e,t,n){for(var r=new et.Parser(i,e),o=n?r.parseUShort:r.parseULong,s=[],a=0;a<t+1;a+=1){var l=o.call(r);n&&(l*=2),s.push(l)}return s}var Pne={parse:Ine};function oB(i,e){for(var t=[],n=12,r=0;r<e;r+=1){var o=et.getTag(i,n),s=et.getULong(i,n+4),a=et.getULong(i,n+8),l=et.getULong(i,n+12);t.push({tag:o,checksum:s,offset:a,length:l,compression:!1}),n+=16}return t}function One(i,e){for(var t=[],n=44,r=0;r<e;r+=1){var o=et.getTag(i,n),s=et.getULong(i,n+4),a=et.getULong(i,n+8),l=et.getULong(i,n+12),c=void 0;a<l?c="WOFF":c=!1,t.push({tag:o,offset:s,compression:c,compressedLength:a,length:l}),n+=20}return t}function Yn(i,e){if(e.compression==="WOFF"){var t=new Uint8Array(i.buffer,e.offset+2,e.compressedLength-2),n=new Uint8Array(e.length);if(EJ(t,n),n.byteLength!==e.length)throw new Error("Decompression error: "+e.tag+" decompressed length doesn't match recorded length");var r=new DataView(n.buffer,0);return{data:r,offset:0}}else return{data:i,offset:e.offset}}function JB(i,e){e=e??{};var t,n,r=new Cn({empty:!0}),o=new DataView(i,0),s,a=[],l=et.getTag(o,0);if(l==="\0\0\0"||l==="true"||l==="typ1")r.outlinesFormat="truetype",s=et.getUShort(o,4),a=oB(o,s);else if(l==="OTTO")r.outlinesFormat="cff",s=et.getUShort(o,4),a=oB(o,s);else if(l==="wOFF"){var c=et.getTag(o,4);if(c==="\0\0\0")r.outlinesFormat="truetype";else if(c==="OTTO")r.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+l);s=et.getUShort(o,12),a=One(o,s)}else throw new Error("Unsupported OpenType signature "+l);for(var d,u,f,h,p,v,g,m,b,y,_,w,D=0;D<s;D+=1){var A=a[D],P=void 0;switch(A.tag){case"cmap":P=Yn(o,A),r.tables.cmap=pB.parse(P.data,P.offset),r.encoding=new gB(r.tables.cmap);break;case"cvt ":P=Yn(o,A),w=new et.Parser(P.data,P.offset),r.tables.cvt=w.parseShortList(A.length/2);break;case"fvar":u=A;break;case"fpgm":P=Yn(o,A),w=new et.Parser(P.data,P.offset),r.tables.fpgm=w.parseByteList(A.length);break;case"head":P=Yn(o,A),r.tables.head=MB.parse(P.data,P.offset),r.unitsPerEm=r.tables.head.unitsPerEm,t=r.tables.head.indexToLocFormat;break;case"hhea":P=Yn(o,A),r.tables.hhea=TB.parse(P.data,P.offset),r.ascender=r.tables.hhea.ascender,r.descender=r.tables.hhea.descender,r.numberOfHMetrics=r.tables.hhea.numberOfHMetrics;break;case"hmtx":g=A;break;case"ltag":P=Yn(o,A),n=AB.parse(P.data,P.offset);break;case"maxp":P=Yn(o,A),r.tables.maxp=IB.parse(P.data,P.offset),r.numGlyphs=r.tables.maxp.numGlyphs;break;case"name":y=A;break;case"OS/2":P=Yn(o,A),r.tables.os2=ID.parse(P.data,P.offset);break;case"post":P=Yn(o,A),r.tables.post=NB.parse(P.data,P.offset),r.glyphNames=new ND(r.tables.post);break;case"prep":P=Yn(o,A),w=new et.Parser(P.data,P.offset),r.tables.prep=w.parseByteList(A.length);break;case"glyf":f=A;break;case"loca":b=A;break;case"CFF ":d=A;break;case"kern":m=A;break;case"GDEF":h=A;break;case"GPOS":p=A;break;case"GSUB":v=A;break;case"meta":_=A;break}}var E=Yn(o,y);if(r.tables.name=FB.parse(E.data,E.offset,n),r.names=r.tables.name,f&&b){var I=t===0,L=Yn(o,b),Y=Pne.parse(L.data,L.offset,r.numGlyphs,I),G=Yn(o,f);r.glyphs=GB.parse(G.data,G.offset,Y,r,e)}else if(d){var Q=Yn(o,d);EB.parse(Q.data,Q.offset,r,e)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var ee=Yn(o,g);if(DB.parse(r,ee.data,ee.offset,r.numberOfHMetrics,r.numGlyphs,r.glyphs,e),$J(r,e),m){var te=Yn(o,m);r.kerningPairs=Ane.parse(te.data,te.offset)}else r.kerningPairs={};if(h){var X=Yn(o,h);r.tables.gdef=_ne.parse(X.data,X.offset)}if(p){var ie=Yn(o,p);r.tables.gpos=Ene.parse(ie.data,ie.offset),r.position.init()}if(v){var Se=Yn(o,v);r.tables.gsub=LB.parse(Se.data,Se.offset)}if(u){var Ce=Yn(o,u);r.tables.fvar=pne.parse(Ce.data,Ce.offset,r.names)}if(_){var Ee=Yn(o,_);r.tables.meta=UB.parse(Ee.data,Ee.offset),r.metas=r.tables.meta}return r}var yr="Custom Font";var p_=class i{constructor(e){this.customizerState=e}queueFontFaceLoad(e,t){if(!t.isBrowser()||!t.fontSourceMap()[e]||t.fontFacesReady().has(e))return;let r=t.fontFacePromises().get(e);if(!r){if(r=this.ensureFontFaceLoaded(e,t),!r)return;t.fontFacePromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}r.then(()=>{t.fontFacesReady().has(e)||(t.fontFacesReady.update(o=>{let s=new Set(o);return s.add(e),s}),this.customizerState.refreshFabricOverlays())}).catch(o=>{console.error(Yx(e),o)})}createFontLabelFromFileName(e){let n=e.replace(/\.[^.]+$/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim();return n?n.split(" ").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):yr}createUniqueFontFamilyName(e,t){let n=e.trim()||yr,r=n,o=2;for(;t.fontSourceMap()[r];)r=`${n} ${o}`,o+=1;return r}async resolveOpentypeFont(e,t){let n=this.resolveOverlayFontFamily(e,t),r=await this.getOpentypeFont(n,t);return r||(n===t.defaultFontFamily()?null:this.getOpentypeFont(t.defaultFontFamily(),t))}ensureFontFaceLoaded(e,t){return!t.isBrowser()||!t.fontSourceMap()[e]?void 0:this.getFontBinary(e,t).then(o=>!o||typeof FontFace>"u"||typeof document>"u"?void 0:new FontFace(e,o).load().then(a=>{document.fonts.add(a)})).catch(o=>{console.error(tU(e),o)})}getFontBinary(e,t){if(!t.isBrowser())return Promise.resolve(null);let n=t.fontSourceMap()[e];if(!n)return Promise.resolve(null);if(n instanceof ArrayBuffer)return t.fontBinaryPromises().has(e)||t.fontBinaryPromises.update(r=>{let o=new Map(r);return o.set(e,Promise.resolve(n.slice(0))),o}),t.fontBinaryPromises().get(e);if(!t.fontBinaryPromises().has(e)){let r=fetch(n).then(o=>{if(!o.ok)throw new Error(`Font download failed (${o.status})`);return o.arrayBuffer()}).catch(o=>(console.error(nU(e),o),null));t.fontBinaryPromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}return t.fontBinaryPromises().get(e)}getOpentypeFont(e,t){if(!t.fontSourceMap()[e])return Promise.resolve(null);if(!t.fontOutlinePromises().has(e)){let r=this.getFontBinary(e,t).then(o=>{if(!o||this.readSignature(o)==="wOF2")return null;try{return JB(o.slice(0))}catch(a){return console.error(iU(e),a),null}});t.fontOutlinePromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}return t.fontOutlinePromises().get(e)}resolveOverlayFontFamily(e,t){let n=e.fontFamily?.trim();return n&&t.fontSourceMap()[n]?n:t.defaultFontFamily()}readSignature(e){let t=new Uint8Array(e,0,4);return String.fromCharCode(t[0],t[1],t[2],t[3])}static \u0275fac=function(t){return new(t||i)(Ke(Dn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var m_=class i{constructor(e){this.customizerState=e}async computeTextGlyphPlan(e,t){let n=t.font;if(!n)return null;let r=n.stringToGlyphs(e.text);if(!r.length)return null;let o=t.letterSpacing,s=n.unitsPerEm||1e3,a=e.fontSize/s,l=r.map(p=>(p.advanceWidth??s*.5)*a),d=l.reduce((p,v)=>p+v,0)+o*Math.max(0,r.length-1),u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,h=-d/2;return r.forEach((p,v)=>{let m=p.getPath(h,0,e.fontSize).getBoundingBox();Number.isFinite(m.y1)&&Number.isFinite(m.y2)&&(u=Math.min(u,m.y1),f=Math.max(f,m.y2)),h+=l[v]+o}),(!Number.isFinite(u)||!Number.isFinite(f))&&(u=-e.fontSize*.5,f=e.fontSize*.5),{glyphs:r,advances:l,totalWidth:d,minY:u,maxY:f,letterSpacing:o}}buildTextLayoutFromPlan(e,t,n){if(n.shouldApplyWarp){let h=this.buildWarpedTextLayout(e,t,n);if(h.length>0)return h}let r=t.letterSpacing,o=t.totalWidth||0,s=t.glyphs,a=t.advances,l=[],c=(t.minY+t.maxY)/2,d=0,u=n.curveControlY,f={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};if(s.forEach((h,p)=>{let v=a[p]??0,g=d+v/2,m=o===0?0:g/o,b=this.computeGlyphCurvePoint(m,o,u),y=h.getPath(-v/2,0,e.fontSize),_=y.getBoundingBox(),w={d:y.toPathData(3),x:b.x-o/2,y:b.y-c,angle:b.angle};this.expandCurvedLayoutBounds(f,_,w),l.push(w),d+=v+r}),l.length>0&&Number.isFinite(f.minX)&&Number.isFinite(f.minY)){let h=(f.minX+f.maxX)/2,p=(f.minY+f.maxY)/2;l.forEach(v=>{v.x-=h,v.y-=p})}return l}buildWarpedTextLayout(e,t,n){let r=n.textWarpEnvelope;if(!r||t.glyphs.length===0)return[];let o=t.letterSpacing,s=t.totalWidth||0,a=Math.max(e.fontSize*Math.max(t.glyphs.length,1),1),l=s>0?s:a,c=Math.max(t.maxY-t.minY,e.fontSize||1),d=[],u={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY},f=0;if(t.glyphs.forEach((b,y)=>{b.getPath(f,0,e.fontSize).commands.forEach(w=>{let D=this.warpPathCommand(w,t,r,l,c,n);D&&(d.push(D),this.expandWarpBounds(u,D))}),f+=(t.advances[y]??0)+o}),!d.length)return[];let h=Number.isFinite(u.minX)&&Number.isFinite(u.maxX)&&Number.isFinite(u.minY)&&Number.isFinite(u.maxY),p=h?(u.minX+u.maxX)/2:0,v=h?(u.minY+u.maxY)/2:0,g=d.map(b=>this.translateWarpCommand(b,p,v)),m=new Xn;return g.forEach(b=>this.appendWarpCommandToPath(m,b)),[{d:m.toPathData(3),x:0,y:0,angle:0}]}computeGlyphCurvePoint(e,t,n){if(!Number.isFinite(t)||t===0)return{x:0,y:0,angle:0};let r=Math.min(Math.max(e,0),1),o=t/2,s=2*(1-r)*r*o+r*r*t,a=2*(1-r)*r*n,l=2*(1-r)*o+2*r*(t-o),c=2*n*(1-2*r),d=Math.atan2(c,l||1)*(180/Math.PI);return{x:s,y:a,angle:d}}warpPathCommand(e,t,n,r,o,s){switch(e.type){case"M":if(!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let a=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"M",x:a.x,y:a.y};case"L":if(!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let l=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"L",x:l.x,y:l.y};case"C":if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||!Number.isFinite(e.x1)||!Number.isFinite(e.y1)||!Number.isFinite(e.x2)||!Number.isFinite(e.y2))return null;let c=this.warpPointForGlyph(e.x1,e.y1,t,n,r,o,s),d=this.warpPointForGlyph(e.x2,e.y2,t,n,r,o,s),u=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"C",x1:c.x,y1:c.y,x2:d.x,y2:d.y,x:u.x,y:u.y};case"Q":if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||!Number.isFinite(e.x1)||!Number.isFinite(e.y1))return null;let f=this.warpPointForGlyph(e.x1,e.y1,t,n,r,o,s),h=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"Q",x1:f.x,y1:f.y,x:h.x,y:h.y};case"Z":return{type:"Z"};default:return null}}warpPointForGlyph(e,t,n,r,o,s,a){if(!Number.isFinite(e)||!Number.isFinite(t))return{x:0,y:0};let l=o>0?e/o:.5,c=s>0?(t-n.minY)/s:.5,d=Qt.clamp(l,0,1),u=this.customizerState.sampleWarpEdge("top",d,r),f=this.customizerState.sampleWarpEdge("bottom",d,r);if(!u||!f)return{x:e,y:t};let h=Qt.clamp(c,0,1),p=u.x+(f.x-u.x)*h,v=u.y+(f.y-u.y)*h,g=r.viewBox.width||1,m=r.viewBox.height||1,b=(p-r.viewBox.minX)*o/g,y=(v-r.viewBox.minY)*s/m+n.minY;return{x:b,y}}expandWarpBounds(e,t){this.extractPointsFromWarpCommand(t).forEach(r=>{e.minX=Math.min(e.minX,r.x),e.maxX=Math.max(e.maxX,r.x),e.minY=Math.min(e.minY,r.y),e.maxY=Math.max(e.maxY,r.y)})}extractPointsFromWarpCommand(e){switch(e.type){case"M":case"L":return[{x:e.x,y:e.y}];case"C":return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2},{x:e.x,y:e.y}];case"Q":return[{x:e.x1,y:e.y1},{x:e.x,y:e.y}];default:return[]}}translateWarpCommand(e,t,n){switch(e.type){case"M":return{type:"M",x:e.x-t,y:e.y-n};case"L":return{type:"L",x:e.x-t,y:e.y-n};case"C":return{type:"C",x1:e.x1-t,y1:e.y1-n,x2:e.x2-t,y2:e.y2-n,x:e.x-t,y:e.y-n};case"Q":return{type:"Q",x1:e.x1-t,y1:e.y1-n,x:e.x-t,y:e.y-n};default:return e}}appendWarpCommandToPath(e,t){switch(t.type){case"M":e.moveTo(t.x,t.y);break;case"L":e.lineTo(t.x,t.y);break;case"C":e.curveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"Q":e.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"Z":e.closePath();break}}expandCurvedLayoutBounds(e,t,n){if(!t)return;let r=n.angle*Math.PI/180,o=Math.cos(r),s=Math.sin(r);[{x:t.x1,y:t.y1},{x:t.x1,y:t.y2},{x:t.x2,y:t.y1},{x:t.x2,y:t.y2}].forEach(l=>{let c=l.x*o-l.y*s,d=l.x*s+l.y*o,u=c+n.x,f=d+n.y;e.minX=Math.min(e.minX,u),e.maxX=Math.max(e.maxX,u),e.minY=Math.min(e.minY,f),e.maxY=Math.max(e.maxY,f)})}static \u0275fac=function(t){return new(t||i)(Ke(Dn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var g_=class i{overlayShadowFilterCache=new Map;overlayShadowFilterSerial=0;buildSvgForView(e,t,n,r){if(!e)return null;let o=e.cloneNode(!0),s=o.documentElement;if(!s)return null;let a=new Set(r?.preserveOverlayIds??[]);Array.from(s.querySelectorAll('[data-overlay="true"]')).forEach(d=>{let u=d.getAttribute("id")?.trim();u&&a.has(u)||d.parentNode?.removeChild(d)});let l=s.querySelector("#OverlayLayer");l&&!l.querySelector('[data-overlay="true"]')&&l.parentNode?.removeChild(l);let c=(n??[]).filter(d=>d&&d.trim().length>0);return c.length>0&&this.applyLayerVisibilityFilter(s,c,t),this.applyLayerClipPath(o,s,c),new XMLSerializer().serializeToString(o)}ensureDefsElement(e){if(!e)return null;let t=e.documentElement,n=t.namespaceURI||Di,r=t.querySelector("defs");return r||(r=e.createElementNS(n,"defs"),t.insertBefore(r,t.firstChild)),r}clearOverlayFilterDefs(e){Array.from(e.querySelectorAll('[data-overlay-filter="true"]')).forEach(t=>{t.parentNode?.removeChild(t)}),this.overlayShadowFilterCache=new Map,this.overlayShadowFilterSerial=0}ensureShadowFilter(e,t,n){let r=`${t.color}|${t.blur}|${t.offsetX}|${t.offsetY}`,o=this.overlayShadowFilterCache.get(r);if(o)return o;let s=e.ownerDocument||n;if(!s)return r;let a=e.namespaceURI||Di;this.overlayShadowFilterSerial+=1;let l=`overlay-shadow-${this.overlayShadowFilterSerial}`,c=s.createElementNS(a,"filter");c.setAttribute("id",l),c.setAttribute(me.DATA_OVERLAY_FILTER,"true"),c.setAttribute("color-interpolation-filters","sRGB"),c.setAttribute("x","-40%"),c.setAttribute("y","-40%"),c.setAttribute("width","180%"),c.setAttribute("height","180%");let d=s.createElementNS(a,"feDropShadow");return d.setAttribute("dx",`${t.offsetX}`),d.setAttribute("dy",`${t.offsetY}`),d.setAttribute("stdDeviation",`${Math.max(t.blur/2,0)}`),d.setAttribute("flood-color",t.color),d.setAttribute("flood-opacity","1"),c.appendChild(d),e.appendChild(c),this.overlayShadowFilterCache.set(r,l),l}appendTextOverlayAsPath(e){let{overlay:t,layout:n,center:r,overlayContainer:o,defs:s,svgDoc:a,strokeColor:l,strokeWidth:c,secondStrokeColor:d,secondStrokeWidth:u,shadowSettings:f}=e;if(!n.length)return;let h=a.documentElement?.namespaceURI||Di,p=f?this.ensureShadowFilter(s,f,a):null,g=t.fontWeight==="bold"&&t.fontSize?Math.max(t.fontSize*.06,1):0,m=a.createElementNS(h,"g");if(m.setAttribute("id",t.id),m.setAttribute("data-overlay","true"),m.setAttribute("aria-label",t.text),n.forEach(D=>{let A=[];(Math.abs(D.x)>.01||Math.abs(D.y)>.01)&&A.push(`translate(${D.x} ${D.y})`),Math.abs(D.angle)>.01&&A.push(`rotate(${D.angle})`);let P=A.length?A.join(" "):null;if(g>0){let L=a.createElementNS(h,"path");L.setAttribute("d",D.d),L.setAttribute("fill",t.fill),L.setAttribute("stroke",t.fill),L.setAttribute("stroke-width",`${g}`),L.setAttribute("paint-order","stroke fill"),L.setAttribute("stroke-linejoin","round"),L.setAttribute("stroke-linecap","round"),P&&L.setAttribute("transform",P),m.appendChild(L)}let E=a.createElementNS(h,"path");if(E.setAttribute("d",D.d),E.setAttribute("fill",t.fill),d&&u>0){let L=u+(c>0?c:0);E.setAttribute("stroke",d),E.setAttribute("stroke-width",`${L}`),E.setAttribute("paint-order","stroke fill"),E.setAttribute("stroke-linejoin","round"),E.setAttribute("stroke-linecap","round")}else E.setAttribute("stroke","none");P&&E.setAttribute("transform",P),m.appendChild(E);let I=a.createElementNS(h,"path");I.setAttribute("d",D.d),I.setAttribute("fill",t.fill),l&&c>0?(I.setAttribute("stroke",l),I.setAttribute("stroke-width",`${c}`),I.setAttribute("paint-order","stroke fill"),I.setAttribute("stroke-linejoin","round"),I.setAttribute("stroke-linecap","round")):I.setAttribute("stroke","none"),P&&I.setAttribute("transform",P),m.appendChild(I)}),!m.childNodes.length)return;let b=[`translate(${r.x} ${r.y})`],y=Number.isFinite(t.horizontalScale)?Math.max(t.horizontalScale,.1):1,_=Number.isFinite(t.verticalScale)?Math.max(t.verticalScale,.1):1;(Math.abs(y-1)>1e-4||Math.abs(_-1)>1e-4)&&b.push(`scale(${y} ${_})`),t.fontStyle==="italic"&&b.push("skewX(-12)");let w=t.angle??0;Math.abs(w)>.01&&b.push(`rotate(${w})`),m.setAttribute("transform",b.join(" ")),p&&m.setAttribute("filter",`url(#${p})`),o.appendChild(m)}serializeSvg(e,t=!0){if(!e)return null;let r=new XMLSerializer().serializeToString(e);return t?this.formatXml(r):r}downloadSvg(e,t){let n=new Blob([e],{type:Wd}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(r),100)}applyLayerClipPath(e,t,n){let r="layer-preview-clip",o=t.namespaceURI||Di,s=(n??[]).map(d=>d.trim()).filter(d=>d.length>0);if(s.length===0){t.removeAttribute("clip-path");let d=e.getElementById(r);d&&d.parentNode?.removeChild(d);return}let a=this.ensureDefsElementForClone(t);if(!a)return;let l=e.getElementById(r);if(l&&!(l instanceof SVGClipPathElement)&&(l=null),!l)l=e.createElementNS(o,"clipPath"),l.setAttribute("id",r),l.setAttribute("clipPathUnits","userSpaceOnUse"),a.appendChild(l);else for(;l.firstChild;)l.removeChild(l.firstChild);let c=!1;if(s.forEach(d=>{let u=e.getElementById(d);if(!u||!(u instanceof SVGElement))return;let f=u.cloneNode(!0);f.removeAttribute("id"),l.appendChild(f),c=!0}),!c){l?.remove(),t.removeAttribute("clip-path");return}t.setAttribute("clip-path",`url(#${r})`)}applyLayerVisibilityFilter(e,t,n){let r=new Set(t.map(a=>this.normalizeSvgId(a)).filter(a=>a.length>0));if(r.size===0)return;let o=n.flatMap(a=>a.actionPathIdsCsv).map(a=>this.normalizeSvgId(a)).filter(a=>a.length>0);if(o.length===0)return;let s=new Set(o);e.querySelectorAll("[id]").forEach(a=>{let l=this.normalizeSvgId(a.getAttribute("id"));!l||!s.has(l)||(r.has(l)?(a.removeAttribute("display"),a.removeAttribute(me.DATA_LAYER_HIDDEN)):(a.setAttribute("display","none"),a.setAttribute(me.DATA_LAYER_HIDDEN,"true")))})}ensureDefsElementForClone(e){let t=e.ownerDocument;if(!t)return null;let n=e.querySelector("defs");if(n)return n;let r=e.namespaceURI||Di,o=t.createElementNS(r,"defs");return e.insertBefore(o,e.firstChild),o}normalizeSvgId(e){return e?.trim().toLowerCase()??""}formatXml(e){let t="",n=0,r=e.replace(/>\s*</g,"><").replace(/</g,"~::~<").split("~::~");for(let o of r){let s=0;o.match(/^<\//)?n=Math.max(n-1,0):o.match(/^<.*?>$/)&&!o.match(/<.*?\/>/)&&(s=1);let a=new Array(n+1).join(" ");t+=a+o+`\r
4614
4614
  `,n+=s}return t.trim()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var v_=class i{resolveShadowSettings(e,t){let n=Number.isFinite(e.shadowBlur)?e.shadowBlur:t.blur,r=Number.isFinite(e.shadowOffsetX)?e.shadowOffsetX:t.offsetX,o=Number.isFinite(e.shadowOffsetY)?e.shadowOffsetY:t.offsetY;return Math.abs(n)<.01&&Math.abs(r)<.01&&Math.abs(o)<.01?null:{blur:n,offsetX:r,offsetY:o,color:e.shadowColor??t.color}}getShadowCanvasShift(e,t){if(!e)return{x:0,y:0};let n=t||1;return{x:e.offsetX*.5*n,y:e.offsetY*.5*n}}applyShadowToFabricGroup(e,t){let n=e.getObjects();if(!t){n.forEach(a=>{a.set("shadow",void 0),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0;return}let r=Math.max(t.blur,0),o=t.offsetX,s=t.offsetY;n.forEach(a=>{a.set("shadow",new ka({color:t.color,blur:r,offsetX:o,offsetY:s,affectStroke:!0})),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var b_=class i{stack=F([]);manualOrderingEnabled=F(!1);buildCatalog(e){let t=new Map,n=e.svgDoc?.documentElement;return e.overlays.forEach(r=>{let o=r.placementKey?e.placementNameByKey.get(r.placementKey)??r.placementKey:null;if(r.kind==="text"){let s=r.text?.trim();t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:s?`Text: ${s}`:"Text",subtitle:o??"Overlay"});return}t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:r.imageName?.trim()||"Logo",subtitle:o??"Overlay"})}),e.patternOverlays.forEach(r=>{t.set(`pattern:${r.id}`,{id:`pattern:${r.id}`,title:`Pattern: ${r.label||r.id}`,subtitle:r.placementId??"Pattern Overlay"})}),e.svgDoc&&n&&Array.from(e.svgDoc.querySelectorAll("[id]")).filter(o=>o.closest("defs")||o.parentElement!==n?!1:!!this.resolvePatternFillReference(o)).forEach(o=>{let s=o.id?.trim();if(!s)return;let a=`pattern:${s}`;if(t.has(a))return;let l=this.resolvePatternFillReference(o);t.set(a,{id:a,title:`Pattern: ${s}`,subtitle:l?`Fill ${l}`:"Pattern Fill"})}),e.backgroundTemplates.forEach(r=>{let o=e.backgroundImages[r.actionItemId];o?.src&&t.set(`background:${r.actionItemId}`,{id:`background:${r.actionItemId}`,title:`Background: ${r.name||r.actionItemId}`,subtitle:o.fileName??"Image"})}),e.renderLayers.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`;t.set(`render-layer:${s}`,{id:`render-layer:${s}`,title:`Render Layer: ${r.name||s}`,subtitle:r.actionPathIdsCsv||""})}),t}synchronizeStack(e,t,n=[]){let r=Array.from(e.keys()),o=this.stack(),s=this.manualOrderingEnabled(),a=this.resolveStackFromSvg(r,t,n);if(!s){let p=[...a],v=new Set(p);r.filter(g=>!v.has(g)).forEach(g=>this.insertRenderItemByDefaultBand(p,g)),this.areStringArraysEqual(o,p)||this.stack.set(p);return}let l=new Set(r),c=o.filter(p=>l.has(p)),d=new Set(c),u=a.filter(p=>!d.has(p)),f=[...u,...r.filter(p=>!d.has(p)&&!u.includes(p))],h=[...c];f.forEach(p=>this.insertRenderItemByDefaultBand(h,p)),this.areStringArraysEqual(o,h)||this.stack.set(h)}resolveStackFromSvg(e,t,n=[]){if(!t?.documentElement)return[];let r=t.documentElement,o=this.buildRenderLayerNodeIdMap(n,t),s=this.buildSvgPaintOrder(r);return e.map(a=>({id:a,index:this.resolveRenderItemPaintIndex(a,r,o,s)})).filter(a=>a.index>=0).sort((a,l)=>l.index-a.index).map(a=>a.id)}moveInStack(e,t){let n=[...this.stack()],r=n.findIndex(a=>a===e);if(r<0)return null;let o=Math.min(Math.max(r+t,0),n.length-1);if(o===r)return null;let[s]=n.splice(r,1);return n.splice(o,0,s),n}reorderInStack(e){if(!e.length)return null;let t=this.stack(),n=new Set(t),r=e.filter((a,l)=>n.has(a)&&e.indexOf(a)===l);if(!r.length)return null;let o=new Set(r),s=t.filter(a=>!o.has(a));return[...r,...s]}setStack(e){let t=this.stack();return this.areStringArraysEqual(t,e)?!1:(this.stack.set(e),!0)}enableManualOrdering(){this.manualOrderingEnabled.set(!0)}reset(){this.stack.set([]),this.manualOrderingEnabled.set(!1)}resolveFabricVisibleOverlayIds(e){let t=this.stack();if(!t.length)return new Set(e.map(o=>o.id));let n=t.findIndex(o=>this.parseRenderItemId(o)[0]!=="overlay");if(n<0)return new Set(e.map(o=>o.id));let r=t.slice(0,n).map(o=>this.parseRenderItemId(o)).filter(([o])=>o==="overlay").map(([,o])=>o);return new Set(r)}syncOverlayOrderFromStack(e,t){let n=t.map(c=>this.parseRenderItemId(c)).filter(([c])=>c==="overlay").map(([,c])=>c);if(!n.length)return e;let r=new Map(e.map(c=>[c.id,c])),o=[...n].reverse().map(c=>r.get(c)).filter(c=>!!c),a=[...e.filter(c=>!n.includes(c.id)),...o];return a.length!==e.length||e.every((c,d)=>a[d]?.id===c.id)?e:a}applyStackToSvg(e,t){if(!this.manualOrderingEnabled())return!1;let n=this.stack();if(!n.length)return!1;let r=this.buildRenderLayerNodeIdMap(t,e.ownerDocument),o=this.resolveStackFromSvg(n,e.ownerDocument,t),s=n.filter(l=>this.resolveNodesForRenderItem(l,e,r).length>0);return this.areStringArraysEqual(o,s)?!1:([...s].reverse().forEach(l=>{this.resolveNodesForRenderItem(l,e,r).forEach(d=>e.appendChild(d))}),!0)}resolveNodeIndex(e,t,n=[]){if(!t)return-1;let r=this.buildRenderLayerNodeIdMap(n,t),o=t.documentElement,s=this.resolveNodesForRenderItem(e,o,r);return s.length?Math.max(...s.map(a=>a.parentElement?a.parentElement===o?this.resolveSvgElementSiblingIndex(a):this.resolveSvgElementSiblingIndex(a.parentElement):-1)):-1}parseRenderItemId(e){let t=e.indexOf(":");if(t<0)return["overlay",e];let n=e.slice(0,t),r=e.slice(t+1);return n==="pattern"?["pattern",r]:n==="background"?["background",r]:n==="render-layer"?["render-layer",r]:["overlay",r]}resolvePatternFillReference(e){let t=e.getAttribute(me.DATA_PATTERN_FILL)?.trim();if(t)return t;let r=(e.getAttribute("fill")?.trim()??"").match(/^url\(#([^)]+)\)$/i);return r?.[1]?r[1]:null}insertRenderItemByDefaultBand(e,t){let[n]=this.parseRenderItemId(t);if(n==="overlay"){e.unshift(t);return}if(n==="render-layer"){e.unshift(t);return}if(n==="pattern"){let r=e.findIndex(o=>this.parseRenderItemId(o)[0]==="background");r<0?e.push(t):e.splice(r,0,t);return}e.push(t)}resolveRenderItemPaintIndex(e,t,n,r){let o=this.resolveIndexNodesForRenderItem(e,t,n);return o.length?Math.max(...o.map(s=>this.resolveElementPaintOrder(s,r))):-1}buildSvgPaintOrder(e){let t=new Map,n=0,r=o=>{o.tagName.toLowerCase()!=="defs"&&(t.set(o,n),n+=1,Array.from(o.children).forEach(s=>{r(s)}))};return r(e),t}resolveElementPaintOrder(e,t){let n=t.get(e)??-1;return e.querySelectorAll("*").forEach(o=>{let s=t.get(o)??-1;s>n&&(n=s)}),n}resolveIndexNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?[...a].map(l=>s.getElementById(l)).filter(l=>!!l):[]}buildRenderLayerNodeIdMap(e,t){let n=new Map;return e.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`,a=`render-layer:${s}`,l=this.parseCsvIds(r.actionPathIdsCsv,t);l.length&&n.set(a,l)}),n}resolveNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?Array.from(t.children).filter(l=>{let c=l.getAttribute("id")?.trim();return!!c&&a.has(c)}):[]}resolveMovableNodeForKind(e,t,n){if(e!=="background")return t;let r=t;for(;r?.parentElement&&r.parentElement!==n;)r=r.parentElement;return r}parseCsvIds(e,t){if(!e)return[];let n=e.trim();if(n.includes("[")&&t){try{let r=t.querySelectorAll(n);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id")?.trim();l&&l.length>0&&o.push(l)});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",n,r)}try{let r=n.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))t.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",n,r)}}return n.split(",").map(r=>r.trim().replace(/^#/,"")).filter((r,o,s)=>!!r&&s.indexOf(r)===o)}areStringArraysEqual(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}resolveSvgElementSiblingIndex(e){return e?.parentElement?Array.from(e.parentElement.children).indexOf(e):-1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var kne=["*"],Vi=class i{value=ye(null);multiple=ye(!1);expandedValues=F(new Set);lastSyncedInputSignature=null;constructor(){Yt(()=>{let e=this.value(),t=this.buildInputSignature(e,this.multiple());t!==this.lastSyncedInputSignature&&(this.lastSyncedInputSignature=t,this.syncFromInput(e))})}isExpanded(e){return this.expandedValues().has(this.toKey(e))}toggle(e){let t=this.toKey(e),n=new Set(this.expandedValues());if(n.has(t)){n.delete(t),this.expandedValues.set(n);return}this.multiple()||n.clear(),n.add(t),this.expandedValues.set(n)}syncFromInput(e){if(e==null)return;let t=new Set;if(Array.isArray(e))for(let n of e)t.add(this.toKey(n));else t.add(this.toKey(e));t.size&&this.expandedValues.set(t)}buildInputSignature(e,t){return Array.isArray(e)?`${t}:${e.map(n=>this.toKey(n)).join("|")}`:`${t}:${this.toKey(e)}`}toKey(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):e==null?"__null__":JSON.stringify(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion"]],inputs:{value:[1,"value"],multiple:[1,"multiple"]},ngContentSelectors:kne,decls:1,vars:0,template:function(t,n){t&1&&(Mi(),Ti(0))},encapsulation:2,changeDetection:0})};var Fne=["*"],_i=class i{value=ye(null);accordion=Z(Vi,{host:!0});expanded=Me(()=>this.accordion.isExpanded(this.value()));toggle(){this.accordion.toggle(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-panel"]],inputs:{value:[1,"value"]},ngContentSelectors:Fne,decls:2,vars:2,consts:[[1,"ui-accordion-panel"]],template:function(t,n){t&1&&(Mi(),ue(0,"section",0),Ti(1),ve()),t&2&&dt("ui-accordion-panel--expanded",n.expanded())},styles:[".ui-accordion-panel[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;margin-bottom:0;overflow:visible;box-shadow:none;transition:background-color .2s ease}.ui-accordion-panel--expanded[_ngcontent-%COMP%]{background:transparent}"],changeDetection:0})};var Nne=["*"];function Lne(i,e){i&1&&(ue(0,"div",0),Ti(1),ve())}var xr=class i{panel=Z(_i,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-content"]],ngContentSelectors:Nne,decls:1,vars:1,consts:[[1,"ui-accordion-content"]],template:function(t,n){t&1&&(Mi(),ae(0,Lne,2,0,"div",0)),t&2&&le(n.panel.expanded()?0:-1)},styles:[".ui-accordion-content[_ngcontent-%COMP%]{padding:.8rem .2rem 1rem;overscroll-behavior:contain;background:transparent}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:rgb(var(--surface-300, 203 213 225));border-radius:9999px}"],changeDetection:0})};var Une=["*"],_r=class i{panel=Z(_i,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-accordion-header"]],ngContentSelectors:Une,decls:5,vars:3,consts:[["type","button",1,"ui-accordion-header",3,"click"],[1,"ui-accordion-header__content"],[1,"ui-accordion-header__icon"],["aria-hidden","true",1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(){return n.panel.toggle()}),ue(1,"span",1),Ti(2),ve(),ue(3,"span",2),kt(4,"i",3),ve()()),t&2&&(fn("aria-expanded",n.panel.expanded()),T(3),dt("ui-accordion-header__icon--expanded",n.panel.expanded()))},styles:[".ui-accordion-header[_ngcontent-%COMP%]{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem .2rem;border:0;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;color:rgb(var(--text-color, 15 23 42));cursor:pointer;font-weight:500;transition:background-color .2s ease,color .2s ease,border-color .2s ease}.ui-accordion-header[_ngcontent-%COMP%]:hover{background:transparent}.ui-accordion-header[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:-2px}.ui-accordion-header__content[_ngcontent-%COMP%]{min-width:0;flex:1}.ui-accordion-header__icon[_ngcontent-%COMP%]{width:1.65rem;height:1.65rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));transition:transform .2s ease,background-color .2s ease,color .2s ease}.ui-accordion-header__icon--expanded[_ngcontent-%COMP%]{transform:rotate(180deg);color:rgb(var(--primary-color, 98 101 241));background:transparent}"],changeDetection:0})};function Bne(i,e){if(i&1&&kt(0,"span",3),i&2){let t=S();kr("innerHTML",t.previewMarkup(),W0)}}function zne(i,e){i&1&&(ue(0,"div",4),kt(1,"i",18),ve())}function Vne(i,e){i&1&&(ue(0,"span",5),kt(1,"span",19),ve())}function Hne(i,e){if(i&1&&kt(0,"span",14),i&2){let t=S();kr("innerHTML",t.previewMarkup(),W0)}}function Gne(i,e){i&1&&(ue(0,"div",15),kt(1,"i",20),ue(2,"span"),R(3,"No preview"),ve()())}var y_=class i{previewMarkup=ye(null);label=ye("Preview");isLoading=ye(!1);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-svg-preview"]],hostVars:1,hostBindings:function(t,n){t&2&&fn("role","button")},inputs:{previewMarkup:[1,"previewMarkup"],label:[1,"label"],isLoading:[1,"isLoading"]},decls:20,vars:6,consts:[["tabindex","0",1,"svg-preview"],[1,"svg-preview__trigger"],[1,"svg-preview__thumb"],[1,"svg-preview__content",3,"innerHTML"],[1,"svg-preview__empty"],[1,"svg-preview__loader"],[1,"svg-preview__indicator"],["role","tooltip","aria-hidden","true",1,"svg-preview__popover"],[1,"svg-preview__arrow"],[1,"svg-preview__panel"],[1,"svg-preview__popover-header"],[1,"ri-eye-line","svg-preview__popover-icon"],[1,"svg-preview__popover-label"],[1,"svg-preview__canvas"],[1,"svg-preview__canvas-content",3,"innerHTML"],[1,"svg-preview__canvas-empty"],[1,"svg-preview__popover-footer"],[1,"svg-preview__info-text"],[1,"ri-image-add-line"],[1,"svg-preview__spinner"],[1,"ri-image-off-line"]],template:function(t,n){t&1&&(ue(0,"span",0)(1,"span",1)(2,"span",2),ae(3,Bne,1,1,"span",3)(4,zne,2,0,"div",4),ve(),ae(5,Vne,2,0,"span",5),kt(6,"span",6),ve(),ue(7,"div",7),kt(8,"div",8),ue(9,"div",9)(10,"div",10),kt(11,"i",11),ue(12,"span",12),R(13),ve()(),ue(14,"div",13),ae(15,Hne,1,1,"span",14)(16,Gne,4,0,"div",15),ve(),ue(17,"div",16)(18,"span",17),R(19,"Hover or focus to see detailed preview"),ve()()()()()),t&2&&(fn("aria-label",n.label()+" color region preview")("data-loading",n.isLoading()),T(3),le(n.previewMarkup()?3:4),T(2),le(n.isLoading()?5:-1),T(8),ze(n.label()),T(2),le(n.previewMarkup()?15:16))},dependencies:[Ut],styles:['[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center}.svg-preview[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;outline:none}.svg-preview__trigger[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer}.svg-preview__thumb[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;border:1.5px solid #cbd5e1;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:inset 0 1px #fffc,0 2px 4px #0f172a14,0 1px 2px #0f172a0a;transition:all .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease;overflow:hidden}.svg-preview__content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:8px}.svg-preview__content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#cbd5e1;font-size:14px;background:linear-gradient(135deg,#f3f4f6,#e5e7eb);border-radius:8px}.svg-preview__loader[_ngcontent-%COMP%]{position:absolute;top:3px;right:3px;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.svg-preview__spinner[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:50%;border:1.5px solid #cbd5e1;border-top-color:#6265f1;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.svg-preview__indicator[_ngcontent-%COMP%]{position:absolute;bottom:-3px;right:-3px;width:6px;height:6px;border-radius:50%;background:#6265f1;box-shadow:0 0 0 1.5px #fff,0 2px 4px #6265f14d;opacity:0;transform:scale(0);transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{border-color:#94a3b8;background:linear-gradient(135deg,#fff,#f0f4f8);box-shadow:inset 0 1px #fffc,0 6px 16px #6265f129,0 2px 6px #0f172a1f;transform:translateY(-2px) scale(1.08)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__indicator[_ngcontent-%COMP%]{opacity:1;transform:scale(1)}.svg-preview[_ngcontent-%COMP%]:active .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.04)}.svg-preview__popover[_ngcontent-%COMP%]{position:absolute;left:50%;top:calc(100% + 14px);transform:translate(-50%) translateY(-8px) scale(.92);transform-origin:top center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1),visibility .2s ease;z-index:1000}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__popover[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__popover[_ngcontent-%COMP%]{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%) translateY(0) scale(1)}.svg-preview__arrow[_ngcontent-%COMP%]{position:absolute;left:50%;top:-6px;transform:translate(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ffffff;filter:drop-shadow(0 -1px 2px rgba(15,23,42,.08))}.svg-preview__panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;min-width:120px;padding:12px;border-radius:14px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 20px 40px #0f172a38,0 4px 10px #0f172a1a,inset 0 1px #fff9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.svg-preview__popover-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}.svg-preview__popover-icon[_ngcontent-%COMP%]{font-size:13px;color:#6265f1;flex-shrink:0}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#1f2937;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svg-preview__canvas[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:120px;height:120px;border-radius:12px;border:1px solid #e5e7eb;background:linear-gradient(135deg,#f9fafb,#f0f4f8);box-shadow:inset 0 1px 2px #0f172a0a;overflow:hidden;position:relative}.svg-preview__canvas[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(226,232,240,.4) 10px,rgba(226,232,240,.4) 20px);pointer-events:none;opacity:.3}.svg-preview__canvas-content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;position:relative;z-index:1}.svg-preview__canvas-content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__canvas-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#94a3b8;font-size:12px;text-align:center;position:relative;z-index:2}.svg-preview__canvas-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:20px;opacity:.6}.svg-preview__popover-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:6px;border-top:1px solid #e5e7eb}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:11px;color:#94a3b8;font-style:italic;text-align:center;letter-spacing:.2px}@media(max-width:768px){.svg-preview__thumb[_ngcontent-%COMP%]{width:30px;height:30px}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.05)}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:10px;gap:8px}.svg-preview__canvas[_ngcontent-%COMP%]{width:110px;height:110px}}@media(max-width:480px){.svg-preview__thumb[_ngcontent-%COMP%]{width:28px;height:28px}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:9px;gap:7px}.svg-preview__popover[_ngcontent-%COMP%]{top:calc(100% + 12px)}.svg-preview__canvas[_ngcontent-%COMP%]{width:100px;height:100px}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:11px}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:10px}}.svg-preview[_ngcontent-%COMP%]:focus-within{outline:2px solid #6265f1;outline-offset:2px;border-radius:10px}@media(prefers-reduced-motion:reduce){.svg-preview__thumb[_ngcontent-%COMP%], .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview__popover[_ngcontent-%COMP%], .svg-preview__spinner[_ngcontent-%COMP%]{transition:none}@keyframes spin{to{transform:rotate(0)}}}'],changeDetection:0})};var uh=class i{constructor(e){this.customizerState=e}isActiveColor(e,t){let n=this.customizerState.svgDoc();if(!n)return!1;let r=this.parseTargets(e);return r.length===0?!1:r.every(({selector:o,stopIndex:s})=>{let a=Array.from(n.querySelectorAll(o));return a.length===0?!1:a.every(l=>{if(l.tagName==="linearGradient"){let d=Array.from(l.querySelectorAll("stop"));return d.length===0?!1:this.resolveStops(d,s).every(f=>(f.getAttribute("stop-color")??f.style.stopColor??"").toLowerCase()===t.toLowerCase())}return(l.getAttribute("fill")||l.style.fill||"").toLowerCase()===t.toLowerCase()})})}applyColor(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=this.parseTargets(e),o=!1;r.forEach(({selector:s,stopIndex:a})=>{let l=Array.from(n.querySelectorAll(s));l.length!==0&&l.forEach(c=>{if(c.tagName==="linearGradient"){let d=Array.from(c.querySelectorAll("stop"));if(!d.length)return;this.resolveStops(d,a).forEach(f=>{let h=f.getAttribute("stop-opacity")??f.style.stopOpacity??null;f.removeAttribute("style"),f.setAttribute("stop-color",t),h!==null&&h!==""&&f.setAttribute("stop-opacity",h),o=!0});return}c.removeAttribute("style"),c.setAttribute("fill",t),o=!0})}),o&&this.customizerState.markSvgMutated(n)}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveStopIndex(e,t){let n=Number.isFinite(e)?e:1;return Math.min(Math.max(n,0),t-1)}resolveStops(e,t){if(t===void 0)return e;let n=this.resolveStopIndex(t,e.length);return[e[n]]}static \u0275fac=function(t){return new(t||i)(Ke(Dn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var jne=(i,e)=>e.color,t4=(i,e)=>e.actionPathIdsCsv,n4=(i,e)=>e.colorCode;function Wne(i,e){if(i&1&&U(0,"i",10),i&2){let t=S().$implicit,n=S(2);dt("swatch-check--dark",n.isLightColor(t.color))}}function $ne(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onColorSelect(null,r.color))}),x(1,"span",8),ae(2,Wne,1,2,"i",9),C()()}if(i&2){let t,n,r=e.$implicit,o=S(2);co("border-color",o.getBorderColor(r.color)),dt("swatch-btn--active",((t=o.activeColor())==null?null:t.toLowerCase())===r.color.toLowerCase()),q("appTooltip",r.label??r.color),T(),co("background-color",r.color),T(),le(((n=o.activeColor())==null?null:n.toLowerCase())===r.color.toLowerCase()?2:-1)}}function Yne(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=S(2);return V(r.toggleShowAllPalette())}),x(1,"span",12),R(2),C()()}if(i&2){let t=S(2);T(2),wt("+",t.remainingPaletteCount())}}function Xne(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=S(2);return V(r.toggleShowAllPalette())}),U(1,"i",14),R(2," Show less "),C()}}function qne(i,e){if(i&1&&(x(0,"div",1)(1,"div",3),mt(2,$ne,3,8,"button",4,jne),ae(4,Yne,3,1,"button",5),C(),ae(5,Xne,3,0,"button",6),C()),i&2){let t=S();T(2),gt(t.visiblePalette()),T(2),le(!t.showAllPalette()&&t.remainingPaletteCount()>0?4:-1),T(),le(t.shouldShowPaletteLessButton()?5:-1)}}function Kne(i,e){if(i&1&&U(0,"i",10),i&2){let t=S().$implicit,n=S(3);dt("swatch-check--dark",n.isLightColor(t.colorCode))}}function Zne(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=S().$implicit,s=S(2);return V(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),x(1,"span",8),ae(2,Kne,1,2,"i",9),C()()}if(i&2){let t=e.$implicit,n=S().$implicit,r=S(2);co("border-color",r.getBorderColor(t.colorCode)),dt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),q("appTooltip",t.name),T(),co("background-color",t.colorCode),T(),le(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function Jne(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=S().$implicit,o=S(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),x(1,"span",12),R(2),C()()}if(i&2){let t=S().$implicit,n=S(2);T(2),wt("+",n.remainingColorCount(t))}}function Qne(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=S().$implicit,o=S(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),U(1,"i",14),R(2," Show less "),C()}}function eie(i,e){if(i&1&&(x(0,"div",1)(1,"div",3),mt(2,Zne,3,8,"button",4,n4),ae(4,Jne,3,1,"button",5),C(),ae(5,Qne,3,0,"button",6),C()),i&2){let t=e.$implicit,n=S(2);T(2),gt(n.visibleColors(t)),T(2),le(n.shouldShowMoreButton(t)?4:-1),T(),le(n.shouldShowLessButton(t)?5:-1)}}function tie(i,e){if(i&1&&mt(0,eie,6,2,"div",1,t4),i&2){let t=S();gt(t.colorItems())}}function nie(i,e){if(i&1&&U(0,"app-svg-preview",20),i&2){let t=S(),n=S().$implicit;q("previewMarkup",t)("label",n.name)}}function iie(i,e){if(i&1&&ae(0,nie,1,2,"app-svg-preview",20),i&2){let t=S(3);le(t.hasVisiblePreviewContent(e)?0:-1)}}function rie(i,e){if(i&1&&U(0,"i",10),i&2){let t=S().$implicit,n=S(3);dt("swatch-check--dark",n.isLightColor(t.colorCode))}}function oie(i,e){if(i&1){let t=Ae();x(0,"button",7),W("click",function(){let r=z(t).$implicit,o=S().$implicit,s=S(2);return V(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),x(1,"span",8),ae(2,rie,1,2,"i",9),C()()}if(i&2){let t=e.$implicit,n=S().$implicit,r=S(2);co("border-color",r.getBorderColor(t.colorCode)),dt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),q("appTooltip",t.name),T(),co("background-color",t.colorCode),T(),le(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function sie(i,e){if(i&1){let t=Ae();x(0,"button",11),W("click",function(){z(t);let r=S().$implicit,o=S(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),x(1,"span",12),R(2),C()()}if(i&2){let t=S().$implicit,n=S(2);T(2),wt("+",n.remainingColorCount(t))}}function aie(i,e){if(i&1){let t=Ae();x(0,"button",13),W("click",function(){z(t);let r=S().$implicit,o=S(2);return V(o.toggleShowAllColors(r.actionPathIdsCsv))}),U(1,"i",14),R(2," Show less "),C()}}function lie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",15)(1,"app-ui-accordion-header")(2,"div",16)(3,"div",17),U(4,"i",18),x(5,"span",19),R(6),C()(),ae(7,iie,1,1),C()(),x(8,"app-ui-accordion-content")(9,"div",1)(10,"div",3),mt(11,oie,3,8,"button",4,n4),ae(13,sie,3,1,"button",5),C(),ae(14,aie,3,0,"button",6),C()()()),i&2){let t,n=e.$implicit,r=S(2);q("value",n.actionPathIdsCsv),T(6),ze(n.name),T(),le((t=r.getStepPreview(n))?7:-1,t),T(4),gt(r.visibleColors(n)),T(2),le(r.shouldShowMoreButton(n)?13:-1),T(),le(r.shouldShowLessButton(n)?14:-1)}}function cie(i,e){if(i&1&&(x(0,"app-ui-accordion",2),mt(1,lie,15,5,"app-ui-accordion-panel",15,t4),C()),i&2){let t,n=S();q("value",(t=n.colorItems()[0])==null?null:t.actionPathIdsCsv),T(),gt(n.colorItems())}}var oc=class i{constructor(e,t,n){this.colorState=e;this.customizerState=t;this.sanitizer=n}static SVG_NS="http://www.w3.org/2000/svg";static XLINK_NS="http://www.w3.org/1999/xlink";static PREVIEW_CACHE_VERSION="v1";items=ye([]);palette=ye([]);activeColor=ye(null);colorSelected=Pt();COLOR_LIMIT=15;showAllPalette=F(!1);showAllColorItems=F({});previewCache=new Map;lastPreviewSnapshotKey=null;svgSnapshotKey=Me(()=>{let e=this.customizerState.svgText();if(!e)return"empty";let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length}:${(t>>>0).toString(16)}`});usePalette=Me(()=>(this.palette()??[]).length>0);colorItems=Me(()=>this.items().filter(e=>e.type==="Color"));visiblePalette=Me(()=>{let e=this.palette();return this.showAllPalette()||e.length<=this.COLOR_LIMIT?e:e.slice(0,this.COLOR_LIMIT)});remainingPaletteCount=Me(()=>{let e=this.palette();return Math.max(0,e.length-this.COLOR_LIMIT)});visibleColors(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]||t.length<=this.COLOR_LIMIT?t:t.slice(0,this.COLOR_LIMIT)}remainingColorCount(e){let t=e.pack.dataSources;return Math.max(0,t.length-this.COLOR_LIMIT)}toggleShowAllPalette(){this.showAllPalette.update(e=>!e)}toggleShowAllColors(e){this.showAllColorItems.update(t=>he(k({},t),{[e]:!t[e]}))}shouldShowMoreButton(e){let t=e.pack.dataSources;return!this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowLessButton(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowPaletteLessButton(){return this.showAllPalette()&&this.palette().length>this.COLOR_LIMIT}getStepPreview(e){let t=this.customizerState.svgDoc(),n=e.actionPathIdsCsv?.trim()??"";if(!t||!n||!this.customizerState.isBrowser())return null;let r=this.svgSnapshotKey();this.lastPreviewSnapshotKey!==r&&(this.previewCache.clear(),this.lastPreviewSnapshotKey=r);let o=`${i.PREVIEW_CACHE_VERSION}|${r}|${n}`;if(this.previewCache.has(o))return this.previewCache.get(o)??null;let s=this.buildPreviewMarkup(t,n),a=s?this.sanitizer.bypassSecurityTrustHtml(s):null;return this.previewCache.set(o,a),a}hasVisiblePreviewContent(e){if(!e)return!1;let t=e.toString();return t?!t.includes('opacity="0"')||/opacity="[1-9]/.test(t)||/opacity="0\.[1-9]/.test(t):!1}onColorSelect(e,t){t&&(e&&this.colorState.applyColor(e,t),this.colorSelected.emit(t))}isActive(e,t){return t?this.colorState.isActiveColor(e,t):!1}getBorderColor(e){return this.isLightColor(e)?"#000000":e}isLightColor(e){if(!e)return!1;let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);return(n*299+r*587+o*114)/1e3>220}buildPreviewMarkup(e,t){let n=e.documentElement;if(!n)return null;let r=this.parseTargets(t);if(!r.length)return null;let o=n.cloneNode(!0);o.setAttribute("xmlns",i.SVG_NS),o.setAttribute("xmlns:xlink",i.XLINK_NS),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("focusable","false"),o.setAttribute("aria-hidden","true"),o.setAttribute("style","display:block;");let s=this.collectTargetGraphics(o,r);if(!s.length)return null;this.isolateTargetGraphics(o,new Set(s));let a=n.getAttribute("viewBox");return a&&o.setAttribute("viewBox",a),new XMLSerializer().serializeToString(o)}isolateTargetGraphics(e,t){let n=new Set(t);t.forEach(o=>{let s=o.parentElement;for(;s&&s!==e;)this.isGraphicsElement(s)&&n.add(s),s=s.parentElement}),Array.from(e.querySelectorAll("*")).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o)).forEach(o=>{if(n.has(o)){o.setAttribute("opacity","1"),o.removeAttribute("display"),o.removeAttribute("visibility");return}o.setAttribute("opacity","0"),o.setAttribute("pointer-events","none")})}collectTargetGraphics(e,t){let n=new Set;return t.forEach(({selector:r})=>{this.safeQueryAll(e,r).forEach(s=>{if(this.isDefElement(s)){let a=s.id;if(!a)return;this.findReferencingGraphics(e,a).forEach(l=>{n.add(l)});return}this.isGraphicsElement(s)&&n.add(s)})}),Array.from(n)}safeQueryAll(e,t){try{return Array.from(e.querySelectorAll(t))}catch{return[]}}findReferencingGraphics(e,t){let n=this.escapeForAttributeSelector(t),r=e.querySelectorAll(`[fill*="url(#${n})"],[stroke*="url(#${n})"],[filter*="url(#${n})"],[clip-path*="url(#${n})"],[mask*="url(#${n})"],[marker-start*="url(#${n})"],[marker-mid*="url(#${n})"],[marker-end*="url(#${n})"],[style*="url(#${n})"]`);return Array.from(r).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o))}isInsideDefs(e){return!!e.closest("defs")}isDefElement(e){let t=e.tagName.toLowerCase();return t==="lineargradient"||t==="radialgradient"||t==="pattern"||t==="clippath"||t==="mask"||t==="filter"||t==="marker"}isGraphicsElement(e){return typeof e.getBBox=="function"}measureBounds(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.forEach(s=>{try{let a=s.getBBox();if(!Number.isFinite(a.width)||!Number.isFinite(a.height))return;t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height)}catch{}}),!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o)?null:{minX:t,minY:n,width:Math.max(r-t,1),height:Math.max(o-n,1)}}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}escapeForAttributeSelector(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}static \u0275fac=function(t){return new(t||i)(Gt(uh),Gt(Dn),Gt(Mp))};static \u0275cmp=it({type:i,selectors:[["app-customizer-color-panel"]],inputs:{items:[1,"items"],palette:[1,"palette"],activeColor:[1,"activeColor"]},outputs:{colorSelected:"colorSelected"},decls:4,vars:1,consts:[[1,"panel-body"],[1,"color-section"],[1,"child-accordion",3,"value"],[1,"swatch-grid"],["type","button",1,"swatch-btn",3,"swatch-btn--active","border-color","appTooltip"],["type","button",1,"swatch-btn","swatch-btn--more"],["type","button",1,"swatch-show-less"],["type","button",1,"swatch-btn",3,"click","appTooltip"],[1,"swatch-dot"],[1,"ri-check-line","swatch-check",3,"swatch-check--dark"],[1,"ri-check-line","swatch-check"],["type","button",1,"swatch-btn","swatch-btn--more",3,"click"],[1,"swatch-dot","swatch-dot--more"],["type","button",1,"swatch-show-less",3,"click"],[1,"ri-arrow-up-s-line"],[3,"value"],[1,"accordion-header-content"],[1,"accordion-header-title"],[1,"ri-palette-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"previewMarkup","label"]],template:function(t,n){t&1&&(x(0,"div",0),ae(1,qne,6,2,"div",1)(2,tie,2,0)(3,cie,3,1,"app-ui-accordion",2),C()),t&2&&(T(),le(n.usePalette()?1:n.colorItems().length<=1?2:3))},dependencies:[Ut,bi,Vi,_i,_r,xr,y_],styles:["[_nghost-%COMP%]{display:block}.color-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 12px}.swatch-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.swatch-btn[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:10px;background:#fff;border:2px solid transparent;padding:3px;cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.swatch-btn[_ngcontent-%COMP%]:active{transform:scale(.96)}.swatch-btn--active[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #6265f138}.swatch-dot[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:1px solid rgba(0,0,0,.06);transition:box-shadow .16s;flex-shrink:0}.swatch-btn[_ngcontent-%COMP%]:hover .swatch-dot[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #00000014}.swatch-check[_ngcontent-%COMP%]{font-size:14px;font-weight:900;color:#fff;line-height:1}.swatch-check--dark[_ngcontent-%COMP%]{color:#111827}.swatch-btn--more[_ngcontent-%COMP%]{border:2px dashed #d1d5db;background:#f9fafb}.swatch-btn--more[_ngcontent-%COMP%]:hover{border-color:#6265f1;background:#f5f3ff}.swatch-dot--more[_ngcontent-%COMP%]{background:transparent;border:none;font-size:11px;font-weight:700;color:#6b7280;letter-spacing:-.02em}.swatch-btn--more[_ngcontent-%COMP%]:hover .swatch-dot--more[_ngcontent-%COMP%]{color:#6265f1}.swatch-show-less[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.swatch-show-less[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.swatch-show-less[_ngcontent-%COMP%]:hover{border-color:#6265f1;color:#6265f1;background:#f5f3ff}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;width:100%}.accordion-header-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;min-width:0}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.swatch-btn[_ngcontent-%COMP%]{width:36px;height:36px}.swatch-dot[_ngcontent-%COMP%]{width:24px;height:24px}}@media(max-width:480px){.color-section[_ngcontent-%COMP%]{padding:8px 10px}}"],changeDetection:0})};var ea=class i{min=ye(0);max=ye(100);step=ye(1);disabled=ye(!1);onChange=Pt();value=F(0);onModelChange=()=>{};onModelTouched=()=>{};writeValue(e){this.value.set(typeof e=="number"?e:0)}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){e!==this.disabled()&&this._runtimeDisabled.set(e)}_runtimeDisabled=F(!1);handleInput(e){let t=Number(e);Number.isFinite(t)&&(this.value.set(t),this.onModelChange(t),this.onChange.emit(t))}handleBlur(){this.onModelTouched()}isDisabled(){return this.disabled()||this._runtimeDisabled()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-slider"]],inputs:{min:[1,"min"],max:[1,"max"],step:[1,"step"],disabled:[1,"disabled"]},outputs:{onChange:"onChange"},features:[uo([{provide:fl,useExisting:Wi(()=>i),multi:!0}])],decls:2,vars:5,consts:[[1,"ui-slider-track"],["type","range",1,"ui-slider",3,"input","blur","min","max","step","value","disabled"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"input",1),Ri("input",function(o){return n.handleInput(o.target.value)})("blur",function(){return n.handleBlur()}),ve()()),t&2&&(T(),kr("min",n.min())("max",n.max())("step",n.step())("value",n.value())("disabled",n.isDisabled()))},dependencies:[Ut,fr],styles:["[_nghost-%COMP%]{display:inline-flex;width:100%}.ui-slider-track[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center}.ui-slider[_ngcontent-%COMP%]{width:100%;accent-color:rgb(var(--primary-color, 98 101 241));cursor:pointer;height:.35rem;border-radius:9999px;background:linear-gradient(90deg,rgb(var(--primary-color, 98 101 241) / .25),rgb(var(--secondary-color, 16 185 129) / .25))}"],changeDetection:0})};var i4={removePattern:"Remove pattern"},Qr={patternFill:"data-pattern-fill",originalFill:"data-original-fill",originalStyleFill:"data-original-style-fill"},Jm="__empty__";var r4={type:"custom",closable:!0,backdrop:!0,buttons:[{label:"Cancel",action:"cancel"},{label:"Confirm",action:"confirm",isPrimary:!0}]};var Mo=class i{dialogConfigs=F([]);activeDialogId=F(null);dialogCounter=0;resultCallbacks=new Map;isOpen=F(!1);currentConfig=F(null);showDialog(e){let t=e.id||`dialog-${++this.dialogCounter}`,n=he(k(k({},r4),e),{id:t});return new Promise(r=>{this.resultCallbacks.set(t,r),this.currentConfig.set(n),this.activeDialogId.set(t),this.isOpen.set(!0)})}closeDialog(e){let t=this.activeDialogId();if(!t)return;let n=this.resultCallbacks.get(t);n&&(n(e),this.resultCallbacks.delete(t)),this.isOpen.set(!1),this.currentConfig.set(null),this.activeDialogId.set(null)}confirm(){this.closeDialog({action:"confirm"})}cancel(){this.closeDialog({action:"cancel"})}handleCustomAction(e,t){this.closeDialog({action:"custom",customId:e,data:t})}getActiveConfig(){return this.currentConfig()}getIsOpen(){return this.isOpen()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var fh=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternTransformMinScale=.25;patternTransformMaxScale=6;patternTransformScaleStep=.05;patternTransformMinRotation=-180;patternTransformMaxRotation=180;patternTransformRotationStep=1;patternTransformMinTranslate=-500;patternTransformMaxTranslate=500;patternTransformTranslateStep=1;uploadedPatternOptions=F([]);selectedUploadedPatternId=F(null);selectedPatternFileUrl=F(null);patternTargetsInput=F("");patternDefinitionState=F({});patternPivotCache=F(new Map);state=Me(()=>({definition:this.patternDefinitionState(),uploadedOptions:this.uploadedPatternOptions(),selectedId:this.selectedUploadedPatternId(),selectedFileUrl:this.selectedPatternFileUrl()}));refreshFromSvg(){this.rebuildPatternOptionsFromSvgDoc()}isPatternSelected(e){return e?this.selectedPatternFileUrl()===e:!1}async applyPatternFromUrl(e,t,n=!1){let r=this.customizerState.svgDoc();if(!r){n||this.showErrorDialog($l.garmentSvgRequired,Ys.garmentSvgRequired);return}if(!e){n||this.showErrorDialog($l.patternSvgUrlRequired,Ys.patternSvgUrlRequired);return}let o=this.parsePatternTargetIds(t);if(!o||o.length===0){n||this.showErrorDialog($l.targetIdRequired,Ys.targetIdRequired);return}try{let s=await fetch(e,{cache:"no-cache"});if(!s.ok)throw new Error(`Failed to load SVG (${s.status})`);let a=await s.text();if(!a||!a.includes(Xx)){this.showErrorDialog($l.invalidSvgContent,Ys.invalidSvgContent);return}let l=this.ingestPatternSvgAndReturnIds(a);if(l.length===0){this.showErrorDialog($l.noPatternDefinitionsImported,Ys.noPatternDefinitionsImported);return}let c=l[0];this.selectedUploadedPatternId.set(c),this.selectedPatternFileUrl.set(e);let d=`url(#${c})`,u=[],f=!1;if(o.forEach(h=>{let p=r.getElementById(h);if(!p){u.push(h);return}if(!p.hasAttribute(Qr.originalFill)){let v=p.getAttribute("fill");p.setAttribute(Qr.originalFill,v&&v.trim().length>0?v:Jm)}if(!p.hasAttribute(Qr.originalStyleFill)){let v=this.readStyleProperty(p,"fill");p.setAttribute(Qr.originalStyleFill,v&&v.trim().length>0?v:Jm)}this.stripStyleProperty(p,"fill"),p.setAttribute("fill",d),p.setAttribute(Qr.patternFill,c),f=!0}),!f){n||this.showErrorDialog($l.noMatchingTargetIds,Ys.noMatchingTargetIds);return}u.length>0&&console.warn(Ys.skippedMissingTargetIds,u.join(", ")),this.customizerState.markSvgMutated(r)}catch(s){console.error(Ys.applyPatternFromUrlFailed,s),n||this.showErrorDialog($l.failedApplyPattern,Ys.failedApplyPattern)}}removePatternFromTargets(e){let t=this.customizerState.svgDoc();if(!t)return;let n=this.parsePatternTargetIds(e);if(n.length===0)return;let r=!1;if(n.forEach(s=>{let a=t.getElementById(s);if(!a)return;let l=a.getAttribute(Qr.originalFill),c=a.getAttribute(Qr.originalStyleFill);l&&l!==Jm?a.setAttribute("fill",l):a.removeAttribute("fill"),c&&c!==Jm?this.setStyleProperty(a,"fill",c):this.stripStyleProperty(a,"fill"),a.removeAttribute(Qr.patternFill),a.removeAttribute(Qr.originalFill),a.removeAttribute(Qr.originalStyleFill),r=!0}),!r)return;let o=this.selectedUploadedPatternId();o&&!this.isPatternDefinitionApplied(t,o)&&(this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null)),this.customizerState.markSvgMutated(t)}hasPatternAppliedToTargets(e){let t=this.customizerState.svgDoc();if(!t)return!1;let n=this.parsePatternTargetIds(e);return n.length===0?!1:n.some(r=>{let o=t.getElementById(r);if(!o)return!1;let s=o.getAttribute(me.DATA_PATTERN_FILL);if(s&&s.trim().length>0)return!0;let a=o.getAttribute("fill")??"";return/^url\(#.+\)$/.test(a.trim())})}onPatternDefinitionScaleChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{scale:n})}onPatternDefinitionRotationChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{rotation:n})}onPatternDefinitionTranslateXChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateX:n})}onPatternDefinitionTranslateYChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateY:n})}onPatternDefinitionOpacityChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{opacity:n})}updatePatternTargetsInput(e){this.patternTargetsInput.set(e)}setSelectedUploadedPattern(e){this.selectedUploadedPatternId.set(e)}setSelectedPatternFileUrl(e){let t=e?.trim();this.selectedPatternFileUrl.set(t&&t.length>0?t:null)}updatePatternDefinitionState(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=n.getElementById(e);if(!(r instanceof SVGPatternElement))return;let o=this.patternDefinitionState()[e]??k({},Xs),s={scale:t.scale!==void 0?this.normalizePatternDefinitionScale(t.scale):o.scale,rotation:t.rotation!==void 0?this.normalizePatternDefinitionRotation(t.rotation):o.rotation,translateX:t.translateX!==void 0?this.normalizePatternDefinitionTranslate(t.translateX):o.translateX,translateY:t.translateY!==void 0?this.normalizePatternDefinitionTranslate(t.translateY):o.translateY,opacity:t.opacity!==void 0?this.normalizePatternDefinitionOpacity(t.opacity):o.opacity};this.patternDefinitionState.set(he(k({},this.patternDefinitionState()),{[e]:s})),this.applyPatternDefinitionAttributes(r,s),this.customizerState.markSvgMutated(n)}rebuildPatternOptionsFromSvgDoc(){let e=this.customizerState.svgDoc();if(!e){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternDefinitionState.set({});return}let t=Array.from(e.querySelectorAll("pattern[id]")),n={},r=Array.from(new Set(t.map(o=>o.getAttribute("id")).filter(o=>!!o&&o.trim().length>0).map(o=>o.trim())));r.forEach(o=>{let s=e.getElementById(o);if(!s)return;let a=this.readPatternDefinitionState(s);n[o]=a,this.applyPatternDefinitionAttributes(s,a)}),this.patternDefinitionState.set(n),this.uploadedPatternOptions.set(r.map(o=>({id:o,label:o}))),(!this.selectedUploadedPatternId()||!r.includes(this.selectedUploadedPatternId()))&&(this.selectedUploadedPatternId.set(r[0]??null),r.length===0&&this.selectedPatternFileUrl.set(null))}ingestPatternSvgAndReturnIds(e){let t=this.customizerState.svgDoc();if(!t)return[];let r=new DOMParser().parseFromString(e,ss);if(r.querySelector(Yd))return[];let o=Array.from(r.querySelectorAll("pattern[id]"));if(o.length===0)return[];let s=this.ensureDefsElement(),a=[];return o.forEach(l=>{let c=l.getAttribute("id")?.trim();if(!c)return;let d=t.importNode(l,!0),u=t.getElementById(c);if(u instanceof SVGPatternElement)u.parentNode?.replaceChild(d,u);else if(!u)s.appendChild(d);else return;a.push(c)}),this.rebuildPatternOptionsFromSvgDoc(),a}parsePatternTargetIds(e){if(!e||e.trim().length===0)return[];let t=e.trim(),n=this.customizerState.svgDoc();if(!n)return[];if(t.includes("[")){try{let r=n.querySelectorAll(t);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id");l&&l.trim().length>0&&o.push(l.trim())});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",t,r)}try{let r=t.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))n.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",t,r)}}return t.split(",").map(r=>r.trim()).filter(r=>r.length>0).map(r=>r.startsWith("#")?r.slice(1):r)}isPatternDefinitionApplied(e,t){let n=e.querySelectorAll(`[${Qr.patternFill}]`);return Array.from(n).some(r=>r.getAttribute(Qr.patternFill)?.trim()===t)}ensureDefsElement(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Di,r=t.querySelector("defs");return r||(r=e.createElementNS(n,"defs"),t.insertBefore(r,t.firstChild)),r}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}normalizePatternDefinitionScale(e){if(!Number.isFinite(e))return Xs.scale;let t=Math.min(this.patternTransformMaxScale,Math.max(this.patternTransformMinScale,e));return Math.round(t*1e3)/1e3}normalizePatternDefinitionRotation(e){if(!Number.isFinite(e))return Xs.rotation;let t=Math.min(this.patternTransformMaxRotation,Math.max(this.patternTransformMinRotation,e));return Math.round(t*10)/10}normalizePatternDefinitionTranslate(e){if(!Number.isFinite(e))return Xs.translateX;let t=Math.min(this.patternTransformMaxTranslate,Math.max(this.patternTransformMinTranslate,e));return Math.round(t*10)/10}normalizePatternDefinitionOpacity(e){return this.clampPatternOpacity(e)}readPatternDefinitionState(e){let t=(p,v)=>{let g=p!==null?Number.parseFloat(p):NaN;return Number.isFinite(g)?g:v},n=t(e.getAttribute(me.DATA_PATTERN_SCALE),Xs.scale),r=t(e.getAttribute(me.DATA_PATTERN_ROTATION),Xs.rotation),o=t(e.getAttribute(me.DATA_PATTERN_TRANSLATE_X),Xs.translateX),s=t(e.getAttribute(me.DATA_PATTERN_TRANSLATE_Y),Xs.translateY),a=n,l=r,c=o,d=s,u=e.getAttribute("patternTransform");if(u){let p=u.match(/translate\(([^)]+)\)/i);if(p){let m=p[1].split(/[\s,]+/).map(b=>Number.parseFloat(b)).filter(b=>Number.isFinite(b));m.length>=1&&(c=m[0],d=m.length>=2?m[1]:m[0])}let v=u.match(/rotate\(([^)]+)\)/i);if(v){let m=Number.parseFloat(v[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(l=m)}let g=u.match(/scale\(([^)]+)\)/i);if(g){let m=Number.parseFloat(g[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(a=m)}}let f=e.getAttribute(me.DATA_PATTERN_OPACITY)??e.getAttribute("opacity"),h=this.normalizePatternDefinitionOpacity(f!==null?Number.parseFloat(f):Xs.opacity);return{scale:this.normalizePatternDefinitionScale(a),rotation:this.normalizePatternDefinitionRotation(l),translateX:this.normalizePatternDefinitionTranslate(c),translateY:this.normalizePatternDefinitionTranslate(d),opacity:h}}composePatternDefinitionTransform(e,t){let n=this.computePatternPivot(e),r=this.composeCenteredTransformMatrix({scale:t.scale,rotation:t.rotation,translateX:t.translateX,translateY:t.translateY},n);return this.matrixToTransform(r)}computePatternPivot(e){let t=e.id??"";if(t&&this.patternPivotCache().has(t))return this.patternPivotCache().get(t);let n=null,r=e.getAttribute("viewBox");if(r){let o=r.split(/[\s,]+/).map(s=>Number.parseFloat(s)).filter(s=>Number.isFinite(s));if(o.length===4){let[s,a,l,c]=o;n={cx:s+l/2,cy:a+c/2}}}if(!n){let o=this.parseNumericAttribute(e.getAttribute("width"),1),s=this.parseNumericAttribute(e.getAttribute("height"),1),a=this.parseNumericAttribute(e.getAttribute("x"),0),l=this.parseNumericAttribute(e.getAttribute("y"),0);n={cx:a+o/2,cy:l+s/2}}return t&&this.patternPivotCache.update(o=>{let s=new Map(o);return s.set(t,n),s}),n}parseNumericAttribute(e,t){if(!e)return t;let n=Number.parseFloat(e);return Number.isFinite(n)?n:t}applyPatternOpacity(e,t){let n=this.normalizePatternDefinitionOpacity(t);this.resolvePatternReferenceChain(e).forEach(o=>{o.querySelectorAll("path, rect, circle, ellipse, polygon, polyline, image, g").forEach(a=>{if(this.stripStyleProperty(a,"opacity"),Math.abs(n-1)<1e-4){a.removeAttribute("opacity");return}a.setAttribute("opacity",n.toString())})})}resolvePatternReferenceChain(e){let t=this.customizerState.svgDoc();if(!t)return[e];let n=[],r=new Set,o=e;for(;o;){let s=o.id?.trim()||`__inline-${n.length}`;if(r.has(s))break;r.add(s),n.push(o);let a=this.extractPatternRefId(o);if(!a)break;let l=t.getElementById(a);o=l instanceof SVGPatternElement?l:null}return n}extractPatternRefId(e){let t=e.getAttribute("href")??e.getAttributeNS("http://www.w3.org/1999/xlink","href")??e.getAttribute("xlink:href");if(!t)return null;let n=t.trim();if(!n)return null;let r=n.indexOf("#");if(r===-1)return null;let o=n.slice(r+1).trim();return o.length>0?o:null}applyPatternDefinitionAttributes(e,t){let n={scale:this.normalizePatternDefinitionScale(t.scale),rotation:this.normalizePatternDefinitionRotation(t.rotation),translateX:this.normalizePatternDefinitionTranslate(t.translateX),translateY:this.normalizePatternDefinitionTranslate(t.translateY),opacity:this.normalizePatternDefinitionOpacity(t.opacity)};e.setAttribute(me.DATA_PATTERN_SCALE,n.scale.toString()),e.setAttribute(me.DATA_PATTERN_ROTATION,n.rotation.toString()),e.setAttribute(me.DATA_PATTERN_TRANSLATE_X,n.translateX.toString()),e.setAttribute(me.DATA_PATTERN_TRANSLATE_Y,n.translateY.toString()),e.setAttribute(me.DATA_PATTERN_OPACITY,n.opacity.toString()),e.removeAttribute("opacity");let r=this.composePatternDefinitionTransform(e,n);r?e.setAttribute("patternTransform",r):e.removeAttribute("patternTransform"),this.applyPatternOpacity(e,n.opacity)}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}readStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return null;let r=t.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.slice(o.indexOf(":")+1).trim();return s.length>0?s:null}setStyleProperty(e,t,n){let r=e.getAttribute("style"),o=t.toLowerCase(),s=(r??"").split(";").map(a=>a.trim()).filter(a=>a.length>0).filter(a=>!a.toLowerCase().startsWith(`${o}:`));s.push(`${t}: ${n}`),e.setAttribute("style",s.join("; "))}composeCenteredTransformMatrix(e,t){let n=this.identityMatrix();return e.scale!==void 0&&!this.isNearlyZero(e.scale-1)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.scaleMatrix(e.scale,e.scale)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),e.rotation!==void 0&&!this.isNearlyZero(e.rotation)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.rotateMatrix(e.rotation)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),(e.translateX!==void 0&&!this.isNearlyZero(e.translateX)||e.translateY!==void 0&&!this.isNearlyZero(e.translateY))&&(n=this.multiplyMatrices(n,this.translateMatrix(e.translateX??0,e.translateY??0))),n}matrixToTransform(e){if(this.isNearlyZero(e.a-1)&&this.isNearlyZero(e.b)&&this.isNearlyZero(e.c)&&this.isNearlyZero(e.d-1)&&this.isNearlyZero(e.e)&&this.isNearlyZero(e.f))return null;let n=this.roundMatrixValue(e.a),r=this.roundMatrixValue(e.b),o=this.roundMatrixValue(e.c),s=this.roundMatrixValue(e.d),a=this.roundMatrixValue(e.e),l=this.roundMatrixValue(e.f);return`matrix(${n} ${r} ${o} ${s} ${a} ${l})`}isNearlyZero(e,t=1e-4){return Math.abs(e)<=t}roundMatrixValue(e,t=6){if(this.isNearlyZero(e))return 0;let n=Math.pow(10,t);return Math.round(e*n)/n}identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}multiplyMatrices(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}translateMatrix(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}scaleMatrix(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}rotateMatrix(e){let t=e*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return{a:n,b:r,c:-r,d:n,e:0,f:0}}reset(){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternTargetsInput.set(""),this.patternDefinitionState.set({})}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Ke(Dn),Ke(Mo))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function uie(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"button",12),W("click",function(){z(t);let r=S(2).$implicit,o=S(2);return V(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),U(2,"i",13),x(3,"span"),R(4),C()()()}if(i&2){let t=S(4);T(4),ze(t.labels.removePattern)}}function fie(i,e){i&1&&(x(0,"div",18),U(1,"i",19),C())}function hie(i,e){if(i&1){let t=Ae();x(0,"div",14),W("click",function(){let r=z(t).$implicit,o=S(2).$implicit,s=S(2);return V(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),U(1,"img",15),x(2,"div",16)(3,"span",17),R(4),C()(),ae(5,fie,2,0,"div",18),C()}if(i&2){let t=e.$implicit,n=S(4);dt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name),T(),le(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function pie(i,e){if(i&1){let t=Ae();x(0,"div",22)(1,"p",23),U(2,"i",24),R(3," Adjust the transform for the selected pattern. Changes affect every garment area using this pattern. "),C(),x(4,"div",25)(5,"span",26),U(6,"i",27),R(7," Scale "),C(),x(8,"div",28)(9,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=S(),s=S(5);return V(s.patternState.onPatternDefinitionScaleChange(o,r))}),C(),x(10,"span",30),R(11),ki(12,"number"),C()()(),x(13,"div",25)(14,"span",26),U(15,"i",31),R(16," Rotation "),C(),x(17,"div",28)(18,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=S(),s=S(5);return V(s.patternState.onPatternDefinitionRotationChange(o,r))}),C(),x(19,"span",30),R(20),ki(21,"number"),C()()(),x(22,"div",25)(23,"span",26),U(24,"i",32),R(25," Offset X "),C(),x(26,"div",28)(27,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=S(),s=S(5);return V(s.patternState.onPatternDefinitionTranslateXChange(o,r))}),C(),x(28,"span",30),R(29),ki(30,"number"),C()()(),x(31,"div",25)(32,"span",26),U(33,"i",33),R(34," Offset Y "),C(),x(35,"div",28)(36,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=S(),s=S(5);return V(s.patternState.onPatternDefinitionTranslateYChange(o,r))}),C(),x(37,"span",30),R(38),ki(39,"number"),C()()(),x(40,"div",25)(41,"span",26),U(42,"i",34),R(43," Opacity "),C(),x(44,"div",28)(45,"app-ui-slider",29),W("ngModelChange",function(r){z(t);let o=S(),s=S(5);return V(s.patternState.onPatternDefinitionOpacityChange(o,r))}),C(),x(46,"span",30),R(47),ki(48,"number"),C()()()()}if(i&2){let t=e,n=S(6);T(9),q("min",n.patternState.patternTransformMinScale)("max",n.patternState.patternTransformMaxScale)("step",n.patternState.patternTransformScaleStep)("ngModel",t.scale),T(2),wt("",qi(12,25,t.scale,"1.2-2"),"\xD7"),T(7),q("min",n.patternState.patternTransformMinRotation)("max",n.patternState.patternTransformMaxRotation)("step",n.patternState.patternTransformRotationStep)("ngModel",t.rotation),T(2),wt("",qi(21,28,t.rotation,"1.0-1"),"\xB0"),T(7),q("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateX),T(2),wt("",qi(30,31,t.translateX,"1.0-1"),"px"),T(7),q("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateY),T(2),wt("",qi(39,34,t.translateY,"1.0-1"),"px"),T(7),q("min",n.patternState.minPatternOpacity)("max",n.patternState.maxPatternOpacity)("step",n.patternState.patternOpacityStep)("ngModel",t.opacity),T(2),ze(qi(48,37,t.opacity,"1.2-2"))}}function mie(i,e){if(i&1&&ae(0,pie,49,40,"div",22),i&2){let t,n=S(5);le((t=n.patternState.patternDefinitionState()[e])?0:-1,t)}}function gie(i,e){i&1&&(x(0,"div",21),U(1,"i",35),x(2,"p",36),R(3,"No pattern selected"),C(),x(4,"p",37),R(5," Apply a pattern first, then adjust its scale, rotation, move, or opacity here. "),C()())}function vie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),U(3,"i",20),x(4,"span",7),R(5,"Transformation"),C()()(),x(6,"app-ui-accordion-content"),ae(7,mie,1,1)(8,gie,6,0,"div",21),C()()),i&2){let t,n=S(2).$implicit,r=S(2);q("value",n.id+"-transform"),T(7),le((t=r.patternState.selectedUploadedPatternId())?7:8,t)}}function bie(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),U(3,"i",6),x(4,"span",7),R(5),C()()(),x(6,"app-ui-accordion-content")(7,"div",8),ae(8,uie,5,1,"div",9),x(9,"div",10),mt(10,hie,6,6,"div",11,sl().trackByFileUrl,!0),C()()()(),ae(12,vie,9,2,"app-ui-accordion-panel",4)),i&2){let t=S().$implicit,n=S(2);q("value",t.id),T(5),ze(t.name),T(3),le(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?8:-1),T(2),gt(t.pack.dataSources),T(2),le(t.isTransformationRequired?12:-1)}}function yie(i,e){if(i&1&&ae(0,bie,13,4),i&2){let t=e.$implicit;le(t.type==="Pattern"?0:-1)}}function xie(i,e){if(i&1&&(x(0,"app-ui-accordion",2),mt(1,yie,1,1,null,null,al),C()),i&2){let t=S();q("value",t.firstPatternPanel()),T(),gt(t.items())}}function _ie(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"button",12),W("click",function(){z(t);let r=S(2).$implicit,o=S(2);return V(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),U(2,"i",13),x(3,"span"),R(4),C()()()}if(i&2){let t=S(4);T(4),ze(t.labels.removePattern)}}function Sie(i,e){i&1&&(x(0,"div",18),U(1,"i",19),C())}function Cie(i,e){if(i&1){let t=Ae();x(0,"div",14),W("click",function(){let r=z(t).$implicit,o=S(2).$implicit,s=S(2);return V(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),U(1,"img",15),x(2,"div",16)(3,"span",17),R(4),C()(),ae(5,Sie,2,0,"div",18),C()}if(i&2){let t=e.$implicit,n=S(4);dt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name),T(),le(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function wie(i,e){if(i&1&&(x(0,"div",38)(1,"div",39),U(2,"i",40),x(3,"span"),R(4),C()(),x(5,"div",8),ae(6,_ie,5,1,"div",9),x(7,"div",10),mt(8,Cie,6,6,"div",11,sl().trackByFileUrl,!0),C()()()),i&2){let t=S().$implicit,n=S(2);T(4),ze(t.name),T(2),le(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?6:-1),T(2),gt(t.pack.dataSources)}}function Eie(i,e){if(i&1&&ae(0,wie,10,2,"div",38),i&2){let t=e.$implicit;le(t.type==="Pattern"?0:-1)}}function Mie(i,e){if(i&1&&(x(0,"div",3),mt(1,Eie,1,1,null,null,al),C()),i&2){let t=S();T(),gt(t.items())}}var x_=class i{constructor(e){this.patternState=e}items=ye.required();labels=i4;useAccordion=Me(()=>{let e=this.items()??[];if(e.length===0)return!1;let t=e.some(n=>n.type==="Pattern"&&n.isTransformationRequired);return e.length>1||t});firstPatternPanel=()=>{let e=(this.items()??[]).find(t=>t.type==="Pattern"||t.type==="Overlay");return e?e.id??e.actionPathIdsCsv??null:null};trackByFileUrl(e,t){return t.fileUrl??e}static \u0275fac=function(t){return new(t||i)(Gt(fh))};static \u0275cmp=it({type:i,selectors:[["app-customizer-pattern-panel"]],inputs:{items:[1,"items"]},decls:4,vars:1,consts:[[1,"panel-body"],[1,"pattern-panel"],[1,"w-full",3,"value"],[1,"placement-list"],[3,"value"],[1,"accordion-header-content"],[1,"ri-image-line","accordion-header-icon"],[1,"accordion-header-label"],[1,"pattern-picker-section"],[1,"pattern-picker-toolbar"],[1,"pattern-pick-grid"],[1,"pattern-pick-card",3,"pattern-pick-card--selected"],["type","button",1,"pattern-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"pattern-pick-card",3,"click"],[1,"pattern-pick-card__img",3,"src","alt"],[1,"pattern-pick-card__hover"],[1,"pattern-pick-card__name"],[1,"pattern-pick-card__check"],[1,"ri-check-line"],[1,"ri-settings-3-line","accordion-header-icon"],[1,"transform-empty"],[1,"transform-section"],[1,"transform-hint"],[1,"ri-information-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-refresh-line","prop-icon"],[1,"ri-draggable","prop-icon"],[1,"ri-draggable","prop-icon",2,"transform","rotate(90deg)"],[1,"ri-contrast-line","prop-icon"],[1,"ri-image-edit-line","transform-empty__icon"],[1,"transform-empty__title"],[1,"transform-empty__hint"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-image-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1),ae(2,xie,3,1,"app-ui-accordion",2)(3,Mie,3,0,"div",3),C()()),t&2&&(T(2),le(n.useAccordion()?2:3))},dependencies:[Ut,fr,Is,zo,Vi,_i,_r,xr,ea,Wc],styles:['.panel-body[_ngcontent-%COMP%], .pattern-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.pattern-picker-section[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:10px}.pattern-picker-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.pattern-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;transition:background .15s,box-shadow .15s,transform .15s}.pattern-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.pattern-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.pattern-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.pattern-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pattern-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.pattern-pick-card[_ngcontent-%COMP%]:hover{border-color:#6265f1;transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px #6265f12e}.pattern-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.pattern-pick-card--selected[_ngcontent-%COMP%]{border-color:#6265f1;box-shadow:0 0 0 3px #6265f138}.pattern-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.pattern-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.pattern-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.pattern-pick-card__check[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#6265f12e}.pattern-pick-card__check[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#6265f1;color:#fff;font-size:16px;font-weight:700;box-shadow:0 2px 8px #6265f166}.transform-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:10px 12px}.transform-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:5px;font-size:11px;color:#64748b;line-height:1.5;margin:0;font-weight:500}.transform-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:#d1d5db;flex-shrink:0;margin-top:1px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:76px;font-size:11px;font-weight:500;color:#6b7280}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:#9ca3af}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.transform-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 16px;margin:10px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.transform-empty__icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db}.transform-empty__title[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:700;color:#374151}.transform-empty__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.55}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid #6265f1}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.grid[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.prop-label[_ngcontent-%COMP%]{width:62px}.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%], .pattern-picker-section[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var Tie=["*"];function Die(i,e){if(i&1&&kt(0,"i"),i&2){let t=S();ur(t.icon())}}function Aie(i,e){if(i&1&&(ue(0,"span"),R(1),ve()),i&2){let t=S();T(),ze(t.label())}}var ta=class i{label=ye("");text=ye(!1);rounded=ye(!1);disabled=ye(!1);severity=ye("primary");icon=ye("");type=ye("button");onClick=Pt();classes=Me(()=>{let e=["ui-btn"];this.text()?e.push("ui-btn--text"):e.push("ui-btn--filled"),this.rounded()&&e.push("ui-btn--rounded");let t=this.severity();return t==="secondary"?e.push("ui-btn--secondary"):t==="danger"?e.push("ui-btn--danger"):t==="success"?e.push("ui-btn--success"):e.push("ui-btn--primary"),e.join(" ")});emitClick(e){if(this.disabled()){e.preventDefault(),e.stopPropagation();return}this.onClick.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-button"]],inputs:{label:[1,"label"],text:[1,"text"],rounded:[1,"rounded"],disabled:[1,"disabled"],severity:[1,"severity"],icon:[1,"icon"],type:[1,"type"]},outputs:{onClick:"onClick"},ngContentSelectors:Tie,decls:4,vars:6,consts:[[3,"click","type","disabled"],[3,"class"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(o){return n.emitClick(o)}),ae(1,Die,1,2,"i",1),ae(2,Aie,2,1,"span"),Ti(3),ve()),t&2&&(ur(n.classes()),kr("type",n.type())("disabled",n.disabled()),T(),le(n.icon()?1:-1),T(),le(n.label()?2:-1))},dependencies:[Ut],styles:["[_nghost-%COMP%]{display:inline-flex}.ui-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:.65rem;border:1px solid transparent;font-size:.8125rem;font-weight:600;line-height:1;padding:.5rem .8rem;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .12s ease,box-shadow .2s ease}.ui-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.ui-btn--rounded[_ngcontent-%COMP%]{border-radius:9999px;width:2rem;height:2rem;padding:0}.ui-btn--filled.ui-btn--primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 6px 14px rgb(var(--primary-color, 98 101 241) / .25)}.ui-btn--filled.ui-btn--secondary[_ngcontent-%COMP%]{background:rgb(var(--secondary-color, 16 185 129));color:#fff;box-shadow:0 6px 14px rgb(var(--secondary-color, 16 185 129) / .22)}.ui-btn--filled.ui-btn--danger[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.ui-btn--filled.ui-btn--success[_ngcontent-%COMP%]{background:rgb(var(--accent-color, 245 158 11));color:#fff;box-shadow:0 6px 14px rgb(var(--accent-color, 245 158 11) / .22)}.ui-btn--text[_ngcontent-%COMP%]{background:transparent;border-color:transparent}.ui-btn--text.ui-btn--primary[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.ui-btn--text.ui-btn--secondary[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139))}.ui-btn--text.ui-btn--danger[_ngcontent-%COMP%]{color:#ef4444}.ui-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:1px}"],changeDetection:0})};function Iie(i,e){if(i&1&&(ue(0,"span",3),R(1),ve()),i&2){let t=S();T(),ze(t.secondaryLabel())}}var hh=class i{mode=ye("basic");chooseLabel=ye("Choose");secondaryLabel=ye(null);accept=ye("");customUpload=ye(!1);disabled=ye(!1);onSelect=Pt();inputId=`ui-upload-${Math.random().toString(36).slice(2)}`;isDraggingOver=!1;onDragOver(e){this.disabled()||(e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),this.isDraggingOver=!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1}onDrop(e){if(e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.disabled())return;let t=e.dataTransfer?.files?Array.from(e.dataTransfer.files):[];if(!t.length)return;let n=this.accept(),r=n?t.filter(o=>this._matchesAccept(o,n)):t;r.length&&this.onSelect.emit({files:r,originalEvent:e})}_matchesAccept(e,t){return t.split(",").some(n=>{let r=n.trim();return r.startsWith(".")?e.name.toLowerCase().endsWith(r.toLowerCase()):r.endsWith("/*")?e.type.startsWith(r.slice(0,-1)):e.type===r})}handleSelection(e){let t=e.target,n=t?.files?Array.from(t.files):[];n.length&&(this.onSelect.emit({files:n,originalEvent:e}),t&&(t.value=""))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-fileupload"]],inputs:{mode:[1,"mode"],chooseLabel:[1,"chooseLabel"],secondaryLabel:[1,"secondaryLabel"],accept:[1,"accept"],customUpload:[1,"customUpload"],disabled:[1,"disabled"]},outputs:{onSelect:"onSelect"},decls:6,vars:10,consts:[[1,"bg-upload-zone",3,"dragover","dragleave","drop"],[1,"ri-upload-cloud-2-line","bg-upload-icon"],[1,"bg-upload-text"],[1,"bg-upload-hint"],["type","file",1,"sr-only",3,"change","id","accept","disabled"]],template:function(t,n){t&1&&(ue(0,"label",0),Ri("dragover",function(o){return n.onDragOver(o)})("dragleave",function(o){return n.onDragLeave(o)})("drop",function(o){return n.onDrop(o)}),kt(1,"i",1),ue(2,"span",2),R(3),ve(),ae(4,Iie,2,1,"span",3),ue(5,"input",4),Ri("change",function(o){return n.handleSelection(o)}),ve()()),t&2&&(dt("ui-fileupload--disabled",n.disabled())("drag-over",n.isDraggingOver),fn("for",n.inputId),T(3),wt(" ",n.isDraggingOver?"Drop files here":n.chooseLabel()," "),T(),le(n.secondaryLabel()&&!n.isDraggingOver?4:-1),T(),kr("id",n.inputId)("accept",n.accept())("disabled",n.disabled()))},dependencies:[Ut],styles:["[_nghost-%COMP%]{display:inline-flex}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1px dashed rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color-secondary, 71 85 105));border-radius:10px;cursor:pointer;text-align:center;transition:border-color .18s,background .18s,transform .18s,box-shadow .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--secondary-color, 16 185 129));color:rgb(var(--secondary-color, 16 185 129));background:rgb(var(--secondary-color, 16 185 129) / .08)}.bg-upload-zone.drag-over[_ngcontent-%COMP%]{border-color:rgb(var(--secondary-color, 16 185 129));border-style:dashed;border-width:2px;background:rgb(var(--secondary-color, 16 185 129) / .12);color:rgb(var(--secondary-color, 16 185 129));transform:scale(1.015);box-shadow:0 0 0 3px rgb(var(--secondary-color, 16 185 129) / .18)}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:rgb(var(--text-color-secondary, 71 85 105));transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--secondary-color, 16 185 129))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.ui-fileupload--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.55}"]})};function Pie(i,e){if(i&1&&(x(0,"p",5),R(1),C()),i&2){let t=S(2);T(),ze(t.message())}}function Oie(i,e){if(i&1&&(x(0,"div",1)(1,"div",2),U(2,"div",3),Bo(3,Pie,2,1,"p",4),C()()),i&2){let t=S();fn("aria-busy",!0),T(3),q("ngIf",t.message())}}var ph=class i{show=ye(!1);message=ye(null);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-loader"]],inputs:{show:[1,"show"],message:[1,"message"]},decls:1,vars:1,consts:[["class","loader-overlay",4,"ngIf"],[1,"loader-overlay"],[1,"loader-container"],[1,"spinner"],["class","loader-message",4,"ngIf"],[1,"loader-message"]],template:function(t,n){t&1&&Bo(0,Oie,4,2,"div",0),t&2&&q("ngIf",n.show())},dependencies:[Ut,$w],styles:[".loader-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0006;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.loader-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;background-color:#fff;padding:2rem;border-radius:12px;box-shadow:0 8px 32px #0003}.spinner[_ngcontent-%COMP%]{width:48px;height:48px;border:4px solid #f0f0f0;border-top:4px solid #3498db;border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}.loader-message[_ngcontent-%COMP%]{margin:0;font-size:14px;color:#333;font-weight:500;text-align:center}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none;border-top-color:#3498db}}"],changeDetection:0})};var Jd=(t=>(t.LOGO="Logo",t.BACKGROUND="Background",t))(Jd||{}),Qm={rename:{title:"Rename File",placeholder:"Enter new filename"},delete:{title:"Delete File",message:i=>`Are you sure you want to delete "${i}"?`,confirmText:"Delete"}},eg={rename:{success:i=>`"${i}" renamed successfully`,successTitle:"Rename Successful"},delete:{success:i=>`"${i}" deleted successfully`,successTitle:"Delete Successful"}};var GD;(t=>{let i;(a=>(a.ArrayBuffer="arraybuffer",a.Blob="blob",a.JSON="json",a.Text="text"))(i=t.ResponseType||={});let e;(o=>(o.Body="body",o.Response="response"))(e=t.Observe||={})})(GD||={});var na=class i{http=Z(Fv);toasterService=Z(Fr);environment=Z(Uv);request(e,t={}){let h=e,{method:n,params:r,url:o}=h,s=nn(h,["method","params","url"]),{observe:a=GD.Observe.Body,skipHandleError:l,httpParamEncoder:c,loader:d}=t,u=this.removeDuplicateSlashes(`${t.apiName}${o}`),f=k({observe:a},s);return r&&(f.params=this.getParams(r,c)),f.headers=this.addLoaderHeader(d,f.headers),f.headers=this.addskipHandleError(l,f.headers),this.http.request(n,u,f).pipe(E1(p=>{p?.succeeded==!1&&!l&&this.handleError(p)}),bc(p=>l?hs():Ya(()=>p)))}get(e,t={},n,r={}){return this.request({method:"GET",url:e,params:t,headers:n},k({apiName:this.environment.apiUrl,loader:!0},r))}post(e,t,n,r={}){return this.request({method:"POST",url:e,body:t,headers:n},k({apiName:this.environment.apiUrl},r))}put(e,t,n,r={}){return this.request({method:"PUT",url:e,body:t,headers:n},k({apiName:this.environment.apiUrl},r))}delete(e,t,n={}){return this.request({method:"DELETE",url:e,headers:t},k({apiName:this.environment.apiUrl},n))}getParams(e,t){let n=Object.entries(e).reduce((r,[o,s])=>(this.isUndefinedOrEmptyString(s)||s===null||(r[o]=s),r),{});return t?new ho({encoder:t,fromObject:n}):new ho({fromObject:n})}addLoaderHeader(e,t){let n=new po;return t&&Object.keys(t).forEach(r=>{n=n.set(r,t[r])}),e&&(n=n.set("Loader","true")),n}addskipHandleError(e,t){return t=t||new po,e&&(t=t.set("skipHandleError","true")),t}removeDuplicateSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1")}handleError(e){return this.toasterService.showError(Lv(e)),Ya(()=>e)}isUndefinedOrEmptyString(e){return e===void 0||e===""||e===null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var __=class i{api=Z(na);apiEndpoint="user-media-library";getLibraryItems(e,t,n,r=1,o=10,s,a,l){let c={userUniqueId:e,pageNumber:r,pageSize:o};return n&&(c.mediaType=n),s&&(c.searchTerm=s),a&&(c.sortBy=a),l!==void 0&&(c.isAscending=l),this.api.get(this.apiEndpoint,c,{"X-API-Key":t},{loader:!1})}renameItem(e,t,n){let r={newFileName:t};return this.api.put(`${this.apiEndpoint}/${e}/rename`,r,{"X-API-Key":n},{loader:!1})}deleteItem(e,t){return this.api.delete(`${this.apiEndpoint}/${e}`,{"X-API-Key":t},{loader:!1})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function s4(i){i||(i=Z(ui));let e=new xn(t=>{if(i.destroyed){t.next();return}return i.onDestroy(t.next.bind(t))});return t=>t.pipe(w1(e))}var a4=(i,e)=>e.id;function Rie(i,e){if(i&1&&(x(0,"div",2)(1,"div",6)(2,"span",7),U(3,"i",8),R(4),C()(),x(5,"div",9)(6,"div",10),U(7,"div",11),x(8,"p",12),R(9,"Loading your uploads\u2026"),C()()()()),i&2){let t=S();T(4),wt(" ",t.header()," ")}}function kie(i,e){i&1&&(x(0,"div",10),U(1,"div",11),x(2,"p",12),R(3,"Loading your uploads\u2026"),C()())}function Fie(i,e){i&1&&(x(0,"div",13),U(1,"i",15),x(2,"p"),R(3,"No uploads found"),C()())}function Nie(i,e){if(i&1){let t=Ae();x(0,"div",18),W("click",function(){let r=z(t).$implicit,o=S(3);return V(o.onSelectItem(r))}),x(1,"div",19),U(2,"img",20),x(3,"div",21)(4,"span",22),U(5,"i",23),C()(),x(6,"div",24)(7,"button",25),W("click",function(r){let o=z(t).$implicit,s=S(3);return V(s.onRenameClick(r,o))}),U(8,"i",26),C(),x(9,"button",27),W("click",function(r){let o=z(t).$implicit,s=S(3);return V(s.onDeleteClick(r,o))}),U(10,"i",28),C()()()()}if(i&2){let t=e.$implicit;q("title",t.originalFileName||t.blobName),T(2),q("src",t.blobUri,fi)("alt",t.originalFileName||t.blobName)}}function Lie(i,e){if(i&1){let t=Ae();x(0,"div",29),W("click",function(){z(t);let r=S(3);return V(r.onViewAll())}),x(1,"div",30),U(2,"i",31),x(3,"p",32),R(4),C()()()}if(i&2){let t=S(3);T(4),wt("+",t.totalCount()-t.previewPageSize()," More")}}function Uie(i,e){if(i&1&&(x(0,"div",14),mt(1,Nie,11,3,"div",16,a4),ae(3,Lie,5,1,"div",17),C()),i&2){let t=S(2);T(),gt(t.items().slice(0,t.previewPageSize())),T(2),le(t.totalCount()>t.previewPageSize()?3:-1)}}function Bie(i,e){if(i&1&&(x(0,"div",3)(1,"div",2)(2,"div",6)(3,"span",7),U(4,"i",8),R(5),C()(),x(6,"div",9),ae(7,kie,4,0,"div",10),ae(8,Fie,4,0,"div",13),ae(9,Uie,4,1,"div",14),C()()()),i&2){let t=S();T(5),wt(" ",t.header()," "),T(2),le(t.loading()?7:-1),T(),le(!t.loading()&&t.items().length===0?8:-1),T(),le(!t.loading()&&t.items().length>0?9:-1)}}function zie(i,e){if(i&1&&(x(0,"p",40),R(1),C()),i&2){let t=S(2);T(),pp(" ",t.totalCount()," item",t.totalCount()!==1?"s":""," available ")}}function Vie(i,e){if(i&1){let t=Ae();x(0,"button",56),W("click",function(){z(t);let r=S(2);return V(r.onSearchChange(""))}),U(1,"i",57),C()}}function Hie(i,e){if(i&1&&(x(0,"option",53),R(1),C()),i&2){let t=e.$implicit;q("value",t.label),T(),wt(" ",t.label," ")}}function Gie(i,e){i&1&&(x(0,"div",10),U(1,"div",11),x(2,"p"),R(3,"Loading your uploads\u2026"),C()())}function jie(i,e){if(i&1){let t=Ae();U(0,"i",58),x(1,"p",59),R(2),C(),x(3,"p",60),R(4,"Try a different search term or clear filters"),C(),x(5,"button",61),W("click",function(){z(t);let r=S(3);return V(r.onSearchChange(""))}),U(6,"i",62),R(7," Clear Search "),C()}if(i&2){let t=S(3);T(2),wt('No results for "',t.searchTerm(),'"')}}function Wie(i,e){if(i&1&&(U(0,"i",63),x(1,"p",59),R(2),C(),x(3,"p",60),R(4,"Upload files to see them here"),C()),i&2){let t=S(3);T(2),wt("No ",t.mediaType().toLowerCase()," uploads yet")}}function $ie(i,e){if(i&1&&(x(0,"div",13),ae(1,jie,8,1)(2,Wie,5,1),C()),i&2){let t=S(2);T(),le(t.searchTerm()?1:2)}}function Yie(i,e){if(i&1){let t=Ae();x(0,"div",67),W("click",function(){let r=z(t).$implicit,o=S(3);return V(o.onSelectItem(r))}),x(1,"div",68),U(2,"img",69),x(3,"div",70)(4,"span",71),U(5,"i",23),R(6," Use"),C()(),x(7,"div",72)(8,"button",73),W("click",function(r){let o=z(t).$implicit,s=S(3);return V(s.onRenameClick(r,o))}),U(9,"i",26),C(),x(10,"button",74),W("click",function(r){let o=z(t).$implicit,s=S(3);return V(s.onDeleteClick(r,o))}),U(11,"i",28),C()()(),x(12,"div",75)(13,"p",76),R(14),C(),x(15,"p",77),R(16),C()()()}if(i&2){let t=e.$implicit,n=S(3);q("title",t.originalFileName||t.blobName),T(2),q("src",t.blobUri,fi)("alt",t.originalFileName||t.blobName),T(11),q("title",t.originalFileName||t.blobName),T(),wt(" ",t.originalFileName||t.blobName," "),T(2),ze(n.formatDate(t.uploadedOn))}}function Xie(i,e){if(i&1&&(x(0,"div",66),U(1,"i",78),R(2),C()),i&2){let t=S(3);T(2),cv(" Showing ",(t.currentPage()-1)*t.itemsPerPage()+1,"\u2013",t.Math.min(t.currentPage()*t.itemsPerPage(),t.totalCount())," of ",t.totalCount()," item",t.totalCount()!==1?"s":""," ")}}function qie(i,e){if(i&1&&(x(0,"div",64),mt(1,Yie,17,6,"div",65,a4),C(),ae(3,Xie,3,4,"div",66)),i&2){let t=S(2);T(),gt(t.items()),T(2),le(t.items().length>0?3:-1)}}function Kie(i,e){if(i&1){let t=Ae();x(0,"button",86),W("click",function(){let r=z(t).$implicit,o=S(3);return V(o.goToPage(r))}),R(1),C()}if(i&2){let t=e.$implicit,n=S(3);dt("active",t===n.currentPage()),fn("aria-label","Go to page "+t)("title",t===n.currentPage()?"Current page":""),T(),wt(" ",t," ")}}function Zie(i,e){if(i&1){let t=Ae();x(0,"div",55)(1,"span",79),R(2),C(),x(3,"div",80)(4,"button",81),W("click",function(){z(t);let r=S(2);return V(r.previousPage())}),U(5,"i",82),C(),mt(6,Kie,2,5,"button",83,fp),x(8,"button",84),W("click",function(){z(t);let r=S(2);return V(r.nextPage())}),U(9,"i",85),C()()()}if(i&2){let t=S(2);T(2),pp(" Page ",t.currentPage()," of ",t.totalPages()," "),T(2),q("disabled",t.currentPage()===1),T(2),gt(t.pageNumbers()),T(2),q("disabled",t.currentPage()===t.totalPages())}}function Jie(i,e){if(i&1){let t=Ae();x(0,"div",33),W("click",function(){z(t);let r=S();return V(r.onBackdropClick())}),x(1,"div",34),W("click",function(r){return r.stopPropagation()}),x(2,"div",35)(3,"div",36)(4,"span",37),U(5,"i",38),C(),x(6,"div")(7,"h2",39),R(8),C(),ae(9,zie,2,2,"p",40),C()(),x(10,"button",41),W("click",function(){z(t);let r=S();return V(r.onClose())}),U(11,"i",42),C()(),x(12,"div",43)(13,"div",44)(14,"div",45),U(15,"i",46),x(16,"input",47),W("input",function(r){z(t);let o=S();return V(o.onSearchChange(r.target.value))}),C(),ae(17,Vie,2,0,"button",48),C()(),x(18,"div",49)(19,"label",50),U(20,"i",51),R(21," Sort "),C(),x(22,"select",52,0),W("change",function(){z(t);let r=dr(23),o=S();return V(o.onSortChange(r.value))}),mt(24,Hie,2,2,"option",53,al),C()()(),x(26,"div",54),ae(27,Gie,4,0,"div",10)(28,$ie,3,1,"div",13)(29,qie,4,1),C(),ae(30,Zie,10,4,"div",55),C()()}if(i&2){let t=S();T(8),wt("Your ",t.mediaType()," Library"),T(),le(!t.loading()&&t.totalCount()>0?9:-1),T(7),q("value",t.searchTerm()),T(),le(t.searchTerm()?17:-1),T(5),q("value",t.selectedSort().label),T(2),gt(t.sortOptions),T(3),le(t.loading()?27:t.items().length===0?28:29),T(3),le(!t.loading()&&t.totalCount()>t.itemsPerPage()?30:-1)}}function Qie(i,e){i&1&&U(0,"i",98)}function ere(i,e){if(i&1){let t=Ae();x(0,"div",87),W("click",function(){z(t);let r=S();return V(r.closeRenameModal())}),x(1,"div",88),W("click",function(r){return r.stopPropagation()}),x(2,"div",89)(3,"h3"),R(4),C(),x(5,"button",90),W("click",function(){z(t);let r=S();return V(r.closeRenameModal())}),U(6,"i",42),C()(),x(7,"div",91)(8,"div",92)(9,"label",93),R(10,"New filename:"),C(),x(11,"input",94,1),W("ngModelChange",function(r){z(t);let o=S();return V(o.setRenameValue(r))})("keyup.enter",function(){z(t);let r=S();return V(r.confirmRename())})("keyup.escape",function(){z(t);let r=S();return V(r.closeRenameModal())}),C()()(),x(13,"div",95)(14,"button",96),W("click",function(){z(t);let r=S();return V(r.closeRenameModal())}),R(15," Cancel "),C(),x(16,"button",97),W("click",function(){z(t);let r=S();return V(r.confirmRename())}),ae(17,Qie,1,0,"i",98),R(18," Rename "),C()()()()}if(i&2){let t,n=S();T(4),ze(n.MEDIA_LIBRARY_DIALOGS.rename.title),T(7),q("ngModel",n.renameValue())("placeholder",n.MEDIA_LIBRARY_DIALOGS.rename.placeholder)("disabled",n.renamingItemId()!==null),T(3),q("disabled",n.renamingItemId()!==null),T(2),q("disabled",!n.renameValue().trim()||n.renameValue().trim()===((t=n.selectedItemForAction())==null?null:t.originalFileName)||n.renamingItemId()!==null),T(),le(n.renamingItemId()?17:-1)}}var mh=class i{MediaLibraryType=Jd;MEDIA_LIBRARY_DIALOGS=Qm;mediaType=ye.required();userUniqueId=ye.required();apiKey=ye.required();header=ye("My Uploads");previewPageSize=F(4);modalPageSize=F(10);itemsPerPage=F(4);itemSelected=Pt();items=F([]);loading=F(!1);totalCount=F(0);currentPage=F(1);searchTerm=F("");isModalOpen=F(!1);showRenameModal=F(!1);selectedItemForAction=F(null);renameValue=F("");renamingItemId=F(null);mediaService=Z(__);toaster=Z(Fr);dialogService=Z(Mo);destroyRef=Z(ui);searchTimeout;sortOptions=[{label:"Newest First",field:"CreatedOn",isAscending:!1},{label:"Oldest First",field:"CreatedOn",isAscending:!0},{label:"Name (A-Z)",field:"BlobName",isAscending:!0},{label:"Name (Z-A)",field:"BlobName",isAscending:!1}];selectedSort=F(this.sortOptions[0]);sortBy=F("CreatedOn");isAscending=F(!1);Math=Math;totalPages=Me(()=>Math.max(1,Math.ceil(this.totalCount()/this.itemsPerPage())));startIndex=Me(()=>(this.currentPage()-1)*this.itemsPerPage());endIndex=Me(()=>Math.min(this.currentPage()*this.itemsPerPage(),this.totalCount()));pageNumbers=Me(()=>{let e=this.totalPages(),t=this.currentPage(),n=5,r=[],o=Math.max(1,t-Math.floor(n/2)),s=Math.min(e,o+n-1);s-o+1<n&&(o=Math.max(1,s-n+1));for(let a=o;a<=s;a++)r.push(a);return r});constructor(){Yt(()=>{let e=this.userUniqueId(),t=this.apiKey(),n=this.selectedSort();!e||!t||hn(()=>{this.sortBy.set(n.field),this.isAscending.set(n.isAscending),this.fetchItems(1)})})}fetchItems(e){let t=this.userUniqueId(),n=this.apiKey(),r=this.mediaType();if(!t||!n)return;this.loading.set(!0);let o=this.sortBy(),s=this.isAscending();this.mediaService.getLibraryItems(t,n,r,e,this.itemsPerPage(),this.searchTerm()||void 0,o||void 0,s).pipe(s4(this.destroyRef)).subscribe({next:a=>{this.items.set(a.data||[]),this.totalCount.set(a.totalCount||0),this.currentPage.set(e),this.loading.set(!1)},error:()=>{this.loading.set(!1),this.items.set([])}})}onSelectItem(e){this.itemSelected.emit(e),this.isModalOpen.set(!1)}onRenameClick(e,t){e.stopPropagation(),this.selectedItemForAction.set(t),this.renameValue.set(t.originalFileName??t.blobName??""),this.showRenameModal.set(!0)}onDeleteClick(e,t){e.stopPropagation();let n=(t.originalFileName||t.blobName||"file").trim();this.dialogService.showDialog({type:"warning",title:Qm.delete.title,message:Qm.delete.message(n),buttons:[{label:"Cancel",action:"cancel"},{label:Qm.delete.confirmText,action:"confirm",isDestructive:!0}]}).then(r=>{r.action==="confirm"&&this.performDelete(t)})}closeRenameModal(){this.showRenameModal.set(!1),this.selectedItemForAction.set(null),this.renameValue.set("")}confirmRename(){let e=this.selectedItemForAction(),t=this.renameValue().trim();!e||!t||t===e.originalFileName||(this.renamingItemId.set(e.id),this.mediaService.renameItem(e.id,t,this.apiKey()).subscribe({next:n=>{n.isSuccess?(this.closeRenameModal(),this.fetchItems(this.currentPage()),this.renamingItemId.set(null),this.toaster.showSuccess(eg.rename.success(t),eg.rename.successTitle)):this.renamingItemId.set(null)},error:n=>{this.renamingItemId.set(null)}}))}confirmDelete(){let e=this.selectedItemForAction();e&&this.performDelete(e)}performDelete(e){this.mediaService.deleteItem(e.id,this.apiKey()).subscribe({next:t=>{if(t.isSuccess){this.fetchItems(this.currentPage());let n=(e.originalFileName||e.blobName||"file").trim();this.toaster.showSuccess(eg.delete.success(n),eg.delete.successTitle)}}})}onClose(){this.currentPage.set(1),this.searchTerm.set(""),this.itemsPerPage.set(this.previewPageSize()),this.isModalOpen.set(!1),this.fetchItems(1)}onBackdropClick(){this.onClose()}nextPage(){this.currentPage()<this.totalPages()&&this.fetchItems(this.currentPage()+1)}previousPage(){this.currentPage()>1&&this.fetchItems(this.currentPage()-1)}goToPage(e){e>=1&&e<=this.totalPages()&&this.fetchItems(e)}onSearchChange(e){this.searchTerm.set(e),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.fetchItems(1)},300)}onSortChange(e){let t=this.sortOptions.find(n=>n.label===e);this.selectedSort.set(t)}formatDate(e){return e?new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"2-digit"}):""}setRenameValue(e){this.renameValue.set(e)}onViewAll(){this.isModalOpen.set(!0),this.itemsPerPage.set(this.modalPageSize()),this.fetchItems(1)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-media-library-items"]],inputs:{mediaType:[1,"mediaType"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"],header:[1,"header"]},outputs:{itemSelected:"itemSelected"},decls:4,vars:4,consts:[["sortSelect",""],["renameInput",""],[1,"media-library-preview-box"],[1,"media-library-section"],[1,"modal-overlay"],[1,"modal-overlay","rename-overlay"],[1,"preview-header"],[1,"preview-title"],[1,"ri-gallery-fill"],[1,"media-library-items","preview-mode"],[1,"loading-state"],[1,"spinner"],[1,"loading-text"],[1,"empty-state"],[1,"preview-grid"],[1,"ri-image-line","empty-icon"],[1,"preview-item",3,"title"],[1,"more-card"],[1,"preview-item",3,"click","title"],[1,"preview-image-wrap"],[1,"preview-image",3,"src","alt"],[1,"preview-overlay","md:hidden"],[1,"preview-use-badge"],[1,"ri-check-line"],[1,"preview-actions"],["appTooltip","Rename","aria-label","Rename item",1,"preview-action-btn","rename-btn",3,"click"],[1,"ri-edit-line"],["appTooltip","Delete","aria-label","Delete item",1,"preview-action-btn","delete-btn",3,"click"],[1,"ri-delete-bin-line"],[1,"more-card",3,"click"],[1,"more-content"],[1,"ri-add-circle-line","more-icon"],[1,"more-count"],[1,"modal-overlay",3,"click"],[1,"modal-container",3,"click"],[1,"modal-header"],[1,"modal-header-left"],[1,"modal-icon"],[1,"ri-image-gallery-line"],[1,"modal-title"],[1,"modal-subtitle"],["aria-label","Close modal",1,"modal-close-btn",3,"click"],[1,"ri-close-line"],[1,"controls-bar"],[1,"search-wrapper"],[1,"search-container"],[1,"ri-search-line","search-icon"],["type","text","placeholder","Search by filename...","aria-label","Search media library",1,"search-input",3,"input","value"],["aria-label","Clear search","appTooltip","Clear search",1,"clear-search-btn"],[1,"sort-wrapper"],["for","sort-select",1,"sort-label"],[1,"ri-sort-asc"],["id","sort-select",1,"sort-select",3,"change","value"],[3,"value"],[1,"modal-content"],[1,"modal-footer"],["aria-label","Clear search","appTooltip","Clear search",1,"clear-search-btn",3,"click"],[1,"ri-close-circle-line"],[1,"ri-search-eye-line","empty-icon"],[1,"empty-title"],[1,"empty-sub"],[1,"empty-action-btn",3,"click"],[1,"ri-refresh-line"],[1,"ri-image-add-line","empty-icon"],[1,"items-grid"],[1,"item-card",3,"title"],[1,"results-footer-info"],[1,"item-card",3,"click","title"],[1,"thumb-wrap"],[1,"thumb-img",3,"src","alt"],[1,"thumb-overlay"],[1,"use-badge"],[1,"item-actions"],["appTooltip","Rename","aria-label","Rename item",1,"action-btn","rename-btn",3,"click"],["appTooltip","Delete","aria-label","Delete item",1,"action-btn","delete-btn",3,"click"],[1,"item-meta"],[1,"item-name",3,"title"],[1,"item-date"],[1,"ri-check-double-line"],[1,"pagination-info"],[1,"pagination-controls"],["aria-label","Previous page","appTooltip","Previous page (\u2B05)",1,"page-nav-btn",3,"click","disabled"],[1,"ri-arrow-left-s-line"],[1,"page-num-btn",3,"active"],["aria-label","Next page","appTooltip","Next page (\u27A1)",1,"page-nav-btn",3,"click","disabled"],[1,"ri-arrow-right-s-line"],[1,"page-num-btn",3,"click"],[1,"modal-overlay","rename-overlay",3,"click"],[1,"action-modal",3,"click"],[1,"modal-header-small"],["aria-label","Close",1,"close-btn",3,"click"],[1,"modal-body"],[1,"form-group"],["for","rename-input"],["id","rename-input","type","text","autofocus","",1,"rename-input",3,"ngModelChange","keyup.enter","keyup.escape","ngModel","placeholder","disabled"],[1,"modal-footer-actions"],[1,"btn-cancel",3,"click","disabled"],[1,"btn-confirm",3,"click","disabled"],[1,"ri-loader-4-line","spinner"]],template:function(t,n){t&1&&(ae(0,Rie,10,1,"div",2),ae(1,Bie,10,4,"div",3),ae(2,Jie,31,7,"div",4),ae(3,ere,19,7,"div",5)),t&2&&(le(n.loading()?0:-1),T(),le(!n.loading()&&n.items().length>0?1:-1),T(),le(n.isModalOpen()?2:-1),T(),le(n.showRenameModal()?3:-1))},dependencies:[Ut,fr,Wv,$v,hl,Is,zo,bi],styles:[`.media-library-section[_ngcontent-%COMP%]{margin-top:14px}.select-from-library-btn[_ngcontent-%COMP%]{width:100%}.select-from-library-btn[_ngcontent-%COMP%] .p-button, .select-from-library-btn[_ngcontent-%COMP%] button{width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:10px 14px!important;background:linear-gradient(135deg,#6366f1,#8b5cf6)!important;color:#fff!important;border:none!important;border-radius:8px!important;font-size:13px!important;font-weight:600!important;cursor:pointer!important;transition:box-shadow .2s,transform .15s!important;box-shadow:0 2px 8px #6366f14d!important;letter-spacing:.01em!important}.select-from-library-btn[_ngcontent-%COMP%] .p-button:hover, .select-from-library-btn[_ngcontent-%COMP%] button:hover{box-shadow:0 4px 16px #6366f173!important;transform:translateY(-1px)!important}.media-library-preview-box[_ngcontent-%COMP%]{border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 10px #0000000f;animation:_ngcontent-%COMP%_fadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.preview-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#f8f8fc;border-bottom:1px solid #eeeefc}.preview-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#374151;letter-spacing:.02em}.preview-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6366f1}.preview-close-btn[_ngcontent-%COMP%]{width:26px;height:26px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#9ca3af;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,border-color .15s;padding:0}.preview-close-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#374151;border-color:#d1d5db}.media-library-items[_ngcontent-%COMP%]{padding:10px}.preview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:6px 0}.preview-item[_ngcontent-%COMP%]{cursor:pointer;transition:transform .15s,filter .15s}.preview-item[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.preview-image-wrap[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:#f5f5f8;border-radius:8px;overflow:hidden;border:1.5px solid #e5e7eb;transition:border-color .2s,box-shadow .2s,background .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-image-wrap[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px rgba(var(--primary-color, 98 101 241),.18);background:#fafbfc}.preview-image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block;transition:transform .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-image[_ngcontent-%COMP%]{transform:scale(1.05)}.preview-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:#fff0;display:flex;align-items:center;justify-content:start;opacity:0;transition:opacity .2s,background .2s}.preview-item[_ngcontent-%COMP%]:hover .preview-overlay[_ngcontent-%COMP%]{opacity:1;background:#00000014}.preview-use-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-left:6px;background:rgb(var(--primary-color, 98 101 241));color:#fff;border-radius:50%;font-size:16px;font-weight:700;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.3)}.preview-actions[_ngcontent-%COMP%]{--preview-action-size: 28px;position:absolute;top:5px;right:5px;display:flex;flex-direction:column;gap:4px;opacity:0;transform:scale(.8) translate(4px);transition:opacity .15s,transform .15s;pointer-events:none}.preview-item[_ngcontent-%COMP%]:hover .preview-actions[_ngcontent-%COMP%]{opacity:1;transform:scale(1) translate(0);pointer-events:auto}.preview-item[_ngcontent-%COMP%]:focus-within .preview-actions[_ngcontent-%COMP%]{opacity:1;transform:scale(1) translate(0);pointer-events:auto}.preview-action-btn[_ngcontent-%COMP%]{width:var(--preview-action-size);height:var(--preview-action-size);padding:0;border:none;border-radius:50%;background:#fffffff2;color:#111827;font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .12s;font-weight:500;box-shadow:0 2px 8px #00000026}.preview-action-btn[_ngcontent-%COMP%]:hover{transform:scale(1.12);box-shadow:0 3px 12px #00000040}.preview-action-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:2px}.preview-action-btn.rename-btn[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff}.preview-action-btn.delete-btn[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.more-card[_ngcontent-%COMP%]{cursor:pointer;transition:transform .15s,filter .15s}.more-card[_ngcontent-%COMP%]:hover{transform:scale(1.02)}.more-content[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.08),rgba(var(--secondary-color, 16 185 129),.08));border:1.5px solid rgba(var(--primary-color, 98 101 241),.2);border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;transition:border-color .15s,background .15s,box-shadow .15s}.more-card[_ngcontent-%COMP%]:hover .more-content[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.12),rgba(var(--secondary-color, 16 185 129),.12));box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.15)}.more-icon[_ngcontent-%COMP%]{font-size:28px;color:rgb(var(--primary-color, 98 101 241));font-weight:700}.more-count[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:600;color:rgb(var(--primary-color, 98 101 241));text-align:center;line-height:1.2}@media(max-width:768px){.preview-use-badge[_ngcontent-%COMP%]{display:none!important}.preview-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.preview-actions[_ngcontent-%COMP%]{opacity:1;transform:none;pointer-events:auto;top:auto;right:4px;bottom:4px;flex-direction:row;gap:4px;padding:3px;border-radius:999px;background:#11182785;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 24px;font-size:12px;box-shadow:none;border:1px solid rgba(255,255,255,.2)}}@media(max-width:480px){.preview-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px 0}.preview-actions[_ngcontent-%COMP%]{right:3px;bottom:3px;gap:3px;padding:2px}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 22px;font-size:11px}.preview-use-badge[_ngcontent-%COMP%]{display:none!important}}.modal-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f0f19a6;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}.modal-container[_ngcontent-%COMP%]{background:#fff;border-radius:16px;width:100%;max-width:960px;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 24px 64px #00000038;animation:_ngcontent-%COMP%_modalIn .22s cubic-bezier(.34,1.26,.64,1)}@keyframes _ngcontent-%COMP%_modalIn{0%{opacity:0;transform:scale(.95) translateY(12px)}to{opacity:1;transform:scale(1) translateY(0)}}.modal-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #f0f0f5;gap:12px}.modal-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.modal-icon[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px;flex-shrink:0}.modal-title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:#111827;line-height:1.2}.modal-subtitle[_ngcontent-%COMP%]{margin:2px 0 0;font-size:12px;color:#9ca3af}.modal-close-btn[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:8px;border:1.5px solid #e5e7eb;background:#fff;color:#6b7280;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,border-color .15s;flex-shrink:0}.modal-close-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#111827;border-color:#d1d5db}.controls-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 24px;border-bottom:1px solid #f0f0f5;background:#fafbfc}.search-container[_ngcontent-%COMP%]{flex:1;position:relative;min-width:0}.search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#d1d5db;font-size:16px;pointer-events:none}.search-input[_ngcontent-%COMP%]{width:100%;height:36px;border:1.5px solid #e5e7eb;border-radius:8px;padding:0 36px 0 32px;font-size:13px;background:#fff;color:#111827;transition:border-color .15s}.search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.clear-search-btn[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;background:transparent;color:#9ca3af;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .15s}.clear-search-btn[_ngcontent-%COMP%]:hover{color:#6b7280}.sort-container[_ngcontent-%COMP%]{flex-shrink:0}.sort-select[_ngcontent-%COMP%]{height:36px;padding:0 28px 0 12px;border:1.5px solid #e5e7eb;border-radius:8px;background:#fff;color:#111827;font-size:13px;font-weight:500;cursor:pointer;transition:border-color .15s;appearance:none;background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 8px center;background-size:20px}.sort-select[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.sort-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{background:#fff;color:#111827;padding:8px}.modal-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:20px 24px;scrollbar-width:thin;scrollbar-color:#e5e7eb transparent}.modal-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.modal-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:99px}.loading-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:14px;color:#9ca3af;font-size:14px}.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.spinner[_ngcontent-%COMP%]{width:15px;height:15px;border:3px solid #f0f0f5;border-top-color:rgb(var(--primary-color, 98 101 241));border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;gap:10px}.empty-icon[_ngcontent-%COMP%]{font-size:52px;color:#d1d5db}.empty-title[_ngcontent-%COMP%]{margin:0;font-size:15px;font-weight:600;color:#374151}.empty-sub[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#9ca3af}.items-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,172px));gap:10px}.item-card[_ngcontent-%COMP%]{max-width:158px;border:1.5px solid #e5e7eb;border-radius:12px;overflow:hidden;cursor:pointer;display:flex;flex-direction:column;transition:border-color .2s,box-shadow .2s,transform .18s;background:#fff}.item-card[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 8px 24px rgba(var(--primary-color, 98 101 241),.2);transform:translateY(-3px)}.thumb-wrap[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:1;background:#f5f5f8;overflow:hidden}.thumb-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;display:block;transition:transform .25s}.item-card[_ngcontent-%COMP%]:hover .thumb-img[_ngcontent-%COMP%]{transform:scale(1.06)}.thumb-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:#fff0;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s}.item-card[_ngcontent-%COMP%]:hover .thumb-overlay[_ngcontent-%COMP%]{opacity:1}.use-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;background:#fff;color:rgb(var(--primary-color, 98 101 241));font-size:12px;font-weight:700;padding:7px 14px;border-radius:8px;pointer-events:none}.item-meta[_ngcontent-%COMP%]{padding:9px 11px 10px}.item-name[_ngcontent-%COMP%]{margin:0;font-size:11px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#374151}.item-date[_ngcontent-%COMP%]{margin:3px 0 0;font-size:10px;color:#9ca3af}.modal-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:14px 24px;border-top:1px solid #f0f0f5;gap:12px;flex-wrap:wrap}.pagination-info[_ngcontent-%COMP%]{font-size:12px;color:#9ca3af;font-weight:500}.pagination-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.page-nav-btn[_ngcontent-%COMP%]{width:34px;height:34px;border:1.5px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:#6b7280;transition:background .15s,border-color .15s,color .15s}.page-nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.page-nav-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.page-num-btn[_ngcontent-%COMP%]{width:34px;height:34px;border:1.5px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;color:#374151;transition:background .15s,border-color .15s,color .15s;display:flex;align-items:center;justify-content:center}.page-num-btn[_ngcontent-%COMP%]:hover:not(.active){background:#f3f4f6;border-color:#d1d5db}.page-num-btn.active[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border-color:transparent;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.35)}.search-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}.search-container[_ngcontent-%COMP%]{flex:1;position:relative;min-width:0;display:flex;align-items:center}.search-hint[_ngcontent-%COMP%]{position:absolute;right:12px;font-size:11px;color:#d1d5db;pointer-events:none;display:flex;align-items:center;gap:3px}.search-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;background:#f3f4f6;border:1px solid #d1d5db;border-radius:4px;padding:2px 6px;font-size:10px;font-weight:600;color:#6b7280;font-family:Courier New,monospace}.search-results-info[_ngcontent-%COMP%]{display:flex;gap:8px;padding:0 2px}.results-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:linear-gradient(135deg,rgba(var(--primary-color, 98 101 241),.1),rgba(var(--secondary-color, 16 185 129),.1));color:rgb(var(--primary-color, 98 101 241));border-radius:6px;padding:4px 10px;font-size:11px;font-weight:600;border:1px solid rgba(var(--primary-color, 98 101 241),.15)}.sort-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-shrink:0}.sort-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:500;color:#6b7280;cursor:pointer}.sort-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.empty-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:12px;font-weight:600;cursor:pointer;margin-top:12px;transition:transform .15s,box-shadow .15s}.empty-action-btn[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.3)}.empty-action-btn[_ngcontent-%COMP%]:active{transform:translateY(0)}.results-footer-info[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:6px;padding:12px 16px;background:rgba(var(--primary-color, 98 101 241),.03);border-top:1px solid rgba(var(--primary-color, 98 101 241),.1);font-size:12px;color:#6b7280;font-weight:500;border-radius:0 0 8px 8px}.results-footer-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));font-size:13px}.item-actions[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;display:flex;gap:6px;padding:8px;background:linear-gradient(to top,rgba(0,0,0,.7),transparent);opacity:0;transform:translateY(4px);transition:opacity .2s,transform .2s}.item-card[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%]{opacity:1;transform:translateY(0)}.action-btn[_ngcontent-%COMP%]{flex:1;padding:6px 8px;border:none;border-radius:6px;background:#fff;color:#111827;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;font-weight:500}.action-btn[_ngcontent-%COMP%]:hover{transform:scale(1.05);box-shadow:0 2px 8px #00000026}.action-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.action-btn.rename-btn[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff}.action-btn.delete-btn[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.rename-overlay[_ngcontent-%COMP%], .delete-overlay[_ngcontent-%COMP%]{z-index:1001}.action-modal[_ngcontent-%COMP%]{background:#fff;border-radius:12px;width:90%;max-width:400px;box-shadow:0 20px 60px #0000004d;animation:_ngcontent-%COMP%_modalIn .22s cubic-bezier(.34,1.26,.64,1)}.modal-header-small[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #f0f0f5}.modal-header-small[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:15px;font-weight:700;color:#111827}.close-btn[_ngcontent-%COMP%]{width:32px;height:32px;border:1.5px solid #e5e7eb;background:#fff;border-radius:6px;color:#6b7280;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}.close-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.close-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.modal-body[_ngcontent-%COMP%]{padding:18px 20px}.form-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#374151}.rename-input[_ngcontent-%COMP%], .delete-modal[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:10px 12px;border:1.5px solid #e5e7eb;border-radius:8px;font-size:13px;color:#111827;font-family:inherit;transition:border-color .15s}.rename-input[_ngcontent-%COMP%]:focus{outline:none;border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgba(var(--primary-color, 98 101 241),.05)}.rename-input[_ngcontent-%COMP%]:disabled{background:#f3f4f6;cursor:not-allowed}.delete-warning[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}.warning-icon[_ngcontent-%COMP%]{font-size:32px;color:#f97316}.delete-warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#374151;line-height:1.5}.delete-warning[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700;color:#111827;word-break:break-word}.delete-note[_ngcontent-%COMP%]{color:#ef4444!important;font-weight:600!important}.modal-footer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid #f0f0f5;background:#fafafa;border-radius:0 0 12px 12px}.btn-cancel[_ngcontent-%COMP%], .btn-confirm[_ngcontent-%COMP%]{padding:8px 16px;border:1.5px solid #e5e7eb;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;gap:6px}.btn-cancel[_ngcontent-%COMP%]{background:#fff;color:#6b7280}.btn-cancel[_ngcontent-%COMP%]:hover:not(:disabled){background:#f3f4f6;border-color:#d1d5db;color:#111827}.btn-cancel[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.btn-confirm[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)));color:#fff;border:none;box-shadow:0 2px 8px rgba(var(--primary-color, 98 101 241),.2)}.btn-confirm[_ngcontent-%COMP%]:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px rgba(var(--primary-color, 98 101 241),.3)}.btn-confirm[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.5}.btn-confirm.btn-danger[_ngcontent-%COMP%]{background:#ef4444;box-shadow:0 2px 8px #ef444433}.btn-confirm.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){box-shadow:0 4px 12px #ef44444d}.spinner[_ngcontent-%COMP%]{display:inline-block;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(max-width:640px){.modal-container[_ngcontent-%COMP%]{max-height:95vh;border-radius:12px}.controls-bar[_ngcontent-%COMP%]{flex-direction:column;gap:8px;padding:12px 16px}.search-wrapper[_ngcontent-%COMP%], .search-container[_ngcontent-%COMP%], .sort-wrapper[_ngcontent-%COMP%], .sort-select[_ngcontent-%COMP%]{width:100%}.modal-content[_ngcontent-%COMP%]{padding:12px}.items-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.modal-footer[_ngcontent-%COMP%]{flex-direction:column;align-items:center;gap:10px}}@media(hover:none),(pointer:coarse){.preview-item[_ngcontent-%COMP%]:hover{transform:none}.preview-use-badge[_ngcontent-%COMP%]{display:none!important}.preview-actions[_ngcontent-%COMP%]{opacity:1;transform:none;pointer-events:auto;bottom:auto;right:4px;top:4px;flex-direction:row;gap:4px;padding:3px;border-radius:999px;background:#11182785;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.preview-action-btn[_ngcontent-%COMP%]{--preview-action-size: 24px;box-shadow:none;border:1px solid rgba(255,255,255,.2)}.preview-overlay[_ngcontent-%COMP%]{opacity:1;background:#0000000d}}`],changeDetection:0})};var l4=i=>({$implicit:i}),c4=(i,e)=>({$implicit:i,tpl:e}),d4=(i,e)=>e.actionItemId;function tre(i,e){if(i&1){let t=Ae();x(0,"div",3),U(1,"i",6),x(2,"span"),R(3),C(),x(4,"button",7),W("click",function(){z(t);let r=S();return V(r.clearUploadError())}),U(5,"i",8),C()()}if(i&2){let t=S();T(3),ze(t.uploadError())}}function nre(i,e){if(i&1){let t=Ae();x(0,"div",13),U(1,"img",16),x(2,"button",17),W("click",function(){z(t);let r=S().$implicit,o=S();return V(o.remove(r.actionItemId))}),U(3,"i",18),C()()}if(i&2){let t,n=S().$implicit,r=S();T(),q("src",(t=r.state().images[n.actionItemId])==null?null:t.src,fi)}}function ire(i,e){if(i&1){let t=Ae();x(0,"app-media-library-items",19),W("itemSelected",function(r){z(t);let o=S().$implicit,s=S();return V(s.onMediaLibraryBackgroundSelected(r,o.actionItemId))}),C()}if(i&2){let t=S(2);q("mediaType",t.MediaLibraryType.BACKGROUND)("userUniqueId",t.userUniqueId())("apiKey",t.apiKey())("header","Your Background Library")}}function rre(i,e){if(i&1&&(U(0,"i",20),x(1,"span"),R(2),C()),i&2){let t,n=S().$implicit,r=S();T(2),ze((t=r.state().images[n.actionItemId])==null?null:t.fileName)}}function ore(i,e){i&1&&(U(0,"i",21),x(1,"span"),R(2,"No file chosen"),C())}function sre(i,e){if(i&1){let t=Ae();x(0,"div",9)(1,"div",10)(2,"app-ui-fileupload",11),W("onSelect",function(r){let o=z(t).$implicit,s=S();return V(s.onFileChange(o.actionItemId,r))}),C(),x(3,"div",12),R(4,"Max file size: 25MB"),C()(),ae(5,nre,4,1,"div",13),C(),ae(6,ire,1,4,"app-media-library-items",14),x(7,"div",15),ae(8,rre,3,1)(9,ore,3,0),C()}if(i&2){let t,n,r=e.$implicit,o=S();T(5),le((t=o.state().images[r.actionItemId])!=null&&t.src?5:-1),T(),le(o.userUniqueId()?6:-1),T(),fn("aria-live","polite"),T(),le((n=o.state().images[r.actionItemId])!=null&&n.fileName?8:9)}}function are(i,e){if(i&1){let t=Ae();x(0,"button",47),W("click",function(){z(t);let r=S().tpl,o=S();return V(o.applyToAll(r.actionItemId))}),U(1,"i",48),R(2," Apply to All "),C()}}function lre(i,e){if(i&1){let t=Ae();x(0,"div",22)(1,"div",23)(2,"span",24),U(3,"i",25),R(4),C(),x(5,"div",26),ae(6,are,3,0,"button",27),x(7,"button",28),W("click",function(){let r=z(t).tpl,o=S();return V(o.resetTransform(r.actionItemId))}),U(8,"i",29),R(9," Reset "),C()()(),x(10,"div",30)(11,"span",31),U(12,"i",32),R(13," Scale "),C(),x(14,"div",33)(15,"div",34)(16,"app-ui-slider",35),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"scale",r))}),C(),x(17,"span",36),R(18),ki(19,"number"),C()(),x(20,"div",37)(21,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"scale",-o.scaleStep))}),U(22,"i",39),C(),x(23,"input",40),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"scale",r))}),C(),x(24,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"scale",o.scaleStep))}),U(25,"i",41),C()()()(),U(26,"div",42),x(27,"div",30)(28,"span",31),U(29,"i",43),R(30," Rotation "),C(),x(31,"div",33)(32,"div",34)(33,"app-ui-slider",35),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"rotation",r))}),C(),x(34,"span",36),R(35),ki(36,"number"),C()(),x(37,"div",37)(38,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"rotation",-o.rotationStep))}),U(39,"i",39),C(),x(40,"input",40),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"rotation",r))}),C(),x(41,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"rotation",o.rotationStep))}),U(42,"i",41),C(),x(43,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.updateTransform(r.actionItemId,"rotation",0))}),U(44,"i",29),C()()()(),U(45,"div",42),x(46,"div",30)(47,"span",31),U(48,"i",44),R(49," Offset X "),C(),x(50,"div",33)(51,"div",34)(52,"app-ui-slider",35),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"translateX",r))}),C(),x(53,"span",36),R(54),ki(55,"number"),C()(),x(56,"div",37)(57,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"translateX",-o.translateStep))}),U(58,"i",39),C(),x(59,"input",40),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"translateX",r))}),C(),x(60,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"translateX",o.translateStep))}),U(61,"i",41),C()()()(),x(62,"div",30)(63,"span",31),U(64,"i",45),R(65," Offset Y "),C(),x(66,"div",33)(67,"div",34)(68,"app-ui-slider",35),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"translateY",r))}),C(),x(69,"span",36),R(70),ki(71,"number"),C()(),x(72,"div",37)(73,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"translateY",-o.translateStep))}),U(74,"i",39),C(),x(75,"input",40),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"translateY",r))}),C(),x(76,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"translateY",o.translateStep))}),U(77,"i",41),C()()()(),U(78,"div",42),x(79,"div",30)(80,"span",31),U(81,"i",46),R(82," Opacity "),C(),x(83,"div",33)(84,"div",34)(85,"app-ui-slider",35),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"opacity",r))}),C(),x(86,"span",36),R(87),ki(88,"number"),C()(),x(89,"div",37)(90,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"opacity",-o.opacityStep))}),U(91,"i",39),C(),x(92,"input",40),W("ngModelChange",function(r){let o=z(t).tpl,s=S();return V(s.updateTransform(o.actionItemId,"opacity",r))}),C(),x(93,"app-ui-button",38),W("onClick",function(){let r=z(t).tpl,o=S();return V(o.step(r.actionItemId,"opacity",o.opacityStep))}),U(94,"i",41),C()()()()()}if(i&2){let t=e.$implicit,n=e.tpl,r=S();T(4),wt(" ",r.resolveLabel(n.actionItemId)," Transform "),T(2),le(r.state().templates.length>1?6:-1),T(10),q("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),T(2),wt("",qi(19,58,t.transform.scale,"1.2-2"),"\xD7"),T(3),q("text",!0),T(2),q("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),T(),q("text",!0),T(9),q("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),T(2),wt("",qi(36,61,t.transform.rotation,"1.0-1"),"\xB0"),T(3),q("text",!0),T(2),q("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),T(),q("text",!0),T(2),q("text",!0),T(9),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),T(2),wt("",qi(55,64,t.transform.translateX,"1.0-1"),"px"),T(3),q("text",!0),T(2),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),T(),q("text",!0),T(8),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),T(2),wt("",qi(71,67,t.transform.translateY,"1.0-1"),"px"),T(3),q("text",!0),T(2),q("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),T(),q("text",!0),T(9),q("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),T(2),ze(qi(88,70,t.transform.opacity,"1.2-2")),T(3),q("text",!0),T(2),q("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),T(),q("text",!0)}}function cre(i,e){if(i&1&&Rr(0,52),i&2){let t=S(2).$implicit;S(2);let n=dr(5);q("ngTemplateOutlet",n)("ngTemplateOutletContext",uv(2,c4,e,t))}}function dre(i,e){if(i&1&&ae(0,cre,1,5,"ng-container",52),i&2){let t,n=S().$implicit,r=S(2);le((t=r.state().images[n.actionItemId])?0:-1,t)}}function ure(i,e){if(i&1&&(x(0,"div",49)(1,"div",50),U(2,"i",51),R(3," Background "),C(),Rr(4,52),ae(5,dre,1,1),C()),i&2){let t,n=e.$implicit,r=S(2),o=dr(3);T(4),q("ngTemplateOutlet",o)("ngTemplateOutletContext",Ts(3,l4,n)),T(),le(n.isTransformationRequired&&((t=r.state().images[n.actionItemId])!=null&&t.src)?5:-1)}}function fre(i,e){if(i&1&&mt(0,ure,6,5,"div",49,d4),i&2){let t=S();gt(t.templates())}}function hre(i,e){if(i&1&&Rr(0,52),i&2){let t=S(3).$implicit;S(2);let n=dr(5);q("ngTemplateOutlet",n)("ngTemplateOutletContext",uv(2,c4,e,t))}}function pre(i,e){if(i&1&&ae(0,hre,1,5,"ng-container",52),i&2){let t,n=S(2).$implicit,r=S(2);le((t=r.state().images[n.actionItemId])?0:-1,t)}}function mre(i,e){if(i&1&&ae(0,pre,1,1),i&2){let t,n=S().$implicit,r=S(2);le((t=r.state().images[n.actionItemId])!=null&&t.src?0:-1)}}function gre(i,e){if(i&1){let t=Ae();x(0,"app-ui-accordion-panel",54),W("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onSelectEntry(r.actionItemId))}),x(1,"app-ui-accordion-header")(2,"div",55),U(3,"i",56),x(4,"span",57),R(5),C(),R(6),C()(),x(7,"app-ui-accordion-content")(8,"div",49),Rr(9,52),ae(10,mre,1,1),C()()()}if(i&2){let t=e.$implicit,n=S(2),r=dr(3);q("value",t.id),T(5),wt(" Background \u2014 ",n.resolveLabel(t.actionItemId)," "),T(),wt(" ",t.isTransformationRequired," "),T(3),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(6,l4,t)),T(),le(t.isTransformationRequired?10:-1)}}function vre(i,e){if(i&1&&(x(0,"app-ui-accordion",4),mt(1,gre,11,8,"app-ui-accordion-panel",53,d4),C()),i&2){let t,n=S();q("value",((t=n.templates()[0])==null?null:t.id)??((t=n.templates()[0])==null?null:t.actionItemId)),T(),gt(n.templates())}}var S_=class i{MediaLibraryType=Jd;templates=ye([]);userUniqueId=ye("");apiKey=ye("");uploadError=F(null);backgroundState=Z(oh);customizer=Z(Dn);state=this.backgroundState.state;mediaLibraryBackgroundLoading=Me(()=>!!this.backgroundState.mediaLibraryBackgroundLoadingKey());minScale=this.backgroundState.minScale;maxScale=this.backgroundState.maxScale;scaleStep=this.backgroundState.scaleStep;minRotation=this.backgroundState.minRotation;maxRotation=this.backgroundState.maxRotation;rotationStep=this.backgroundState.rotationStep;minTranslate=this.backgroundState.minTranslate;maxTranslate=this.backgroundState.maxTranslate;translateStep=this.backgroundState.translateStep;minOpacity=this.backgroundState.minOpacity;maxOpacity=this.backgroundState.maxOpacity;opacityStep=this.backgroundState.opacityStep;onSelectEntry(e){this.backgroundState.select(e)}resolveLabel(e){return this.backgroundState.resolveLabel(e)}onFileChange(e,t){let n=t.files?.[0];n&&this.backgroundState.onFileSelected(e,n).then(r=>{r?this.uploadError.set(r):this.uploadError.set(null)})}clearUploadError(){this.uploadError.set(null)}onMediaLibraryBackgroundSelected(e,t){!e||!t||!e.blobResourceId||!e.blobUri||this.backgroundState.onMediaLibraryBackgroundSelected(t,e.blobResourceId,e.blobUri,e.blobName)}remove(e){this.backgroundState.remove(e)}applyToAll(e){this.backgroundState.applyToAll(e)}updateTransform(e,t,n){this.backgroundState.updateTransform(t,n,e)}step(e,t,n){this.backgroundState.stepTransform(t,n,e)}resetTransform(e){this.backgroundState.resetTransform(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-background-panel"]],inputs:{templates:[1,"templates"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"]},decls:9,vars:3,consts:[["uploadArea",""],["transformContent",""],[1,"panel-body"],["role","alert",1,"error-message"],[1,"child-accordion",3,"value"],["message","Loading background from media library...",3,"show"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[1,"bg-upload-row"],[1,"bg-upload-wrapper"],["mode","basic","chooseLabel","Upload Background","secondaryLabel","PNG, JPG, SVG, WebP","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"bg-upload-hint"],[1,"bg-preview"],[3,"mediaType","userUniqueId","apiKey","header"],[1,"bg-filename"],["alt","Background preview",1,"bg-preview__img",3,"src"],["type","button",1,"bg-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[3,"itemSelected","mediaType","userUniqueId","apiKey","header"],[1,"ri-file-image-line"],[1,"ri-image-line"],[1,"bg-transform"],[1,"bg-transform-header"],[1,"bg-transform-title"],[1,"ri-crop-line"],[1,"bg-transform-actions"],["type","button",1,"bg-apply-all-btn"],["type","button",1,"bg-reset-btn",3,"click"],[1,"ri-reset-left-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"flex-1"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"stepper","mt-3"],[3,"onClick","text"],[1,"ri-subtract-line"],["type","number",1,"stepper-input",3,"ngModelChange","min","max","step","ngModel"],[1,"ri-add-line"],[1,"section-divider"],[1,"ri-refresh-line","prop-icon"],[1,"ri-arrow-left-right-line","prop-icon"],[1,"ri-arrow-up-down-line","prop-icon"],[1,"ri-contrast-line","prop-icon"],["type","button",1,"bg-apply-all-btn",3,"click"],[1,"ri-stack-fill"],[1,"bg-section"],[1,"bg-section-label"],[1,"ri-image-fill"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"value"],[3,"click","value"],[1,"accordion-header-content"],[1,"ri-image-fill","accordion-header-icon"],[1,"accordion-header-label"]],template:function(t,n){t&1&&(x(0,"div",2),ae(1,tre,6,1,"div",3),Bo(2,sre,10,4,"ng-template",null,0,cl)(4,lre,95,73,"ng-template",null,1,cl),ae(6,fre,2,0)(7,vre,3,1,"app-ui-accordion",4),U(8,"app-ui-loader",5),C()),t&2&&(T(),le(n.uploadError()?1:-1),T(5),le(n.templates().length<=1?6:7),T(2),q("show",n.mediaLibraryBackgroundLoading()))},dependencies:[Ut,jc,fr,hl,kp,Is,Np,Fp,zo,ta,Vi,hh,_i,_r,xr,ea,ph,mh,Wc],styles:['[_nghost-%COMP%]{display:block}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.bg-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;padding:12px 14px}.bg-section-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;text-transform:uppercase;color:#111827;letter-spacing:.07em;margin-bottom:10px}.bg-section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-upload-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}.bg-upload-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}.bg-upload-hint[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-style:italic;font-weight:500}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1.5px dashed #d1d5db;border-radius:10px;background:#fafafa;cursor:pointer;text-align:center;transition:border-color .18s,background .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:#9ca3af;transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.bg-preview[_ngcontent-%COMP%]{position:relative;width:72px;height:72px;flex-shrink:0;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;box-shadow:0 2px 8px #00000014}.bg-preview__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.bg-remove[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:#ef4444d9;color:#fff;font-size:11px;cursor:pointer;transition:background .15s,transform .15s}.bg-remove[_ngcontent-%COMP%]:hover{background:#ef4444;transform:scale(1.1)}.bg-filename[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#475569;margin-bottom:4px;min-height:18px}.bg-filename[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;flex-shrink:0}.bg-transform[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #f0f0f0}.bg-transform-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}.bg-transform-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.bg-transform-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.bg-transform-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid rgb(var(--primary-color, 98 101 241) / .28);background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:11px;font-weight:600;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-apply-all-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241) / .65);background:rgb(var(--primary-color, 98 101 241) / .16);color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-reset-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:start;gap:8px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:6px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:12px;color:#334155;font-variant-numeric:tabular-nums}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:25px;flex-shrink:0}.stepper-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#6b7280;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));border-radius:50%;color:rgb(var(--primary-color, 98 101 241))}.stepper-input[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:12px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-reset[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#64748b;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-reset[_ngcontent-%COMP%]:hover{border-color:#fca5a5;color:#ef4444}.section-divider[_ngcontent-%COMP%]{height:1px;background:#f0f0f0;margin:2px 0}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.bg-section[_ngcontent-%COMP%]{padding:10px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:42px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}.bg-section[_ngcontent-%COMP%]{padding:8px}}'],changeDetection:0})};var tg={whiteThreshold:242,fadeRange:24},sc=class i{minOverlayScale=.1;maxOverlayScale=8;defaultLetterSpacing=0;minLetterSpacing=-50;maxLetterSpacing=150;textMeasureContext=null;customizerState=Z(Dn);imageCompressionService=Z(qs);printAreaMeasurementService=Z(Yl);placements=F([]);showPlacementGuides=F(!1);placementZones=F([]);placementZoneBounds=F(new Map);placementZoneNormalizedBounds=F(new Map);definedPlacementZoneCache=F(new Map);textWarpEnvelope=F(null);warpEnvelopeFileName=F(null);warpUploadError=F(null);selectedEffectByOverlayId=F(new Map);warpEffectRequestSerial=0;mediaLibraryLogoLoadingId=F(null);minTextFontSize=6;hasBoundary=Me(()=>this.placements().some(e=>e.specificAreaSvgLink&&e.type!=="BACKGROUND"));warpEnvelopeReady=Me(()=>!!this.textWarpEnvelope());warpEnvelopeSummary=Me(()=>{let e=this.textWarpEnvelope();if(!e)return null;let{viewBox:t}=e;return`${t.minX.toFixed(0)}, ${t.minY.toFixed(0)}, ${t.width.toFixed(0)}, ${t.height.toFixed(0)}`});activeOverlayId=this.customizerState.activeOverlayId;setPlacements(e){let t=e??[];this.placements.set(t),this.customizerState.setPersonalizationPlacements(t)}setShowPlacementGuides(e){this.showPlacementGuides.set(!!e),this.customizerState.render2d()}setPlacementZones(e){this.placementZones.set(e??[])}refreshFromSvg(){this.refreshPlacementZonesFromSvg(),this.loadDefinedZonesFromPersonalizations()}onTextInput(e,t,n){let r=t?.target?.value?.trim()??"",o=this.getTextOverlaysForPlacement(e.placementKey)[0]??null;if(o){this.updateTextOverlayText(o,r);return}this.createTextOverlay(e,n??yr,r)}createTextOverlay(e,t,n=""){if(!this.customizerState.svgDoc())return null;let r=!!e.specificAreaSvgLink,o=r?this.findPlacementZoneByKey(e.placementKey):null,s=this.getOverlayBoundingRect();if(!s.width||!s.height)return null;let a=this.computeDefaultFontSize(s,o),l=r&&o?this.getPlacementZoneCenter(o,s):this.normalizeSvgPoint(typeof e.x=="number"?e.x:s.width*.5,typeof e.y=="number"?e.y:s.height*.6),c={kind:"text",id:`${e.placementKey}-${Date.now()}`,text:n,fill:"#1f2937",fontSize:a,horizontalScale:1,verticalScale:1,normalizedX:l.nx,normalizedY:l.ny,angle:0,lockAspectRatio:!0,fontFamily:t??yr,fontWeight:"normal",fontStyle:"normal",lineHeight:1.2,letterSpacing:0,stroke:jl,strokeWidth:0,secondStroke:Wl,secondStrokeWidth:0,curveAmount:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:nh,warpEnabled:!1,placementKey:e.placementKey},d=r&&o?this.applyPlacementZoneTextBounds(c):c;return this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),d}updateTextOverlayText(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r],s=this.applyPlacementZoneTextBounds(he(k({},o),{text:t?.trim()??""})),a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.clearTextGlyphPlan(s.id),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}onLogoFileSelected(e,t){if(!this.customizerState.svgDoc())return null;let n=e.files?.[0];if(!n)return null;if(n.size>26214400){let s=`Logo file size must not exceed ${25}MB`;return console.warn(`[PersonalizationService] Logo upload rejected: file exceeds ${25} MB limit.`),s}if(!(n.type.startsWith("image/")||/\.(png|jpg|jpeg|webp|svg)$/i.test(n.name)))return null;let o=new FileReader;return o.onload=()=>{let s=o.result;if(typeof s!="string")return;let a=new Image;a.onload=()=>{let l=a.naturalWidth||a.width,c=a.naturalHeight||a.height;if(l<=0||c<=0)return;let d=this.buildLogoOverlay(s,n.name,l,c,t);d&&this.imageCompressionService.compressImageToDataUrl(s).then(u=>{d.imageSrc3d=u,this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}).catch(u=>{console.warn("[PersonalizationService] Failed to compress logo image, using original",u),this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})})},a.src=s},o.readAsDataURL(n),null}async removeWhiteBackgroundFromLogo(e){if(!e)return;let t=this.customizerState.overlays(),n=t.findIndex(c=>c.id===e);if(n<0)return;let r=t[n];if(r.kind!=="logo")return;let o=await this.removeWhiteBackgroundFromImage(r.imageSrc);if(!o)return;let s=await this.imageCompressionService.compressImageToDataUrl(o).catch(c=>(console.error("[PersonalizationService] Failed to compress processed logo:",c),o)),a=k(k({},r),r.logoBlobId?{processedImageSrc:o,imageSrc3d:s}:{imageSrc:o,imageSrc3d:s}),l=[...t];l[n]=a,this.customizerState.overlays.set(l),this.customizerState.setActiveOverlay(a),this.customizerState.refreshFabricOverlays(),await this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}togglePlacementGuides(e){this.setShowPlacementGuides(e),this.customizerState.render2d()}trackPlacementZone(e,t){return t.id}updateOverlayProperty(e,t,n){let r=this.customizerState.overlays(),o=r.findIndex(s=>s.id===e.id);if(o>=0){let s=he(k({},r[o]),{[t]:n}),a=[...r];a[o]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}}updateOverlayProperties(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r];this.customizerState.clearOverlayRuntimeDimensions(o.id),Dt(o)&&this.customizerState.clearTextGlyphPlan(e.id);let s=k(k({},o),t);Dt(s)?(s=he(k({},s),{horizontalScale:this.normalizeScale(s.horizontalScale),verticalScale:this.normalizeScale(s.verticalScale)}),s=this.applyPlacementZoneTextBounds(s)):ai(s)&&(s=this.applyPlacementZoneLogoBounds(s));let a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild()})}getOverlayDimensionsPx(e){if(!e)return{width:0,height:0};let t=this.customizerState.overlayRuntimeDimensionsPx().get(e.id);if(t)return{width:Math.max(t.width,1),height:Math.max(t.height,1)};let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return{width:0,height:0};let r=this.resolveOverlayNormalizedSize(e);return{width:Math.max(r.width*n.width,1),height:Math.max(r.height*n.height,1)}}getOverlayDimensionsInches(e){if(!e)return{width:0,height:0};let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{width:0,height:0};let s=this.getOverlayDimensionsPx(e),a=t.height>0?t.height:t.width;return{width:this.printAreaMeasurementService.svgUnitsToInchesX(s.width,t.width,n),height:this.printAreaMeasurementService.svgUnitsToInchesY(s.height,a,o)}}getOverlayLetterSpacingInches(e){if(!e||e.kind!=="text")return 0;let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return t.width<=0||!n||n<=0?0:this.printAreaMeasurementService.svgUnitsToInchesX(e.letterSpacing??0,t.width,n)}updateOverlayDimensionsPx(e,t){let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return;let r=this.getOverlayDimensionsPx(e);if(r.width<=0||r.height<=0)return;let o={width:r.width/n.width,height:r.height/n.height},s=e.lockAspectRatio??!0,a=o.width/o.height,l=this.normalizeNormalizedDimension(t.widthPx!==void 0?t.widthPx/n.width:o.width),c=this.normalizeNormalizedDimension(t.heightPx!==void 0?t.heightPx/n.height:o.height);if(s&&Number.isFinite(a)&&a>0&&(t.widthPx!==void 0&&t.heightPx===void 0?c=this.normalizeNormalizedDimension(l/a):t.heightPx!==void 0&&t.widthPx===void 0?l=this.normalizeNormalizedDimension(c*a):t.widthPx!==void 0&&t.heightPx!==void 0&&(c=this.normalizeNormalizedDimension(l/a))),ai(e)){this.updateOverlayProperties(e,{normalizedWidth:l,normalizedHeight:c}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height);return}if(!Dt(e))return;let d=this.normalizeScale(e.horizontalScale),u=this.normalizeScale(e.verticalScale),f=o.width/d,h=o.height/u;if(f<=0||h<=0)return;let p=this.normalizeScale(l/f),v=this.normalizeScale(c/h);if(s)if(t.widthPx!==void 0&&t.heightPx===void 0)v=p;else if(t.heightPx!==void 0&&t.widthPx===void 0)p=v;else{let g=this.normalizeScale((p+v)/2);p=g,v=g}this.updateOverlayProperties(e,{horizontalScale:p,verticalScale:v}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height)}updateOverlayDimensionsInches(e,t){let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches(),o=this.customizerState.printAreaHeightInches(),s=o&&o>0?o:r;if(n.width<=0||!r||r<=0||!s||s<=0)return;let a=n.height>0?n.height:n.width,l=t.widthInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsX(t.widthInches,n.width,r):void 0,c=t.heightInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsY(t.heightInches,a,s):void 0;this.updateOverlayDimensionsPx(e,{widthPx:l,heightPx:c})}updateOverlayLetterSpacingInches(e,t){if(e.kind!=="text")return;let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches();if(n.width<=0||!r||r<=0)return;let o=this.printAreaMeasurementService.inchesToSvgUnitsX(t,n.width,r);this.updateOverlayProperties(e,{letterSpacing:Math.max(this.minLetterSpacing,Math.min(this.maxLetterSpacing,o))})}setOverlayAspectRatioLock(e,t){this.updateOverlayProperties(e,{lockAspectRatio:!!t})}getOverlayDimensionLimitsPx(e){if(!e)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};if(ai(e))return{minWidth:Math.max(.02*t.width,1),maxWidth:Math.max(t.width,1),minHeight:Math.max(.02*t.height,1),maxHeight:Math.max(t.height,1)};if(!Dt(e))return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let n=this.resolveOverlayNormalizedSize(e),r=this.normalizeScale(e.horizontalScale),o=this.normalizeScale(e.verticalScale),s=n.width/r,a=n.height/o,l=Math.max(s*this.minOverlayScale*t.width,1),c=Math.max(s*this.maxOverlayScale*t.width,l),d=Math.max(a*this.minOverlayScale*t.height,1),u=Math.max(a*this.maxOverlayScale*t.height,d);return{minWidth:l,maxWidth:c,minHeight:d,maxHeight:u}}getOverlayDimensionLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let s=this.getOverlayDimensionLimitsPx(e),a=t.height>0?t.height:t.width;return{minWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.minWidth,t.width,n),maxWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.maxWidth,t.width,n),minHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.minHeight,a,o),maxHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.maxHeight,a,o)}}getOverlayLetterSpacingLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return!e||t.width<=0||!n||n<=0?{min:0,max:0}:{min:this.printAreaMeasurementService.svgUnitsToInchesX(this.minLetterSpacing,t.width,n),max:this.printAreaMeasurementService.svgUnitsToInchesX(this.maxLetterSpacing,t.width,n)}}getActiveOverlay(){let e=this.customizerState.activeOverlayId();return e?this.customizerState.overlays().find(t=>t.id===e)??null:null}setActiveOverlay(e){this.customizerState.setActiveOverlay(e),e&&(this.customizerState.refreshFabricOverlays(),this.customizerState.render2d())}onMediaLibraryLogoSelected(e,t){if(!e||!t?.placementKey)return;let n=new Image;n.onload=()=>{let r=n.naturalWidth||n.width,o=n.naturalHeight||n.height;(r<=0||o<=0)&&(r=100,o=100);let s={id:`overlay-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,kind:"logo",logoBlobId:e.blobResourceId,imageSrc:e.blobUri,imageName:"logo-from-library",normalizedX:.5,normalizedY:.5,angle:0,normalizedWidth:.3,normalizedHeight:.3,originalWidth:r,originalHeight:o,opacity:1,lockAspectRatio:!0,placementKey:t.placementKey};this.mediaLibraryLogoLoadingId.set(s.id),this.imageCompressionService.compressImageToDataUrl(e.blobUri).then(a=>{s.imageSrc3d=a;let l=this.customizerState.overlays();this.customizerState.overlays.set([...l,s]),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d(),setTimeout(()=>{this.mediaLibraryLogoLoadingId()===s.id&&this.mediaLibraryLogoLoadingId.set(null)},500)})}).catch(a=>{console.warn("[PersonalizationService] Failed to compress media library logo image, using original",a);let l=this.customizerState.overlays();this.customizerState.overlays.set([...l,s]),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d(),setTimeout(()=>{this.mediaLibraryLogoLoadingId()===s.id&&this.mediaLibraryLogoLoadingId.set(null)},500)})})},n.onerror=()=>{console.warn("[PersonalizationService] Failed to load image from media library:",e.blobUri)},n.src=e.blobUri}getOverlayForPlacement(e){if(!e)return null;let t=this.customizerState.overlays(),n=this.customizerState.activeOverlayId(),r=n&&t.find(s=>s.id===n&&s.placementKey===e);if(r)return r;let o=t.find(s=>s.kind==="text"&&s.placementKey===e);return o||(t.find(s=>s.placementKey===e)??null)}getLogosForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="logo").filter(t=>t.placementKey===e):[]}getTextOverlaysForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="text"&&t.placementKey===e):[]}removeOverlay(e){let t=this.customizerState.overlays(),n=t.filter(o=>o.id!==e);if(n.length===t.length)return;this.customizerState.overlays.set(n),this.customizerState.clearOverlayRuntimeDimensions(e),this.customizerState.activeOverlayId()===e&&this.customizerState.setActiveOverlay(n[0]??null),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),this.selectedEffectByOverlayId.update(o=>{if(!o.has(e))return o;let s=new Map(o);return s.delete(e),s})}getSelectedEffectIdForOverlay(e){return e?this.selectedEffectByOverlayId().get(e)??null:null}setSelectedEffectByOverlay(e){let t=new Map;e.forEach(n=>{n?.overlayId&&t.set(n.overlayId,n.effectId??null)}),this.selectedEffectByOverlayId.set(t)}async applyTextEffect(e,t){if(!e||!Dt(e))return;let n=t?.fileUrl?.trim();if(!t||!n){this.warpUploadError.set(null),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}let r=++this.warpEffectRequestSerial;try{this.warpUploadError.set(null);let o=await fetch(n);if(!o.ok)throw new Error(`HTTP ${o.status}`);let s=await o.text();if(r!==this.warpEffectRequestSerial)return;let a=this.parseWarpEnvelope(s);if(!a){this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}this.applyWarpEnvelope(a,t.name||n,!1),this.setEffectForOverlay(e.id,t.id??null),this.updateOverlayProperties(e,{warpEnabled:!0,warpEnvelope:a})}catch(o){if(console.error(Va.failedFetchEffectSvg,o),r!==this.warpEffectRequestSerial)return;this.warpUploadError.set(Va.unableLoadEffectSvgUrl),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null})}}setEffectForOverlay(e,t){this.selectedEffectByOverlayId.update(n=>{let r=new Map(n);return r.set(e,t),r})}ingestWarpEnvelope(e,t){let n=this.parseWarpEnvelope(e);n&&this.applyWarpEnvelope(n,t)}parseWarpEnvelope(e){try{let n=new DOMParser().parseFromString(e,ss);if(n.querySelector(Yd))return this.warpUploadError.set(Va.warpSvgParsingError),null;let o=n.documentElement?.getAttribute("viewBox");if(!o)return this.warpUploadError.set(Va.warpSvgNeedsViewBox),null;let s=this.parseWarpViewBox(o);if(!s)return this.warpUploadError.set(Va.warpSvgInvalidViewBox),null;let a=n.getElementById("top"),l=n.getElementById("bottom"),c=a?.getAttribute("d")?.trim(),d=l?.getAttribute("d")?.trim();return!c||!d?(this.warpUploadError.set(Va.warpSvgNeedsTopBottomPath),null):(this.warpUploadError.set(null),{viewBox:s,topPathD:c,bottomPathD:d})}catch(t){return console.error(Va.failedIngestWarpEnvelope,t),this.warpUploadError.set(Va.warpEnvelopeReadFailed),null}}applyWarpEnvelope(e,t,n=!0){this.textWarpEnvelope.set(e),this.warpEnvelopeFileName.set(t),this.customizerState.setTextWarpEnvelope(e),this.customizerState.clearAllTextGlyphPlans(),this.customizerState.refreshFabricOverlays(),n&&this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}parseWarpViewBox(e){let t=e.split(/[,\s]+/).map(a=>Number.parseFloat(a)).filter(a=>Number.isFinite(a));if(t.length!==4)return null;let[n,r,o,s]=t;return o<=0||s<=0?null:{minX:n,minY:r,width:o,height:s}}isSupportedFontFile(e){if(!e)return!1;if(/\.otf$/i.test(e.name))return!0;let n=(e.type||"").toLowerCase();return n==="font/otf"||n==="application/x-font-otf"||n==="application/font-sfnt"}resolveOverlayLabel(e){if(e.placementKey){let t=this.findPlacementZoneByKey(e.placementKey);if(t)return t.label}return e.kind==="text"?"Enter Name":e.kind==="logo"?e.imageName??"Logo":e.id}clampNormalizedToPlacementZone(e,t,n){let s=Qt.clamp(t,0,1),a=Qt.clamp(n,0,1),l=e.placementKey;if(!l)return{x:s,y:a};let c=this.getPlacementZoneNormalizedBoundsByKey(l);if(!c)return{x:s,y:a};let d=this.estimateOverlayNormalizedSize(e),u=Math.max(d.width/2-0,0),f=Math.max(d.height/2-0,0),h=c.minX+u-0,p=c.maxX-u+0,v=c.minY+f-0,g=c.maxY-f+0;return h<p?s=Qt.clamp(s,h,p):s=(c.minX+c.maxX)/2,v<g?a=Qt.clamp(a,v,g):a=(c.minY+c.maxY)/2,{x:s,y:a}}applyPlacementZoneTextBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=k({},e),s=this.estimateOverlayNormalizedSize(o);if(s.width>n||s.height>r){let m=Math.min(n/s.width,r/s.height),b=Math.max((o.fontSize??this.minTextFontSize)*m,this.minTextFontSize),y=b/(o.fontSize||1);o=he(k({},o),{fontSize:b,letterSpacing:(o.letterSpacing??0)*y,strokeWidth:(o.strokeWidth??0)*y,secondStrokeWidth:(o.secondStrokeWidth??0)*y,shadowBlur:(o.shadowBlur??0)*y,shadowOffsetX:(o.shadowOffsetX??0)*y,shadowOffsetY:(o.shadowOffsetY??0)*y}),s=this.estimateOverlayNormalizedSize(o)}let a=0,l=0,c=Math.max(s.width/2-a,0),d=Math.max(s.height/2-l,0),u=t.minX+c-a,f=t.maxX-c+a,h=t.minY+d-l,p=t.maxY-d+l,v=u<=f?Qt.clamp(o.normalizedX,u,f):(t.minX+t.maxX)/2,g=h<=p?Qt.clamp(o.normalizedY,h,p):(t.minY+t.maxY)/2;return he(k({},o),{normalizedX:v,normalizedY:g})}applyPlacementZoneLogoBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=Math.min(.02,n),s=Math.min(.02,r),a=Math.max(e.normalizedWidth,o),l=Math.max(e.normalizedHeight,s),c=a>0?n/a:1,d=l>0?r/l:1,u=Math.min(c,d,1);u<1&&(a*=u,l*=u),a=Math.min(Math.max(a,o),n),l=Math.min(Math.max(l,s),r);let f=a/2,h=l/2,p=t.minX+f,v=t.maxX-f,g=t.minY+h,m=t.maxY-h,b=p<=v?Qt.clamp(e.normalizedX,p,v):(t.minX+t.maxX)/2,y=g<=m?Qt.clamp(e.normalizedY,g,m):(t.minY+t.maxY)/2;return he(k({},e),{normalizedWidth:a,normalizedHeight:l,normalizedX:b,normalizedY:y})}getPlacementZoneBoundsByKey(e){return this.placementZoneBounds().get(e)??null}getPlacementZoneNormalizedBoundsByKey(e){return this.placementZoneNormalizedBounds().get(e)??null}findPlacementZoneByKey(e){return this.placementZones().find(t=>t.placementKey===e)??null}refreshPlacementZonesFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.placementZoneNormalizedBounds.set(new Map);return}let t=this.getOverlayBoundingRect();if(!t.width||!t.height){this.placementZones.set([]);return}let n=Array.from(e.querySelectorAll("[placement-key]")),r=[],o=new Map,s=new Map;for(let a of n){let l=a.getAttribute(me.PLACEMENT_KEY)?.trim();if(!l)continue;let c=this.readElementBounds(a);if(!c)continue;let d=this.computePlacementZoneNormalizedBounds(c,t);if(!d)continue;let u=a.getAttribute("id")?.trim();u||(u=this.generatePlacementZoneId(l,e),a.setAttribute("id",u));let f=this.extractPlacementPathData(a);if(!f)continue;let h=this.normalizePlacementAllowedKinds(a.getAttribute(me.DATA_ALLOWED)),p={id:u,placementKey:l,label:a.getAttribute(me.DATA_LABEL)?.trim()??u??l,elementName:a.tagName.toLowerCase(),allowedKinds:h,required:(a.getAttribute(me.DATA_REQUIRED)??"false").toLowerCase()==="true",pathData:f,bounds:c};r.push(p),s.set(l,c),o.set(l,d)}r.sort((a,l)=>a.label.localeCompare(l.label)),this.placementZones.set(r),this.placementZoneBounds.set(s),this.placementZoneNormalizedBounds.set(o),this.reapplyDefinedPlacementZonesFromCache()}async loadDefinedZonesFromPersonalizations(){let e=this.customizerState.svgDoc();if(!e)return;let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return;let n=this.placements().filter(r=>r.specificAreaSvgLink&&r.type!=="BACKGROUND");for(let r of n)try{let o=this.definedPlacementZoneCache().get(r.placementKey);if(o){this.upsertPlacementZoneDefinition(o.zone,o.bounds,o.normalized);continue}if(!r.specificAreaSvgLink)continue;let s=await fetch(r.specificAreaSvgLink);if(!s.ok)continue;let a=await s.text(),c=new DOMParser().parseFromString(a,ss);if(c.documentElement.nodeName.toLowerCase()!=="svg")continue;let d=c.documentElement.querySelector("path, circle, rect, polygon, ellipse, g");if(!d)continue;let u=this.extractPlacementPathData(d);if(!u)continue;let f=this.measurePathBounds(u)??this.readElementBounds(d);if(!f)continue;let h=this.computePlacementZoneNormalizedBounds(f,t);if(!h)continue;let p=this.generatePlacementZoneId(r.placementKey,e),v=["text","logo"],g={id:p,placementKey:r.placementKey,label:r.name||r.placementKey,elementName:"path",allowedKinds:v,required:!1,pathData:u,bounds:f};this.cacheDefinedPlacementZone(g,f,h),this.upsertPlacementZoneDefinition(g,f,h)}catch{}this.sortPlacementZones(),this.customizerState.render2d()}computePlacementZoneNormalizedBounds(e,t){if(!t.width||!t.height)return null;let n=(e.x-t.x)/t.width,r=(e.x+e.width-t.x)/t.width,o=(e.y-t.y)/t.height,s=(e.y+e.height-t.y)/t.height;return r<=n||s<=o?null:{minX:Qt.clamp(n,0,1),maxX:Qt.clamp(r,0,1),minY:Qt.clamp(o,0,1),maxY:Qt.clamp(s,0,1)}}measurePathBounds(e){if(!e||typeof document>"u")return null;let t=document.createElementNS(Di,"svg");t.setAttribute("width","0"),t.setAttribute("height","0"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none";let n=document.createElementNS(t.namespaceURI,"path");n.setAttribute("d",e),t.appendChild(n),document.body.appendChild(t);try{let r=n.getBBox();return!r||r.width<=0||r.height<=0?null:{x:r.x,y:r.y,width:r.width,height:r.height}}catch{return null}finally{t.parentNode?.removeChild(t)}}upsertPlacementZoneDefinition(e,t,n){this.placementZones.update(r=>{let o=[...r],s=o.findIndex(a=>a.placementKey===e.placementKey);return s>=0?o[s]=e:o.push(e),o}),this.placementZoneBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o}),this.placementZoneNormalizedBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,n),o})}cacheDefinedPlacementZone(e,t,n){this.definedPlacementZoneCache.update(r=>{let o=new Map(r);return o.set(e.placementKey,{zone:e,bounds:t,normalized:n}),o})}reapplyDefinedPlacementZonesFromCache(){this.definedPlacementZoneCache().size&&(this.definedPlacementZoneCache().forEach(({zone:e,bounds:t,normalized:n})=>{this.findPlacementZoneByKey(e.placementKey)||this.upsertPlacementZoneDefinition(e,t,n)}),this.sortPlacementZones())}sortPlacementZones(){this.placementZones.update(e=>[...e].sort((t,n)=>t.label.localeCompare(n.label)))}normalizePlacementAllowedKinds(e){let t=(e??"").split(/[\s,]+/).map(r=>r.trim().toLowerCase()).filter(Boolean),n=new Set;return t.forEach(r=>{r==="text"||r==="texts"?n.add("text"):(r==="logo"||r==="logos"||r==="image")&&n.add("logo")}),n.size||n.add("text"),Array.from(n)}generatePlacementZoneId(e,t){let n=e&&e.trim().length?e.trim():"placement-zone",r=n,o=1;for(;t.getElementById(r);)r=`${n}-${o}`,o+=1;return r}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}extractPlacementPathData(e){let t=e.tagName.toLowerCase();if(t==="path")return e.getAttribute("d")?.trim()??null;if(t==="rect")return this.rectElementToPathData(e);if(t==="polygon")return this.polygonElementToPathData(e);if(t==="circle"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("r")??"50");return this.circleToPath(r,o,s)}if(t==="ellipse"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("rx")??"50"),a=parseFloat(n.getAttribute("ry")??"50");return this.ellipseToPath(r,o,s,a)}return null}rectElementToPathData(e){let t=Number.parseFloat(e.getAttribute("x")??"0"),n=Number.parseFloat(e.getAttribute("y")??"0"),r=Number.parseFloat(e.getAttribute("width")??"0"),o=Number.parseFloat(e.getAttribute("height")??"0");return!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0?null:`M${t},${n} h${r} v${o} h${-r} Z`}polygonElementToPathData(e){let t=e.getAttribute("points")?.trim().split(/[\s,]+/).map(r=>Number.parseFloat(r))??[];if(t.length<4||t.length%2!==0)return null;let n=[];for(let r=0;r<t.length;r+=2)n.push(`${t[r]},${t[r+1]}`);return n.length===0?null:`M${n[0]} L${n.slice(1).join(" ")} Z`}circleToPath(e,t,n){let r=e+n,o=e-n;return`M ${r} ${t} A ${n} ${n} 0 1 0 ${o} ${t} A ${n} ${n} 0 1 0 ${r} ${t}`}ellipseToPath(e,t,n,r){let o=e+n,s=e-n;return`M ${o} ${t} A ${n} ${r} 0 1 0 ${s} ${t} A ${n} ${r} 0 1 0 ${o} ${t}`}getOverlayBoundingRect(){let e=this.customizerState.svgDoc();if(!e)return{x:0,y:0,width:0,height:0};let t=e.documentElement,n=t.viewBox?.baseVal;if(n&&n.width>0&&n.height>0)return{x:n.x,y:n.y,width:n.width,height:n.height};let r=Number.parseFloat(t.getAttribute("width")??"0"),o=Number.parseFloat(t.getAttribute("height")??"0");return r>0&&o>0?{x:0,y:0,width:r,height:o}:{x:0,y:0,width:1e3,height:1e3}}normalizeSvgPoint(e,t){let n=this.getOverlayBoundingRect();return!n.width||!n.height?{nx:.5,ny:.5}:{nx:e/n.width,ny:t/n.height}}computeDefaultFontSize(e,t){let n=t?Math.min(t.bounds.width,t.bounds.height):Math.min(e.width,e.height),o=Math.min(Math.max(n*.12,20),150);return Math.round(o*100)/100}estimateOverlayNormalizedSize(e){let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return{width:0,height:0};if(e.kind==="logo")return{width:e.normalizedWidth,height:e.normalizedHeight};let n=this.measureTextOverlaySizeInSvgUnits(e);return{width:n.width/t.width,height:n.height/t.height}}getTextMeasureContext(){if(this.textMeasureContext)return this.textMeasureContext;if(typeof document>"u")return null;let e=document.createElement("canvas");return this.textMeasureContext=e.getContext("2d"),this.textMeasureContext}measureTextOverlaySizeInSvgUnits(e){let t=Math.max(e.fontSize,1),n=e.lineHeight??1.2,r=Math.max(t*n,t),o=(e.text||"").split(/\r?\n/),s=o.length?o:[""],a=e.letterSpacing??0,l=e.fontStyle??"normal",c=e.fontWeight??"normal",d=(e.fontFamily??"sans-serif").trim()||"sans-serif",u=t*.6,f=this.getTextMeasureContext();f&&(f.font=`${l} ${c} ${t}px ${d}`);for(let _ of s){let w=_.length?_:" ",D=f?f.measureText(w).width:w.length*t*.58,A=Math.max(w.length-1,0)*a;u=Math.max(u,D+A)}let h=this.normalizeScale(e.horizontalScale),p=this.normalizeScale(e.verticalScale),v=Number.isFinite(e.strokeWidth)?e.strokeWidth:0,g=Number.isFinite(e.secondStrokeWidth)?e.secondStrokeWidth:0,m=g>0?(v+g)*2:v*2,b=Math.max(u+m,t*.6),y=Math.max(r*s.length+m,r);return{width:Math.max(b*h,1),height:Math.max(y*p,1)}}buildLogoOverlay(e,t,n,r,o){if(!this.customizerState.svgDoc())return null;let s=!!o.specificAreaSvgLink,a=s?this.findPlacementZoneByKey(o.placementKey):null,l=this.getOverlayBoundingRect(),c=r>0?n/r:1,d,u;if(s&&a){let p=this.getPlacementZoneNormalizedBoundsByKey(a.placementKey);if(p){let v=p.maxX-p.minX,g=p.maxY-p.minY,m=Math.min(v*.8,g*.8,1);d=m,u=m/c;let b=Math.min((p.maxX-p.minX)/d,(p.maxY-p.minY)/u,1);d*=b,u*=b}else d=.28,u=d/c}else if(o.width&&o.height){let p=o.width,v=o.height,g=Math.min(p/n,v/r,1);d=g,u=g}else d=.28,u=d/c,u>.6&&(u=.6,d=u*c),d>.6&&(d=.6,u=d/c);d=Math.max(Math.min(d,.9),.05),u=Math.max(Math.min(u,.9),.05);let f;if(s&&a){let p=this.getPlacementZoneCenter(a,l);f={nx:p.nx,ny:p.ny}}else f=typeof o.x=="number"&&typeof o.y=="number"?this.normalizeSvgPoint(o.x,o.y):{nx:.5,ny:.42};let h={kind:"logo",id:`logo-${Date.now()}`,normalizedX:f.nx,normalizedY:f.ny,angle:0,lockAspectRatio:!0,imageSrc:e,imageName:t,originalWidth:n,originalHeight:r,normalizedWidth:d,normalizedHeight:u,opacity:1,placementKey:o.placementKey};return s&&a&&(h=this.applyPlacementZoneLogoBounds(h)),h}async removeWhiteBackgroundFromImage(e){let t=e;if(e.startsWith("blob:")){let d=await this.convertBlobUriToDataUrl(e);if(!d)return console.error("[PersonalizationService] Failed to convert blob URI to data URL for background removal"),null;t=d}let n=await this.loadImage(t);if(!n)return console.error("[PersonalizationService] Failed to load image for background removal from source:",e),null;let r=n.naturalWidth||n.width,o=n.naturalHeight||n.height;if(r<=0||o<=0)return console.error("[PersonalizationService] Invalid image dimensions:",{width:r,height:o}),null;let s=document.createElement("canvas");s.width=r,s.height=o;let a=s.getContext("2d",{willReadFrequently:!0});if(!a)return console.error("[PersonalizationService] Failed to get canvas 2d context"),null;try{a.drawImage(n,0,0,r,o)}catch(d){return console.error("[PersonalizationService] Failed to draw image to canvas:",d),null}let l;try{l=a.getImageData(0,0,r,o)}catch(d){return console.error("[PersonalizationService] Failed to get image data from canvas (likely tainted canvas):",d),null}let c=l.data;for(let d=0;d<c.length;d+=4){let u=c[d],f=c[d+1],h=c[d+2],p=c[d+3];if(p===0)continue;let v=Math.min(u,f,h),g=tg.whiteThreshold-tg.fadeRange;if(v>=tg.whiteThreshold){c[d+3]=0;continue}if(v>g){let m=(tg.whiteThreshold-v)/tg.fadeRange;c[d+3]=Math.max(0,Math.min(255,Math.round(p*m)))}}return a.putImageData(l,0,0),s.toDataURL("image/png")}normalizeScale(e){return Number.isFinite(e)?Qt.clamp(e,this.minOverlayScale,this.maxOverlayScale):1}normalizeNormalizedDimension(e){return Number.isFinite(e)?Qt.clamp(e,.02,1):.02}resolveOverlayNormalizedSize(e){return this.estimateOverlayNormalizedSize(e)}loadImage(e){return new Promise(t=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=()=>{console.error("[PersonalizationService] Failed to load image from source:",e),t(null)},n.src=e})}getPlacementZoneCenter(e,t){let n=e.bounds.x+e.bounds.width/2,r=e.bounds.y+e.bounds.height/2;return{nx:t.width?(n-t.x)/t.width:.5,ny:t.height?(r-t.y)/t.height:.5}}reset(){this.placementZoneNormalizedBounds.set(new Map)}async convertBlobUriToDataUrl(e){try{let t=await fetch(e);if(!t.ok)return console.error("[PersonalizationService] Failed to fetch blob URI:",e,t.status),null;let n=await t.blob();return new Promise(r=>{let o=new FileReader;o.onload=()=>{let s=o.result;r(typeof s=="string"?s:null)},o.onerror=()=>{console.error("[PersonalizationService] Failed to read blob as data URL"),r(null)},o.readAsDataURL(n)})}catch(t){return console.error("[PersonalizationService] Error converting blob URI to data URL:",t),null}}refreshTextOverlays(){this.customizerState.refreshFabricOverlays(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var gh=class i{decimals=ye(2);el=Z(Oi);regex=Me(()=>new RegExp(`^-?\\d*(\\.\\d{0,${this.decimals()}})?$`));onInput(e){let t=e.target,n=t.value;n&&(this.regex().test(n)||(t.value=this.trim(n)))}onBlur(){let e=this.el.nativeElement,t=parseFloat(e.value);isNaN(t)||(e.value=t.toFixed(this.decimals()))}onKeyDown(e){["e","E","+"].includes(e.key)&&e.preventDefault()}trim(e){let t=e.split(".");return t.length>1?(t[1]=t[1].slice(0,this.decimals()),t.join(".")):e}static \u0275fac=function(t){return new(t||i)};static \u0275dir=In({type:i,selectors:[["","appDecimalLimit",""]],hostBindings:function(t,n){t&1&&W("input",function(o){return n.onInput(o)})("blur",function(){return n.onBlur()})("keydown",function(o){return n.onKeyDown(o)})},inputs:{decimals:[1,"decimals"]}})};var bre=()=>[],u4=i=>({$implicit:i}),w_=(i,e)=>e.id,yre=(i,e)=>e.value,f4=(i,e)=>e.placementKey;function xre(i,e){if(i&1){let t=Ae();x(0,"div",2)(1,"label",5)(2,"input",6),W("ngModelChange",function(r){z(t);let o=S();return V(o.onToggleGuides(r))}),C(),x(3,"span",7),U(4,"span",8),C(),x(5,"span",9),U(6,"i",10),R(7," Show Text Guides "),C()()()}if(i&2){let t=S();T(),dt("is-on",t.showGuides()),T(),q("ngModel",t.showGuides())}}function _re(i,e){i&1&&(x(0,"div",17),U(1,"i",22),x(2,"span",23),R(3,"No text lines yet"),C(),x(4,"span",24),R(5,'Click "Add Name" to start a new text line for this placement.'),C()())}function Sre(i,e){if(i&1){let t=Ae();x(0,"div",26)(1,"input",27),W("ngModelChange",function(r){let o=z(t).$implicit,s=S(4);return V(s.onTextModelChange(o,r))})("focus",function(){let r=z(t).$implicit,o=S(4);return V(o.onSelectOverlay(r))})("click",function(){let r=z(t).$implicit,o=S(4);return V(o.onSelectOverlay(r))}),C(),x(2,"div",28)(3,"app-ui-button",29),W("onClick",function(){let r=z(t).$implicit,o=S(4);return V(o.onSelectOverlay(r))}),U(4,"i",30),C(),x(5,"app-ui-button",31),W("onClick",function(){let r=z(t).$implicit,o=S(4);return V(o.onRemoveTextOverlay(r))}),U(6,"i",32),C()()()}if(i&2){let t=e.$implicit,n=S(3).$implicit,r=S();dt("is-active",t.id===r.activeOverlayId()),T(),q("placeholder","Enter "+n.name)("ngModel",t.text),T(2),q("severity",t.id===r.activeOverlayId()?"primary":"secondary"),T(2),q("text",!0)}}function Cre(i,e){if(i&1&&(x(0,"div",18),mt(1,Sre,7,6,"div",25,w_),C()),i&2){let t=S(2).$implicit,n=S();T(),gt(n.textOverlaysForPlacement(t))}}function wre(i,e){if(i&1&&(x(0,"span",36),R(1),C()),i&2){let t=S();T(),ze(t.imageName)}}function Ere(i,e){i&1&&(x(0,"div",54),R(1),C()),i&2&&(T(),ze(e))}function Mre(i,e){i&1&&(x(0,"div",54),R(1),C()),i&2&&(T(),ze(e))}function Tre(i,e){if(i&1&&(x(0,"option",68),R(1),C()),i&2){let t=e.$implicit;q("value",t.value),T(),ze(t.label)}}function Dre(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",66),R(3," Typography"),C(),x(4,"div",41)(5,"span",42),R(6,"Font"),C(),x(7,"select",67),W("ngModelChange",function(r){z(t);let o=S(2),s=S(3);return V(s.onFontFamilyChange(o,r))}),mt(8,Tre,2,2,"option",68,yre),C()()}if(i&2){let t=S(2),n=S(2).$implicit,r=S();T(7),q("ngModel",t.fontFamily??r.defaultFontFamilyByPlacement().get(n.placementKey)??r.defaultCustomFontFamily),T(),gt(r.fontOptionsByPlacement().get(n.placementKey)??Tw(1,bre))}}function Are(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",69),R(3," Colour"),C(),x(4,"div",70)(5,"span",42),R(6,"Fill"),C(),x(7,"div",71)(8,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=S(2),s=S(3);return V(s.onFillChange(o,r))}),C()()(),x(9,"div",70)(10,"span",42),R(11,"Outline"),C(),x(12,"div",71)(13,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=S(2),s=S(3);return V(s.onStrokeChange(o,r))}),C(),x(14,"div",63)(15,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=S(2),s=S(3);return V(s.onStrokeWidthChange(o,r))}),C(),x(16,"span",65),R(17),C()()()(),x(18,"div",70)(19,"span",42),R(20,"Outline 2"),C(),x(21,"div",71)(22,"app-customizer-color-panel",72),W("colorSelected",function(r){z(t);let o=S(2),s=S(3);return V(s.onSecondStrokeChange(o,r))}),C(),x(23,"div",63)(24,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=S(2),s=S(3);return V(s.onSecondStrokeWidthChange(o,r))}),C(),x(25,"span",65),R(26),C()()()()}if(i&2){let t=S(2),n=S(2).$implicit,r=S();T(8),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.fill),T(5),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.stroke),T(2),q("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.strokeWidth??r.minStrokeWidth()),T(2),wt("",t.strokeWidth??r.minStrokeWidth(),"px"),T(5),q("palette",r.paletteByItemId().get(n.id))("activeColor",t.secondStroke),T(2),q("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.secondStrokeWidth??r.minStrokeWidth()),T(2),wt("",t.secondStrokeWidth??r.minStrokeWidth(),"px")}}function Ire(i,e){if(i&1&&(x(0,"option",74),R(1),C()),i&2){let t=e.$implicit;q("ngValue",t.id),T(),ze(t.name)}}function Pre(i,e){if(i&1){let t=Ae();U(0,"div",60),x(1,"div",39),U(2,"i",73),R(3," Effect"),C(),x(4,"div",41)(5,"span",42),R(6,"Style"),C(),x(7,"select",67),W("ngModelChange",function(r){z(t);let o=S(2),s=S(2).$implicit,a=S();return V(a.onEffectChange(o,s,r))}),x(8,"option",74),R(9,"\u2014 None \u2014"),C(),mt(10,Ire,2,2,"option",74,w_),C()()}if(i&2){let t=S(2),n=S(2).$implicit,r=S();T(7),q("ngModel",r.selectedEffectIdForOverlay(t)),T(),q("ngValue",null),T(2),gt(r.effectsByItemId().get(n.id))}}function Ore(i,e){if(i&1){let t=Ae();x(0,"div",37)(1,"div",39),U(2,"i",40),R(3," Sizing"),C(),x(4,"div",41)(5,"span",42),R(6,"Font Size"),C(),x(7,"div",43)(8,"app-ui-button",44),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onFontSizeStep(r,-o.fontSizeStep()))}),U(9,"i",45),C(),x(10,"input",46),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onFontSizeChange(o,r))}),C(),x(11,"span",47),R(12,"px"),C(),x(13,"app-ui-button",44),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onFontSizeStep(r,o.fontSizeStep()))}),U(14,"i",48),C()()(),x(15,"div",41)(16,"span",42),R(17,"Rotation"),C(),x(18,"div",43)(19,"app-ui-button",49),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onRotationStep(r,-o.rotationStep()))}),U(20,"i",45),C(),x(21,"input",50),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onRotationChange(o,r))}),C(),x(22,"span",47),R(23,"\xB0"),C(),x(24,"app-ui-button",49),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onRotationStep(r,o.rotationStep()))}),U(25,"i",48),C(),x(26,"app-ui-button",51),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onRotationReset(r))}),U(27,"i",52),C()()(),x(28,"div",41)(29,"span",42),R(30,"Spacing"),C(),x(31,"div",43)(32,"input",46),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onLetterSpacingChange(o,r))}),C(),x(33,"span",47),R(34,"in"),C()()(),x(35,"div",41)(36,"span",42),R(37,"Width"),C(),x(38,"div",43)(39,"input",53),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onOverlayWidthChange(o,r))}),C(),x(40,"span",47),R(41,"in"),C()()(),ae(42,Ere,2,1,"div",54),x(43,"div",41)(44,"span",42),R(45,"Height"),C(),x(46,"div",43)(47,"input",53),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onOverlayHeightChange(o,r))}),C(),x(48,"span",47),R(49,"in"),C()()(),ae(50,Mre,2,1,"div",54),x(51,"label",55)(52,"input",56),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onAspectRatioToggle(o,r))}),C(),U(53,"i",57),x(54,"span"),R(55,"Lock Ratio"),C()(),x(56,"app-ui-button",58),W("onClick",function(){z(t);let r=S(),o=S(3);return V(o.onResetTextDimensions(r))}),U(57,"i",59),R(58),C(),ae(59,Dre,10,2),ae(60,Are,27,16),ae(61,Pre,12,2),U(62,"div",60),x(63,"div",39),U(64,"i",61),R(65," Shadow"),C(),x(66,"div",62)(67,"div",41)(68,"span",42),R(69,"Blur"),C(),x(70,"div",63)(71,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onShadowBlurChange(o,r))}),C(),x(72,"span",65),R(73),C()()(),x(74,"div",41)(75,"span",42),R(76,"Offset X"),C(),x(77,"div",63)(78,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onShadowOffsetXChange(o,r))}),C(),x(79,"span",65),R(80),C()()(),x(81,"div",41)(82,"span",42),R(83,"Offset Y"),C(),x(84,"div",63)(85,"app-ui-slider",64),W("ngModelChange",function(r){z(t);let o=S(),s=S(3);return V(s.onShadowOffsetYChange(o,r))}),C(),x(86,"span",65),R(87),C()()()()()}if(i&2){let t,n,r,o,s,a=S(),l=S(2).$implicit,c=S();T(8),q("text",!0)("disabled",a.fontSize<=c.minFontSize()),T(2),q("ngModel",a.fontSize)("min",c.minFontSize())("max",c.maxFontSize())("step",c.fontSizeStep()),T(3),q("text",!0)("disabled",a.fontSize>=c.maxFontSize()),T(6),q("text",!0),T(2),q("ngModel",a.angle),T(3),q("text",!0),T(2),q("text",!0),T(6),q("ngModel",c.overlayLetterSpacingInches(a))("min",c.overlayLetterSpacingLimitsInches(a).min)("max",c.overlayLetterSpacingLimitsInches(a).max)("step",c.letterSpacingStep()),T(7),q("ngModel",c.overlayWidthInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),T(3),le((t=c.overlayDimensionError(a,"width"))?42:-1,t),T(5),q("ngModel",c.overlayHeightInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),T(3),le((n=c.overlayDimensionError(a,"height"))?50:-1,n),T(),dt("ratio-lock--on",c.isAspectRatioLocked(a)),T(),q("ngModel",c.isAspectRatioLocked(a)),T(4),q("text",!0),T(2),wt(" ",c.labels.resetTextDimensions," "),T(),le((r=c.fontOptionsByPlacement().get(l.placementKey))!=null&&r.length?59:-1),T(),le((o=c.paletteByItemId().get(l.id))!=null&&o.length?60:-1),T(),le((((s=c.effectsByItemId().get(l.id))==null?null:s.length)??0)>0?61:-1),T(10),q("min",c.minShadowBlur())("max",c.maxShadowBlur())("step",c.shadowBlurStep())("ngModel",a.shadowBlur??c.defaultShadowBlur()),T(2),wt("",a.shadowBlur??c.defaultShadowBlur(),"px"),T(5),q("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetX??c.defaultShadowOffsetX()),T(2),wt("",a.shadowOffsetX??c.defaultShadowOffsetX(),"px"),T(5),q("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetY??c.defaultShadowOffsetY()),T(2),wt("",a.shadowOffsetY??c.defaultShadowOffsetY(),"px")}}function Rre(i,e){i&1&&(x(0,"div",38),U(1,"i",75),x(2,"p",76),R(3," Drag the logo inside any 2D view or directly on the 3D model to reposition it. Use the corner handles in the 2D preview to scale or rotate. "),C(),x(4,"p",77),U(5,"i",78),R(6," Tip: Switch the selected view to drop additional logos onto other areas of the garment. "),C()())}function kre(i,e){if(i&1&&(x(0,"div",20)(1,"div",33),U(2,"i",34),x(3,"span",35),R(4),C(),ae(5,wre,2,1,"span",36),C(),ae(6,Ore,88,47,"div",37)(7,Rre,7,0,"div",38),C()),i&2){let t=e,n=S(3);T(4),ze(n.resolveOverlayLabel(t)),T(),le(t.kind===n.overlayKind.LOGO&&t.imageName?5:-1),T(),le(t.kind===n.overlayKind.TEXT?6:7)}}function Fre(i,e){i&1&&(x(0,"div",21),U(1,"i",79),x(2,"span",24),R(3,"Add text for this placement to unlock size & rotation controls."),C()())}function Nre(i,e){if(i&1){let t=Ae();x(0,"div",11)(1,"div",12)(2,"span",13),U(3,"i",14),R(4," Text Lines "),C(),x(5,"app-ui-button",15),W("onClick",function(){z(t);let r=S().$implicit,o=S();return V(o.onAddTextOverlay(r))}),U(6,"i",16),C()(),ae(7,_re,6,0,"div",17)(8,Cre,3,0,"div",18),C(),x(9,"div",11)(10,"div",12)(11,"span",13),U(12,"i",19),R(13," Overlay Transform "),C()(),ae(14,kre,8,3,"div",20)(15,Fre,4,0,"div",21),C()}if(i&2){let t,n=S().$implicit,r=S();T(5),q("label",dv("Add ",n.name))("text",!0),T(2),le(r.textOverlaysForPlacement(n).length===0?7:8),T(7),le((t=r.overlayForPlacement(n))?14:15,t)}}function Lre(i,e){if(i&1){let t=Ae();x(0,"div",81),U(1,"i",89),x(2,"span"),R(3),C(),x(4,"button",90),W("click",function(){z(t);let r=S(3);return V(r.clearLogoUploadError())}),U(5,"i",91),C()()}if(i&2){let t=S(3);T(3),ze(t.logoUploadError())}}function Ure(i,e){if(i&1){let t=Ae();x(0,"app-media-library-items",92),W("itemSelected",function(r){z(t);let o=S(2).$implicit,s=S();return V(s.onMediaLibraryLogoSelected(r,o))}),C()}if(i&2){let t=S(3);q("mediaType",t.MediaLibraryType.LOGO)("userUniqueId",t.userUniqueId())("apiKey",t.apiKey())("header","Your Logo Library")}}function Bre(i,e){if(i&1&&(x(0,"option",68),R(1),C()),i&2){let t=e.$implicit;q("value",t.id),T(),ze(t.imageName||"Logo")}}function zre(i,e){if(i&1){let t=Ae();x(0,"div",41)(1,"span",42),R(2),C(),x(3,"select",67),W("ngModelChange",function(r){z(t);let o=S(3).$implicit,s=S();return V(s.onLogoSelectionChange(o,r))}),mt(4,Bre,2,2,"option",68,w_),C()()}if(i&2){let t=S(3).$implicit,n=S();T(2),ze(n.labels.logoToEdit),T(),q("ngModel",n.selectedLogoIdForPlacement(t)),T(),gt(n.logosForPlacement(t))}}function Vre(i,e){i&1&&(x(0,"div",54),R(1),C()),i&2&&(T(),ze(e))}function Hre(i,e){i&1&&(x(0,"div",54),R(1),C()),i&2&&(T(),ze(e))}function Gre(i,e){if(i&1){let t=Ae();x(0,"div",86)(1,"div",39),U(2,"i",93),R(3," Logo Settings"),C(),ae(4,zre,6,2,"div",41),x(5,"div",41)(6,"span",42),R(7,"Width"),C(),x(8,"div",43)(9,"input",53),W("ngModelChange",function(r){let o=z(t),s=S(3);return V(s.onOverlayWidthChange(o,r))}),C(),x(10,"span",47),R(11,"in"),C()()(),ae(12,Vre,2,1,"div",54),x(13,"div",41)(14,"span",42),R(15,"Height"),C(),x(16,"div",43)(17,"input",53),W("ngModelChange",function(r){let o=z(t),s=S(3);return V(s.onOverlayHeightChange(o,r))}),C(),x(18,"span",47),R(19,"in"),C()()(),ae(20,Hre,2,1,"div",54),x(21,"label",55)(22,"input",56),W("ngModelChange",function(r){let o=z(t),s=S(3);return V(s.onAspectRatioToggle(o,r))}),C(),U(23,"i",57),x(24,"span"),R(25,"Lock Ratio"),C()()()}if(i&2){let t,n,r=e,o=S(2).$implicit,s=S();T(4),le(s.logosForPlacement(o).length>1?4:-1),T(5),q("ngModel",s.overlayWidthInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),T(3),le((t=s.overlayDimensionError(r,"width"))?12:-1,t),T(5),q("ngModel",s.overlayHeightInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),T(3),le((n=s.overlayDimensionError(r,"height"))?20:-1,n),T(),dt("ratio-lock--on",s.isAspectRatioLocked(r)),T(),q("ngModel",s.isAspectRatioLocked(r))}}function jre(i,e){i&1&&(x(0,"div",17),U(1,"i",94),x(2,"span",23),R(3,"No logos yet"),C(),x(4,"span",24),R(5,"Upload a PNG, JPG, WebP, or SVG to place one."),C()())}function Wre(i,e){i&1&&U(0,"i",100)}function $re(i,e){i&1&&U(0,"i",101)}function Yre(i,e){if(i&1){let t=Ae();x(0,"div",96),W("click",function(){let r=z(t).$implicit,o=S(3).$implicit,s=S();return V(s.onLogoSelectionChange(o,r.id))}),U(1,"img",97),x(2,"div",98)(3,"button",99),W("click",function(r){let o=z(t).$implicit,s=S(4);return r.stopPropagation(),V(s.onRemoveWhiteBackground(o))}),ae(4,Wre,1,0,"i",100)(5,$re,1,0,"i",101),C(),x(6,"button",102),W("click",function(r){let o=z(t).$implicit,s=S(4);return r.stopPropagation(),V(s.onLogoRemove(o))}),U(7,"i",32),C()()()}if(i&2){let t=e.$implicit,n=S(4);T(),q("src",t.imageSrc,fi)("alt",t.imageName||"Logo"),T(2),q("disabled",n.isRemovingWhiteBackground(t.id))("appTooltip",n.labels.removeWhiteBgTooltip),fn("aria-label",n.labels.removeWhiteBg),T(),le(n.isRemovingWhiteBackground(t.id)?4:5)}}function Xre(i,e){if(i&1&&(x(0,"div",88),mt(1,Yre,8,6,"div",95,w_),C()),i&2){let t=S(2).$implicit,n=S();T(),gt(n.logosForPlacement(t))}}function qre(i,e){if(i&1){let t=Ae();x(0,"div",11)(1,"div",12)(2,"span",13),U(3,"i",80),R(4," Logo Upload "),C()(),ae(5,Lre,6,1,"div",81),x(6,"app-ui-fileupload",82),W("onSelect",function(r){z(t);let o=S().$implicit,s=S();return V(s.onLogoFileSelected(r,o))}),C(),x(7,"p",83),U(8,"i",84),R(9," Logos drop onto the selected view. Adjust size and rotation from the 2D preview handles. Max file size: 25MB "),C(),ae(10,Ure,1,4,"app-media-library-items",85),ae(11,Gre,26,12,"div",86),x(12,"div",87),ae(13,jre,6,0,"div",17)(14,Xre,3,0,"div",88),C()()}if(i&2){let t,n=S().$implicit,r=S();T(5),le(r.logoUploadError()?5:-1),T(5),le(r.userUniqueId()?10:-1),T(),le((t=r.logoOverlayForPlacement(n))?11:-1,t),T(2),le(r.logosForPlacement(n).length===0?13:14)}}function Kre(i,e){if(i&1&&(ae(0,Nre,16,5),ae(1,qre,15,4,"div",11)),i&2){let t=e.$implicit,n=S();le(t.type===n.personalizationItemType.TEXT?0:-1),T(),le(t.type===n.personalizationItemType.LOGO?1:-1)}}function Zre(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",68)(1,"app-ui-accordion-header")(2,"div",103),U(3,"i"),x(4,"span",104),R(5),C()()(),x(6,"app-ui-accordion-content"),Rr(7,105),C()()),i&2){let t=e.$implicit,n=S(2),r=dr(3);q("value",t.id),T(3),ur(dv("",t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"," accordion-header-icon")),T(2),ze(t.name),T(2),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(7,u4,t))}}function Jre(i,e){if(i&1&&(x(0,"app-ui-accordion"),mt(1,Zre,8,9,"app-ui-accordion-panel",68,f4),C()),i&2){let t=S();T(),gt(t.placements())}}function Qre(i,e){if(i&1&&(x(0,"div",106)(1,"div",107),U(2,"i"),x(3,"span"),R(4),C()(),Rr(5,105),C()),i&2){let t=e.$implicit,n=S(2),r=dr(3);T(2),ur(t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"),T(2),ze(t.name),T(),q("ngTemplateOutlet",r)("ngTemplateOutletContext",Ts(5,u4,t))}}function eoe(i,e){if(i&1&&(x(0,"div",3),mt(1,Qre,6,7,"div",106,f4),C()),i&2){let t=S();T(),gt(t.placements())}}var C_=class i{overlayKind=za;personalizationItemType=Ha;MediaLibraryType=Jd;defaultCustomFontFamily=yr;labels=bU;fontSizeDebounceTimer;items=ye([]);userUniqueId=ye("");apiKey=ye("");useAccordion=Me(()=>(this.items()??[]).length>1);paletteByItemId=Me(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=new Map,r=t.packs??[];for(let o of r)if((o.type??"").toLowerCase().includes(Ga.COLOR))for(let s of o.dataSources??[]){if(!s||s.isActive===!1)continue;let a=s.colorCode?.trim();!a||n.has(a)||n.set(a,{label:(s.name??a).trim()||a,color:a,position:s.position??n.size})}e.set(t.id,[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,color:s})=>({label:o,color:s})))}return e});effectsByItemId=Me(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=t.packs??[];e.set(t.id,n.filter(r=>(r.type??"").toLowerCase().includes(Ga.EFFECT)).flatMap(r=>r.dataSources).sort((r,o)=>r.position-o.position))}return e});personalization=Z(sc);customizer=Z(Dn);placements=this.personalization.placements;hasBoundary=this.personalization.hasBoundary;showGuides=this.personalization.showPlacementGuides;activeOverlayId=this.personalization.activeOverlayId;logoUploadError=F(null);fontSourceMap=F({});fontOptions=F([]);fontOptionsByPlacement=F(new Map);defaultFontFamilyByPlacement=Me(()=>{let e=new Map;return this.fontOptionsByPlacement().forEach((t,n)=>{e.set(n,t[0]?.value??yr)}),e});fontBinaryPromises=F(new Map);fontFacePromises=F(new Map);fontFacesReady=F(new Set);removingWhiteBgLogoIds=F(new Set);selectedLogoIdByPlacement=F(new Map);dimensionErrorsByOverlayId=F(new Map);mediaLibraryLogoLoading=this.personalization.mediaLibraryLogoLoadingId;isLoadingMediaLibraryLogo=Me(()=>!!this.mediaLibraryLogoLoading());minFontSize=F(12);maxFontSize=F(400);fontSizeStep=F(2);rotationStep=F(5);defaultFontWeight=F("normal");defaultFontStyle=F("normal");defaultLetterSpacing=F(0);strokeWidthStep=F(.5);minStrokeWidth=F(0);maxStrokeWidth=F(30);letterSpacingStep=F(.01);defaultCurveAmount=F(0);minCurveAmount=F(-100);maxCurveAmount=F(150);curveAmountStep=F(1);defaultShadowBlur=F(0);minShadowBlur=F(0);maxShadowBlur=F(60);shadowBlurStep=F(1);defaultShadowOffsetX=F(0);defaultShadowOffsetY=F(0);minShadowOffset=F(-120);maxShadowOffset=F(120);shadowOffsetStep=F(1);minDimensionInches=F(.01);maxDimensionInches=F(4e3);constructor(){Yt(()=>{this.personalization.setPlacements(this.items())}),Yt(()=>{this.ingestFontPacks(this.items())})}overlayForPlacement(e){return this.personalization.getOverlayForPlacement(e.placementKey)}logosForPlacement(e){return this.personalization.getLogosForPlacement(e.placementKey)}textOverlaysForPlacement(e){return this.personalization.getTextOverlaysForPlacement(e.placementKey)}onToggleGuides(e){this.personalization.togglePlacementGuides(e)}onTextInput(e,t){let n=this.defaultFontFamilyByPlacement().get(e.placementKey)??yr;this.queueFontFaceLoad(n),this.personalization.onTextInput(e,t,n)}onAddTextOverlay(e){let t=this.defaultFontFamilyByPlacement().get(e.placementKey)??yr;this.queueFontFaceLoad(t),this.personalization.createTextOverlay(e,t)}onTextModelChange(e,t){this.personalization.updateTextOverlayText(e,t)}onSelectOverlay(e){if(Dt(e)){let t=e.fontFamily?.trim()||yr;this.queueFontFaceLoad(t)}this.personalization.setActiveOverlay(e)}onRemoveTextOverlay(e){this.personalization.removeOverlay(e.id)}onLogoFileSelected(e,t){let n=this.personalization.onLogoFileSelected(e,t);n?this.logoUploadError.set(n):this.logoUploadError.set(null)}clearLogoUploadError(){this.logoUploadError.set(null)}onMediaLibraryLogoSelected(e,t){this.personalization.onMediaLibraryLogoSelected(e,t)}onLogoRemove(e){this.personalization.removeOverlay(e.id)}async onRemoveWhiteBackground(e){if(!this.removingWhiteBgLogoIds().has(e.id)){this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.add(e.id),n});try{await this.personalization.removeWhiteBackgroundFromLogo(e.id)}finally{this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.delete(e.id),n})}}}isRemovingWhiteBackground(e){return this.removingWhiteBgLogoIds().has(e)}resolveOverlayLabel(e){return this.personalization.resolveOverlayLabel(e)}onFontSizeChange(e,t,n=!0){if(!e||!Dt(e))return;let r=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(r)&&(n?(clearTimeout(this.fontSizeDebounceTimer),this.fontSizeDebounceTimer=setTimeout(()=>{this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))})},600)):this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))}))}onFontSizeStep(e,t){if(!e||!Dt(e))return;let n=e.fontSize||this.minFontSize();this.onFontSizeChange(e,n+t,!1)}onRotationChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{angle:n})}onRotationStep(e,t){if(!e||!Dt(e))return;let n=e.angle||0;this.onRotationChange(e,n+t)}onRotationReset(e){!e||!Dt(e)||this.personalization.updateOverlayProperties(e,{angle:0})}overlayWidthInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).width*100)/100}overlayHeightInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).height*100)/100}overlayLetterSpacingInches(e){return Math.round(this.personalization.getOverlayLetterSpacingInches(e)*100)/100}overlayLetterSpacingLimitsInches(e){return this.personalization.getOverlayLetterSpacingLimitsInches(e)}isAspectRatioLocked(e){return e.lockAspectRatio??!0}onAspectRatioToggle(e,t){this.personalization.setOverlayAspectRatioLock(e,!!t)}onOverlayWidthChange(e,t){this.applyOverlayDimensionChange(e,t,"width")}onOverlayHeightChange(e,t){this.applyOverlayDimensionChange(e,t,"height")}onResetTextDimensions(e){!e||!Dt(e)||(this.personalization.updateOverlayProperties(e,{horizontalScale:1,verticalScale:1}),this.setOverlayDimensionError(e.id,"width",null),this.setOverlayDimensionError(e.id,"height",null))}overlayDimensionError(e,t){return this.dimensionErrorsByOverlayId().get(e.id)?.[t]??null}onFontFamilyChange(e,t){if(!e||!Dt(e))return;let n=(t??"").trim();n&&this.queueFontFaceLoad(n),this.personalization.updateOverlayProperties(e,{fontFamily:t})}toggleFontWeight(e){if(!e||!Dt(e))return;let n=(e.fontWeight??this.defaultFontWeight())==="bold"?"normal":"bold";this.personalization.updateOverlayProperties(e,{fontWeight:n})}toggleFontStyle(e){if(!e||!Dt(e))return;let n=(e.fontStyle??this.defaultFontStyle())==="italic"?"normal":"italic";this.personalization.updateOverlayProperties(e,{fontStyle:n})}onFillChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="string"&&t.trim().length>0?t:e.fill;this.personalization.updateOverlayProperties(e,{fill:n})}onStrokeChange(e,t){if(!e||!Dt(e))return;let n=e.stroke??"#111827",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{stroke:r})}onStrokeWidthChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{strokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onSecondStrokeChange(e,t){if(!e||!Dt(e))return;let n=e.secondStroke??"#ffffff",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{secondStroke:r})}onSecondStrokeWidthChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{secondStrokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onLetterSpacingChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(n))return;let r=this.personalization.getOverlayLetterSpacingLimitsInches(e),o=Math.max(r.min,Math.min(r.max,n));this.personalization.updateOverlayLetterSpacingInches(e,o)}onCurveAmountChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{curveAmount:Math.max(this.minCurveAmount(),Math.min(this.maxCurveAmount(),n))})}onShadowBlurChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowBlur:Math.max(this.minShadowBlur(),Math.min(this.maxShadowBlur(),n))})}onShadowOffsetXChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetX:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}onShadowOffsetYChange(e,t){if(!e||!Dt(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetY:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}selectedEffectIdForOverlay(e){return e?.id?this.personalization.getSelectedEffectIdForOverlay(e.id):null}onEffectChange(e,t,n){if(!e||!Dt(e)||!t?.id)return;let o=(this.effectsByItemId().get(t.id)??[]).find(s=>s.id===n)??null;this.personalization.applyTextEffect(e,o)}logoOverlayForPlacement(e){let t=this.logosForPlacement(e);if(!t.length)return null;let n=this.selectedLogoIdByPlacement().get(e.placementKey);if(n){let o=t.find(s=>s.id===n);if(o)return o}let r=this.overlayForPlacement(e);return r&&ai(r)?r:t[0]??null}selectedLogoIdForPlacement(e){return this.logoOverlayForPlacement(e)?.id??null}onLogoSelectionChange(e,t){if(!e?.placementKey||!t)return;this.selectedLogoIdByPlacement.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o});let n=this.logosForPlacement(e).find(r=>r.id===t);n&&this.onSelectOverlay(n)}normalizeDimensionInput(e){let t=typeof e=="number"?e:Number.parseFloat(e);return Number.isFinite(t)?t:Number.NaN}applyOverlayDimensionChange(e,t,n){let r=n==="width"?this.labels.widthLabel:this.labels.heightLabel,o=this.normalizeDimensionInput(t);if(!Number.isFinite(o)){this.setOverlayDimensionError(e.id,n,`${r} is required.`);return}let s=this.personalization.getOverlayDimensionLimitsInches(e),a=n==="width"?s.minWidth:s.minHeight,l=n==="width"?s.maxWidth:s.maxHeight;if(o<a){this.setOverlayDimensionError(e.id,n,`Min required: ${a.toFixed(2)} in`);return}if(o>l){this.setOverlayDimensionError(e.id,n,`Max required: ${l.toFixed(2)} in`);return}if(this.setOverlayDimensionError(e.id,n,null),n==="width"){this.personalization.updateOverlayDimensionsInches(e,{widthInches:o});return}this.personalization.updateOverlayDimensionsInches(e,{heightInches:o})}setOverlayDimensionError(e,t,n){this.dimensionErrorsByOverlayId.update(r=>{let o=r.get(e)??{width:null,height:null};if(o[t]===n)return r;let s=new Map(r);return s.set(e,he(k({},o),{[t]:n})),s})}ingestFontPacks(e){let t={},n=new Map,r=new Map;e.forEach(a=>{if(!a?.placementKey)return;let l=new Map;(a.packs??[]).filter(d=>(d.type??"").toLowerCase().includes("font")).forEach(d=>{(d.dataSources??[]).forEach(u=>{if(!u||u.isActive===!1)return;let f=(u.fontFamily??u.name??"").trim();if(!f)return;let h=this.resolveFontSource(u);h&&(t[f]=h,n.has(f)||n.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??n.size+1}),l.has(f)||l.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??l.size+1}))})}),l.size&&r.set(a.placementKey,l)});let o=new Map;r.forEach((a,l)=>{o.set(l,[...a.values()].sort((c,d)=>c.position-d.position).map(({label:c,value:d})=>({label:c,value:d})))});let s=[...n.values()].sort((a,l)=>a.position-l.position).map(({label:a,value:l})=>({label:a,value:l}));this.fontSourceMap.set(t),this.fontOptions.set(s),this.fontOptionsByPlacement.set(o),this.queueInitialFontFaceLoads(e,s,o)}queueInitialFontFaceLoads(e,t,n){let r=new Set;if(n.forEach(o=>{let s=o[0]?.value?.trim();s&&r.add(s)}),e.forEach(o=>{this.personalization.getTextOverlaysForPlacement(o.placementKey).forEach(a=>{let l=a.fontFamily?.trim();l&&r.add(l)})}),!r.size){let o=t[0]?.value?.trim();o&&r.add(o)}r.forEach(o=>this.queueFontFaceLoad(o))}resolveFontSource(e){let t=e.fontUrl?.trim();return t||(e.fileUrl?.trim()?e.fileUrl:null)}queueFontFaceLoad(e){if(!this.isBrowser()||!this.fontSourceMap()[e]||this.fontFacesReady().has(e))return;let n=this.fontFacePromises().get(e);if(!n){if(n=this.ensureFontFaceLoaded(e)??void 0,!n)return;this.fontFacePromises.update(r=>{let o=new Map(r);return o.set(e,n),o})}n.then(()=>{this.fontFacesReady().has(e)||this.fontFacesReady.update(r=>{let o=new Set(r);return o.add(e),o}),this.personalization.refreshTextOverlays()}).catch(r=>{console.error(Yx(e),r)})}isBrowser(){return typeof window<"u"}ensureFontFaceLoaded(e){let t=this.fontBinaryPromises().get(e);return t?t.then(n=>new Promise((r,o)=>{let s=new FontFace(e,n,{style:"normal",weight:"normal",stretch:"normal"});s.load().then(()=>{document.fonts&&document.fonts.add(s),r()}).catch(o)})).catch(n=>{throw console.error(rU(e),n),n}):null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-personalization-panel"]],inputs:{items:[1,"items"],userUniqueId:[1,"userUniqueId"],apiKey:[1,"apiKey"]},decls:7,vars:3,consts:[["placementContent",""],[1,"panel-body"],[1,"guide-toggle-bar"],[1,"placement-list"],["message","Loading logo from media library...",3,"show"],[1,"guide-toggle-label"],["type","checkbox",1,"guide-toggle-input",3,"ngModelChange","ngModel"],[1,"guide-toggle-track"],[1,"guide-toggle-knob"],[1,"guide-toggle-text"],[1,"ri-ruler-2-line","guide-toggle-icon"],[1,"ctrl-section"],[1,"ctrl-section-header"],[1,"ctrl-section-title"],[1,"ri-text-wrap"],["severity","secondary",1,"add-name-btn",3,"onClick","label","text"],[1,"ri-add-circle-line"],[1,"empty-state"],[1,"text-overlay-list"],[1,"ri-tools-line"],[1,"transform-box"],[1,"empty-state","empty-state--sm"],[1,"ri-cursor-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[1,"text-overlay-row",3,"is-active"],[1,"text-overlay-row"],["type","text",1,"text-overlay-input",3,"ngModelChange","focus","click","placeholder","ngModel"],[1,"text-overlay-actions"],["appTooltip","Select to transform","tooltipPosition","top",3,"onClick","severity"],[1,"ri-compasses-2-fill"],["severity","secondary","appTooltip","Remove text line","tooltipPosition","top",1,"remove-btn",3,"onClick","text"],[1,"ri-delete-bin-6-fill"],[1,"transform-overlay-label"],[1,"ri-focus-3-line"],[1,"font-medium"],[1,"transform-overlay-filename"],[1,"name-number-overlay-box"],[1,"logo-hint"],[1,"prop-group-heading"],[1,"ri-font-size"],[1,"prop-row"],[1,"prop-label"],[1,"stepper"],[3,"onClick","text","disabled"],[1,"ri-subtract-line"],["type","number","appDecimalLimit","2",1,"stepper-input",3,"ngModelChange","ngModel","min","max","step"],[1,"stepper-unit"],[1,"ri-add-line"],[3,"onClick","text"],["type","number","appDecimalLimit","2","step","0.5",1,"stepper-input",3,"ngModelChange","ngModel"],["severity","secondary","appTooltip","Reset rotation","tooltipPosition","top",3,"onClick","text"],[1,"ri-reset-left-line"],["type","number","appDecimalLimit","2","step","0.01",1,"stepper-input",3,"ngModelChange","ngModel","min","max"],[1,"field-error"],[1,"ratio-lock"],["type","checkbox",1,"ratio-lock-input",3,"ngModelChange","ngModel"],[1,"ri-link"],["severity","secondary",1,"reset-size-btn",3,"onClick","text"],[1,"ri-restart-line"],[1,"section-divider"],[1,"ri-stack-line"],[1,"shadow-group"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-font-family"],[1,"prop-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"ri-palette-line"],[1,"prop-row","prop-row--top"],[1,"prop-control"],[3,"colorSelected","palette","activeColor"],[1,"ri-magic-line"],[3,"ngValue"],[1,"ri-drag-move-2-line","logo-hint-icon"],[1,"logo-hint-text"],[1,"logo-hint-tip"],[1,"ri-lightbulb-line"],[1,"ri-mouse-line","empty-state-icon"],[1,"ri-image-add-line"],["role","alert",1,"logo-error-message"],["mode","basic","chooseLabel","Upload Logo","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"upload-hint"],[1,"ri-information-line"],[3,"mediaType","userUniqueId","apiKey","header"],[1,"logo-settings-box"],[1,"logo-grid-wrapper"],[1,"logo-grid"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[3,"itemSelected","mediaType","userUniqueId","apiKey","header"],[1,"ri-aspect-ratio-line"],[1,"ri-image-2-line","empty-state-icon"],[1,"logo-card"],[1,"logo-card",3,"click"],[1,"logo-card-img",3,"src","alt"],[1,"logo-card-overlay"],["type","button","tooltipPosition","top",1,"logo-card-action",3,"click","disabled","appTooltip"],[1,"ri-loader-4-line","animate-spin"],[1,"ri-eraser-line"],["type","button","appTooltip","Remove","tooltipPosition","top",1,"logo-card-action","logo-card-action--danger",3,"click"],[1,"accordion-header-content"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"]],template:function(t,n){t&1&&(x(0,"div",1),ae(1,xre,8,3,"div",2),Bo(2,Kre,2,2,"ng-template",null,0,cl),ae(4,Jre,3,0,"app-ui-accordion")(5,eoe,3,0,"div",3),U(6,"app-ui-loader",4),C()),t&2&&(T(),le(n.hasBoundary()?1:-1),T(3),le(n.useAccordion()?4:5),T(2),q("show",n.isLoadingMediaLibraryLogo()))},dependencies:[Ut,jc,fr,Wv,$v,hl,kp,vE,jv,Is,Np,Fp,zo,ta,hh,Vi,_i,_r,xr,oc,ea,bi,ph,mh,gh],styles:['.logo-error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.logo-error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.logo-error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.guide-toggle-bar[_ngcontent-%COMP%]{padding:10px 14px 8px;border-bottom:1px solid #f0f0f0}.guide-toggle-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.guide-toggle-input[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0;height:0}.guide-toggle-track[_ngcontent-%COMP%]{position:relative;display:inline-block;width:36px;height:20px;background:#d1d5db;border-radius:9999px;transition:background .25s ease;flex-shrink:0}.guide-toggle-knob[_ngcontent-%COMP%]{position:absolute;top:3px;left:3px;width:14px;height:14px;background:#fff;border-radius:50%;box-shadow:0 1px 4px #0000002e;transition:transform .25s ease}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-track[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241))}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-knob[_ngcontent-%COMP%]{transform:translate(16px)}.guide-toggle-text[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#111827}.guide-toggle-icon[_ngcontent-%COMP%]{font-size:14px;color:#374151}.ctrl-section[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:1px solid #f5f5f5}.ctrl-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.ctrl-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.ctrl-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.ctrl-section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.add-name-btn[_ngcontent-%COMP%]{font-size:13px!important}.text-overlay-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.text-overlay-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;transition:border-color .15s,box-shadow .15s}.text-overlay-row.is-active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.text-overlay-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:none;outline:none;background:transparent;font-size:13px;color:#1f2937;padding:2px 0}.text-overlay-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.text-overlay-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px;flex-shrink:0}.remove-btn[_ngcontent-%COMP%]{color:#ef4444!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:12px}.empty-state-icon[_ngcontent-%COMP%]{font-size:22px;color:#d1d5db;margin-bottom:2px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.empty-state-sub[_ngcontent-%COMP%]{font-size:12px;color:#64748b;line-height:1.5}.transform-box[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;overflow:hidden}.transform-overlay-label[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid #e5e7eb;font-size:13px;font-weight:600;color:#111827}.transform-overlay-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));font-size:13px}.transform-overlay-filename[_ngcontent-%COMP%]{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.name-number-overlay-box[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:8px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#64748b;margin-top:4px}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px;color:rgb(var(--primary-color, 98 101 241))}.section-divider[_ngcontent-%COMP%]{height:1px;background:#e5e7eb;margin:4px -12px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:28px}.prop-row--top[_ngcontent-%COMP%]{align-items:flex-start}.prop-label[_ngcontent-%COMP%]{flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-control[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px}.prop-select[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:4px 8px;font-size:12px;color:#1f2937;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}.prop-select[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .15)}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%}.stepper-input[_ngcontent-%COMP%]{width:100%;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:13px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-unit[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-weight:500}.field-error[_ngcontent-%COMP%]{margin-top:-4px;margin-left:80px;font-size:11px;color:#dc2626;line-height:1.3}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:12px;color:#374151;font-variant-numeric:tabular-nums}.shadow-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 10px;border-radius:8px;background:#00000006;border:1px solid #e9eaec}.ratio-lock[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;width:fit-content;margin-top:2px;font-size:12px;font-weight:600;color:#374151;cursor:pointer;-webkit-user-select:none;user-select:none}.ratio-lock-input[_ngcontent-%COMP%]{margin:0}.ratio-lock--on[_ngcontent-%COMP%]{color:#111827;font-weight:700}.reset-size-btn[_ngcontent-%COMP%]{width:fit-content;font-size:12px!important}.logo-settings-box[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:4px;padding:10px;border-radius:8px;border:1px solid #e5e7eb;background:#f9fafb;display:flex;flex-direction:column;gap:8px}.logo-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px}.logo-hint-icon[_ngcontent-%COMP%]{font-size:20px;color:#d1d5db;align-self:center}.logo-hint-text[_ngcontent-%COMP%]{font-size:12px;color:#374151;line-height:1.55;margin:0}.logo-hint-tip[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;font-size:11px;color:#6b7280;margin:0}.logo-hint-tip[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#f59e0b;font-size:12px;flex-shrink:0;margin-top:1px}.upload-hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#64748b;margin:6px 0 0}.upload-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#94a3b8;flex-shrink:0}.upload-logo-btn[_ngcontent-%COMP%] button.p-button[_ngcontent-%COMP%]{font-size:14px!important}.logo-grid-wrapper[_ngcontent-%COMP%]{margin-top:10px}.logo-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.logo-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 1px 3px #0000000f}.logo-card-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.logo-card-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:space-between;padding:6px;opacity:.7;background:linear-gradient(160deg,rgba(0,0,0,.32) 0%,transparent 60%);transition:opacity .2s ease}.logo-card[_ngcontent-%COMP%]:hover .logo-card-overlay[_ngcontent-%COMP%]{opacity:1}.logo-card-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:none;background:#ffffffe0;color:#374151;font-size:13px;cursor:pointer;box-shadow:0 1px 4px #0000002e;transition:background .15s,color .15s,transform .15s}.logo-card-action[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241));color:#fff;transform:scale(1.1)}.logo-card-action--danger[_ngcontent-%COMP%]:hover{background:#ef4444;color:#fff}.logo-card-action[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:13px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#111827;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:46px}.logo-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var vh=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternPathInput=F("");patternFillInput=F(ql);patternOpacityInput=F(1);patternOverlays=F([]);state=Me(()=>({overlays:this.patternOverlays(),fill:this.patternFillInput(),opacity:this.patternOpacityInput()}));reset(){this.patternOverlays.set([]),this.patternPathInput.set(""),this.patternFillInput.set(ql),this.patternOpacityInput.set(1)}refreshFromSvg(){this.refreshPatternOverlaysFromSvg()}async onAddPatternPathFromUrl(e,t,n){let r=this.customizerState.svgDoc();if(!r){this.showErrorDialog($s.svgRequired,os.svgRequired);return}if(!e){this.showErrorDialog($s.svgUrlRequired,os.svgUrlRequired);return}if(!this.patternOverlays().some(o=>o.sourceUrl===e))try{let o=await fetch(e,{cache:"no-cache"});if(!o.ok)throw new Error(`Failed to load SVG (${o.status})`);let s=await o.text();if(!s||!s.includes(Xx)){this.showErrorDialog($s.invalidSvgContent,os.invalidSvgContent);return}let l=new DOMParser().parseFromString(s,ss);if(l.querySelector(Yd)){this.showErrorDialog($s.unableToParseSvg,os.unableToParseSvg);return}let c=Array.from(l.querySelectorAll("path"));if(c.length===0){this.showErrorDialog($s.noPathElements,os.noPathElements);return}let d=this.ensurePatternOverlayLayer();c.forEach((u,f)=>{let h=r.importNode(u,!0),p=h.getAttribute("d")?.trim();if(!p)return;let v=this.readPresentationValue(h,"fill"),g=this.readPresentationValue(h,"opacity"),m=v&&v.toLowerCase()!=="none"?v:this.patternFillInput().trim()||ql,b=this.clampPatternOpacity(g?Number.parseFloat(g):this.patternOpacityInput()),y=Math.round(b*1e3)/1e3,_=h.getAttribute("id")?.trim(),w=_??`overlay-${Date.now()}-${f}`,D=this.generatePatternOverlayId(w);this.patternOverlays().some(A=>A.id===D)||(h.setAttribute("id",D),_&&_!==D&&h.setAttribute(me.DATA_PATTERN_SOURCE_ID,_),h.setAttribute(me.DATA_PATTERN_SOURCE_URL,e),h.setAttribute(me.DATA_PATTERN_OVERLAY,"true"),t&&h.setAttribute(me.DATA_PATTERN_THUMBNAIL_URL,t),n&&h.setAttribute(me.DATA_PATTERN_PLACEMENT_ID,n),this.stripStyleProperty(h,"fill"),this.stripStyleProperty(h,"opacity"),h.setAttribute("fill",m),h.setAttribute("opacity",y.toString()),h.setAttribute("d",p),d.appendChild(h))}),this.patternFillInput.set(this.patternFillInput()||ql),this.patternOpacityInput.set(this.patternOpacityInput()),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(r)}catch(o){console.error(os.addPatternFromUrlFailed,o),this.showErrorDialog($s.failedApplyPatternSvg,os.failedApplyPatternSvg)}}onAddPatternPath(e,t){let n=this.customizerState.svgDoc();if(!n){this.showErrorDialog($s.svgRequired,os.svgRequired);return}let r=e.trim();if(!r)return;let o=this.parsePatternPathSnippet(r);if(!o){this.showErrorDialog($s.invalidSvgPath,os.invalidSvgPath);return}let s=n.importNode(o,!0),a=s.getAttribute("d")?.trim();if(!a){this.showErrorDialog($s.missingPathData,os.missingPathData);return}let l=this.readPresentationValue(s,"fill"),c=this.readPresentationValue(s,"opacity"),d=l&&l.toLowerCase()!=="none"?l:this.patternFillInput().trim()||ql,u=this.clampPatternOpacity(c?Number.parseFloat(c):this.patternOpacityInput()),f=Math.round(u*1e3)/1e3,h=this.ensurePatternOverlayLayer(),p=s.getAttribute("id")?.trim(),v=this.generatePatternOverlayId(p);this.patternOverlays().some(g=>g.id===v)||(s.setAttribute("id",v),p&&p!==v&&s.setAttribute(me.DATA_PATTERN_SOURCE_ID,p),s.setAttribute(me.DATA_PATTERN_OVERLAY,"true"),t&&s.setAttribute(me.DATA_PATTERN_PLACEMENT_ID,t),this.stripStyleProperty(s,"fill"),this.stripStyleProperty(s,"opacity"),s.setAttribute("fill",d),s.setAttribute("opacity",f.toString()),s.setAttribute("d",a),h.appendChild(s),this.patternPathInput.set(""),this.patternFillInput.set(d),this.patternOpacityInput.set(f),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(n))}onPatternOpacityInputChange(e){let t=typeof e=="number"?e:Number.parseFloat(e);if(Number.isFinite(t)){this.patternOpacityInput.set(this.clampPatternOpacity(t));return}this.patternOpacityInput.set(this.clampPatternOpacity(this.patternOpacityInput()))}onPatternFillChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=t?.trim();if(!r)return;let o=n.getElementById(e);!o||o.getAttribute(me.DATA_PATTERN_OVERLAY)!=="true"||(this.stripStyleProperty(o,"fill"),o.setAttribute("fill",r),this.updatePatternOverlayRecord(e,{fill:r}),this.customizerState.markSvgMutated(n))}onPatternOpacityChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(r))return;let o=this.clampPatternOpacity(r),s=n.getElementById(e);if(!s||s.getAttribute(me.DATA_PATTERN_OVERLAY)!=="true")return;this.stripStyleProperty(s,"opacity");let a=Math.round(o*1e3)/1e3;s.setAttribute("opacity",a.toString()),this.updatePatternOverlayRecord(e,{opacity:a}),this.customizerState.markSvgMutated(n)}onRemovePatternOverlay(e){let t=this.customizerState.svgDoc();if(!t)return;let n=t.getElementById(e);n&&n.getAttribute(me.DATA_PATTERN_OVERLAY)==="true"&&n.parentNode?.removeChild(n),this.patternOverlays.set(this.patternOverlays().filter(r=>r.id!==e)),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(t)}refreshPatternOverlaysFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.patternOverlays.set([]);return}let n=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).map(r=>{let o=r.getAttribute("id")?.trim();o||(o=this.generatePatternOverlayId(),r.setAttribute("id",o));let s=this.readPresentationValue(r,"fill"),a=s&&s.toLowerCase()!=="none"?s:ql,l=this.readPresentationValue(r,"opacity"),c=this.clampPatternOpacity(l?Number.parseFloat(l):1),d=r.getAttribute(me.DATA_PATTERN_SOURCE_URL)?.trim(),u=r.getAttribute(me.DATA_PATTERN_THUMBNAIL_URL)?.trim()||void 0,f=r.getAttribute(me.DATA_PATTERN_PLACEMENT_ID)?.trim()||null;return{id:o,label:r.getAttribute(me.DATA_PATTERN_SOURCE_ID)?.trim()||o,fill:a,placementId:f,opacity:c,pathData:r.getAttribute("d")??"",sourceUrl:d,thumbnailUrl:u}});if(this.patternOverlays.set(n),n.length>0){let r=n[n.length-1];this.patternOpacityInput.set(r.opacity)}else this.patternFillInput.set(ql),this.patternOpacityInput.set(1)}parsePatternPathSnippet(e){let t=e.trim();if(!t)return null;let n=new DOMParser,r;if(t.startsWith("<"))r=n.parseFromString(`<svg xmlns="${Di}">${t}</svg>`,ss);else{r=n.parseFromString(`<svg xmlns="${Di}"></svg>`,ss);let a=r.createElementNS(Di,"path");a.setAttribute("d",t),r.documentElement.appendChild(a)}if(r.querySelector(Yd))return null;let o=r.querySelector("path");if(!o)return null;let s=o.getAttribute("d");return!s||s.trim().length===0?null:o}ensurePatternOverlayLayer(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Di,r=t.querySelector("#PatternOverlayLayer");if(!r){r=e.createElementNS(n,"g"),r.setAttribute("id","PatternOverlayLayer"),r.setAttribute(me.DATA_PATTERN_LAYER,"true");let o=t.querySelector("#OverlayLayer");o?.parentNode?o.parentNode.insertBefore(r,o):t.appendChild(r)}return r}generatePatternOverlayId(e){let t=this.customizerState.svgDoc(),r=e&&e.trim().length>0?e.trim().replace(/\s+/g,"_"):"pattern-overlay";if(!t)return`${r}-${Date.now()}`;if(!t.getElementById(r))return r;let o=1,s=`${r}-${o}`;for(;t.getElementById(s);)o+=1,s=`${r}-${o}`;return s}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}readPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}updatePatternOverlayRecord(e,t){this.patternOverlays.update(n=>n.map(r=>r.id===e?k(k({},r),t):r))}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Ke(Dn),Ke(Mo))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var h4=i=>({$implicit:i}),noe=(i,e)=>e.id,ioe=(i,e)=>e.id??i;function roe(i,e){i&1&&(x(0,"div",2),U(1,"i",3),x(2,"span",4),R(3,"No overlays available"),C(),x(4,"span",5),R(5,"No overlay options have been configured for this product."),C()())}function ooe(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",8),U(3,"i",9),x(4,"span",10),R(5),C()()(),x(6,"app-ui-accordion-content"),Rr(7,11),C()()),i&2){let t=e.$implicit;S(2);let n=dr(3);q("value",t.id),T(5),ze(t.name),T(2),q("ngTemplateOutlet",n)("ngTemplateOutletContext",Ts(4,h4,t))}}function soe(i,e){if(i&1&&(x(0,"app-ui-accordion",6),mt(1,ooe,8,6,"app-ui-accordion-panel",6,sl().trackByOverlayId,!0),C()),i&2){let t=S(2);q("value",t.firstOverlayPanel()),T(),gt(t.overlayItems())}}function aoe(i,e){if(i&1&&(x(0,"div",12)(1,"div",13),U(2,"i",14),x(3,"span"),R(4),C()(),Rr(5,11),C()),i&2){let t=e.$implicit;S(2);let n=dr(3);T(4),ze(t.name),T(),q("ngTemplateOutlet",n)("ngTemplateOutletContext",Ts(3,h4,t))}}function loe(i,e){if(i&1&&(x(0,"div",7),mt(1,aoe,6,5,"div",12,sl().trackByOverlayId,!0),C()),i&2){let t=S(2);T(),gt(t.overlayItems())}}function coe(i,e){i&1&&(x(0,"div",15),U(1,"i",17),x(2,"span",5),R(3,"No overlay packs available for this placement."),C()())}function doe(i,e){}function uoe(i,e){if(i&1){let t=Ae();x(0,"div",20),W("click",function(){let r=z(t).$implicit,o=S(3).$implicit,s=S(2);return V(s.overlayState.onAddPatternPathFromUrl(r.fileUrl,r.thumbnailUrl,o.id))}),U(1,"img",21),x(2,"div",22)(3,"span",23),R(4),C()()()}if(i&2){let t=e.$implicit;q("appTooltip",t.name),T(),q("src",t.thumbnailUrl,fi)("alt",t.name),T(3),ze(t.name)}}function foe(i,e){if(i&1&&(ae(0,doe,0,0),x(1,"div",18),mt(2,uoe,5,4,"div",19,sl().trackByFileUrl,!0),C()),i&2){let t=e.$implicit;le(t.name?0:-1),T(2),gt(t.dataSources)}}function hoe(i,e){if(i&1&&(x(0,"div",16),mt(1,foe,4,1,null,null,noe),C()),i&2){let t=S().$implicit,n=S(2);T(),gt(n.getOverlayPacks(t))}}function poe(i,e){if(i&1&&ae(0,coe,4,0,"div",15)(1,hoe,3,0,"div",16),i&2){let t=e.$implicit,n=S(2);le(n.getOverlayPacks(t).length===0?0:1)}}function moe(i,e){if(i&1&&U(0,"img",32),i&2){let t=S().$implicit;q("src",t.thumbnailUrl||t.sourceUrl,fi)("alt",t.label)}}function goe(i,e){if(i&1&&(x(0,"span",33),R(1),ki(2,"slice"),C()),i&2){let t=S().$implicit;T(),ze(Aw(2,1,t.label,0,2))}}function voe(i,e){if(i&1){let t=Ae();x(0,"div",44),U(1,"i",45),R(2," Colour "),C(),x(3,"div",46)(4,"app-customizer-color-panel",47),W("colorSelected",function(r){z(t);let o=S().$implicit,s=S(3);return V(s.onOverlayColorSelected(o.id,r))}),C()()}if(i&2){let t=S().$implicit,n=S(3);T(4),q("items",n.colorPanelItems(t.id,t.placementId??null))}}function boe(i,e){if(i&1){let t=Ae();x(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",29)(3,"div",30)(4,"div",31),ae(5,moe,1,2,"img",32)(6,goe,3,5,"span",33),C(),x(7,"p",34),R(8),C()(),x(9,"button",35),W("click",function(r){let o=z(t).$implicit,s=S(3);return r.stopPropagation(),V(s.overlayState.onRemovePatternOverlay(o.id))}),U(10,"i",36),x(11,"span"),R(12,"Remove"),C()()()(),x(13,"app-ui-accordion-content")(14,"div",37)(15,"div",38),U(16,"i",39),R(17," Opacity "),C(),x(18,"div",40)(19,"div",41)(20,"app-ui-slider",42),W("ngModelChange",function(r){let o=z(t).$implicit,s=S(3);return V(s.overlayState.onPatternOpacityChange(o.id,r))}),C(),x(21,"span",43),R(22),ki(23,"number"),C()()(),ae(24,voe,5,1),C()()()}if(i&2){let t=e.$implicit,n=S(3);q("value",t.id),T(5),le(t.thumbnailUrl||t.sourceUrl?5:6),T(2),q("appTooltip",t.label),T(),ze(t.label),T(12),q("min",n.overlayState.minPatternOpacity)("max",n.overlayState.maxPatternOpacity)("step",n.overlayState.patternOpacityStep)("ngModel",t.opacity),T(2),ze(qi(23,10,t.opacity,"1.0-2")),T(2),le(n.colorPanelItems(t.id,t.placementId??null).length?24:-1)}}function yoe(i,e){if(i&1&&(x(0,"div",24)(1,"span",25),U(2,"i",26),R(3," Applied Overlays "),C(),x(4,"span",27),R(5),C()(),x(6,"app-ui-accordion",28),mt(7,boe,25,13,"app-ui-accordion-panel",6,ioe),C()),i&2){let t=S(2);T(5),ze(t.appliedPatternOverlays().length),T(),q("multiple",!0),T(),gt(t.appliedPatternOverlays())}}function xoe(i,e){if(i&1&&(ae(0,soe,3,1,"app-ui-accordion",6)(1,loe,3,0,"div",7),Bo(2,poe,2,1,"ng-template",null,0,cl),ae(4,yoe,9,2)),i&2){let t=S();le(t.useAccordion()?0:1),T(4),le(t.appliedPatternOverlays().length>0?4:-1)}}var E_=class i{constructor(e){this.overlayState=e}items=ye.required();useAccordion=ye(!1,{transform:_v});overlayItems=Me(()=>(this.items()??[]).filter(e=>(e.type??"").toUpperCase()==="OVERLAY"));firstOverlayPanel=Me(()=>{let e=this.overlayItems()[0];if(!e)return null;let t=e;return t.id??t.actionPathIdsCsv??null});appliedPatternOverlays=Me(()=>{let e=new Set(this.overlayItems().map(t=>t.id).filter(t=>typeof t=="string"&&t.length>0));return e.size?this.overlayState.patternOverlays().filter(t=>!!t.placementId&&e.has(t.placementId)):[]});colorPanelItems(e,t){if(!e)return[];let n=t?(this.items()??[]).find(a=>a.id===t):null,r=n?this.buildColorCustomizationsForItem(n,e):[];if(r.length)return[...r];let o=this.overlayPackColorDataSources();if(!o.length)return[];let s={id:`overlay-color-pack-${e}`,name:"Overlay Colors",type:"Color",dataSources:o.map(a=>k({},a))};return[{id:`overlay-color-${e}`,stepId:"",dataSourcePackId:s.id,name:"Overlay Colors",type:"Color",actionPathIdsCsv:e,isTransformationRequired:!1,defaultValue:null,position:0,pack:s}]}getOverlayPacks(e){return(e.packs??[]).filter(t=>{let n=(t.type??"").toLowerCase();return n===Ga.OVERLAY||n===Ga.EFFECTS})}getOverlayColorPacks(e){return this.buildColorCustomizationsForItem(e,"")}trackByOverlayId(e,t){return t.id??e}trackByFileUrl(e,t){return t.fileUrl??e}buildColorCustomizationsForItem(e,t){return(e.packs??[]).filter(n=>(n.type??"").toLowerCase()===Ga.COLOR).map(n=>({id:"new-"+n.id,stepId:"new-"+n.id,dataSourcePackId:n.id,name:e.name+" Color",type:"Color",actionPathIdsCsv:t,isTransformationRequired:!1,defaultValue:"",position:10,pack:he(k({},n),{dataSources:[...n.dataSources??[]]})}))}overlayPackColorDataSources(){return this.overlayItems().flatMap(e=>this.getOverlayPacks(e).flatMap(t=>t.dataSources??[]).filter(t=>!!t.colorCode))}onOverlayColorSelected(e,t){e&&t&&this.overlayState.onPatternFillChange(e,t)}static \u0275fac=function(t){return new(t||i)(Gt(vh))};static \u0275cmp=it({type:i,selectors:[["app-overlay-panel"]],inputs:{items:[1,"items"],useAccordion:[1,"useAccordion"]},decls:3,vars:1,consts:[["pickerContent",""],[1,"overlay-panel"],[1,"empty-state"],[1,"ri-layout-grid-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[3,"value"],[1,"overlay-pick-sections"],[1,"accordion-header-content"],[1,"ri-layout-grid-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-layout-grid-line"],[1,"empty-state","empty-state--sm"],[1,"overlay-pick-section"],[1,"ri-image-2-line","empty-state-icon"],[1,"overlay-pick-grid"],[1,"overlay-pick-card",3,"appTooltip"],[1,"overlay-pick-card",3,"click","appTooltip"],[1,"overlay-pick-card__img",3,"src","alt"],[1,"overlay-pick-card__hover"],[1,"overlay-pick-card__name"],[1,"overlay-section-divider"],[1,"overlay-section-divider__label"],[1,"ri-check-double-line"],[1,"overlay-count-badge"],[1,"overlay-accordion",3,"multiple"],[1,"overlay-accordion__header"],[1,"overlay-card__meta"],["aria-hidden","true",1,"overlay-thumb"],[1,"overlay-thumb__img",3,"src","alt"],[1,"overlay-thumb__fallback"],[1,"overlay-name",3,"appTooltip"],["type","button",1,"overlay-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"overlay-card__body"],[1,"prop-group-heading"],[1,"ri-contrast-line"],[1,"overlay-opacity","w-full"],[1,"slider-row"],[1,"flex-1","overlay-slider",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"prop-group-heading",2,"margin-top","6px"],[1,"ri-palette-line"],[1,"overlay-colors"],[1,"overlay-color-panel",3,"colorSelected","items"]],template:function(t,n){t&1&&(x(0,"div",1),ae(1,roe,6,0,"div",2)(2,xoe,5,2),C()),t&2&&(T(),le(n.overlayItems().length===0?1:2))},dependencies:[Ut,jc,fr,Is,zo,Vi,_i,_r,xr,oc,ea,bi,Yw,Wc],styles:[".overlay-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 16px;margin:12px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:14px 12px;margin:8px 0}.empty-state-icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db;margin-bottom:4px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#6b7280}.empty-state-sub[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.55}.overlay-pick-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-pick-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 14px}.pack-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#9ca3af}.pack-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.overlay-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.overlay-pick-card[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px rgb(var(--primary-color, 98 101 241) / .18)}.overlay-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.overlay-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:opacity .18s}.overlay-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.overlay-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.overlay-section-divider[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px 8px;margin-top:4px;border-top:1px solid #f0f0f0}.overlay-section-divider__label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-section-divider__label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.overlay-count-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:9999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:10px;font-weight:700;line-height:1}.overlay-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.overlay-accordion__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding-right:10px}.overlay-card__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.overlay-thumb[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:10px;border:1px solid #e5e7eb;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;background:#f9fafb}.overlay-thumb__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.overlay-thumb__fallback[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#1f2937}.overlay-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;margin:0;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overlay-card__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 12px 10px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#64748b}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-opacity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.overlay-slider[_ngcontent-%COMP%]{accent-color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.overlay-colors[_ngcontent-%COMP%]{display:flex;align-items:center}.overlay-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;flex-shrink:0;transition:background .15s,box-shadow .15s,transform .15s}.overlay-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.overlay-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.overlay-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.overlay-name[_ngcontent-%COMP%]{font-size:12px;max-width:130px}.overlay-thumb[_ngcontent-%COMP%]{width:34px;height:34px}}@media(max-width:480px){.overlay-pick-section[_ngcontent-%COMP%]{padding:8px 10px}.overlay-name[_ngcontent-%COMP%]{max-width:100px}}"],changeDetection:0})};var _oe=(i,e)=>e.id;function Soe(i,e){i&1&&(x(0,"div",9),U(1,"i",11),x(2,"span",12),R(3,"No layers yet"),C(),x(4,"span",13),R(5,"Add text or logo items to configure their render order."),C()())}function Coe(i,e){if(i&1&&(x(0,"div",21),R(1),C()),i&2){let t=S().$implicit;T(),ze(t.subtitle)}}function woe(i,e){i&1&&(x(0,"span",23),R(1,"Front"),C())}function Eoe(i,e){i&1&&(x(0,"span",24),R(1,"Back"),C())}function Moe(i,e){if(i&1){let t=Ae();x(0,"div",15),W("dragstart",function(r){let o=z(t).$implicit,s=S(2);return V(s.onDragStart(r,o.id))})("dragover",function(r){let o=z(t).$implicit,s=S(2);return V(s.onDragOver(r,o.id))})("drop",function(r){let o=z(t).$implicit,s=S(2);return V(s.onDrop(r,o.id))})("dragend",function(){z(t);let r=S(2);return V(r.onDragEnd())})("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onSelect(r.id))}),x(1,"div",16),U(2,"i",17),C(),x(3,"div",18),R(4),C(),x(5,"div",19)(6,"div",20),R(7),C(),ae(8,Coe,2,1,"div",21),C(),x(9,"div",22),ae(10,woe,2,0,"span",23)(11,Eoe,2,0,"span",24),C(),x(12,"div",25)(13,"app-ui-button",26),W("onClick",function(){let r=z(t).$implicit,o=S(2);return V(o.onMoveTowardFront(r.id))}),U(14,"i",27),C(),x(15,"app-ui-button",28),W("onClick",function(){let r=z(t).$implicit,o=S(2);return V(o.onMoveTowardBack(r.id))}),U(16,"i",29),C()()()}if(i&2){let t=e.$implicit,n=e.$index,r=S(2);dt("active",t.id===r.activeOverlayId())("dragging",t.id===r.draggedItemId)("drop-before",t.id===r.dropTargetId&&r.dropPosition==="before")("drop-after",t.id===r.dropTargetId&&r.dropPosition==="after"),T(3),dt("render-order-rank--first",n===0),T(),wt(" ",n+1," "),T(3),ze(t.title),T(),le(t.subtitle?8:-1),T(2),le(n===0?10:n===r.items().length-1?11:-1),T(3),q("text",!0)("disabled",n===0),T(2),q("text",!0)("disabled",n===r.items().length-1)}}function Toe(i,e){if(i&1&&(x(0,"div",10),mt(1,Moe,17,18,"div",14,_oe),C()),i&2){let t=S();T(),gt(t.items())}}var M_=class i{items=ye([]);activeOverlayId=ye(null);moveTowardFront=Pt();moveTowardBack=Pt();selectItem=Pt();reorder=Pt();draggedItemId=null;dropTargetId=null;dropPosition="before";onMoveTowardFront(e){this.moveTowardFront.emit(e)}onMoveTowardBack(e){this.moveTowardBack.emit(e)}onSelect(e){this.selectItem.emit(e)}onDragStart(e,t){this.draggedItemId=t,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t))}onDragOver(e,t){if(!this.draggedItemId||this.draggedItemId===t)return;e.preventDefault();let n=e.currentTarget;if(!n)return;let r=n.getBoundingClientRect(),o=r.top+r.height/2;this.dropPosition=e.clientY>=o?"after":"before",this.dropTargetId=t}onDrop(e,t){if(!this.draggedItemId||this.draggedItemId===t){this.clearDragState();return}e.preventDefault(),this.emitReorder(this.draggedItemId,t,this.dropPosition),this.clearDragState()}onDragEnd(){this.clearDragState()}emitReorder(e,t,n){let r=this.items().map(d=>d.id),o=r.indexOf(e),s=r.indexOf(t);if(o<0||s<0)return;let a=[...r];a.splice(o,1);let l=s>o?s-1:s,c=n==="after"?l+1:l;a.splice(c,0,e),this.reorder.emit(a)}clearDragState(){this.draggedItemId=null,this.dropTargetId=null,this.dropPosition="before"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-render-order-panel"]],inputs:{items:[1,"items"],activeOverlayId:[1,"activeOverlayId"]},outputs:{moveTowardFront:"moveTowardFront",moveTowardBack:"moveTowardBack",selectItem:"selectItem",reorder:"reorder"},decls:14,vars:1,consts:[[1,"render-order-panel"],[1,"render-order-info"],[1,"render-order-info__row"],[1,"depth-label","depth-label--front"],[1,"ri-stack-line"],[1,"ri-arrow-down-line","render-order-info__arrow"],[1,"depth-label","depth-label--back"],[1,"ri-layers-line"],[1,"render-order-info__hint"],[1,"render-order-empty"],[1,"render-order-list"],[1,"ri-stack-line","render-order-empty__icon"],[1,"render-order-empty__title"],[1,"render-order-empty__hint"],["draggable","true",1,"render-order-item",3,"active","dragging","drop-before","drop-after"],["draggable","true",1,"render-order-item",3,"dragstart","dragover","drop","dragend","click"],["aria-hidden","true","appTooltip","Drag to reorder",1,"render-order-handle"],[1,"ri-draggable"],[1,"render-order-rank"],[1,"render-order-content"],[1,"render-order-title"],[1,"render-order-subtitle"],[1,"render-order-depth"],[1,"depth-pill","depth-pill--front"],[1,"depth-pill","depth-pill--back"],[1,"render-order-actions"],["appTooltip","Move forward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-up-s-line"],["appTooltip","Move backward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),U(4,"i",4),R(5," Front (top) "),C(),U(6,"i",5),x(7,"span",6),U(8,"i",7),R(9," Back (bottom) "),C()(),x(10,"p",8),R(11," Drag rows or use the arrows to change which item appears on top. "),C()(),ae(12,Soe,6,0,"div",9)(13,Toe,3,0,"div",10),C()),t&2&&(T(12),le(n.items().length===0?12:13))},dependencies:[Ut,ta,bi],styles:[".render-order-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:12px 14px}.render-order-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:10px;background:linear-gradient(135deg,#f5f3ff,#eff6ff);border:1px solid #e5e7eb}.render-order-info__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.render-order-info__arrow[_ngcontent-%COMP%]{font-size:14px;color:#d1d5db;flex-shrink:0}.render-order-info__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.5}.depth-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.04em}.depth-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.depth-label--front[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.depth-label--back[_ngcontent-%COMP%]{color:#9ca3af}.render-order-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.render-order-empty__icon[_ngcontent-%COMP%]{font-size:28px;color:#d1d5db}.render-order-empty__title[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.render-order-empty__hint[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.5}.render-order-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.render-order-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px 10px;cursor:pointer;transition:border-color .16s,box-shadow .16s,background .16s}.render-order-item[_ngcontent-%COMP%]:hover{border-color:#c7d2fe;background:#fafafe}.render-order-item.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .12);background:#f5f3ff}.render-order-item.dragging[_ngcontent-%COMP%]{opacity:.45;box-shadow:0 8px 24px #0000001a}.render-order-item.drop-before[_ngcontent-%COMP%]{box-shadow:inset 0 3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-item.drop-after[_ngcontent-%COMP%]{box-shadow:inset 0 -3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-handle[_ngcontent-%COMP%]{color:#d1d5db;font-size:16px;line-height:1;cursor:grab;flex-shrink:0;transition:color .15s}.render-order-item[_ngcontent-%COMP%]:hover .render-order-handle[_ngcontent-%COMP%]{color:#9ca3af}.render-order-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.render-order-rank[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:#f3f4f6;border:1px solid #e5e7eb;font-size:11px;font-weight:700;color:#6b7280;flex-shrink:0}.render-order-rank--first[_ngcontent-%COMP%]{background:#ede9fe;border-color:#c4b5fd;color:rgb(var(--primary-color, 98 101 241))}.render-order-content[_ngcontent-%COMP%]{flex:1;min-width:0}.render-order-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-subtitle[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-depth[_ngcontent-%COMP%]{flex-shrink:0;min-width:38px}.depth-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 8px;border-radius:9999px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.depth-pill--front[_ngcontent-%COMP%]{background:#ede9fe;color:rgb(var(--primary-color, 98 101 241))}.depth-pill--back[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}.render-order-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;flex-shrink:0}.ro-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:14px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.ro-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.ro-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.render-order-panel[_ngcontent-%COMP%]{padding:8px 10px}.render-order-item[_ngcontent-%COMP%]{padding:6px 8px;gap:6px}.render-order-title[_ngcontent-%COMP%]{font-size:12px}.render-order-subtitle[_ngcontent-%COMP%]{font-size:10px}.render-order-rank[_ngcontent-%COMP%]{width:18px;height:18px;font-size:10px}.depth-pill[_ngcontent-%COMP%]{display:none}}@media(max-width:480px){.render-order-list[_ngcontent-%COMP%]{gap:4px}}"],changeDetection:0})};var T_=class i{gridEnabled=ye(!1);snapEnabled=ye(!1);showPlacementGuides=ye(!1);gridRatio=ye(.25);editorMode=ye("3d");threeDGridSizeNormalized=ye(10);twoDGridSizeInches=ye(1);onGridToggle=Pt();onSnapToggle=Pt();onGuidesToggle=Pt();onGridSizeChange=Pt();onTwoDGridSizeChange=Pt();onGridClick(){this.onGridToggle.emit()}onSnapClick(){this.onSnapToggle.emit()}onGuidesClick(){this.onGuidesToggle.emit()}onSliderChange(e){let t=parseFloat(e.target.value);isNaN(t)?t=this.twoDGridSizeInches():t=Math.max(.25,Math.min(4,t)),this.onTwoDGridSizeChange.emit(t.toString())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-canvas-guide-panel"]],inputs:{gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],showPlacementGuides:[1,"showPlacementGuides"],gridRatio:[1,"gridRatio"],editorMode:[1,"editorMode"],threeDGridSizeNormalized:[1,"threeDGridSizeNormalized"],twoDGridSizeInches:[1,"twoDGridSizeInches"]},outputs:{onGridToggle:"onGridToggle",onSnapToggle:"onSnapToggle",onGuidesToggle:"onGuidesToggle",onGridSizeChange:"onGridSizeChange",onTwoDGridSizeChange:"onTwoDGridSizeChange"},decls:36,vars:13,consts:[[1,"canvas-guide-panel"],[1,"controls-section"],[1,"section-label"],[1,"ri-layout-grid-line"],[1,"toggle-buttons-group"],["type","button","aria-label","Toggle Grid",1,"control-btn",3,"click","title"],[1,"btn-label"],["type","button","aria-label","Toggle Snap to Grid",1,"control-btn",3,"click","title"],[1,"ri-focus-3-line"],["type","button","aria-label","Toggle Placement Guides",1,"control-btn",3,"click","title"],[1,"ri-guide-line"],[1,"grid-size-control"],[1,"control-label-header"],[1,"ri-settings-3-line"],[1,"control-label-text"],[1,"slider-container"],["type","range","min","0.25","max","4","step","0.01","aria-label","Grid size adjustment in inches",1,"control-slider",3,"input","value","title"],[1,"stepper"],["type","number","min","0.25","max","4","step","0.01","appTooltip","Grid size input in inches","appDecimalLimit","2",1,"stepper-input",3,"input","value","title"],[1,"stepper-unit"],[1,"controls-section","info-section"],[1,"info-text"],[1,"ri-information-line"]],template:function(t,n){t&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),U(3,"i",3),x(4,"span"),R(5,"Canvas Display"),C()(),x(6,"div",4)(7,"button",5),W("click",function(){return n.onGridClick()}),U(8,"i",3),x(9,"span",6),R(10,"Grid"),C()(),x(11,"button",7),W("click",function(){return n.onSnapClick()}),U(12,"i",8),x(13,"span",6),R(14,"Snap"),C()(),x(15,"button",9),W("click",function(){return n.onGuidesClick()}),U(16,"i",10),x(17,"span",6),R(18,"Guides"),C()()()(),x(19,"div",1)(20,"label",11)(21,"div",12),U(22,"i",13),x(23,"span",14),R(24,"Grid Size (in)"),C()(),x(25,"div",15)(26,"input",16),W("input",function(o){return n.onSliderChange(o)}),C(),x(27,"div",17)(28,"input",18),W("input",function(o){return n.onSliderChange(o)}),C(),x(29,"span",19),R(30," in "),C()()()()(),x(31,"div",20)(32,"div",21),U(33,"i",22),x(34,"p"),R(35,"Use these tools to align and position elements precisely on your canvas."),C()()()()),t&2&&(T(7),dt("active",n.gridEnabled()),q("title",n.gridEnabled()?"Hide Grid":"Show Grid"),T(4),dt("active",n.snapEnabled()),q("title",n.snapEnabled()?"Disable Snap":"Enable Snap"),T(4),dt("active",n.showPlacementGuides()),q("title",n.showPlacementGuides()?"Hide Guides":"Show Guides"),T(11),q("value",n.twoDGridSizeInches())("title","Adjust grid size in inches"),T(2),q("value",n.twoDGridSizeInches())("title","Enter grid size in inches"))},dependencies:[Ut,gh,bi],styles:[".canvas-guide-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.controls-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.toggle-buttons-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.control-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:.75rem;border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.625rem;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:.65rem;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.125rem;transition:transform .2s ease}.control-btn[_ngcontent-%COMP%]:hover:not(.active){border-color:rgb(var(--primary-color, 98 101 241) / .5);background:rgb(var(--primary-color, 98 101 241) / .08);transform:translateY(-1px)}.control-btn.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241) / .15),rgb(var(--primary-color, 98 101 241) / .08));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .1)}.control-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:inset 0 2px 4px #0000000d}.btn-label[_ngcontent-%COMP%]{display:block;white-space:nowrap}.grid-size-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.575rem;cursor:pointer}.control-label-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139))}.control-label-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.control-label-text[_ngcontent-%COMP%]{display:block}.slider-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.5rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem;transition:all .2s ease}.slider-container[_ngcontent-%COMP%]:focus-within{border-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--surface-card, 255 255 255));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .1)}.control-slider[_ngcontent-%COMP%]{flex:1;height:4px;appearance:none;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .3),rgb(var(--primary-color, 98 101 241)));border-radius:2px;outline:none;cursor:pointer;-webkit-appearance:none}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.slider-value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:3rem;padding:.375rem .625rem;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.375rem;font-size:.75rem;font-weight:600;color:rgb(var(--primary-color, 98 101 241));text-align:center;white-space:nowrap;transition:all .2s ease}.info-section[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:1rem;border-top:1px solid rgb(var(--border-color, 203 213 225))}.info-text[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-text[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.canvas-guide-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.toggle-buttons-group[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr);gap:.4rem}.control-btn[_ngcontent-%COMP%]{padding:.625rem;font-size:.6rem}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem}.slider-container[_ngcontent-%COMP%]{padding:.4rem;gap:.5rem}}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.stepper-input[_ngcontent-%COMP%]{width:40px;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:13px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-unit[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-weight:500}"]})};var D_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-keyboard-shortcuts-panel"]],decls:157,vars:0,consts:[[1,"shortcuts-panel"],[1,"shortcuts-section"],[1,"section-label"],[1,"ri-map-pin-2-line"],[1,"shortcut-list"],[1,"shortcut-row"],[1,"keys"],[1,"key-sep"],[1,"key-drag"],[1,"shortcut-desc"],[1,"keys","button-key"],[1,"ri-history-line"],[1,"ri-drag-move-2-line"],[1,"keys","arrow-cluster"],[1,"arrow-cluster-inline"],[1,"ri-refresh-line"],[1,"info-note"],[1,"ri-information-line"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),kt(3,"i",3),ue(4,"span"),R(5,"Canvas Navigation"),ve()(),ue(6,"div",4)(7,"div",5)(8,"div",6)(9,"kbd"),R(10,"Right Click"),ve(),ue(11,"span",7),R(12,"+"),ve(),ue(13,"span",8),R(14,"Drag"),ve()(),ue(15,"span",9),R(16,"Pan canvas"),ve()(),ue(17,"div",5)(18,"div",6)(19,"kbd"),R(20,"Scroll Wheel"),ve()(),ue(21,"span",9),R(22,"Zoom in/out"),ve()(),ue(23,"div",5)(24,"div",10),R(25," Reset Button "),ve(),ue(26,"span",9),R(27,"Reset view to default"),ve()()()(),ue(28,"div",1)(29,"div",2),kt(30,"i",11),ue(31,"span"),R(32,"History"),ve()(),ue(33,"div",4)(34,"div",5)(35,"div",6)(36,"kbd"),R(37,"Ctrl"),ve(),ue(38,"span",7),R(39,"+"),ve(),ue(40,"kbd"),R(41,"Z"),ve()(),ue(42,"span",9),R(43,"Undo"),ve()(),ue(44,"div",5)(45,"div",6)(46,"kbd"),R(47,"Ctrl"),ve(),ue(48,"span",7),R(49,"+"),ve(),ue(50,"kbd"),R(51,"Shift"),ve(),ue(52,"span",7),R(53,"+"),ve(),ue(54,"kbd"),R(55,"Z"),ve()(),ue(56,"span",9),R(57,"Redo"),ve()(),ue(58,"div",5)(59,"div",6)(60,"kbd"),R(61,"Ctrl"),ve(),ue(62,"span",7),R(63,"+"),ve(),ue(64,"kbd"),R(65,"Y"),ve()(),ue(66,"span",9),R(67,"Redo"),ve()()()(),ue(68,"div",1)(69,"div",2),kt(70,"i",12),ue(71,"span"),R(72,"Move Overlay"),ve()(),ue(73,"div",4)(74,"div",5)(75,"div",13)(76,"kbd"),R(77,"\u2191"),ve(),ue(78,"kbd"),R(79,"\u2193"),ve(),ue(80,"kbd"),R(81,"\u2190"),ve(),ue(82,"kbd"),R(83,"\u2192"),ve()(),ue(84,"span",9),R(85,"Move 1 px"),ve()(),ue(86,"div",5)(87,"div",6)(88,"kbd"),R(89,"Shift"),ve(),ue(90,"span",7),R(91,"+"),ve(),ue(92,"span",14)(93,"kbd"),R(94,"\u2191"),ve(),ue(95,"kbd"),R(96,"\u2193"),ve(),ue(97,"kbd"),R(98,"\u2190"),ve(),ue(99,"kbd"),R(100,"\u2192"),ve()()(),ue(101,"span",9),R(102,"Move 10 px"),ve()()()(),ue(103,"div",1)(104,"div",2),kt(105,"i",15),ue(106,"span"),R(107,"Rotate Overlay"),ve()(),ue(108,"div",4)(109,"div",5)(110,"div",6)(111,"kbd"),R(112,"Q"),ve()(),ue(113,"span",9),R(114,"Rotate counter-clockwise"),ve()(),ue(115,"div",5)(116,"div",6)(117,"kbd"),R(118,"E"),ve()(),ue(119,"span",9),R(120,"Rotate clockwise"),ve()(),ue(121,"div",5)(122,"div",6)(123,"kbd"),R(124,"Shift"),ve(),ue(125,"span",7),R(126,"+"),ve(),ue(127,"kbd"),R(128,"Q"),ve()(),ue(129,"span",9),R(130,"Rotate CCW fast (3\xD7)"),ve()(),ue(131,"div",5)(132,"div",6)(133,"kbd"),R(134,"Shift"),ve(),ue(135,"span",7),R(136,"+"),ve(),ue(137,"kbd"),R(138,"E"),ve()(),ue(139,"span",9),R(140,"Rotate CW fast (3\xD7)"),ve()(),ue(141,"div",5)(142,"div",6)(143,"kbd"),R(144,"["),ve()(),ue(145,"span",9),R(146,"Rotate counter-clockwise"),ve()(),ue(147,"div",5)(148,"div",6)(149,"kbd"),R(150,"]"),ve()(),ue(151,"span",9),R(152,"Rotate clockwise"),ve()()()(),ue(153,"div",16),kt(154,"i",17),ue(155,"p"),R(156,"Overlay shortcuts apply when an overlay is selected on the canvas."),ve()()())},styles:[".shortcuts-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.shortcuts-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.shortcut-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.shortcut-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.45rem .6rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem}.keys[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;line-height:1.4;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.35rem;box-shadow:0 1px rgb(var(--border-color, 203 213 225));white-space:nowrap}.key-sep[_ngcontent-%COMP%]{font-size:.6rem;color:rgb(var(--text-color-secondary, 100 116 139))}.key-drag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color-secondary, 100 116 139));background:transparent;border:none;font-style:italic}.button-key[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.2rem .6rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--primary-color, 98 101 241) / .15);border:1.5px solid rgb(var(--primary-color, 98 101 241) / .3);border-radius:.35rem;white-space:nowrap}.arrow-cluster[_ngcontent-%COMP%]{gap:.2rem}.arrow-cluster-inline[_ngcontent-%COMP%]{display:inline-flex;gap:.2rem}.shortcut-desc[_ngcontent-%COMP%]{font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));text-align:right;flex:1}.info-note[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-note[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.shortcuts-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.shortcut-row[_ngcontent-%COMP%]{padding:.4rem .5rem}kbd[_ngcontent-%COMP%]{font-size:.6rem;min-width:1.35rem;padding:.1rem .3rem}}"]})};var Doe=(i,e)=>e.id;function Aoe(i,e){if(i&1){let t=Ae();ue(0,"img",11),Ri("error",function(){z(t);let r=S().$implicit,o=S();return V(o.markThumbnailBroken(r==null?null:r.id))}),ve()}if(i&2){let t=S().$implicit;kr("src",t.thumbnailLink,fi)("alt",t.name||"Pre-design")}}function Ioe(i,e){i&1&&(ue(0,"div",7),il(),ue(1,"svg",12),kt(2,"rect",13)(3,"path",14),ve()())}function Poe(i,e){i&1&&(ue(0,"div",8),il(),ue(1,"svg",15),kt(2,"polyline",16),ve()())}function Ooe(i,e){if(i&1&&(ue(0,"p",10),R(1),ve()),i&2){let t=S().$implicit;T(),ze(t.name)}}function Roe(i,e){if(i&1){let t=Ae();ue(0,"div",4),Ri("click",function(){let r=z(t).$implicit,o=S();return V(o.onSelect(r))}),ue(1,"div",5),ae(2,Aoe,1,2,"img",6)(3,Ioe,4,0,"div",7),ae(4,Poe,3,0,"div",8),ue(5,"div",9),ae(6,Ooe,2,1,"p",10),ve()()()}if(i&2){let t=e.$implicit,n=S();dt("selected",(t==null?null:t.id)===n.selectedId()),T(2),le(t.thumbnailLink&&!n.isThumbnailBroken(t==null?null:t.id)?2:3),T(2),le((t==null?null:t.id)===n.selectedId()?4:-1),T(2),le(t.name?6:-1)}}function koe(i,e){i&1&&(ue(0,"div",3),il(),ue(1,"svg",12),kt(2,"rect",13)(3,"path",17),ve(),yu(),ue(4,"span"),R(5,"No pre-designs available"),ve()())}var A_=class i{predesigns=ye([]);selectedId=ye(null);designSelected=Pt();brokenThumbById=F({});onSelect(e){e&&this.designSelected.emit(e)}isThumbnailBroken(e){return e?!!this.brokenThumbById()[e]:!1}markThumbnailBroken(e){e&&this.brokenThumbById.update(t=>he(k({},t),{[e]:!0}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-pre-designs-panel"]],inputs:{predesigns:[1,"predesigns"],selectedId:[1,"selectedId"]},outputs:{designSelected:"designSelected"},decls:5,vars:1,consts:[[1,"predesigns-panel"],[1,"predesigns-grid"],[1,"design-card",3,"selected"],[1,"predesigns-empty"],[1,"design-card",3,"click"],[1,"design-card__image-wrap"],["loading","lazy","decoding","async",1,"design-card__image",3,"src","alt"],["aria-label","Thumbnail unavailable",1,"design-card__placeholder"],[1,"design-card__tick"],[1,"design-card__hover"],[1,"design-card__name"],["loading","lazy","decoding","async",1,"design-card__image",3,"error","src","alt"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["x","3","y","3","width","18","height","18","rx","2"],["d","M3 16l5-5 4 4 3-3 6 6"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],["points","20 6 9 17 4 12"],["d","M3 9h18M9 21V9"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1),mt(2,Roe,7,5,"div",2,Doe),ae(4,koe,6,0,"div",3),ve()()),t&2&&(T(2),gt(n.predesigns()),T(2),le(n.predesigns().length?-1:4))},dependencies:[Ut],styles:['.predesigns-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:12px;overflow-y:auto}.predesigns-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.design-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;cursor:pointer;border-radius:10px;transition:transform .18s ease,box-shadow .18s ease}.design-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.design-card[_ngcontent-%COMP%]:hover .design-card__image-wrap[_ngcontent-%COMP%]{box-shadow:0 6px 20px #00000024;border-color:var(--p-primary-color, #6265f1)}.design-card__image-wrap[_ngcontent-%COMP%]{position:relative;aspect-ratio:1 / 1;border-radius:10px;overflow:hidden;border:2px solid #cbcbcb;background:var(--p-surface-100, #f4f4f5);transition:border-color .18s ease,box-shadow .18s ease}.design-card__image-wrap[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0000000a,#00000014,#0000000a 70%);background-size:200% 100%;animation:_ngcontent-%COMP%_predesign-skeleton 1.25s ease-in-out infinite}.design-card.selected[_ngcontent-%COMP%] .design-card__image-wrap[_ngcontent-%COMP%]{border-color:var(--p-primary-color, #6265f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--p-primary-color, #6265f1) 25%,transparent)}.design-card__image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .22s ease;position:relative;z-index:1}.design-card[_ngcontent-%COMP%]:hover .design-card__image[_ngcontent-%COMP%]{transform:scale(1.04)}.design-card__placeholder[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;height:100%;display:grid;place-items:center;color:#00000073}.design-card__placeholder[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:42px;height:42px;opacity:.75}@keyframes _ngcontent-%COMP%_predesign-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.design-card__image-wrap[_ngcontent-%COMP%]:before{animation:none}}.design-card__tick[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:50%;background:var(--p-primary-color, #6265f1);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #00000040;animation:_ngcontent-%COMP%_tick-pop .2s ease}.design-card__tick[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px}@keyframes _ngcontent-%COMP%_tick-pop{0%{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}.design-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgb(0 0 0 / 65%) 0%,transparent 55%);z-index:999;opacity:0;transition:opacity .2s ease}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:992px){.design-card__hover[_ngcontent-%COMP%]{opacity:.75}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}}.design-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5);margin:0}.predesigns-empty[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 16px;color:var(--p-text-muted-color, #888);font-size:13px}.predesigns-empty[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:40px;height:40px;opacity:.45}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:992px){.predesigns-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var I_=class i{api=Z(na);createSubmission(e,t,n,r,o,s){let a=new FormData;return a.append("file",e,e.name),n&&a.append("productId",n),r?.length&&a.append("views",r.join(",")),o?.length&&o.forEach(l=>{a.append("previewImages",l,l.name)}),s&&a.append("userUniqueId",s),this.api.post("design-submissions",a,{"X-API-Key":t},{loader:!0})}getSubmissionByNumber(e,t){return this.api.get(`design-submissions/${encodeURIComponent(e)}`,{},{"X-API-Key":t},{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var P_=class i{message="Loading\u2026";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-manifest-loader"]],inputs:{message:"message"},decls:20,vars:2,consts:[["role","status","aria-live","polite",1,"manifest-loader"],["aria-hidden","true",1,"loader"],[1,"box","box0"],[1,"box","box1"],[1,"box","box2"],[1,"box","box3"],[1,"box","box4"],[1,"box","box5"],[1,"box","box6"],[1,"box","box7"],[1,"message"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),kt(3,"div"),ve(),ue(4,"div",3),kt(5,"div"),ve(),ue(6,"div",4),kt(7,"div"),ve(),ue(8,"div",5),kt(9,"div"),ve(),ue(10,"div",6),kt(11,"div"),ve(),ue(12,"div",7),kt(13,"div"),ve(),ue(14,"div",8),kt(15,"div"),ve(),ue(16,"div",9),kt(17,"div"),ve()(),ue(18,"p",10),R(19),ve()()),t&2&&(fn("aria-label",n.message),T(19),ze(n.message))},styles:['[_nghost-%COMP%]{display:block}.message[_ngcontent-%COMP%]{margin:0;text-align:center}.manifest-loader[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{zoom:.44}}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before, .manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box0[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box1[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box2[_ngcontent-%COMP%]{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box3[_ngcontent-%COMP%]{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box4[_ngcontent-%COMP%]{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box5[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box6[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box7[_ngcontent-%COMP%]{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move7}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale7}@keyframes _ngcontent-%COMP%_box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_mask{0%,65%{opacity:0}66%,to{opacity:1}}'],changeDetection:0})};function Foe(i,e){if(i&1&&(ue(0,"p",13),R(1),ve()),i&2){let t=S();T(),ze(t.subtitle)}}var O_=class i{message="Saving design\u2026";subtitle=null;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-save-loader"]],inputs:{message:"message",subtitle:"subtitle"},decls:16,vars:4,consts:[["role","status","aria-live","polite",1,"save-loader-container"],[1,"save-loader-content"],[1,"spinner-wrapper"],["viewBox","0 0 100 100",1,"spinner"],["cx","50","cy","50","r","45","fill","none","stroke","currentColor","stroke-width","4","stroke-dasharray","283.7","stroke-dashoffset","0","opacity","0.15"],["cx","50","cy","50","r","45","fill","none","stroke","url(#spinnerGradient)","stroke-width","4","stroke-dasharray","70.9","stroke-dashoffset","0","stroke-linecap","round"],["id","spinnerGradient","x1","0%","y1","0%","x2","100%","y2","100%"],["offset","0%","stop-color","var(--save-loader-color, #a70b0b)"],["offset","100%","stop-color","var(--save-loader-color, #a70b0b)","stop-opacity","0.3"],["role","img","aria-label","Save in progress",1,"success-icon"],[1,"ri-save-line"],[1,"text-content"],[1,"message"],[1,"subtitle"]],template:function(t,n){t&1&&(ue(0,"div",0)(1,"div",1)(2,"div",2),il(),ue(3,"svg",3),kt(4,"circle",4)(5,"circle",5),ue(6,"defs")(7,"linearGradient",6),kt(8,"stop",7)(9,"stop",8),ve()()(),yu(),ue(10,"div",9),kt(11,"i",10),ve()(),ue(12,"div",11)(13,"p",12),R(14),ve(),ae(15,Foe,2,1,"p",13),ve()()()),t&2&&(fn("aria-label",n.message),T(13),fn("aria-label",n.message),T(),ze(n.message),T(),le(n.subtitle?15:-1))},styles:["[_nghost-%COMP%]{display:block}.save-loader-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem;padding:2rem}.save-loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1.25rem}.spinner-wrapper[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;display:flex;align-items:center;justify-content:center}.spinner[_ngcontent-%COMP%]{width:80px;height:80px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.success-icon[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--save-loader-color, #a70b0b);opacity:.8}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:32px;animation:_ngcontent-%COMP%_pulse-icon 2s ease-in-out infinite}.text-content[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:var(--p-text-color, #0f172a);letter-spacing:.3px}.subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-color-secondary, #64748b);font-weight:400;letter-spacing:.2px}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_pulse-icon{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}@media(max-width:480px){.save-loader-container[_ngcontent-%COMP%]{padding:1.5rem 1rem;gap:1rem}.spinner-wrapper[_ngcontent-%COMP%], .spinner[_ngcontent-%COMP%]{width:64px;height:64px}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}.message[_ngcontent-%COMP%]{font-size:.95rem}.subtitle[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:0})};var R_=new Ze("SDK_RUNTIME_CONFIG");var p4=1024,m4=4096;async function k_(i,e,t,n){if(console.log("SVG ::::: ",i),console.log("OBJ ::::: ",e),console.log("MTL ::::: ",t),console.log("materialSourceUrl ::::: ",n),typeof window>"u"||typeof document>"u")throw new Error("Thumbnail generation requires a browser environment.");let r=new id;r.background=null;let o=new pi(45,1,.1,4e3),s=new Af({antialias:!0,alpha:!0});s.setSize(p4,p4,!1),s.setPixelRatio(Math.min(window.devicePixelRatio||1,3)),s.setClearColor(0,0),s.outputColorSpace=_n,s.toneMapping=dd,s.toneMappingExposure=1;let a=await Noe(e,t,n),l=await Hoe(i,s),c=new Set;Woe(a),$oe(a),qoe(a,l,c),Xoe(r),r.add(a);let d=tse(r,a,o),u=[{key:"front",direction:new $(0,.15,1)},{key:"right",direction:new $(1,.15,0)},{key:"back",direction:new $(0,.15,-1)},{key:"left",direction:new $(-1,.15,0)}],f=[];try{for(let h of u){let p=h.direction.clone().normalize().multiplyScalar(d.distance).add(d.center);o.position.copy(p),o.lookAt(d.center),o.updateProjectionMatrix(),s.render(r,o),f.push({view:h.key,dataUrl:s.domElement.toDataURL("image/png")})}return f}finally{nse(a,c),c.has(l)||l.dispose(),s.dispose()}}async function Noe(i,e,t){let n=new Qf;if(e?.value?.trim()){let o=new eh,s=e.type==="url"?g4(t??e.value):g4(t),a=e.type==="url"?await Loe(o,e.value,s):await y4(o,e.value,s);a.preload(),n.setMaterials(a)}return i.type==="url"?await n.loadAsync(i.value):n.parse(i.value)}async function Loe(i,e,t){let n=await fetch(e);if(!n.ok)throw new Error(`Failed to load MTL (${n.status})`);let r=await n.text();return y4(i,r,t)}function y4(i,e,t){return new Promise((n,r)=>{try{let o=Uoe(e,t),s=i.parse(o,t);n(s)}catch(o){r(new Error(`Failed to parse MTL text: ${o instanceof Error?o.message:"Unknown error"}`))}})}function Uoe(i,e){return i.trim()?i.split(/\r?\n/).map(t=>Boe(t,e)).join(`
4615
- `):i}function Boe(i,e){let t=i.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!t)return i;let[,n,r,o]=t,s=o.trim().split(/\s+/);if(!s.length)return i;let a=s[s.length-1];if(zoe(a))return i;let l=Voe(e,a);return l?(s[s.length-1]=l,`${n}${r} ${s.join(" ")}`):i}function zoe(i){let e=i.trim();return/^https?:\/\//i.test(e)||/^\/\//.test(e)}function Voe(i,e){let n=e.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!n)return e;if(!i)return n;try{return new URL(n,i).toString()}catch{let r=i.endsWith("/")?"":"/";return`${i}${r}${n}`}}async function Hoe(i,e){let t=i.type==="url"?await Goe(i.value):i.value,n=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n);try{let o=await joe(r),s=document.createElement("canvas");s.width=m4,s.height=m4;let a=s.getContext("2d");if(!a)throw new Error("Failed to create canvas context for SVG texture.");a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.clearRect(0,0,s.width,s.height);let l=o.width/o.height,c=s.width,d=s.height;l>1?d=s.height/l:c=s.width*l,a.drawImage(o,0,0,c,d);let u=new Rs(s);return u.colorSpace=_n,u.minFilter=bo,u.magFilter=Wn,u.anisotropy=e.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Li,u.wrapT=Li,u.needsUpdate=!0,u}finally{URL.revokeObjectURL(r)}}function g4(i){if(!i)return"";try{if(typeof window<"u")return new URL(".",new URL(i,window.location.href)).toString()}catch{}let e=i.split("?")[0].split("#")[0],t=e.lastIndexOf("/");return t>=0?e.slice(0,t+1):""}async function Goe(i){let e=await fetch(i,{cache:"no-cache"});if(!e.ok)throw new Error(`Failed to load SVG (${e.status})`);return e.text()}function joe(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>t(new Error("Failed to decode SVG image.")),n.src=i})}function Woe(i){Yoe(i);let t=new Ji().setFromObject(i).getSize(new $),n=Math.max(t.x,t.y,t.z);if(!Number.isFinite(n)||n<=0)return;i.scale.setScalar(4/n);let o=new Ji().setFromObject(i).getCenter(new $);i.position.sub(o),i.traverse(s=>{let a=s;!a.isMesh||!a.geometry||(a.geometry.computeVertexNormals(),a.castShadow=!1,a.receiveShadow=!1)})}function $oe(i){let e=t=>{if(!t)return new Da({color:16777215,roughness:.8,metalness:.1});let n=t,r=t;return new Da({map:n.map??null,color:r.color?.clone()??new ut(16777215),roughness:.8,metalness:.1})};i.traverse(t=>{let n=t;if(!n.isMesh)return;let r=n.material;Array.isArray(r)?n.material=r.map(o=>e(o)):n.material=e(r),n.castShadow=!0,n.receiveShadow=!0})}function Yoe(i){i.traverse(e=>{let t=e;if(!t.isMesh||!(t.geometry instanceof ni))return;let n=jx(t.geometry.clone(),1e-5);n.deleteAttribute("normal"),n.computeVertexNormals(),n.normalizeNormals(),n.computeBoundingBox(),n.computeBoundingSphere(),t.geometry.dispose(),t.geometry=n,(Array.isArray(t.material)?t.material:[t.material]).forEach(o=>{o&&("flatShading"in o&&(o.flatShading=!1),o.side=Zi,o.needsUpdate=!0)})})}function Xoe(i){let e=new cd(16777215,.6);i.add(e);let t=new Wo(16777215,1.2);t.position.set(100,150,100),i.add(t);let n=new Wo(16777215,.6);n.position.set(-100,50,100),i.add(n);let r=new Wo(16777215,.8);r.position.set(0,100,-150),i.add(r);let o=new ld(16777215,13421772,.5);o.position.set(0,200,0),i.add(o)}function qoe(i,e,t){let n=new WeakMap,r=new WeakMap,o=x4(e);i.traverse(s=>{let a=s;!a.isMesh||!a.material||(Array.isArray(a.material)?a.material.forEach(l=>{v4(l,e,o,n,r,t)}):v4(a.material,e,o,n,r,t))})}function v4(i,e,t,n,r,o){if(!Koe(i))return;n.has(i)||n.set(i,i.map??null);let s=n.get(i)??null;if(Joe(i,!!s,r),!s||!t){s&&o.add(s),i.map=e,i.needsUpdate=!0;return}let a=x4(s),l=a?_4(a):null;if(!a||!l){o.add(s),i.map=e,i.needsUpdate=!0;return}let c=ese(a,t,l.width,l.height);if(!c){o.add(s),i.map=e,i.needsUpdate=!0;return}o.add(s);let d=new Rs(c);Qoe(d,s,e),d.needsUpdate=!0,o.add(d),i.map=d,i.needsUpdate=!0}function Koe(i){return"map"in i}function Zoe(i){return"color"in i&&i.color instanceof ut}function Joe(i,e,t){if(Zoe(i)){if(t.has(i)||t.set(i,i.color.clone()),e){i.color.copy(t.get(i));return}i.color.set(16777215)}}function Qoe(i,e,t){i.colorSpace=e.colorSpace??t.colorSpace,i.flipY=e.flipY,i.wrapS=e.wrapS,i.wrapT=e.wrapT,i.magFilter=e.magFilter,i.minFilter=e.minFilter,i.anisotropy=e.anisotropy||t.anisotropy,i.generateMipmaps=e.generateMipmaps,i.premultiplyAlpha=e.premultiplyAlpha,i.unpackAlignment=e.unpackAlignment,i.repeat.copy(e.repeat),i.offset.copy(e.offset),i.center.copy(e.center),i.rotation=e.rotation,i.matrixAutoUpdate=e.matrixAutoUpdate,i.matrix.copy(e.matrix)}function x4(i){let e=i.source?.data??i.image;if(!e)return null;let t=_4(e);return!t||t.width<=0||t.height<=0?null:e}function _4(i){if(i instanceof HTMLVideoElement)return!i.videoWidth||!i.videoHeight?null:{width:i.videoWidth,height:i.videoHeight};let e=i;return!e.width||!e.height?null:{width:e.width,height:e.height}}function ese(i,e,t,n){let r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d");if(!o)return null;try{return o.clearRect(0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,o.drawImage(i,0,0,t,n),o.globalCompositeOperation="multiply",o.globalAlpha=1,o.drawImage(e,0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,r}catch{let s=document.createElement("canvas");s.width=t,s.height=n;let a=s.getContext("2d");return a?(a.clearRect(0,0,t,n),a.drawImage(i,0,0,t,n),a.drawImage(e,0,0,t,n),s):null}}function tse(i,e,t){let n=new Ji().setFromObject(e),r=n.getCenter(new $),o=n.getSize(new $),s=Math.max(o.x,o.y,o.z)*.5,a=Math.max(s,.5),l=t.fov*(Math.PI/180),c=a/Math.tan(l/2)*1.45;return t.near=Math.max(c/200,.05),t.far=Math.max(c*20,500),t.updateProjectionMatrix(),i.updateMatrixWorld(!0),{center:r,distance:c}}function nse(i,e){let t=new Set;i.traverse(n=>{let r=n;if(r.isMesh&&(r.geometry?.dispose(),!!r.material)){if(Array.isArray(r.material)){r.material.forEach(o=>b4(o,t));return}b4(r.material,t)}}),e.forEach(n=>{t.has(n)||(n.dispose(),t.add(n))})}function b4(i,e){let t=i;Qd(t.map,e),Qd(t.lightMap,e),Qd(t.normalMap,e),Qd(t.roughnessMap,e),Qd(t.metalnessMap,e),Qd(t.aoMap,e),Qd(t.emissiveMap,e),i.dispose()}function Qd(i,e){!i||e.has(i)||(i.dispose(),e.add(i))}var F_=class i{async generateThumbnails(e,t,n,r){return k_(e,t,n,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var N_=(l=>(l.PREDESIGNS="predesigns",l.COLOR="color",l.PATTERN="pattern",l.PERSONALIZATION="personalization",l.OVERLAY="overlay",l.BACKGROUND="background",l.RENDER_ORDER="render-order",l.CANVAS_GUIDE="canvas-guide",l))(N_||{}),L_={PREDESIGNS:"predesigns-fixed",RENDER_ORDER:"render-order-fixed",CANVAS_GUIDE:"canvas-guide-fixed"},eu={DESIGNS:"Designs",RENDER_POSITION:"Render Position",CUSTOMIZATION:"Customization",PERSONALIZATION:"Personalization"},U_={PATTERN:"pattern",OVERLAY:"overlay",UNKNOWN:"Unknown"},S4="ri-stack-line",C4="panel";var ise=["*"],bh=class i{value=ye.required();valueChange=Pt();isActive(e){return this.value()===e}select(e){this.value()!==e&&this.valueChange.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tabs"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},ngContentSelectors:ise,decls:2,vars:0,consts:[[1,"ui-tabs"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tabs[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var rse=["*"],B_=class i{value=ye.required();tabs=Z(bh,{host:!0});active=Me(()=>this.tabs.isActive(this.value()));onSelect(){this.tabs.select(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tab"]],inputs:{value:[1,"value"]},ngContentSelectors:rse,decls:2,vars:2,consts:[["type","button",1,"ui-tab",3,"click"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(){return n.onSelect()}),Ti(1),ve()),t&2&&dt("ui-tab--active",n.active())},styles:[".ui-tab[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:.84rem;font-weight:500;line-height:1;padding:.7rem .95rem .72rem;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color .2s ease,border-color .2s ease}.ui-tab[_ngcontent-%COMP%]:hover{color:rgb(var(--text-color, 15 23 42));border-bottom-color:rgb(var(--surface-300, 203 213 225))}.ui-tab--active[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));border-bottom-color:rgb(var(--primary-color, 98 101 241))}.ui-tab[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:inset 0 -2px rgb(var(--primary-color, 98 101 241))}"],changeDetection:0})};var ose=["*"],z_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tablist"]],ngContentSelectors:ose,decls:2,vars:0,consts:[[1,"ui-tablist"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tablist[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;padding:0}@media(max-width:992px){.ui-tablist[_ngcontent-%COMP%]{margin-top:5px}}"],changeDetection:0})};var V_=class i{buildStepLookup(e){let t=new Map,n=r=>{r.forEach(o=>{t.set(o.id,o),o.children?.length&&n(o.children)})};return n(e),t}flattenSteps(e,t=0){return[...e].sort((r,o)=>r.position-o.position).flatMap(r=>[{id:r.id,name:r.name,iconClass:r.iconClass,depth:t},...this.flattenSteps(r.children??[],t+1)])}buildParentNav(e,t,n){return[...[...e].filter(r=>!r.parentStepId).sort((r,o)=>r.position-o.position).map(r=>({id:r.id,name:r.name,iconClass:r.iconClass,depth:0})),{id:t,name:eu.RENDER_POSITION,iconClass:n,depth:0}]}buildPanelsByStep(e){let{stepNav:t,customizations:n,personalizationItems:r,stepLookup:o,renderOrderStepId:s,renderOrderItems:a}=e,l=new Map;t.forEach(d=>{this.buildCustomizationPanels(d.id,n,o).forEach(u=>this.addPanelToMap(l,d.id,u)),this.buildPersonalizationPanels(d.id,r,o).forEach(u=>this.addPanelToMap(l,d.id,u))}),this.addPanelToMap(l,s,{kind:"render-order",trackId:`${s}-${C4}`,title:eu.RENDER_POSITION,items:a});let c="canvas-guide-fixed";return this.addPanelToMap(l,c,{kind:"canvas-guide",trackId:`${c}-panel`,title:"Canvas Guide"}),l}hasPlacementType(e,t){return(e??"").trim().toUpperCase()===t}addPanelToMap(e,t,n){let r=e.get(t)??[];e.set(t,[...r,n])}buildCustomizationPanels(e,t,n){let r=t.filter(a=>a.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.CUSTOMIZATION,s=r.reduce((a,l)=>{let c=l.type??U_.UNKNOWN;return a[c]=a[c]?[...a[c],l]:[l],a},{});return Object.entries(s).map(([a,l])=>{let c=[...l].sort((u,f)=>u.position-f.position),d=this.isPatternCustomizationType(a)?"pattern":"color";return{kind:d,trackId:`${e}-${d}-${a}`,title:o,customizations:c}})}buildPersonalizationPanels(e,t,n){let r=t.filter(d=>d.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.PERSONALIZATION,s=[],a=r.filter(d=>this.hasPlacementType(d.type,"TEXT")||this.hasPlacementType(d.type,"LOGO"));a.length&&s.push({kind:"personalization",trackId:`${e}-personalization`,title:o,items:a});let l=r.filter(d=>this.hasPlacementType(d.type,"OVERLAY"));l.length&&s.push({kind:"overlay",trackId:`${e}-overlay`,title:o,items:l});let c=r.filter(d=>this.hasPlacementType(d.type,"BACKGROUND"));return c.length&&s.push({kind:"background",trackId:`${e}-background`,title:o,templates:c}),s}isPatternCustomizationType(e){let t=e.trim().toLowerCase();return t.includes(U_.PATTERN)||t===U_.OVERLAY}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var H_=class i{async fetchFileAsText(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);return t.text()}createJsonFile(e,t){return new File([e],`${t}-${Date.now()}.json`,{type:"application/json"})}downloadFile(e){if(typeof document>"u")return;let t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=e.name,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async copyTextToClipboard(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>"u")return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}downloadDataUrlFile(e,t){if(typeof document>"u")return;let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),document.body.removeChild(n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function M4(i){let e=i.svgDoc.documentElement;return{exportedAt:new Date().toISOString(),preDesignId:i.preDesignId,svg:{width:i.svgWidth,height:i.svgHeight,viewBox:i.svgViewBox,rootId:e?.getAttribute("id")??null,content:i.svgString},renderOrder:i.renderOrder,placements:i.placementZones.filter(t=>i.usedPlacementKeys.has(t.placementKey)).map(t=>({id:t.id,placementKey:t.placementKey,label:t.label,elementName:t.elementName,allowedKinds:t.allowedKinds,required:t.required,bounds:t.bounds})),paths:[...i.styledPaths,...i.textPathSummaries],overlays:{text:i.textOverlays,logo:i.logoOverlays},background:{selectedKey:i.selectedBackgroundKey&&i.backgrounds.some(t=>t.actionItemId===i.selectedBackgroundKey)?i.selectedBackgroundKey:null,items:i.backgrounds},pattern:{selectedUploadedPatternId:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternId:null,selectedFileUrl:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternFileUrl:null,definitions:i.filteredPatternDefinitions,overlays:i.usedPatternOverlays.map(t=>({id:t.id,label:t.label??null,placementId:t.placementId??null,fill:t.fill??null,opacity:t.opacity,sourceUrl:t.sourceUrl??null,thumbnailUrl:t.thumbnailUrl??null,pathData:t.pathData})),targets:i.patternTargets,colors:ase(i.svgDoc,i.usedPatternIds)}}}function T4(i){return new Set(Array.from(i.querySelectorAll('[data-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function D4(i){return new Set(Array.from(i.querySelectorAll('path[data-pattern-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function A4(i){return Array.from(i.querySelectorAll("path, rect, circle, ellipse, polygon, polyline")).filter(e=>!e.closest("defs")).filter(e=>!e.closest('[data-overlay="true"]')).map(e=>{let t=yh(e,"fill"),n=k4(e,t),r=F4(i,t);return{id:e.getAttribute("id")??null,tag:e.tagName,fill:r?.colors.length?r.colors:t,fillGradient:r,stroke:yh(e,"stroke"),strokeWidth:yh(e,"stroke-width"),opacity:yh(e,"opacity"),transform:e.getAttribute("transform"),patternFill:n}})}function I4(i){return Array.from(i.querySelectorAll("[id]")).filter(e=>!e.closest("defs")).map(e=>{let t=yh(e,"fill"),n=k4(e,t);return n?{targetId:e.id,patternId:n,fill:t}:null}).filter(e=>!!e)}function P4(i){let{patternOverlays:e,patternDefinitions:t,patternTargets:n,usedPatternOverlayIds:r}=i,o=new Set(n.map(l=>l.patternId)),s=e.filter(l=>{if(!r.has(l.id))return!1;let c=sse(l.fill);return c&&o.add(c),!0}),a=Object.fromEntries(Object.entries(t).filter(([l])=>o.has(l)));return{usedPatternIds:o,usedPatternOverlays:s,filteredPatternDefinitions:a}}function O4(i){let{textOverlays:e,logoOverlays:t,backgrounds:n,usedPatternOverlays:r}=i,o=new Set;return e.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),t.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),n.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),r.forEach(s=>{s.placementId&&o.add(s.placementId)}),o}function R4(i){return i.flatMap(e=>{let t=(e.text??"").trim()||e.id,n=[{id:t,tag:"text",fill:e.style.fill??null,fillGradient:null,stroke:null,strokeWidth:null,opacity:null,transform:null,patternFill:null}];return e.style.stroke&&(e.style.strokeWidth??0)>0&&n.push({id:`${t} Outline 1`,tag:"text-shadow",fill:e.style.stroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.strokeWidth}`,opacity:null,transform:null,patternFill:null}),e.style.secondStroke&&(e.style.secondStrokeWidth??0)>0&&n.push({id:`${t} Outline 2`,tag:"text-shadow",fill:e.style.secondStroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.secondStrokeWidth}`,opacity:null,transform:null,patternFill:null}),n})}function sse(i){return(i??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]??null}function yh(i,e){let t=i.getAttribute(e);if(t&&t.trim().length>0)return t.trim();let n=i.getAttribute("style");if(!n)return null;let r=e.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.split(":")[1]?.trim()??null;return s&&s.length>0?s:null}function k4(i,e){let t=i.getAttribute(me.DATA_PATTERN_FILL)?.trim();return t||((e??"").match(/^url\(#([^)]+)\)$/i)?.[1]??null)}function F4(i,e){let r=(e??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]?.trim();if(!r)return null;let o=(l,c=new Set)=>{if(!l||c.has(l))return null;c.add(l);let d=i.getElementById(l);if(!(d instanceof SVGLinearGradientElement)&&!(d instanceof SVGRadialGradientElement))return null;if(Array.from(d.querySelectorAll(":scope > stop")).length>0)return d;let f=d.getAttribute("href")??d.getAttributeNS($d,"href"),h=f?.startsWith("#")?f.slice(1).trim():null;return h?o(h,c)??d:d},s=o(r);if(!s)return null;let a=Array.from(s.querySelectorAll(":scope > stop")).map(l=>{let c=l.getAttribute("stop-color")?.trim()??w4(l,"stop-color")??null;if(!c)return null;let d=l.getAttribute("stop-opacity")?.trim()??w4(l,"stop-opacity"),u=d&&d.length>0?Number.parseFloat(d):NaN;return{offset:l.getAttribute("offset")?.trim()??null,color:c,opacity:Number.isFinite(u)?u:null}}).filter(l=>!!l);return a.length===0?null:{gradientId:r,type:s.tagName==="radialGradient"?"radialGradient":"linearGradient",colors:Array.from(new Set(a.map(l=>l.color))),stops:a}}function w4(i,e){let t=i.getAttribute("style");if(!t)return null;let n=e.toLowerCase(),r=t.split(";").map(s=>s.trim()).find(s=>s.toLowerCase().startsWith(`${n}:`));if(!r)return null;let o=r.split(":")[1]?.trim()??null;return o&&o.length>0?o:null}function ase(i,e){let t=lse(i);return Array.from(e).map(n=>{let r=i.getElementById(n);if(!(r instanceof SVGPatternElement))return null;let o=use(r,i),s=new Map,a=c=>fse(i,s,c),l=c=>{let d=yh(c,"fill");return d&&d.length>0?d:dse(c,t)};return o.forEach(c=>{a(l(c)),Array.from(c.querySelectorAll("*")).forEach(u=>{a(l(u))})}),s.size===0?null:{patternId:n,colors:Array.from(s.values())}}).filter(n=>!!n)}function lse(i){let e=new Map;return Array.from(i.querySelectorAll("style")).forEach(n=>{let o=(n.textContent??"").matchAll(/([^{}]+)\{([^{}]*)\}/g);for(let s of o){let a=(s[1]??"").trim(),l=(s[2]??"").trim();if(!a||!l)continue;let c=l.match(/(?:^|;)\s*fill\s*:\s*([^;]+)\s*(?:;|$)/i);if(!c)continue;let d=c[1]?.trim()??"";if(!d)continue;a.split(",").map(f=>f.trim()).filter(f=>f.length>0).forEach(f=>{let h=cse(f);h&&e.set(h,d)})}}),e}function cse(i){let e=i.trim();if(!e)return null;let t=e.split(":")[0]?.trim()??"";if(!t)return null;let n=t.split(/[\s>+~]+/).map(o=>o.trim()).filter(o=>o.length>0),r=n[n.length-1]??"";return r&&(/^#[A-Za-z_][\w-]*$/.test(r)||/^\.[A-Za-z_][\w-]*$/.test(r)||/^[A-Za-z][\w-]*$/.test(r))?r.toLowerCase():null}function dse(i,e){let t=(i.getAttribute("id")??"").trim();if(t){let o=e.get(`#${t.toLowerCase()}`);if(o)return o}let n=(i.getAttribute("class")??"").trim();if(n){let o=n.split(/\s+/).map(s=>s.trim()).filter(s=>s.length>0);for(let s of o){let a=e.get(`.${s.toLowerCase()}`);if(a)return a}}return e.get(i.tagName.toLowerCase())??null}function use(i,e){let t=[],n=new Set,r=i;for(;r;){let o=(r.getAttribute("id")??"").trim();if(o&&n.has(o))break;o&&n.add(o),t.push(r);let s=r.getAttribute("href")?.trim()??r.getAttributeNS($d,"href")?.trim(),a=s?.startsWith("#")?s.slice(1).trim():null;if(!a)break;let l=e.getElementById(a);r=l instanceof SVGPatternElement?l:null}return t}function fse(i,e,t){let n=(t??"").trim();if(!n)return;let r=F4(i,n);if(r?.colors.length){r.colors.forEach(a=>{let l=E4(a);if(!l)return;let c=l.toLowerCase();e.has(c)||e.set(c,l)});return}let o=E4(n);if(!o)return;let s=o.toLowerCase();e.has(s)||e.set(s,o)}function E4(i){let e=(i??"").trim();if(!e)return null;let t=e.toLowerCase();return t==="none"||t.startsWith("url(")?null:e}var G_=class i{buildDesignExportPayload(e){let{svgDoc:t,svgString:n,overlays:r,personalizationItems:o,placementZones:s,placementNameByKey:a,backgroundState:l,backgroundImageTemplates:c,patternState:d,patternOverlays:u,renderOrder:f,svgDimensions:h,svgViewBox:p,bounds:v,overlayDimensionsPxById:g,selectedEffectIdByOverlay:m,textStyleResolvers:b,selectedPredesignId:y}=e,_=this.buildEffectFileUrlById(o),w=T4(t),D=D4(t),A=A4(t),P=this.collectTextOverlayExports({overlays:r,bounds:v,effectFileUrlById:_,placementNameByKey:a,usedOverlayIds:w,selectedEffectIdByOverlay:m,overlayDimensionsPxById:g,textStyleResolvers:b}),E=this.collectLogoOverlayExports({overlays:r,bounds:v,placementNameByKey:a,overlayDimensionsPxById:g,usedOverlayIds:w}),I=this.collectBackgroundExports(t,l,c),L=I4(t),Y=P4({patternOverlays:u,patternDefinitions:d.definition,patternTargets:L,usedPatternOverlayIds:D}),G=O4({textOverlays:P,logoOverlays:E,backgrounds:I,usedPatternOverlays:Y.usedPatternOverlays}),Q=R4(P);return M4({preDesignId:y,svgDoc:t,svgString:n,svgWidth:h?.width??null,svgHeight:h?.height??null,svgViewBox:p,renderOrder:f,placementZones:s,usedPlacementKeys:G,styledPaths:A,textPathSummaries:Q,textOverlays:P,logoOverlays:E,selectedBackgroundKey:l.selectedKey,backgrounds:I,selectedPatternId:d.selectedId,selectedPatternFileUrl:d.selectedFileUrl,usedPatternIds:Y.usedPatternIds,filteredPatternDefinitions:Y.filteredPatternDefinitions,usedPatternOverlays:Y.usedPatternOverlays,patternTargets:L})}buildEffectFileUrlById(e){return e.reduce((t,n)=>((n.packs??[]).filter(o=>(o.type??"").toLowerCase().includes(Ga.EFFECT)).forEach(o=>{(o.dataSources??[]).forEach(s=>{let a=s?.id?.trim(),l=s?.fileUrl?.trim();a&&l&&t.set(a,l)})}),t),new Map)}collectTextOverlayExports(e){let{overlays:t,bounds:n,effectFileUrlById:r,placementNameByKey:o,usedOverlayIds:s,selectedEffectIdByOverlay:a,overlayDimensionsPxById:l,textStyleResolvers:c}=e;return t.filter(Dt).filter(d=>s.has(d.id)).map(d=>{let u=a.get(d.id)??null,f=u?r.get(u)??null:null,h=this.resolveFontFamily(d,c),p=this.resolveFontWeight(d,c),v=this.resolveFontStyle(d,c),g=this.resolveLetterSpacing(d,c),m=d.lineHeight??c.defaultLineHeight,b=this.resolveStrokeColor(d,c),y=d.strokeWidth??0,_=this.resolveSecondStrokeColor(d,c),w=d.secondStrokeWidth??0,D=this.resolveCurveAmount(d,c),A=d.shadowBlur??c.defaultShadowBlur,P=d.shadowOffsetX??c.defaultShadowOffsetX,E=d.shadowOffsetY??c.defaultShadowOffsetY,I=d.shadowColor??c.defaultShadowColor,L=Number.isFinite(d.horizontalScale)?Math.max(d.horizontalScale,.1):1,Y=Number.isFinite(d.verticalScale)?Math.max(d.verticalScale,.1):1,G=d.fontSize*Math.max((d.text??"").trim().length,1)*.5*L,Q=d.fontSize*(d.lineHeight??c.defaultLineHeight)*Y,ee=l?.get(d.id),te=ee&&Number.isFinite(ee.width)&&ee.width>0?ee.width:G,X=ee&&Number.isFinite(ee.height)&&ee.height>0?ee.height:Q,ie=Math.abs(A)>1e-4||Math.abs(P)>1e-4||Math.abs(E)>1e-4,Se={applied:[...b&&y>0?["stroke"]:[],..._&&w>0?["secondStroke"]:[],...ie?["shadow"]:[],...Math.abs(D)>1e-4?["curve"]:[],...d.warpEnabled===!0?["warp"]:[],...p==="bold"?["bold"]:[],...v==="italic"?["italic"]:[]],stroke:b&&y>0?{color:b,width:y}:null,secondStroke:_&&w>0?{color:_,width:w}:null,shadow:ie?{blur:A,offsetX:P,offsetY:E,color:I}:null,curve:Math.abs(D)>1e-4?{amount:D}:null,warp:d.warpEnabled===!0,bold:p==="bold",italic:v==="italic"};return{id:d.id,kind:d.kind,text:d.text,effectId:u,effectFileUrl:f,placementKey:d.placementKey??null,lockAspectRatio:d.lockAspectRatio??!0,placementName:d.placementKey?o.get(d.placementKey)??d.placementKey:null,transform:{normalizedX:d.normalizedX,normalizedY:d.normalizedY,absoluteCenterX:n.x+d.normalizedX*n.width,absoluteCenterY:n.y+d.normalizedY*n.height,angle:d.angle??0},style:{fill:d.fill,fontFamily:h,fontSize:d.fontSize,horizontalScale:L,verticalScale:Y,fontWeight:p,fontStyle:v,letterSpacing:g,lineHeight:m,stroke:b,strokeWidth:y,secondStroke:_,secondStrokeWidth:w,curveAmount:D,shadowBlur:A,shadowOffsetX:P,shadowOffsetY:E,shadowColor:I},dimensions:{renderedWidth:te,renderedHeight:X},effects:Se}})}collectLogoOverlayExports(e){let{overlays:t,bounds:n,placementNameByKey:r,overlayDimensionsPxById:o,usedOverlayIds:s}=e;return t.filter(ai).filter(a=>s.has(a.id)).map(a=>{let l=o?.get(a.id),c=l&&Number.isFinite(l.width)&&l.width>0?l.width:a.normalizedWidth*n.width,d=l&&Number.isFinite(l.height)&&l.height>0?l.height:a.normalizedHeight*n.height;return{id:a.id,kind:a.kind,logoBlobId:a.logoBlobId??null,imageName:a.imageName??null,imageSrc:a.imageSrc,processedImageSrc:a.processedImageSrc??null,placementKey:a.placementKey??null,lockAspectRatio:a.lockAspectRatio??!0,placementName:a.placementKey?r.get(a.placementKey)??a.placementKey:null,transform:{normalizedX:a.normalizedX,normalizedY:a.normalizedY,absoluteCenterX:n.x+a.normalizedX*n.width,absoluteCenterY:n.y+a.normalizedY*n.height,angle:a.angle??0},dimensions:{originalWidth:a.originalWidth,originalHeight:a.originalHeight,normalizedWidth:a.normalizedWidth,normalizedHeight:a.normalizedHeight,renderedWidth:c,renderedHeight:d},opacity:a.opacity??1}})}collectBackgroundExports(e,t,n){return n.map(r=>{let o=t.images[r.actionItemId],s=e.getElementById(r.actionItemId),a=s?.getAttribute("href")??s?.getAttributeNS($d,"href"),l=!!o?.transform&&(Math.abs((o.transform.scale??1)-1)>1e-4||Math.abs(o.transform.rotation??0)>1e-4||Math.abs(o.transform.translateX??0)>1e-4||Math.abs(o.transform.translateY??0)>1e-4||Math.abs((o.transform.opacity??1)-1)>1e-4);return{isUsed:!!o?.fileName||!!o?.src?.trim()||!!a?.trim()||l,placementKey:r.placementKey??null,templateId:r.id,actionItemId:r.actionItemId,name:r.name??null,imageSrc:o?.src??null,fileName:o?.fileName??null,transform:o?.transform??null,svgTransform:s?.getAttribute("transform")??null,svgOpacity:s?.getAttribute("opacity")??null,blobResourceId:o?.blobResourceId??null}}).filter(r=>r.isUsed).map(s=>{var a=s,{isUsed:r}=a,o=nn(a,["isUsed"]);return o})}resolveFontFamily(e,t){let n=e.fontFamily?.trim();return n&&n.length>0?n:t.defaultFontFamily}resolveFontWeight(e,t){return e.fontWeight??t.defaultFontWeight}resolveFontStyle(e,t){return e.fontStyle??t.defaultFontStyle}resolveLetterSpacing(e,t){return Number.isFinite(e.letterSpacing)?e.letterSpacing:t.defaultLetterSpacing}resolveStrokeColor(e,t){if(!((e.strokeWidth??0)>0))return null;let r=e.stroke?.trim();return r&&r.length>0?r:t.defaultStrokeColor}resolveSecondStrokeColor(e,t){if(!((e.secondStrokeWidth??0)>0))return null;let r=e.secondStroke?.trim();return r&&r.length>0?r:t.defaultSecondStrokeColor}resolveCurveAmount(e,t){return Number.isFinite(e.curveAmount)?e.curveAmount:t.defaultCurveAmount}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hse=10,pse=1,mse=3;var j_=class i{resolveHistoryAction(e){if(!e.ctrlKey&&!e.metaKey)return null;let t=e.key.toLowerCase();return t==="z"?e.shiftKey?"REDO":"UNDO":t==="y"?"REDO":null}resolveOverlayAction(e,t){let n=e.key.toLowerCase(),r=e.shiftKey?hse:pse,o=t*mse;switch(n){case"arrowup":return{kind:"MOVE",deltaXPx:0,deltaYPx:-r};case"arrowdown":return{kind:"MOVE",deltaXPx:0,deltaYPx:r};case"arrowleft":return{kind:"MOVE",deltaXPx:-r,deltaYPx:0};case"arrowright":return{kind:"MOVE",deltaXPx:r,deltaYPx:0};case"q":return{kind:"ROTATE",deltaAngle:e.shiftKey?-o:-t};case"e":return{kind:"ROTATE",deltaAngle:e.shiftKey?o:t};case"[":return{kind:"ROTATE",deltaAngle:-t};case"]":return{kind:"ROTATE",deltaAngle:t};default:return null}}isTextInputTarget(e){let t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"||e.isContentEditable}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var N4=.08,W_=class i{constructor(e){this.measurementService=e}resolveLayerDefinition(e,t){if(!e)return null;let n=e.toLowerCase();return t.find(r=>r.name.toLowerCase()===n)??null}resolveLayerBoundsById(e){let t=e.pathId.trim();if(!t||!e.svgDoc)return{bounds:null};let n=t.toLowerCase();if(e.layerBoundsCache.has(n))return{bounds:e.layerBoundsCache.get(n)??null};let r=e.svgDoc.getElementById(t),o=this.readElementBounds(r);if((!o||o.width<=0||o.height<=0)&&e.svgText&&e.measurementRoot){let l=this.measurementService.queryMeasurementElementById(e.measurementRoot,t);o=this.readElementBounds(l)}let s=o&&o.width>0&&o.height>0?o:null,a=new Map(e.layerBoundsCache);return a.set(n,s),{bounds:s,nextCache:a}}combineBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)l&&(t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height));if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o))return null;let s=r-t,a=o-n;return s<=0||a<=0?null:{x:t,y:n,width:s,height:a}}getLayerPreviewBounds(e,t){if(e.width<=0||e.height<=0||!t)return null;let n=t.width*N4,r=t.height*N4,o=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height,c=Math.max(t.x-n,o),d=Math.max(t.y-r,s),u=Math.min(t.x+t.width+n,a),f=Math.min(t.y+t.height+r,l);return u<=c||f<=d?e:{x:c,y:d,width:u-c,height:f-d}}normalizePreviewBounds(e,t){if(!e||e.width<=0||e.height<=0)return t;let n=t.x,r=t.y,o=t.x+t.width,s=t.y+t.height,a=Math.max(e.x,n),l=Math.max(e.y,r),c=Math.min(e.x+e.width,o),d=Math.min(e.y+e.height,s);return c<=a||d<=l?t:{x:a,y:l,width:c-a,height:d-l}}pointInsideBounds(e,t){return t.width<=0||t.height<=0?!1:e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}static \u0275fac=function(t){return new(t||i)(Ke(Kl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var $_=class i{api=Z(na);getManifest(e,t,n,r){return this.api.get(`products/${e}/manifest`,k(k({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),r?{"X-API-Key":r}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Y_=class i{api=Z(na);getPublicDistributor(e){return this.api.get("public/distributor",{},{"X-API-Key":e},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var X_=class i{manifestApi=Z($_);publicDistributorApi=Z(Y_);resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await vc(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,s=t.preDesigns??[]??[],a=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&s.length?s[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(p=>k({},p));l.filter(p=>(p.type??"").trim().toUpperCase()==="BACKGROUND").forEach(p=>{let m=(p.actionPathIdsCsv??p.actionItemId??"").toString().trim().split(",").map(b=>b.trim()).filter(b=>b.length>0).map(b=>b.startsWith("#")?b.slice(1).trim():b).filter(b=>b.length>0).join(",");p.actionPathIdsCsv=m,p.actionItemId=m});let c=t.steps??[]??[],d=t.threeDFileLink??t.model?.url??"",u=t.mtlFileLink??t.model?.mtlUrl??null,f=this.normalizeThreeDVariants({variants:t.threeDVariants??[],fallbackThreeDFileLink:d,fallbackMaterialFileLink:u}),h=this.resolveSelectedThreeDVariant(f);return{resolvedPredesignId:a,selectedThreeDVariantId:h?.id??null,threeDVariants:f,threeDFileLink:h?.threeDFileLink??d,materialFileLink:h?.mtlFileLink??u,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[]??[],predesigns:s,steps:c,pathIdAccordingLayers:t.layers??[]??[],renderPathAccordingLayers:t.renderLayers??[]??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}normalizeThreeDVariants(e){let t=(e.variants??[]).filter(n=>!!n?.id).map(n=>({id:n.id,name:n.name??"",key:n.key??"",position:Number.isFinite(n.position)?n.position:0,isDefault:!!n.isDefault,threeDFileLink:n.threeDFileLink??null,mtlFileLink:n.mtlFileLink??null})).sort((n,r)=>n.position-r.position||n.name.localeCompare(r.name,void 0,{sensitivity:"base"}));return t.length>0?t:e.fallbackThreeDFileLink?[{id:"default-model",name:"Default",key:"default-model",position:0,isDefault:!0,threeDFileLink:e.fallbackThreeDFileLink,mtlFileLink:e.fallbackMaterialFileLink}]:[]}resolveSelectedThreeDVariant(e){return e.length?e.find(t=>t.isDefault)??[...e].sort((t,n)=>t.position-n.position||t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))[0]:null}async resolveDistributorBranding(e,t){if(!e)return t;try{let n=await vc(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var q_=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Ot.missingProductId,productId:null,signature:o};let s=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return s.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:s.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:s.message||Ot.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(Ke(X_))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var jD={COLOR:"color",PATTERN:"pattern"},L4="image/png",U4="lineargradient",B4=1;var K_=class i{constructor(e,t){this.colorState=e;this.customizerState=t}personalizationState=Z(sc);captureSnapshot(e){if(!e.manifestLoaded||!e.svgDoc)return null;let t=new Map,n=new Map;return e.customizations.forEach(r=>{if(!this.isColorCustomization(r)||!r.actionPathIdsCsv)return;let o=this.readAppliedColorForRegionIds(e.svgDoc,r.actionPathIdsCsv);o&&(t.set(r.actionPathIdsCsv,o),r.name&&n.set(r.name.trim().toLowerCase(),o))}),{targetPredesignId:e.targetPredesignId,colorsByRegion:t,colorsByCustomizationName:n,backgrounds:this.captureBackgroundCarryover(e.backgroundState),patternSelections:this.capturePatternSelections(e.svgDoc,e.customizations,e.patternState),overlayPatterns:this.captureOverlayPatterns(e.svgDoc,e.patternOverlayState),textOverlays:e.overlays.filter(Dt).map(r=>k({},r)),logoOverlays:e.overlays.filter(ai).map(r=>k({},r))}}captureOverlayPatterns(e,t){let n=t.state().overlays??[],r=n.reduce((a,l)=>(a.set(l.id,l),a),new Map),s=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).reduce((a,l)=>{let c=(l.getAttribute("id")??"").trim();if(!c)return a;let d=r.get(c),u=this.readSvgPresentationValue(l,"fill")??d?.fill??null,f=this.readSvgPresentationValue(l,"opacity")??(typeof d?.opacity=="number"?`${d.opacity}`:null),h=f!==null?Number.parseFloat(f):NaN,p=Number.isFinite(h)?Math.min(1,Math.max(0,h)):d?.opacity??1,v=(l.getAttribute(me.DATA_PATTERN_SOURCE_URL)??"").trim()||(d?.sourceUrl??"").trim();return v&&a.push({id:c,label:(l.getAttribute(me.DATA_PATTERN_SOURCE_ID)??"").trim()||d?.label||c,placementId:(l.getAttribute(me.DATA_PATTERN_PLACEMENT_ID)??"").trim()||d?.placementId||null,fill:u&&u.trim().length>0?u:void 0,opacity:p,pathData:l.getAttribute("d")??d?.pathData??"",sourceUrl:v,thumbnailUrl:(l.getAttribute(me.DATA_PATTERN_THUMBNAIL_URL)??"").trim()||d?.thumbnailUrl}),a},[]);return s.length>0?s:n.filter(a=>!!a.sourceUrl).map(a=>k({},a))}readSvgPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}async applyIfNeeded(e){let t=e.snapshot;if(!t||!e.selectedPredesignId||t.targetPredesignId!==e.selectedPredesignId)return!1;await this.restoreBackgroundCarryover(t.backgrounds,e),await this.restorePatternCarryover(t.patternSelections,e),await this.restoreOverlayPatternCarryover(t.overlayPatterns,e),this.restoreOverlayCarryover(t,e),this.restoreColorCarryover(t,e.customizations),await this.customizerState.syncOverlaysToSvgDoc().catch(()=>{});let n=this.customizerState.svgDoc();return n&&this.customizerState.markSvgMutated(n),e.backgroundState.refreshFromSvg(),e.patternState.refreshFromSvg(),e.patternOverlayState.refreshFromSvg(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild(),!0}captureBackgroundCarryover(e){let t=e.state(),n=t.templates??[],r=t.images??{};return n.reduce((o,s)=>{let a=r[s.actionItemId];return a?.src&&o.push({placementKey:s.placementKey,actionItemId:s.actionItemId,name:s.name,state:{src:a.src,fileName:a.fileName,transform:k({},a.transform)}}),o},[])}async restoreBackgroundCarryover(e,t){if(!e.length)return;let n=e.reduce((o,s)=>(o.set(s.placementKey,s),o),new Map),r=e.reduce((o,s)=>(o.set(s.name.trim().toLowerCase(),s),o),new Map);for(let o of t.backgroundTemplates){let s=n.get(o.placementKey)??r.get((o.name??"").trim().toLowerCase());if(!s?.state?.src)continue;let a=await this.createFileFromDataUrl(s.state.src,s.state.fileName??`${o.actionItemId}.png`);a&&(await t.backgroundState.onFileSelected(o.actionItemId,a),t.backgroundState.select(o.actionItemId),this.restoreBackgroundTransform(t.backgroundState,s.state.transform))}}restoreBackgroundTransform(e,t){e.updateTransform("scale",t.scale),e.updateTransform("rotation",t.rotation),e.updateTransform("translateX",t.translateX),e.updateTransform("translateY",t.translateY),e.updateTransform("opacity",t.opacity)}async createFileFromDataUrl(e,t){try{let r=await(await fetch(e)).blob(),o=r.type&&r.type.trim().length>0?r.type:L4;return new File([r],t,{type:o})}catch{return null}}capturePatternSelections(e,t,n){let r=n.selectedPatternFileUrl(),o=n.selectedUploadedPatternId(),s=o?n.patternDefinitionState()[o]??null:null;return r?t.filter(a=>this.isPatternCustomization(a)&&!!a.actionPathIdsCsv).map(a=>{let l=this.resolvePatternSourceMatch(a,r);if(!l)return null;let c=a.actionPathIdsCsv?this.readAppliedColorForRegionIds(e,a.actionPathIdsCsv):null;return{key:this.buildCustomizationCarryoverKey(a.id,a.name),dataSourceId:l.dataSourceId,sourceUrl:l.sourceUrl,transform:s?k({},s):null,color:c,sourceActionPathIdsCsv:a.actionPathIdsCsv??null,sourceName:(a.name??"").trim()||null}}).filter(a=>!!a):[]}async restorePatternCarryover(e,t){if(!e.length)return;let n=t.customizations.filter(s=>this.isPatternCustomization(s)&&!!s.actionPathIdsCsv),r=n.reduce((s,a)=>(s.set(this.buildCustomizationCarryoverKey(a.id,a.name),a),s),new Map),o=new Set;for(let s of e){let a=this.resolvePatternTargetCustomization(s,n,r,o);if(!a?.actionPathIdsCsv)continue;let l=this.resolvePatternSourceUrlForTarget(a,s);if(!l)continue;await t.patternState.applyPatternFromUrl(l,a.actionPathIdsCsv,!0);let c=t.patternState.selectedUploadedPatternId();c&&s.transform&&(t.patternState.onPatternDefinitionScaleChange(c,s.transform.scale),t.patternState.onPatternDefinitionRotationChange(c,s.transform.rotation),t.patternState.onPatternDefinitionTranslateXChange(c,s.transform.translateX),t.patternState.onPatternDefinitionTranslateYChange(c,s.transform.translateY),t.patternState.onPatternDefinitionOpacityChange(c,s.transform.opacity)),s.color&&this.colorState.applyColor(a.actionPathIdsCsv,s.color),o.add(this.buildCustomizationCarryoverKey(a.id,a.name))}}resolvePatternTargetCustomization(e,t,n,r){let o=n.get(e.key);if(o&&!r.has(this.buildCustomizationCarryoverKey(o.id,o.name)))return o;if(e.dataSourceId){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.pack?.dataSources??[]).some(d=>(d.id??"").trim()===e.dataSourceId)});if(a)return a}let s=(e.sourceName??"").trim().toLowerCase();if(s){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.name??"").trim().toLowerCase()===s});if(a)return a}if(e.sourceActionPathIdsCsv){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.actionPathIdsCsv??"").trim()===e.sourceActionPathIdsCsv});if(a)return a}return null}resolvePatternSourceMatch(e,t){let n=(e.pack?.dataSources??[]).find(r=>(r.fileUrl??"").trim()===t);return n?{dataSourceId:(n.id??"").trim()||null,sourceUrl:(n.fileUrl??"").trim()||t}:null}resolvePatternSourceUrlForTarget(e,t){let n=e.pack?.dataSources??[];if(t.dataSourceId){let a=(n.find(l=>(l.id??"").trim()===t.dataSourceId)?.fileUrl??"").trim();if(a)return a}let o=(n.find(s=>(s.fileUrl??"").trim()===t.sourceUrl)?.fileUrl??"").trim();return o||null}async restoreOverlayPatternCarryover(e,t){if(!e.length)return;let n=new Set(t.personalizationItems.map(o=>o.id)),r=this.groupOverlayPatternsForRestore(e,n);for(let o of r){await t.patternOverlayState.onAddPatternPathFromUrl(o.sourceUrl,o.thumbnailUrl,o.placementId);let s=t.patternOverlayState.state().overlays.filter(l=>(l.sourceUrl??"").trim()===o.sourceUrl&&(l.placementId??null)===o.placementId);if(!s.length)continue;let a=new Set;for(let l of o.overlays){let c=this.matchRestoredOverlayCandidate(l,s,a);c&&(a.add(c.id),t.patternOverlayState.onPatternOpacityChange(c.id,l.opacity),l.fill&&this.colorState.applyColor(c.id,l.fill))}}}groupOverlayPatternsForRestore(e,t){let n=new Map;for(let r of e){let o=(r.sourceUrl??"").trim();if(!o)continue;let s=r.placementId??null;if(s&&!t.has(s))continue;let a=`${o}::${s??""}`,l=n.get(a);if(l){l.overlays.push(r);continue}n.set(a,{sourceUrl:o,placementId:s,thumbnailUrl:r.thumbnailUrl,overlays:[r]})}return[...n.values()]}matchRestoredOverlayCandidate(e,t,n){let r=t.find(s=>!n.has(s.id)&&s.pathData===e.pathData);if(r)return r;let o=t.find(s=>!n.has(s.id)&&(s.label??"").trim()===(e.label??"").trim());return o||(t.find(s=>!n.has(s.id))??null)}restoreOverlayCarryover(e,t){let n=new Set(t.personalizationItems.map(s=>s.placementKey)),r=e.textOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneTextBounds(k({},s)):s),o=e.logoOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneLogoBounds(k({},s)):s);t.overlaysState.set([...r,...o]),t.activeOverlayIdState.set(null),this.customizerState.setActiveOverlay(null)}restoreColorCarryover(e,t){t.forEach(n=>{if(!this.isColorCustomization(n)||!n.actionPathIdsCsv)return;let r=e.colorsByRegion.get(n.actionPathIdsCsv),o=e.colorsByCustomizationName.get((n.name??"").trim().toLowerCase()),s=r??o;s&&this.colorState.applyColor(n.actionPathIdsCsv,s)})}isColorCustomization(e){return(e.type??"").trim().toLowerCase()===jD.COLOR}isPatternCustomization(e){return(e.type??"").trim().toLowerCase()===jD.PATTERN}buildCustomizationCarryoverKey(e,t){return`${(e??"").trim().toLowerCase()}::${(t??"").trim().toLowerCase()}`}readAppliedColorForRegionIds(e,t){let n=this.parseColorTargets(t);for(let{selector:r,stopIndex:o}of n){let s=Array.from(e.querySelectorAll(r));if(s.length===0)continue;let a=s[0];if(a.tagName.toLowerCase()===U4){let c=Array.from(a.querySelectorAll("stop"));if(!c.length)continue;let d=this.resolveGradientStopIndex(o,c.length),u=c[d],f=u.getAttribute("stop-color")??u.style.stopColor??"";if(f.trim())return f;continue}let l=a.getAttribute("fill")??a.style.fill??"";if(l.trim())return l}return null}parseColorTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length>0?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveGradientStopIndex(e,t){let n=Number.isFinite(e)?e:B4;return Math.min(Math.max(n,0),t-1)}static \u0275fac=function(t){return new(t||i)(Ke(uh),Ke(Dn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function vse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",11),W("onClick",function(){z(t);let r=S(2);return V(r.onClose())}),C()}i&2&&q("icon","ri-close-line")("text",!0)("rounded",!0)}function bse(i,e){if(i&1&&(x(0,"p",9),R(1),C()),i&2){let t,n=S(2);T(),ze((t=n.config())==null?null:t.subtitle)}}function yse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",13),W("onClick",function(){let r=z(t).$implicit,o=S(3);return V(o.onButtonClick(r))}),C()}if(i&2){let t=e.$implicit;q("label",t.label)("severity",t.isPrimary?"primary":"secondary")}}function xse(i,e){if(i&1&&(x(0,"div",10),mt(1,yse,1,2,"app-ui-button",12,al),C()),i&2){let t,n=S(2);T(),gt((t=n.config())==null?null:t.buttons)}}function _se(i,e){if(i&1){let t=Ae();x(0,"div",1),W("click",function(){z(t);let r=S();return V(r.onBackdropClick())}),x(1,"div",2),W("click",function(r){return r.stopPropagation()}),x(2,"div",3)(3,"div",4)(4,"h2",5),R(5),C(),ae(6,vse,1,3,"app-ui-button",6),C(),x(7,"div",7)(8,"p",8),R(9),C(),ae(10,bse,2,1,"p",9),C(),ae(11,xse,3,0,"div",10),C()()()}if(i&2){let t,n,r,o,s,a,l=S();T(2),ur("dialog-type-"+(((t=l.config())==null?null:t.type)||"custom")),T(3),ze((n=l.config())==null?null:n.title),T(),le((r=l.config())!=null&&r.closable?6:-1),T(3),ze((o=l.config())==null?null:o.message),T(),le((s=l.config())!=null&&s.subtitle?10:-1),T(),le((a=l.config())!=null&&a.buttons&&l.config().buttons.length>0?11:-1)}}var Z_=class i{dialogService=Z(Mo);isOpen=this.dialogService.isOpen;config=this.dialogService.currentConfig;ngOnInit(){}onClose(){this.dialogService.cancel()}onBackdropClick(){this.config()?.closable&&this.onClose()}onButtonClick(e){e.action==="confirm"?this.dialogService.confirm():e.action==="cancel"?this.dialogService.cancel():e.action==="custom"&&e.customId&&this.dialogService.handleCustomAction(e.customId)}getButtonClass(e){let t=["dialog-btn"];return e.isPrimary&&t.push("dialog-btn-primary"),e.isDestructive&&t.push("dialog-btn-destructive"),t.join(" ")}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-generic-dialog"]],decls:1,vars:1,consts:[[1,"dialog-overlay"],[1,"dialog-overlay",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog"],[1,"dialog-header"],[1,"dialog-title"],["severity","primary","aria-label","Close dialog",3,"icon","text","rounded"],[1,"dialog-content"],[1,"dialog-message"],[1,"dialog-subtitle"],[1,"dialog-actions"],["severity","primary","aria-label","Close dialog",3,"onClick","icon","text","rounded"],[3,"label","severity"],[3,"onClick","label","severity"]],template:function(t,n){t&1&&ae(0,_se,12,7,"div",0),t&2&&le(n.isOpen()?0:-1)},dependencies:[Ut,ta],styles:[".dialog-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:_ngcontent-%COMP%_dialogFadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_dialogFadeIn{0%{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.dialog-container[_ngcontent-%COMP%]{position:relative;z-index:10000;animation:_ngcontent-%COMP%_dialogSlideUp .3s ease-out;max-width:90vw;max-height:90vh}@keyframes _ngcontent-%COMP%_dialogSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.dialog[_ngcontent-%COMP%]{background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:12px;box-shadow:0 20px 60px #0f172a26;overflow:hidden;min-width:380px;display:flex;flex-direction:column}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid rgb(var(--border-color, 203 213 225));background:linear-gradient(135deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)))}.dialog-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:rgb(var(--text-color, 15 23 42));line-height:1.3}.dialog-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:18px;cursor:pointer;border-radius:6px;transition:all .2s;flex-shrink:0}.dialog-close[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.dialog-content[_ngcontent-%COMP%]{padding:24px;color:rgb(var(--text-color, 15 23 42))}.dialog-message[_ngcontent-%COMP%]{margin:0 0 12px;font-size:14px;line-height:1.5;font-weight:500}.dialog-message[_ngcontent-%COMP%]:last-child{margin-bottom:0}.dialog-subtitle[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;margin:0;line-height:1.5}.dialog-actions[_ngcontent-%COMP%]{display:flex;gap:12px;padding:20px 24px;border-top:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-100, 248 250 252) / .5);justify-content:flex-end}.dialog-btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;min-width:100px;text-align:center;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));border:1px solid rgb(var(--border-color, 203 213 225))}.dialog-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--text-color-secondary, 100 116 139))}.dialog-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.dialog-btn-primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.dialog-btn-primary[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 4px 12px #6265f14d}.dialog-btn-destructive[_ngcontent-%COMP%]{background:#ef4444;color:#fff;border:none}.dialog-btn-destructive[_ngcontent-%COMP%]:hover{background:#dc2626;box-shadow:0 4px 12px #ef44444d}.dialog-type-warning[_ngcontent-%COMP%]{border-top:4px solid rgb(249,115,22)}.dialog-type-success[_ngcontent-%COMP%]{border-top:4px solid rgb(16,185,129)}.dialog-type-error[_ngcontent-%COMP%]{border-top:4px solid rgb(239,68,68)}@media(max-width:640px){.dialog[_ngcontent-%COMP%]{min-width:350px;max-width:100%}.dialog-content[_ngcontent-%COMP%], .dialog-header[_ngcontent-%COMP%]{padding:20px}.dialog-btn[_ngcontent-%COMP%]{width:100%;min-width:unset}}"]})};var Sse=(i,e)=>e.id;function Cse(i,e){if(i&1){let t=Ae();x(0,"div",1)(1,"div",2),U(2,"i"),x(3,"div",3)(4,"span",4),R(5),C(),x(6,"span",5),R(7),C()()(),x(8,"button",6),W("click",function(){let r=z(t).$implicit,o=S();return V(o.onDismiss(r.id))}),U(9,"i",7),C()()}if(i&2){let t=e.$implicit,n=S();q("ngClass","toast--"+t.type),fn("aria-label",n.getAriaLabel(t.type)),T(2),ur("toast-icon "+n.getIcon(t.type)),T(3),ze(t.title),T(2),ze(t.message)}}var J_=class i{toasterService=Z(Fr);toasts=this.toasterService.toasts;onDismiss(e){this.toasterService.dismissToast(e)}getIcon(e){return{success:"ri-checkbox-circle-fill",error:"ri-close-circle-fill",warning:"ri-alert-fill",info:"ri-information-fill"}[e]}getAriaLabel(e){return{success:"Success notification",error:"Error notification",warning:"Warning notification",info:"Information notification"}[e]}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-toaster"]],decls:3,vars:0,consts:[[1,"toaster-container"],["role","alert",1,"toast",3,"ngClass"],[1,"toast-content"],[1,"toast-text"],[1,"toast-title"],[1,"toast-message"],["type","button","aria-label","Close notification",1,"toast-close",3,"click"],[1,"ri-close-line"]],template:function(t,n){t&1&&(x(0,"div",0),mt(1,Cse,10,6,"div",1,Sse),C()),t&2&&(T(),gt(n.toasts()))},dependencies:[Ut,Ww],styles:[".toaster-container[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:12px;pointer-events:none}.toast[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-radius:8px;box-shadow:0 4px 12px #00000026;animation:_ngcontent-%COMP%_slideIn .3s ease-out;pointer-events:auto;max-width:400px;min-width:280px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes _ngcontent-%COMP%_slideIn{0%{transform:translate(400px);opacity:0}to{transform:translate(0);opacity:1}}.toast--success[_ngcontent-%COMP%]{background:linear-gradient(135deg,#10b981,#059669);color:#fff;border-left:4px solid #059669}.toast--error[_ngcontent-%COMP%]{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;border-left:4px solid #dc2626}.toast--warning[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-left:4px solid #d97706}.toast--info[_ngcontent-%COMP%]{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-left:4px solid #2563eb}.toast-content[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;flex:1}.toast-icon[_ngcontent-%COMP%]{font-size:20px;flex-shrink:0;margin-top:2px}.toast-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.toast-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;letter-spacing:.3px}.toast-message[_ngcontent-%COMP%]{font-weight:400;font-size:13px;opacity:.95;line-height:1.4}.toast-close[_ngcontent-%COMP%]{background:none;border:none;color:inherit;font-size:18px;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease;flex-shrink:0;opacity:1}.toast-close[_ngcontent-%COMP%]:hover{background-color:#fff3}.toast-close[_ngcontent-%COMP%]:focus{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}@media(max-width:640px){.toaster-container[_ngcontent-%COMP%]{left:12px;right:12px;top:12px}.toast[_ngcontent-%COMP%]{min-width:auto}}"],changeDetection:0})};var wse=["threeDUI"],z4=(i,e)=>e.id,V4=(i,e)=>e.trackId;function Ese(i,e){if(i&1&&U(0,"img",4),i&2){let t=S();q("src",t.distributorHeaderLogoUrl(),fi)}}function Mse(i,e){i&1&&(x(0,"app-ui-tab",15),R(1,"2D Editor"),C(),x(2,"app-ui-tab",16),R(3,"Both"),C())}function Tse(i,e){if(i&1&&(x(0,"div",12),U(1,"app-manifest-loader",17),C()),i&2){let t=S();T(),q("message",t.manifestLoaderMessage)}}function Dse(i,e){if(i&1){let t=Ae();x(0,"button",22),W("click",function(){z(t);let r=S(2);return V(r.retryManifestLoad())}),R(1," Retry "),C()}}function Ase(i,e){if(i&1&&(x(0,"div",12)(1,"div",18)(2,"div",19),R(3,"Unable to load manifest"),C(),x(4,"div",20),R(5),C(),ae(6,Dse,2,0,"button",21),C()()),i&2){let t=S();T(5),ze(t.manifestError()),T(),le(t.isSdkRuntime()?-1:6)}}function Ise(i,e){if(i&1&&(x(0,"div",13),U(1,"app-save-loader",23),C()),i&2){let t=S();T(),q("message",t.designSaveMessage()||"Saving design\u2026")("subtitle","Please wait while your design is being processed")}}function Pse(i,e){i&1&&U(0,"app-three-d-loader")}function Ose(i,e){if(i&1){let t=Ae();x(0,"app-three-d-ui",46,0),mp("svgTextChange",function(r){z(t);let o=S(2);return Ms(o.svgText,r)||(o.svgText=r),V(r)})("svgDimensionsChange",function(r){z(t);let o=S(2);return Ms(o.svgDimensions,r)||(o.svgDimensions=r),V(r)})("svgViewBoxChange",function(r){z(t);let o=S(2);return Ms(o.svgViewBox,r)||(o.svgViewBox=r),V(r)})("showPlacementGuidesChange",function(r){z(t);let o=S(2);return Ms(o.showPlacementGuides,r)||(o.showPlacementGuides=r),V(r)})("placementZonesChange",function(r){z(t);let o=S(2);return Ms(o.placementZones,r)||(o.placementZones=r),V(r)})("overlaysChange",function(r){z(t);let o=S(2);return Ms(o.overlays,r)||(o.overlays=r),V(r)})("activeOverlayIdChange",function(r){z(t);let o=S(2);return Ms(o.activeOverlayId,r)||(o.activeOverlayId=r),V(r)}),W("activeOverlayChange",function(r){z(t);let o=S(2);return V(o.setActiveOverlay(r))})("threeDVariantSelected",function(r){z(t);let o=S(2);return V(o.onThreeDVariantSelected(r))})("overlayPositionChange",function(r){z(t);let o=S(2);return V(o.onOverlayPositionChange(r))})("overlayRotationChange",function(r){z(t);let o=S(2);return V(o.onOverlayRotationChange(r))})("overlayResizeChange",function(r){z(t);let o=S(2);return V(o.onOverlayResizeChange(r))})("onUndo",function(){z(t);let r=S(2);return V(r.onUndo())})("onRedo",function(){z(t);let r=S(2);return V(r.onRedo())}),C()}if(i&2){let t=S(2);q("isModelLoading",t.isModelLoading()),Hc("svgText",t.svgText),q("isActive",t.editorMode()!=="2d")("threeDVariants",t.threeDVariants())("selectedThreeDVariantId",t.selectedThreeDVariantId())("mtlText",t.mtlText())("objText",t.objText())("materialSourceUrl",t.materialFileLink()),Hc("svgDimensions",t.svgDimensions),q("overlayBounds",t.threeDOverlayBounds())("printAreaWidthInches",t.printAreaWidthInches())("printAreaHeightInches",t.printAreaHeightInches())("gridSizeInches",t.twoDGridSizeInches()),Hc("svgViewBox",t.svgViewBox)("showPlacementGuides",t.showPlacementGuides)("placementZones",t.placementZones)("overlays",t.overlays)("activeOverlayId",t.activeOverlayId),q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("gridSize",t.threeDGridSizeNormalized())}}function Rse(i,e){i&1&&(x(0,"div",50)(1,"div",51),U(2,"i",49),x(3,"span"),R(4,"Keyboard Shortcuts"),C()(),U(5,"app-keyboard-shortcuts-panel"),C())}function kse(i,e){if(i&1){let t=Ae();x(0,"div",47),W("click",function(r){return r.stopPropagation()}),x(1,"button",48),W("click",function(r){z(t);let o=S(2);return V(o.toggleShortcuts(r))}),U(2,"i",49),C(),ae(3,Rse,6,0,"div",50),C()}if(i&2){let t=S(2);T(),dt("active",t.showShortcuts()),T(2),le(t.showShortcuts()?3:-1)}}function Fse(i,e){if(i&1&&(x(0,"div",32),U(1,"app-manifest-loader",17),x(2,"p",52),R(3),C()()),i&2){let t=S(2);T(),q("message",t.predesignLoaderMessage),T(2),ze(t.predesignLoaderSubtitle)}}function Nse(i,e){i&1&&(x(0,"p",35),R(1,"No actions available for this step."),C())}function Lse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=S(4);return V(o.onPredesignSelected(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Use(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function Bse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function zse(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=S().$implicit,n=S(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Vse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=S().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function Hse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=S().$implicit,n=S(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Gse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=S(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=S(4);return V(o.onRenderOrderSelect(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function jse(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=S(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=S(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=S(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=S(4);return V(o.onTwoDGridSizeChange(r))}),C()}if(i&2){let t=S(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function Wse(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2"),R(4),C()(),x(5,"div",55),ae(6,Lse,1,2,"app-pre-designs-panel",56)(7,Use,1,1,"app-customizer-color-panel",57)(8,Bse,1,1,"app-customizer-pattern-panel",57)(9,zse,1,3,"app-customizer-personalization-panel",58)(10,Vse,1,2,"app-overlay-panel",59)(11,Hse,1,3,"app-customizer-background-panel",60)(12,Gse,1,2,"app-render-order-panel",61)(13,jse,1,7,"app-canvas-guide-panel",62),C()()()),i&2){let t,n=e.$implicit,r=S(3);T(4),ze(n.title),T(2),le((t=n.kind)===r.panelKind.PREDESIGNS?6:t===r.panelKind.COLOR?7:t===r.panelKind.PATTERN?8:t===r.panelKind.PERSONALIZATION?9:t===r.panelKind.OVERLAY?10:t===r.panelKind.BACKGROUND?11:t===r.panelKind.RENDER_ORDER?12:t===r.panelKind.CANVAS_GUIDE?13:-1)}}function $se(i,e){if(i&1&&mt(0,Wse,14,2,"section",36,V4),i&2){let t=S(2);gt(t.activePanels())}}function Yse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=S(4);return V(o.onPredesignSelected(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Xse(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function qse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function Kse(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=S().$implicit,n=S(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Zse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=S().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function Jse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=S().$implicit,n=S(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Qse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=S(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=S(4);return V(o.onRenderOrderSelect(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function eae(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=S(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=S(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=S(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=S(4);return V(o.onTwoDGridSizeChange(r))}),C()}if(i&2){let t=S(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function tae(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",68)(1,"app-ui-accordion-header")(2,"div",69)(3,"span"),R(4),C()()(),x(5,"app-ui-accordion-content")(6,"div",70),ae(7,Yse,1,2,"app-pre-designs-panel",56)(8,Xse,1,1,"app-customizer-color-panel",57)(9,qse,1,1,"app-customizer-pattern-panel",57)(10,Kse,1,3,"app-customizer-personalization-panel",58)(11,Zse,1,2,"app-overlay-panel",59)(12,Jse,1,3,"app-customizer-background-panel",60)(13,Qse,1,2,"app-render-order-panel",61)(14,eae,1,7,"app-canvas-guide-panel",62),C()()()),i&2){let t,n=e.$implicit,r=S(3);q("value",n.trackId),T(4),ze(n.title),T(3),le((t=n.kind)===r.panelKind.PREDESIGNS?7:t===r.panelKind.COLOR?8:t===r.panelKind.PATTERN?9:t===r.panelKind.PERSONALIZATION?10:t===r.panelKind.OVERLAY?11:t===r.panelKind.BACKGROUND?12:t===r.panelKind.RENDER_ORDER?13:t===r.panelKind.CANVAS_GUIDE?14:-1)}}function nae(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2",66),R(4),C()(),x(5,"div",55)(6,"app-ui-accordion",67),mt(7,tae,15,3,"app-ui-accordion-panel",68,V4),C()()()()),i&2){let t,n=S(2);T(4),ze(n.selectedStepLabel()),T(2),q("value",(t=n.activePanels()[0])==null?null:t.trackId),T(),gt(n.activePanels())}}function iae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Hide Options"),C())}function rae(i,e){i&1&&(U(0,"i",73),x(1,"span"),R(2,"Show Options"),C())}function oae(i,e){if(i&1){let t=Ae();x(0,"button",71),W("click",function(){z(t);let r=S(2);return V(r.toggleMobilePanel())}),ae(1,iae,3,0)(2,rae,3,0),C()}if(i&2){let t=S(2);fn("aria-label",t.mobilePanelVisible()?"Hide options panel":"Show options panel"),T(),le(t.mobilePanelVisible()?1:2)}}function sae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Show Preview"),C())}function aae(i,e){i&1&&(U(0,"i",75),x(1,"span"),R(2,"Expand Panel"),C())}function lae(i,e){if(i&1){let t=Ae();x(0,"button",74),W("click",function(){z(t);let r=S(2);return V(r.toggleMobileCanvas())}),ae(1,sae,3,0)(2,aae,3,0),C()}if(i&2){let t=S(2);T(),le(t.mobileCanvasHidden()?1:2)}}function cae(i,e){if(i&1&&U(0,"i"),i&2){let t=S().$implicit;ur(t.iconClass)}}function dae(i,e){if(i&1){let t=Ae();x(0,"button",77),W("click",function(){let r=z(t).$implicit,o=S(3);return V(o.onNavItemClick(r.id))}),ae(1,cae,1,2,"i",78),x(2,"span",79),R(3),C()()}if(i&2){let t=e.$implicit,n=S(3);dt("active",t.id===n.activeStepId()),T(),le(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function uae(i,e){if(i&1&&(x(0,"div",42),mt(1,dae,4,6,"button",76,z4),C()),i&2){let t=S(2);T(),gt(t.hiddenNavItems())}}function fae(i,e){if(i&1&&U(0,"i"),i&2){let t=S().$implicit;ur(t.iconClass)}}function hae(i,e){if(i&1){let t=Ae();x(0,"button",80),W("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onNavItemClick(r.id))}),ae(1,fae,1,2,"i",78),x(2,"span",79),R(3),C()()}if(i&2){let t=e.$implicit,n=S(2);dt("active",t.id===n.activeStepId()),T(),le(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function pae(i,e){i&1&&(U(0,"i",82),x(1,"span",79),R(2,"Hide"),C())}function mae(i,e){i&1&&(U(0,"i",83),x(1,"span",79),R(2,"Show More"),C())}function gae(i,e){if(i&1){let t=Ae();x(0,"button",81),W("click",function(){z(t);let r=S(2);return V(r.toggleNavExpanded())}),ae(1,pae,3,0)(2,mae,3,0),C()}if(i&2){let t=S(2);T(),le(t.navExpanded()?1:2)}}function vae(i,e){if(i&1){let t=Ae();x(0,"div",24)(1,"main",25)(2,"section",26)(3,"div",26)(4,"app-two-d-ui",27),W("layerToggle",function(r){z(t);let o=S();return V(o.onLayerToggle(r))})("canvasReady",function(r){z(t);let o=S();return V(o.onTwoDCanvasReady(r))})("canvasDetached",function(){z(t);let r=S();return V(r.onTwoDCanvasDestroyed())})("zoomIn",function(){z(t);let r=S();return V(r.onTwoDZoomIn())})("zoomOut",function(){z(t);let r=S();return V(r.onTwoDZoomOut())})("resetView",function(){z(t);let r=S();return V(r.onTwoDReset())})("onUndo",function(){z(t);let r=S();return V(r.onUndo())})("onRedo",function(){z(t);let r=S();return V(r.onRedo())}),C()()(),x(5,"section",26)(6,"main",28)(7,"div",29),ae(8,Pse,1,0,"app-three-d-loader"),ae(9,Ose,2,21,"app-three-d-ui",30),C()()(),ae(10,kse,4,3,"div",31),ae(11,Fse,4,2,"div",32),C(),x(12,"section",33)(13,"aside",34),ae(14,Nse,2,0,"p",35)(15,$se,2,0)(16,nae,9,2,"section",36),C()(),x(17,"section",37)(18,"div",38)(19,"div",39),ae(20,oae,3,2,"button",40),ae(21,lae,3,1,"button",41),C(),ae(22,uae,3,0,"div",42),x(23,"div",43),mt(24,hae,4,6,"button",44,z4),ae(26,gae,3,1,"button",45),C()()()()}if(i&2){let t=S();dt("mobile-panel-hidden",!t.mobilePanelVisible())("mobile-canvas-hidden",t.mobileCanvasHidden()),T(),dt("single",t.editorMode()!=="both")("canvas-loading",t.showCanvasManifestLoader()),T(),dt("hidden",t.editorMode()==="3d"),T(2),q("svgText",t.svgText())("isActive",t.editorMode()!=="3d")("layers",t.layers())("selectedLayerKey",t.selectedLayerKey())("isShowAllLayersOption",t.isShowWholeLayersOption())("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridSize",t.twoDGridSize()),T(),dt("hidden",t.editorMode()==="2d"),T(3),le(t.loading()?8:-1),T(),le(t.editorMode()==="3d"||t.editorMode()==="both"?9:-1),T(),le(t.isMobile()?-1:10),T(),le(t.showCanvasManifestLoader()?11:-1),T(3),le(t.activePanels().length===0?14:t.activePanels().length===1?15:16),T(6),le(t.mobileCanvasHidden()?-1:20),T(),le(t.mobilePanelVisible()?21:-1),T(),le(t.navExpanded()?22:-1),T(),dt("nav-expanded",t.navExpanded()),T(),gt(t.visibleNavItems()),T(2),le(t.hiddenNavItems().length>0?26:-1)}}var Q_=class i{panelKind=N_;apiKey=ye.required();productId=ye.required();submissionNumber=ye(null);predesignId=ye(null);userUniqueId=ye(null);threeDUI=Lu("threeDUI");editorMode=F("3d");customizerState=Z(Dn);measurementService=Z(Kl);fontAssetService=Z(p_);textLayoutService=Z(m_);printAreaMeasurementService=Z(Yl);svgRenderService=Z(g_);overlayStyleService=Z(v_);renderOrderState=Z(b_);backgroundState=Z(oh);personalizationState=Z(sc);patternState=Z(fh);patternOverlayState=Z(vh);designHistory=Z(Gl);destroyRef=Z(ui);manifestFlowService=Z(q_);threeThumbnailService=Z(F_);submissionApi=Z(I_);toaster=Z(Fr);panelService=Z(V_);fileService=Z(H_);designExportService=Z(G_);themeService=Z(th);keyboardShortcutService=Z(j_);layerBoundsService=Z(W_);imageCompressionService=Z(qs);predesignCarryoverService=Z(K_);dialogService=Z(Mo);sdkRuntimeConfig=Z(R_,{optional:!0});selectedStepLabel=Me(()=>this.parentNav().find(e=>e.id===this.activeStepId())?.name??"");fallbackProductId=Z3;isSdkRuntime=F(!!this.sdkRuntimeConfig);mobilePanelVisible=F(!0);mobileCanvasHidden=F(!1);isMobile=F(!1);toggleMobileCanvas(){this.mobileCanvasHidden.update(e=>!e)}manifestLoading=F(!1);manifestError=F(null);predesignSwitchLoading=F(!1);showBlockingManifestLoader=Me(()=>this.manifestLoading()&&!this.predesignSwitchLoading());showCanvasManifestLoader=Me(()=>this.manifestLoading()&&this.predesignSwitchLoading());showBlockingManifestError=Me(()=>!!this.manifestError()&&!this.manifestLoaded);manifestLoaderMessage="Loading product manifest\u2026";predesignLoaderMessage="Applying selected design\u2026";predesignLoaderSubtitle="Updating 2D and 3D previews";selectedPredesignId=F(null);designSavingInProgress=F(!1);designSaveMessage=F(null);distributorHeaderLogoUrl=F(null);submissionThumbnailViews=["front","right","back","left"];manifestRequestToken=null;pendingPredesignCarryover=null;viewInitialized=!1;manifestLoaded=!1;filesLoaded=!1;hasInitializedManifestLoad=!1;lastManifestConfigSignature=null;pendingSubmissionPayload=null;editableSubmissionCompressionToken=null;suspendTextureRebuild=!1;pendingTextureRebuildWhileSuspended=!1;pendingEditableTextEffects=F([]);appliedEditableTextEffectKeys=F(new Set);replayPendingEffectsInFlight=!1;svgText=this.customizerState.svgTextState;svgDoc=this.customizerState.svgDocState;svgTextForExport=F(null);baseSvgText=F(null);predesignBaseSvgText=F(null);mtlText=F(null);objText=F(null);threeDVariants=F([]);selectedThreeDVariantId=F(null);showThreeDVariantSwitch=Me(()=>this.threeDVariants().length>1);threeDFileLink=F("");materialFileLink=F(null);pathIdAccordingLayers=F([]);renderPathAccordingLayers=F([]);layers=Me(()=>this.pathIdAccordingLayers().map(e=>e.name));selectedLayerKey=F(null);placementZones=this.personalizationState.placementZones;showPlacementGuides=this.personalizationState.showPlacementGuides;loading=F(!1);isModelLoading=F(!1);sanitizer=Z(Mp);minFontSize=F(12);maxFontSize=F(400);fontSizeStep=F(2);rotationStep=F(5);builtInFontOptions=F(Jx.map(({label:e,value:t})=>({label:e,value:t})));fontOptions=F([...this.builtInFontOptions()]);defaultFontFamily=F(this.builtInFontOptions()[0]?.value??Jx[0]?.value??yr);defaultFontWeight=F("normal");defaultFontStyle=F("normal");defaultLineHeight=F(1.2);defaultLetterSpacing=F(0);strokeWidthStep=F(.5);letterSpacingStep=F(.5);defaultCurveAmount=F(0);defaultShadowBlur=F(0);shadowBlurStep=F(1);defaultShadowOffsetX=F(0);defaultShadowOffsetY=F(0);defaultShadowColor=F(nh);warpEnvelopeFileName=F(null);warpUploadError=F(null);overlays=this.customizerState.overlays;svgDimensions=F(null);svgViewBox=F({minX:0,minY:0,width:1e3,height:1e3});activeOverlayId=F(null);threeDOverlayBounds=Me(()=>this.getOverlayBoundingRect());gridEnabled=F(!1);snapEnabled=F(!1);gridRatio=F((Kr.TWO_D_GRID_SIZE-8)/112);printAreaWidthInches=Me(()=>this.customizerState.printAreaWidthInches());printAreaHeightInches=Me(()=>this.customizerState.printAreaHeightInches());twoDGridSizeInches=F(1);twoDGridStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox(),o=this.twoDGridSizeInches();return e&&e>0&&n&&n>0&&o>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(o,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(o,r.height,n)))}:{x:Kr.TWO_D_GRID_SIZE,y:Kr.TWO_D_GRID_SIZE}});twoDGridSize=Me(()=>this.twoDGridStepPx().x);twoDGridMajorStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox();return e&&e>0&&n&&n>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(1,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(1,r.height,n)))}:{x:Kr.INCH_IN_PIXELS,y:Kr.INCH_IN_PIXELS}});twoDGridMajorSize=Me(()=>this.twoDGridMajorStepPx().x);threeDGridSizeNormalized=Me(()=>{let e=this.gridRatio();return Math.round((e*(.2-.01)+.01)*100)/100});svgFileLink=F("");customizations=F([]);predesigns=F([]);isShowWholeLayersOption=F(!1);personlizationPlacements=Me(()=>this.personalizationState.placements());twoDCanvasElement=null;fabricCanvas=null;fabricCanvasCleanup=null;fabricCanvasSyncDimensions=null;fabricReady=F(!1);canvasLoadToken=F(null);baseElementCache=this.customizerState.baseElementCache;baseBBoxCache=this.customizerState.baseBBoxCache;measurementHost=this.customizerState.measurementHost;measurementSvgRoot=this.customizerState.measurementSvgRoot;measurementCloneDirty=this.customizerState.measurementCloneDirty;canvasTransform=F(null);fabricLayoutState=F(null);fabricViewZoom=F(1);minFabricViewZoom=F(.25);maxFabricViewZoom=F(5);isBrowser=this.customizerState.isBrowser;textureUpdateScheduled=F(!1);overlaySyncPromise=F(Promise.resolve());backgroundImageTemplates=Me(()=>this.backgroundState.state().templates);placementZoneBounds=F(new Map);overlayFabricObjects=F(new Map);fabricVisibleOverlayIds=F(new Set);layerBoundsCache=this.customizerState.layerBoundsCache;pendingLogoLoads=F(new Map);fontSourceMap=F(k({},fD));fontBinaryPromises=F(new Map);fontOutlinePromises=F(new Map);fontFacePromises=F(new Map);fontFacesReady=F(new Set);svgImageHrefCache=new Map;svgImageHrefPending=new Map;canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;historyInitialized=!1;historyDebounceHandle=null;sdkReadyNotified=!1;isUndoingRedoing=F(!1);historyCaptureSuspended=!1;preserveHistoryOnNextSvgLoad=!1;placementGuideObjects=F(new Map);fabricGridState=F({horizontal:[],vertical:[]});fabricGuideState=F({lines:[]});twoDSnapRuntime=F(zi());twoDCursorCanvasPoint=F(null);twoDDraggingOverlayId=F(null);fabricSelectionClearSuppressionCount=0;lastHandledRenderCommandId=0;lastHandledTextureCommandId=0;lastHandledOverlaySyncCommandId=0;predesignStepId=L_.PREDESIGNS;renderOrderStepId=L_.RENDER_ORDER;canvasGuideStepId=L_.CANVAS_GUIDE;steps=F([]);personalizationItems=F([]);activeStepId=F(null);activeRenderOrderItemId=Me(()=>this.activeOverlayId()?`overlay:${this.activeOverlayId()}`:null);stepNav=Me(()=>this.panelService.flattenSteps(this.steps()));renderOrderItems=Me(()=>{let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});return this.renderOrderState.stack().map(t=>e.get(t)).filter(t=>!!t)});stepLookup=Me(()=>this.panelService.buildStepLookup(this.steps()));parentNav=Me(()=>this.panelService.buildParentNav(this.steps(),this.renderOrderStepId,S4));navExpanded=F(!1);dynamicSlotId=F(null);isDesktop=F(!0);showShortcuts=F(!1);toggleShortcuts(e){e.stopPropagation(),this.showShortcuts.update(t=>!t)}closeShortcuts(){this.showShortcuts.set(!1)}onResize(){if(this.isBrowser()){let e=window.innerWidth;this.isDesktop.set(e>=992),this.isMobile.set(e<768)}}allNavItems=Me(()=>{let e=this.predesigns(),t=[];return e&&e.length>0&&t.push({id:this.predesignStepId,name:"Designs",iconClass:"ri-pencil-fill",depth:0}),t.push(...this.parentNav()),t.push({id:this.canvasGuideStepId,name:"Canvas Guide",iconClass:"ri-layout-grid-line",depth:0}),t});visibleNavItems=Me(()=>{let e=this.allNavItems();if(this.isDesktop()||e.length<=4)return e;let t=this.dynamicSlotId(),n=this.activeStepId(),r=n&&e.findIndex(a=>a.id===n)>=3?n:t;(!r||e.findIndex(a=>a.id===r)<3)&&(r=e[3].id);let o=e.slice(0,3),s=e.find(a=>a.id===r)||e[3];return[...o,s]});hiddenNavItems=Me(()=>{let e=this.allNavItems();if(e.length<=4)return[];let t=new Set(this.visibleNavItems().map(n=>n.id));return e.filter(n=>!t.has(n.id))});toggleNavExpanded(){this.navExpanded.update(e=>!e)}onNavItemClick(e){this.setActiveStep(e),this.navExpanded.set(!1),this.dynamicSlotId.set(e)}predesignPanel=Me(()=>{let e=this.predesigns();return e.length?{kind:"predesigns",trackId:this.predesignStepId,title:eu.DESIGNS,predesigns:e}:null});canvasGuidePanel=Me(()=>({kind:"canvas-guide",trackId:this.canvasGuideStepId,title:"Canvas Guide"}));panelsByStep=Me(()=>this.panelService.buildPanelsByStep({stepNav:this.stepNav(),customizations:this.customizations(),personalizationItems:this.personalizationItems(),stepLookup:this.stepLookup(),renderOrderStepId:this.renderOrderStepId,renderOrderItems:this.renderOrderItems()}));activePanels=Me(()=>{let e=this.activeStepId();if(!e)return[];if(e===this.predesignStepId){let s=this.predesignPanel();return s?[s]:[]}if(e===this.renderOrderStepId)return this.panelsByStep().get(this.renderOrderStepId)??[];if(e===this.canvasGuideStepId){let s=this.canvasGuidePanel();return s?[s]:[]}let t=this.stepLookup(),n=this.panelsByStep(),r=s=>{let a=n.get(s.id)??[],l=(s.children??[]).flatMap(c=>r(c));return[...a,...l]},o=t.get(e);return o?r(o):[]});constructor(){Yt(()=>{this.customizerState.fabricReadyState.set(this.fabricReady())}),Yt(()=>{this.customizerState.canvasTransformState.set(this.canvasTransform())}),Yt(()=>{let e=this.customizerState.render2dCommandId();e===0||e===this.lastHandledRenderCommandId||(this.lastHandledRenderCommandId=e,hn(()=>this.render2dView()))}),Yt(()=>{let e=this.customizerState.textureRebuildCommandId();e===0||e===this.lastHandledTextureCommandId||(this.lastHandledTextureCommandId=e,hn(()=>this.requestTextureRebuild()))}),Yt(()=>{let e=this.customizerState.overlaySyncCommandId();e===0||e===this.lastHandledOverlaySyncCommandId||(this.lastHandledOverlaySyncCommandId=e,hn(()=>{this.syncOverlaysToSvgDoc().then(()=>this.customizerState.completeOverlaySyncCommand(e)).catch(t=>this.customizerState.completeOverlaySyncCommand(e,t))}))}),Yt(()=>{this.apiKey(),this.productId();let e=this.submissionNumber()?.trim()??"",t=this.predesignId()?.trim()??"";if(!this.hasInitializedManifestLoad)return;let n=this.getManifestConfigSignature(),r=n?`${n}::${e}::${t}`:null;!r||r===this.lastManifestConfigSignature||(this.lastManifestConfigSignature=r,hn(()=>{if(e){this.selectedPredesignId.set(null),this.bootstrapEditableSubmission(e);return}t?this.selectedPredesignId.set(t):this.selectedPredesignId.set(null),this.pendingSubmissionPayload=null,this.loadManifest(t||void 0)}))}),Yt(()=>{let e=this.fabricReady(),t=this.showPlacementGuides(),n=this.placementZones().length,r=!!this.canvasTransform(),o=this.fabricCanvas;if(!o||!e||!r||n===0){o&&(hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll());return}if(!t){hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll();return}hn(()=>this.updatePlacementGuideVisibility())}),Yt(()=>{this.gridEnabled(),this.twoDGridStepPx(),this.twoDGridMajorStepPx(),this.twoDGridSizeInches(),hn(()=>this.render2dView())}),Yt(()=>{this.svgDoc(),this.svgText(),this.overlays(),this.patternState.state(),this.patternOverlayState.state().overlays,this.backgroundState.state().images,this.backgroundImageTemplates(),this.renderPathAccordingLayers(),hn(()=>this.synchronizeRenderOrderStack())}),Yt(()=>{this.svgText(),this.overlays(),this.selectedLayerKey(),this.showPlacementGuides(),this.backgroundState.state(),this.patternState.state(),hn(()=>{this.isUndoingRedoing()?this.isUndoingRedoing.set(!1):this.scheduleHistoryCapture()})}),Yt(()=>{this.ingestFontPacks(this.personalizationItems())}),Yt(()=>{this.personalizationItems(),this.overlays(),this.pendingEditableTextEffects().length&&hn(()=>{this.replayPendingEditableTextEffects()})}),Yt(()=>{let e=this.svgDoc();hn(()=>{if(!e){this.baseElementCache.set(null),this.baseBBoxCache.set(null);return}let t=e.documentElement;if(this.baseElementCache.set(t),t instanceof SVGGraphicsElement)try{this.baseBBoxCache.set(t.getBBox())}catch{this.baseBBoxCache.set(null)}})}),Yt(()=>{let e=this.editorMode();hn(()=>{(e==="3d"||e==="both")&&setTimeout(()=>{this.threeDUI()?.resizeHandler()},0),(e==="2d"||e==="both")&&setTimeout(()=>{this.fabricCanvasSyncDimensions?.(),this.render2dView()},0)})}),this.fontAssetService.queueFontFaceLoad(this.defaultFontFamily(),this.fontDeps()),this.registerKeyboardShortcuts()}ngOnInit(){if(this.isBrowser()){let n=window.innerWidth;this.isDesktop.set(n>=992),this.isMobile.set(n<768)}let e=this.submissionNumber()?.trim()??"",t=this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput());if(this.lastManifestConfigSignature=t?`${t}::${e}`:null,this.hasInitializedManifestLoad=!0,e){this.bootstrapEditableSubmission(e);return}}async bootstrapEditableSubmission(e){let t=this.resolveApiKey();if(this.pendingEditableTextEffects.set([]),this.appliedEditableTextEffectKeys.set(new Set),!t){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingApiKey);return}this.manifestLoading.set(!0);let n=this.resolveProductId()?.trim();if(!n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingProductId),this.manifestLoading.set(!1);return}this.manifestError.set(null);try{let r=await vc(this.submissionApi.getSubmissionByNumber(e,t)),o=this.resolveEditableSubmissionData(r?.data);if(!r?.isSuccess||!o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let l=r?.errors?.[0]??r?.message??Ot.submissionNotFound;this.manifestError.set(l),this.manifestLoading.set(!1),this.toaster.showError(l);return}let s=o.productId?.trim();if(!s||s!==n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionProductMismatch),this.manifestLoading.set(!1),this.toaster.showError(Ot.submissionProductMismatch);return}if(!this.isValidEditablePayload(o.designPayload)){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionInvalidPayload),this.toaster.showError(Ot.submissionInvalidPayload),this.manifestLoading.set(!1);return}let a=o.preDesignId?.trim()||null;this.selectedPredesignId.set(a),this.pendingSubmissionPayload=o.designPayload,await this.loadManifest(a)}catch{this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestLoading.set(!1),this.manifestError.set(Ot.submissionLoadFailed),this.toaster.showError(Ot.submissionLoadFailed)}}resolveEditableSubmissionData(e){if(!e)return null;if(Array.isArray(e)){let t=e[0];return t&&typeof t=="object"?t:null}return typeof e!="object"?null:e}isValidEditablePayload(e){if(!e||typeof e!="object")return!1;let t=e.svg?.content,n=e.svg?.contentUrl,r=typeof t=="string"&&t.trim().length>0,o=typeof n=="string"&&n.trim().length>0;return r||o}async loadManifest(e){let t=Symbol();this.manifestRequestToken=t;let n=!!e&&this.manifestLoaded;this.manifestLoading.set(!0),this.predesignSwitchLoading.set(n),this.manifestError.set(null),n||(this.manifestLoaded=!1),this.filesLoaded=!1;try{let r=await this.manifestFlowService.loadManifest(he(k({},this.getManifestIdentityInput()),{preDesignId:e??null,selectedPredesignId:this.selectedPredesignId(),activeStepId:this.activeStepId()}));if(this.manifestRequestToken!==t)return;if(!r.ok){this.pendingPredesignCarryover=null,this.manifestError.set(r.message),this.notifyManifestLoadFailed(r.message);return}this.applyManifestData(r.normalized)}catch{if(this.manifestRequestToken!==t)return;this.pendingPredesignCarryover=null,this.manifestError.set(Ot.manifestLoadFailed),this.notifyManifestLoadFailed(Ot.manifestLoadFailed)}finally{this.manifestRequestToken===t&&(this.manifestLoading.set(!1),this.predesignSwitchLoading.set(!1))}}retryManifestLoad(){this.loadManifest()}toggleMobilePanel(){this.mobilePanelVisible.update(e=>!e)}async onPredesignSelected(e){let t=e?.id??null;t&&(this.manifestLoading()||t===this.selectedPredesignId()||(this.pendingPredesignCarryover=this.capturePredesignCarryover(t),this.preserveHistoryOnNextSvgLoad=!1,this.selectedPredesignId.set(t),await this.loadManifest(t)))}async onThreeDVariantSelected(e){let t=e?.trim()??"";if(!t||t===this.selectedThreeDVariantId()||this.isModelLoading())return;let n=this.threeDVariants().find(r=>r.id===t);if(!(!n||!n.threeDFileLink)){this.selectedThreeDVariantId.set(n.id),this.threeDFileLink.set(n.threeDFileLink??""),this.materialFileLink.set(n.mtlFileLink??null);try{this.isModelLoading.set(!0),await this.loadThreeDModelFiles(),this.isModelLoading.set(!1),this.threeDUI()?.rebuildSVGTexture()}catch(r){this.isModelLoading.set(!1),console.error(Ot.errorLoadingFilesFromUrls,r),this.toaster.showError(Ot.manifestAssetsLoadFailed)}}}tryLoadFilesFromManifest(e=!1){!this.viewInitialized||!this.manifestLoaded||this.filesLoaded||(this.filesLoaded=!0,this.loadFilesFromUrls(e))}ngAfterViewInit(){this.initFabricCanvases(),this.viewInitialized=!0,this.tryLoadFilesFromManifest()}registerKeyboardShortcuts(){if(!this.isBrowser)return;let e=t=>{let n=t.composedPath?.()[0]||t.target;if(n&&this.keyboardShortcutService.isTextInputTarget(n))return;let r=this.keyboardShortcutService.resolveHistoryAction(t);if(r==="UNDO"){this.onUndo(),t.preventDefault();return}if(r==="REDO"){this.onRedo(),t.preventDefault();return}this.tryHandleOverlayKeyboardShortcut(t)&&t.preventDefault()};window.addEventListener("keydown",e,{passive:!1}),this.destroyRef.onDestroy(()=>window.removeEventListener("keydown",e))}tryHandleOverlayKeyboardShortcut(e){let t=this.keyboardShortcutService.resolveOverlayAction(e,this.rotationStep());return t?t.kind==="MOVE"?this.nudgeActiveOverlayByPixels(t.deltaXPx,t.deltaYPx):this.rotateActiveOverlayByStep(t.deltaAngle):!1}nudgeActiveOverlayByPixels(e,t){let n=this.resolveKeyboardTargetOverlay();if(!n)return!1;let r=this.getOverlayBoundingRect();if(r.width<=0||r.height<=0)return!1;let o=n.normalizedX+e/r.width,s=n.normalizedY+t/r.height;return this.setOverlayNormalizedPosition(n,o,s),!0}rotateActiveOverlayByStep(e){let t=this.resolveKeyboardTargetOverlay();return t?(this.onOverlayRotationChange({overlay:t,angle:(t.angle??0)+e}),!0):!1}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;if(this.editorMode()==="2d")return null;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.setActiveOverlay(n),n):null}async loadFilesFromUrls(e=!1){this.preserveHistoryOnNextSvgLoad=!1;try{if(this.loading.set(!0),this.svgFileLink()){let n=await this.fileService.fetchFileAsText(this.svgFileLink());if(this.svgText.set(n),this.loadSVGFromText(n,!0),await this.applyPredesignCarryoverIfNeeded(),this.pendingSubmissionPayload)try{await this.applyEditableSubmissionPayload(this.pendingSubmissionPayload),this.pendingSubmissionPayload=null}catch(r){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let o=r instanceof Error&&r.message===Ot.submissionInvalidPayload?Ot.submissionInvalidPayload:Ot.submissionLoadFailed;this.manifestError.set(o),this.toaster.showError(o);return}}if(await this.loadThreeDModelFiles(),this.loading.set(!1),this.sdkRuntimeConfig&&!this.sdkReadyNotified){this.sdkReadyNotified=!0;let n=this.resolveProductId();n&&this.sdkRuntimeConfig.onReady?.({productId:n})}e&&setTimeout(()=>{this.threeDUI()?.rebuildSVGTexture()},0)}catch(n){if(console.error(Ot.errorLoadingFilesFromUrls,n),this.sdkRuntimeConfig){this.manifestError.set(Ot.manifestAssetsLoadFailed);let r=this.resolveProductId();r&&this.sdkRuntimeConfig.onAssetLoadFailed?.({productId:r,code:"ASSET_LOAD_FAILED",message:Ot.manifestAssetsLoadDetail})}this.loading.set(!1)}}async loadThreeDModelFiles(){this.objText.set(null),this.mtlText.set(null),this.threeDFileLink()&&this.objText.set(await this.fileService.fetchFileAsText(this.threeDFileLink())),this.materialFileLink()&&this.mtlText.set(await this.fileService.fetchFileAsText(this.materialFileLink()))}async applyEditableSubmissionPayload(e){let t=Symbol();this.editableSubmissionCompressionToken=t,this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1,this.predesignBaseSvgText.set(this.baseSvgText());let n=e.svg?.content?.trim()??"";if(!n){let r=e.svg?.contentUrl?.trim();if(!r)throw new Error(Ot.submissionInvalidPayload);n=(await this.fileService.fetchFileAsText(r)).trim()}if(!n)throw new Error(Ot.submissionInvalidPayload);try{this.loadSVGFromText(n,!1);let r=this.parseTextOverlays(e.overlays?.text??[]),o=this.parseLogoOverlays(e.overlays?.logo??[]),s=this.ensureUniqueOverlayIds([...r,...o]);this.overlays.set(s),this.hydrateEditableOverlayRuntimeDimensions(e,s),this.activeOverlayId.set(s[0]?.id??null);let a=(e.overlays?.text??[]).filter(c=>!!c?.id).map(c=>({overlayId:c.id,effectId:c.effectId??null}));if(this.personalizationState.setSelectedEffectByOverlay(a),this.appliedEditableTextEffectKeys.set(new Set),this.pendingEditableTextEffects.set(this.buildPendingEditableTextEffects(e.overlays?.text??[],s)),await this.replayPendingEditableTextEffects(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),e.background?.selectedKey&&this.backgroundState.select(e.background.selectedKey),await this.prepareEditableSubmissionAssetsFor3d(s,t),this.editableSubmissionCompressionToken!==t)return;e.pattern?.selectedUploadedPatternId&&this.patternState.setSelectedUploadedPattern(e.pattern.selectedUploadedPatternId),this.patternState.setSelectedPatternFileUrl(e.pattern?.selectedFileUrl??null);let l=(e.renderOrder??[]).filter(c=>typeof c=="string"&&c.trim().length>0);if(l.length){this.renderOrderState.enableManualOrdering(),this.renderOrderState.setStack(l);let c=this.svgDoc()?.documentElement;c&&this.renderOrderState.applyStackToSvg(c,this.renderPathAccordingLayers())}await this.syncOverlaysToSvgDoc(),this.requestTextureRebuild(),this.render2dView(),this.resetHistoryWithCurrentState("Edited submission initial state")}finally{if(this.editableSubmissionCompressionToken!==t)return;this.editableSubmissionCompressionToken=null,this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild())}}async prepareEditableSubmissionAssetsFor3d(e,t){await Promise.all([this.compressEditableSubmissionLogoOverlaysFor3d(e,t),this.backgroundState.ensureCompressedSourcesFor3d()]),this.editableSubmissionCompressionToken===t&&this.overlays.set([...e])}async compressEditableSubmissionLogoOverlaysFor3d(e,t){let n=e.filter(ai);n.length&&await Promise.all(n.map(async r=>{let o=r.imageSrc?.trim();if(!(!o||r.imageSrc3d))try{let s=await this.imageCompressionService.compressImageToDataUrl(o);if(this.editableSubmissionCompressionToken!==t)return;r.imageSrc3d=s}catch(s){console.warn("[CustomizerUiComponent] Failed to compress editable submission logo, using original",s)}}))}parseTextOverlays(e){return e.filter(t=>!!t?.id).map(t=>({id:t.id,kind:"text",text:t.text??"",fill:t.style?.fill??"#1f2937",fontSize:Number.isFinite(t.style?.fontSize)?t.style?.fontSize:24,horizontalScale:this.normalizeOverlayScale(t.style?.horizontalScale,1),verticalScale:this.normalizeOverlayScale(t.style?.verticalScale,1),fontFamily:t.style?.fontFamily??this.defaultFontFamily(),fontWeight:t.style?.fontWeight??this.defaultFontWeight(),fontStyle:t.style?.fontStyle??this.defaultFontStyle(),letterSpacing:Number.isFinite(t.style?.letterSpacing)?t.style?.letterSpacing:this.defaultLetterSpacing(),lineHeight:Number.isFinite(t.style?.lineHeight)?t.style?.lineHeight:this.defaultLineHeight(),stroke:t.style?.stroke??jl,strokeWidth:Number.isFinite(t.style?.strokeWidth)?t.style?.strokeWidth:0,secondStroke:t.style?.secondStroke??Wl,secondStrokeWidth:Number.isFinite(t.style?.secondStrokeWidth)?t.style?.secondStrokeWidth:0,curveAmount:Number.isFinite(t.style?.curveAmount)?t.style?.curveAmount:this.defaultCurveAmount(),shadowBlur:Number.isFinite(t.style?.shadowBlur)?t.style?.shadowBlur:this.defaultShadowBlur(),shadowOffsetX:Number.isFinite(t.style?.shadowOffsetX)?t.style?.shadowOffsetX:this.defaultShadowOffsetX(),shadowOffsetY:Number.isFinite(t.style?.shadowOffsetY)?t.style?.shadowOffsetY:this.defaultShadowOffsetY(),shadowColor:t.style?.shadowColor??nh,warpEnabled:t.effects?.warp===!0,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,placementKey:t.placementKey??null,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0}))}parseLogoOverlays(e){return e.filter(t=>!!t?.id&&!!t?.imageSrc).map(t=>({id:t.id,kind:"logo",logoBlobId:t.logoBlobId??null,imageSrc:t.imageSrc,imageName:t.imageName??void 0,placementKey:t.placementKey??null,opacity:Number.isFinite(t.opacity)?t.opacity:1,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0,originalWidth:Number.isFinite(t.dimensions?.originalWidth)?t.dimensions?.originalWidth:0,originalHeight:Number.isFinite(t.dimensions?.originalHeight)?t.dimensions?.originalHeight:0,normalizedWidth:this.normalizeOverlayCoordinate(t.dimensions?.normalizedWidth,.2),normalizedHeight:this.normalizeOverlayCoordinate(t.dimensions?.normalizedHeight,.2),processedImageSrc:t.processedImageSrc??null}))}hydrateOverlaysFromSvgBase(){let e=this.svgDoc();if(!e){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let n=[],r=Array.from(e.querySelectorAll('[data-overlay="true"]'));for(let a of r){if(a.tagName.toLowerCase()==="image"){let d=this.tryExtractLogoOverlayFromSvgNode(a,t);d&&n.push(d);continue}let c=this.tryExtractTextOverlayFromSvgNode(a,t);c&&n.push(c)}let o=this.ensureUniqueOverlayIds(n);this.overlays.set(o);let s=o[0]??null;this.activeOverlayId.set(s?.id??null),this.customizerState.setActiveOverlay(s)}tryExtractTextOverlayFromSvgNode(e,t){if(!(e.tagName.toLowerCase()==="g"&&(e.getAttribute(me.DATA_OVERLAY_KIND)?.trim()?.toLowerCase()==="text"||!!e.querySelector("path"))))return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=o.translateX,a=o.translateY;if(!Number.isFinite(s)||!Number.isFinite(a))return null;let l=this.normalizeOverlayCoordinate((s-t.x)/t.width,.5),c=this.normalizeOverlayCoordinate((a-t.y)/t.height,.5),d=this.readOverlayPlacementKey(e),u=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:d,kind:"text",normalizedX:l,normalizedY:c});if(!u)return null;let f=e.getAttribute(me.DATA_OVERLAY_TEXT)?.trim()??e.getAttribute("aria-label")?.trim()??"";if(!f)return null;let h=e.querySelector("path"),p=e.getAttribute(me.DATA_OVERLAY_FILL)?.trim()??h?.getAttribute("fill")?.trim()??"#1f2937",v={id:e.getAttribute("id")?.trim()||`text-${Date.now()}`,kind:"text",placementKey:u,text:f,fill:p,fontSize:this.readFiniteAttr(e,me.DATA_OVERLAY_FONT_SIZE,24),horizontalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_X,o.scaleX),o.scaleX),verticalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_Y,o.scaleY),o.scaleY),fontFamily:e.getAttribute(me.DATA_OVERLAY_FONT_FAMILY)?.trim()||this.defaultFontFamily()||void 0,fontWeight:e.getAttribute(me.DATA_OVERLAY_FONT_WEIGHT)?.trim()==="bold"?"bold":this.defaultFontWeight(),fontStyle:e.getAttribute(me.DATA_OVERLAY_FONT_STYLE)?.trim()==="italic"?"italic":this.defaultFontStyle(),lineHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_LINE_HEIGHT,this.defaultLineHeight()),letterSpacing:this.readFiniteAttr(e,me.DATA_OVERLAY_LETTER_SPACING,this.defaultLetterSpacing()),stroke:e.getAttribute(me.DATA_OVERLAY_STROKE)?.trim()||jl,strokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_STROKE_WIDTH,0),secondStroke:e.getAttribute(me.DATA_OVERLAY_SECOND_STROKE)?.trim()||Wl,secondStrokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_SECOND_STROKE_WIDTH,0),curveAmount:this.readFiniteAttr(e,me.DATA_OVERLAY_CURVE_AMOUNT,this.defaultCurveAmount()),shadowBlur:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_BLUR,this.defaultShadowBlur()),shadowOffsetX:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_X,this.defaultShadowOffsetX()),shadowOffsetY:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_Y,this.defaultShadowOffsetY()),shadowColor:e.getAttribute(me.DATA_OVERLAY_SHADOW_COLOR)?.trim()||this.defaultShadowColor(),warpEnabled:e.getAttribute(me.DATA_OVERLAY_WARP_ENABLED)==="true",lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:l,normalizedY:c,angle:this.normalizeAngle(o.rotate)};return v=this.applyPlacementZoneTextBounds(v),v}tryExtractLogoOverlayFromSvgNode(e,t){let n=this.readFiniteAttr(e,"width",0),r=this.readFiniteAttr(e,"height",0);if(n<=0||r<=0)return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=this.readFiniteAttr(e,"x",0),a=this.readFiniteAttr(e,"y",0),l=Number.isFinite(o.translateX)?o.translateX:0,c=Number.isFinite(o.translateY)?o.translateY:0,d=s+n/2+l,u=a+r/2+c,f=this.normalizeOverlayCoordinate((d-t.x)/t.width,.5),h=this.normalizeOverlayCoordinate((u-t.y)/t.height,.5),p=this.readOverlayPlacementKey(e),v=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:p,kind:"logo",normalizedX:f,normalizedY:h});if(!v)return null;let g=e.getAttribute("href")?.trim()??e.getAttributeNS($d,"href")?.trim()??"";if(!g)return null;let m={id:e.getAttribute("id")?.trim()||`logo-${Date.now()}`,kind:"logo",placementKey:v,imageSrc:g,imageName:e.getAttribute(me.DATA_SOURCE_NAME)?.trim()||void 0,originalWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_original_WIDTH,n),originalHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_original_HEIGHT,r),normalizedWidth:this.normalizeOverlayCoordinate(n/t.width,.2),normalizedHeight:this.normalizeOverlayCoordinate(r/t.height,.2),lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:f,normalizedY:h,angle:this.normalizeAngle(o.rotate),opacity:this.readFiniteAttr(e,"opacity",1)};return m=this.applyPlacementZoneLogoBounds(m),m}readFiniteAttr(e,t,n){let r=e.getAttribute(t);if(!r)return n;let o=Number.parseFloat(r);return Number.isFinite(o)?o:n}parseSvgTransform(e){let t=e?.trim()??"";if(!t)return{translateX:Number.NaN,translateY:Number.NaN,scaleX:1,scaleY:1,rotate:0};let n=t.match(/translate\(([-+]?\d*\.?\d+)(?:[\s,]+)([-+]?\d*\.?\d+)\)/i),r=t.match(/scale\(([-+]?\d*\.?\d+)(?:[\s,]+([-+]?\d*\.?\d+))?\)/i),o=t.match(/rotate\(([-+]?\d*\.?\d+)/i),s=t.match(/matrix\(\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*\)/i),a=s?Number.parseFloat(s[5]):Number.NaN,l=s?Number.parseFloat(s[6]):Number.NaN,c=n?Number.parseFloat(n[1]):a,d=n?Number.parseFloat(n[2]):l,u=r?Number.parseFloat(r[1]):1,f=r?Number.parseFloat(r[2]??r[1]):1,h=o?Number.parseFloat(o[1]):0;return{translateX:c,translateY:d,scaleX:Number.isFinite(u)?u:1,scaleY:Number.isFinite(f)?f:1,rotate:Number.isFinite(h)?h:0}}readOverlayPlacementKey(e){let t=e.getAttribute(me.DATA_PLACEMENT_KEY)?.trim()??e.getAttribute(me.PLACEMENT_KEY)?.trim()??e.getAttribute(me.DATA_PLACEMENT)?.trim()??e.getAttribute(me.PLACEMENTKEY)?.trim()??null;return t&&t.length>0?t:null}resolveExtractedOverlayPlacementKey(e){let{explicitPlacementKey:t,kind:n,normalizedX:r,normalizedY:o}=e,s=n==="text"?new Set(["TEXT"]):new Set(["LOGO","OVERLAY"]),a=h=>h.trim().replace(/^[#@]+/,"").toLowerCase(),l=new Set((this.personalizationItems()??[]).filter(h=>h?.placementKey&&s.has((h.type??"").trim().toUpperCase())).map(h=>h.placementKey)),c=new Map;if(Array.from(l).forEach(h=>{c.set(a(h),h)}),t){if(l.has(t))return t;let h=a(t),p=c.get(h);if(p)return p}let d=l.size>0?Array.from(l):this.personalizationState.placementZones().map(h=>h.placementKey),u=null,f=Number.POSITIVE_INFINITY;for(let h of d){let p=this.personalizationState.getPlacementZoneNormalizedBoundsByKey(h);if(!p)continue;if(r>=p.minX&&r<=p.maxX&&o>=p.minY&&o<=p.maxY)return h;let v=Qt.clamp(r,p.minX,p.maxX),g=Qt.clamp(o,p.minY,p.maxY),m=Math.hypot(r-v,o-g);m<f&&(f=m,u=h)}return u||(l.size===1?Array.from(l)[0]:t||null)}hydrateEditableOverlayRuntimeDimensions(e,t){let n=new Map,r=new Map(t.filter(Dt).map(s=>[s.id,s]));(e.overlays?.text??[]).forEach(s=>{if(!s?.id)return;let a=r.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})});let o=new Map(t.filter(ai).map(s=>[s.id,s]));(e.overlays?.logo??[]).forEach(s=>{if(!s?.id)return;let a=o.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})}),this.customizerState.overlayRuntimeDimensionsPx.set(n)}normalizeOverlayCoordinate(e,t){return Number.isFinite(e)?Qt.clamp(e,0,1):t}normalizeOverlayScale(e,t){return Number.isFinite(e)?Qt.clamp(e,.1,8):t}buildPendingEditableTextEffects(e,t){let n=new Map(t.filter(Dt).map(o=>[o.id,o])),r=[];for(let o of e){let s=o?.effectId?.trim();if(!o?.id||!s)continue;let a=n.get(o.id);a&&r.push({overlayId:a.id,placementKey:a.placementKey??o.placementKey??null,effectId:s})}return r}async replayPendingEditableTextEffects(){if(this.replayPendingEffectsInFlight)return;let e=this.pendingEditableTextEffects();if(!(!e.length||!this.hasAnyEffectDataSources())){this.replayPendingEffectsInFlight=!0;try{let t=new Map(this.overlays().map(o=>[o.id,o])),n=new Set(this.appliedEditableTextEffectKeys()),r=[];for(let o of e){let s=`${o.overlayId}::${o.effectId}`;if(n.has(s))continue;let a=t.get(o.overlayId);if(!a||!Dt(a))continue;let l=this.findEffectDataSource(o.effectId,o.placementKey);if(!l){r.push(o);continue}await this.personalizationState.applyTextEffect(a,l),n.add(s)}this.appliedEditableTextEffectKeys.set(n),this.pendingEditableTextEffects.set(r)}finally{this.replayPendingEffectsInFlight=!1}}}hasAnyEffectDataSources(){return(this.personalizationItems()??[]).some(e=>(e.packs??[]).some(t=>(t.type??"").toLowerCase().includes("effect")&&(t.dataSources?.length??0)>0))}findEffectDataSource(e,t){let n=e.trim();if(!n)return null;let r=(this.personalizationItems()??[]).filter(o=>!t||o.placementKey===t).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n);return r||((this.personalizationItems()??[]).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n)??null)}ensureUniqueOverlayIds(e){let t=new Map;return e.map(n=>{let r=t.get(n.id)??0;return t.set(n.id,r+1),r===0?n:he(k({},n),{id:`${n.id}-${r}`})})}capturePredesignCarryover(e){return this.predesignCarryoverService.captureSnapshot({targetPredesignId:e,manifestLoaded:this.manifestLoaded,svgDoc:this.svgDoc(),customizations:this.customizations(),overlays:this.overlays(),backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}async applyPredesignCarryoverIfNeeded(){let e=this.pendingPredesignCarryover;if(!e)return;let t=this.selectedPredesignId();this.pendingPredesignCarryover=null,await this.predesignCarryoverService.applyIfNeeded({snapshot:e,selectedPredesignId:t,customizations:this.customizations(),personalizationItems:this.personalizationItems(),backgroundTemplates:this.backgroundImageTemplates(),overlaysState:this.overlays,activeOverlayIdState:this.activeOverlayId,backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}applyManifestData(e){this.predesignBaseSvgText.set(null),e.distributorBranding?(this.themeService.applyDistributorBranding(e.distributorBranding,{lock:!0}),this.distributorHeaderLogoUrl.set(e.distributorBranding.logoUrl??null)):(this.themeService.clearDistributorBranding(),this.distributorHeaderLogoUrl.set(null)),this.editorMode.set((e.isShowWholeLayersOption||e.pathIdAccordingLayers.length>0)&&!this.isMobile()?"both":"3d"),e.resolvedPredesignId&&this.selectedPredesignId.set(e.resolvedPredesignId);let t=e.threeDVariants.find(r=>r.id===this.selectedThreeDVariantId())??e.threeDVariants.find(r=>r.id===e.selectedThreeDVariantId)??e.threeDVariants.find(r=>r.isDefault)??e.threeDVariants[0]??null;this.threeDVariants.set(e.threeDVariants),this.selectedThreeDVariantId.set(t?.id??e.selectedThreeDVariantId),this.threeDFileLink.set(t?.threeDFileLink??e.threeDFileLink??""),this.materialFileLink.set(t?.mtlFileLink??e.materialFileLink),this.svgFileLink.set(e.svgFileLink),e.svgViewBox&&this.svgViewBox.set(e.svgViewBox),this.customizations.set(e.customizations),this.predesigns.set(e.predesigns),this.steps.set(e.steps),this.pathIdAccordingLayers.set(e.pathIdAccordingLayers),this.renderPathAccordingLayers.set(e.renderPathAccordingLayers),this.isShowWholeLayersOption.set(e.isShowWholeLayersOption),this.customizerState.setPrintAreaInches(e.printAreaWidthInches,e.printAreaHeightInches),this.personalizationState.setPlacements(e.placements),this.backgroundState.setTemplates(e.placements),this.personalizationItems.set(e.placements),e.nextActiveStepId&&!this.activeStepId()&&this.activeStepId.set(e.nextActiveStepId),this.sdkReadyNotified=!1,this.manifestLoaded=!0;let n=this.resolveProductId();this.sdkRuntimeConfig&&n&&this.sdkRuntimeConfig.onManifestLoaded?.({productId:n,manifestMeta:e.manifestMeta}),this.tryLoadFilesFromManifest(!0)}getManifestIdentityInput(){return{runtimeConfig:this.sdkRuntimeConfig,inputProductId:this.productId(),inputApiKey:this.apiKey(),fallbackProductId:this.fallbackProductId}}resolveProductId(){return this.manifestFlowService.resolveProductId(this.getManifestIdentityInput())}resolveApiKey(){return this.manifestFlowService.resolveApiKey(this.getManifestIdentityInput())}getManifestConfigSignature(){return this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput())}notifyManifestLoadFailed(e){if(!this.sdkRuntimeConfig)return;let t=this.resolveProductId();t&&this.sdkRuntimeConfig.onManifestLoadFailed?.({productId:t,code:"MANIFEST_LOAD_FAILED",message:e})}loadSVGFromText(e,t=!0){this.baseSvgText.set(e),this.svgText.set(e),this.measurementCloneDirty.set(!0),this.overlays.set([]),this.customizerState.clearAllTextGlyphPlans(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.fabricLayoutState.set(null),this.svgDimensions.set(null),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3}),this.activeOverlayId.set(null);let n=this.isShowWholeLayersOption()?null:this.pathIdAccordingLayers()[0]?.name??null;this.selectedLayerKey.set(n),this.patternState.reset(),this.patternOverlayState.reset(),this.renderOrderState.reset(),this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.personalizationState.reset(),this.backgroundState.reset(),this.resetFabricViewTransform(),this.parseSVGRegions(this.svgText()),this.personalizationState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),this.hydrateOverlaysFromSvgBase(),this.syncOverlaysToSvgDoc().catch(r=>{console.error(Ot.overlaySyncFailed,r)}).finally(()=>{this.render2dView(),this.requestTextureRebuild()}),t&&!this.designHistory.isRestoring()&&this.resetHistoryWithCurrentState("Initial state")}resetHistoryWithCurrentState(e){let t=this.buildHistorySnapshot(e);this.designHistory.seed(t),this.historyInitialized=!0}scheduleHistoryCapture(e){!this.historyInitialized||this.designHistory.isRestoring()||this.historyCaptureSuspended||(this.historyDebounceHandle&&clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=setTimeout(()=>{this.designHistory.record(this.buildHistorySnapshot(e)),this.historyDebounceHandle=null},120))}setHistoryCaptureSuspended(e){this.historyCaptureSuspended=e,e&&this.historyDebounceHandle&&(clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=null)}buildHistorySnapshot(e,t){let n=t===void 0?this.selectedPredesignId():t;return{svgText:this.svgText(),overlays:JSON.parse(JSON.stringify(this.overlays()??[])),activeOverlayId:this.activeOverlayId(),selectedLayerKey:this.selectedLayerKey(),showPlacementGuides:this.showPlacementGuides(),selectedPredesignId:n,label:e,timestamp:Date.now()}}async applySnapshot(e){this.designHistory.beginRestore();try{let t=this.selectedPredesignId(),n=e.selectedPredesignId??null;if(t!==n){this.selectedPredesignId.set(n),await this.loadManifest(n);return}e.svgText?this.loadSVGFromText(e.svgText,!1):(this.svgText.set(null),this.render2dView()),this.overlays.set(JSON.parse(JSON.stringify(e.overlays??[]))),this.activeOverlayId.set(e.activeOverlayId??null),this.selectedLayerKey.set(e.selectedLayerKey??null),this.showPlacementGuides.set(!!e.showPlacementGuides),this.syncOverlaysToSvgDoc().finally(()=>{this.requestTextureRebuild(),this.render2dView()})}finally{this.designHistory.endRestore(),this.historyInitialized=!0}}onUndo(){let e=this.designHistory.undo(this.buildHistorySnapshot("undo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onRedo(){let e=this.designHistory.redo(this.buildHistorySnapshot("redo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onTwoDCanvasReady(e){this.twoDCanvasElement!==e&&(this.twoDCanvasElement=e,this.initFabricCanvases())}onTwoDCanvasDestroyed(){this.twoDCanvasElement=null,this.disposeFabricCanvases()}render2dView(){this.render2dViewAsync(),this.updatePlacementGuideVisibility()}async render2dViewAsync(){if(!this.fabricReady()||!this.fabricCanvas)return;try{await this.overlaySyncPromise()}catch{return}if(!this.svgDoc()){this.fabricCanvas.clear(),this.fabricCanvas.renderAll(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.twoDSnapRuntime.set(zi());return}let e=this.getActiveLayerPathIds(),t=this.renderOrderState.resolveFabricVisibleOverlayIds(this.overlays()),n=this.overlays().map(s=>s.id).filter(s=>!t.has(s));this.fabricVisibleOverlayIds.set(t);let r=this.svgRenderService.buildSvgForView(this.svgDoc(),this.pathIdAccordingLayers(),e.length>0?e:void 0,{preserveOverlayIds:n}),o=e.length>0?this.getLayerPreviewBounds(e):null;this.renderSvgOnCanvas(this.fabricCanvas,r,o),this.fabricGuideState.set({lines:[]}),this.twoDSnapRuntime.set(zi())}onLayerToggle(e){let t=this.selectedLayerKey(),n=this.isShowWholeLayersOption(),r=e===null||t===e?n?null:t:e;t!==r&&(this.selectedLayerKey.set(r),this.render2dView())}getActiveLayerPathIds(){let e=this.selectedLayerKey();if(!e)return[];let t=this.pathIdAccordingLayers().find(n=>n.name.toLowerCase()===e.toLowerCase());return t?t.actionPathIdsCsv.split(",").map(n=>n.replace("#","").trim()):[]}getAllLayerPathIds(){let e=new Set;for(let t of this.pathIdAccordingLayers())for(let n of t.actionPathIdsCsv.split(",")){let r=n.replace("#","").trim();r&&e.add(r)}return[...e]}renderSvgOnCanvas(e,t,n){let r=this.overlayFabricObjects().size>0,o=this.canvasTransform();if(!t){e.clear(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.canvasLoadToken.set(null),e.backgroundImage=void 0,e.renderAll();return}let s=Symbol();this.canvasLoadToken.set(s),this.svgDimensions()||this.computeSvgDimensions();let a=this.getOverlayBoundingRect(),l=this.normalizePreviewBounds(n??null,a);gU({canvas:e,svgMarkup:t,fabricViewZoom:this.fabricViewZoom(),svgViewBox:this.svgViewBox(),svgDimensions:this.svgDimensions(),targetBounds:l,baseBounds:a,loadToken:s}).then(c=>{if(!c||this.canvasLoadToken()!==c.token)return;let{image:d,transform:u,layout:f}=c;r&&o||(e.clear(),this.overlayFabricObjects.set(new Map)),e.backgroundImage=d,this.canvasTransform.set(u),this.fabricLayoutState.set(f),this.renderOverlaysOnCanvas(e),this.renderTwoDAlignmentLayers(e),e.requestRenderAll(),this.canvasLoadToken.set(null)}).catch(c=>{console.error(Ot.failedRenderSvgOnCanvas,c),this.canvasLoadToken.set(null)})}createOverlayTextObject(e,t,n){let r=this.getCachedTextGlyphPlan(e);if(!r)return this.ensureTextGlyphPlan(e),this.overlayFabricObjects().get(e.id);let o=this.getTextGlyphPlanSignature(e),s=this.getTextLayoutSignature(e),a=this.overlayFabricObjects().get(e.id);if(a){let _=a.textPlanSignature,w=a.layoutSignature;if(_===o&&w===s)return this.applyShadowToFabricGroup(a,e),a}a&&(t.getActiveObject()===a&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(a),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.delete(e.id),w}));let l=this.getOrBuildTextLayout(e,r);if(!l.length)return null;let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,g=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0,m=(_,w,D,A,P)=>{let E=new zs(_.d,{fill:e.fill,stroke:w,strokeWidth:D,strokeLineJoin:"round",strokeLineCap:"round",paintFirst:A,originX:"center",originY:"center",left:_.x,angle:_.angle,strokeUniform:!0});return E.outlineLayer=P,E},b=[];l.forEach(_=>{g>0&&b.push(m(_,e.fill,g,"stroke","faux-bold"));let w=h>0?p+(d>0?u:0):0;w>0&&b.push(m(_,f??void 0,w,"stroke","secondary-stroke"));let D=d>0?u:0;b.push(m(_,c??void 0,D,D>0?"stroke":"fill","primary-stroke"))});let y=new ts(b,{originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,centeredRotation:!0,lockScalingFlip:!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)});return y.set("lockUniScaling",e.lockAspectRatio??!0),y.set("skewX",e.fontStyle==="italic"?-12:0),y.set("skewY",0),y.dataOverlayId=e.id,y.textPlanSignature=o,y.layoutSignature=s,this.applyShadowToFabricGroup(y,e),y.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,y),this.constrainOverlayWithinView(e,y)}),y.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,y),this.constrainOverlayWithinView(e,y)}),y.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let _=this.resolveOverlayForFabricObject(y);_&&Dt(_)&&this.finalizeOverlayFromFabric(_,y)}),y.on("mousedown",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),y.on("selected",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.set(e.id,y),w}),t.add(y),this.activeOverlayId()===e.id&&t.setActiveObject(y),t.requestRenderAll(),y}ensureLogoFabricObject(e,t){let n=e.processedImageSrc??e.imageSrc,r=this.overlayFabricObjects().get(e.id);if(r){if(r.dataImageSrc!==n)t.getActiveObject()===r&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(r),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(e.id),l});else return this.syncFabricObjectWithOverlay(e,r),this.activeOverlayId()===e.id&&t.setActiveObject(r),r;this.pendingLogoLoads.update(a=>{let l=new Map(a);return l.delete(e.id),l}),t.getObjects().includes(r)&&t.requestRenderAll()}let o=Symbol();return this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.set(e.id,o),a}),jr.fromURL(n).then(s=>{this.pendingLogoLoads().get(e.id)===o&&(s.set({originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,lockScalingFlip:!0,lockUniScaling:e.lockAspectRatio??!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12}),s.dataOverlayId=e.id,s.dataImageSrc=n,s.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,s),this.constrainOverlayWithinView(e,s)}),s.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,s),this.constrainOverlayWithinView(e,s)}),s.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let a=this.resolveOverlayForFabricObject(s);a&&ai(a)&&this.finalizeOverlayFromFabric(a,s)}),s.on("mousedown",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),s.on("selected",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.set(e.id,s),l}),t.add(s),this.syncFabricObjectWithOverlay(e,s),this.constrainOverlayWithinView(e,s),this.applyFabricStackByOverlayOrder(t),this.activeOverlayId()===e.id&&t.setActiveObject(s),t.requestRenderAll())}).finally(()=>{this.pendingLogoLoads().get(e.id)===o&&this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.delete(e.id),a})}),null}renderOverlaysOnCanvas(e){let t=this.canvasTransform();if(!t){e.requestRenderAll();return}this.renderPlacementGuides(e);let n=new Set;this.overlays().forEach(o=>{if(this.fabricVisibleOverlayIds().has(o.id)&&this.overlayMatchesLayer(o,this.selectedLayerKey()))if(Dt(o)){if(o.text.trim().length===0)return;let s=this.overlayFabricObjects().get(o.id),a=this.getTextGlyphPlanSignature(o),l=this.getTextLayoutSignature(o),c=!s||s.textPlanSignature!==a||s.layoutSignature!==l,d=c?this.createOverlayTextObject(o,e,t):s;d&&(!c&&d instanceof ts&&(this.applyShadowToFabricGroup(d,o),d.layoutSignature=l,d.textPlanSignature=a),this.syncFabricObjectWithOverlay(o,d),this.activeOverlayId()===o.id&&e.setActiveObject(d),n.add(o.id))}else ai(o)&&this.ensureLogoFabricObject(o,e)&&n.add(o.id)}),Array.from(this.overlayFabricObjects().entries()).forEach(([o,s])=>{n.has(o)||(e.getActiveObject()===s&&this.discardActiveObjectWithoutSelectionClear(e),e.remove(s),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(o),l}))}),this.applyFabricStackByOverlayOrder(e);let r=this.activeOverlayId();if(r){let o=this.overlayFabricObjects().get(r);o&&e.setActiveObject(o)}e.requestRenderAll()}applyFabricStackByOverlayOrder(e){this.overlays().forEach(r=>{if(!this.fabricVisibleOverlayIds().has(r.id)||!this.overlayMatchesLayer(r,this.selectedLayerKey())||Dt(r)&&r.text.trim().length===0)return;let o=this.overlayFabricObjects().get(r.id);o&&e.bringObjectToFront(o)});let t=this.fabricGridState();t.horizontal.forEach(r=>e.bringObjectToFront(r)),t.vertical.forEach(r=>e.bringObjectToFront(r)),this.fabricGuideState().lines.forEach(r=>e.bringObjectToFront(r))}updatePlacementGuideVisibility(){let e=this.fabricCanvas,t=this.canvasTransform();!e||!t||(this.renderPlacementGuides(e),e.requestRenderAll(),this.threeDUI()?.currentObject()&&this.requestTextureRebuild())}renderPlacementGuides(e){let t=this.canvasTransform();if(!t){this.clearPlacementGuides(e);return}let n=this.placementZones().map(o=>({placementKey:o.placementKey,allowedKinds:o.allowedKinds,bounds:o.bounds})),r=vU(e,{show:this.showPlacementGuides()&&n.length>0,transform:t,zones:n,state:{objects:this.placementGuideObjects()}});this.placementGuideObjects.set(r.objects)}clearPlacementGuides(e){this.placementGuideObjects().size&&(uD(e,this.placementGuideObjects()),this.placementGuideObjects.set(new Map))}renderTwoDAlignmentLayers(e){let t=this.activeOverlay(),n=t?this.overlayFabricObjects().get(t.id):null,r=n?.left??null,o=n?.top??null,s=this.twoDCursorCanvasPoint()}clearTwoDSmartGuides(){this.fabricCanvas&&this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState()))}applySmartAlignmentForFabricMove(e,t){let n=this.fabricCanvas;if(!n)return;let r=t.left??0,o=t.top??0;if(this.twoDCursorCanvasPoint.set({x:r,y:o}),!this.snapEnabled()){this.twoDSnapRuntime.set(zi()),this.clearTwoDSmartGuides();return}let s=Math.max((t.getScaledWidth()||0)/2,1),a=Math.max((t.getScaledHeight()||0)/2,1),l={id:e.id,cx:r,cy:o,halfW:s,halfH:a},c=this.overlays().filter(f=>f.id!==e.id).map(f=>this.overlayFabricObjects().get(f.id)).filter(f=>!!f).map(f=>({id:f?.dataOverlayId,cx:f.left??0,cy:f.top??0,halfW:Math.max((f.getScaledWidth()||0)/2,1),halfH:Math.max((f.getScaledHeight()||0)/2,1)})),d=this.getTwoDGridStepPx(),u=qx({x:r,y:o},l,c,{x:n.getWidth()/2,y:n.getHeight()/2},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:d.x,gridStepY:d.y,tolerance:Kr.TWO_D_SNAP_TOLERANCE_PX},this.twoDSnapRuntime());this.twoDSnapRuntime.set(u.state),t.set({left:u.x,top:u.y}),t.setCoords(),this.fabricGuideState.set(cU(n,u.guides,this.fabricGuideState(),n.getWidth(),n.getHeight()))}resolveOverlayForFabricObject(e){let t=e?.dataOverlayId;return t?this.findOverlayById(t)??null:null}syncFabricObjectWithOverlay(e,t){let n=this.canvasTransform();if(!n)return;let r=this.getOverlayBoundingRect(),o=r.x+e.normalizedX*r.width,s=r.y+e.normalizedY*r.height,a=n.offsetX+o*n.scale,l=n.offsetY+s*n.scale;if(Dt(e)){let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,v=this.getShadowCanvasShift(e,n),g=a+v.x,m=l+v.y,b=t;b.getObjects().forEach(y=>{if(y instanceof zs){let _=y.outlineLayer,w,D=0,A="fill";if(_==="faux-bold"){let P=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0;w=e.fill,D=P,A=P>0?"stroke":"fill"}else _==="secondary-stroke"?(w=f??void 0,D=h>0?p+(d>0?u:0):0,A=D>0?"stroke":"fill"):(w=c??void 0,D=d>0?u:0,A=D>0?"stroke":"fill");y.set({fill:e.fill,stroke:w,strokeWidth:D,paintFirst:A,strokeUniform:!0}),y.dirty=!0}}),b.dirty=!0,b.set({originX:"center",originY:"center",angle:e.angle??0,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)}),b.set("lockUniScaling",e.lockAspectRatio??!0),b.setPositionByOrigin(new re(g,m),"center","center"),this.applyShadowToFabricGroup(b,e),b.setCoords(),this.publishOverlayRuntimeDimensions(e.id,b);return}if(ai(e)){let c=t,d=e.normalizedWidth*r.width,u=e.normalizedHeight*r.height,f=Math.max(c.width??d,1),h=Math.max(c.height??u,1),p=d*n.scale/f,v=u*n.scale/h;c.set({originX:"center",originY:"center",angle:e.angle??0,lockUniScaling:e.lockAspectRatio??!0,scaleX:p,scaleY:v,opacity:e.opacity??1}),c.setPositionByOrigin(new re(a,l),"center","center"),c.setCoords(),this.publishOverlayRuntimeDimensions(e.id,c)}}applyShadowToFabricGroup(e,t){let n=this.resolveShadowSettings(t);this.overlayStyleService.applyShadowToFabricGroup(e,n)}finalizeOverlayFromFabric(e,t){let n=this.canvasTransform(),r=this.getOverlayBoundingRect();if(!n||r.width<=0||r.height<=0)return;let o=t.left??n.offsetX,s=t.top??n.offsetY;if(Dt(e)){let f=this.getShadowCanvasShift(e,n);o-=f.x,s-=f.y}let a=(o-n.offsetX)/n.scale,l=(s-n.offsetY)/n.scale,c=(a-r.x)/r.width,d=(l-r.y)/r.height,u=this.clampNormalizedToPlacementZone(e,c,d);if(e.normalizedX=u.x,e.normalizedY=u.y,e.angle=this.normalizeAngle(t.angle??0),Dt(e)){let f=t,h=Math.abs(f.scaleX??n.scale),p=Math.abs(f.scaleY??h),v=n.scale||1,g=this.normalizeOverlayScale(h/v,1),m=this.normalizeOverlayScale(p/v,g);if(e.lockAspectRatio??!0){let b=this.normalizeOverlayScale((g+m)/2,1);g=b,m=b}if(e.horizontalScale=g,e.verticalScale=m,this.customizerState.clearTextGlyphPlan(e.id),e.placementKey){let b=this.applyPlacementZoneTextBounds(k({},e));Object.assign(e,b)}}else if(ai(e)){let f=t.getScaledWidth()||0,h=t.getScaledHeight()||0,p=f/n.scale,v=h/n.scale;if(e.lockAspectRatio??!0){let g=Math.max(e.normalizedWidth,.02)*r.width,m=Math.max(e.normalizedHeight,.02)*r.height,b=g>0?p/g:1,y=m>0?v/m:b,_=this.normalizeOverlayScale((b+y)/2,1);e.normalizedWidth=Math.min(Math.max(Math.max(e.normalizedWidth,.02)*_,.02),1),e.normalizedHeight=Math.min(Math.max(Math.max(e.normalizedHeight,.02)*_,.02),1)}else p>0&&(e.normalizedWidth=Math.min(Math.max(p/r.width,.02),1)),v>0&&(e.normalizedHeight=Math.min(Math.max(v/r.height,.02),1));if(typeof t.opacity=="number"&&(e.opacity=t.opacity),e.placementKey){let g=this.applyPlacementZoneLogoBounds(k({},e));Object.assign(e,g)}}this.commitOverlayUpdate(),this.customizerState.clearOverlayRuntimeDimensions(e.id),this.syncFabricObjectWithOverlay(e,t),t.canvas?.requestRenderAll()}publishOverlayRuntimeDimensions(e,t){let n=this.canvasTransform();if(!n||n.scale<=0)return;let r=Math.max((t.getScaledWidth()||0)/n.scale,1),o=Math.max((t.getScaledHeight()||0)/n.scale,1);this.customizerState.setOverlayRuntimeDimensionsPx(e,r,o)}constrainOverlayWithinView(e,t){let n=this.canvasTransform();if(!n)return;let o=(e.placementKey?this.personalizationState.getPlacementZoneBoundsByKey(e.placementKey):null)??this.getOverlayBoundingRect(),s=(t.getScaledWidth()||0)/2,a=(t.getScaledHeight()||0)/2,l=n.offsetX+o.x*n.scale+s,c=n.offsetX+(o.x+o.width)*n.scale-s,d=n.offsetY+o.y*n.scale+a,u=n.offsetY+(o.y+o.height)*n.scale-a,f=Math.min(Math.max(t.left??l,l),c),h=Math.min(Math.max(t.top??d,d),u);t.set({left:f,top:h}),t.setCoords()}getOverlayBoundingRect(){let e=this.getBaseBoundingBox();!this.svgDimensions()&&!e&&this.computeSvgDimensions();let t=this.svgDimensions(),n=this.svgViewBox(),r=t?{width:t.width,height:t.height,x:n.minX,y:n.minY}:null;return Wx(e,r)}getOverlayCenterPoint(e){let t=this.getOverlayBoundingRect();return{x:t.x+e.normalizedX*t.width,y:t.y+e.normalizedY*t.height}}overlayMatchesLayer(e,t){if(e.placementKey||!t)return!0;let n=this.resolveLayerDefinition(t);if(!n)return!0;let r=this.getOverlayCenterPoint(e),o=!1;for(let s of n.actionPathIdsCsv){let a=this.getLayerBoundsById(s);if(a&&(o=!0,this.pointInsideBounds(r,a)))return!0}return!o}resolveLayerDefinition(e){return this.layerBoundsService.resolveLayerDefinition(e,this.pathIdAccordingLayers())}getLayerBoundsById(e){let t=this.layerBoundsService.resolveLayerBoundsById({pathId:e,svgDoc:this.svgDoc(),svgText:this.svgText(),layerBoundsCache:this.layerBoundsCache(),measurementRoot:this.svgText()?this.ensureMeasurementSvgClone():null});return t.nextCache&&this.layerBoundsCache.set(t.nextCache),t.bounds}combineBoundsForPathIds(e){let t=e.map(n=>this.getLayerBoundsById(n));return this.layerBoundsService.combineBounds(t)}getLayerPreviewBounds(e){if(e.length===0)return null;let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return null;let n=this.combineBoundsForPathIds(e);return this.layerBoundsService.getLayerPreviewBounds(t,n)}normalizePreviewBounds(e,t){return this.layerBoundsService.normalizePreviewBounds(e,t)}pointInsideBounds(e,t){return this.layerBoundsService.pointInsideBounds(e,t)}readElementBounds(e){return this.layerBoundsService.readElementBounds(e)}ensureMeasurementSvgClone(){return this.customizerState.ensureMeasurementSvgClone(this.svgText)}refreshPlacementZonesFromSvg(){this.personalizationState.refreshFromSvg()}clampNormalizedToPlacementZone(e,t,n){return this.personalizationState.clampNormalizedToPlacementZone(e,t,n)}applyPlacementZoneTextBounds(e){return this.personalizationState.applyPlacementZoneTextBounds(e)}applyPlacementZoneLogoBounds(e){return this.personalizationState.applyPlacementZoneLogoBounds(e)}resolveOverlayLabel(e){return this.personalizationState.resolveOverlayLabel(e)}setActiveOverlay(e){if(!e){this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null),this.fabricCanvas&&this.fabricCanvas.getActiveObject()&&(this.fabricCanvas.discardActiveObject(),this.fabricCanvas.requestRenderAll()),this.threeDUI()?.rebuildSVGTexture();return}this.activeOverlayId.set(e.id),this.customizerState.setActiveOverlay(e),this.threeDUI()?.rebuildSVGTexture();let t=this.overlayFabricObjects().get(e.id);this.fabricCanvas&&t&&this.fabricCanvas.getActiveObject()!==t&&(this.fabricCanvas.setActiveObject(t),this.fabricCanvas.requestRenderAll())}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}async commitOverlayUpdate(){this.overlays.set([...this.overlays()]),await this.syncOverlaysToSvgDoc(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}onRenderOrderMoveTowardFront(e){let t=this.renderOrderState.moveInStack(e,-1);t&&this.applyRenderStackChange(t)}onRenderOrderMoveTowardBack(e){let t=this.renderOrderState.moveInStack(e,1);t&&this.applyRenderStackChange(t)}onRenderOrderReorder(e){let t=this.renderOrderState.reorderInStack(e);t&&this.applyRenderStackChange(t)}onRenderOrderSelect(e){let[t,n]=this.renderOrderState.parseRenderItemId(e);if(t!=="overlay")return;let r=this.findOverlayById(n);r&&this.setActiveOverlay(r)}async applyRenderStackChange(e){if(this.renderOrderState.enableManualOrdering(),!this.renderOrderState.setStack(e))return;let t=this.renderOrderState.syncOverlayOrderFromStack(this.overlays(),e);t!==this.overlays()&&this.overlays.set(t),await this.syncOverlaysToSvgDoc();let n=this.svgDoc();n&&this.customizerState.markSvgMutated(n),this.patternOverlayState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}synchronizeRenderOrderStack(){let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});this.renderOrderState.synchronizeStack(e,this.svgDoc(),this.renderPathAccordingLayers())}applyRenderOrderStackToSvg(e){return this.renderOrderState.applyStackToSvg(e,this.renderPathAccordingLayers())}buildPlacementNameByKeyMap(){return this.personalizationItems().reduce((e,t)=>(t?.placementKey&&e.set(t.placementKey,t.name??t.placementKey),e),new Map)}resolveFontFamily(e){let t=e.fontFamily,n=t&&t.trim().length>0?t:this.defaultFontFamily(),r=this.fontSourceMap()[n]?n:this.defaultFontFamily();return this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()),r}resolveFontWeight(e){return e.fontWeight??this.defaultFontWeight()}resolveFontStyle(e){return e.fontStyle??this.defaultFontStyle()}resolveLetterSpacing(e){let t=e.letterSpacing;return Number.isFinite(t)?t:this.defaultLetterSpacing()}resolveStrokeColor(e){if(!((e.strokeWidth??0)>0))return null;let n=e.stroke;return n&&n.trim().length>0?n:jl}resolveSecondStrokeColor(e){if(!((e.secondStrokeWidth??0)>0))return null;let n=e.secondStroke;return n&&n.trim().length>0?n:Wl}resolveCurveAmount(e){let t=e.curveAmount;return Number.isFinite(t)?t:this.defaultCurveAmount()}resolveCurveControlY(e){let t=this.resolveCurveAmount(e)/100,n=e.fontSize||this.minFontSize();return t*n}shadowDefaults(){return{blur:this.defaultShadowBlur(),offsetX:this.defaultShadowOffsetX(),offsetY:this.defaultShadowOffsetY(),color:this.defaultShadowColor()}}resolveShadowSettings(e){return this.overlayStyleService.resolveShadowSettings(e,this.shadowDefaults())}getShadowCanvasShift(e,t){let n=this.resolveShadowSettings(e);return this.overlayStyleService.getShadowCanvasShift(n,t?.scale??1)}getTextGlyphPlanSignature(e){return[e.text,this.resolveFontFamily(e),this.resolveFontWeight(e),this.resolveFontStyle(e),e.fontSize,this.resolveLetterSpacing(e)].join("|")}getTextLayoutSignature(e){let t=e.warpEnvelope??null,n=e.warpEnabled&&t?`warp:on:${t.viewBox.minX},${t.viewBox.minY},${t.viewBox.width},${t.viewBox.height}|${t.topPathD}|${t.bottomPathD}`:"warp:off",r=(e.secondStrokeWidth??0)>0?"1":"0";return`${this.getTextGlyphPlanSignature(e)}|curve:${this.resolveCurveAmount(e)}|${n}|ss:${r}`}async computeTextGlyphPlan(e){let t=await this.resolveOpentypeFont(e);return this.textLayoutService.computeTextGlyphPlan(e,{font:t,letterSpacing:this.resolveLetterSpacing(e)})}async getOrBuildTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);if(n)return n;let r=await this.computeTextGlyphPlan(e);return r&&this.customizerState.storeTextGlyphPlan(e.id,t,r),r}getCachedTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);return n||(this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e)),null)}ensureTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e);this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e))}getOrBuildTextLayout(e,t){let n=this.getTextLayoutSignature(e),r=this.customizerState.textLayoutCache().get(e.id);if(r&&r.signature===n)return r.layout.map(s=>k({},s));let o=this.textLayoutService.buildTextLayoutFromPlan(e,t,this.textLayoutCtx(e));return this.customizerState.textLayoutCache.update(s=>{var a=new Map(s);return a.set(e.id,{signature:n,layout:o}),a}),o.map(s=>k({},s))}textLayoutCtx(e){let t=e.warpEnvelope??null;return{shouldApplyWarp:!!(e.warpEnabled&&t),textWarpEnvelope:t,curveControlY:this.resolveCurveControlY(e)}}ingestFontPacks(e){let t=k({},fD),n=new Map;this.builtInFontOptions().forEach(({label:o,value:s},a)=>{n.set(s,{label:o,value:s,position:a})}),e.forEach(o=>{(o.packs??[]).filter(a=>(a.type??"").toLowerCase().includes("font")).forEach(a=>{(a.dataSources??[]).forEach(l=>{if(!l||l.isActive===!1)return;let c=(l.fontFamily??l.name??"").trim();if(!c)return;let d=this.resolveFontSource(l);d&&(t[c]=d,n.has(c)||n.set(c,{label:(l.name??c).trim()||c,value:c,position:l.position??n.size+1}))})})});let r=[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,value:s})=>({label:o,value:s}));this.fontSourceMap.set(t),this.fontOptions.set(r),this.queueInitialFontFaceLoads(r)}queueInitialFontFaceLoads(e){let t=new Set,n=this.defaultFontFamily().trim();if(n&&t.add(n),this.overlays().filter(Dt).forEach(r=>{let o=r.fontFamily?.trim();o&&t.add(o)}),!t.size){let r=e[0]?.value?.trim();r&&t.add(r)}t.forEach(r=>this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()))}fontDeps(){return{isBrowser:this.isBrowser,fontSourceMap:this.fontSourceMap,fontFacesReady:this.fontFacesReady,fontFacePromises:this.fontFacePromises,fontBinaryPromises:this.fontBinaryPromises,fontOutlinePromises:this.fontOutlinePromises,defaultFontFamily:this.defaultFontFamily}}resolveFontSource(e){let t=e?.fontUrl?.trim?.();return t||(e?.fileUrl?.trim?.()?e.fileUrl:null)}resolveOpentypeFont(e){return this.fontAssetService.resolveOpentypeFont(e,this.fontDeps())}normalizeFontSize(e){if(!Number.isFinite(e))return this.minFontSize();let t=Math.round(e);return Math.min(this.maxFontSize(),Math.max(this.minFontSize(),t))}normalizeAngle(e){if(!Number.isFinite(e))return 0;let t=e%360;return t>180?t-=360:t<=-180&&(t+=360),Math.round(t*10)/10}activeOverlay(){let e=this.findOverlayById(this.activeOverlayId());return e&&this.overlayMatchesLayer(e,this.selectedLayerKey())?e:null}onOverlayPositionChange(e){this.setOverlayNormalizedPosition(e.overlay,e.normalizedX,e.normalizedY)}onOverlayRotationChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;t.angle=this.normalizeAngle(e.angle),this.commitOverlayUpdate();let n=this.overlayFabricObjects().get(t.id);n&&(this.syncFabricObjectWithOverlay(t,n),n.canvas?.requestRenderAll())}onOverlayResizeChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;let n=k({},t);if(this.customizerState.clearOverlayRuntimeDimensions(n.id),Dt(t)&&"fontSize"in e&&(n=he(k({},n),{fontSize:this.normalizeFontSize(e.fontSize)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),Dt(t)&&"horizontalScale"in e&&"verticalScale"in e&&(n=he(k({},n),{horizontalScale:this.normalizeOverlayScale(e.horizontalScale,1),verticalScale:this.normalizeOverlayScale(e.verticalScale,1)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),ai(t)&&"normalizedWidth"in e&&"normalizedHeight"in e){if(t.lockAspectRatio??!0){let l=Math.max(t.normalizedWidth,.02),c=Math.max(t.normalizedHeight,.02),d=Math.max(e.normalizedWidth,.02)/l,u=Math.max(e.normalizedHeight,.02)/c,f=Math.max((d+u)/2,.02);n=he(k({},n),{normalizedWidth:Math.min(Math.max(l*f,.02),1),normalizedHeight:Math.min(Math.max(c*f,.02),1)})}else n=he(k({},n),{normalizedWidth:Math.min(Math.max(e.normalizedWidth,.02),1),normalizedHeight:Math.min(Math.max(e.normalizedHeight,.02),1)});n.placementKey&&(n=this.applyPlacementZoneLogoBounds(k({},n)))}let r=this.overlays(),o=r.findIndex(l=>l.id===n.id);if(o<0)return;let s=[...r];s[o]=n,this.overlays.set(s),this.customizerState.setActiveOverlay(n),this.commitOverlayUpdate();let a=this.overlayFabricObjects().get(n.id);a&&(this.syncFabricObjectWithOverlay(n,a),a.canvas?.requestRenderAll())}setOverlayNormalizedPosition(e,t,n){this.setActiveOverlay(e);let{x:r,y:o}=this.clampNormalizedToPlacementZone(e,t,n);if(Math.abs(r-e.normalizedX)<1e-4&&Math.abs(o-e.normalizedY)<1e-4)return;e.normalizedX=r,e.normalizedY=o,this.commitOverlayUpdate();let s=this.overlayFabricObjects().get(e.id);s&&(this.syncFabricObjectWithOverlay(e,s),s.canvas?.requestRenderAll())}syncOverlaysToSvgDoc(){let e=this.executeOverlaySync();return this.overlaySyncPromise.set(e.catch(t=>{throw console.error(Ot.overlaySyncFailed,t),t})),this.overlaySyncPromise()}async buildSvgText(e,t){if(!this.svgDoc())return;let n=this.svgDoc()?.documentElement;if(!n)return;let r=this.svgRenderService.ensureDefsElement(this.svgDoc());if(!r)return;this.svgRenderService.clearOverlayFilterDefs(r),Array.from(n.querySelectorAll('[data-overlay="true"]')).forEach(l=>{l.parentNode?.removeChild(l)});let o=n.querySelector("#OverlayLayer");o&&!o.childNodes.length&&o.parentNode?.removeChild(o),this.svgDimensions()||this.computeSvgDimensions();let s=n.namespaceURI||Di,a=this.getOverlayBoundingRect();for(let l of this.overlays()){let c=a.x+l.normalizedX*a.width,d=a.y+l.normalizedY*a.height;if(Dt(l)){if(l.text.trim().length===0)continue;try{let u=await this.getOrBuildTextGlyphPlan(l);if(!u||u.glyphs.length===0)continue;let f=this.getOrBuildTextLayout(l,u);if(!f.length)continue;let h=this.resolveStrokeColor(l),p=l.strokeWidth??0,v=this.resolveSecondStrokeColor(l),g=l.secondStrokeWidth??0,m=this.resolveShadowSettings(l);this.svgRenderService.appendTextOverlayAsPath({overlay:l,layout:f,center:{x:c,y:d},overlayContainer:n,defs:r,svgDoc:this.svgDoc(),strokeColor:h,strokeWidth:p,secondStrokeColor:v,secondStrokeWidth:g,shadowSettings:m});let b=this.svgDoc()?.getElementById(l.id);b&&(b.setAttribute(me.DATA_OVERLAY_KIND,"text"),b.setAttribute(me.DATA_OVERLAY_TEXT,l.text),b.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.DATA_OVERLAY_FILL,l.fill),b.setAttribute(me.DATA_OVERLAY_FONT_SIZE,`${l.fontSize??24}`),b.setAttribute(me.DATA_OVERLAY_SCALE_X,`${this.normalizeOverlayScale(l.horizontalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_SCALE_Y,`${this.normalizeOverlayScale(l.verticalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_FONT_FAMILY,this.resolveFontFamily(l)),b.setAttribute(me.DATA_OVERLAY_FONT_WEIGHT,this.resolveFontWeight(l)),b.setAttribute(me.DATA_OVERLAY_FONT_STYLE,this.resolveFontStyle(l)),b.setAttribute(me.DATA_OVERLAY_LETTER_SPACING,`${this.resolveLetterSpacing(l)}`),b.setAttribute(me.DATA_OVERLAY_LINE_HEIGHT,`${l.lineHeight??1.2}`),b.setAttribute(me.DATA_OVERLAY_STROKE,l.stroke??jl),b.setAttribute(me.DATA_OVERLAY_STROKE_WIDTH,`${l.strokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE,l.secondStroke??Wl),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE_WIDTH,`${l.secondStrokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_CURVE_AMOUNT,`${l.curveAmount??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_BLUR,`${l.shadowBlur??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_X,`${l.shadowOffsetX??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_Y,`${l.shadowOffsetY??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_COLOR,l.shadowColor??nh),b.setAttribute(me.DATA_OVERLAY_WARP_ENABLED,l.warpEnabled?"true":"false"),b.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"))}catch(u){console.error(eU(l.id),u)}continue}if(ai(l)){let u=l.normalizedWidth*a.width,f=l.normalizedHeight*a.height;if(u<=0||f<=0)continue;let h=c-u/2,p=d-f/2,v=this.svgDoc().createElementNS(s,"image");v.setAttribute("id",l.id),v.setAttribute(me.DATA_OVERLAY_KEY,"true"),v.setAttribute(me.DATA_OVERLAY_KIND,"logo"),v.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),v.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),v.setAttribute("x",`${h}`),v.setAttribute("y",`${p}`),v.setAttribute("width",`${u}`),v.setAttribute("height",`${f}`),v.setAttribute(me.DATA_OVERLAY_original_WIDTH,`${l.originalWidth||u}`),v.setAttribute(me.DATA_OVERLAY_original_HEIGHT,`${l.originalHeight||f}`),v.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"),v.setAttribute("preserveAspectRatio","none"),l.opacity!==void 0&&v.setAttribute("opacity",`${l.opacity}`);let g;e==="compressed"?g=l.imageSrc3d||l.imageSrc:g=l.imageSrc;let m=await this.resolveSvgImageHref(g);v.setAttribute("href",m);let b=l.angle??0;Math.abs(b)>.01&&v.setAttribute("transform",`rotate(${b} ${c} ${d})`),l.imageName&&v.setAttribute("data-source-name",l.imageName),n.appendChild(v)}}this.synchronizeRenderOrderStack(),this.applyRenderOrderStackToSvg(n),await this.backgroundState.syncBackgroundsToSvgWithQuality(e),t.set(new XMLSerializer().serializeToString(this.svgDoc())),this.measurementCloneDirty.set(!0)}async executeOverlaySyncForView(){return this.buildSvgText("compressed",this.svgText)}async executeOverlaySyncForExport(){return this.buildSvgText("original",this.svgTextForExport)}async executeOverlaySync(){return this.executeOverlaySyncForView()}async resolveSvgImageHref(e){let t=e?.trim()??"";if(!t)return"";if(t.startsWith("data:"))return t;let n=this.svgImageHrefCache.get(t);if(n)return n;let r=this.svgImageHrefPending.get(t);if(r)return r;let o=this.convertImageUrlToDataUrl(t).then(s=>{let a=s||t;return this.svgImageHrefCache.set(t,a),a}).finally(()=>{this.svgImageHrefPending.delete(t)});return this.svgImageHrefPending.set(t,o),o}async convertImageUrlToDataUrl(e){try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)return null;let n=await t.blob();return!n||n.size===0?null:await this.blobToDataUrl(n)}catch{return null}}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Unable to convert blob to data URL."))},r.onerror=()=>n(r.error??new Error("FileReader failed.")),r.readAsDataURL(e)})}computeSvgDimensions(){if(!this.svgDoc()){this.svgDimensions.set(null);return}let e=this.svgDoc()?.documentElement;if(!e){this.svgDimensions.set(null);return}let t=e.getAttribute("viewBox");if(t){let a=t.split(/[\s,]+/).map(l=>Number.parseFloat(l)).filter(l=>Number.isFinite(l));if(a.length===4){let[l,c,d,u]=a;if(d>0&&u>0){this.svgDimensions.set({width:d,height:u}),this.svgViewBox.set({minX:l,minY:c,width:d,height:u});return}}}let n=e.getAttribute("width"),r=e.getAttribute("height"),o=n?Number.parseFloat(n):NaN,s=r?Number.parseFloat(r):NaN;if(Number.isFinite(o)&&Number.isFinite(s)&&o>0&&s>0){this.svgDimensions.set({width:o,height:s}),this.svgViewBox.set({minX:0,minY:0,width:o,height:s});return}this.svgDimensions.set({width:1e3,height:1e3}),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3})}requestTextureRebuild(){if(this.svgText()){if(this.suspendTextureRebuild){this.pendingTextureRebuildWhileSuspended=!0;return}this.textureUpdateScheduled()||(this.textureUpdateScheduled.set(!0),requestAnimationFrame(()=>{this.overlaySyncPromise().catch(()=>{}).finally(()=>{this.textureUpdateScheduled.set(!1),this.svgText()&&this.threeDUI()?.rebuildSVGTexture()})}))}}getBaseElement(){return this.svgDoc()?this.baseElementCache()?this.baseElementCache():this.svgDoc()?.documentElement:null}getBaseBoundingBox(){if(this.baseBBoxCache())return this.baseBBoxCache();let e=this.getBaseElement();if(!e||!(e instanceof SVGGraphicsElement))return null;try{return e.getBBox()}catch{return null}}invalidateBaseCaches(){this.customizerState.invalidateBaseCaches(()=>this.refreshPlacementZonesFromSvg())}disposeFabricCanvases(){this.fabricCanvas&&(this.clearPlacementGuides(this.fabricCanvas),this.fabricGridState.set(oU(this.fabricCanvas,this.fabricGridState())),this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState())),this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null)),this.placementGuideObjects.set(new Map),this.fabricReady.set(!1),this.overlayFabricObjects.set(new Map),this.pendingLogoLoads.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.twoDSnapRuntime.set(zi()),this.twoDCursorCanvasPoint.set(null),this.twoDDraggingOverlayId.set(null)}initFabricCanvases(){if(!this.twoDCanvasElement){this.disposeFabricCanvases();return}this.setupFabricCanvasInstance(this.twoDCanvasElement)}setupFabricCanvasInstance(e){this.fabricCanvas&&(this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null));let{canvas:t,events:n,cleanup:r,syncDimensions:o}=pU(e),s=h=>{let v=h.detail?.overlayId;if(!v)return;let g=this.findOverlayById(v);g&&this.setActiveOverlay(g)},a=()=>{this.fabricSelectionClearSuppressionCount>0||(this.activeOverlayId.set(null),this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides())},l=h=>{let g=(h.detail?.deltaY??0)<0?1.08:.92;this.updateFabricViewZoom(g)},c=h=>{let v=h.detail?.multiplier;!Number.isFinite(v)||v<=0||this.updateFabricViewZoom(v)},d=()=>{this.render2dView()},u=h=>{let v=h.detail;!v||!Number.isFinite(v.x)||!Number.isFinite(v.y)||this.twoDCursorCanvasPoint.set({x:v.x,y:v.y})};n.addEventListener(si.OVERLAY_SELECT,s),n.addEventListener(si.SELECTION_CLEARED,a),n.addEventListener(si.WHEEL,l),n.addEventListener(si.PINCH,c),n.addEventListener(si.POINTER_MOVE,u),n.addEventListener(si.RESIZE,d);let f=()=>{n.removeEventListener(si.OVERLAY_SELECT,s),n.removeEventListener(si.SELECTION_CLEARED,a),n.removeEventListener(si.WHEEL,l),n.removeEventListener(si.PINCH,c),n.removeEventListener(si.POINTER_MOVE,u),n.removeEventListener(si.RESIZE,d),r()};this.fabricCanvasCleanup=f,this.fabricCanvasSyncDimensions=o,this.fabricCanvas=t,this.customizerState.fabricCanvasState.set(t),t.on("after:render",h=>{if(this.gridEnabled()){let p=h.ctx,v=t.viewportTransform;if(p&&v){let g=this.getTwoDGridStepPx(),m=this.getTwoDGridMajorStepPx();aU(p,t.getWidth(),t.getHeight(),v,g.x,g.y,m.x,m.y)}}}),this.fabricReady.set(!0),this.render2dView()}discardActiveObjectWithoutSelectionClear(e){this.fabricSelectionClearSuppressionCount+=1;try{e.discardActiveObject()}finally{queueMicrotask(()=>{this.fabricSelectionClearSuppressionCount=Math.max(0,this.fabricSelectionClearSuppressionCount-1)})}}resetFabricViewTransform(){this.fabricViewZoom.set(1),this.fabricCanvas&&this.fabricCanvas.setViewportTransform([1,0,0,1,0,0])}updateFabricViewZoom(e){let t=Qt.clamp(this.fabricViewZoom()*e,this.minFabricViewZoom(),this.maxFabricViewZoom());Math.abs(t-this.fabricViewZoom())<.001||(this.fabricViewZoom.set(t),this.applyFabricViewZoom()||this.render2dView())}applyFabricViewZoom(){if(!this.fabricCanvas||!this.canvasTransform()||!this.fabricLayoutState())return!1;let{baseScale:e,targetBounds:t,canvasWidth:n,canvasHeight:r,pxPerUnit:o}=this.fabricLayoutState(),s=e*this.fabricViewZoom(),a=t.width*s,l=t.height*s,c=(n-a)/2-t.x*s,d=(r-l)/2-t.y*s,u=s/(o||1);this.canvasTransform.set({scale:s,offsetX:c,offsetY:d});let f=this.fabricCanvas.backgroundImage;return f&&f.set({left:c,top:d,scaleX:u,scaleY:u,originX:"left",originY:"top",selectable:!1,evented:!1}),this.renderOverlaysOnCanvas(this.fabricCanvas),this.fabricCanvas.requestRenderAll(),!0}ngOnDestroy(){this.disposeFabricCanvases(),this.twoDCanvasElement=null,this.measurementService.disposeMeasurementHost(this.measurementHost),this.measurementSvgRoot.set(null),this.customizerState.resetWarpResources()}parseSVGRegions(e){let t=new DOMParser;this.svgDoc.set(t.parseFromString(e,ss)),this.invalidateBaseCaches(),this.computeSvgDimensions(),this.backgroundState.refreshFromSvg(),this.refreshPlacementZonesFromSvg()}async exportCurrentSvg(){if(!this.svgDoc()){console.warn(Ot.noSvgLoadedToExport);return}this.downloadCurrentSvgSnapshot()}async onSaveDesignClick(){if(!this.svgDoc()){this.toaster.showError(Ot.noSvgDocumentLoaded);return}this.designSavingInProgress.set(!0),this.designSaveMessage.set("Preparing design\u2026");try{await this.syncOverlaysToSvgDoc(),await this.executeOverlaySyncForExport();let t=this.svgTextForExport();if(!t){this.toaster.showError(Ot.failedToSerializeSvg);return}let n=this.buildDesignExportPayload(t),r=JSON.stringify(n,null,2),o=this.fileService.createJsonFile(r,q3),s=this.resolveApiKey(),a=this.resolveProductId();if(!s){this.toaster.showError(Ot.missingApiKey);return}this.designSaveMessage.set("Generating preview images\u2026");let l;try{l=await this.generateSubmissionThumbnails()}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}let c,d=l.map(u=>u.view);try{let u=Date.now();c=l.map(f=>this.dataUrlToPngFile(f.dataUrl,f.view,u))}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}this.designSaveMessage.set("Uploading design\u2026");try{let u=await vc(this.submissionApi.createSubmission(o,s,a??void 0,d,c,this.userUniqueId()));if(!u?.isSuccess||!u?.data){let h=u?.errors?.[0]??Ot.designSubmissionFailed;this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:h,errors:u?.errors??void 0}),this.toaster.showError(h);return}let f=u.data;this.sdkRuntimeConfig?.onSubmissionSuccess?.({productId:a??void 0,previews:this.mapSubmissionPreviewUrls(f),submissionNumber:f.submissionNumber,personalizationPlacements:f.personalizationPlacements})}catch{this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:Ot.designSubmissionFailed}),this.toaster.showError(Ot.designSubmissionFailed)}}finally{this.designSavingInProgress.set(!1),this.designSaveMessage.set(null)}}async onResetDesignClick(){let e=this.predesignBaseSvgText()||this.baseSvgText();if(!e){this.toaster.showError("No design loaded to reset to");return}if((await this.dialogService.showDialog({type:"confirmation",title:"Reset Design",message:"Are you sure you want to reset all customizations?",subtitle:"This will remove all applied customizations and revert to the current base design.",buttons:[{label:"Cancel",action:"cancel"},{label:"Reset",action:"confirm",isPrimary:!0,isDestructive:!0}]})).action==="confirm")try{this.loadSVGFromText(e,!0),this.toaster.showSuccess("All customizations have been reset")}catch(n){let r=n instanceof Error?n.message:"Failed to reset design";this.toaster.showError(r)}}onExitClick(){this.sdkRuntimeConfig?.onClose?.()}async generateSubmissionThumbnails(){let e=this.svgDoc();if(!e)throw new Error(Ot.noSvgDesignLoaded);await this.syncOverlaysToSvgDoc();let t=this.svgRenderService.serializeSvg(e);if(!t)throw new Error(Ot.failedSerializeSvgForThumbnail);let n=this.objText();if(!n)throw new Error(Ot.no3dModelForThumbnail);let r=this.mtlText();try{let o={type:"text",value:t},s={type:"text",value:n},a=r?{type:"text",value:r}:void 0,l=await this.threeThumbnailService.generateThumbnails(o,s,a,this.materialFileLink());if(!l.length)throw new Error(Ot.noThumbnailsGenerated);return this.normalizeSubmissionThumbnails(l)}catch(o){throw o instanceof Error?o:new Error(Ot.failedGenerateThumbnails)}}normalizeSubmissionThumbnails(e){let t=new Map,n=new Set(this.submissionThumbnailViews);if(e.forEach(r=>{n.has(r.view)&&(t.has(r.view)||t.set(r.view,r))}),t.size!==this.submissionThumbnailViews.length)throw new Error(Ot.invalidSubmissionThumbnails);return this.submissionThumbnailViews.map(r=>t.get(r))}dataUrlToPngFile(e,t,n=Date.now()){let r=/^data:(image\/png);base64,(.+)$/i.exec(e);if(!r)throw new Error(Ot.failedGenerateSubmissionThumbnails);let o=r[1],s=atob(r[2]),a=new Uint8Array(s.length);for(let l=0;l<s.length;l+=1)a[l]=s.charCodeAt(l);return new File([a],`preview-${t}-${n}.png`,{type:o})}mapSubmissionPreviewUrls(e){return(e.previews??[]).map(t=>({viewType:t.viewType,url:t.url,width:t.width,height:t.height})).filter(t=>!!t.url)}get getSvgTextForFinal(){return this.svgText()?this.sanitizer.bypassSecurityTrustHtml(this.svgText()):null}onTwoDZoomIn(){this.updateFabricViewZoom(1.1)}onTwoDZoomOut(){this.updateFabricViewZoom(.9)}onTwoDReset(){this.resetFabricViewTransform(),this.updateFabricViewZoom(1),this.render2dView()}onGridToggle(){this.gridEnabled.update(e=>!e)}onSnapToggle(){this.snapEnabled.update(e=>!e)}onGuidesToggle(){this.showPlacementGuides.update(e=>!e)}onGridSizeChange(e){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(0,Math.min(1,t));this.gridRatio.set(n)}getTwoDGridStepPx(){let e=this.canvasTransform(),t=this.twoDGridStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}getTwoDGridMajorStepPx(){let e=this.canvasTransform(),t=this.twoDGridMajorStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}onTwoDGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&this.twoDGridSizeInches.set(Math.max(.25,Math.min(4,t)))}setActiveStep(e){this.activeStepId.set(e)}downloadCurrentSvgSnapshot(){let e=this.serializeCurrentSvgSnapshot();return e?(this.svgRenderService.downloadSvg(e,`${K3}-${Date.now()}.svg`),e):null}serializeCurrentSvgSnapshot(){let e=this.svgRenderService.serializeSvg(this.svgDoc());return e||null}buildDesignExportPayload(e){let t=this.svgDoc();if(!t)return{};let n=this.overlays().reduce((o,s)=>{let a=this.personalizationState.getSelectedEffectIdForOverlay(s.id);return a&&o.set(s.id,a),o},new Map),r=this.collectOverlayDimensionsPxById(this.overlays());return this.designExportService.buildDesignExportPayload({selectedPredesignId:this.selectedPredesignId(),svgDoc:t,svgString:e,overlays:this.overlays(),personalizationItems:this.personalizationItems(),placementZones:this.placementZones(),placementNameByKey:this.buildPlacementNameByKeyMap(),backgroundState:this.backgroundState.state(),backgroundImageTemplates:this.backgroundImageTemplates(),patternState:this.patternState.state(),patternOverlays:this.patternOverlayState.state().overlays,renderOrder:this.renderOrderState.stack(),svgDimensions:this.svgDimensions(),svgViewBox:this.svgViewBox(),bounds:this.getOverlayBoundingRect(),overlayDimensionsPxById:r,selectedEffectIdByOverlay:n,textStyleResolvers:{defaultFontFamily:this.defaultFontFamily(),defaultFontWeight:this.defaultFontWeight(),defaultFontStyle:this.defaultFontStyle(),defaultLetterSpacing:this.defaultLetterSpacing(),defaultStrokeColor:jl,defaultSecondStrokeColor:Wl,defaultCurveAmount:this.defaultCurveAmount(),defaultLineHeight:this.defaultLineHeight(),defaultShadowBlur:this.defaultShadowBlur(),defaultShadowOffsetX:this.defaultShadowOffsetX(),defaultShadowOffsetY:this.defaultShadowOffsetY(),defaultShadowColor:this.defaultShadowColor()}})}collectOverlayDimensionsPxById(e){let t=new Map;return e.forEach(n=>{let r=this.personalizationState.getOverlayDimensionsPx(n);if(r.width>0&&r.height>0){t.set(n.id,{width:r.width,height:r.height});return}let o=this.customizerState.overlayRuntimeDimensionsPx().get(n.id);o&&o.width>0&&o.height>0&&t.set(n.id,{width:o.width,height:o.height})}),t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-ui"]],viewQuery:function(t,n){t&1&&ll(n.threeDUI,wse,5),t&2&&Vc()},hostBindings:function(t,n){t&1&&W("click",function(){return n.closeShortcuts()},XC)("resize",function(){return n.onResize()},YC)},inputs:{apiKey:[1,"apiKey"],productId:[1,"productId"],submissionNumber:[1,"submissionNumber"],predesignId:[1,"predesignId"],userUniqueId:[1,"userUniqueId"]},decls:23,vars:8,consts:[["threeDUI",""],[1,"header"],[1,"flex","items-center","justify-between"],[1,"brand"],["alt","Distributor logo",1,"brand-logo-img",3,"src"],[1,"header-right"],["type","button","title","Exit and close the customizer",1,"btn-exit",3,"click","disabled"],["type","button","title","Reset all customizations to the current predesign base",1,"btn-reset",3,"click","disabled"],["type","button",1,"btn-save",3,"click","disabled"],[1,"header-bottom"],[3,"valueChange","value"],["value","3d"],[1,"manifest-loader-overlay"],[1,"save-loader-overlay"],[1,"flex","editor-main-box",3,"mobile-panel-hidden","mobile-canvas-hidden"],["value","2d"],["value","both"],[3,"message"],["role","alert",1,"manifest-error-card"],[1,"manifest-error-title"],[1,"manifest-error-message"],["type","button",1,"manifest-retry-btn"],["type","button",1,"manifest-retry-btn",3,"click"],[3,"message","subtitle"],[1,"flex","editor-main-box"],[1,"main-canvas-area","flex-1"],[1,"view-section"],[3,"layerToggle","canvasReady","canvasDetached","zoomIn","zoomOut","resetView","onUndo","onRedo","svgText","isActive","layers","selectedLayerKey","isShowAllLayersOption","gridEnabled","snapEnabled","showPlacementGuides","gridSize"],[1,"canvas-area","canvas-area-single"],[1,"jersey-model"],[1,"w-full",3,"isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap"],["role","status","aria-live","polite",1,"canvas-manifest-loader"],[1,"right-panel-shell"],[1,"right-panel"],[1,"text-sm","text-surface-500"],[1,""],[1,"icon-nav-shell"],[1,"panel-icon-nav"],[1,"mobile-actions-bar"],["type","button",1,"mobile-panel-toggle"],["type","button",1,"mobile-canvas-toggle"],[1,"expanded-nav-menu"],[1,"icon-nav-list"],[1,"icon-btn",3,"active"],[1,"icon-btn","toggle-more-btn"],[1,"w-full",3,"svgTextChange","svgDimensionsChange","svgViewBoxChange","showPlacementGuidesChange","placementZonesChange","overlaysChange","activeOverlayIdChange","activeOverlayChange","threeDVariantSelected","overlayPositionChange","overlayRotationChange","overlayResizeChange","onUndo","onRedo","isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap",3,"click"],["title","Keyboard Shortcuts",1,"shortcuts-fab",3,"click"],[1,"ri-keyboard-line"],[1,"shortcuts-popover"],[1,"shortcuts-popover-header"],[1,"canvas-manifest-loader-subtitle"],[1,"panel-content"],[1,"panel-header"],[1,"panel-scroll-body"],[3,"predesigns","selectedId"],[3,"items"],[3,"items","userUniqueId","apiKey"],[3,"items","useAccordion"],[3,"templates","userUniqueId","apiKey"],[3,"items","activeOverlayId"],[3,"gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[3,"designSelected","predesigns","selectedId"],[3,"moveTowardFront","moveTowardBack","reorder","selectItem","items","activeOverlayId"],[3,"onGridToggle","onSnapToggle","onGuidesToggle","onTwoDGridSizeChange","gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[1,"text-gray-900"],[1,"child-accordion",3,"value"],[3,"value"],[1,"flex","items-center","gap-2"],[1,"child-panel"],["type","button",1,"mobile-panel-toggle",3,"click"],[1,"ri-arrow-down-s-line"],[1,"ri-arrow-up-s-line"],["type","button",1,"mobile-canvas-toggle",3,"click"],[1,"ri-fullscreen-line"],[1,"icon-btn","expanded-btn",3,"active"],[1,"icon-btn","expanded-btn",3,"click"],[3,"class"],[1,"w-full"],[1,"icon-btn",3,"click"],[1,"icon-btn","toggle-more-btn",3,"click"],[1,"ri-close-line"],[1,"ri-more-fill"]],template:function(t,n){t&1&&(U(0,"app-ui-toaster"),x(1,"header",1)(2,"div",2)(3,"div",3),ae(4,Ese,1,1,"img",4),C(),x(5,"div",5)(6,"button",6),W("click",function(){return n.onExitClick()}),R(7," Exit "),C(),x(8,"button",7),W("click",function(){return n.onResetDesignClick()}),R(9," Reset "),C(),x(10,"button",8),W("click",function(){return n.onSaveDesignClick()}),R(11),C()()(),x(12,"div",9)(13,"app-ui-tabs",10),mp("valueChange",function(o){return Ms(n.editorMode,o)||(n.editorMode=o),o}),x(14,"app-ui-tablist")(15,"app-ui-tab",11),R(16,"3D Editor"),C(),ae(17,Mse,4,0),C()()()(),ae(18,Tse,2,1,"div",12)(19,Ase,7,2,"div",12)(20,Ise,2,2,"div",13)(21,vae,27,32,"div",14),U(22,"app-generic-dialog")),t&2&&(T(4),le(n.distributorHeaderLogoUrl()?4:-1),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(),wt(" ",n.designSavingInProgress()?"Saving\u2026":"Save Design"," "),T(2),Hc("value",n.editorMode),T(4),le(n.isShowWholeLayersOption()||n.layers().length>0?17:-1),T(),le(n.showBlockingManifestLoader()?18:n.showBlockingManifestError()?19:n.designSavingInProgress()?20:21))},dependencies:[Ut,fr,Zx,Kx,oc,x_,S_,C_,E_,M_,T_,A_,bh,z_,B_,Vi,_i,_r,xr,P_,O_,ih,Z_,D_,J_],styles:[`@layer properties;@layer theme,utilities;@layer theme{:root,:host{--color-gray-300: oklch(87.2% .01 258.338);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-white: #fff;--spacing: .25rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--font-weight-medium: 500;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.visible{visibility:visible}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media(width>=40rem){.container{max-width:40rem}}@media(width>=48rem){.container{max-width:48rem}}@media(width>=64rem){.container{max-width:64rem}}@media(width>=80rem){.container{max-width:80rem}}@media(width>=96rem){.container{max-width:96rem}}.mt-3{margin-top:calc(var(--spacing) * 3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.w-2{width:calc(var(--spacing) * 2)}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.bg-white{background-color:var(--color-white)}.object-center{object-position:center}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:calc(var(--spacing) * 1)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(width>=48rem){.md\\:hidden{display:none}}}@font-face{font-family:remixicon;src:url("./media/remixicon.eot?t=1769685282643");src:url("./media/remixicon.eot?t=1769685282643#iefix") format("embedded-opentype"),url("./media/remixicon.woff2?t=1769685282643") format("woff2"),url("./media/remixicon.woff?t=1769685282643") format("woff"),url("./media/remixicon.ttf?t=1769685282643") format("truetype"),url("./media/remixicon.svg?t=1769685282643#remixicon") format("svg");font-display:swap}[class^=ri-],[class*=" ri-"]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\\ea01"}.ri-24-hours-line:before{content:"\\ea02"}.ri-4k-fill:before{content:"\\ea03"}.ri-4k-line:before{content:"\\ea04"}.ri-a-b:before{content:"\\ea05"}.ri-account-box-fill:before{content:"\\ea06"}.ri-account-box-line:before{content:"\\ea07"}.ri-account-circle-fill:before{content:"\\ea08"}.ri-account-circle-line:before{content:"\\ea09"}.ri-account-pin-box-fill:before{content:"\\ea0a"}.ri-account-pin-box-line:before{content:"\\ea0b"}.ri-account-pin-circle-fill:before{content:"\\ea0c"}.ri-account-pin-circle-line:before{content:"\\ea0d"}.ri-add-box-fill:before{content:"\\ea0e"}.ri-add-box-line:before{content:"\\ea0f"}.ri-add-circle-fill:before{content:"\\ea10"}.ri-add-circle-line:before{content:"\\ea11"}.ri-add-fill:before{content:"\\ea12"}.ri-add-line:before{content:"\\ea13"}.ri-admin-fill:before{content:"\\ea14"}.ri-admin-line:before{content:"\\ea15"}.ri-advertisement-fill:before{content:"\\ea16"}.ri-advertisement-line:before{content:"\\ea17"}.ri-airplay-fill:before{content:"\\ea18"}.ri-airplay-line:before{content:"\\ea19"}.ri-alarm-fill:before{content:"\\ea1a"}.ri-alarm-line:before{content:"\\ea1b"}.ri-alarm-warning-fill:before{content:"\\ea1c"}.ri-alarm-warning-line:before{content:"\\ea1d"}.ri-album-fill:before{content:"\\ea1e"}.ri-album-line:before{content:"\\ea1f"}.ri-alert-fill:before{content:"\\ea20"}.ri-alert-line:before{content:"\\ea21"}.ri-aliens-fill:before{content:"\\ea22"}.ri-aliens-line:before{content:"\\ea23"}.ri-align-bottom:before{content:"\\ea24"}.ri-align-center:before{content:"\\ea25"}.ri-align-justify:before{content:"\\ea26"}.ri-align-left:before{content:"\\ea27"}.ri-align-right:before{content:"\\ea28"}.ri-align-top:before{content:"\\ea29"}.ri-align-vertically:before{content:"\\ea2a"}.ri-alipay-fill:before{content:"\\ea2b"}.ri-alipay-line:before{content:"\\ea2c"}.ri-amazon-fill:before{content:"\\ea2d"}.ri-amazon-line:before{content:"\\ea2e"}.ri-anchor-fill:before{content:"\\ea2f"}.ri-anchor-line:before{content:"\\ea30"}.ri-ancient-gate-fill:before{content:"\\ea31"}.ri-ancient-gate-line:before{content:"\\ea32"}.ri-ancient-pavilion-fill:before{content:"\\ea33"}.ri-ancient-pavilion-line:before{content:"\\ea34"}.ri-android-fill:before{content:"\\ea35"}.ri-android-line:before{content:"\\ea36"}.ri-angularjs-fill:before{content:"\\ea37"}.ri-angularjs-line:before{content:"\\ea38"}.ri-anticlockwise-2-fill:before{content:"\\ea39"}.ri-anticlockwise-2-line:before{content:"\\ea3a"}.ri-anticlockwise-fill:before{content:"\\ea3b"}.ri-anticlockwise-line:before{content:"\\ea3c"}.ri-app-store-fill:before{content:"\\ea3d"}.ri-app-store-line:before{content:"\\ea3e"}.ri-apple-fill:before{content:"\\ea3f"}.ri-apple-line:before{content:"\\ea40"}.ri-apps-2-fill:before{content:"\\ea41"}.ri-apps-2-line:before{content:"\\ea42"}.ri-apps-fill:before{content:"\\ea43"}.ri-apps-line:before{content:"\\ea44"}.ri-archive-drawer-fill:before{content:"\\ea45"}.ri-archive-drawer-line:before{content:"\\ea46"}.ri-archive-fill:before{content:"\\ea47"}.ri-archive-line:before{content:"\\ea48"}.ri-arrow-down-circle-fill:before{content:"\\ea49"}.ri-arrow-down-circle-line:before{content:"\\ea4a"}.ri-arrow-down-fill:before{content:"\\ea4b"}.ri-arrow-down-line:before{content:"\\ea4c"}.ri-arrow-down-s-fill:before{content:"\\ea4d"}.ri-arrow-down-s-line:before{content:"\\ea4e"}.ri-arrow-drop-down-fill:before{content:"\\ea4f"}.ri-arrow-drop-down-line:before{content:"\\ea50"}.ri-arrow-drop-left-fill:before{content:"\\ea51"}.ri-arrow-drop-left-line:before{content:"\\ea52"}.ri-arrow-drop-right-fill:before{content:"\\ea53"}.ri-arrow-drop-right-line:before{content:"\\ea54"}.ri-arrow-drop-up-fill:before{content:"\\ea55"}.ri-arrow-drop-up-line:before{content:"\\ea56"}.ri-arrow-go-back-fill:before{content:"\\ea57"}.ri-arrow-go-back-line:before{content:"\\ea58"}.ri-arrow-go-forward-fill:before{content:"\\ea59"}.ri-arrow-go-forward-line:before{content:"\\ea5a"}.ri-arrow-left-circle-fill:before{content:"\\ea5b"}.ri-arrow-left-circle-line:before{content:"\\ea5c"}.ri-arrow-left-down-fill:before{content:"\\ea5d"}.ri-arrow-left-down-line:before{content:"\\ea5e"}.ri-arrow-left-fill:before{content:"\\ea5f"}.ri-arrow-left-line:before{content:"\\ea60"}.ri-arrow-left-right-fill:before{content:"\\ea61"}.ri-arrow-left-right-line:before{content:"\\ea62"}.ri-arrow-left-s-fill:before{content:"\\ea63"}.ri-arrow-left-s-line:before{content:"\\ea64"}.ri-arrow-left-up-fill:before{content:"\\ea65"}.ri-arrow-left-up-line:before{content:"\\ea66"}.ri-arrow-right-circle-fill:before{content:"\\ea67"}.ri-arrow-right-circle-line:before{content:"\\ea68"}.ri-arrow-right-down-fill:before{content:"\\ea69"}.ri-arrow-right-down-line:before{content:"\\ea6a"}.ri-arrow-right-fill:before{content:"\\ea6b"}.ri-arrow-right-line:before{content:"\\ea6c"}.ri-arrow-right-s-fill:before{content:"\\ea6d"}.ri-arrow-right-s-line:before{content:"\\ea6e"}.ri-arrow-right-up-fill:before{content:"\\ea6f"}.ri-arrow-right-up-line:before{content:"\\ea70"}.ri-arrow-up-circle-fill:before{content:"\\ea71"}.ri-arrow-up-circle-line:before{content:"\\ea72"}.ri-arrow-up-down-fill:before{content:"\\ea73"}.ri-arrow-up-down-line:before{content:"\\ea74"}.ri-arrow-up-fill:before{content:"\\ea75"}.ri-arrow-up-line:before{content:"\\ea76"}.ri-arrow-up-s-fill:before{content:"\\ea77"}.ri-arrow-up-s-line:before{content:"\\ea78"}.ri-artboard-2-fill:before{content:"\\ea79"}.ri-artboard-2-line:before{content:"\\ea7a"}.ri-artboard-fill:before{content:"\\ea7b"}.ri-artboard-line:before{content:"\\ea7c"}.ri-article-fill:before{content:"\\ea7d"}.ri-article-line:before{content:"\\ea7e"}.ri-aspect-ratio-fill:before{content:"\\ea7f"}.ri-aspect-ratio-line:before{content:"\\ea80"}.ri-asterisk:before{content:"\\ea81"}.ri-at-fill:before{content:"\\ea82"}.ri-at-line:before{content:"\\ea83"}.ri-attachment-2:before{content:"\\ea84"}.ri-attachment-fill:before{content:"\\ea85"}.ri-attachment-line:before{content:"\\ea86"}.ri-auction-fill:before{content:"\\ea87"}.ri-auction-line:before{content:"\\ea88"}.ri-award-fill:before{content:"\\ea89"}.ri-award-line:before{content:"\\ea8a"}.ri-baidu-fill:before{content:"\\ea8b"}.ri-baidu-line:before{content:"\\ea8c"}.ri-ball-pen-fill:before{content:"\\ea8d"}.ri-ball-pen-line:before{content:"\\ea8e"}.ri-bank-card-2-fill:before{content:"\\ea8f"}.ri-bank-card-2-line:before{content:"\\ea90"}.ri-bank-card-fill:before{content:"\\ea91"}.ri-bank-card-line:before{content:"\\ea92"}.ri-bank-fill:before{content:"\\ea93"}.ri-bank-line:before{content:"\\ea94"}.ri-bar-chart-2-fill:before{content:"\\ea95"}.ri-bar-chart-2-line:before{content:"\\ea96"}.ri-bar-chart-box-fill:before{content:"\\ea97"}.ri-bar-chart-box-line:before{content:"\\ea98"}.ri-bar-chart-fill:before{content:"\\ea99"}.ri-bar-chart-grouped-fill:before{content:"\\ea9a"}.ri-bar-chart-grouped-line:before{content:"\\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\\ea9d"}.ri-bar-chart-line:before{content:"\\ea9e"}.ri-barcode-box-fill:before{content:"\\ea9f"}.ri-barcode-box-line:before{content:"\\eaa0"}.ri-barcode-fill:before{content:"\\eaa1"}.ri-barcode-line:before{content:"\\eaa2"}.ri-barricade-fill:before{content:"\\eaa3"}.ri-barricade-line:before{content:"\\eaa4"}.ri-base-station-fill:before{content:"\\eaa5"}.ri-base-station-line:before{content:"\\eaa6"}.ri-basketball-fill:before{content:"\\eaa7"}.ri-basketball-line:before{content:"\\eaa8"}.ri-battery-2-charge-fill:before{content:"\\eaa9"}.ri-battery-2-charge-line:before{content:"\\eaaa"}.ri-battery-2-fill:before{content:"\\eaab"}.ri-battery-2-line:before{content:"\\eaac"}.ri-battery-charge-fill:before{content:"\\eaad"}.ri-battery-charge-line:before{content:"\\eaae"}.ri-battery-fill:before{content:"\\eaaf"}.ri-battery-line:before{content:"\\eab0"}.ri-battery-low-fill:before{content:"\\eab1"}.ri-battery-low-line:before{content:"\\eab2"}.ri-battery-saver-fill:before{content:"\\eab3"}.ri-battery-saver-line:before{content:"\\eab4"}.ri-battery-share-fill:before{content:"\\eab5"}.ri-battery-share-line:before{content:"\\eab6"}.ri-bear-smile-fill:before{content:"\\eab7"}.ri-bear-smile-line:before{content:"\\eab8"}.ri-behance-fill:before{content:"\\eab9"}.ri-behance-line:before{content:"\\eaba"}.ri-bell-fill:before{content:"\\eabb"}.ri-bell-line:before{content:"\\eabc"}.ri-bike-fill:before{content:"\\eabd"}.ri-bike-line:before{content:"\\eabe"}.ri-bilibili-fill:before{content:"\\eabf"}.ri-bilibili-line:before{content:"\\eac0"}.ri-bill-fill:before{content:"\\eac1"}.ri-bill-line:before{content:"\\eac2"}.ri-billiards-fill:before{content:"\\eac3"}.ri-billiards-line:before{content:"\\eac4"}.ri-bit-coin-fill:before{content:"\\eac5"}.ri-bit-coin-line:before{content:"\\eac6"}.ri-blaze-fill:before{content:"\\eac7"}.ri-blaze-line:before{content:"\\eac8"}.ri-bluetooth-connect-fill:before{content:"\\eac9"}.ri-bluetooth-connect-line:before{content:"\\eaca"}.ri-bluetooth-fill:before{content:"\\eacb"}.ri-bluetooth-line:before{content:"\\eacc"}.ri-blur-off-fill:before{content:"\\eacd"}.ri-blur-off-line:before{content:"\\eace"}.ri-body-scan-fill:before{content:"\\eacf"}.ri-body-scan-line:before{content:"\\ead0"}.ri-bold:before{content:"\\ead1"}.ri-book-2-fill:before{content:"\\ead2"}.ri-book-2-line:before{content:"\\ead3"}.ri-book-3-fill:before{content:"\\ead4"}.ri-book-3-line:before{content:"\\ead5"}.ri-book-fill:before{content:"\\ead6"}.ri-book-line:before{content:"\\ead7"}.ri-book-marked-fill:before{content:"\\ead8"}.ri-book-marked-line:before{content:"\\ead9"}.ri-book-open-fill:before{content:"\\eada"}.ri-book-open-line:before{content:"\\eadb"}.ri-book-read-fill:before{content:"\\eadc"}.ri-book-read-line:before{content:"\\eadd"}.ri-booklet-fill:before{content:"\\eade"}.ri-booklet-line:before{content:"\\eadf"}.ri-bookmark-2-fill:before{content:"\\eae0"}.ri-bookmark-2-line:before{content:"\\eae1"}.ri-bookmark-3-fill:before{content:"\\eae2"}.ri-bookmark-3-line:before{content:"\\eae3"}.ri-bookmark-fill:before{content:"\\eae4"}.ri-bookmark-line:before{content:"\\eae5"}.ri-boxing-fill:before{content:"\\eae6"}.ri-boxing-line:before{content:"\\eae7"}.ri-braces-fill:before{content:"\\eae8"}.ri-braces-line:before{content:"\\eae9"}.ri-brackets-fill:before{content:"\\eaea"}.ri-brackets-line:before{content:"\\eaeb"}.ri-briefcase-2-fill:before{content:"\\eaec"}.ri-briefcase-2-line:before{content:"\\eaed"}.ri-briefcase-3-fill:before{content:"\\eaee"}.ri-briefcase-3-line:before{content:"\\eaef"}.ri-briefcase-4-fill:before{content:"\\eaf0"}.ri-briefcase-4-line:before{content:"\\eaf1"}.ri-briefcase-5-fill:before{content:"\\eaf2"}.ri-briefcase-5-line:before{content:"\\eaf3"}.ri-briefcase-fill:before{content:"\\eaf4"}.ri-briefcase-line:before{content:"\\eaf5"}.ri-bring-forward:before{content:"\\eaf6"}.ri-bring-to-front:before{content:"\\eaf7"}.ri-broadcast-fill:before{content:"\\eaf8"}.ri-broadcast-line:before{content:"\\eaf9"}.ri-brush-2-fill:before{content:"\\eafa"}.ri-brush-2-line:before{content:"\\eafb"}.ri-brush-3-fill:before{content:"\\eafc"}.ri-brush-3-line:before{content:"\\eafd"}.ri-brush-4-fill:before{content:"\\eafe"}.ri-brush-4-line:before{content:"\\eaff"}.ri-brush-fill:before{content:"\\eb00"}.ri-brush-line:before{content:"\\eb01"}.ri-bubble-chart-fill:before{content:"\\eb02"}.ri-bubble-chart-line:before{content:"\\eb03"}.ri-bug-2-fill:before{content:"\\eb04"}.ri-bug-2-line:before{content:"\\eb05"}.ri-bug-fill:before{content:"\\eb06"}.ri-bug-line:before{content:"\\eb07"}.ri-building-2-fill:before{content:"\\eb08"}.ri-building-2-line:before{content:"\\eb09"}.ri-building-3-fill:before{content:"\\eb0a"}.ri-building-3-line:before{content:"\\eb0b"}.ri-building-4-fill:before{content:"\\eb0c"}.ri-building-4-line:before{content:"\\eb0d"}.ri-building-fill:before{content:"\\eb0e"}.ri-building-line:before{content:"\\eb0f"}.ri-bus-2-fill:before{content:"\\eb10"}.ri-bus-2-line:before{content:"\\eb11"}.ri-bus-fill:before{content:"\\eb12"}.ri-bus-line:before{content:"\\eb13"}.ri-bus-wifi-fill:before{content:"\\eb14"}.ri-bus-wifi-line:before{content:"\\eb15"}.ri-cactus-fill:before{content:"\\eb16"}.ri-cactus-line:before{content:"\\eb17"}.ri-cake-2-fill:before{content:"\\eb18"}.ri-cake-2-line:before{content:"\\eb19"}.ri-cake-3-fill:before{content:"\\eb1a"}.ri-cake-3-line:before{content:"\\eb1b"}.ri-cake-fill:before{content:"\\eb1c"}.ri-cake-line:before{content:"\\eb1d"}.ri-calculator-fill:before{content:"\\eb1e"}.ri-calculator-line:before{content:"\\eb1f"}.ri-calendar-2-fill:before{content:"\\eb20"}.ri-calendar-2-line:before{content:"\\eb21"}.ri-calendar-check-fill:before{content:"\\eb22"}.ri-calendar-check-line:before{content:"\\eb23"}.ri-calendar-event-fill:before{content:"\\eb24"}.ri-calendar-event-line:before{content:"\\eb25"}.ri-calendar-fill:before{content:"\\eb26"}.ri-calendar-line:before{content:"\\eb27"}.ri-calendar-todo-fill:before{content:"\\eb28"}.ri-calendar-todo-line:before{content:"\\eb29"}.ri-camera-2-fill:before{content:"\\eb2a"}.ri-camera-2-line:before{content:"\\eb2b"}.ri-camera-3-fill:before{content:"\\eb2c"}.ri-camera-3-line:before{content:"\\eb2d"}.ri-camera-fill:before{content:"\\eb2e"}.ri-camera-lens-fill:before{content:"\\eb2f"}.ri-camera-lens-line:before{content:"\\eb30"}.ri-camera-line:before{content:"\\eb31"}.ri-camera-off-fill:before{content:"\\eb32"}.ri-camera-off-line:before{content:"\\eb33"}.ri-camera-switch-fill:before{content:"\\eb34"}.ri-camera-switch-line:before{content:"\\eb35"}.ri-capsule-fill:before{content:"\\eb36"}.ri-capsule-line:before{content:"\\eb37"}.ri-car-fill:before{content:"\\eb38"}.ri-car-line:before{content:"\\eb39"}.ri-car-washing-fill:before{content:"\\eb3a"}.ri-car-washing-line:before{content:"\\eb3b"}.ri-caravan-fill:before{content:"\\eb3c"}.ri-caravan-line:before{content:"\\eb3d"}.ri-cast-fill:before{content:"\\eb3e"}.ri-cast-line:before{content:"\\eb3f"}.ri-cellphone-fill:before{content:"\\eb40"}.ri-cellphone-line:before{content:"\\eb41"}.ri-celsius-fill:before{content:"\\eb42"}.ri-celsius-line:before{content:"\\eb43"}.ri-centos-fill:before{content:"\\eb44"}.ri-centos-line:before{content:"\\eb45"}.ri-character-recognition-fill:before{content:"\\eb46"}.ri-character-recognition-line:before{content:"\\eb47"}.ri-charging-pile-2-fill:before{content:"\\eb48"}.ri-charging-pile-2-line:before{content:"\\eb49"}.ri-charging-pile-fill:before{content:"\\eb4a"}.ri-charging-pile-line:before{content:"\\eb4b"}.ri-chat-1-fill:before{content:"\\eb4c"}.ri-chat-1-line:before{content:"\\eb4d"}.ri-chat-2-fill:before{content:"\\eb4e"}.ri-chat-2-line:before{content:"\\eb4f"}.ri-chat-3-fill:before{content:"\\eb50"}.ri-chat-3-line:before{content:"\\eb51"}.ri-chat-4-fill:before{content:"\\eb52"}.ri-chat-4-line:before{content:"\\eb53"}.ri-chat-check-fill:before{content:"\\eb54"}.ri-chat-check-line:before{content:"\\eb55"}.ri-chat-delete-fill:before{content:"\\eb56"}.ri-chat-delete-line:before{content:"\\eb57"}.ri-chat-download-fill:before{content:"\\eb58"}.ri-chat-download-line:before{content:"\\eb59"}.ri-chat-follow-up-fill:before{content:"\\eb5a"}.ri-chat-follow-up-line:before{content:"\\eb5b"}.ri-chat-forward-fill:before{content:"\\eb5c"}.ri-chat-forward-line:before{content:"\\eb5d"}.ri-chat-heart-fill:before{content:"\\eb5e"}.ri-chat-heart-line:before{content:"\\eb5f"}.ri-chat-history-fill:before{content:"\\eb60"}.ri-chat-history-line:before{content:"\\eb61"}.ri-chat-new-fill:before{content:"\\eb62"}.ri-chat-new-line:before{content:"\\eb63"}.ri-chat-off-fill:before{content:"\\eb64"}.ri-chat-off-line:before{content:"\\eb65"}.ri-chat-poll-fill:before{content:"\\eb66"}.ri-chat-poll-line:before{content:"\\eb67"}.ri-chat-private-fill:before{content:"\\eb68"}.ri-chat-private-line:before{content:"\\eb69"}.ri-chat-quote-fill:before{content:"\\eb6a"}.ri-chat-quote-line:before{content:"\\eb6b"}.ri-chat-settings-fill:before{content:"\\eb6c"}.ri-chat-settings-line:before{content:"\\eb6d"}.ri-chat-smile-2-fill:before{content:"\\eb6e"}.ri-chat-smile-2-line:before{content:"\\eb6f"}.ri-chat-smile-3-fill:before{content:"\\eb70"}.ri-chat-smile-3-line:before{content:"\\eb71"}.ri-chat-smile-fill:before{content:"\\eb72"}.ri-chat-smile-line:before{content:"\\eb73"}.ri-chat-upload-fill:before{content:"\\eb74"}.ri-chat-upload-line:before{content:"\\eb75"}.ri-chat-voice-fill:before{content:"\\eb76"}.ri-chat-voice-line:before{content:"\\eb77"}.ri-check-double-fill:before{content:"\\eb78"}.ri-check-double-line:before{content:"\\eb79"}.ri-check-fill:before{content:"\\eb7a"}.ri-check-line:before{content:"\\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\\eb7d"}.ri-checkbox-blank-fill:before{content:"\\eb7e"}.ri-checkbox-blank-line:before{content:"\\eb7f"}.ri-checkbox-circle-fill:before{content:"\\eb80"}.ri-checkbox-circle-line:before{content:"\\eb81"}.ri-checkbox-fill:before{content:"\\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\\eb83"}.ri-checkbox-indeterminate-line:before{content:"\\eb84"}.ri-checkbox-line:before{content:"\\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\\eb87"}.ri-checkbox-multiple-fill:before{content:"\\eb88"}.ri-checkbox-multiple-line:before{content:"\\eb89"}.ri-china-railway-fill:before{content:"\\eb8a"}.ri-china-railway-line:before{content:"\\eb8b"}.ri-chrome-fill:before{content:"\\eb8c"}.ri-chrome-line:before{content:"\\eb8d"}.ri-clapperboard-fill:before{content:"\\eb8e"}.ri-clapperboard-line:before{content:"\\eb8f"}.ri-clipboard-fill:before{content:"\\eb90"}.ri-clipboard-line:before{content:"\\eb91"}.ri-clockwise-2-fill:before{content:"\\eb92"}.ri-clockwise-2-line:before{content:"\\eb93"}.ri-clockwise-fill:before{content:"\\eb94"}.ri-clockwise-line:before{content:"\\eb95"}.ri-close-circle-fill:before{content:"\\eb96"}.ri-close-circle-line:before{content:"\\eb97"}.ri-close-fill:before{content:"\\eb98"}.ri-close-line:before{content:"\\eb99"}.ri-closed-captioning-fill:before{content:"\\eb9a"}.ri-closed-captioning-line:before{content:"\\eb9b"}.ri-cloud-fill:before{content:"\\eb9c"}.ri-cloud-line:before{content:"\\eb9d"}.ri-cloud-off-fill:before{content:"\\eb9e"}.ri-cloud-off-line:before{content:"\\eb9f"}.ri-cloud-windy-fill:before{content:"\\eba0"}.ri-cloud-windy-line:before{content:"\\eba1"}.ri-cloudy-2-fill:before{content:"\\eba2"}.ri-cloudy-2-line:before{content:"\\eba3"}.ri-cloudy-fill:before{content:"\\eba4"}.ri-cloudy-line:before{content:"\\eba5"}.ri-code-box-fill:before{content:"\\eba6"}.ri-code-box-line:before{content:"\\eba7"}.ri-code-fill:before{content:"\\eba8"}.ri-code-line:before{content:"\\eba9"}.ri-code-s-fill:before{content:"\\ebaa"}.ri-code-s-line:before{content:"\\ebab"}.ri-code-s-slash-fill:before{content:"\\ebac"}.ri-code-s-slash-line:before{content:"\\ebad"}.ri-code-view:before{content:"\\ebae"}.ri-codepen-fill:before{content:"\\ebaf"}.ri-codepen-line:before{content:"\\ebb0"}.ri-coin-fill:before{content:"\\ebb1"}.ri-coin-line:before{content:"\\ebb2"}.ri-coins-fill:before{content:"\\ebb3"}.ri-coins-line:before{content:"\\ebb4"}.ri-collage-fill:before{content:"\\ebb5"}.ri-collage-line:before{content:"\\ebb6"}.ri-command-fill:before{content:"\\ebb7"}.ri-command-line:before{content:"\\ebb8"}.ri-community-fill:before{content:"\\ebb9"}.ri-community-line:before{content:"\\ebba"}.ri-compass-2-fill:before{content:"\\ebbb"}.ri-compass-2-line:before{content:"\\ebbc"}.ri-compass-3-fill:before{content:"\\ebbd"}.ri-compass-3-line:before{content:"\\ebbe"}.ri-compass-4-fill:before{content:"\\ebbf"}.ri-compass-4-line:before{content:"\\ebc0"}.ri-compass-discover-fill:before{content:"\\ebc1"}.ri-compass-discover-line:before{content:"\\ebc2"}.ri-compass-fill:before{content:"\\ebc3"}.ri-compass-line:before{content:"\\ebc4"}.ri-compasses-2-fill:before{content:"\\ebc5"}.ri-compasses-2-line:before{content:"\\ebc6"}.ri-compasses-fill:before{content:"\\ebc7"}.ri-compasses-line:before{content:"\\ebc8"}.ri-computer-fill:before{content:"\\ebc9"}.ri-computer-line:before{content:"\\ebca"}.ri-contacts-book-2-fill:before{content:"\\ebcb"}.ri-contacts-book-2-line:before{content:"\\ebcc"}.ri-contacts-book-fill:before{content:"\\ebcd"}.ri-contacts-book-line:before{content:"\\ebce"}.ri-contacts-book-upload-fill:before{content:"\\ebcf"}.ri-contacts-book-upload-line:before{content:"\\ebd0"}.ri-contacts-fill:before{content:"\\ebd1"}.ri-contacts-line:before{content:"\\ebd2"}.ri-contrast-2-fill:before{content:"\\ebd3"}.ri-contrast-2-line:before{content:"\\ebd4"}.ri-contrast-drop-2-fill:before{content:"\\ebd5"}.ri-contrast-drop-2-line:before{content:"\\ebd6"}.ri-contrast-drop-fill:before{content:"\\ebd7"}.ri-contrast-drop-line:before{content:"\\ebd8"}.ri-contrast-fill:before{content:"\\ebd9"}.ri-contrast-line:before{content:"\\ebda"}.ri-copper-coin-fill:before{content:"\\ebdb"}.ri-copper-coin-line:before{content:"\\ebdc"}.ri-copper-diamond-fill:before{content:"\\ebdd"}.ri-copper-diamond-line:before{content:"\\ebde"}.ri-copyleft-fill:before{content:"\\ebdf"}.ri-copyleft-line:before{content:"\\ebe0"}.ri-copyright-fill:before{content:"\\ebe1"}.ri-copyright-line:before{content:"\\ebe2"}.ri-coreos-fill:before{content:"\\ebe3"}.ri-coreos-line:before{content:"\\ebe4"}.ri-coupon-2-fill:before{content:"\\ebe5"}.ri-coupon-2-line:before{content:"\\ebe6"}.ri-coupon-3-fill:before{content:"\\ebe7"}.ri-coupon-3-line:before{content:"\\ebe8"}.ri-coupon-4-fill:before{content:"\\ebe9"}.ri-coupon-4-line:before{content:"\\ebea"}.ri-coupon-5-fill:before{content:"\\ebeb"}.ri-coupon-5-line:before{content:"\\ebec"}.ri-coupon-fill:before{content:"\\ebed"}.ri-coupon-line:before{content:"\\ebee"}.ri-cpu-fill:before{content:"\\ebef"}.ri-cpu-line:before{content:"\\ebf0"}.ri-creative-commons-by-fill:before{content:"\\ebf1"}.ri-creative-commons-by-line:before{content:"\\ebf2"}.ri-creative-commons-fill:before{content:"\\ebf3"}.ri-creative-commons-line:before{content:"\\ebf4"}.ri-creative-commons-nc-fill:before{content:"\\ebf5"}.ri-creative-commons-nc-line:before{content:"\\ebf6"}.ri-creative-commons-nd-fill:before{content:"\\ebf7"}.ri-creative-commons-nd-line:before{content:"\\ebf8"}.ri-creative-commons-sa-fill:before{content:"\\ebf9"}.ri-creative-commons-sa-line:before{content:"\\ebfa"}.ri-creative-commons-zero-fill:before{content:"\\ebfb"}.ri-creative-commons-zero-line:before{content:"\\ebfc"}.ri-criminal-fill:before{content:"\\ebfd"}.ri-criminal-line:before{content:"\\ebfe"}.ri-crop-2-fill:before{content:"\\ebff"}.ri-crop-2-line:before{content:"\\ec00"}.ri-crop-fill:before{content:"\\ec01"}.ri-crop-line:before{content:"\\ec02"}.ri-css3-fill:before{content:"\\ec03"}.ri-css3-line:before{content:"\\ec04"}.ri-cup-fill:before{content:"\\ec05"}.ri-cup-line:before{content:"\\ec06"}.ri-currency-fill:before{content:"\\ec07"}.ri-currency-line:before{content:"\\ec08"}.ri-cursor-fill:before{content:"\\ec09"}.ri-cursor-line:before{content:"\\ec0a"}.ri-customer-service-2-fill:before{content:"\\ec0b"}.ri-customer-service-2-line:before{content:"\\ec0c"}.ri-customer-service-fill:before{content:"\\ec0d"}.ri-customer-service-line:before{content:"\\ec0e"}.ri-dashboard-2-fill:before{content:"\\ec0f"}.ri-dashboard-2-line:before{content:"\\ec10"}.ri-dashboard-3-fill:before{content:"\\ec11"}.ri-dashboard-3-line:before{content:"\\ec12"}.ri-dashboard-fill:before{content:"\\ec13"}.ri-dashboard-line:before{content:"\\ec14"}.ri-database-2-fill:before{content:"\\ec15"}.ri-database-2-line:before{content:"\\ec16"}.ri-database-fill:before{content:"\\ec17"}.ri-database-line:before{content:"\\ec18"}.ri-delete-back-2-fill:before{content:"\\ec19"}.ri-delete-back-2-line:before{content:"\\ec1a"}.ri-delete-back-fill:before{content:"\\ec1b"}.ri-delete-back-line:before{content:"\\ec1c"}.ri-delete-bin-2-fill:before{content:"\\ec1d"}.ri-delete-bin-2-line:before{content:"\\ec1e"}.ri-delete-bin-3-fill:before{content:"\\ec1f"}.ri-delete-bin-3-line:before{content:"\\ec20"}.ri-delete-bin-4-fill:before{content:"\\ec21"}.ri-delete-bin-4-line:before{content:"\\ec22"}.ri-delete-bin-5-fill:before{content:"\\ec23"}.ri-delete-bin-5-line:before{content:"\\ec24"}.ri-delete-bin-6-fill:before{content:"\\ec25"}.ri-delete-bin-6-line:before{content:"\\ec26"}.ri-delete-bin-7-fill:before{content:"\\ec27"}.ri-delete-bin-7-line:before{content:"\\ec28"}.ri-delete-bin-fill:before{content:"\\ec29"}.ri-delete-bin-line:before{content:"\\ec2a"}.ri-delete-column:before{content:"\\ec2b"}.ri-delete-row:before{content:"\\ec2c"}.ri-device-fill:before{content:"\\ec2d"}.ri-device-line:before{content:"\\ec2e"}.ri-device-recover-fill:before{content:"\\ec2f"}.ri-device-recover-line:before{content:"\\ec30"}.ri-dingding-fill:before{content:"\\ec31"}.ri-dingding-line:before{content:"\\ec32"}.ri-direction-fill:before{content:"\\ec33"}.ri-direction-line:before{content:"\\ec34"}.ri-disc-fill:before{content:"\\ec35"}.ri-disc-line:before{content:"\\ec36"}.ri-discord-fill:before{content:"\\ec37"}.ri-discord-line:before{content:"\\ec38"}.ri-discuss-fill:before{content:"\\ec39"}.ri-discuss-line:before{content:"\\ec3a"}.ri-dislike-fill:before{content:"\\ec3b"}.ri-dislike-line:before{content:"\\ec3c"}.ri-disqus-fill:before{content:"\\ec3d"}.ri-disqus-line:before{content:"\\ec3e"}.ri-divide-fill:before{content:"\\ec3f"}.ri-divide-line:before{content:"\\ec40"}.ri-donut-chart-fill:before{content:"\\ec41"}.ri-donut-chart-line:before{content:"\\ec42"}.ri-door-closed-fill:before{content:"\\ec43"}.ri-door-closed-line:before{content:"\\ec44"}.ri-door-fill:before{content:"\\ec45"}.ri-door-line:before{content:"\\ec46"}.ri-door-lock-box-fill:before{content:"\\ec47"}.ri-door-lock-box-line:before{content:"\\ec48"}.ri-door-lock-fill:before{content:"\\ec49"}.ri-door-lock-line:before{content:"\\ec4a"}.ri-door-open-fill:before{content:"\\ec4b"}.ri-door-open-line:before{content:"\\ec4c"}.ri-dossier-fill:before{content:"\\ec4d"}.ri-dossier-line:before{content:"\\ec4e"}.ri-douban-fill:before{content:"\\ec4f"}.ri-douban-line:before{content:"\\ec50"}.ri-double-quotes-l:before{content:"\\ec51"}.ri-double-quotes-r:before{content:"\\ec52"}.ri-download-2-fill:before{content:"\\ec53"}.ri-download-2-line:before{content:"\\ec54"}.ri-download-cloud-2-fill:before{content:"\\ec55"}.ri-download-cloud-2-line:before{content:"\\ec56"}.ri-download-cloud-fill:before{content:"\\ec57"}.ri-download-cloud-line:before{content:"\\ec58"}.ri-download-fill:before{content:"\\ec59"}.ri-download-line:before{content:"\\ec5a"}.ri-draft-fill:before{content:"\\ec5b"}.ri-draft-line:before{content:"\\ec5c"}.ri-drag-drop-fill:before{content:"\\ec5d"}.ri-drag-drop-line:before{content:"\\ec5e"}.ri-drag-move-2-fill:before{content:"\\ec5f"}.ri-drag-move-2-line:before{content:"\\ec60"}.ri-drag-move-fill:before{content:"\\ec61"}.ri-drag-move-line:before{content:"\\ec62"}.ri-dribbble-fill:before{content:"\\ec63"}.ri-dribbble-line:before{content:"\\ec64"}.ri-drive-fill:before{content:"\\ec65"}.ri-drive-line:before{content:"\\ec66"}.ri-drizzle-fill:before{content:"\\ec67"}.ri-drizzle-line:before{content:"\\ec68"}.ri-drop-fill:before{content:"\\ec69"}.ri-drop-line:before{content:"\\ec6a"}.ri-dropbox-fill:before{content:"\\ec6b"}.ri-dropbox-line:before{content:"\\ec6c"}.ri-dual-sim-1-fill:before{content:"\\ec6d"}.ri-dual-sim-1-line:before{content:"\\ec6e"}.ri-dual-sim-2-fill:before{content:"\\ec6f"}.ri-dual-sim-2-line:before{content:"\\ec70"}.ri-dv-fill:before{content:"\\ec71"}.ri-dv-line:before{content:"\\ec72"}.ri-dvd-fill:before{content:"\\ec73"}.ri-dvd-line:before{content:"\\ec74"}.ri-e-bike-2-fill:before{content:"\\ec75"}.ri-e-bike-2-line:before{content:"\\ec76"}.ri-e-bike-fill:before{content:"\\ec77"}.ri-e-bike-line:before{content:"\\ec78"}.ri-earth-fill:before{content:"\\ec79"}.ri-earth-line:before{content:"\\ec7a"}.ri-earthquake-fill:before{content:"\\ec7b"}.ri-earthquake-line:before{content:"\\ec7c"}.ri-edge-fill:before{content:"\\ec7d"}.ri-edge-line:before{content:"\\ec7e"}.ri-edit-2-fill:before{content:"\\ec7f"}.ri-edit-2-line:before{content:"\\ec80"}.ri-edit-box-fill:before{content:"\\ec81"}.ri-edit-box-line:before{content:"\\ec82"}.ri-edit-circle-fill:before{content:"\\ec83"}.ri-edit-circle-line:before{content:"\\ec84"}.ri-edit-fill:before{content:"\\ec85"}.ri-edit-line:before{content:"\\ec86"}.ri-eject-fill:before{content:"\\ec87"}.ri-eject-line:before{content:"\\ec88"}.ri-emotion-2-fill:before{content:"\\ec89"}.ri-emotion-2-line:before{content:"\\ec8a"}.ri-emotion-fill:before{content:"\\ec8b"}.ri-emotion-happy-fill:before{content:"\\ec8c"}.ri-emotion-happy-line:before{content:"\\ec8d"}.ri-emotion-laugh-fill:before{content:"\\ec8e"}.ri-emotion-laugh-line:before{content:"\\ec8f"}.ri-emotion-line:before{content:"\\ec90"}.ri-emotion-normal-fill:before{content:"\\ec91"}.ri-emotion-normal-line:before{content:"\\ec92"}.ri-emotion-sad-fill:before{content:"\\ec93"}.ri-emotion-sad-line:before{content:"\\ec94"}.ri-emotion-unhappy-fill:before{content:"\\ec95"}.ri-emotion-unhappy-line:before{content:"\\ec96"}.ri-empathize-fill:before{content:"\\ec97"}.ri-empathize-line:before{content:"\\ec98"}.ri-emphasis-cn:before{content:"\\ec99"}.ri-emphasis:before{content:"\\ec9a"}.ri-english-input:before{content:"\\ec9b"}.ri-equalizer-fill:before{content:"\\ec9c"}.ri-equalizer-line:before{content:"\\ec9d"}.ri-eraser-fill:before{content:"\\ec9e"}.ri-eraser-line:before{content:"\\ec9f"}.ri-error-warning-fill:before{content:"\\eca0"}.ri-error-warning-line:before{content:"\\eca1"}.ri-evernote-fill:before{content:"\\eca2"}.ri-evernote-line:before{content:"\\eca3"}.ri-exchange-box-fill:before{content:"\\eca4"}.ri-exchange-box-line:before{content:"\\eca5"}.ri-exchange-cny-fill:before{content:"\\eca6"}.ri-exchange-cny-line:before{content:"\\eca7"}.ri-exchange-dollar-fill:before{content:"\\eca8"}.ri-exchange-dollar-line:before{content:"\\eca9"}.ri-exchange-fill:before{content:"\\ecaa"}.ri-exchange-funds-fill:before{content:"\\ecab"}.ri-exchange-funds-line:before{content:"\\ecac"}.ri-exchange-line:before{content:"\\ecad"}.ri-external-link-fill:before{content:"\\ecae"}.ri-external-link-line:before{content:"\\ecaf"}.ri-eye-2-fill:before{content:"\\ecb0"}.ri-eye-2-line:before{content:"\\ecb1"}.ri-eye-close-fill:before{content:"\\ecb2"}.ri-eye-close-line:before{content:"\\ecb3"}.ri-eye-fill:before{content:"\\ecb4"}.ri-eye-line:before{content:"\\ecb5"}.ri-eye-off-fill:before{content:"\\ecb6"}.ri-eye-off-line:before{content:"\\ecb7"}.ri-facebook-box-fill:before{content:"\\ecb8"}.ri-facebook-box-line:before{content:"\\ecb9"}.ri-facebook-circle-fill:before{content:"\\ecba"}.ri-facebook-circle-line:before{content:"\\ecbb"}.ri-facebook-fill:before{content:"\\ecbc"}.ri-facebook-line:before{content:"\\ecbd"}.ri-fahrenheit-fill:before{content:"\\ecbe"}.ri-fahrenheit-line:before{content:"\\ecbf"}.ri-feedback-fill:before{content:"\\ecc0"}.ri-feedback-line:before{content:"\\ecc1"}.ri-file-2-fill:before{content:"\\ecc2"}.ri-file-2-line:before{content:"\\ecc3"}.ri-file-3-fill:before{content:"\\ecc4"}.ri-file-3-line:before{content:"\\ecc5"}.ri-file-4-fill:before{content:"\\ecc6"}.ri-file-4-line:before{content:"\\ecc7"}.ri-file-add-fill:before{content:"\\ecc8"}.ri-file-add-line:before{content:"\\ecc9"}.ri-file-chart-2-fill:before{content:"\\ecca"}.ri-file-chart-2-line:before{content:"\\eccb"}.ri-file-chart-fill:before{content:"\\eccc"}.ri-file-chart-line:before{content:"\\eccd"}.ri-file-cloud-fill:before{content:"\\ecce"}.ri-file-cloud-line:before{content:"\\eccf"}.ri-file-code-fill:before{content:"\\ecd0"}.ri-file-code-line:before{content:"\\ecd1"}.ri-file-copy-2-fill:before{content:"\\ecd2"}.ri-file-copy-2-line:before{content:"\\ecd3"}.ri-file-copy-fill:before{content:"\\ecd4"}.ri-file-copy-line:before{content:"\\ecd5"}.ri-file-damage-fill:before{content:"\\ecd6"}.ri-file-damage-line:before{content:"\\ecd7"}.ri-file-download-fill:before{content:"\\ecd8"}.ri-file-download-line:before{content:"\\ecd9"}.ri-file-edit-fill:before{content:"\\ecda"}.ri-file-edit-line:before{content:"\\ecdb"}.ri-file-excel-2-fill:before{content:"\\ecdc"}.ri-file-excel-2-line:before{content:"\\ecdd"}.ri-file-excel-fill:before{content:"\\ecde"}.ri-file-excel-line:before{content:"\\ecdf"}.ri-file-fill:before{content:"\\ece0"}.ri-file-forbid-fill:before{content:"\\ece1"}.ri-file-forbid-line:before{content:"\\ece2"}.ri-file-gif-fill:before{content:"\\ece3"}.ri-file-gif-line:before{content:"\\ece4"}.ri-file-history-fill:before{content:"\\ece5"}.ri-file-history-line:before{content:"\\ece6"}.ri-file-hwp-fill:before{content:"\\ece7"}.ri-file-hwp-line:before{content:"\\ece8"}.ri-file-info-fill:before{content:"\\ece9"}.ri-file-info-line:before{content:"\\ecea"}.ri-file-line:before{content:"\\eceb"}.ri-file-list-2-fill:before{content:"\\ecec"}.ri-file-list-2-line:before{content:"\\eced"}.ri-file-list-3-fill:before{content:"\\ecee"}.ri-file-list-3-line:before{content:"\\ecef"}.ri-file-list-fill:before{content:"\\ecf0"}.ri-file-list-line:before{content:"\\ecf1"}.ri-file-lock-fill:before{content:"\\ecf2"}.ri-file-lock-line:before{content:"\\ecf3"}.ri-file-marked-fill:before{content:"\\ecf4"}.ri-file-marked-line:before{content:"\\ecf5"}.ri-file-music-fill:before{content:"\\ecf6"}.ri-file-music-line:before{content:"\\ecf7"}.ri-file-paper-2-fill:before{content:"\\ecf8"}.ri-file-paper-2-line:before{content:"\\ecf9"}.ri-file-paper-fill:before{content:"\\ecfa"}.ri-file-paper-line:before{content:"\\ecfb"}.ri-file-pdf-fill:before{content:"\\ecfc"}.ri-file-pdf-line:before{content:"\\ecfd"}.ri-file-ppt-2-fill:before{content:"\\ecfe"}.ri-file-ppt-2-line:before{content:"\\ecff"}.ri-file-ppt-fill:before{content:"\\ed00"}.ri-file-ppt-line:before{content:"\\ed01"}.ri-file-reduce-fill:before{content:"\\ed02"}.ri-file-reduce-line:before{content:"\\ed03"}.ri-file-search-fill:before{content:"\\ed04"}.ri-file-search-line:before{content:"\\ed05"}.ri-file-settings-fill:before{content:"\\ed06"}.ri-file-settings-line:before{content:"\\ed07"}.ri-file-shield-2-fill:before{content:"\\ed08"}.ri-file-shield-2-line:before{content:"\\ed09"}.ri-file-shield-fill:before{content:"\\ed0a"}.ri-file-shield-line:before{content:"\\ed0b"}.ri-file-shred-fill:before{content:"\\ed0c"}.ri-file-shred-line:before{content:"\\ed0d"}.ri-file-text-fill:before{content:"\\ed0e"}.ri-file-text-line:before{content:"\\ed0f"}.ri-file-transfer-fill:before{content:"\\ed10"}.ri-file-transfer-line:before{content:"\\ed11"}.ri-file-unknow-fill:before{content:"\\ed12"}.ri-file-unknow-line:before{content:"\\ed13"}.ri-file-upload-fill:before{content:"\\ed14"}.ri-file-upload-line:before{content:"\\ed15"}.ri-file-user-fill:before{content:"\\ed16"}.ri-file-user-line:before{content:"\\ed17"}.ri-file-warning-fill:before{content:"\\ed18"}.ri-file-warning-line:before{content:"\\ed19"}.ri-file-word-2-fill:before{content:"\\ed1a"}.ri-file-word-2-line:before{content:"\\ed1b"}.ri-file-word-fill:before{content:"\\ed1c"}.ri-file-word-line:before{content:"\\ed1d"}.ri-file-zip-fill:before{content:"\\ed1e"}.ri-file-zip-line:before{content:"\\ed1f"}.ri-film-fill:before{content:"\\ed20"}.ri-film-line:before{content:"\\ed21"}.ri-filter-2-fill:before{content:"\\ed22"}.ri-filter-2-line:before{content:"\\ed23"}.ri-filter-3-fill:before{content:"\\ed24"}.ri-filter-3-line:before{content:"\\ed25"}.ri-filter-fill:before{content:"\\ed26"}.ri-filter-line:before{content:"\\ed27"}.ri-filter-off-fill:before{content:"\\ed28"}.ri-filter-off-line:before{content:"\\ed29"}.ri-find-replace-fill:before{content:"\\ed2a"}.ri-find-replace-line:before{content:"\\ed2b"}.ri-finder-fill:before{content:"\\ed2c"}.ri-finder-line:before{content:"\\ed2d"}.ri-fingerprint-2-fill:before{content:"\\ed2e"}.ri-fingerprint-2-line:before{content:"\\ed2f"}.ri-fingerprint-fill:before{content:"\\ed30"}.ri-fingerprint-line:before{content:"\\ed31"}.ri-fire-fill:before{content:"\\ed32"}.ri-fire-line:before{content:"\\ed33"}.ri-firefox-fill:before{content:"\\ed34"}.ri-firefox-line:before{content:"\\ed35"}.ri-first-aid-kit-fill:before{content:"\\ed36"}.ri-first-aid-kit-line:before{content:"\\ed37"}.ri-flag-2-fill:before{content:"\\ed38"}.ri-flag-2-line:before{content:"\\ed39"}.ri-flag-fill:before{content:"\\ed3a"}.ri-flag-line:before{content:"\\ed3b"}.ri-flashlight-fill:before{content:"\\ed3c"}.ri-flashlight-line:before{content:"\\ed3d"}.ri-flask-fill:before{content:"\\ed3e"}.ri-flask-line:before{content:"\\ed3f"}.ri-flight-land-fill:before{content:"\\ed40"}.ri-flight-land-line:before{content:"\\ed41"}.ri-flight-takeoff-fill:before{content:"\\ed42"}.ri-flight-takeoff-line:before{content:"\\ed43"}.ri-flood-fill:before{content:"\\ed44"}.ri-flood-line:before{content:"\\ed45"}.ri-flow-chart:before{content:"\\ed46"}.ri-flutter-fill:before{content:"\\ed47"}.ri-flutter-line:before{content:"\\ed48"}.ri-focus-2-fill:before{content:"\\ed49"}.ri-focus-2-line:before{content:"\\ed4a"}.ri-focus-3-fill:before{content:"\\ed4b"}.ri-focus-3-line:before{content:"\\ed4c"}.ri-focus-fill:before{content:"\\ed4d"}.ri-focus-line:before{content:"\\ed4e"}.ri-foggy-fill:before{content:"\\ed4f"}.ri-foggy-line:before{content:"\\ed50"}.ri-folder-2-fill:before{content:"\\ed51"}.ri-folder-2-line:before{content:"\\ed52"}.ri-folder-3-fill:before{content:"\\ed53"}.ri-folder-3-line:before{content:"\\ed54"}.ri-folder-4-fill:before{content:"\\ed55"}.ri-folder-4-line:before{content:"\\ed56"}.ri-folder-5-fill:before{content:"\\ed57"}.ri-folder-5-line:before{content:"\\ed58"}.ri-folder-add-fill:before{content:"\\ed59"}.ri-folder-add-line:before{content:"\\ed5a"}.ri-folder-chart-2-fill:before{content:"\\ed5b"}.ri-folder-chart-2-line:before{content:"\\ed5c"}.ri-folder-chart-fill:before{content:"\\ed5d"}.ri-folder-chart-line:before{content:"\\ed5e"}.ri-folder-download-fill:before{content:"\\ed5f"}.ri-folder-download-line:before{content:"\\ed60"}.ri-folder-fill:before{content:"\\ed61"}.ri-folder-forbid-fill:before{content:"\\ed62"}.ri-folder-forbid-line:before{content:"\\ed63"}.ri-folder-history-fill:before{content:"\\ed64"}.ri-folder-history-line:before{content:"\\ed65"}.ri-folder-info-fill:before{content:"\\ed66"}.ri-folder-info-line:before{content:"\\ed67"}.ri-folder-keyhole-fill:before{content:"\\ed68"}.ri-folder-keyhole-line:before{content:"\\ed69"}.ri-folder-line:before{content:"\\ed6a"}.ri-folder-lock-fill:before{content:"\\ed6b"}.ri-folder-lock-line:before{content:"\\ed6c"}.ri-folder-music-fill:before{content:"\\ed6d"}.ri-folder-music-line:before{content:"\\ed6e"}.ri-folder-open-fill:before{content:"\\ed6f"}.ri-folder-open-line:before{content:"\\ed70"}.ri-folder-received-fill:before{content:"\\ed71"}.ri-folder-received-line:before{content:"\\ed72"}.ri-folder-reduce-fill:before{content:"\\ed73"}.ri-folder-reduce-line:before{content:"\\ed74"}.ri-folder-settings-fill:before{content:"\\ed75"}.ri-folder-settings-line:before{content:"\\ed76"}.ri-folder-shared-fill:before{content:"\\ed77"}.ri-folder-shared-line:before{content:"\\ed78"}.ri-folder-shield-2-fill:before{content:"\\ed79"}.ri-folder-shield-2-line:before{content:"\\ed7a"}.ri-folder-shield-fill:before{content:"\\ed7b"}.ri-folder-shield-line:before{content:"\\ed7c"}.ri-folder-transfer-fill:before{content:"\\ed7d"}.ri-folder-transfer-line:before{content:"\\ed7e"}.ri-folder-unknow-fill:before{content:"\\ed7f"}.ri-folder-unknow-line:before{content:"\\ed80"}.ri-folder-upload-fill:before{content:"\\ed81"}.ri-folder-upload-line:before{content:"\\ed82"}.ri-folder-user-fill:before{content:"\\ed83"}.ri-folder-user-line:before{content:"\\ed84"}.ri-folder-warning-fill:before{content:"\\ed85"}.ri-folder-warning-line:before{content:"\\ed86"}.ri-folder-zip-fill:before{content:"\\ed87"}.ri-folder-zip-line:before{content:"\\ed88"}.ri-folders-fill:before{content:"\\ed89"}.ri-folders-line:before{content:"\\ed8a"}.ri-font-color:before{content:"\\ed8b"}.ri-font-size-2:before{content:"\\ed8c"}.ri-font-size:before{content:"\\ed8d"}.ri-football-fill:before{content:"\\ed8e"}.ri-football-line:before{content:"\\ed8f"}.ri-footprint-fill:before{content:"\\ed90"}.ri-footprint-line:before{content:"\\ed91"}.ri-forbid-2-fill:before{content:"\\ed92"}.ri-forbid-2-line:before{content:"\\ed93"}.ri-forbid-fill:before{content:"\\ed94"}.ri-forbid-line:before{content:"\\ed95"}.ri-format-clear:before{content:"\\ed96"}.ri-fridge-fill:before{content:"\\ed97"}.ri-fridge-line:before{content:"\\ed98"}.ri-fullscreen-exit-fill:before{content:"\\ed99"}.ri-fullscreen-exit-line:before{content:"\\ed9a"}.ri-fullscreen-fill:before{content:"\\ed9b"}.ri-fullscreen-line:before{content:"\\ed9c"}.ri-function-fill:before{content:"\\ed9d"}.ri-function-line:before{content:"\\ed9e"}.ri-functions:before{content:"\\ed9f"}.ri-funds-box-fill:before{content:"\\eda0"}.ri-funds-box-line:before{content:"\\eda1"}.ri-funds-fill:before{content:"\\eda2"}.ri-funds-line:before{content:"\\eda3"}.ri-gallery-fill:before{content:"\\eda4"}.ri-gallery-line:before{content:"\\eda5"}.ri-gallery-upload-fill:before{content:"\\eda6"}.ri-gallery-upload-line:before{content:"\\eda7"}.ri-game-fill:before{content:"\\eda8"}.ri-game-line:before{content:"\\eda9"}.ri-gamepad-fill:before{content:"\\edaa"}.ri-gamepad-line:before{content:"\\edab"}.ri-gas-station-fill:before{content:"\\edac"}.ri-gas-station-line:before{content:"\\edad"}.ri-gatsby-fill:before{content:"\\edae"}.ri-gatsby-line:before{content:"\\edaf"}.ri-genderless-fill:before{content:"\\edb0"}.ri-genderless-line:before{content:"\\edb1"}.ri-ghost-2-fill:before{content:"\\edb2"}.ri-ghost-2-line:before{content:"\\edb3"}.ri-ghost-fill:before{content:"\\edb4"}.ri-ghost-line:before{content:"\\edb5"}.ri-ghost-smile-fill:before{content:"\\edb6"}.ri-ghost-smile-line:before{content:"\\edb7"}.ri-gift-2-fill:before{content:"\\edb8"}.ri-gift-2-line:before{content:"\\edb9"}.ri-gift-fill:before{content:"\\edba"}.ri-gift-line:before{content:"\\edbb"}.ri-git-branch-fill:before{content:"\\edbc"}.ri-git-branch-line:before{content:"\\edbd"}.ri-git-commit-fill:before{content:"\\edbe"}.ri-git-commit-line:before{content:"\\edbf"}.ri-git-merge-fill:before{content:"\\edc0"}.ri-git-merge-line:before{content:"\\edc1"}.ri-git-pull-request-fill:before{content:"\\edc2"}.ri-git-pull-request-line:before{content:"\\edc3"}.ri-git-repository-commits-fill:before{content:"\\edc4"}.ri-git-repository-commits-line:before{content:"\\edc5"}.ri-git-repository-fill:before{content:"\\edc6"}.ri-git-repository-line:before{content:"\\edc7"}.ri-git-repository-private-fill:before{content:"\\edc8"}.ri-git-repository-private-line:before{content:"\\edc9"}.ri-github-fill:before{content:"\\edca"}.ri-github-line:before{content:"\\edcb"}.ri-gitlab-fill:before{content:"\\edcc"}.ri-gitlab-line:before{content:"\\edcd"}.ri-global-fill:before{content:"\\edce"}.ri-global-line:before{content:"\\edcf"}.ri-globe-fill:before{content:"\\edd0"}.ri-globe-line:before{content:"\\edd1"}.ri-goblet-fill:before{content:"\\edd2"}.ri-goblet-line:before{content:"\\edd3"}.ri-google-fill:before{content:"\\edd4"}.ri-google-line:before{content:"\\edd5"}.ri-google-play-fill:before{content:"\\edd6"}.ri-google-play-line:before{content:"\\edd7"}.ri-government-fill:before{content:"\\edd8"}.ri-government-line:before{content:"\\edd9"}.ri-gps-fill:before{content:"\\edda"}.ri-gps-line:before{content:"\\eddb"}.ri-gradienter-fill:before{content:"\\eddc"}.ri-gradienter-line:before{content:"\\eddd"}.ri-grid-fill:before{content:"\\edde"}.ri-grid-line:before{content:"\\eddf"}.ri-group-2-fill:before{content:"\\ede0"}.ri-group-2-line:before{content:"\\ede1"}.ri-group-fill:before{content:"\\ede2"}.ri-group-line:before{content:"\\ede3"}.ri-guide-fill:before{content:"\\ede4"}.ri-guide-line:before{content:"\\ede5"}.ri-h-1:before{content:"\\ede6"}.ri-h-2:before{content:"\\ede7"}.ri-h-3:before{content:"\\ede8"}.ri-h-4:before{content:"\\ede9"}.ri-h-5:before{content:"\\edea"}.ri-h-6:before{content:"\\edeb"}.ri-hail-fill:before{content:"\\edec"}.ri-hail-line:before{content:"\\eded"}.ri-hammer-fill:before{content:"\\edee"}.ri-hammer-line:before{content:"\\edef"}.ri-hand-coin-fill:before{content:"\\edf0"}.ri-hand-coin-line:before{content:"\\edf1"}.ri-hand-heart-fill:before{content:"\\edf2"}.ri-hand-heart-line:before{content:"\\edf3"}.ri-hand-sanitizer-fill:before{content:"\\edf4"}.ri-hand-sanitizer-line:before{content:"\\edf5"}.ri-handbag-fill:before{content:"\\edf6"}.ri-handbag-line:before{content:"\\edf7"}.ri-hard-drive-2-fill:before{content:"\\edf8"}.ri-hard-drive-2-line:before{content:"\\edf9"}.ri-hard-drive-fill:before{content:"\\edfa"}.ri-hard-drive-line:before{content:"\\edfb"}.ri-hashtag:before{content:"\\edfc"}.ri-haze-2-fill:before{content:"\\edfd"}.ri-haze-2-line:before{content:"\\edfe"}.ri-haze-fill:before{content:"\\edff"}.ri-haze-line:before{content:"\\ee00"}.ri-hd-fill:before{content:"\\ee01"}.ri-hd-line:before{content:"\\ee02"}.ri-heading:before{content:"\\ee03"}.ri-headphone-fill:before{content:"\\ee04"}.ri-headphone-line:before{content:"\\ee05"}.ri-health-book-fill:before{content:"\\ee06"}.ri-health-book-line:before{content:"\\ee07"}.ri-heart-2-fill:before{content:"\\ee08"}.ri-heart-2-line:before{content:"\\ee09"}.ri-heart-3-fill:before{content:"\\ee0a"}.ri-heart-3-line:before{content:"\\ee0b"}.ri-heart-add-fill:before{content:"\\ee0c"}.ri-heart-add-line:before{content:"\\ee0d"}.ri-heart-fill:before{content:"\\ee0e"}.ri-heart-line:before{content:"\\ee0f"}.ri-heart-pulse-fill:before{content:"\\ee10"}.ri-heart-pulse-line:before{content:"\\ee11"}.ri-hearts-fill:before{content:"\\ee12"}.ri-hearts-line:before{content:"\\ee13"}.ri-heavy-showers-fill:before{content:"\\ee14"}.ri-heavy-showers-line:before{content:"\\ee15"}.ri-history-fill:before{content:"\\ee16"}.ri-history-line:before{content:"\\ee17"}.ri-home-2-fill:before{content:"\\ee18"}.ri-home-2-line:before{content:"\\ee19"}.ri-home-3-fill:before{content:"\\ee1a"}.ri-home-3-line:before{content:"\\ee1b"}.ri-home-4-fill:before{content:"\\ee1c"}.ri-home-4-line:before{content:"\\ee1d"}.ri-home-5-fill:before{content:"\\ee1e"}.ri-home-5-line:before{content:"\\ee1f"}.ri-home-6-fill:before{content:"\\ee20"}.ri-home-6-line:before{content:"\\ee21"}.ri-home-7-fill:before{content:"\\ee22"}.ri-home-7-line:before{content:"\\ee23"}.ri-home-8-fill:before{content:"\\ee24"}.ri-home-8-line:before{content:"\\ee25"}.ri-home-fill:before{content:"\\ee26"}.ri-home-gear-fill:before{content:"\\ee27"}.ri-home-gear-line:before{content:"\\ee28"}.ri-home-heart-fill:before{content:"\\ee29"}.ri-home-heart-line:before{content:"\\ee2a"}.ri-home-line:before{content:"\\ee2b"}.ri-home-smile-2-fill:before{content:"\\ee2c"}.ri-home-smile-2-line:before{content:"\\ee2d"}.ri-home-smile-fill:before{content:"\\ee2e"}.ri-home-smile-line:before{content:"\\ee2f"}.ri-home-wifi-fill:before{content:"\\ee30"}.ri-home-wifi-line:before{content:"\\ee31"}.ri-honor-of-kings-fill:before{content:"\\ee32"}.ri-honor-of-kings-line:before{content:"\\ee33"}.ri-honour-fill:before{content:"\\ee34"}.ri-honour-line:before{content:"\\ee35"}.ri-hospital-fill:before{content:"\\ee36"}.ri-hospital-line:before{content:"\\ee37"}.ri-hotel-bed-fill:before{content:"\\ee38"}.ri-hotel-bed-line:before{content:"\\ee39"}.ri-hotel-fill:before{content:"\\ee3a"}.ri-hotel-line:before{content:"\\ee3b"}.ri-hotspot-fill:before{content:"\\ee3c"}.ri-hotspot-line:before{content:"\\ee3d"}.ri-hq-fill:before{content:"\\ee3e"}.ri-hq-line:before{content:"\\ee3f"}.ri-html5-fill:before{content:"\\ee40"}.ri-html5-line:before{content:"\\ee41"}.ri-ie-fill:before{content:"\\ee42"}.ri-ie-line:before{content:"\\ee43"}.ri-image-2-fill:before{content:"\\ee44"}.ri-image-2-line:before{content:"\\ee45"}.ri-image-add-fill:before{content:"\\ee46"}.ri-image-add-line:before{content:"\\ee47"}.ri-image-edit-fill:before{content:"\\ee48"}.ri-image-edit-line:before{content:"\\ee49"}.ri-image-fill:before{content:"\\ee4a"}.ri-image-line:before{content:"\\ee4b"}.ri-inbox-archive-fill:before{content:"\\ee4c"}.ri-inbox-archive-line:before{content:"\\ee4d"}.ri-inbox-fill:before{content:"\\ee4e"}.ri-inbox-line:before{content:"\\ee4f"}.ri-inbox-unarchive-fill:before{content:"\\ee50"}.ri-inbox-unarchive-line:before{content:"\\ee51"}.ri-increase-decrease-fill:before{content:"\\ee52"}.ri-increase-decrease-line:before{content:"\\ee53"}.ri-indent-decrease:before{content:"\\ee54"}.ri-indent-increase:before{content:"\\ee55"}.ri-indeterminate-circle-fill:before{content:"\\ee56"}.ri-indeterminate-circle-line:before{content:"\\ee57"}.ri-information-fill:before{content:"\\ee58"}.ri-information-line:before{content:"\\ee59"}.ri-infrared-thermometer-fill:before{content:"\\ee5a"}.ri-infrared-thermometer-line:before{content:"\\ee5b"}.ri-ink-bottle-fill:before{content:"\\ee5c"}.ri-ink-bottle-line:before{content:"\\ee5d"}.ri-input-cursor-move:before{content:"\\ee5e"}.ri-input-method-fill:before{content:"\\ee5f"}.ri-input-method-line:before{content:"\\ee60"}.ri-insert-column-left:before{content:"\\ee61"}.ri-insert-column-right:before{content:"\\ee62"}.ri-insert-row-bottom:before{content:"\\ee63"}.ri-insert-row-top:before{content:"\\ee64"}.ri-instagram-fill:before{content:"\\ee65"}.ri-instagram-line:before{content:"\\ee66"}.ri-install-fill:before{content:"\\ee67"}.ri-install-line:before{content:"\\ee68"}.ri-invision-fill:before{content:"\\ee69"}.ri-invision-line:before{content:"\\ee6a"}.ri-italic:before{content:"\\ee6b"}.ri-kakao-talk-fill:before{content:"\\ee6c"}.ri-kakao-talk-line:before{content:"\\ee6d"}.ri-key-2-fill:before{content:"\\ee6e"}.ri-key-2-line:before{content:"\\ee6f"}.ri-key-fill:before{content:"\\ee70"}.ri-key-line:before{content:"\\ee71"}.ri-keyboard-box-fill:before{content:"\\ee72"}.ri-keyboard-box-line:before{content:"\\ee73"}.ri-keyboard-fill:before{content:"\\ee74"}.ri-keyboard-line:before{content:"\\ee75"}.ri-keynote-fill:before{content:"\\ee76"}.ri-keynote-line:before{content:"\\ee77"}.ri-knife-blood-fill:before{content:"\\ee78"}.ri-knife-blood-line:before{content:"\\ee79"}.ri-knife-fill:before{content:"\\ee7a"}.ri-knife-line:before{content:"\\ee7b"}.ri-landscape-fill:before{content:"\\ee7c"}.ri-landscape-line:before{content:"\\ee7d"}.ri-layout-2-fill:before{content:"\\ee7e"}.ri-layout-2-line:before{content:"\\ee7f"}.ri-layout-3-fill:before{content:"\\ee80"}.ri-layout-3-line:before{content:"\\ee81"}.ri-layout-4-fill:before{content:"\\ee82"}.ri-layout-4-line:before{content:"\\ee83"}.ri-layout-5-fill:before{content:"\\ee84"}.ri-layout-5-line:before{content:"\\ee85"}.ri-layout-6-fill:before{content:"\\ee86"}.ri-layout-6-line:before{content:"\\ee87"}.ri-layout-bottom-2-fill:before{content:"\\ee88"}.ri-layout-bottom-2-line:before{content:"\\ee89"}.ri-layout-bottom-fill:before{content:"\\ee8a"}.ri-layout-bottom-line:before{content:"\\ee8b"}.ri-layout-column-fill:before{content:"\\ee8c"}.ri-layout-column-line:before{content:"\\ee8d"}.ri-layout-fill:before{content:"\\ee8e"}.ri-layout-grid-fill:before{content:"\\ee8f"}.ri-layout-grid-line:before{content:"\\ee90"}.ri-layout-left-2-fill:before{content:"\\ee91"}.ri-layout-left-2-line:before{content:"\\ee92"}.ri-layout-left-fill:before{content:"\\ee93"}.ri-layout-left-line:before{content:"\\ee94"}.ri-layout-line:before{content:"\\ee95"}.ri-layout-masonry-fill:before{content:"\\ee96"}.ri-layout-masonry-line:before{content:"\\ee97"}.ri-layout-right-2-fill:before{content:"\\ee98"}.ri-layout-right-2-line:before{content:"\\ee99"}.ri-layout-right-fill:before{content:"\\ee9a"}.ri-layout-right-line:before{content:"\\ee9b"}.ri-layout-row-fill:before{content:"\\ee9c"}.ri-layout-row-line:before{content:"\\ee9d"}.ri-layout-top-2-fill:before{content:"\\ee9e"}.ri-layout-top-2-line:before{content:"\\ee9f"}.ri-layout-top-fill:before{content:"\\eea0"}.ri-layout-top-line:before{content:"\\eea1"}.ri-leaf-fill:before{content:"\\eea2"}.ri-leaf-line:before{content:"\\eea3"}.ri-lifebuoy-fill:before{content:"\\eea4"}.ri-lifebuoy-line:before{content:"\\eea5"}.ri-lightbulb-fill:before{content:"\\eea6"}.ri-lightbulb-flash-fill:before{content:"\\eea7"}.ri-lightbulb-flash-line:before{content:"\\eea8"}.ri-lightbulb-line:before{content:"\\eea9"}.ri-line-chart-fill:before{content:"\\eeaa"}.ri-line-chart-line:before{content:"\\eeab"}.ri-line-fill:before{content:"\\eeac"}.ri-line-height:before{content:"\\eead"}.ri-line-line:before{content:"\\eeae"}.ri-link-m:before{content:"\\eeaf"}.ri-link-unlink-m:before{content:"\\eeb0"}.ri-link-unlink:before{content:"\\eeb1"}.ri-link:before{content:"\\eeb2"}.ri-linkedin-box-fill:before{content:"\\eeb3"}.ri-linkedin-box-line:before{content:"\\eeb4"}.ri-linkedin-fill:before{content:"\\eeb5"}.ri-linkedin-line:before{content:"\\eeb6"}.ri-links-fill:before{content:"\\eeb7"}.ri-links-line:before{content:"\\eeb8"}.ri-list-check-2:before{content:"\\eeb9"}.ri-list-check:before{content:"\\eeba"}.ri-list-ordered:before{content:"\\eebb"}.ri-list-settings-fill:before{content:"\\eebc"}.ri-list-settings-line:before{content:"\\eebd"}.ri-list-unordered:before{content:"\\eebe"}.ri-live-fill:before{content:"\\eebf"}.ri-live-line:before{content:"\\eec0"}.ri-loader-2-fill:before{content:"\\eec1"}.ri-loader-2-line:before{content:"\\eec2"}.ri-loader-3-fill:before{content:"\\eec3"}.ri-loader-3-line:before{content:"\\eec4"}.ri-loader-4-fill:before{content:"\\eec5"}.ri-loader-4-line:before{content:"\\eec6"}.ri-loader-5-fill:before{content:"\\eec7"}.ri-loader-5-line:before{content:"\\eec8"}.ri-loader-fill:before{content:"\\eec9"}.ri-loader-line:before{content:"\\eeca"}.ri-lock-2-fill:before{content:"\\eecb"}.ri-lock-2-line:before{content:"\\eecc"}.ri-lock-fill:before{content:"\\eecd"}.ri-lock-line:before{content:"\\eece"}.ri-lock-password-fill:before{content:"\\eecf"}.ri-lock-password-line:before{content:"\\eed0"}.ri-lock-unlock-fill:before{content:"\\eed1"}.ri-lock-unlock-line:before{content:"\\eed2"}.ri-login-box-fill:before{content:"\\eed3"}.ri-login-box-line:before{content:"\\eed4"}.ri-login-circle-fill:before{content:"\\eed5"}.ri-login-circle-line:before{content:"\\eed6"}.ri-logout-box-fill:before{content:"\\eed7"}.ri-logout-box-line:before{content:"\\eed8"}.ri-logout-box-r-fill:before{content:"\\eed9"}.ri-logout-box-r-line:before{content:"\\eeda"}.ri-logout-circle-fill:before{content:"\\eedb"}.ri-logout-circle-line:before{content:"\\eedc"}.ri-logout-circle-r-fill:before{content:"\\eedd"}.ri-logout-circle-r-line:before{content:"\\eede"}.ri-luggage-cart-fill:before{content:"\\eedf"}.ri-luggage-cart-line:before{content:"\\eee0"}.ri-luggage-deposit-fill:before{content:"\\eee1"}.ri-luggage-deposit-line:before{content:"\\eee2"}.ri-lungs-fill:before{content:"\\eee3"}.ri-lungs-line:before{content:"\\eee4"}.ri-mac-fill:before{content:"\\eee5"}.ri-mac-line:before{content:"\\eee6"}.ri-macbook-fill:before{content:"\\eee7"}.ri-macbook-line:before{content:"\\eee8"}.ri-magic-fill:before{content:"\\eee9"}.ri-magic-line:before{content:"\\eeea"}.ri-mail-add-fill:before{content:"\\eeeb"}.ri-mail-add-line:before{content:"\\eeec"}.ri-mail-check-fill:before{content:"\\eeed"}.ri-mail-check-line:before{content:"\\eeee"}.ri-mail-close-fill:before{content:"\\eeef"}.ri-mail-close-line:before{content:"\\eef0"}.ri-mail-download-fill:before{content:"\\eef1"}.ri-mail-download-line:before{content:"\\eef2"}.ri-mail-fill:before{content:"\\eef3"}.ri-mail-forbid-fill:before{content:"\\eef4"}.ri-mail-forbid-line:before{content:"\\eef5"}.ri-mail-line:before{content:"\\eef6"}.ri-mail-lock-fill:before{content:"\\eef7"}.ri-mail-lock-line:before{content:"\\eef8"}.ri-mail-open-fill:before{content:"\\eef9"}.ri-mail-open-line:before{content:"\\eefa"}.ri-mail-send-fill:before{content:"\\eefb"}.ri-mail-send-line:before{content:"\\eefc"}.ri-mail-settings-fill:before{content:"\\eefd"}.ri-mail-settings-line:before{content:"\\eefe"}.ri-mail-star-fill:before{content:"\\eeff"}.ri-mail-star-line:before{content:"\\ef00"}.ri-mail-unread-fill:before{content:"\\ef01"}.ri-mail-unread-line:before{content:"\\ef02"}.ri-mail-volume-fill:before{content:"\\ef03"}.ri-mail-volume-line:before{content:"\\ef04"}.ri-map-2-fill:before{content:"\\ef05"}.ri-map-2-line:before{content:"\\ef06"}.ri-map-fill:before{content:"\\ef07"}.ri-map-line:before{content:"\\ef08"}.ri-map-pin-2-fill:before{content:"\\ef09"}.ri-map-pin-2-line:before{content:"\\ef0a"}.ri-map-pin-3-fill:before{content:"\\ef0b"}.ri-map-pin-3-line:before{content:"\\ef0c"}.ri-map-pin-4-fill:before{content:"\\ef0d"}.ri-map-pin-4-line:before{content:"\\ef0e"}.ri-map-pin-5-fill:before{content:"\\ef0f"}.ri-map-pin-5-line:before{content:"\\ef10"}.ri-map-pin-add-fill:before{content:"\\ef11"}.ri-map-pin-add-line:before{content:"\\ef12"}.ri-map-pin-fill:before{content:"\\ef13"}.ri-map-pin-line:before{content:"\\ef14"}.ri-map-pin-range-fill:before{content:"\\ef15"}.ri-map-pin-range-line:before{content:"\\ef16"}.ri-map-pin-time-fill:before{content:"\\ef17"}.ri-map-pin-time-line:before{content:"\\ef18"}.ri-map-pin-user-fill:before{content:"\\ef19"}.ri-map-pin-user-line:before{content:"\\ef1a"}.ri-mark-pen-fill:before{content:"\\ef1b"}.ri-mark-pen-line:before{content:"\\ef1c"}.ri-markdown-fill:before{content:"\\ef1d"}.ri-markdown-line:before{content:"\\ef1e"}.ri-markup-fill:before{content:"\\ef1f"}.ri-markup-line:before{content:"\\ef20"}.ri-mastercard-fill:before{content:"\\ef21"}.ri-mastercard-line:before{content:"\\ef22"}.ri-mastodon-fill:before{content:"\\ef23"}.ri-mastodon-line:before{content:"\\ef24"}.ri-medal-2-fill:before{content:"\\ef25"}.ri-medal-2-line:before{content:"\\ef26"}.ri-medal-fill:before{content:"\\ef27"}.ri-medal-line:before{content:"\\ef28"}.ri-medicine-bottle-fill:before{content:"\\ef29"}.ri-medicine-bottle-line:before{content:"\\ef2a"}.ri-medium-fill:before{content:"\\ef2b"}.ri-medium-line:before{content:"\\ef2c"}.ri-men-fill:before{content:"\\ef2d"}.ri-men-line:before{content:"\\ef2e"}.ri-mental-health-fill:before{content:"\\ef2f"}.ri-mental-health-line:before{content:"\\ef30"}.ri-menu-2-fill:before{content:"\\ef31"}.ri-menu-2-line:before{content:"\\ef32"}.ri-menu-3-fill:before{content:"\\ef33"}.ri-menu-3-line:before{content:"\\ef34"}.ri-menu-4-fill:before{content:"\\ef35"}.ri-menu-4-line:before{content:"\\ef36"}.ri-menu-5-fill:before{content:"\\ef37"}.ri-menu-5-line:before{content:"\\ef38"}.ri-menu-add-fill:before{content:"\\ef39"}.ri-menu-add-line:before{content:"\\ef3a"}.ri-menu-fill:before{content:"\\ef3b"}.ri-menu-fold-fill:before{content:"\\ef3c"}.ri-menu-fold-line:before{content:"\\ef3d"}.ri-menu-line:before{content:"\\ef3e"}.ri-menu-unfold-fill:before{content:"\\ef3f"}.ri-menu-unfold-line:before{content:"\\ef40"}.ri-merge-cells-horizontal:before{content:"\\ef41"}.ri-merge-cells-vertical:before{content:"\\ef42"}.ri-message-2-fill:before{content:"\\ef43"}.ri-message-2-line:before{content:"\\ef44"}.ri-message-3-fill:before{content:"\\ef45"}.ri-message-3-line:before{content:"\\ef46"}.ri-message-fill:before{content:"\\ef47"}.ri-message-line:before{content:"\\ef48"}.ri-messenger-fill:before{content:"\\ef49"}.ri-messenger-line:before{content:"\\ef4a"}.ri-meteor-fill:before{content:"\\ef4b"}.ri-meteor-line:before{content:"\\ef4c"}.ri-mic-2-fill:before{content:"\\ef4d"}.ri-mic-2-line:before{content:"\\ef4e"}.ri-mic-fill:before{content:"\\ef4f"}.ri-mic-line:before{content:"\\ef50"}.ri-mic-off-fill:before{content:"\\ef51"}.ri-mic-off-line:before{content:"\\ef52"}.ri-mickey-fill:before{content:"\\ef53"}.ri-mickey-line:before{content:"\\ef54"}.ri-microscope-fill:before{content:"\\ef55"}.ri-microscope-line:before{content:"\\ef56"}.ri-microsoft-fill:before{content:"\\ef57"}.ri-microsoft-line:before{content:"\\ef58"}.ri-mind-map:before{content:"\\ef59"}.ri-mini-program-fill:before{content:"\\ef5a"}.ri-mini-program-line:before{content:"\\ef5b"}.ri-mist-fill:before{content:"\\ef5c"}.ri-mist-line:before{content:"\\ef5d"}.ri-money-cny-box-fill:before{content:"\\ef5e"}.ri-money-cny-box-line:before{content:"\\ef5f"}.ri-money-cny-circle-fill:before{content:"\\ef60"}.ri-money-cny-circle-line:before{content:"\\ef61"}.ri-money-dollar-box-fill:before{content:"\\ef62"}.ri-money-dollar-box-line:before{content:"\\ef63"}.ri-money-dollar-circle-fill:before{content:"\\ef64"}.ri-money-dollar-circle-line:before{content:"\\ef65"}.ri-money-euro-box-fill:before{content:"\\ef66"}.ri-money-euro-box-line:before{content:"\\ef67"}.ri-money-euro-circle-fill:before{content:"\\ef68"}.ri-money-euro-circle-line:before{content:"\\ef69"}.ri-money-pound-box-fill:before{content:"\\ef6a"}.ri-money-pound-box-line:before{content:"\\ef6b"}.ri-money-pound-circle-fill:before{content:"\\ef6c"}.ri-money-pound-circle-line:before{content:"\\ef6d"}.ri-moon-clear-fill:before{content:"\\ef6e"}.ri-moon-clear-line:before{content:"\\ef6f"}.ri-moon-cloudy-fill:before{content:"\\ef70"}.ri-moon-cloudy-line:before{content:"\\ef71"}.ri-moon-fill:before{content:"\\ef72"}.ri-moon-foggy-fill:before{content:"\\ef73"}.ri-moon-foggy-line:before{content:"\\ef74"}.ri-moon-line:before{content:"\\ef75"}.ri-more-2-fill:before{content:"\\ef76"}.ri-more-2-line:before{content:"\\ef77"}.ri-more-fill:before{content:"\\ef78"}.ri-more-line:before{content:"\\ef79"}.ri-motorbike-fill:before{content:"\\ef7a"}.ri-motorbike-line:before{content:"\\ef7b"}.ri-mouse-fill:before{content:"\\ef7c"}.ri-mouse-line:before{content:"\\ef7d"}.ri-movie-2-fill:before{content:"\\ef7e"}.ri-movie-2-line:before{content:"\\ef7f"}.ri-movie-fill:before{content:"\\ef80"}.ri-movie-line:before{content:"\\ef81"}.ri-music-2-fill:before{content:"\\ef82"}.ri-music-2-line:before{content:"\\ef83"}.ri-music-fill:before{content:"\\ef84"}.ri-music-line:before{content:"\\ef85"}.ri-mv-fill:before{content:"\\ef86"}.ri-mv-line:before{content:"\\ef87"}.ri-navigation-fill:before{content:"\\ef88"}.ri-navigation-line:before{content:"\\ef89"}.ri-netease-cloud-music-fill:before{content:"\\ef8a"}.ri-netease-cloud-music-line:before{content:"\\ef8b"}.ri-netflix-fill:before{content:"\\ef8c"}.ri-netflix-line:before{content:"\\ef8d"}.ri-newspaper-fill:before{content:"\\ef8e"}.ri-newspaper-line:before{content:"\\ef8f"}.ri-node-tree:before{content:"\\ef90"}.ri-notification-2-fill:before{content:"\\ef91"}.ri-notification-2-line:before{content:"\\ef92"}.ri-notification-3-fill:before{content:"\\ef93"}.ri-notification-3-line:before{content:"\\ef94"}.ri-notification-4-fill:before{content:"\\ef95"}.ri-notification-4-line:before{content:"\\ef96"}.ri-notification-badge-fill:before{content:"\\ef97"}.ri-notification-badge-line:before{content:"\\ef98"}.ri-notification-fill:before{content:"\\ef99"}.ri-notification-line:before{content:"\\ef9a"}.ri-notification-off-fill:before{content:"\\ef9b"}.ri-notification-off-line:before{content:"\\ef9c"}.ri-npmjs-fill:before{content:"\\ef9d"}.ri-npmjs-line:before{content:"\\ef9e"}.ri-number-0:before{content:"\\ef9f"}.ri-number-1:before{content:"\\efa0"}.ri-number-2:before{content:"\\efa1"}.ri-number-3:before{content:"\\efa2"}.ri-number-4:before{content:"\\efa3"}.ri-number-5:before{content:"\\efa4"}.ri-number-6:before{content:"\\efa5"}.ri-number-7:before{content:"\\efa6"}.ri-number-8:before{content:"\\efa7"}.ri-number-9:before{content:"\\efa8"}.ri-numbers-fill:before{content:"\\efa9"}.ri-numbers-line:before{content:"\\efaa"}.ri-nurse-fill:before{content:"\\efab"}.ri-nurse-line:before{content:"\\efac"}.ri-oil-fill:before{content:"\\efad"}.ri-oil-line:before{content:"\\efae"}.ri-omega:before{content:"\\efaf"}.ri-open-arm-fill:before{content:"\\efb0"}.ri-open-arm-line:before{content:"\\efb1"}.ri-open-source-fill:before{content:"\\efb2"}.ri-open-source-line:before{content:"\\efb3"}.ri-opera-fill:before{content:"\\efb4"}.ri-opera-line:before{content:"\\efb5"}.ri-order-play-fill:before{content:"\\efb6"}.ri-order-play-line:before{content:"\\efb7"}.ri-organization-chart:before{content:"\\efb8"}.ri-outlet-2-fill:before{content:"\\efb9"}.ri-outlet-2-line:before{content:"\\efba"}.ri-outlet-fill:before{content:"\\efbb"}.ri-outlet-line:before{content:"\\efbc"}.ri-page-separator:before{content:"\\efbd"}.ri-pages-fill:before{content:"\\efbe"}.ri-pages-line:before{content:"\\efbf"}.ri-paint-brush-fill:before{content:"\\efc0"}.ri-paint-brush-line:before{content:"\\efc1"}.ri-paint-fill:before{content:"\\efc2"}.ri-paint-line:before{content:"\\efc3"}.ri-palette-fill:before{content:"\\efc4"}.ri-palette-line:before{content:"\\efc5"}.ri-pantone-fill:before{content:"\\efc6"}.ri-pantone-line:before{content:"\\efc7"}.ri-paragraph:before{content:"\\efc8"}.ri-parent-fill:before{content:"\\efc9"}.ri-parent-line:before{content:"\\efca"}.ri-parentheses-fill:before{content:"\\efcb"}.ri-parentheses-line:before{content:"\\efcc"}.ri-parking-box-fill:before{content:"\\efcd"}.ri-parking-box-line:before{content:"\\efce"}.ri-parking-fill:before{content:"\\efcf"}.ri-parking-line:before{content:"\\efd0"}.ri-passport-fill:before{content:"\\efd1"}.ri-passport-line:before{content:"\\efd2"}.ri-patreon-fill:before{content:"\\efd3"}.ri-patreon-line:before{content:"\\efd4"}.ri-pause-circle-fill:before{content:"\\efd5"}.ri-pause-circle-line:before{content:"\\efd6"}.ri-pause-fill:before{content:"\\efd7"}.ri-pause-line:before{content:"\\efd8"}.ri-pause-mini-fill:before{content:"\\efd9"}.ri-pause-mini-line:before{content:"\\efda"}.ri-paypal-fill:before{content:"\\efdb"}.ri-paypal-line:before{content:"\\efdc"}.ri-pen-nib-fill:before{content:"\\efdd"}.ri-pen-nib-line:before{content:"\\efde"}.ri-pencil-fill:before{content:"\\efdf"}.ri-pencil-line:before{content:"\\efe0"}.ri-pencil-ruler-2-fill:before{content:"\\efe1"}.ri-pencil-ruler-2-line:before{content:"\\efe2"}.ri-pencil-ruler-fill:before{content:"\\efe3"}.ri-pencil-ruler-line:before{content:"\\efe4"}.ri-percent-fill:before{content:"\\efe5"}.ri-percent-line:before{content:"\\efe6"}.ri-phone-camera-fill:before{content:"\\efe7"}.ri-phone-camera-line:before{content:"\\efe8"}.ri-phone-fill:before{content:"\\efe9"}.ri-phone-find-fill:before{content:"\\efea"}.ri-phone-find-line:before{content:"\\efeb"}.ri-phone-line:before{content:"\\efec"}.ri-phone-lock-fill:before{content:"\\efed"}.ri-phone-lock-line:before{content:"\\efee"}.ri-picture-in-picture-2-fill:before{content:"\\efef"}.ri-picture-in-picture-2-line:before{content:"\\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\\eff1"}.ri-picture-in-picture-exit-line:before{content:"\\eff2"}.ri-picture-in-picture-fill:before{content:"\\eff3"}.ri-picture-in-picture-line:before{content:"\\eff4"}.ri-pie-chart-2-fill:before{content:"\\eff5"}.ri-pie-chart-2-line:before{content:"\\eff6"}.ri-pie-chart-box-fill:before{content:"\\eff7"}.ri-pie-chart-box-line:before{content:"\\eff8"}.ri-pie-chart-fill:before{content:"\\eff9"}.ri-pie-chart-line:before{content:"\\effa"}.ri-pin-distance-fill:before{content:"\\effb"}.ri-pin-distance-line:before{content:"\\effc"}.ri-ping-pong-fill:before{content:"\\effd"}.ri-ping-pong-line:before{content:"\\effe"}.ri-pinterest-fill:before{content:"\\efff"}.ri-pinterest-line:before{content:"\\f000"}.ri-pinyin-input:before{content:"\\f001"}.ri-pixelfed-fill:before{content:"\\f002"}.ri-pixelfed-line:before{content:"\\f003"}.ri-plane-fill:before{content:"\\f004"}.ri-plane-line:before{content:"\\f005"}.ri-plant-fill:before{content:"\\f006"}.ri-plant-line:before{content:"\\f007"}.ri-play-circle-fill:before{content:"\\f008"}.ri-play-circle-line:before{content:"\\f009"}.ri-play-fill:before{content:"\\f00a"}.ri-play-line:before{content:"\\f00b"}.ri-play-list-2-fill:before{content:"\\f00c"}.ri-play-list-2-line:before{content:"\\f00d"}.ri-play-list-add-fill:before{content:"\\f00e"}.ri-play-list-add-line:before{content:"\\f00f"}.ri-play-list-fill:before{content:"\\f010"}.ri-play-list-line:before{content:"\\f011"}.ri-play-mini-fill:before{content:"\\f012"}.ri-play-mini-line:before{content:"\\f013"}.ri-playstation-fill:before{content:"\\f014"}.ri-playstation-line:before{content:"\\f015"}.ri-plug-2-fill:before{content:"\\f016"}.ri-plug-2-line:before{content:"\\f017"}.ri-plug-fill:before{content:"\\f018"}.ri-plug-line:before{content:"\\f019"}.ri-polaroid-2-fill:before{content:"\\f01a"}.ri-polaroid-2-line:before{content:"\\f01b"}.ri-polaroid-fill:before{content:"\\f01c"}.ri-polaroid-line:before{content:"\\f01d"}.ri-police-car-fill:before{content:"\\f01e"}.ri-police-car-line:before{content:"\\f01f"}.ri-price-tag-2-fill:before{content:"\\f020"}.ri-price-tag-2-line:before{content:"\\f021"}.ri-price-tag-3-fill:before{content:"\\f022"}.ri-price-tag-3-line:before{content:"\\f023"}.ri-price-tag-fill:before{content:"\\f024"}.ri-price-tag-line:before{content:"\\f025"}.ri-printer-cloud-fill:before{content:"\\f026"}.ri-printer-cloud-line:before{content:"\\f027"}.ri-printer-fill:before{content:"\\f028"}.ri-printer-line:before{content:"\\f029"}.ri-product-hunt-fill:before{content:"\\f02a"}.ri-product-hunt-line:before{content:"\\f02b"}.ri-profile-fill:before{content:"\\f02c"}.ri-profile-line:before{content:"\\f02d"}.ri-projector-2-fill:before{content:"\\f02e"}.ri-projector-2-line:before{content:"\\f02f"}.ri-projector-fill:before{content:"\\f030"}.ri-projector-line:before{content:"\\f031"}.ri-psychotherapy-fill:before{content:"\\f032"}.ri-psychotherapy-line:before{content:"\\f033"}.ri-pulse-fill:before{content:"\\f034"}.ri-pulse-line:before{content:"\\f035"}.ri-pushpin-2-fill:before{content:"\\f036"}.ri-pushpin-2-line:before{content:"\\f037"}.ri-pushpin-fill:before{content:"\\f038"}.ri-pushpin-line:before{content:"\\f039"}.ri-qq-fill:before{content:"\\f03a"}.ri-qq-line:before{content:"\\f03b"}.ri-qr-code-fill:before{content:"\\f03c"}.ri-qr-code-line:before{content:"\\f03d"}.ri-qr-scan-2-fill:before{content:"\\f03e"}.ri-qr-scan-2-line:before{content:"\\f03f"}.ri-qr-scan-fill:before{content:"\\f040"}.ri-qr-scan-line:before{content:"\\f041"}.ri-question-answer-fill:before{content:"\\f042"}.ri-question-answer-line:before{content:"\\f043"}.ri-question-fill:before{content:"\\f044"}.ri-question-line:before{content:"\\f045"}.ri-question-mark:before{content:"\\f046"}.ri-questionnaire-fill:before{content:"\\f047"}.ri-questionnaire-line:before{content:"\\f048"}.ri-quill-pen-fill:before{content:"\\f049"}.ri-quill-pen-line:before{content:"\\f04a"}.ri-radar-fill:before{content:"\\f04b"}.ri-radar-line:before{content:"\\f04c"}.ri-radio-2-fill:before{content:"\\f04d"}.ri-radio-2-line:before{content:"\\f04e"}.ri-radio-button-fill:before{content:"\\f04f"}.ri-radio-button-line:before{content:"\\f050"}.ri-radio-fill:before{content:"\\f051"}.ri-radio-line:before{content:"\\f052"}.ri-rainbow-fill:before{content:"\\f053"}.ri-rainbow-line:before{content:"\\f054"}.ri-rainy-fill:before{content:"\\f055"}.ri-rainy-line:before{content:"\\f056"}.ri-reactjs-fill:before{content:"\\f057"}.ri-reactjs-line:before{content:"\\f058"}.ri-record-circle-fill:before{content:"\\f059"}.ri-record-circle-line:before{content:"\\f05a"}.ri-record-mail-fill:before{content:"\\f05b"}.ri-record-mail-line:before{content:"\\f05c"}.ri-recycle-fill:before{content:"\\f05d"}.ri-recycle-line:before{content:"\\f05e"}.ri-red-packet-fill:before{content:"\\f05f"}.ri-red-packet-line:before{content:"\\f060"}.ri-reddit-fill:before{content:"\\f061"}.ri-reddit-line:before{content:"\\f062"}.ri-refresh-fill:before{content:"\\f063"}.ri-refresh-line:before{content:"\\f064"}.ri-refund-2-fill:before{content:"\\f065"}.ri-refund-2-line:before{content:"\\f066"}.ri-refund-fill:before{content:"\\f067"}.ri-refund-line:before{content:"\\f068"}.ri-registered-fill:before{content:"\\f069"}.ri-registered-line:before{content:"\\f06a"}.ri-remixicon-fill:before{content:"\\f06b"}.ri-remixicon-line:before{content:"\\f06c"}.ri-remote-control-2-fill:before{content:"\\f06d"}.ri-remote-control-2-line:before{content:"\\f06e"}.ri-remote-control-fill:before{content:"\\f06f"}.ri-remote-control-line:before{content:"\\f070"}.ri-repeat-2-fill:before{content:"\\f071"}.ri-repeat-2-line:before{content:"\\f072"}.ri-repeat-fill:before{content:"\\f073"}.ri-repeat-line:before{content:"\\f074"}.ri-repeat-one-fill:before{content:"\\f075"}.ri-repeat-one-line:before{content:"\\f076"}.ri-reply-all-fill:before{content:"\\f077"}.ri-reply-all-line:before{content:"\\f078"}.ri-reply-fill:before{content:"\\f079"}.ri-reply-line:before{content:"\\f07a"}.ri-reserved-fill:before{content:"\\f07b"}.ri-reserved-line:before{content:"\\f07c"}.ri-rest-time-fill:before{content:"\\f07d"}.ri-rest-time-line:before{content:"\\f07e"}.ri-restart-fill:before{content:"\\f07f"}.ri-restart-line:before{content:"\\f080"}.ri-restaurant-2-fill:before{content:"\\f081"}.ri-restaurant-2-line:before{content:"\\f082"}.ri-restaurant-fill:before{content:"\\f083"}.ri-restaurant-line:before{content:"\\f084"}.ri-rewind-fill:before{content:"\\f085"}.ri-rewind-line:before{content:"\\f086"}.ri-rewind-mini-fill:before{content:"\\f087"}.ri-rewind-mini-line:before{content:"\\f088"}.ri-rhythm-fill:before{content:"\\f089"}.ri-rhythm-line:before{content:"\\f08a"}.ri-riding-fill:before{content:"\\f08b"}.ri-riding-line:before{content:"\\f08c"}.ri-road-map-fill:before{content:"\\f08d"}.ri-road-map-line:before{content:"\\f08e"}.ri-roadster-fill:before{content:"\\f08f"}.ri-roadster-line:before{content:"\\f090"}.ri-robot-fill:before{content:"\\f091"}.ri-robot-line:before{content:"\\f092"}.ri-rocket-2-fill:before{content:"\\f093"}.ri-rocket-2-line:before{content:"\\f094"}.ri-rocket-fill:before{content:"\\f095"}.ri-rocket-line:before{content:"\\f096"}.ri-rotate-lock-fill:before{content:"\\f097"}.ri-rotate-lock-line:before{content:"\\f098"}.ri-rounded-corner:before{content:"\\f099"}.ri-route-fill:before{content:"\\f09a"}.ri-route-line:before{content:"\\f09b"}.ri-router-fill:before{content:"\\f09c"}.ri-router-line:before{content:"\\f09d"}.ri-rss-fill:before{content:"\\f09e"}.ri-rss-line:before{content:"\\f09f"}.ri-ruler-2-fill:before{content:"\\f0a0"}.ri-ruler-2-line:before{content:"\\f0a1"}.ri-ruler-fill:before{content:"\\f0a2"}.ri-ruler-line:before{content:"\\f0a3"}.ri-run-fill:before{content:"\\f0a4"}.ri-run-line:before{content:"\\f0a5"}.ri-safari-fill:before{content:"\\f0a6"}.ri-safari-line:before{content:"\\f0a7"}.ri-safe-2-fill:before{content:"\\f0a8"}.ri-safe-2-line:before{content:"\\f0a9"}.ri-safe-fill:before{content:"\\f0aa"}.ri-safe-line:before{content:"\\f0ab"}.ri-sailboat-fill:before{content:"\\f0ac"}.ri-sailboat-line:before{content:"\\f0ad"}.ri-save-2-fill:before{content:"\\f0ae"}.ri-save-2-line:before{content:"\\f0af"}.ri-save-3-fill:before{content:"\\f0b0"}.ri-save-3-line:before{content:"\\f0b1"}.ri-save-fill:before{content:"\\f0b2"}.ri-save-line:before{content:"\\f0b3"}.ri-scales-2-fill:before{content:"\\f0b4"}.ri-scales-2-line:before{content:"\\f0b5"}.ri-scales-3-fill:before{content:"\\f0b6"}.ri-scales-3-line:before{content:"\\f0b7"}.ri-scales-fill:before{content:"\\f0b8"}.ri-scales-line:before{content:"\\f0b9"}.ri-scan-2-fill:before{content:"\\f0ba"}.ri-scan-2-line:before{content:"\\f0bb"}.ri-scan-fill:before{content:"\\f0bc"}.ri-scan-line:before{content:"\\f0bd"}.ri-scissors-2-fill:before{content:"\\f0be"}.ri-scissors-2-line:before{content:"\\f0bf"}.ri-scissors-cut-fill:before{content:"\\f0c0"}.ri-scissors-cut-line:before{content:"\\f0c1"}.ri-scissors-fill:before{content:"\\f0c2"}.ri-scissors-line:before{content:"\\f0c3"}.ri-screenshot-2-fill:before{content:"\\f0c4"}.ri-screenshot-2-line:before{content:"\\f0c5"}.ri-screenshot-fill:before{content:"\\f0c6"}.ri-screenshot-line:before{content:"\\f0c7"}.ri-sd-card-fill:before{content:"\\f0c8"}.ri-sd-card-line:before{content:"\\f0c9"}.ri-sd-card-mini-fill:before{content:"\\f0ca"}.ri-sd-card-mini-line:before{content:"\\f0cb"}.ri-search-2-fill:before{content:"\\f0cc"}.ri-search-2-line:before{content:"\\f0cd"}.ri-search-eye-fill:before{content:"\\f0ce"}.ri-search-eye-line:before{content:"\\f0cf"}.ri-search-fill:before{content:"\\f0d0"}.ri-search-line:before{content:"\\f0d1"}.ri-secure-payment-fill:before{content:"\\f0d2"}.ri-secure-payment-line:before{content:"\\f0d3"}.ri-seedling-fill:before{content:"\\f0d4"}.ri-seedling-line:before{content:"\\f0d5"}.ri-send-backward:before{content:"\\f0d6"}.ri-send-plane-2-fill:before{content:"\\f0d7"}.ri-send-plane-2-line:before{content:"\\f0d8"}.ri-send-plane-fill:before{content:"\\f0d9"}.ri-send-plane-line:before{content:"\\f0da"}.ri-send-to-back:before{content:"\\f0db"}.ri-sensor-fill:before{content:"\\f0dc"}.ri-sensor-line:before{content:"\\f0dd"}.ri-separator:before{content:"\\f0de"}.ri-server-fill:before{content:"\\f0df"}.ri-server-line:before{content:"\\f0e0"}.ri-service-fill:before{content:"\\f0e1"}.ri-service-line:before{content:"\\f0e2"}.ri-settings-2-fill:before{content:"\\f0e3"}.ri-settings-2-line:before{content:"\\f0e4"}.ri-settings-3-fill:before{content:"\\f0e5"}.ri-settings-3-line:before{content:"\\f0e6"}.ri-settings-4-fill:before{content:"\\f0e7"}.ri-settings-4-line:before{content:"\\f0e8"}.ri-settings-5-fill:before{content:"\\f0e9"}.ri-settings-5-line:before{content:"\\f0ea"}.ri-settings-6-fill:before{content:"\\f0eb"}.ri-settings-6-line:before{content:"\\f0ec"}.ri-settings-fill:before{content:"\\f0ed"}.ri-settings-line:before{content:"\\f0ee"}.ri-shape-2-fill:before{content:"\\f0ef"}.ri-shape-2-line:before{content:"\\f0f0"}.ri-shape-fill:before{content:"\\f0f1"}.ri-shape-line:before{content:"\\f0f2"}.ri-share-box-fill:before{content:"\\f0f3"}.ri-share-box-line:before{content:"\\f0f4"}.ri-share-circle-fill:before{content:"\\f0f5"}.ri-share-circle-line:before{content:"\\f0f6"}.ri-share-fill:before{content:"\\f0f7"}.ri-share-forward-2-fill:before{content:"\\f0f8"}.ri-share-forward-2-line:before{content:"\\f0f9"}.ri-share-forward-box-fill:before{content:"\\f0fa"}.ri-share-forward-box-line:before{content:"\\f0fb"}.ri-share-forward-fill:before{content:"\\f0fc"}.ri-share-forward-line:before{content:"\\f0fd"}.ri-share-line:before{content:"\\f0fe"}.ri-shield-check-fill:before{content:"\\f0ff"}.ri-shield-check-line:before{content:"\\f100"}.ri-shield-cross-fill:before{content:"\\f101"}.ri-shield-cross-line:before{content:"\\f102"}.ri-shield-fill:before{content:"\\f103"}.ri-shield-flash-fill:before{content:"\\f104"}.ri-shield-flash-line:before{content:"\\f105"}.ri-shield-keyhole-fill:before{content:"\\f106"}.ri-shield-keyhole-line:before{content:"\\f107"}.ri-shield-line:before{content:"\\f108"}.ri-shield-star-fill:before{content:"\\f109"}.ri-shield-star-line:before{content:"\\f10a"}.ri-shield-user-fill:before{content:"\\f10b"}.ri-shield-user-line:before{content:"\\f10c"}.ri-ship-2-fill:before{content:"\\f10d"}.ri-ship-2-line:before{content:"\\f10e"}.ri-ship-fill:before{content:"\\f10f"}.ri-ship-line:before{content:"\\f110"}.ri-shirt-fill:before{content:"\\f111"}.ri-shirt-line:before{content:"\\f112"}.ri-shopping-bag-2-fill:before{content:"\\f113"}.ri-shopping-bag-2-line:before{content:"\\f114"}.ri-shopping-bag-3-fill:before{content:"\\f115"}.ri-shopping-bag-3-line:before{content:"\\f116"}.ri-shopping-bag-fill:before{content:"\\f117"}.ri-shopping-bag-line:before{content:"\\f118"}.ri-shopping-basket-2-fill:before{content:"\\f119"}.ri-shopping-basket-2-line:before{content:"\\f11a"}.ri-shopping-basket-fill:before{content:"\\f11b"}.ri-shopping-basket-line:before{content:"\\f11c"}.ri-shopping-cart-2-fill:before{content:"\\f11d"}.ri-shopping-cart-2-line:before{content:"\\f11e"}.ri-shopping-cart-fill:before{content:"\\f11f"}.ri-shopping-cart-line:before{content:"\\f120"}.ri-showers-fill:before{content:"\\f121"}.ri-showers-line:before{content:"\\f122"}.ri-shuffle-fill:before{content:"\\f123"}.ri-shuffle-line:before{content:"\\f124"}.ri-shut-down-fill:before{content:"\\f125"}.ri-shut-down-line:before{content:"\\f126"}.ri-side-bar-fill:before{content:"\\f127"}.ri-side-bar-line:before{content:"\\f128"}.ri-signal-tower-fill:before{content:"\\f129"}.ri-signal-tower-line:before{content:"\\f12a"}.ri-signal-wifi-1-fill:before{content:"\\f12b"}.ri-signal-wifi-1-line:before{content:"\\f12c"}.ri-signal-wifi-2-fill:before{content:"\\f12d"}.ri-signal-wifi-2-line:before{content:"\\f12e"}.ri-signal-wifi-3-fill:before{content:"\\f12f"}.ri-signal-wifi-3-line:before{content:"\\f130"}.ri-signal-wifi-error-fill:before{content:"\\f131"}.ri-signal-wifi-error-line:before{content:"\\f132"}.ri-signal-wifi-fill:before{content:"\\f133"}.ri-signal-wifi-line:before{content:"\\f134"}.ri-signal-wifi-off-fill:before{content:"\\f135"}.ri-signal-wifi-off-line:before{content:"\\f136"}.ri-sim-card-2-fill:before{content:"\\f137"}.ri-sim-card-2-line:before{content:"\\f138"}.ri-sim-card-fill:before{content:"\\f139"}.ri-sim-card-line:before{content:"\\f13a"}.ri-single-quotes-l:before{content:"\\f13b"}.ri-single-quotes-r:before{content:"\\f13c"}.ri-sip-fill:before{content:"\\f13d"}.ri-sip-line:before{content:"\\f13e"}.ri-skip-back-fill:before{content:"\\f13f"}.ri-skip-back-line:before{content:"\\f140"}.ri-skip-back-mini-fill:before{content:"\\f141"}.ri-skip-back-mini-line:before{content:"\\f142"}.ri-skip-forward-fill:before{content:"\\f143"}.ri-skip-forward-line:before{content:"\\f144"}.ri-skip-forward-mini-fill:before{content:"\\f145"}.ri-skip-forward-mini-line:before{content:"\\f146"}.ri-skull-2-fill:before{content:"\\f147"}.ri-skull-2-line:before{content:"\\f148"}.ri-skull-fill:before{content:"\\f149"}.ri-skull-line:before{content:"\\f14a"}.ri-skype-fill:before{content:"\\f14b"}.ri-skype-line:before{content:"\\f14c"}.ri-slack-fill:before{content:"\\f14d"}.ri-slack-line:before{content:"\\f14e"}.ri-slice-fill:before{content:"\\f14f"}.ri-slice-line:before{content:"\\f150"}.ri-slideshow-2-fill:before{content:"\\f151"}.ri-slideshow-2-line:before{content:"\\f152"}.ri-slideshow-3-fill:before{content:"\\f153"}.ri-slideshow-3-line:before{content:"\\f154"}.ri-slideshow-4-fill:before{content:"\\f155"}.ri-slideshow-4-line:before{content:"\\f156"}.ri-slideshow-fill:before{content:"\\f157"}.ri-slideshow-line:before{content:"\\f158"}.ri-smartphone-fill:before{content:"\\f159"}.ri-smartphone-line:before{content:"\\f15a"}.ri-snapchat-fill:before{content:"\\f15b"}.ri-snapchat-line:before{content:"\\f15c"}.ri-snowy-fill:before{content:"\\f15d"}.ri-snowy-line:before{content:"\\f15e"}.ri-sort-asc:before{content:"\\f15f"}.ri-sort-desc:before{content:"\\f160"}.ri-sound-module-fill:before{content:"\\f161"}.ri-sound-module-line:before{content:"\\f162"}.ri-soundcloud-fill:before{content:"\\f163"}.ri-soundcloud-line:before{content:"\\f164"}.ri-space-ship-fill:before{content:"\\f165"}.ri-space-ship-line:before{content:"\\f166"}.ri-space:before{content:"\\f167"}.ri-spam-2-fill:before{content:"\\f168"}.ri-spam-2-line:before{content:"\\f169"}.ri-spam-3-fill:before{content:"\\f16a"}.ri-spam-3-line:before{content:"\\f16b"}.ri-spam-fill:before{content:"\\f16c"}.ri-spam-line:before{content:"\\f16d"}.ri-speaker-2-fill:before{content:"\\f16e"}.ri-speaker-2-line:before{content:"\\f16f"}.ri-speaker-3-fill:before{content:"\\f170"}.ri-speaker-3-line:before{content:"\\f171"}.ri-speaker-fill:before{content:"\\f172"}.ri-speaker-line:before{content:"\\f173"}.ri-spectrum-fill:before{content:"\\f174"}.ri-spectrum-line:before{content:"\\f175"}.ri-speed-fill:before{content:"\\f176"}.ri-speed-line:before{content:"\\f177"}.ri-speed-mini-fill:before{content:"\\f178"}.ri-speed-mini-line:before{content:"\\f179"}.ri-split-cells-horizontal:before{content:"\\f17a"}.ri-split-cells-vertical:before{content:"\\f17b"}.ri-spotify-fill:before{content:"\\f17c"}.ri-spotify-line:before{content:"\\f17d"}.ri-spy-fill:before{content:"\\f17e"}.ri-spy-line:before{content:"\\f17f"}.ri-stack-fill:before{content:"\\f180"}.ri-stack-line:before{content:"\\f181"}.ri-stack-overflow-fill:before{content:"\\f182"}.ri-stack-overflow-line:before{content:"\\f183"}.ri-stackshare-fill:before{content:"\\f184"}.ri-stackshare-line:before{content:"\\f185"}.ri-star-fill:before{content:"\\f186"}.ri-star-half-fill:before{content:"\\f187"}.ri-star-half-line:before{content:"\\f188"}.ri-star-half-s-fill:before{content:"\\f189"}.ri-star-half-s-line:before{content:"\\f18a"}.ri-star-line:before{content:"\\f18b"}.ri-star-s-fill:before{content:"\\f18c"}.ri-star-s-line:before{content:"\\f18d"}.ri-star-smile-fill:before{content:"\\f18e"}.ri-star-smile-line:before{content:"\\f18f"}.ri-steam-fill:before{content:"\\f190"}.ri-steam-line:before{content:"\\f191"}.ri-steering-2-fill:before{content:"\\f192"}.ri-steering-2-line:before{content:"\\f193"}.ri-steering-fill:before{content:"\\f194"}.ri-steering-line:before{content:"\\f195"}.ri-stethoscope-fill:before{content:"\\f196"}.ri-stethoscope-line:before{content:"\\f197"}.ri-sticky-note-2-fill:before{content:"\\f198"}.ri-sticky-note-2-line:before{content:"\\f199"}.ri-sticky-note-fill:before{content:"\\f19a"}.ri-sticky-note-line:before{content:"\\f19b"}.ri-stock-fill:before{content:"\\f19c"}.ri-stock-line:before{content:"\\f19d"}.ri-stop-circle-fill:before{content:"\\f19e"}.ri-stop-circle-line:before{content:"\\f19f"}.ri-stop-fill:before{content:"\\f1a0"}.ri-stop-line:before{content:"\\f1a1"}.ri-stop-mini-fill:before{content:"\\f1a2"}.ri-stop-mini-line:before{content:"\\f1a3"}.ri-store-2-fill:before{content:"\\f1a4"}.ri-store-2-line:before{content:"\\f1a5"}.ri-store-3-fill:before{content:"\\f1a6"}.ri-store-3-line:before{content:"\\f1a7"}.ri-store-fill:before{content:"\\f1a8"}.ri-store-line:before{content:"\\f1a9"}.ri-strikethrough-2:before{content:"\\f1aa"}.ri-strikethrough:before{content:"\\f1ab"}.ri-subscript-2:before{content:"\\f1ac"}.ri-subscript:before{content:"\\f1ad"}.ri-subtract-fill:before{content:"\\f1ae"}.ri-subtract-line:before{content:"\\f1af"}.ri-subway-fill:before{content:"\\f1b0"}.ri-subway-line:before{content:"\\f1b1"}.ri-subway-wifi-fill:before{content:"\\f1b2"}.ri-subway-wifi-line:before{content:"\\f1b3"}.ri-suitcase-2-fill:before{content:"\\f1b4"}.ri-suitcase-2-line:before{content:"\\f1b5"}.ri-suitcase-3-fill:before{content:"\\f1b6"}.ri-suitcase-3-line:before{content:"\\f1b7"}.ri-suitcase-fill:before{content:"\\f1b8"}.ri-suitcase-line:before{content:"\\f1b9"}.ri-sun-cloudy-fill:before{content:"\\f1ba"}.ri-sun-cloudy-line:before{content:"\\f1bb"}.ri-sun-fill:before{content:"\\f1bc"}.ri-sun-foggy-fill:before{content:"\\f1bd"}.ri-sun-foggy-line:before{content:"\\f1be"}.ri-sun-line:before{content:"\\f1bf"}.ri-superscript-2:before{content:"\\f1c0"}.ri-superscript:before{content:"\\f1c1"}.ri-surgical-mask-fill:before{content:"\\f1c2"}.ri-surgical-mask-line:before{content:"\\f1c3"}.ri-surround-sound-fill:before{content:"\\f1c4"}.ri-surround-sound-line:before{content:"\\f1c5"}.ri-survey-fill:before{content:"\\f1c6"}.ri-survey-line:before{content:"\\f1c7"}.ri-swap-box-fill:before{content:"\\f1c8"}.ri-swap-box-line:before{content:"\\f1c9"}.ri-swap-fill:before{content:"\\f1ca"}.ri-swap-line:before{content:"\\f1cb"}.ri-switch-fill:before{content:"\\f1cc"}.ri-switch-line:before{content:"\\f1cd"}.ri-sword-fill:before{content:"\\f1ce"}.ri-sword-line:before{content:"\\f1cf"}.ri-syringe-fill:before{content:"\\f1d0"}.ri-syringe-line:before{content:"\\f1d1"}.ri-t-box-fill:before{content:"\\f1d2"}.ri-t-box-line:before{content:"\\f1d3"}.ri-t-shirt-2-fill:before{content:"\\f1d4"}.ri-t-shirt-2-line:before{content:"\\f1d5"}.ri-t-shirt-air-fill:before{content:"\\f1d6"}.ri-t-shirt-air-line:before{content:"\\f1d7"}.ri-t-shirt-fill:before{content:"\\f1d8"}.ri-t-shirt-line:before{content:"\\f1d9"}.ri-table-2:before{content:"\\f1da"}.ri-table-alt-fill:before{content:"\\f1db"}.ri-table-alt-line:before{content:"\\f1dc"}.ri-table-fill:before{content:"\\f1dd"}.ri-table-line:before{content:"\\f1de"}.ri-tablet-fill:before{content:"\\f1df"}.ri-tablet-line:before{content:"\\f1e0"}.ri-takeaway-fill:before{content:"\\f1e1"}.ri-takeaway-line:before{content:"\\f1e2"}.ri-taobao-fill:before{content:"\\f1e3"}.ri-taobao-line:before{content:"\\f1e4"}.ri-tape-fill:before{content:"\\f1e5"}.ri-tape-line:before{content:"\\f1e6"}.ri-task-fill:before{content:"\\f1e7"}.ri-task-line:before{content:"\\f1e8"}.ri-taxi-fill:before{content:"\\f1e9"}.ri-taxi-line:before{content:"\\f1ea"}.ri-taxi-wifi-fill:before{content:"\\f1eb"}.ri-taxi-wifi-line:before{content:"\\f1ec"}.ri-team-fill:before{content:"\\f1ed"}.ri-team-line:before{content:"\\f1ee"}.ri-telegram-fill:before{content:"\\f1ef"}.ri-telegram-line:before{content:"\\f1f0"}.ri-temp-cold-fill:before{content:"\\f1f1"}.ri-temp-cold-line:before{content:"\\f1f2"}.ri-temp-hot-fill:before{content:"\\f1f3"}.ri-temp-hot-line:before{content:"\\f1f4"}.ri-terminal-box-fill:before{content:"\\f1f5"}.ri-terminal-box-line:before{content:"\\f1f6"}.ri-terminal-fill:before{content:"\\f1f7"}.ri-terminal-line:before{content:"\\f1f8"}.ri-terminal-window-fill:before{content:"\\f1f9"}.ri-terminal-window-line:before{content:"\\f1fa"}.ri-test-tube-fill:before{content:"\\f1fb"}.ri-test-tube-line:before{content:"\\f1fc"}.ri-text-direction-l:before{content:"\\f1fd"}.ri-text-direction-r:before{content:"\\f1fe"}.ri-text-spacing:before{content:"\\f1ff"}.ri-text-wrap:before{content:"\\f200"}.ri-text:before{content:"\\f201"}.ri-thermometer-fill:before{content:"\\f202"}.ri-thermometer-line:before{content:"\\f203"}.ri-thumb-down-fill:before{content:"\\f204"}.ri-thumb-down-line:before{content:"\\f205"}.ri-thumb-up-fill:before{content:"\\f206"}.ri-thumb-up-line:before{content:"\\f207"}.ri-thunderstorms-fill:before{content:"\\f208"}.ri-thunderstorms-line:before{content:"\\f209"}.ri-ticket-2-fill:before{content:"\\f20a"}.ri-ticket-2-line:before{content:"\\f20b"}.ri-ticket-fill:before{content:"\\f20c"}.ri-ticket-line:before{content:"\\f20d"}.ri-time-fill:before{content:"\\f20e"}.ri-time-line:before{content:"\\f20f"}.ri-timer-2-fill:before{content:"\\f210"}.ri-timer-2-line:before{content:"\\f211"}.ri-timer-fill:before{content:"\\f212"}.ri-timer-flash-fill:before{content:"\\f213"}.ri-timer-flash-line:before{content:"\\f214"}.ri-timer-line:before{content:"\\f215"}.ri-todo-fill:before{content:"\\f216"}.ri-todo-line:before{content:"\\f217"}.ri-toggle-fill:before{content:"\\f218"}.ri-toggle-line:before{content:"\\f219"}.ri-tools-fill:before{content:"\\f21a"}.ri-tools-line:before{content:"\\f21b"}.ri-tornado-fill:before{content:"\\f21c"}.ri-tornado-line:before{content:"\\f21d"}.ri-trademark-fill:before{content:"\\f21e"}.ri-trademark-line:before{content:"\\f21f"}.ri-traffic-light-fill:before{content:"\\f220"}.ri-traffic-light-line:before{content:"\\f221"}.ri-train-fill:before{content:"\\f222"}.ri-train-line:before{content:"\\f223"}.ri-train-wifi-fill:before{content:"\\f224"}.ri-train-wifi-line:before{content:"\\f225"}.ri-translate-2:before{content:"\\f226"}.ri-translate:before{content:"\\f227"}.ri-travesti-fill:before{content:"\\f228"}.ri-travesti-line:before{content:"\\f229"}.ri-treasure-map-fill:before{content:"\\f22a"}.ri-treasure-map-line:before{content:"\\f22b"}.ri-trello-fill:before{content:"\\f22c"}.ri-trello-line:before{content:"\\f22d"}.ri-trophy-fill:before{content:"\\f22e"}.ri-trophy-line:before{content:"\\f22f"}.ri-truck-fill:before{content:"\\f230"}.ri-truck-line:before{content:"\\f231"}.ri-tumblr-fill:before{content:"\\f232"}.ri-tumblr-line:before{content:"\\f233"}.ri-tv-2-fill:before{content:"\\f234"}.ri-tv-2-line:before{content:"\\f235"}.ri-tv-fill:before{content:"\\f236"}.ri-tv-line:before{content:"\\f237"}.ri-twitch-fill:before{content:"\\f238"}.ri-twitch-line:before{content:"\\f239"}.ri-twitter-fill:before{content:"\\f23a"}.ri-twitter-line:before{content:"\\f23b"}.ri-typhoon-fill:before{content:"\\f23c"}.ri-typhoon-line:before{content:"\\f23d"}.ri-u-disk-fill:before{content:"\\f23e"}.ri-u-disk-line:before{content:"\\f23f"}.ri-ubuntu-fill:before{content:"\\f240"}.ri-ubuntu-line:before{content:"\\f241"}.ri-umbrella-fill:before{content:"\\f242"}.ri-umbrella-line:before{content:"\\f243"}.ri-underline:before{content:"\\f244"}.ri-uninstall-fill:before{content:"\\f245"}.ri-uninstall-line:before{content:"\\f246"}.ri-unsplash-fill:before{content:"\\f247"}.ri-unsplash-line:before{content:"\\f248"}.ri-upload-2-fill:before{content:"\\f249"}.ri-upload-2-line:before{content:"\\f24a"}.ri-upload-cloud-2-fill:before{content:"\\f24b"}.ri-upload-cloud-2-line:before{content:"\\f24c"}.ri-upload-cloud-fill:before{content:"\\f24d"}.ri-upload-cloud-line:before{content:"\\f24e"}.ri-upload-fill:before{content:"\\f24f"}.ri-upload-line:before{content:"\\f250"}.ri-usb-fill:before{content:"\\f251"}.ri-usb-line:before{content:"\\f252"}.ri-user-2-fill:before{content:"\\f253"}.ri-user-2-line:before{content:"\\f254"}.ri-user-3-fill:before{content:"\\f255"}.ri-user-3-line:before{content:"\\f256"}.ri-user-4-fill:before{content:"\\f257"}.ri-user-4-line:before{content:"\\f258"}.ri-user-5-fill:before{content:"\\f259"}.ri-user-5-line:before{content:"\\f25a"}.ri-user-6-fill:before{content:"\\f25b"}.ri-user-6-line:before{content:"\\f25c"}.ri-user-add-fill:before{content:"\\f25d"}.ri-user-add-line:before{content:"\\f25e"}.ri-user-fill:before{content:"\\f25f"}.ri-user-follow-fill:before{content:"\\f260"}.ri-user-follow-line:before{content:"\\f261"}.ri-user-heart-fill:before{content:"\\f262"}.ri-user-heart-line:before{content:"\\f263"}.ri-user-line:before{content:"\\f264"}.ri-user-location-fill:before{content:"\\f265"}.ri-user-location-line:before{content:"\\f266"}.ri-user-received-2-fill:before{content:"\\f267"}.ri-user-received-2-line:before{content:"\\f268"}.ri-user-received-fill:before{content:"\\f269"}.ri-user-received-line:before{content:"\\f26a"}.ri-user-search-fill:before{content:"\\f26b"}.ri-user-search-line:before{content:"\\f26c"}.ri-user-settings-fill:before{content:"\\f26d"}.ri-user-settings-line:before{content:"\\f26e"}.ri-user-shared-2-fill:before{content:"\\f26f"}.ri-user-shared-2-line:before{content:"\\f270"}.ri-user-shared-fill:before{content:"\\f271"}.ri-user-shared-line:before{content:"\\f272"}.ri-user-smile-fill:before{content:"\\f273"}.ri-user-smile-line:before{content:"\\f274"}.ri-user-star-fill:before{content:"\\f275"}.ri-user-star-line:before{content:"\\f276"}.ri-user-unfollow-fill:before{content:"\\f277"}.ri-user-unfollow-line:before{content:"\\f278"}.ri-user-voice-fill:before{content:"\\f279"}.ri-user-voice-line:before{content:"\\f27a"}.ri-video-add-fill:before{content:"\\f27b"}.ri-video-add-line:before{content:"\\f27c"}.ri-video-chat-fill:before{content:"\\f27d"}.ri-video-chat-line:before{content:"\\f27e"}.ri-video-download-fill:before{content:"\\f27f"}.ri-video-download-line:before{content:"\\f280"}.ri-video-fill:before{content:"\\f281"}.ri-video-line:before{content:"\\f282"}.ri-video-upload-fill:before{content:"\\f283"}.ri-video-upload-line:before{content:"\\f284"}.ri-vidicon-2-fill:before{content:"\\f285"}.ri-vidicon-2-line:before{content:"\\f286"}.ri-vidicon-fill:before{content:"\\f287"}.ri-vidicon-line:before{content:"\\f288"}.ri-vimeo-fill:before{content:"\\f289"}.ri-vimeo-line:before{content:"\\f28a"}.ri-vip-crown-2-fill:before{content:"\\f28b"}.ri-vip-crown-2-line:before{content:"\\f28c"}.ri-vip-crown-fill:before{content:"\\f28d"}.ri-vip-crown-line:before{content:"\\f28e"}.ri-vip-diamond-fill:before{content:"\\f28f"}.ri-vip-diamond-line:before{content:"\\f290"}.ri-vip-fill:before{content:"\\f291"}.ri-vip-line:before{content:"\\f292"}.ri-virus-fill:before{content:"\\f293"}.ri-virus-line:before{content:"\\f294"}.ri-visa-fill:before{content:"\\f295"}.ri-visa-line:before{content:"\\f296"}.ri-voice-recognition-fill:before{content:"\\f297"}.ri-voice-recognition-line:before{content:"\\f298"}.ri-voiceprint-fill:before{content:"\\f299"}.ri-voiceprint-line:before{content:"\\f29a"}.ri-volume-down-fill:before{content:"\\f29b"}.ri-volume-down-line:before{content:"\\f29c"}.ri-volume-mute-fill:before{content:"\\f29d"}.ri-volume-mute-line:before{content:"\\f29e"}.ri-volume-off-vibrate-fill:before{content:"\\f29f"}.ri-volume-off-vibrate-line:before{content:"\\f2a0"}.ri-volume-up-fill:before{content:"\\f2a1"}.ri-volume-up-line:before{content:"\\f2a2"}.ri-volume-vibrate-fill:before{content:"\\f2a3"}.ri-volume-vibrate-line:before{content:"\\f2a4"}.ri-vuejs-fill:before{content:"\\f2a5"}.ri-vuejs-line:before{content:"\\f2a6"}.ri-walk-fill:before{content:"\\f2a7"}.ri-walk-line:before{content:"\\f2a8"}.ri-wallet-2-fill:before{content:"\\f2a9"}.ri-wallet-2-line:before{content:"\\f2aa"}.ri-wallet-3-fill:before{content:"\\f2ab"}.ri-wallet-3-line:before{content:"\\f2ac"}.ri-wallet-fill:before{content:"\\f2ad"}.ri-wallet-line:before{content:"\\f2ae"}.ri-water-flash-fill:before{content:"\\f2af"}.ri-water-flash-line:before{content:"\\f2b0"}.ri-webcam-fill:before{content:"\\f2b1"}.ri-webcam-line:before{content:"\\f2b2"}.ri-wechat-2-fill:before{content:"\\f2b3"}.ri-wechat-2-line:before{content:"\\f2b4"}.ri-wechat-fill:before{content:"\\f2b5"}.ri-wechat-line:before{content:"\\f2b6"}.ri-wechat-pay-fill:before{content:"\\f2b7"}.ri-wechat-pay-line:before{content:"\\f2b8"}.ri-weibo-fill:before{content:"\\f2b9"}.ri-weibo-line:before{content:"\\f2ba"}.ri-whatsapp-fill:before{content:"\\f2bb"}.ri-whatsapp-line:before{content:"\\f2bc"}.ri-wheelchair-fill:before{content:"\\f2bd"}.ri-wheelchair-line:before{content:"\\f2be"}.ri-wifi-fill:before{content:"\\f2bf"}.ri-wifi-line:before{content:"\\f2c0"}.ri-wifi-off-fill:before{content:"\\f2c1"}.ri-wifi-off-line:before{content:"\\f2c2"}.ri-window-2-fill:before{content:"\\f2c3"}.ri-window-2-line:before{content:"\\f2c4"}.ri-window-fill:before{content:"\\f2c5"}.ri-window-line:before{content:"\\f2c6"}.ri-windows-fill:before{content:"\\f2c7"}.ri-windows-line:before{content:"\\f2c8"}.ri-windy-fill:before{content:"\\f2c9"}.ri-windy-line:before{content:"\\f2ca"}.ri-wireless-charging-fill:before{content:"\\f2cb"}.ri-wireless-charging-line:before{content:"\\f2cc"}.ri-women-fill:before{content:"\\f2cd"}.ri-women-line:before{content:"\\f2ce"}.ri-wubi-input:before{content:"\\f2cf"}.ri-xbox-fill:before{content:"\\f2d0"}.ri-xbox-line:before{content:"\\f2d1"}.ri-xing-fill:before{content:"\\f2d2"}.ri-xing-line:before{content:"\\f2d3"}.ri-youtube-fill:before{content:"\\f2d4"}.ri-youtube-line:before{content:"\\f2d5"}.ri-zcool-fill:before{content:"\\f2d6"}.ri-zcool-line:before{content:"\\f2d7"}.ri-zhihu-fill:before{content:"\\f2d8"}.ri-zhihu-line:before{content:"\\f2d9"}.ri-zoom-in-fill:before{content:"\\f2da"}.ri-zoom-in-line:before{content:"\\f2db"}.ri-zoom-out-fill:before{content:"\\f2dc"}.ri-zoom-out-line:before{content:"\\f2dd"}.ri-zzz-fill:before{content:"\\f2de"}.ri-zzz-line:before{content:"\\f2df"}.ri-arrow-down-double-fill:before{content:"\\f2e0"}.ri-arrow-down-double-line:before{content:"\\f2e1"}.ri-arrow-left-double-fill:before{content:"\\f2e2"}.ri-arrow-left-double-line:before{content:"\\f2e3"}.ri-arrow-right-double-fill:before{content:"\\f2e4"}.ri-arrow-right-double-line:before{content:"\\f2e5"}.ri-arrow-turn-back-fill:before{content:"\\f2e6"}.ri-arrow-turn-back-line:before{content:"\\f2e7"}.ri-arrow-turn-forward-fill:before{content:"\\f2e8"}.ri-arrow-turn-forward-line:before{content:"\\f2e9"}.ri-arrow-up-double-fill:before{content:"\\f2ea"}.ri-arrow-up-double-line:before{content:"\\f2eb"}.ri-bard-fill:before{content:"\\f2ec"}.ri-bard-line:before{content:"\\f2ed"}.ri-bootstrap-fill:before{content:"\\f2ee"}.ri-bootstrap-line:before{content:"\\f2ef"}.ri-box-1-fill:before{content:"\\f2f0"}.ri-box-1-line:before{content:"\\f2f1"}.ri-box-2-fill:before{content:"\\f2f2"}.ri-box-2-line:before{content:"\\f2f3"}.ri-box-3-fill:before{content:"\\f2f4"}.ri-box-3-line:before{content:"\\f2f5"}.ri-brain-fill:before{content:"\\f2f6"}.ri-brain-line:before{content:"\\f2f7"}.ri-candle-fill:before{content:"\\f2f8"}.ri-candle-line:before{content:"\\f2f9"}.ri-cash-fill:before{content:"\\f2fa"}.ri-cash-line:before{content:"\\f2fb"}.ri-contract-left-fill:before{content:"\\f2fc"}.ri-contract-left-line:before{content:"\\f2fd"}.ri-contract-left-right-fill:before{content:"\\f2fe"}.ri-contract-left-right-line:before{content:"\\f2ff"}.ri-contract-right-fill:before{content:"\\f300"}.ri-contract-right-line:before{content:"\\f301"}.ri-contract-up-down-fill:before{content:"\\f302"}.ri-contract-up-down-line:before{content:"\\f303"}.ri-copilot-fill:before{content:"\\f304"}.ri-copilot-line:before{content:"\\f305"}.ri-corner-down-left-fill:before{content:"\\f306"}.ri-corner-down-left-line:before{content:"\\f307"}.ri-corner-down-right-fill:before{content:"\\f308"}.ri-corner-down-right-line:before{content:"\\f309"}.ri-corner-left-down-fill:before{content:"\\f30a"}.ri-corner-left-down-line:before{content:"\\f30b"}.ri-corner-left-up-fill:before{content:"\\f30c"}.ri-corner-left-up-line:before{content:"\\f30d"}.ri-corner-right-down-fill:before{content:"\\f30e"}.ri-corner-right-down-line:before{content:"\\f30f"}.ri-corner-right-up-fill:before{content:"\\f310"}.ri-corner-right-up-line:before{content:"\\f311"}.ri-corner-up-left-double-fill:before{content:"\\f312"}.ri-corner-up-left-double-line:before{content:"\\f313"}.ri-corner-up-left-fill:before{content:"\\f314"}.ri-corner-up-left-line:before{content:"\\f315"}.ri-corner-up-right-double-fill:before{content:"\\f316"}.ri-corner-up-right-double-line:before{content:"\\f317"}.ri-corner-up-right-fill:before{content:"\\f318"}.ri-corner-up-right-line:before{content:"\\f319"}.ri-cross-fill:before{content:"\\f31a"}.ri-cross-line:before{content:"\\f31b"}.ri-edge-new-fill:before{content:"\\f31c"}.ri-edge-new-line:before{content:"\\f31d"}.ri-equal-fill:before{content:"\\f31e"}.ri-equal-line:before{content:"\\f31f"}.ri-expand-left-fill:before{content:"\\f320"}.ri-expand-left-line:before{content:"\\f321"}.ri-expand-left-right-fill:before{content:"\\f322"}.ri-expand-left-right-line:before{content:"\\f323"}.ri-expand-right-fill:before{content:"\\f324"}.ri-expand-right-line:before{content:"\\f325"}.ri-expand-up-down-fill:before{content:"\\f326"}.ri-expand-up-down-line:before{content:"\\f327"}.ri-flickr-fill:before{content:"\\f328"}.ri-flickr-line:before{content:"\\f329"}.ri-forward-10-fill:before{content:"\\f32a"}.ri-forward-10-line:before{content:"\\f32b"}.ri-forward-15-fill:before{content:"\\f32c"}.ri-forward-15-line:before{content:"\\f32d"}.ri-forward-30-fill:before{content:"\\f32e"}.ri-forward-30-line:before{content:"\\f32f"}.ri-forward-5-fill:before{content:"\\f330"}.ri-forward-5-line:before{content:"\\f331"}.ri-graduation-cap-fill:before{content:"\\f332"}.ri-graduation-cap-line:before{content:"\\f333"}.ri-home-office-fill:before{content:"\\f334"}.ri-home-office-line:before{content:"\\f335"}.ri-hourglass-2-fill:before{content:"\\f336"}.ri-hourglass-2-line:before{content:"\\f337"}.ri-hourglass-fill:before{content:"\\f338"}.ri-hourglass-line:before{content:"\\f339"}.ri-javascript-fill:before{content:"\\f33a"}.ri-javascript-line:before{content:"\\f33b"}.ri-loop-left-fill:before{content:"\\f33c"}.ri-loop-left-line:before{content:"\\f33d"}.ri-loop-right-fill:before{content:"\\f33e"}.ri-loop-right-line:before{content:"\\f33f"}.ri-memories-fill:before{content:"\\f340"}.ri-memories-line:before{content:"\\f341"}.ri-meta-fill:before{content:"\\f342"}.ri-meta-line:before{content:"\\f343"}.ri-microsoft-loop-fill:before{content:"\\f344"}.ri-microsoft-loop-line:before{content:"\\f345"}.ri-nft-fill:before{content:"\\f346"}.ri-nft-line:before{content:"\\f347"}.ri-notion-fill:before{content:"\\f348"}.ri-notion-line:before{content:"\\f349"}.ri-openai-fill:before{content:"\\f34a"}.ri-openai-line:before{content:"\\f34b"}.ri-overline:before{content:"\\f34c"}.ri-p2p-fill:before{content:"\\f34d"}.ri-p2p-line:before{content:"\\f34e"}.ri-presentation-fill:before{content:"\\f34f"}.ri-presentation-line:before{content:"\\f350"}.ri-replay-10-fill:before{content:"\\f351"}.ri-replay-10-line:before{content:"\\f352"}.ri-replay-15-fill:before{content:"\\f353"}.ri-replay-15-line:before{content:"\\f354"}.ri-replay-30-fill:before{content:"\\f355"}.ri-replay-30-line:before{content:"\\f356"}.ri-replay-5-fill:before{content:"\\f357"}.ri-replay-5-line:before{content:"\\f358"}.ri-school-fill:before{content:"\\f359"}.ri-school-line:before{content:"\\f35a"}.ri-shining-2-fill:before{content:"\\f35b"}.ri-shining-2-line:before{content:"\\f35c"}.ri-shining-fill:before{content:"\\f35d"}.ri-shining-line:before{content:"\\f35e"}.ri-sketching:before{content:"\\f35f"}.ri-skip-down-fill:before{content:"\\f360"}.ri-skip-down-line:before{content:"\\f361"}.ri-skip-left-fill:before{content:"\\f362"}.ri-skip-left-line:before{content:"\\f363"}.ri-skip-right-fill:before{content:"\\f364"}.ri-skip-right-line:before{content:"\\f365"}.ri-skip-up-fill:before{content:"\\f366"}.ri-skip-up-line:before{content:"\\f367"}.ri-slow-down-fill:before{content:"\\f368"}.ri-slow-down-line:before{content:"\\f369"}.ri-sparkling-2-fill:before{content:"\\f36a"}.ri-sparkling-2-line:before{content:"\\f36b"}.ri-sparkling-fill:before{content:"\\f36c"}.ri-sparkling-line:before{content:"\\f36d"}.ri-speak-fill:before{content:"\\f36e"}.ri-speak-line:before{content:"\\f36f"}.ri-speed-up-fill:before{content:"\\f370"}.ri-speed-up-line:before{content:"\\f371"}.ri-tiktok-fill:before{content:"\\f372"}.ri-tiktok-line:before{content:"\\f373"}.ri-token-swap-fill:before{content:"\\f374"}.ri-token-swap-line:before{content:"\\f375"}.ri-unpin-fill:before{content:"\\f376"}.ri-unpin-line:before{content:"\\f377"}.ri-wechat-channels-fill:before{content:"\\f378"}.ri-wechat-channels-line:before{content:"\\f379"}.ri-wordpress-fill:before{content:"\\f37a"}.ri-wordpress-line:before{content:"\\f37b"}.ri-blender-fill:before{content:"\\f37c"}.ri-blender-line:before{content:"\\f37d"}.ri-emoji-sticker-fill:before{content:"\\f37e"}.ri-emoji-sticker-line:before{content:"\\f37f"}.ri-git-close-pull-request-fill:before{content:"\\f380"}.ri-git-close-pull-request-line:before{content:"\\f381"}.ri-instance-fill:before{content:"\\f382"}.ri-instance-line:before{content:"\\f383"}.ri-megaphone-fill:before{content:"\\f384"}.ri-megaphone-line:before{content:"\\f385"}.ri-pass-expired-fill:before{content:"\\f386"}.ri-pass-expired-line:before{content:"\\f387"}.ri-pass-pending-fill:before{content:"\\f388"}.ri-pass-pending-line:before{content:"\\f389"}.ri-pass-valid-fill:before{content:"\\f38a"}.ri-pass-valid-line:before{content:"\\f38b"}.ri-ai-generate:before{content:"\\f38c"}.ri-calendar-close-fill:before{content:"\\f38d"}.ri-calendar-close-line:before{content:"\\f38e"}.ri-draggable:before{content:"\\f38f"}.ri-font-family:before{content:"\\f390"}.ri-font-mono:before{content:"\\f391"}.ri-font-sans-serif:before{content:"\\f392"}.ri-hard-drive-3-fill:before{content:"\\f393"}.ri-hard-drive-3-line:before{content:"\\f394"}.ri-kick-fill:before{content:"\\f395"}.ri-kick-line:before{content:"\\f396"}.ri-list-check-3:before{content:"\\f397"}.ri-list-indefinite:before{content:"\\f398"}.ri-list-ordered-2:before{content:"\\f399"}.ri-list-radio:before{content:"\\f39a"}.ri-openbase-fill:before{content:"\\f39b"}.ri-openbase-line:before{content:"\\f39c"}.ri-planet-fill:before{content:"\\f39d"}.ri-planet-line:before{content:"\\f39e"}.ri-prohibited-fill:before{content:"\\f39f"}.ri-prohibited-line:before{content:"\\f3a0"}.ri-quote-text:before{content:"\\f3a1"}.ri-seo-fill:before{content:"\\f3a2"}.ri-seo-line:before{content:"\\f3a3"}.ri-slash-commands:before{content:"\\f3a4"}.ri-archive-2-fill:before{content:"\\f3a5"}.ri-archive-2-line:before{content:"\\f3a6"}.ri-inbox-2-fill:before{content:"\\f3a7"}.ri-inbox-2-line:before{content:"\\f3a8"}.ri-shake-hands-fill:before{content:"\\f3a9"}.ri-shake-hands-line:before{content:"\\f3aa"}.ri-supabase-fill:before{content:"\\f3ab"}.ri-supabase-line:before{content:"\\f3ac"}.ri-water-percent-fill:before{content:"\\f3ad"}.ri-water-percent-line:before{content:"\\f3ae"}.ri-yuque-fill:before{content:"\\f3af"}.ri-yuque-line:before{content:"\\f3b0"}.ri-crosshair-2-fill:before{content:"\\f3b1"}.ri-crosshair-2-line:before{content:"\\f3b2"}.ri-crosshair-fill:before{content:"\\f3b3"}.ri-crosshair-line:before{content:"\\f3b4"}.ri-file-close-fill:before{content:"\\f3b5"}.ri-file-close-line:before{content:"\\f3b6"}.ri-infinity-fill:before{content:"\\f3b7"}.ri-infinity-line:before{content:"\\f3b8"}.ri-rfid-fill:before{content:"\\f3b9"}.ri-rfid-line:before{content:"\\f3ba"}.ri-slash-commands-2:before{content:"\\f3bb"}.ri-user-forbid-fill:before{content:"\\f3bc"}.ri-user-forbid-line:before{content:"\\f3bd"}.ri-beer-fill:before{content:"\\f3be"}.ri-beer-line:before{content:"\\f3bf"}.ri-circle-fill:before{content:"\\f3c0"}.ri-circle-line:before{content:"\\f3c1"}.ri-dropdown-list:before{content:"\\f3c2"}.ri-file-image-fill:before{content:"\\f3c3"}.ri-file-image-line:before{content:"\\f3c4"}.ri-file-pdf-2-fill:before{content:"\\f3c5"}.ri-file-pdf-2-line:before{content:"\\f3c6"}.ri-file-video-fill:before{content:"\\f3c7"}.ri-file-video-line:before{content:"\\f3c8"}.ri-folder-image-fill:before{content:"\\f3c9"}.ri-folder-image-line:before{content:"\\f3ca"}.ri-folder-video-fill:before{content:"\\f3cb"}.ri-folder-video-line:before{content:"\\f3cc"}.ri-hexagon-fill:before{content:"\\f3cd"}.ri-hexagon-line:before{content:"\\f3ce"}.ri-menu-search-fill:before{content:"\\f3cf"}.ri-menu-search-line:before{content:"\\f3d0"}.ri-octagon-fill:before{content:"\\f3d1"}.ri-octagon-line:before{content:"\\f3d2"}.ri-pentagon-fill:before{content:"\\f3d3"}.ri-pentagon-line:before{content:"\\f3d4"}.ri-rectangle-fill:before{content:"\\f3d5"}.ri-rectangle-line:before{content:"\\f3d6"}.ri-robot-2-fill:before{content:"\\f3d7"}.ri-robot-2-line:before{content:"\\f3d8"}.ri-shapes-fill:before{content:"\\f3d9"}.ri-shapes-line:before{content:"\\f3da"}.ri-square-fill:before{content:"\\f3db"}.ri-square-line:before{content:"\\f3dc"}.ri-tent-fill:before{content:"\\f3dd"}.ri-tent-line:before{content:"\\f3de"}.ri-threads-fill:before{content:"\\f3df"}.ri-threads-line:before{content:"\\f3e0"}.ri-tree-fill:before{content:"\\f3e1"}.ri-tree-line:before{content:"\\f3e2"}.ri-triangle-fill:before{content:"\\f3e3"}.ri-triangle-line:before{content:"\\f3e4"}.ri-twitter-x-fill:before{content:"\\f3e5"}.ri-twitter-x-line:before{content:"\\f3e6"}.ri-verified-badge-fill:before{content:"\\f3e7"}.ri-verified-badge-line:before{content:"\\f3e8"}.ri-armchair-fill:before{content:"\\f3e9"}.ri-armchair-line:before{content:"\\f3ea"}.ri-bnb-fill:before{content:"\\f3eb"}.ri-bnb-line:before{content:"\\f3ec"}.ri-bread-fill:before{content:"\\f3ed"}.ri-bread-line:before{content:"\\f3ee"}.ri-btc-fill:before{content:"\\f3ef"}.ri-btc-line:before{content:"\\f3f0"}.ri-calendar-schedule-fill:before{content:"\\f3f1"}.ri-calendar-schedule-line:before{content:"\\f3f2"}.ri-dice-1-fill:before{content:"\\f3f3"}.ri-dice-1-line:before{content:"\\f3f4"}.ri-dice-2-fill:before{content:"\\f3f5"}.ri-dice-2-line:before{content:"\\f3f6"}.ri-dice-3-fill:before{content:"\\f3f7"}.ri-dice-3-line:before{content:"\\f3f8"}.ri-dice-4-fill:before{content:"\\f3f9"}.ri-dice-4-line:before{content:"\\f3fa"}.ri-dice-5-fill:before{content:"\\f3fb"}.ri-dice-5-line:before{content:"\\f3fc"}.ri-dice-6-fill:before{content:"\\f3fd"}.ri-dice-6-line:before{content:"\\f3fe"}.ri-dice-fill:before{content:"\\f3ff"}.ri-dice-line:before{content:"\\f400"}.ri-drinks-fill:before{content:"\\f401"}.ri-drinks-line:before{content:"\\f402"}.ri-equalizer-2-fill:before{content:"\\f403"}.ri-equalizer-2-line:before{content:"\\f404"}.ri-equalizer-3-fill:before{content:"\\f405"}.ri-equalizer-3-line:before{content:"\\f406"}.ri-eth-fill:before{content:"\\f407"}.ri-eth-line:before{content:"\\f408"}.ri-flower-fill:before{content:"\\f409"}.ri-flower-line:before{content:"\\f40a"}.ri-glasses-2-fill:before{content:"\\f40b"}.ri-glasses-2-line:before{content:"\\f40c"}.ri-glasses-fill:before{content:"\\f40d"}.ri-glasses-line:before{content:"\\f40e"}.ri-goggles-fill:before{content:"\\f40f"}.ri-goggles-line:before{content:"\\f410"}.ri-image-circle-fill:before{content:"\\f411"}.ri-image-circle-line:before{content:"\\f412"}.ri-info-i:before{content:"\\f413"}.ri-money-rupee-circle-fill:before{content:"\\f414"}.ri-money-rupee-circle-line:before{content:"\\f415"}.ri-news-fill:before{content:"\\f416"}.ri-news-line:before{content:"\\f417"}.ri-robot-3-fill:before{content:"\\f418"}.ri-robot-3-line:before{content:"\\f419"}.ri-share-2-fill:before{content:"\\f41a"}.ri-share-2-line:before{content:"\\f41b"}.ri-sofa-fill:before{content:"\\f41c"}.ri-sofa-line:before{content:"\\f41d"}.ri-svelte-fill:before{content:"\\f41e"}.ri-svelte-line:before{content:"\\f41f"}.ri-vk-fill:before{content:"\\f420"}.ri-vk-line:before{content:"\\f421"}.ri-xrp-fill:before{content:"\\f422"}.ri-xrp-line:before{content:"\\f423"}.ri-xtz-fill:before{content:"\\f424"}.ri-xtz-line:before{content:"\\f425"}.ri-archive-stack-fill:before{content:"\\f426"}.ri-archive-stack-line:before{content:"\\f427"}.ri-bowl-fill:before{content:"\\f428"}.ri-bowl-line:before{content:"\\f429"}.ri-calendar-view:before{content:"\\f42a"}.ri-carousel-view:before{content:"\\f42b"}.ri-code-block:before{content:"\\f42c"}.ri-color-filter-fill:before{content:"\\f42d"}.ri-color-filter-line:before{content:"\\f42e"}.ri-contacts-book-3-fill:before{content:"\\f42f"}.ri-contacts-book-3-line:before{content:"\\f430"}.ri-contract-fill:before{content:"\\f431"}.ri-contract-line:before{content:"\\f432"}.ri-drinks-2-fill:before{content:"\\f433"}.ri-drinks-2-line:before{content:"\\f434"}.ri-export-fill:before{content:"\\f435"}.ri-export-line:before{content:"\\f436"}.ri-file-check-fill:before{content:"\\f437"}.ri-file-check-line:before{content:"\\f438"}.ri-focus-mode:before{content:"\\f439"}.ri-folder-6-fill:before{content:"\\f43a"}.ri-folder-6-line:before{content:"\\f43b"}.ri-folder-check-fill:before{content:"\\f43c"}.ri-folder-check-line:before{content:"\\f43d"}.ri-folder-close-fill:before{content:"\\f43e"}.ri-folder-close-line:before{content:"\\f43f"}.ri-folder-cloud-fill:before{content:"\\f440"}.ri-folder-cloud-line:before{content:"\\f441"}.ri-gallery-view-2:before{content:"\\f442"}.ri-gallery-view:before{content:"\\f443"}.ri-hand:before{content:"\\f444"}.ri-import-fill:before{content:"\\f445"}.ri-import-line:before{content:"\\f446"}.ri-information-2-fill:before{content:"\\f447"}.ri-information-2-line:before{content:"\\f448"}.ri-kanban-view-2:before{content:"\\f449"}.ri-kanban-view:before{content:"\\f44a"}.ri-list-view:before{content:"\\f44b"}.ri-lock-star-fill:before{content:"\\f44c"}.ri-lock-star-line:before{content:"\\f44d"}.ri-puzzle-2-fill:before{content:"\\f44e"}.ri-puzzle-2-line:before{content:"\\f44f"}.ri-puzzle-fill:before{content:"\\f450"}.ri-puzzle-line:before{content:"\\f451"}.ri-ram-2-fill:before{content:"\\f452"}.ri-ram-2-line:before{content:"\\f453"}.ri-ram-fill:before{content:"\\f454"}.ri-ram-line:before{content:"\\f455"}.ri-receipt-fill:before{content:"\\f456"}.ri-receipt-line:before{content:"\\f457"}.ri-shadow-fill:before{content:"\\f458"}.ri-shadow-line:before{content:"\\f459"}.ri-sidebar-fold-fill:before{content:"\\f45a"}.ri-sidebar-fold-line:before{content:"\\f45b"}.ri-sidebar-unfold-fill:before{content:"\\f45c"}.ri-sidebar-unfold-line:before{content:"\\f45d"}.ri-slideshow-view:before{content:"\\f45e"}.ri-sort-alphabet-asc:before{content:"\\f45f"}.ri-sort-alphabet-desc:before{content:"\\f460"}.ri-sort-number-asc:before{content:"\\f461"}.ri-sort-number-desc:before{content:"\\f462"}.ri-stacked-view:before{content:"\\f463"}.ri-sticky-note-add-fill:before{content:"\\f464"}.ri-sticky-note-add-line:before{content:"\\f465"}.ri-swap-2-fill:before{content:"\\f466"}.ri-swap-2-line:before{content:"\\f467"}.ri-swap-3-fill:before{content:"\\f468"}.ri-swap-3-line:before{content:"\\f469"}.ri-table-3:before{content:"\\f46a"}.ri-table-view:before{content:"\\f46b"}.ri-text-block:before{content:"\\f46c"}.ri-text-snippet:before{content:"\\f46d"}.ri-timeline-view:before{content:"\\f46e"}.ri-blogger-fill:before{content:"\\f46f"}.ri-blogger-line:before{content:"\\f470"}.ri-chat-thread-fill:before{content:"\\f471"}.ri-chat-thread-line:before{content:"\\f472"}.ri-discount-percent-fill:before{content:"\\f473"}.ri-discount-percent-line:before{content:"\\f474"}.ri-exchange-2-fill:before{content:"\\f475"}.ri-exchange-2-line:before{content:"\\f476"}.ri-git-fork-fill:before{content:"\\f477"}.ri-git-fork-line:before{content:"\\f478"}.ri-input-field:before{content:"\\f479"}.ri-progress-1-fill:before{content:"\\f47a"}.ri-progress-1-line:before{content:"\\f47b"}.ri-progress-2-fill:before{content:"\\f47c"}.ri-progress-2-line:before{content:"\\f47d"}.ri-progress-3-fill:before{content:"\\f47e"}.ri-progress-3-line:before{content:"\\f47f"}.ri-progress-4-fill:before{content:"\\f480"}.ri-progress-4-line:before{content:"\\f481"}.ri-progress-5-fill:before{content:"\\f482"}.ri-progress-5-line:before{content:"\\f483"}.ri-progress-6-fill:before{content:"\\f484"}.ri-progress-6-line:before{content:"\\f485"}.ri-progress-7-fill:before{content:"\\f486"}.ri-progress-7-line:before{content:"\\f487"}.ri-progress-8-fill:before{content:"\\f488"}.ri-progress-8-line:before{content:"\\f489"}.ri-remix-run-fill:before{content:"\\f48a"}.ri-remix-run-line:before{content:"\\f48b"}.ri-signpost-fill:before{content:"\\f48c"}.ri-signpost-line:before{content:"\\f48d"}.ri-time-zone-fill:before{content:"\\f48e"}.ri-time-zone-line:before{content:"\\f48f"}.ri-arrow-down-wide-fill:before{content:"\\f490"}.ri-arrow-down-wide-line:before{content:"\\f491"}.ri-arrow-left-wide-fill:before{content:"\\f492"}.ri-arrow-left-wide-line:before{content:"\\f493"}.ri-arrow-right-wide-fill:before{content:"\\f494"}.ri-arrow-right-wide-line:before{content:"\\f495"}.ri-arrow-up-wide-fill:before{content:"\\f496"}.ri-arrow-up-wide-line:before{content:"\\f497"}.ri-bluesky-fill:before{content:"\\f498"}.ri-bluesky-line:before{content:"\\f499"}.ri-expand-height-fill:before{content:"\\f49a"}.ri-expand-height-line:before{content:"\\f49b"}.ri-expand-width-fill:before{content:"\\f49c"}.ri-expand-width-line:before{content:"\\f49d"}.ri-forward-end-fill:before{content:"\\f49e"}.ri-forward-end-line:before{content:"\\f49f"}.ri-forward-end-mini-fill:before{content:"\\f4a0"}.ri-forward-end-mini-line:before{content:"\\f4a1"}.ri-friendica-fill:before{content:"\\f4a2"}.ri-friendica-line:before{content:"\\f4a3"}.ri-git-pr-draft-fill:before{content:"\\f4a4"}.ri-git-pr-draft-line:before{content:"\\f4a5"}.ri-play-reverse-fill:before{content:"\\f4a6"}.ri-play-reverse-line:before{content:"\\f4a7"}.ri-play-reverse-mini-fill:before{content:"\\f4a8"}.ri-play-reverse-mini-line:before{content:"\\f4a9"}.ri-rewind-start-fill:before{content:"\\f4aa"}.ri-rewind-start-line:before{content:"\\f4ab"}.ri-rewind-start-mini-fill:before{content:"\\f4ac"}.ri-rewind-start-mini-line:before{content:"\\f4ad"}.ri-scroll-to-bottom-fill:before{content:"\\f4ae"}.ri-scroll-to-bottom-line:before{content:"\\f4af"}.ri-add-large-fill:before{content:"\\f4b0"}.ri-add-large-line:before{content:"\\f4b1"}.ri-aed-electrodes-fill:before{content:"\\f4b2"}.ri-aed-electrodes-line:before{content:"\\f4b3"}.ri-aed-fill:before{content:"\\f4b4"}.ri-aed-line:before{content:"\\f4b5"}.ri-alibaba-cloud-fill:before{content:"\\f4b6"}.ri-alibaba-cloud-line:before{content:"\\f4b7"}.ri-align-item-bottom-fill:before{content:"\\f4b8"}.ri-align-item-bottom-line:before{content:"\\f4b9"}.ri-align-item-horizontal-center-fill:before{content:"\\f4ba"}.ri-align-item-horizontal-center-line:before{content:"\\f4bb"}.ri-align-item-left-fill:before{content:"\\f4bc"}.ri-align-item-left-line:before{content:"\\f4bd"}.ri-align-item-right-fill:before{content:"\\f4be"}.ri-align-item-right-line:before{content:"\\f4bf"}.ri-align-item-top-fill:before{content:"\\f4c0"}.ri-align-item-top-line:before{content:"\\f4c1"}.ri-align-item-vertical-center-fill:before{content:"\\f4c2"}.ri-align-item-vertical-center-line:before{content:"\\f4c3"}.ri-apps-2-add-fill:before{content:"\\f4c4"}.ri-apps-2-add-line:before{content:"\\f4c5"}.ri-close-large-fill:before{content:"\\f4c6"}.ri-close-large-line:before{content:"\\f4c7"}.ri-collapse-diagonal-2-fill:before{content:"\\f4c8"}.ri-collapse-diagonal-2-line:before{content:"\\f4c9"}.ri-collapse-diagonal-fill:before{content:"\\f4ca"}.ri-collapse-diagonal-line:before{content:"\\f4cb"}.ri-dashboard-horizontal-fill:before{content:"\\f4cc"}.ri-dashboard-horizontal-line:before{content:"\\f4cd"}.ri-expand-diagonal-2-fill:before{content:"\\f4ce"}.ri-expand-diagonal-2-line:before{content:"\\f4cf"}.ri-expand-diagonal-fill:before{content:"\\f4d0"}.ri-expand-diagonal-line:before{content:"\\f4d1"}.ri-firebase-fill:before{content:"\\f4d2"}.ri-firebase-line:before{content:"\\f4d3"}.ri-flip-horizontal-2-fill:before{content:"\\f4d4"}.ri-flip-horizontal-2-line:before{content:"\\f4d5"}.ri-flip-horizontal-fill:before{content:"\\f4d6"}.ri-flip-horizontal-line:before{content:"\\f4d7"}.ri-flip-vertical-2-fill:before{content:"\\f4d8"}.ri-flip-vertical-2-line:before{content:"\\f4d9"}.ri-flip-vertical-fill:before{content:"\\f4da"}.ri-flip-vertical-line:before{content:"\\f4db"}.ri-formula:before{content:"\\f4dc"}.ri-function-add-fill:before{content:"\\f4dd"}.ri-function-add-line:before{content:"\\f4de"}.ri-goblet-2-fill:before{content:"\\f4df"}.ri-goblet-2-line:before{content:"\\f4e0"}.ri-golf-ball-fill:before{content:"\\f4e1"}.ri-golf-ball-line:before{content:"\\f4e2"}.ri-group-3-fill:before{content:"\\f4e3"}.ri-group-3-line:before{content:"\\f4e4"}.ri-heart-add-2-fill:before{content:"\\f4e5"}.ri-heart-add-2-line:before{content:"\\f4e6"}.ri-id-card-fill:before{content:"\\f4e7"}.ri-id-card-line:before{content:"\\f4e8"}.ri-information-off-fill:before{content:"\\f4e9"}.ri-information-off-line:before{content:"\\f4ea"}.ri-java-fill:before{content:"\\f4eb"}.ri-java-line:before{content:"\\f4ec"}.ri-layout-grid-2-fill:before{content:"\\f4ed"}.ri-layout-grid-2-line:before{content:"\\f4ee"}.ri-layout-horizontal-fill:before{content:"\\f4ef"}.ri-layout-horizontal-line:before{content:"\\f4f0"}.ri-layout-vertical-fill:before{content:"\\f4f1"}.ri-layout-vertical-line:before{content:"\\f4f2"}.ri-menu-fold-2-fill:before{content:"\\f4f3"}.ri-menu-fold-2-line:before{content:"\\f4f4"}.ri-menu-fold-3-fill:before{content:"\\f4f5"}.ri-menu-fold-3-line:before{content:"\\f4f6"}.ri-menu-fold-4-fill:before{content:"\\f4f7"}.ri-menu-fold-4-line:before{content:"\\f4f8"}.ri-menu-unfold-2-fill:before{content:"\\f4f9"}.ri-menu-unfold-2-line:before{content:"\\f4fa"}.ri-menu-unfold-3-fill:before{content:"\\f4fb"}.ri-menu-unfold-3-line:before{content:"\\f4fc"}.ri-menu-unfold-4-fill:before{content:"\\f4fd"}.ri-menu-unfold-4-line:before{content:"\\f4fe"}.ri-mobile-download-fill:before{content:"\\f4ff"}.ri-mobile-download-line:before{content:"\\f500"}.ri-nextjs-fill:before{content:"\\f501"}.ri-nextjs-line:before{content:"\\f502"}.ri-nodejs-fill:before{content:"\\f503"}.ri-nodejs-line:before{content:"\\f504"}.ri-pause-large-fill:before{content:"\\f505"}.ri-pause-large-line:before{content:"\\f506"}.ri-play-large-fill:before{content:"\\f507"}.ri-play-large-line:before{content:"\\f508"}.ri-play-reverse-large-fill:before{content:"\\f509"}.ri-play-reverse-large-line:before{content:"\\f50a"}.ri-police-badge-fill:before{content:"\\f50b"}.ri-police-badge-line:before{content:"\\f50c"}.ri-prohibited-2-fill:before{content:"\\f50d"}.ri-prohibited-2-line:before{content:"\\f50e"}.ri-shopping-bag-4-fill:before{content:"\\f50f"}.ri-shopping-bag-4-line:before{content:"\\f510"}.ri-snowflake-fill:before{content:"\\f511"}.ri-snowflake-line:before{content:"\\f512"}.ri-square-root:before{content:"\\f513"}.ri-stop-large-fill:before{content:"\\f514"}.ri-stop-large-line:before{content:"\\f515"}.ri-tailwind-css-fill:before{content:"\\f516"}.ri-tailwind-css-line:before{content:"\\f517"}.ri-tooth-fill:before{content:"\\f518"}.ri-tooth-line:before{content:"\\f519"}.ri-video-off-fill:before{content:"\\f51a"}.ri-video-off-line:before{content:"\\f51b"}.ri-video-on-fill:before{content:"\\f51c"}.ri-video-on-line:before{content:"\\f51d"}.ri-webhook-fill:before{content:"\\f51e"}.ri-webhook-line:before{content:"\\f51f"}.ri-weight-fill:before{content:"\\f520"}.ri-weight-line:before{content:"\\f521"}.ri-book-shelf-fill:before{content:"\\f522"}.ri-book-shelf-line:before{content:"\\f523"}.ri-brain-2-fill:before{content:"\\f524"}.ri-brain-2-line:before{content:"\\f525"}.ri-chat-search-fill:before{content:"\\f526"}.ri-chat-search-line:before{content:"\\f527"}.ri-chat-unread-fill:before{content:"\\f528"}.ri-chat-unread-line:before{content:"\\f529"}.ri-collapse-horizontal-fill:before{content:"\\f52a"}.ri-collapse-horizontal-line:before{content:"\\f52b"}.ri-collapse-vertical-fill:before{content:"\\f52c"}.ri-collapse-vertical-line:before{content:"\\f52d"}.ri-dna-fill:before{content:"\\f52e"}.ri-dna-line:before{content:"\\f52f"}.ri-dropper-fill:before{content:"\\f530"}.ri-dropper-line:before{content:"\\f531"}.ri-expand-diagonal-s-2-fill:before{content:"\\f532"}.ri-expand-diagonal-s-2-line:before{content:"\\f533"}.ri-expand-diagonal-s-fill:before{content:"\\f534"}.ri-expand-diagonal-s-line:before{content:"\\f535"}.ri-expand-horizontal-fill:before{content:"\\f536"}.ri-expand-horizontal-line:before{content:"\\f537"}.ri-expand-horizontal-s-fill:before{content:"\\f538"}.ri-expand-horizontal-s-line:before{content:"\\f539"}.ri-expand-vertical-fill:before{content:"\\f53a"}.ri-expand-vertical-line:before{content:"\\f53b"}.ri-expand-vertical-s-fill:before{content:"\\f53c"}.ri-expand-vertical-s-line:before{content:"\\f53d"}.ri-gemini-fill:before{content:"\\f53e"}.ri-gemini-line:before{content:"\\f53f"}.ri-reset-left-fill:before{content:"\\f540"}.ri-reset-left-line:before{content:"\\f541"}.ri-reset-right-fill:before{content:"\\f542"}.ri-reset-right-line:before{content:"\\f543"}.ri-stairs-fill:before{content:"\\f544"}.ri-stairs-line:before{content:"\\f545"}.ri-telegram-2-fill:before{content:"\\f546"}.ri-telegram-2-line:before{content:"\\f547"}.ri-triangular-flag-fill:before{content:"\\f548"}.ri-triangular-flag-line:before{content:"\\f549"}.ri-user-minus-fill:before{content:"\\f54a"}.ri-user-minus-line:before{content:"\\f54b"}.ri-account-box-2-fill:before{content:"\\f54c"}.ri-account-box-2-line:before{content:"\\f54d"}.ri-account-circle-2-fill:before{content:"\\f54e"}.ri-account-circle-2-line:before{content:"\\f54f"}.ri-alarm-snooze-fill:before{content:"\\f550"}.ri-alarm-snooze-line:before{content:"\\f551"}.ri-arrow-down-box-fill:before{content:"\\f552"}.ri-arrow-down-box-line:before{content:"\\f553"}.ri-arrow-left-box-fill:before{content:"\\f554"}.ri-arrow-left-box-line:before{content:"\\f555"}.ri-arrow-left-down-box-fill:before{content:"\\f556"}.ri-arrow-left-down-box-line:before{content:"\\f557"}.ri-arrow-left-up-box-fill:before{content:"\\f558"}.ri-arrow-left-up-box-line:before{content:"\\f559"}.ri-arrow-right-box-fill:before{content:"\\f55a"}.ri-arrow-right-box-line:before{content:"\\f55b"}.ri-arrow-right-down-box-fill:before{content:"\\f55c"}.ri-arrow-right-down-box-line:before{content:"\\f55d"}.ri-arrow-right-up-box-fill:before{content:"\\f55e"}.ri-arrow-right-up-box-line:before{content:"\\f55f"}.ri-arrow-up-box-fill:before{content:"\\f560"}.ri-arrow-up-box-line:before{content:"\\f561"}.ri-bar-chart-box-ai-fill:before{content:"\\f562"}.ri-bar-chart-box-ai-line:before{content:"\\f563"}.ri-brush-ai-fill:before{content:"\\f564"}.ri-brush-ai-line:before{content:"\\f565"}.ri-camera-ai-fill:before{content:"\\f566"}.ri-camera-ai-line:before{content:"\\f567"}.ri-chat-ai-fill:before{content:"\\f568"}.ri-chat-ai-line:before{content:"\\f569"}.ri-chat-smile-ai-fill:before{content:"\\f56a"}.ri-chat-smile-ai-line:before{content:"\\f56b"}.ri-chat-voice-ai-fill:before{content:"\\f56c"}.ri-chat-voice-ai-line:before{content:"\\f56d"}.ri-code-ai-fill:before{content:"\\f56e"}.ri-code-ai-line:before{content:"\\f56f"}.ri-color-filter-ai-fill:before{content:"\\f570"}.ri-color-filter-ai-line:before{content:"\\f571"}.ri-custom-size:before{content:"\\f572"}.ri-fediverse-fill:before{content:"\\f573"}.ri-fediverse-line:before{content:"\\f574"}.ri-flag-off-fill:before{content:"\\f575"}.ri-flag-off-line:before{content:"\\f576"}.ri-home-9-fill:before{content:"\\f577"}.ri-home-9-line:before{content:"\\f578"}.ri-image-ai-fill:before{content:"\\f579"}.ri-image-ai-line:before{content:"\\f57a"}.ri-image-circle-ai-fill:before{content:"\\f57b"}.ri-image-circle-ai-line:before{content:"\\f57c"}.ri-info-card-fill:before{content:"\\f57d"}.ri-info-card-line:before{content:"\\f57e"}.ri-landscape-ai-fill:before{content:"\\f57f"}.ri-landscape-ai-line:before{content:"\\f580"}.ri-letter-spacing-2:before{content:"\\f581"}.ri-line-height-2:before{content:"\\f582"}.ri-mail-ai-fill:before{content:"\\f583"}.ri-mail-ai-line:before{content:"\\f584"}.ri-mic-2-ai-fill:before{content:"\\f585"}.ri-mic-2-ai-line:before{content:"\\f586"}.ri-mic-ai-fill:before{content:"\\f587"}.ri-mic-ai-line:before{content:"\\f588"}.ri-movie-ai-fill:before{content:"\\f589"}.ri-movie-ai-line:before{content:"\\f58a"}.ri-music-ai-fill:before{content:"\\f58b"}.ri-music-ai-line:before{content:"\\f58c"}.ri-notification-snooze-fill:before{content:"\\f58d"}.ri-notification-snooze-line:before{content:"\\f58e"}.ri-php-fill:before{content:"\\f58f"}.ri-php-line:before{content:"\\f590"}.ri-pix-fill:before{content:"\\f591"}.ri-pix-line:before{content:"\\f592"}.ri-pulse-ai-fill:before{content:"\\f593"}.ri-pulse-ai-line:before{content:"\\f594"}.ri-quill-pen-ai-fill:before{content:"\\f595"}.ri-quill-pen-ai-line:before{content:"\\f596"}.ri-speak-ai-fill:before{content:"\\f597"}.ri-speak-ai-line:before{content:"\\f598"}.ri-star-off-fill:before{content:"\\f599"}.ri-star-off-line:before{content:"\\f59a"}.ri-translate-ai-2:before{content:"\\f59b"}.ri-translate-ai:before{content:"\\f59c"}.ri-user-community-fill:before{content:"\\f59d"}.ri-user-community-line:before{content:"\\f59e"}.ri-vercel-fill:before{content:"\\f59f"}.ri-vercel-line:before{content:"\\f5a0"}.ri-video-ai-fill:before{content:"\\f5a1"}.ri-video-ai-line:before{content:"\\f5a2"}.ri-video-on-ai-fill:before{content:"\\f5a3"}.ri-video-on-ai-line:before{content:"\\f5a4"}.ri-voice-ai-fill:before{content:"\\f5a5"}.ri-voice-ai-line:before{content:"\\f5a6"}.ri-ai-generate-2:before{content:"\\f5a7"}.ri-ai-generate-text:before{content:"\\f5a8"}.ri-anthropic-fill:before{content:"\\f5a9"}.ri-anthropic-line:before{content:"\\f5aa"}.ri-apps-2-ai-fill:before{content:"\\f5ab"}.ri-apps-2-ai-line:before{content:"\\f5ac"}.ri-camera-lens-ai-fill:before{content:"\\f5ad"}.ri-camera-lens-ai-line:before{content:"\\f5ae"}.ri-clapperboard-ai-fill:before{content:"\\f5af"}.ri-clapperboard-ai-line:before{content:"\\f5b0"}.ri-claude-fill:before{content:"\\f5b1"}.ri-claude-line:before{content:"\\f5b2"}.ri-closed-captioning-ai-fill:before{content:"\\f5b3"}.ri-closed-captioning-ai-line:before{content:"\\f5b4"}.ri-dvd-ai-fill:before{content:"\\f5b5"}.ri-dvd-ai-line:before{content:"\\f5b6"}.ri-film-ai-fill:before{content:"\\f5b7"}.ri-film-ai-line:before{content:"\\f5b8"}.ri-font-size-ai:before{content:"\\f5b9"}.ri-mixtral-fill:before{content:"\\f5ba"}.ri-mixtral-line:before{content:"\\f5bb"}.ri-movie-2-ai-fill:before{content:"\\f5bc"}.ri-movie-2-ai-line:before{content:"\\f5bd"}.ri-mv-ai-fill:before{content:"\\f5be"}.ri-mv-ai-line:before{content:"\\f5bf"}.ri-perplexity-fill:before{content:"\\f5c0"}.ri-perplexity-line:before{content:"\\f5c1"}.ri-poker-clubs-fill:before{content:"\\f5c2"}.ri-poker-clubs-line:before{content:"\\f5c3"}.ri-poker-diamonds-fill:before{content:"\\f5c4"}.ri-poker-diamonds-line:before{content:"\\f5c5"}.ri-poker-hearts-fill:before{content:"\\f5c6"}.ri-poker-hearts-line:before{content:"\\f5c7"}.ri-poker-spades-fill:before{content:"\\f5c8"}.ri-poker-spades-line:before{content:"\\f5c9"}.ri-safe-3-fill:before{content:"\\f5ca"}.ri-safe-3-line:before{content:"\\f5cb"}.ri-accessibility-fill:before{content:"\\f5cc"}.ri-accessibility-line:before{content:"\\f5cd"}.ri-alarm-add-fill:before{content:"\\f5ce"}.ri-alarm-add-line:before{content:"\\f5cf"}.ri-arrow-down-long-fill:before{content:"\\f5d0"}.ri-arrow-down-long-line:before{content:"\\f5d1"}.ri-arrow-left-down-long-fill:before{content:"\\f5d2"}.ri-arrow-left-down-long-line:before{content:"\\f5d3"}.ri-arrow-left-long-fill:before{content:"\\f5d4"}.ri-arrow-left-long-line:before{content:"\\f5d5"}.ri-arrow-left-up-long-fill:before{content:"\\f5d6"}.ri-arrow-left-up-long-line:before{content:"\\f5d7"}.ri-arrow-right-down-long-fill:before{content:"\\f5d8"}.ri-arrow-right-down-long-line:before{content:"\\f5d9"}.ri-arrow-right-long-fill:before{content:"\\f5da"}.ri-arrow-right-long-line:before{content:"\\f5db"}.ri-arrow-right-up-long-fill:before{content:"\\f5dc"}.ri-arrow-right-up-long-line:before{content:"\\f5dd"}.ri-arrow-up-long-fill:before{content:"\\f5de"}.ri-arrow-up-long-line:before{content:"\\f5df"}.ri-chess-fill:before{content:"\\f5e0"}.ri-chess-line:before{content:"\\f5e1"}.ri-diamond-fill:before{content:"\\f5e2"}.ri-diamond-line:before{content:"\\f5e3"}.ri-diamond-ring-fill:before{content:"\\f5e4"}.ri-diamond-ring-line:before{content:"\\f5e5"}.ri-figma-fill:before{content:"\\f5e6"}.ri-figma-line:before{content:"\\f5e7"}.ri-firefox-browser-fill:before{content:"\\f5e8"}.ri-firefox-browser-line:before{content:"\\f5e9"}.ri-jewelry-fill:before{content:"\\f5ea"}.ri-jewelry-line:before{content:"\\f5eb"}.ri-multi-image-fill:before{content:"\\f5ec"}.ri-multi-image-line:before{content:"\\f5ed"}.ri-no-credit-card-fill:before{content:"\\f5ee"}.ri-no-credit-card-line:before{content:"\\f5ef"}.ri-service-bell-fill:before{content:"\\f5f0"}.ri-service-bell-line:before{content:"\\f5f1"}.ri-ai-agent-fill:before{content:"\\f5f2"}.ri-ai-agent-line:before{content:"\\f5f3"}.ri-ai-generate-2-fill:before{content:"\\f5f4"}.ri-ai-generate-2-line:before{content:"\\f5f5"}.ri-ai-generate-3d-fill:before{content:"\\f5f6"}.ri-ai-generate-3d-line:before{content:"\\f5f7"}.ri-ai:before{content:"\\f5f8"}.ri-apps-ai-fill:before{content:"\\f5f9"}.ri-apps-ai-line:before{content:"\\f5fa"}.ri-atom-fill:before{content:"\\f5fb"}.ri-atom-line:before{content:"\\f5fc"}.ri-book-ai-fill:before{content:"\\f5fd"}.ri-book-ai-line:before{content:"\\f5fe"}.ri-brain-3-fill:before{content:"\\f5ff"}.ri-brain-3-line:before{content:"\\f600"}.ri-brain-ai-3-fill:before{content:"\\f601"}.ri-brain-ai-3-line:before{content:"\\f602"}.ri-brush-ai-3-fill:before{content:"\\f603"}.ri-brush-ai-3-line:before{content:"\\f604"}.ri-camera-4-fill:before{content:"\\f605"}.ri-camera-4-line:before{content:"\\f606"}.ri-camera-ai-2-fill:before{content:"\\f607"}.ri-camera-ai-2-line:before{content:"\\f608"}.ri-chat-ai-2-fill:before{content:"\\f609"}.ri-chat-ai-2-line:before{content:"\\f60a"}.ri-chat-ai-3-fill:before{content:"\\f60b"}.ri-chat-ai-3-line:before{content:"\\f60c"}.ri-chat-ai-4-fill:before{content:"\\f60d"}.ri-chat-ai-4-line:before{content:"\\f60e"}.ri-chat-smile-ai-3-fill:before{content:"\\f60f"}.ri-chat-smile-ai-3-line:before{content:"\\f610"}.ri-deepseek-fill:before{content:"\\f611"}.ri-deepseek-line:before{content:"\\f612"}.ri-file-ai-2-fill:before{content:"\\f613"}.ri-file-ai-2-line:before{content:"\\f614"}.ri-file-ai-fill:before{content:"\\f615"}.ri-file-ai-line:before{content:"\\f616"}.ri-function-ai-fill:before{content:"\\f617"}.ri-function-ai-line:before{content:"\\f618"}.ri-game-2-fill:before{content:"\\f619"}.ri-game-2-line:before{content:"\\f61a"}.ri-goblet-broken-fill:before{content:"\\f61b"}.ri-goblet-broken-line:before{content:"\\f61c"}.ri-lightbulb-ai-fill:before{content:"\\f61d"}.ri-lightbulb-ai-line:before{content:"\\f61e"}.ri-loop-left-ai-fill:before{content:"\\f61f"}.ri-loop-left-ai-line:before{content:"\\f620"}.ri-loop-right-ai-fill:before{content:"\\f621"}.ri-loop-right-ai-line:before{content:"\\f622"}.ri-message-ai-3-fill:before{content:"\\f623"}.ri-message-ai-3-line:before{content:"\\f624"}.ri-painting-ai-fill:before{content:"\\f625"}.ri-painting-ai-line:before{content:"\\f626"}.ri-painting-fill:before{content:"\\f627"}.ri-painting-line:before{content:"\\f628"}.ri-pencil-ai-2-fill:before{content:"\\f629"}.ri-pencil-ai-2-line:before{content:"\\f62a"}.ri-pencil-ai-fill:before{content:"\\f62b"}.ri-pencil-ai-line:before{content:"\\f62c"}.ri-remix-fill:before{content:"\\f62d"}.ri-remix-line:before{content:"\\f62e"}.ri-search-ai-2-fill:before{content:"\\f62f"}.ri-search-ai-2-line:before{content:"\\f630"}.ri-search-ai-3-fill:before{content:"\\f631"}.ri-search-ai-3-line:before{content:"\\f632"}.ri-search-ai-4-fill:before{content:"\\f633"}.ri-search-ai-4-line:before{content:"\\f634"}.ri-search-ai-fill:before{content:"\\f635"}.ri-search-ai-line:before{content:"\\f636"}.ri-speech-to-text-fill:before{content:"\\f637"}.ri-speech-to-text-line:before{content:"\\f638"}.ri-target-fill:before{content:"\\f639"}.ri-target-line:before{content:"\\f63a"}.ri-text-to-speech-fill:before{content:"\\f63b"}.ri-text-to-speech-line:before{content:"\\f63c"}.ri-wrench-fill:before{content:"\\f63d"}.ri-wrench-line:before{content:"\\f63e"}.ri-area-chart-fill:before{content:"\\f63f"}.ri-area-chart-line:before{content:"\\f640"}.ri-baseball-fill:before{content:"\\f641"}.ri-baseball-line:before{content:"\\f642"}.ri-binoculars-fill:before{content:"\\f643"}.ri-binoculars-line:before{content:"\\f644"}.ri-cursor-hand:before{content:"\\f645"}.ri-emotion-add-fill:before{content:"\\f646"}.ri-emotion-add-line:before{content:"\\f647"}.ri-file-scan-fill:before{content:"\\f648"}.ri-file-scan-line:before{content:"\\f649"}.ri-fiverr-fill:before{content:"\\f64a"}.ri-fiverr-line:before{content:"\\f64b"}.ri-font-serif:before{content:"\\f64c"}.ri-ghost-3-fill:before{content:"\\f64d"}.ri-ghost-3-line:before{content:"\\f64e"}.ri-gitee-fill:before{content:"\\f64f"}.ri-gitee-line:before{content:"\\f650"}.ri-global-off-fill:before{content:"\\f651"}.ri-global-off-line:before{content:"\\f652"}.ri-image-download-fill:before{content:"\\f653"}.ri-image-download-line:before{content:"\\f654"}.ri-image-upload-fill:before{content:"\\f655"}.ri-image-upload-line:before{content:"\\f656"}.ri-issues-fill:before{content:"\\f657"}.ri-issues-line:before{content:"\\f658"}.ri-issues-reopen-fill:before{content:"\\f659"}.ri-issues-reopen-line:before{content:"\\f65a"}.ri-network-error-fill:before{content:"\\f65b"}.ri-network-error-line:before{content:"\\f65c"}.ri-network-fill:before{content:"\\f65d"}.ri-network-line:before{content:"\\f65e"}.ri-network-off-fill:before{content:"\\f65f"}.ri-network-off-line:before{content:"\\f660"}.ri-piano-fill:before{content:"\\f661"}.ri-piano-grand-fill:before{content:"\\f662"}.ri-piano-grand-line:before{content:"\\f663"}.ri-piano-line:before{content:"\\f664"}.ri-plug-3-fill:before{content:"\\f665"}.ri-plug-3-line:before{content:"\\f666"}.ri-send-ins-fill:before{content:"\\f667"}.ri-send-ins-line:before{content:"\\f668"}.ri-signal-cellular-1-fill:before{content:"\\f669"}.ri-signal-cellular-1-line:before{content:"\\f66a"}.ri-signal-cellular-2-fill:before{content:"\\f66b"}.ri-signal-cellular-2-line:before{content:"\\f66c"}.ri-signal-cellular-3-fill:before{content:"\\f66d"}.ri-signal-cellular-3-line:before{content:"\\f66e"}.ri-signal-cellular-off-fill:before{content:"\\f66f"}.ri-signal-cellular-off-line:before{content:"\\f670"}.ri-stacked-chart-fill:before{content:"\\f671"}.ri-stacked-chart-line:before{content:"\\f672"}.ri-upwork-fill:before{content:"\\f673"}.ri-upwork-line:before{content:"\\f674"}.ri-brain-4-fill:before{content:"\\f675"}.ri-brain-4-line:before{content:"\\f676"}.ri-certificate-2-fill:before{content:"\\f677"}.ri-certificate-2-line:before{content:"\\f678"}.ri-certificate-fill:before{content:"\\f679"}.ri-certificate-line:before{content:"\\f67a"}.ri-cookie-fill:before{content:"\\f67b"}.ri-cookie-line:before{content:"\\f67c"}.ri-cursor-ai-fill:before{content:"\\f67d"}.ri-cursor-ai-line:before{content:"\\f67e"}.ri-draw-fill:before{content:"\\f67f"}.ri-draw-line:before{content:"\\f680"}.ri-ghost-4-fill:before{content:"\\f681"}.ri-ghost-4-line:before{content:"\\f682"}.ri-gitbook-fill:before{content:"\\f683"}.ri-gitbook-line:before{content:"\\f684"}.ri-grok-ai-fill:before{content:"\\f685"}.ri-grok-ai-line:before{content:"\\f686"}.ri-hand-2:before{content:"\\f687"}.ri-megaphone-2-fill:before{content:"\\f688"}.ri-megaphone-2-line:before{content:"\\f689"}.ri-microsoft-copilot-fill:before{content:"\\f68a"}.ri-microsoft-copilot-line:before{content:"\\f68b"}.ri-mosaic-fill:before{content:"\\f68c"}.ri-mosaic-line:before{content:"\\f68d"}.ri-qr-scan-ai-fill:before{content:"\\f68e"}.ri-qr-scan-ai-line:before{content:"\\f68f"}.ri-qwen-ai-fill:before{content:"\\f690"}.ri-qwen-ai-line:before{content:"\\f691"}.ri-reddit-2-fill:before{content:"\\f692"}.ri-reddit-2-line:before{content:"\\f693"}.ri-sim-card-warning-fill:before{content:"\\f694"}.ri-sim-card-warning-line:before{content:"\\f695"}.ri-space-ship-2-fill:before{content:"\\f696"}.ri-space-ship-2-line:before{content:"\\f697"}.ri-subreddit-fill:before{content:"\\f698"}.ri-subreddit-line:before{content:"\\f699"}.ri-zhipu-ai-fill:before{content:"\\f69a"}.ri-zhipu-ai-line:before{content:"\\f69b"}.ri-connector-fill:before{content:"\\f69c"}.ri-connector-line:before{content:"\\f69d"}html{height:100%}body{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:rgb(var(--surface-ground));color:rgb(var(--text-color));overscroll-behavior:none}app-root{display:flex;flex-direction:column;height:100%}body.theme-light{--primary-color: 98 101 241;--secondary-color: 16 185 129;--accent-color: 245 158 11;--surface-card: 255 255 255;--surface-100: 248 250 252;--surface-200: 226 232 240;--border-color: 203 213 225;--text-color: 15 23 42;--text-color-secondary: 100 116 139}body.theme-dark{--primary-color: 139 143 255;--secondary-color: 34 197 94;--accent-color: 251 191 36;--surface-card: 30 41 59;--surface-100: 51 65 85;--surface-200: 71 85 105;--border-color: 100 116 139;--text-color: 226 232 240;--text-color-secondary: 148 163 184}body.theme-ocean{--primary-color: 14 116 144;--secondary-color: 6 182 212;--accent-color: 249 115 22;--surface-card: 248 250 252;--surface-100: 240 249 255;--surface-200: 186 230 253;--border-color: 125 211 252;--text-color: 8 47 73;--text-color-secondary: 14 116 144}:host{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #d3d3d3;border-radius:10px}::-webkit-scrollbar-thumb{background:rgb(var(--primary-color, 98 101 241));border-radius:10px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--primary-color, 98 101 241) / .86)}.panel-scroll-body{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden}.panel-body{display:flex;flex-direction:column;gap:.95rem;min-height:0;padding:.35rem .15rem .6rem}.panel-body .child-panel{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.9rem;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));box-shadow:0 8px 22px #0f172a0f;padding:.9rem}.panel-body .child-panel__label{display:inline-flex;align-items:center;gap:.35rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--primary-color, 98 101 241));margin-bottom:.65rem}.panel-body .child-accordion{width:100%}.panel-body .child-panel :where(input,select,textarea){background:rgb(var(--surface-card, 255 255 255))}.canvas-content{height:calc(100dvh - 180px)}.p-slider.p-slider-horizontal{height:5px!important}.ri-add-line,.ri-subtract-line{width:25px;height:25px;background:#fff;border-radius:50%;color:#585858;border:1px solid #585858;line-height:1.9}:is(.ri-add-line,.ri-subtract-line):hover{border-color:#6265f1;color:#6265f1}.p-button-text:not(:disabled):hover{background:transparent!important}.slider-scale-box{background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.75rem;padding:.65rem;box-shadow:0 5px 14px #0f172a0d}@media(max-width:991px){.panel-scroll-body{max-height:unset}.canvas-content{height:auto;min-height:0;flex:1}.editor-main-box{min-height:auto}}@media(max-width:640px){.panel-body{gap:.65rem;padding:.25rem .1rem .5rem}.panel-body .child-panel{padding:.65rem}}@media(max-width:480px){.panel-body{gap:.5rem;padding:.2rem .1rem .4rem}.panel-body .child-panel{padding:.5rem;border-radius:.65rem}}.name-number-overlay-box .p-button,.name-number-overlay-box .p-button-icon,.name-number-overlay-box .p-button-label{color:#333!important;transform:none!important}.name-number-overlay-box .p-fileupload-choose-button,.name-number-overlay-box .p-fileupload-choose-button .p-button-label{color:#fff!important}.panel-body .p-accordion.p-component{width:100%}.p-accordioncontent[data-p-active=false] .p-accordioncontent-content{display:none}.manifest-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader .message{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader .loader{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader .loader{zoom:.44}}.manifest-loader .loader .box{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader .loader .box div{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader .loader .box div:before,.manifest-loader .loader .box div:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader .loader .box div:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader .loader .box.box0{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader .loader .box.box1{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader .loader .box.box2{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader .loader .box.box3{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader .loader .box.box4{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader .loader .box.box5{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader .loader .box.box6{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader .loader .box.box7{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader .loader .box0{animation-name:box-move0}.manifest-loader .loader .box0 div{animation-name:box-scale0}.manifest-loader .loader .box1{animation-name:box-move1}.manifest-loader .loader .box1 div{animation-name:box-scale1}.manifest-loader .loader .box2{animation-name:box-move2}.manifest-loader .loader .box2 div{animation-name:box-scale2}.manifest-loader .loader .box3{animation-name:box-move3}.manifest-loader .loader .box3 div{animation-name:box-scale3}.manifest-loader .loader .box4{animation-name:box-move4}.manifest-loader .loader .box4 div{animation-name:box-scale4}.manifest-loader .loader .box5{animation-name:box-move5}.manifest-loader .loader .box5 div{animation-name:box-scale5}.manifest-loader .loader .box6{animation-name:box-move6}.manifest-loader .loader .box6 div{animation-name:box-scale6}.manifest-loader .loader .box7{animation-name:box-move7}.manifest-loader .loader .box7 div{animation-name:box-scale7}@keyframes box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes mask{0%,65%{opacity:0}66%,to{opacity:1}}.p-accordion-panel:last-child .p-accordion-header{border:none!important}.viewer-container{width:100%;height:80%;display:block}:host ::ng-deep canvas[data-view]{width:100%!important;height:100%!important}.header{padding:12px 20px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a14}.header-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;margin-bottom:0;flex-wrap:wrap}.logo{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42))}.brand{display:flex;align-items:center;min-height:32px}.brand-logo-img{width:auto;height:32px;max-width:240px;object-fit:contain;display:block}.tabs{display:flex;gap:5px}.tab{padding:8px 20px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.tab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.tab:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12)}.header-right{display:flex;gap:10px;align-items:center}.btn-export,.btn-save{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost{padding:8px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-ghost:not(:disabled):hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.btn-export:hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.btn-export:disabled,.btn-save:disabled{opacity:.6;cursor:not-allowed}.btn-reset{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-reset:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--secondary-color, 16 185 129))}.btn-reset:disabled{opacity:.6;cursor:not-allowed}.btn-exit{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-exit:hover{background:rgb(var(--surface-100, 248 250 252));border-color:#ef4444}.btn-exit:disabled{opacity:.6;cursor:not-allowed}.btn-menu{padding:8px 12px;border:none;background:transparent;font-size:20px;cursor:pointer;color:rgb(var(--text-color-secondary, 100 116 139))}.unified-alignment-controls{display:flex;align-items:center;height:auto}.alignment-controls-container{display:flex;align-items:center;width:100%}.controls-group{display:flex;align-items:center;gap:16px;padding:10px 16px;background:linear-gradient(135deg,rgb(var(--surface-50, 248 250 252) / .8),rgb(var(--surface-100, 248 250 252) / .6));border:1px solid rgb(var(--border-color, 203 213 225) / .6);border-radius:8px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.toggle-buttons{display:flex;align-items:center;gap:6px;padding:0;background:rgb(var(--surface-card, 255 255 255));border-radius:6px;border:1px solid rgb(var(--border-color, 203 213 225))}.alignment-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;font-weight:500;cursor:pointer;border-radius:5px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.alignment-btn i{font-size:16px;display:flex;align-items:center}.alignment-btn .btn-label{white-space:nowrap;font-weight:500}.alignment-btn:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .08);color:rgb(var(--text-color, 15 23 42))}.alignment-btn.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4)}.alignment-btn.active:hover{background:rgb(var(--primary-color, 98 101 241) / .92)}.grid-size-section{display:flex;align-items:center}.grid-size-label{display:flex;flex-direction:column;gap:8px;cursor:pointer}.label-header{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:rgb(var(--text-color, 15 23 42));text-transform:uppercase;letter-spacing:.5px}.label-header i{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.slider-wrapper{display:flex;align-items:center;gap:10px;min-width:280px}.grid-size-slider{flex:1;height:6px;border-radius:3px;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .2),rgb(var(--primary-color, 98 101 241) / .1));outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.grid-size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-webkit-slider-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;border:none;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-moz-range-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-track{background:transparent;border:none}.grid-size-slider::-moz-range-progress{background:rgb(var(--primary-color, 98 101 241) / .3);border-radius:3px}.grid-size-value{display:flex;align-items:center;justify-content:center;min-width:56px;padding:4px 8px;font-size:12px;font-weight:500;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:4px;font-family:inherit}@media(max-width:1200px){.controls-group{gap:12px;padding:8px 12px}.slider-wrapper{min-width:220px}}@media(max-width:768px){.unified-alignment-controls{width:100%}.alignment-controls-container{flex-direction:column;gap:10px}.controls-group{flex-direction:column;gap:10px;width:100%}.toggle-buttons{width:100%;justify-content:space-between}.alignment-btn{flex:1;padding:10px 12px}.alignment-btn .btn-label{display:none}.grid-size-section,.grid-size-label{width:100%}.slider-wrapper{width:100%;min-width:unset}.grid-size-value{padding:6px 10px;font-size:11px}}@media(max-width:480px){.controls-group{padding:8px 10px;gap:8px}.toggle-buttons{gap:4px}.alignment-btn{padding:8px 10px;font-size:12px}.alignment-btn i{font-size:15px}.label-header{font-size:11px}.slider-wrapper{gap:8px}}.main-container{display:flex;height:calc(100dvh - 57px);background:rgb(var(--surface-100, 248 250 252))}.canvas-area{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgb(var(--border-color, 203 213 225));overflow:hidden}.canvas-area.canvas-area-single{grid-template-columns:1fr}.view-section{display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));position:relative;overflow:hidden}.view-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.view-header h3{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-header .view-controls{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.canvas-toolbar{position:absolute;top:70px;left:20px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-toolbar-2d{top:70px}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn:hover{background:rgb(var(--surface-100, 248 250 252))}.view-controls{display:flex;gap:5px}.view-btn,.view-btn-2d{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active,.view-btn-2d.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn:hover:not(.active),.view-btn-2d:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-content{flex:1;display:flex;align-items:center;justify-content:center}.jersey-model,.jersey-2d{display:flex;flex-direction:column;align-items:center;gap:20px}.model-text{text-align:center}.model-text h3{font-size:18px;color:#666;margin-bottom:5px}.model-text p{font-size:13px;color:#999}.canvas-footer{display:flex;justify-content:center;align-items:center;gap:20px;padding:16px;background:#fff;border-radius:0;margin:0;border-top:1px solid #e0e0e0}.zoom-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#666}.zoom-btn{width:32px;height:32px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.zoom-btn:hover{background:#f5f5f5}.zoom-value{min-width:50px;text-align:center;font-weight:500;color:#1a1a1a}.view-options{display:flex;gap:10px}.option-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:14px;border-radius:6px;transition:all .2s}.option-btn:hover{background:#f5f5f5}.right-panel{width:420px;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;box-shadow:inset 1px 0 #fffc}.right-panel>section{display:flex;flex:1;min-height:0}.right-panel-shell,.icon-nav-shell{display:flex;min-height:0;height:100%}.panel-icon-nav{width:90px;height:100%;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;justify-content:space-between}.icon-nav-list{display:flex;flex-direction:column;overflow:auto}.icon-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border:none;background:transparent;color:#666;font-size:11px;cursor:pointer;transition:all .2s;border-left:3px solid transparent}.icon-btn i{font-size:20px}.icon-btn.active{color:rgb(var(--primary-color, 98 101 241));border-left-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241) / .12)}.icon-btn:hover:not(.active){background:#f5f5f5}.icon-nav-bottom{display:flex;justify-content:center;gap:5px;padding:16px 10px;border-top:1px solid #e0e0e0}.icon-btn-small{width:36px;height:36px;padding:6px;border:none;background:transparent;color:#666;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.icon-btn-small:hover{background:#f0f0f0}.toggle-more-btn,.expanded-nav-menu,.mobile-canvas-toggle,.mobile-actions-bar{display:none}.panel-content{width:100%;display:flex;flex:1;flex-direction:column;min-height:0}.panel-content[style*="display: flex"]{display:flex!important}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255) / .98),rgb(var(--surface-100, 248 250 252) / .88));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.panel-header h2{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0 0 4px;letter-spacing:.01em}.panel-subtitle{font-size:13px;color:#666;margin:0}.help-btn{width:28px;height:28px;border:2px solid #2196f3;background:#fff;color:#2196f3;border-radius:50%;cursor:pointer;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-btn:hover{background:#2196f3;color:#fff}.panel-tabs{display:flex;border-bottom:2px solid #f0f0f0;padding:0 24px}.panel-tab{flex:1;padding:12px 16px;border:none;background:transparent;color:#666;font-size:14px;font-weight:500;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s}.panel-tab.active{color:#2196f3;border-bottom-color:#2196f3}.panel-tab:hover:not(.active){color:#333}.tab-content{flex:1;overflow-y:auto}.panel-body{flex:1}.color-list{padding:0}.color-item{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.color-item:hover{background:#f8f8f8}.color-preview{width:40px;height:40px;border-radius:50%;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.color-label{flex:1;font-size:15px;color:#1a1a1a;font-weight:400}.arrow-btn{width:32px;height:32px;border:none;background:transparent;color:#999;font-size:24px;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.arrow-btn:hover{background:#f0f0f0;color:#666}.custom-color-section{padding:24px}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:16px}.color-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}.color-swatch.white{background:#fff}.color-swatch.black{background:#000}.color-swatch.active{border-color:#1a1a1a;border-width:3px}.color-swatch.active:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.color-swatch.white.active:after{color:#1a1a1a}.color-swatch.add-color{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.color-swatch:hover{border-color:#999}.custom-color{margin-top:15px}.custom-color label{display:block;font-size:12px;color:#666;margin-bottom:8px}.color-input-group{display:flex;gap:10px;align-items:center}.color-input{flex:1;padding:10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#666}.color-picker{width:50px;height:42px;border:none;border-radius:6px;cursor:pointer;background:#000}.pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:15px}.pattern-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}.pattern-swatch.active{border-color:#1a1a1a;border-width:3px}.pattern-swatch.active:first-child:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.pattern-swatch:first-child{background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#666}.pattern-swatch.solid{background:#5a5a5a}.pattern-swatch.diagonal-lines{background:repeating-linear-gradient(45deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.dots{background:radial-gradient(circle,#5a5a5a 1px,transparent 1px);background-size:8px 8px}.pattern-swatch.horizontal-lines{background:repeating-linear-gradient(0deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.add-pattern{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.pattern-swatch:hover{border-color:#999}.slider-control{margin-top:15px}.slider-control label{display:block;font-size:12px;color:#666;margin-bottom:10px}.slider{width:100%;height:6px;border-radius:3px;background:#e0e0e0;outline:none;-webkit-appearance:none;appearance:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;box-shadow:0 2px 4px #0003}.slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;border:none;box-shadow:0 2px 4px #0003}.form-group{margin-bottom:16px}.form-group label{display:block;font-size:12px;color:#666;margin-bottom:8px;font-weight:500}.form-row{display:flex;gap:12px;margin-bottom:16px}.form-group.half{flex:1}.text-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;transition:all .2s}.text-input:focus{outline:none;border-color:#1a1a1a}.text-input::placeholder{color:#999}.number-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a}.dropdown{width:100%;padding:10px 32px 10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;background:#fff;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.dropdown:hover{border-color:#999}.dropdown.small{font-size:13px}.text-formatting{display:flex;gap:8px;margin-bottom:16px}.format-btn{flex:1;padding:10px;border:1px solid #e0e0e0;background:#fff;font-size:14px;font-weight:700;cursor:pointer;border-radius:6px;transition:all .2s}.format-btn.italic{font-style:italic;font-weight:700}.format-btn:hover{background:#f5f5f5;border-color:#999}.format-btn.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.upload-area{width:100%;padding:40px 20px;border:2px dashed #d0d0d0;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px;background:#fafafa}.upload-area:hover{border-color:#999;background:#f5f5f5}.upload-icon{width:48px;height:48px;margin:0 auto 12px;background:#e0e0e0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;color:#666}.upload-text{font-size:14px;color:#1a1a1a;margin-bottom:4px;font-weight:500}.upload-hint{font-size:12px;color:#999}.add-btn{width:100%;padding:12px;border:none;background:#1a1a1a;color:#fff;font-size:14px;font-weight:600;cursor:pointer;border-radius:6px;transition:all .2s}.add-btn:hover{background:#333}.button-row{display:flex;gap:10px}.action-btn{padding:10px 16px;border:1px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .2s}.action-btn.half{flex:1}.action-btn:hover{background:#f5f5f5;border-color:#999}.panel-content::-webkit-scrollbar,.tab-content::-webkit-scrollbar,.panel-body::-webkit-scrollbar{width:6px}.panel-content::-webkit-scrollbar-track,.tab-content::-webkit-scrollbar-track,.panel-body::-webkit-scrollbar-track{background:rgb(var(--surface-100, 248 250 252))}.panel-content::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb,.panel-body::-webkit-scrollbar-thumb{background:rgb(var(--surface-400, 148 163 184));border-radius:3px}.panel-content::-webkit-scrollbar-thumb:hover,.tab-content::-webkit-scrollbar-thumb:hover,.panel-body::-webkit-scrollbar-thumb:hover{background:rgb(var(--surface-500, 100 116 139))}.main-canvas-area{display:grid;grid-template-columns:1fr 1fr;min-height:0;background:rgb(var(--surface-100, 248 250 252));position:relative}.main-canvas-area.single{grid-template-columns:1fr}.view-section{position:relative;display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));overflow:hidden}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:1px solid rgb(var(--surface-300, 203 213 225))}.view-section.hidden{display:none}.editor-main-box{height:calc(100% - 112px);max-height:calc(100dvh - 112px)!important;align-items:stretch;overflow:hidden}.main-canvas-area.single{padding-right:20px}.main-canvas-area .view-section,.main-canvas-area .view-section>.view-section,.canvas-area,.canvas-area-single,.jersey-model,app-two-d-ui,app-three-d-ui{min-height:0;height:100%}.main-canvas-area.canvas-loading .view-section{pointer-events:none}.canvas-manifest-loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:rgb(var(--surface-0, 255 255 255));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@supports (color: color-mix(in lab,red,red)){.canvas-manifest-loader{background:color-mix(in srgb,rgb(var(--surface-0, 255 255 255)) 85%,transparent)}}.canvas-manifest-loader :where(.manifest-loader .loader){--primary: rgb(var(--primary-color, 98 101 241));width:160px;height:220px}.canvas-manifest-loader-subtitle{margin:0;font-size:.8125rem;font-weight:500;color:rgb(var(--text-color-secondary, 100 116 139))}.panel-scroll-body{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:.45rem .65rem .85rem}@media(max-width:1199px){.right-panel{width:360px}.panel-icon-nav{width:78px}.main-canvas-area.single{padding-right:12px}.main-canvas-area:not(.single){grid-auto-rows:1fr;grid-template-columns:1fr}}.mobile-panel-toggle{display:none}@media(max-width:991px){:host{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.header{flex-shrink:0}.editor-main-box{flex:1;min-height:0;display:flex;flex-direction:column;height:auto;padding-bottom:100px}.main-canvas-area{flex:1;min-height:0;width:100%;grid-template-columns:1fr;grid-auto-rows:1fr;padding:0;overflow-y:auto}.main-canvas-area:not(.single){grid-auto-rows:minmax(220px,1fr)}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:0;border-top:1px solid rgb(var(--surface-300, 203 213 225))}.right-panel-shell,.icon-nav-shell{flex-shrink:0;width:100%;height:auto}.right-panel,.panel-icon-nav{width:100%;height:auto;border-left:0;border-top:1px solid rgb(var(--surface-200, 226 232 240))}.right-panel{max-height:min(44svh,400px);overflow:hidden;background:rgb(var(--surface-card, 255 255 255))}.panel-content{display:flex;min-height:0}.panel-header{position:sticky;top:0;z-index:2;background:rgb(var(--surface-card, 255 255 255));padding:12px 16px 10px}.panel-header h2{font-size:16px;line-height:1.2}.panel-scroll-body{flex:1;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 8px 10px}.panel-icon-nav{position:fixed;bottom:0;left:0;width:100%;z-index:30;background:rgb(var(--surface-card, 255 255 255));box-shadow:0 -3px 14px #0f172a14;border-top:1px solid rgb(var(--surface-200, 226 232 240));z-index:9999999}.icon-nav-list{flex-direction:row;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:space-between;z-index:1024}.icon-nav-list::-webkit-scrollbar{display:none}.icon-btn{min-width:80px;min-height:52px;border-radius:10px;padding:8px;gap:4px;border-left:0;border-bottom:3px solid transparent;flex:0 0 auto;font-size:11px}.icon-btn.active{border-bottom-color:rgb(var(--primary-color, 98 101 241));border-left-color:transparent}.icon-nav-bottom{padding:8px;border-top:1px solid rgb(var(--surface-100, 248 250 252))}.icon-btn-small{width:40px;height:40px}.toggle-more-btn{display:flex}.expanded-nav-menu{display:flex;inset:auto 0 100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0f172a1a;border:1px solid rgb(var(--border-color, 203 213 225));border-left:none;border-right:none;border-bottom:none;padding:4px 8px;margin-bottom:-1px;gap:6px;justify-content:space-between}.expanded-nav-menu .icon-btn{min-width:80px;min-height:52px;border-left:0;border-bottom:3px solid transparent;padding:8px;width:auto}.mobile-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--surface-100, 248 250 252))}.mobile-panel-toggle{display:flex;align-items:center;gap:6px;padding:8px 14px;border:none;border-radius:6px;background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.mobile-panel-toggle:active{background:rgb(var(--primary-color, 98 101 241) / .2)}.mobile-panel-toggle i{font-size:18px;line-height:1}.main-canvas-area{position:relative}.mobile-panel-hidden .right-panel-shell{max-height:0!important;overflow:hidden!important;border-top:0!important;pointer-events:none}.mobile-panel-hidden .main-canvas-area{flex:1 1 100%}.mobile-canvas-hidden .main-canvas-area{display:none!important}.mobile-canvas-hidden .right-panel{max-height:none;height:100%;flex:1}.mobile-canvas-hidden .panel-scroll-body{max-height:100%!important}.mobile-canvas-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px;background:transparent;border:1px solid rgb(var(--surface-200, 226 232 240));border-radius:6px;color:rgb(var(--text-color, 15 23 42));font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;margin-left:auto}.mobile-canvas-toggle:active{background:rgb(var(--surface-100, 248 250 252))}.mobile-canvas-toggle i{font-size:16px}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}.brand-logo-img{height:24px}}@media(max-width:640px){.header{padding:8px 12px 0}.header>div{flex-wrap:wrap;gap:6px}.header-right{gap:6px;flex-wrap:wrap}.logo{font-size:17px}.btn-export,.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 10px}.main-canvas-area{grid-auto-rows:1fr}.right-panel{max-height:min(45svh,380px)}.panel-header{padding:10px 12px 8px}.panel-header h2{font-size:15px}.panel-scroll-body{max-height:min(38svh,310px);padding:0 6px 8px}.icon-btn{min-width:68px;min-height:50px;padding:6px 4px;font-size:10px}.icon-btn i{font-size:18px}.icon-nav-list{gap:2px;padding:4px 6px}.icon-nav-bottom{padding:4px 6px}.expanded-nav-menu .icon-btn{min-width:68px;min-height:50px}.mobile-panel-toggle{font-size:12px;padding:7px 14px;bottom:10px}.mobile-panel-toggle i{font-size:16px}}@media(max-width:480px){.header{padding:6px 10px 0}.logo{font-size:16px}.btn-export{display:none}.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 12px}.right-panel{max-height:min(46svh,360px)}.panel-scroll-body{max-height:min(39svh,235px)}.icon-btn{min-width:60px;min-height:48px;gap:3px;font-size:9px}.icon-btn i{font-size:17px}.expanded-nav-menu .icon-btn{min-width:60px;min-height:48px}.mobile-panel-toggle{font-size:11px;padding:6px 12px;gap:4px;bottom:8px}.mobile-panel-toggle i{font-size:15px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.editor-main-box{flex-direction:row;flex-wrap:nowrap}.main-canvas-area{flex:1;min-width:0;grid-template-columns:1fr;grid-auto-rows:100%}.mobile-panel-toggle{bottom:8px;left:auto;right:12px;transform:none;font-size:12px;padding:6px 12px}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{max-height:unset!important;width:0!important;overflow:hidden!important;border:none!important}.right-panel-shell{flex-direction:column;width:auto;height:100%;flex-shrink:0}.right-panel{width:280px;max-height:100%;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240))}.panel-scroll-body{max-height:100%}.icon-nav-shell{width:auto;height:100%;flex-shrink:0}.panel-icon-nav{width:64px;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240));box-shadow:none;overflow-y:auto}.icon-nav-list{flex-direction:column;overflow-x:visible;overflow-y:auto;padding:4px}.icon-btn{min-width:unset;min-height:52px;width:100%;border-bottom:0;border-left:3px solid transparent;font-size:9px}.icon-btn.active{border-left-color:rgb(var(--primary-color, 98 101 241));border-bottom-color:transparent}}.manifest-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92))}.save-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.manifest-error-card{width:min(520px,calc(100vw - 2rem));padding:1.25rem;border-radius:12px;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e2e8f0);box-shadow:0 10px 30px #02061726}.manifest-error-title{font-size:1rem;font-weight:700;color:var(--p-text-color, #0f172a);margin-bottom:.5rem}.manifest-error-message{color:var(--p-text-muted-color, #475569);margin-bottom:1rem;word-break:break-word}.manifest-retry-btn{appearance:none;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer;background:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-contrast-color, 255 255 255))}.manifest-retry-btn:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.toggle-text{position:absolute;top:50%;transform:translateY(-50%);font-size:14px;font-weight:500;transition:opacity .2s ease;line-height:0}.off-text{left:38px;color:rgb(var(--text-color, 15 23 42))}.on-text{right:38px;color:rgb(var(--primary-contrast-color, 255 255 255));opacity:0}.toggle-input:checked+.toggle-track{background:rgb(var(--primary-color, 98 101 241))}.toggle-input:checked+.toggle-track .off-text{opacity:0}.toggle-input:checked+.toggle-track .on-text{opacity:1}.toggle-input:checked~.toggle-knob{transform:translate(96px)}.child-accordion{width:100%!important}@media(min-width:992px)and (max-width:1350px){.mobile-panel-toggle{display:flex;align-items:center;gap:6px;position:absolute;bottom:20px;right:20px;z-index:20;padding:8px 18px;border:none;border-radius:999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 16px #6265f159;white-space:nowrap;transition:background .2s,box-shadow .2s,transform .15s}.mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 6px 20px #6265f16b}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{display:none!important}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}}.jersey-model{position:relative}.shortcuts-wrap{position:absolute;bottom:12px;right:12px;z-index:20}.shortcuts-fab{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:8px;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:18px;cursor:pointer;box-shadow:0 2px 8px #0f172a26;transition:all .2s}.shortcuts-fab:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.shortcuts-fab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 4px 12px rgb(var(--primary-color, 98 101 241) / .4)}.shortcuts-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:300px;height:360px;overflow-y:auto;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:10px;box-shadow:0 8px 24px #0f172a24;padding:.75rem}.shortcuts-popover-header{display:flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:700;color:rgb(var(--text-color, 15 23 42));padding-bottom:.6rem;margin-bottom:.25rem;border-bottom:1px solid rgb(var(--border-color, 203 213 225))}.shortcuts-popover-header i{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.mobile-canvas-hidden .panel-scroll-body{height:100%;max-height:100%}.mobile-canvas-hidden .panel-content,.mobile-canvas-hidden .right-panel,.mobile-canvas-hidden .right-panel-shell{height:100%}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-ease: initial}}}
4615
+ `):i}function Boe(i,e){let t=i.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!t)return i;let[,n,r,o]=t,s=o.trim().split(/\s+/);if(!s.length)return i;let a=s[s.length-1];if(zoe(a))return i;let l=Voe(e,a);return l?(s[s.length-1]=l,`${n}${r} ${s.join(" ")}`):i}function zoe(i){let e=i.trim();return/^https?:\/\//i.test(e)||/^\/\//.test(e)}function Voe(i,e){let n=e.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!n)return e;if(!i)return n;try{return new URL(n,i).toString()}catch{let r=i.endsWith("/")?"":"/";return`${i}${r}${n}`}}async function Hoe(i,e){let t=i.type==="url"?await Goe(i.value):i.value,n=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n);try{let o=await joe(r),s=document.createElement("canvas");s.width=m4,s.height=m4;let a=s.getContext("2d");if(!a)throw new Error("Failed to create canvas context for SVG texture.");a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.clearRect(0,0,s.width,s.height);let l=o.width/o.height,c=s.width,d=s.height;l>1?d=s.height/l:c=s.width*l,a.drawImage(o,0,0,c,d);let u=new Rs(s);return u.colorSpace=_n,u.minFilter=bo,u.magFilter=Wn,u.anisotropy=e.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Li,u.wrapT=Li,u.needsUpdate=!0,u}finally{URL.revokeObjectURL(r)}}function g4(i){if(!i)return"";try{if(typeof window<"u")return new URL(".",new URL(i,window.location.href)).toString()}catch{}let e=i.split("?")[0].split("#")[0],t=e.lastIndexOf("/");return t>=0?e.slice(0,t+1):""}async function Goe(i){let e=await fetch(i,{cache:"no-cache"});if(!e.ok)throw new Error(`Failed to load SVG (${e.status})`);return e.text()}function joe(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>t(new Error("Failed to decode SVG image.")),n.src=i})}function Woe(i){Yoe(i);let t=new Ji().setFromObject(i).getSize(new $),n=Math.max(t.x,t.y,t.z);if(!Number.isFinite(n)||n<=0)return;i.scale.setScalar(4/n);let o=new Ji().setFromObject(i).getCenter(new $);i.position.sub(o),i.traverse(s=>{let a=s;!a.isMesh||!a.geometry||(a.geometry.computeVertexNormals(),a.castShadow=!1,a.receiveShadow=!1)})}function $oe(i){let e=t=>{if(!t)return new Da({color:16777215,roughness:.8,metalness:.1});let n=t,r=t;return new Da({map:n.map??null,color:r.color?.clone()??new ut(16777215),roughness:.8,metalness:.1})};i.traverse(t=>{let n=t;if(!n.isMesh)return;let r=n.material;Array.isArray(r)?n.material=r.map(o=>e(o)):n.material=e(r),n.castShadow=!0,n.receiveShadow=!0})}function Yoe(i){i.traverse(e=>{let t=e;if(!t.isMesh||!(t.geometry instanceof ni))return;let n=jx(t.geometry.clone(),1e-5);n.deleteAttribute("normal"),n.computeVertexNormals(),n.normalizeNormals(),n.computeBoundingBox(),n.computeBoundingSphere(),t.geometry.dispose(),t.geometry=n,(Array.isArray(t.material)?t.material:[t.material]).forEach(o=>{o&&("flatShading"in o&&(o.flatShading=!1),o.side=Zi,o.needsUpdate=!0)})})}function Xoe(i){let e=new cd(16777215,.6);i.add(e);let t=new Wo(16777215,1.2);t.position.set(100,150,100),i.add(t);let n=new Wo(16777215,.6);n.position.set(-100,50,100),i.add(n);let r=new Wo(16777215,.8);r.position.set(0,100,-150),i.add(r);let o=new ld(16777215,13421772,.5);o.position.set(0,200,0),i.add(o)}function qoe(i,e,t){let n=new WeakMap,r=new WeakMap,o=x4(e);i.traverse(s=>{let a=s;!a.isMesh||!a.material||(Array.isArray(a.material)?a.material.forEach(l=>{v4(l,e,o,n,r,t)}):v4(a.material,e,o,n,r,t))})}function v4(i,e,t,n,r,o){if(!Koe(i))return;n.has(i)||n.set(i,i.map??null);let s=n.get(i)??null;if(Joe(i,!!s,r),!s||!t){s&&o.add(s),i.map=e,i.needsUpdate=!0;return}let a=x4(s),l=a?_4(a):null;if(!a||!l){o.add(s),i.map=e,i.needsUpdate=!0;return}let c=ese(a,t,l.width,l.height);if(!c){o.add(s),i.map=e,i.needsUpdate=!0;return}o.add(s);let d=new Rs(c);Qoe(d,s,e),d.needsUpdate=!0,o.add(d),i.map=d,i.needsUpdate=!0}function Koe(i){return"map"in i}function Zoe(i){return"color"in i&&i.color instanceof ut}function Joe(i,e,t){if(Zoe(i)){if(t.has(i)||t.set(i,i.color.clone()),e){i.color.copy(t.get(i));return}i.color.set(16777215)}}function Qoe(i,e,t){i.colorSpace=e.colorSpace??t.colorSpace,i.flipY=e.flipY,i.wrapS=e.wrapS,i.wrapT=e.wrapT,i.magFilter=e.magFilter,i.minFilter=e.minFilter,i.anisotropy=e.anisotropy||t.anisotropy,i.generateMipmaps=e.generateMipmaps,i.premultiplyAlpha=e.premultiplyAlpha,i.unpackAlignment=e.unpackAlignment,i.repeat.copy(e.repeat),i.offset.copy(e.offset),i.center.copy(e.center),i.rotation=e.rotation,i.matrixAutoUpdate=e.matrixAutoUpdate,i.matrix.copy(e.matrix)}function x4(i){let e=i.source?.data??i.image;if(!e)return null;let t=_4(e);return!t||t.width<=0||t.height<=0?null:e}function _4(i){if(i instanceof HTMLVideoElement)return!i.videoWidth||!i.videoHeight?null:{width:i.videoWidth,height:i.videoHeight};let e=i;return!e.width||!e.height?null:{width:e.width,height:e.height}}function ese(i,e,t,n){let r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d");if(!o)return null;try{return o.clearRect(0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,o.drawImage(i,0,0,t,n),o.globalCompositeOperation="multiply",o.globalAlpha=1,o.drawImage(e,0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,r}catch{let s=document.createElement("canvas");s.width=t,s.height=n;let a=s.getContext("2d");return a?(a.clearRect(0,0,t,n),a.drawImage(i,0,0,t,n),a.drawImage(e,0,0,t,n),s):null}}function tse(i,e,t){let n=new Ji().setFromObject(e),r=n.getCenter(new $),o=n.getSize(new $),s=Math.max(o.x,o.y,o.z)*.5,a=Math.max(s,.5),l=t.fov*(Math.PI/180),c=a/Math.tan(l/2)*1.45;return t.near=Math.max(c/200,.05),t.far=Math.max(c*20,500),t.updateProjectionMatrix(),i.updateMatrixWorld(!0),{center:r,distance:c}}function nse(i,e){let t=new Set;i.traverse(n=>{let r=n;if(r.isMesh&&(r.geometry?.dispose(),!!r.material)){if(Array.isArray(r.material)){r.material.forEach(o=>b4(o,t));return}b4(r.material,t)}}),e.forEach(n=>{t.has(n)||(n.dispose(),t.add(n))})}function b4(i,e){let t=i;Qd(t.map,e),Qd(t.lightMap,e),Qd(t.normalMap,e),Qd(t.roughnessMap,e),Qd(t.metalnessMap,e),Qd(t.aoMap,e),Qd(t.emissiveMap,e),i.dispose()}function Qd(i,e){!i||e.has(i)||(i.dispose(),e.add(i))}var F_=class i{async generateThumbnails(e,t,n,r){return k_(e,t,n,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var N_=(l=>(l.PREDESIGNS="predesigns",l.COLOR="color",l.PATTERN="pattern",l.PERSONALIZATION="personalization",l.OVERLAY="overlay",l.BACKGROUND="background",l.RENDER_ORDER="render-order",l.CANVAS_GUIDE="canvas-guide",l))(N_||{}),L_={PREDESIGNS:"predesigns-fixed",RENDER_ORDER:"render-order-fixed",CANVAS_GUIDE:"canvas-guide-fixed"},eu={DESIGNS:"Designs",RENDER_POSITION:"Render Position",CUSTOMIZATION:"Customization",PERSONALIZATION:"Personalization"},U_={PATTERN:"pattern",OVERLAY:"overlay",UNKNOWN:"Unknown"},S4="ri-stack-line",C4="panel";var ise=["*"],bh=class i{value=ye.required();valueChange=Pt();isActive(e){return this.value()===e}select(e){this.value()!==e&&this.valueChange.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tabs"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},ngContentSelectors:ise,decls:2,vars:0,consts:[[1,"ui-tabs"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tabs[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var rse=["*"],B_=class i{value=ye.required();tabs=Z(bh,{host:!0});active=Me(()=>this.tabs.isActive(this.value()));onSelect(){this.tabs.select(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tab"]],inputs:{value:[1,"value"]},ngContentSelectors:rse,decls:2,vars:2,consts:[["type","button",1,"ui-tab",3,"click"]],template:function(t,n){t&1&&(Mi(),ue(0,"button",0),Ri("click",function(){return n.onSelect()}),Ti(1),ve()),t&2&&dt("ui-tab--active",n.active())},styles:[".ui-tab[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:.84rem;font-weight:500;line-height:1;padding:.7rem .95rem .72rem;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color .2s ease,border-color .2s ease}.ui-tab[_ngcontent-%COMP%]:hover{color:rgb(var(--text-color, 15 23 42));border-bottom-color:rgb(var(--surface-300, 203 213 225))}.ui-tab--active[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));border-bottom-color:rgb(var(--primary-color, 98 101 241))}.ui-tab[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:inset 0 -2px rgb(var(--primary-color, 98 101 241))}"],changeDetection:0})};var ose=["*"],z_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-tablist"]],ngContentSelectors:ose,decls:2,vars:0,consts:[[1,"ui-tablist"]],template:function(t,n){t&1&&(Mi(),ue(0,"div",0),Ti(1),ve())},styles:[".ui-tablist[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;padding:0}@media(max-width:992px){.ui-tablist[_ngcontent-%COMP%]{margin-top:5px}}"],changeDetection:0})};var V_=class i{buildStepLookup(e){let t=new Map,n=r=>{r.forEach(o=>{t.set(o.id,o),o.children?.length&&n(o.children)})};return n(e),t}flattenSteps(e,t=0){return[...e].sort((r,o)=>r.position-o.position).flatMap(r=>[{id:r.id,name:r.name,iconClass:r.iconClass,depth:t},...this.flattenSteps(r.children??[],t+1)])}buildParentNav(e,t,n){return[...[...e].filter(r=>!r.parentStepId).sort((r,o)=>r.position-o.position).map(r=>({id:r.id,name:r.name,iconClass:r.iconClass,depth:0})),{id:t,name:eu.RENDER_POSITION,iconClass:n,depth:0}]}buildPanelsByStep(e){let{stepNav:t,customizations:n,personalizationItems:r,stepLookup:o,renderOrderStepId:s,renderOrderItems:a}=e,l=new Map;t.forEach(d=>{this.buildCustomizationPanels(d.id,n,o).forEach(u=>this.addPanelToMap(l,d.id,u)),this.buildPersonalizationPanels(d.id,r,o).forEach(u=>this.addPanelToMap(l,d.id,u))}),this.addPanelToMap(l,s,{kind:"render-order",trackId:`${s}-${C4}`,title:eu.RENDER_POSITION,items:a});let c="canvas-guide-fixed";return this.addPanelToMap(l,c,{kind:"canvas-guide",trackId:`${c}-panel`,title:"Canvas Guide"}),l}hasPlacementType(e,t){return(e??"").trim().toUpperCase()===t}addPanelToMap(e,t,n){let r=e.get(t)??[];e.set(t,[...r,n])}buildCustomizationPanels(e,t,n){let r=t.filter(a=>a.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.CUSTOMIZATION,s=r.reduce((a,l)=>{let c=l.type??U_.UNKNOWN;return a[c]=a[c]?[...a[c],l]:[l],a},{});return Object.entries(s).map(([a,l])=>{let c=[...l].sort((u,f)=>u.position-f.position),d=this.isPatternCustomizationType(a)?"pattern":"color";return{kind:d,trackId:`${e}-${d}-${a}`,title:o,customizations:c}})}buildPersonalizationPanels(e,t,n){let r=t.filter(d=>d.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??eu.PERSONALIZATION,s=[],a=r.filter(d=>this.hasPlacementType(d.type,"TEXT")||this.hasPlacementType(d.type,"LOGO"));a.length&&s.push({kind:"personalization",trackId:`${e}-personalization`,title:o,items:a});let l=r.filter(d=>this.hasPlacementType(d.type,"OVERLAY"));l.length&&s.push({kind:"overlay",trackId:`${e}-overlay`,title:o,items:l});let c=r.filter(d=>this.hasPlacementType(d.type,"BACKGROUND"));return c.length&&s.push({kind:"background",trackId:`${e}-background`,title:o,templates:c}),s}isPatternCustomizationType(e){let t=e.trim().toLowerCase();return t.includes(U_.PATTERN)||t===U_.OVERLAY}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var H_=class i{async fetchFileAsText(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);return t.text()}createJsonFile(e,t){return new File([e],`${t}-${Date.now()}.json`,{type:"application/json"})}downloadFile(e){if(typeof document>"u")return;let t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=e.name,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async copyTextToClipboard(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>"u")return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}downloadDataUrlFile(e,t){if(typeof document>"u")return;let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),document.body.removeChild(n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function M4(i){let e=i.svgDoc.documentElement;return{exportedAt:new Date().toISOString(),preDesignId:i.preDesignId,svg:{width:i.svgWidth,height:i.svgHeight,viewBox:i.svgViewBox,rootId:e?.getAttribute("id")??null,content:i.svgString},renderOrder:i.renderOrder,placements:i.placementZones.filter(t=>i.usedPlacementKeys.has(t.placementKey)).map(t=>({id:t.id,placementKey:t.placementKey,label:t.label,elementName:t.elementName,allowedKinds:t.allowedKinds,required:t.required,bounds:t.bounds})),paths:[...i.styledPaths,...i.textPathSummaries],overlays:{text:i.textOverlays,logo:i.logoOverlays},background:{selectedKey:i.selectedBackgroundKey&&i.backgrounds.some(t=>t.actionItemId===i.selectedBackgroundKey)?i.selectedBackgroundKey:null,items:i.backgrounds},pattern:{selectedUploadedPatternId:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternId:null,selectedFileUrl:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternFileUrl:null,definitions:i.filteredPatternDefinitions,overlays:i.usedPatternOverlays.map(t=>({id:t.id,label:t.label??null,placementId:t.placementId??null,fill:t.fill??null,opacity:t.opacity,sourceUrl:t.sourceUrl??null,thumbnailUrl:t.thumbnailUrl??null,pathData:t.pathData})),targets:i.patternTargets,colors:ase(i.svgDoc,i.usedPatternIds)}}}function T4(i){return new Set(Array.from(i.querySelectorAll('[data-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function D4(i){return new Set(Array.from(i.querySelectorAll('path[data-pattern-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function A4(i){return Array.from(i.querySelectorAll("path, rect, circle, ellipse, polygon, polyline")).filter(e=>!e.closest("defs")).filter(e=>!e.closest('[data-overlay="true"]')).map(e=>{let t=yh(e,"fill"),n=k4(e,t),r=F4(i,t);return{id:e.getAttribute("id")??null,tag:e.tagName,fill:r?.colors.length?r.colors:t,fillGradient:r,stroke:yh(e,"stroke"),strokeWidth:yh(e,"stroke-width"),opacity:yh(e,"opacity"),transform:e.getAttribute("transform"),patternFill:n}})}function I4(i){return Array.from(i.querySelectorAll("[id]")).filter(e=>!e.closest("defs")).map(e=>{let t=yh(e,"fill"),n=k4(e,t);return n?{targetId:e.id,patternId:n,fill:t}:null}).filter(e=>!!e)}function P4(i){let{patternOverlays:e,patternDefinitions:t,patternTargets:n,usedPatternOverlayIds:r}=i,o=new Set(n.map(l=>l.patternId)),s=e.filter(l=>{if(!r.has(l.id))return!1;let c=sse(l.fill);return c&&o.add(c),!0}),a=Object.fromEntries(Object.entries(t).filter(([l])=>o.has(l)));return{usedPatternIds:o,usedPatternOverlays:s,filteredPatternDefinitions:a}}function O4(i){let{textOverlays:e,logoOverlays:t,backgrounds:n,usedPatternOverlays:r}=i,o=new Set;return e.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),t.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),n.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),r.forEach(s=>{s.placementId&&o.add(s.placementId)}),o}function R4(i){return i.flatMap(e=>{let t=(e.text??"").trim()||e.id,n=[{id:t,tag:"text",fill:e.style.fill??null,fillGradient:null,stroke:null,strokeWidth:null,opacity:null,transform:null,patternFill:null}];return e.style.stroke&&(e.style.strokeWidth??0)>0&&n.push({id:`${t} Outline 1`,tag:"text-shadow",fill:e.style.stroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.strokeWidth}`,opacity:null,transform:null,patternFill:null}),e.style.secondStroke&&(e.style.secondStrokeWidth??0)>0&&n.push({id:`${t} Outline 2`,tag:"text-shadow",fill:e.style.secondStroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.secondStrokeWidth}`,opacity:null,transform:null,patternFill:null}),n})}function sse(i){return(i??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]??null}function yh(i,e){let t=i.getAttribute(e);if(t&&t.trim().length>0)return t.trim();let n=i.getAttribute("style");if(!n)return null;let r=e.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.split(":")[1]?.trim()??null;return s&&s.length>0?s:null}function k4(i,e){let t=i.getAttribute(me.DATA_PATTERN_FILL)?.trim();return t||((e??"").match(/^url\(#([^)]+)\)$/i)?.[1]??null)}function F4(i,e){let r=(e??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]?.trim();if(!r)return null;let o=(l,c=new Set)=>{if(!l||c.has(l))return null;c.add(l);let d=i.getElementById(l);if(!(d instanceof SVGLinearGradientElement)&&!(d instanceof SVGRadialGradientElement))return null;if(Array.from(d.querySelectorAll(":scope > stop")).length>0)return d;let f=d.getAttribute("href")??d.getAttributeNS($d,"href"),h=f?.startsWith("#")?f.slice(1).trim():null;return h?o(h,c)??d:d},s=o(r);if(!s)return null;let a=Array.from(s.querySelectorAll(":scope > stop")).map(l=>{let c=l.getAttribute("stop-color")?.trim()??w4(l,"stop-color")??null;if(!c)return null;let d=l.getAttribute("stop-opacity")?.trim()??w4(l,"stop-opacity"),u=d&&d.length>0?Number.parseFloat(d):NaN;return{offset:l.getAttribute("offset")?.trim()??null,color:c,opacity:Number.isFinite(u)?u:null}}).filter(l=>!!l);return a.length===0?null:{gradientId:r,type:s.tagName==="radialGradient"?"radialGradient":"linearGradient",colors:Array.from(new Set(a.map(l=>l.color))),stops:a}}function w4(i,e){let t=i.getAttribute("style");if(!t)return null;let n=e.toLowerCase(),r=t.split(";").map(s=>s.trim()).find(s=>s.toLowerCase().startsWith(`${n}:`));if(!r)return null;let o=r.split(":")[1]?.trim()??null;return o&&o.length>0?o:null}function ase(i,e){let t=lse(i);return Array.from(e).map(n=>{let r=i.getElementById(n);if(!(r instanceof SVGPatternElement))return null;let o=use(r,i),s=new Map,a=c=>fse(i,s,c),l=c=>{let d=yh(c,"fill");return d&&d.length>0?d:dse(c,t)};return o.forEach(c=>{a(l(c)),Array.from(c.querySelectorAll("*")).forEach(u=>{a(l(u))})}),s.size===0?null:{patternId:n,colors:Array.from(s.values())}}).filter(n=>!!n)}function lse(i){let e=new Map;return Array.from(i.querySelectorAll("style")).forEach(n=>{let o=(n.textContent??"").matchAll(/([^{}]+)\{([^{}]*)\}/g);for(let s of o){let a=(s[1]??"").trim(),l=(s[2]??"").trim();if(!a||!l)continue;let c=l.match(/(?:^|;)\s*fill\s*:\s*([^;]+)\s*(?:;|$)/i);if(!c)continue;let d=c[1]?.trim()??"";if(!d)continue;a.split(",").map(f=>f.trim()).filter(f=>f.length>0).forEach(f=>{let h=cse(f);h&&e.set(h,d)})}}),e}function cse(i){let e=i.trim();if(!e)return null;let t=e.split(":")[0]?.trim()??"";if(!t)return null;let n=t.split(/[\s>+~]+/).map(o=>o.trim()).filter(o=>o.length>0),r=n[n.length-1]??"";return r&&(/^#[A-Za-z_][\w-]*$/.test(r)||/^\.[A-Za-z_][\w-]*$/.test(r)||/^[A-Za-z][\w-]*$/.test(r))?r.toLowerCase():null}function dse(i,e){let t=(i.getAttribute("id")??"").trim();if(t){let o=e.get(`#${t.toLowerCase()}`);if(o)return o}let n=(i.getAttribute("class")??"").trim();if(n){let o=n.split(/\s+/).map(s=>s.trim()).filter(s=>s.length>0);for(let s of o){let a=e.get(`.${s.toLowerCase()}`);if(a)return a}}return e.get(i.tagName.toLowerCase())??null}function use(i,e){let t=[],n=new Set,r=i;for(;r;){let o=(r.getAttribute("id")??"").trim();if(o&&n.has(o))break;o&&n.add(o),t.push(r);let s=r.getAttribute("href")?.trim()??r.getAttributeNS($d,"href")?.trim(),a=s?.startsWith("#")?s.slice(1).trim():null;if(!a)break;let l=e.getElementById(a);r=l instanceof SVGPatternElement?l:null}return t}function fse(i,e,t){let n=(t??"").trim();if(!n)return;let r=F4(i,n);if(r?.colors.length){r.colors.forEach(a=>{let l=E4(a);if(!l)return;let c=l.toLowerCase();e.has(c)||e.set(c,l)});return}let o=E4(n);if(!o)return;let s=o.toLowerCase();e.has(s)||e.set(s,o)}function E4(i){let e=(i??"").trim();if(!e)return null;let t=e.toLowerCase();return t==="none"||t.startsWith("url(")?null:e}var G_=class i{buildDesignExportPayload(e){let{svgDoc:t,svgString:n,overlays:r,personalizationItems:o,placementZones:s,placementNameByKey:a,backgroundState:l,backgroundImageTemplates:c,patternState:d,patternOverlays:u,renderOrder:f,svgDimensions:h,svgViewBox:p,bounds:v,overlayDimensionsPxById:g,selectedEffectIdByOverlay:m,textStyleResolvers:b,selectedPredesignId:y}=e,_=this.buildEffectFileUrlById(o),w=T4(t),D=D4(t),A=A4(t),P=this.collectTextOverlayExports({overlays:r,bounds:v,effectFileUrlById:_,placementNameByKey:a,usedOverlayIds:w,selectedEffectIdByOverlay:m,overlayDimensionsPxById:g,textStyleResolvers:b}),E=this.collectLogoOverlayExports({overlays:r,bounds:v,placementNameByKey:a,overlayDimensionsPxById:g,usedOverlayIds:w}),I=this.collectBackgroundExports(t,l,c),L=I4(t),Y=P4({patternOverlays:u,patternDefinitions:d.definition,patternTargets:L,usedPatternOverlayIds:D}),G=O4({textOverlays:P,logoOverlays:E,backgrounds:I,usedPatternOverlays:Y.usedPatternOverlays}),Q=R4(P);return M4({preDesignId:y,svgDoc:t,svgString:n,svgWidth:h?.width??null,svgHeight:h?.height??null,svgViewBox:p,renderOrder:f,placementZones:s,usedPlacementKeys:G,styledPaths:A,textPathSummaries:Q,textOverlays:P,logoOverlays:E,selectedBackgroundKey:l.selectedKey,backgrounds:I,selectedPatternId:d.selectedId,selectedPatternFileUrl:d.selectedFileUrl,usedPatternIds:Y.usedPatternIds,filteredPatternDefinitions:Y.filteredPatternDefinitions,usedPatternOverlays:Y.usedPatternOverlays,patternTargets:L})}buildEffectFileUrlById(e){return e.reduce((t,n)=>((n.packs??[]).filter(o=>(o.type??"").toLowerCase().includes(Ga.EFFECT)).forEach(o=>{(o.dataSources??[]).forEach(s=>{let a=s?.id?.trim(),l=s?.fileUrl?.trim();a&&l&&t.set(a,l)})}),t),new Map)}collectTextOverlayExports(e){let{overlays:t,bounds:n,effectFileUrlById:r,placementNameByKey:o,usedOverlayIds:s,selectedEffectIdByOverlay:a,overlayDimensionsPxById:l,textStyleResolvers:c}=e;return t.filter(Dt).filter(d=>s.has(d.id)).map(d=>{let u=a.get(d.id)??null,f=u?r.get(u)??null:null,h=this.resolveFontFamily(d,c),p=this.resolveFontWeight(d,c),v=this.resolveFontStyle(d,c),g=this.resolveLetterSpacing(d,c),m=d.lineHeight??c.defaultLineHeight,b=this.resolveStrokeColor(d,c),y=d.strokeWidth??0,_=this.resolveSecondStrokeColor(d,c),w=d.secondStrokeWidth??0,D=this.resolveCurveAmount(d,c),A=d.shadowBlur??c.defaultShadowBlur,P=d.shadowOffsetX??c.defaultShadowOffsetX,E=d.shadowOffsetY??c.defaultShadowOffsetY,I=d.shadowColor??c.defaultShadowColor,L=Number.isFinite(d.horizontalScale)?Math.max(d.horizontalScale,.1):1,Y=Number.isFinite(d.verticalScale)?Math.max(d.verticalScale,.1):1,G=d.fontSize*Math.max((d.text??"").trim().length,1)*.5*L,Q=d.fontSize*(d.lineHeight??c.defaultLineHeight)*Y,ee=l?.get(d.id),te=ee&&Number.isFinite(ee.width)&&ee.width>0?ee.width:G,X=ee&&Number.isFinite(ee.height)&&ee.height>0?ee.height:Q,ie=Math.abs(A)>1e-4||Math.abs(P)>1e-4||Math.abs(E)>1e-4,Se={applied:[...b&&y>0?["stroke"]:[],..._&&w>0?["secondStroke"]:[],...ie?["shadow"]:[],...Math.abs(D)>1e-4?["curve"]:[],...d.warpEnabled===!0?["warp"]:[],...p==="bold"?["bold"]:[],...v==="italic"?["italic"]:[]],stroke:b&&y>0?{color:b,width:y}:null,secondStroke:_&&w>0?{color:_,width:w}:null,shadow:ie?{blur:A,offsetX:P,offsetY:E,color:I}:null,curve:Math.abs(D)>1e-4?{amount:D}:null,warp:d.warpEnabled===!0,bold:p==="bold",italic:v==="italic"};return{id:d.id,kind:d.kind,text:d.text,effectId:u,effectFileUrl:f,placementKey:d.placementKey??null,lockAspectRatio:d.lockAspectRatio??!0,placementName:d.placementKey?o.get(d.placementKey)??d.placementKey:null,transform:{normalizedX:d.normalizedX,normalizedY:d.normalizedY,absoluteCenterX:n.x+d.normalizedX*n.width,absoluteCenterY:n.y+d.normalizedY*n.height,angle:d.angle??0},style:{fill:d.fill,fontFamily:h,fontSize:d.fontSize,horizontalScale:L,verticalScale:Y,fontWeight:p,fontStyle:v,letterSpacing:g,lineHeight:m,stroke:b,strokeWidth:y,secondStroke:_,secondStrokeWidth:w,curveAmount:D,shadowBlur:A,shadowOffsetX:P,shadowOffsetY:E,shadowColor:I},dimensions:{renderedWidth:te,renderedHeight:X},effects:Se}})}collectLogoOverlayExports(e){let{overlays:t,bounds:n,placementNameByKey:r,overlayDimensionsPxById:o,usedOverlayIds:s}=e;return t.filter(ai).filter(a=>s.has(a.id)).map(a=>{let l=o?.get(a.id),c=l&&Number.isFinite(l.width)&&l.width>0?l.width:a.normalizedWidth*n.width,d=l&&Number.isFinite(l.height)&&l.height>0?l.height:a.normalizedHeight*n.height;return{id:a.id,kind:a.kind,logoBlobId:a.logoBlobId??null,imageName:a.imageName??null,imageSrc:a.imageSrc,processedImageSrc:a.processedImageSrc??null,placementKey:a.placementKey??null,lockAspectRatio:a.lockAspectRatio??!0,placementName:a.placementKey?r.get(a.placementKey)??a.placementKey:null,transform:{normalizedX:a.normalizedX,normalizedY:a.normalizedY,absoluteCenterX:n.x+a.normalizedX*n.width,absoluteCenterY:n.y+a.normalizedY*n.height,angle:a.angle??0},dimensions:{originalWidth:a.originalWidth,originalHeight:a.originalHeight,normalizedWidth:a.normalizedWidth,normalizedHeight:a.normalizedHeight,renderedWidth:c,renderedHeight:d},opacity:a.opacity??1}})}collectBackgroundExports(e,t,n){return n.map(r=>{let o=t.images[r.actionItemId],s=e.getElementById(r.actionItemId),a=s?.getAttribute("href")??s?.getAttributeNS($d,"href"),l=!!o?.transform&&(Math.abs((o.transform.scale??1)-1)>1e-4||Math.abs(o.transform.rotation??0)>1e-4||Math.abs(o.transform.translateX??0)>1e-4||Math.abs(o.transform.translateY??0)>1e-4||Math.abs((o.transform.opacity??1)-1)>1e-4);return{isUsed:!!o?.fileName||!!o?.src?.trim()||!!a?.trim()||l,placementKey:r.placementKey??null,templateId:r.id,actionItemId:r.actionItemId,name:r.name??null,imageSrc:o?.src??null,fileName:o?.fileName??null,transform:o?.transform??null,svgTransform:s?.getAttribute("transform")??null,svgOpacity:s?.getAttribute("opacity")??null,blobResourceId:o?.blobResourceId??null}}).filter(r=>r.isUsed).map(s=>{var a=s,{isUsed:r}=a,o=nn(a,["isUsed"]);return o})}resolveFontFamily(e,t){let n=e.fontFamily?.trim();return n&&n.length>0?n:t.defaultFontFamily}resolveFontWeight(e,t){return e.fontWeight??t.defaultFontWeight}resolveFontStyle(e,t){return e.fontStyle??t.defaultFontStyle}resolveLetterSpacing(e,t){return Number.isFinite(e.letterSpacing)?e.letterSpacing:t.defaultLetterSpacing}resolveStrokeColor(e,t){if(!((e.strokeWidth??0)>0))return null;let r=e.stroke?.trim();return r&&r.length>0?r:t.defaultStrokeColor}resolveSecondStrokeColor(e,t){if(!((e.secondStrokeWidth??0)>0))return null;let r=e.secondStroke?.trim();return r&&r.length>0?r:t.defaultSecondStrokeColor}resolveCurveAmount(e,t){return Number.isFinite(e.curveAmount)?e.curveAmount:t.defaultCurveAmount}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hse=10,pse=1,mse=3;var j_=class i{resolveHistoryAction(e){if(!e.ctrlKey&&!e.metaKey)return null;let t=e.key.toLowerCase();return t==="z"?e.shiftKey?"REDO":"UNDO":t==="y"?"REDO":null}resolveOverlayAction(e,t){let n=e.key.toLowerCase(),r=e.shiftKey?hse:pse,o=t*mse;switch(n){case"arrowup":return{kind:"MOVE",deltaXPx:0,deltaYPx:-r};case"arrowdown":return{kind:"MOVE",deltaXPx:0,deltaYPx:r};case"arrowleft":return{kind:"MOVE",deltaXPx:-r,deltaYPx:0};case"arrowright":return{kind:"MOVE",deltaXPx:r,deltaYPx:0};case"q":return{kind:"ROTATE",deltaAngle:e.shiftKey?-o:-t};case"e":return{kind:"ROTATE",deltaAngle:e.shiftKey?o:t};case"[":return{kind:"ROTATE",deltaAngle:-t};case"]":return{kind:"ROTATE",deltaAngle:t};default:return null}}isTextInputTarget(e){let t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"||e.isContentEditable}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var N4=.08,W_=class i{constructor(e){this.measurementService=e}resolveLayerDefinition(e,t){if(!e)return null;let n=e.toLowerCase();return t.find(r=>r.name.toLowerCase()===n)??null}resolveLayerBoundsById(e){let t=e.pathId.trim();if(!t||!e.svgDoc)return{bounds:null};let n=t.toLowerCase();if(e.layerBoundsCache.has(n))return{bounds:e.layerBoundsCache.get(n)??null};let r=e.svgDoc.getElementById(t),o=this.readElementBounds(r);if((!o||o.width<=0||o.height<=0)&&e.svgText&&e.measurementRoot){let l=this.measurementService.queryMeasurementElementById(e.measurementRoot,t);o=this.readElementBounds(l)}let s=o&&o.width>0&&o.height>0?o:null,a=new Map(e.layerBoundsCache);return a.set(n,s),{bounds:s,nextCache:a}}combineBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)l&&(t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height));if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o))return null;let s=r-t,a=o-n;return s<=0||a<=0?null:{x:t,y:n,width:s,height:a}}getLayerPreviewBounds(e,t){if(e.width<=0||e.height<=0||!t)return null;let n=t.width*N4,r=t.height*N4,o=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height,c=Math.max(t.x-n,o),d=Math.max(t.y-r,s),u=Math.min(t.x+t.width+n,a),f=Math.min(t.y+t.height+r,l);return u<=c||f<=d?e:{x:c,y:d,width:u-c,height:f-d}}normalizePreviewBounds(e,t){if(!e||e.width<=0||e.height<=0)return t;let n=t.x,r=t.y,o=t.x+t.width,s=t.y+t.height,a=Math.max(e.x,n),l=Math.max(e.y,r),c=Math.min(e.x+e.width,o),d=Math.min(e.y+e.height,s);return c<=a||d<=l?t:{x:a,y:l,width:c-a,height:d-l}}pointInsideBounds(e,t){return t.width<=0||t.height<=0?!1:e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}static \u0275fac=function(t){return new(t||i)(Ke(Kl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var $_=class i{api=Z(na);getManifest(e,t,n,r){return this.api.get(`products/${e}/manifest`,k(k({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),r?{"X-API-Key":r}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Y_=class i{api=Z(na);getPublicDistributor(e){return this.api.get("public/distributor",{},{"X-API-Key":e},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var X_=class i{manifestApi=Z($_);publicDistributorApi=Z(Y_);resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await vc(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,s=t.preDesigns??[]??[],a=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&s.length?s[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(p=>k({},p));l.filter(p=>(p.type??"").trim().toUpperCase()==="BACKGROUND").forEach(p=>{let m=(p.actionPathIdsCsv??p.actionItemId??"").toString().trim().split(",").map(b=>b.trim()).filter(b=>b.length>0).map(b=>b.startsWith("#")?b.slice(1).trim():b).filter(b=>b.length>0).join(",");p.actionPathIdsCsv=m,p.actionItemId=m});let c=t.steps??[]??[],d=t.threeDFileLink??t.model?.url??"",u=t.mtlFileLink??t.model?.mtlUrl??null,f=this.normalizeThreeDVariants({variants:t.threeDVariants??[],fallbackThreeDFileLink:d,fallbackMaterialFileLink:u}),h=this.resolveSelectedThreeDVariant(f);return{resolvedPredesignId:a,selectedThreeDVariantId:h?.id??null,threeDVariants:f,threeDFileLink:h?.threeDFileLink??d,materialFileLink:h?.mtlFileLink??u,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[]??[],predesigns:s,steps:c,pathIdAccordingLayers:t.layers??[]??[],renderPathAccordingLayers:t.renderLayers??[]??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}normalizeThreeDVariants(e){let t=(e.variants??[]).filter(n=>!!n?.id).map(n=>({id:n.id,name:n.name??"",key:n.key??"",position:Number.isFinite(n.position)?n.position:0,isDefault:!!n.isDefault,threeDFileLink:n.threeDFileLink??null,mtlFileLink:n.mtlFileLink??null})).sort((n,r)=>n.position-r.position||n.name.localeCompare(r.name,void 0,{sensitivity:"base"}));return t.length>0?t:e.fallbackThreeDFileLink?[{id:"default-model",name:"Default",key:"default-model",position:0,isDefault:!0,threeDFileLink:e.fallbackThreeDFileLink,mtlFileLink:e.fallbackMaterialFileLink}]:[]}resolveSelectedThreeDVariant(e){return e.length?e.find(t=>t.isDefault)??[...e].sort((t,n)=>t.position-n.position||t.name.localeCompare(n.name,void 0,{sensitivity:"base"}))[0]:null}async resolveDistributorBranding(e,t){if(!e)return t;try{let n=await vc(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var q_=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Ot.missingProductId,productId:null,signature:o};let s=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return s.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:s.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:s.message||Ot.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(Ke(X_))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var jD={COLOR:"color",PATTERN:"pattern"},L4="image/png",U4="lineargradient",B4=1;var K_=class i{constructor(e,t){this.colorState=e;this.customizerState=t}personalizationState=Z(sc);captureSnapshot(e){if(!e.manifestLoaded||!e.svgDoc)return null;let t=new Map,n=new Map;return e.customizations.forEach(r=>{if(!this.isColorCustomization(r)||!r.actionPathIdsCsv)return;let o=this.readAppliedColorForRegionIds(e.svgDoc,r.actionPathIdsCsv);o&&(t.set(r.actionPathIdsCsv,o),r.name&&n.set(r.name.trim().toLowerCase(),o))}),{targetPredesignId:e.targetPredesignId,colorsByRegion:t,colorsByCustomizationName:n,backgrounds:this.captureBackgroundCarryover(e.backgroundState),patternSelections:this.capturePatternSelections(e.svgDoc,e.customizations,e.patternState),overlayPatterns:this.captureOverlayPatterns(e.svgDoc,e.patternOverlayState),textOverlays:e.overlays.filter(Dt).map(r=>k({},r)),logoOverlays:e.overlays.filter(ai).map(r=>k({},r))}}captureOverlayPatterns(e,t){let n=t.state().overlays??[],r=n.reduce((a,l)=>(a.set(l.id,l),a),new Map),s=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).reduce((a,l)=>{let c=(l.getAttribute("id")??"").trim();if(!c)return a;let d=r.get(c),u=this.readSvgPresentationValue(l,"fill")??d?.fill??null,f=this.readSvgPresentationValue(l,"opacity")??(typeof d?.opacity=="number"?`${d.opacity}`:null),h=f!==null?Number.parseFloat(f):NaN,p=Number.isFinite(h)?Math.min(1,Math.max(0,h)):d?.opacity??1,v=(l.getAttribute(me.DATA_PATTERN_SOURCE_URL)??"").trim()||(d?.sourceUrl??"").trim();return v&&a.push({id:c,label:(l.getAttribute(me.DATA_PATTERN_SOURCE_ID)??"").trim()||d?.label||c,placementId:(l.getAttribute(me.DATA_PATTERN_PLACEMENT_ID)??"").trim()||d?.placementId||null,fill:u&&u.trim().length>0?u:void 0,opacity:p,pathData:l.getAttribute("d")??d?.pathData??"",sourceUrl:v,thumbnailUrl:(l.getAttribute(me.DATA_PATTERN_THUMBNAIL_URL)??"").trim()||d?.thumbnailUrl}),a},[]);return s.length>0?s:n.filter(a=>!!a.sourceUrl).map(a=>k({},a))}readSvgPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}async applyIfNeeded(e){let t=e.snapshot;if(!t||!e.selectedPredesignId||t.targetPredesignId!==e.selectedPredesignId)return!1;await this.restoreBackgroundCarryover(t.backgrounds,e),await this.restorePatternCarryover(t.patternSelections,e),await this.restoreOverlayPatternCarryover(t.overlayPatterns,e),this.restoreOverlayCarryover(t,e),this.restoreColorCarryover(t,e.customizations),await this.customizerState.syncOverlaysToSvgDoc().catch(()=>{});let n=this.customizerState.svgDoc();return n&&this.customizerState.markSvgMutated(n),e.backgroundState.refreshFromSvg(),e.patternState.refreshFromSvg(),e.patternOverlayState.refreshFromSvg(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild(),!0}captureBackgroundCarryover(e){let t=e.state(),n=t.templates??[],r=t.images??{};return n.reduce((o,s)=>{let a=r[s.actionItemId];return a?.src&&o.push({placementKey:s.placementKey,actionItemId:s.actionItemId,name:s.name,state:{src:a.src,fileName:a.fileName,transform:k({},a.transform)}}),o},[])}async restoreBackgroundCarryover(e,t){if(!e.length)return;let n=e.reduce((o,s)=>(o.set(s.placementKey,s),o),new Map),r=e.reduce((o,s)=>(o.set(s.name.trim().toLowerCase(),s),o),new Map);for(let o of t.backgroundTemplates){let s=n.get(o.placementKey)??r.get((o.name??"").trim().toLowerCase());if(!s?.state?.src)continue;let a=await this.createFileFromDataUrl(s.state.src,s.state.fileName??`${o.actionItemId}.png`);a&&(await t.backgroundState.onFileSelected(o.actionItemId,a),t.backgroundState.select(o.actionItemId),this.restoreBackgroundTransform(t.backgroundState,s.state.transform))}}restoreBackgroundTransform(e,t){e.updateTransform("scale",t.scale),e.updateTransform("rotation",t.rotation),e.updateTransform("translateX",t.translateX),e.updateTransform("translateY",t.translateY),e.updateTransform("opacity",t.opacity)}async createFileFromDataUrl(e,t){try{let r=await(await fetch(e)).blob(),o=r.type&&r.type.trim().length>0?r.type:L4;return new File([r],t,{type:o})}catch{return null}}capturePatternSelections(e,t,n){let r=n.selectedPatternFileUrl(),o=n.selectedUploadedPatternId(),s=o?n.patternDefinitionState()[o]??null:null;return r?t.filter(a=>this.isPatternCustomization(a)&&!!a.actionPathIdsCsv).map(a=>{let l=this.resolvePatternSourceMatch(a,r);if(!l)return null;let c=a.actionPathIdsCsv?this.readAppliedColorForRegionIds(e,a.actionPathIdsCsv):null;return{key:this.buildCustomizationCarryoverKey(a.id,a.name),dataSourceId:l.dataSourceId,sourceUrl:l.sourceUrl,transform:s?k({},s):null,color:c,sourceActionPathIdsCsv:a.actionPathIdsCsv??null,sourceName:(a.name??"").trim()||null}}).filter(a=>!!a):[]}async restorePatternCarryover(e,t){if(!e.length)return;let n=t.customizations.filter(s=>this.isPatternCustomization(s)&&!!s.actionPathIdsCsv),r=n.reduce((s,a)=>(s.set(this.buildCustomizationCarryoverKey(a.id,a.name),a),s),new Map),o=new Set;for(let s of e){let a=this.resolvePatternTargetCustomization(s,n,r,o);if(!a?.actionPathIdsCsv)continue;let l=this.resolvePatternSourceUrlForTarget(a,s);if(!l)continue;await t.patternState.applyPatternFromUrl(l,a.actionPathIdsCsv,!0);let c=t.patternState.selectedUploadedPatternId();c&&s.transform&&(t.patternState.onPatternDefinitionScaleChange(c,s.transform.scale),t.patternState.onPatternDefinitionRotationChange(c,s.transform.rotation),t.patternState.onPatternDefinitionTranslateXChange(c,s.transform.translateX),t.patternState.onPatternDefinitionTranslateYChange(c,s.transform.translateY),t.patternState.onPatternDefinitionOpacityChange(c,s.transform.opacity)),s.color&&this.colorState.applyColor(a.actionPathIdsCsv,s.color),o.add(this.buildCustomizationCarryoverKey(a.id,a.name))}}resolvePatternTargetCustomization(e,t,n,r){let o=n.get(e.key);if(o&&!r.has(this.buildCustomizationCarryoverKey(o.id,o.name)))return o;if(e.dataSourceId){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.pack?.dataSources??[]).some(d=>(d.id??"").trim()===e.dataSourceId)});if(a)return a}let s=(e.sourceName??"").trim().toLowerCase();if(s){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.name??"").trim().toLowerCase()===s});if(a)return a}if(e.sourceActionPathIdsCsv){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.actionPathIdsCsv??"").trim()===e.sourceActionPathIdsCsv});if(a)return a}return null}resolvePatternSourceMatch(e,t){let n=(e.pack?.dataSources??[]).find(r=>(r.fileUrl??"").trim()===t);return n?{dataSourceId:(n.id??"").trim()||null,sourceUrl:(n.fileUrl??"").trim()||t}:null}resolvePatternSourceUrlForTarget(e,t){let n=e.pack?.dataSources??[];if(t.dataSourceId){let a=(n.find(l=>(l.id??"").trim()===t.dataSourceId)?.fileUrl??"").trim();if(a)return a}let o=(n.find(s=>(s.fileUrl??"").trim()===t.sourceUrl)?.fileUrl??"").trim();return o||null}async restoreOverlayPatternCarryover(e,t){if(!e.length)return;let n=new Set(t.personalizationItems.map(o=>o.id)),r=this.groupOverlayPatternsForRestore(e,n);for(let o of r){await t.patternOverlayState.onAddPatternPathFromUrl(o.sourceUrl,o.thumbnailUrl,o.placementId);let s=t.patternOverlayState.state().overlays.filter(l=>(l.sourceUrl??"").trim()===o.sourceUrl&&(l.placementId??null)===o.placementId);if(!s.length)continue;let a=new Set;for(let l of o.overlays){let c=this.matchRestoredOverlayCandidate(l,s,a);c&&(a.add(c.id),t.patternOverlayState.onPatternOpacityChange(c.id,l.opacity),l.fill&&this.colorState.applyColor(c.id,l.fill))}}}groupOverlayPatternsForRestore(e,t){let n=new Map;for(let r of e){let o=(r.sourceUrl??"").trim();if(!o)continue;let s=r.placementId??null;if(s&&!t.has(s))continue;let a=`${o}::${s??""}`,l=n.get(a);if(l){l.overlays.push(r);continue}n.set(a,{sourceUrl:o,placementId:s,thumbnailUrl:r.thumbnailUrl,overlays:[r]})}return[...n.values()]}matchRestoredOverlayCandidate(e,t,n){let r=t.find(s=>!n.has(s.id)&&s.pathData===e.pathData);if(r)return r;let o=t.find(s=>!n.has(s.id)&&(s.label??"").trim()===(e.label??"").trim());return o||(t.find(s=>!n.has(s.id))??null)}restoreOverlayCarryover(e,t){let n=new Set(t.personalizationItems.map(s=>s.placementKey)),r=e.textOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneTextBounds(k({},s)):s),o=e.logoOverlays.map(s=>k({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneLogoBounds(k({},s)):s);t.overlaysState.set([...r,...o]),t.activeOverlayIdState.set(null),this.customizerState.setActiveOverlay(null)}restoreColorCarryover(e,t){t.forEach(n=>{if(!this.isColorCustomization(n)||!n.actionPathIdsCsv)return;let r=e.colorsByRegion.get(n.actionPathIdsCsv),o=e.colorsByCustomizationName.get((n.name??"").trim().toLowerCase()),s=r??o;s&&this.colorState.applyColor(n.actionPathIdsCsv,s)})}isColorCustomization(e){return(e.type??"").trim().toLowerCase()===jD.COLOR}isPatternCustomization(e){return(e.type??"").trim().toLowerCase()===jD.PATTERN}buildCustomizationCarryoverKey(e,t){return`${(e??"").trim().toLowerCase()}::${(t??"").trim().toLowerCase()}`}readAppliedColorForRegionIds(e,t){let n=this.parseColorTargets(t);for(let{selector:r,stopIndex:o}of n){let s=Array.from(e.querySelectorAll(r));if(s.length===0)continue;let a=s[0];if(a.tagName.toLowerCase()===U4){let c=Array.from(a.querySelectorAll("stop"));if(!c.length)continue;let d=this.resolveGradientStopIndex(o,c.length),u=c[d],f=u.getAttribute("stop-color")??u.style.stopColor??"";if(f.trim())return f;continue}let l=a.getAttribute("fill")??a.style.fill??"";if(l.trim())return l}return null}parseColorTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length>0?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveGradientStopIndex(e,t){let n=Number.isFinite(e)?e:B4;return Math.min(Math.max(n,0),t-1)}static \u0275fac=function(t){return new(t||i)(Ke(uh),Ke(Dn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function vse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",11),W("onClick",function(){z(t);let r=S(2);return V(r.onClose())}),C()}i&2&&q("icon","ri-close-line")("text",!0)("rounded",!0)}function bse(i,e){if(i&1&&(x(0,"p",9),R(1),C()),i&2){let t,n=S(2);T(),ze((t=n.config())==null?null:t.subtitle)}}function yse(i,e){if(i&1){let t=Ae();x(0,"app-ui-button",13),W("onClick",function(){let r=z(t).$implicit,o=S(3);return V(o.onButtonClick(r))}),C()}if(i&2){let t=e.$implicit;q("label",t.label)("severity",t.isPrimary?"primary":"secondary")}}function xse(i,e){if(i&1&&(x(0,"div",10),mt(1,yse,1,2,"app-ui-button",12,al),C()),i&2){let t,n=S(2);T(),gt((t=n.config())==null?null:t.buttons)}}function _se(i,e){if(i&1){let t=Ae();x(0,"div",1),W("click",function(){z(t);let r=S();return V(r.onBackdropClick())}),x(1,"div",2),W("click",function(r){return r.stopPropagation()}),x(2,"div",3)(3,"div",4)(4,"h2",5),R(5),C(),ae(6,vse,1,3,"app-ui-button",6),C(),x(7,"div",7)(8,"p",8),R(9),C(),ae(10,bse,2,1,"p",9),C(),ae(11,xse,3,0,"div",10),C()()()}if(i&2){let t,n,r,o,s,a,l=S();T(2),ur("dialog-type-"+(((t=l.config())==null?null:t.type)||"custom")),T(3),ze((n=l.config())==null?null:n.title),T(),le((r=l.config())!=null&&r.closable?6:-1),T(3),ze((o=l.config())==null?null:o.message),T(),le((s=l.config())!=null&&s.subtitle?10:-1),T(),le((a=l.config())!=null&&a.buttons&&l.config().buttons.length>0?11:-1)}}var Z_=class i{dialogService=Z(Mo);isOpen=this.dialogService.isOpen;config=this.dialogService.currentConfig;ngOnInit(){}onClose(){this.dialogService.cancel()}onBackdropClick(){this.config()?.closable&&this.onClose()}onButtonClick(e){e.action==="confirm"?this.dialogService.confirm():e.action==="cancel"?this.dialogService.cancel():e.action==="custom"&&e.customId&&this.dialogService.handleCustomAction(e.customId)}getButtonClass(e){let t=["dialog-btn"];return e.isPrimary&&t.push("dialog-btn-primary"),e.isDestructive&&t.push("dialog-btn-destructive"),t.join(" ")}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-generic-dialog"]],decls:1,vars:1,consts:[[1,"dialog-overlay"],[1,"dialog-overlay",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog"],[1,"dialog-header"],[1,"dialog-title"],["severity","primary","aria-label","Close dialog",3,"icon","text","rounded"],[1,"dialog-content"],[1,"dialog-message"],[1,"dialog-subtitle"],[1,"dialog-actions"],["severity","primary","aria-label","Close dialog",3,"onClick","icon","text","rounded"],[3,"label","severity"],[3,"onClick","label","severity"]],template:function(t,n){t&1&&ae(0,_se,12,7,"div",0),t&2&&le(n.isOpen()?0:-1)},dependencies:[Ut,ta],styles:[".dialog-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:_ngcontent-%COMP%_dialogFadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_dialogFadeIn{0%{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.dialog-container[_ngcontent-%COMP%]{position:relative;z-index:10000;animation:_ngcontent-%COMP%_dialogSlideUp .3s ease-out;max-width:90vw;max-height:90vh}@keyframes _ngcontent-%COMP%_dialogSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.dialog[_ngcontent-%COMP%]{background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:12px;box-shadow:0 20px 60px #0f172a26;overflow:hidden;min-width:380px;display:flex;flex-direction:column}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid rgb(var(--border-color, 203 213 225));background:linear-gradient(135deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)))}.dialog-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:rgb(var(--text-color, 15 23 42));line-height:1.3}.dialog-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:18px;cursor:pointer;border-radius:6px;transition:all .2s;flex-shrink:0}.dialog-close[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.dialog-content[_ngcontent-%COMP%]{padding:24px;color:rgb(var(--text-color, 15 23 42))}.dialog-message[_ngcontent-%COMP%]{margin:0 0 12px;font-size:14px;line-height:1.5;font-weight:500}.dialog-message[_ngcontent-%COMP%]:last-child{margin-bottom:0}.dialog-subtitle[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;margin:0;line-height:1.5}.dialog-actions[_ngcontent-%COMP%]{display:flex;gap:12px;padding:20px 24px;border-top:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-100, 248 250 252) / .5);justify-content:flex-end}.dialog-btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;min-width:100px;text-align:center;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));border:1px solid rgb(var(--border-color, 203 213 225))}.dialog-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--text-color-secondary, 100 116 139))}.dialog-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.dialog-btn-primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.dialog-btn-primary[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 4px 12px #6265f14d}.dialog-btn-destructive[_ngcontent-%COMP%]{background:#ef4444;color:#fff;border:none}.dialog-btn-destructive[_ngcontent-%COMP%]:hover{background:#dc2626;box-shadow:0 4px 12px #ef44444d}.dialog-type-warning[_ngcontent-%COMP%]{border-top:4px solid rgb(249,115,22)}.dialog-type-success[_ngcontent-%COMP%]{border-top:4px solid rgb(16,185,129)}.dialog-type-error[_ngcontent-%COMP%]{border-top:4px solid rgb(239,68,68)}@media(max-width:640px){.dialog[_ngcontent-%COMP%]{min-width:350px;max-width:100%}.dialog-content[_ngcontent-%COMP%], .dialog-header[_ngcontent-%COMP%]{padding:20px}.dialog-btn[_ngcontent-%COMP%]{width:100%;min-width:unset}}"]})};var Sse=(i,e)=>e.id;function Cse(i,e){if(i&1){let t=Ae();x(0,"div",1)(1,"div",2),U(2,"i"),x(3,"div",3)(4,"span",4),R(5),C(),x(6,"span",5),R(7),C()()(),x(8,"button",6),W("click",function(){let r=z(t).$implicit,o=S();return V(o.onDismiss(r.id))}),U(9,"i",7),C()()}if(i&2){let t=e.$implicit,n=S();q("ngClass","toast--"+t.type),fn("aria-label",n.getAriaLabel(t.type)),T(2),ur("toast-icon "+n.getIcon(t.type)),T(3),ze(t.title),T(2),ze(t.message)}}var J_=class i{toasterService=Z(Fr);toasts=this.toasterService.toasts;onDismiss(e){this.toasterService.dismissToast(e)}getIcon(e){return{success:"ri-checkbox-circle-fill",error:"ri-close-circle-fill",warning:"ri-alert-fill",info:"ri-information-fill"}[e]}getAriaLabel(e){return{success:"Success notification",error:"Error notification",warning:"Warning notification",info:"Information notification"}[e]}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-ui-toaster"]],decls:3,vars:0,consts:[[1,"toaster-container"],["role","alert",1,"toast",3,"ngClass"],[1,"toast-content"],[1,"toast-text"],[1,"toast-title"],[1,"toast-message"],["type","button","aria-label","Close notification",1,"toast-close",3,"click"],[1,"ri-close-line"]],template:function(t,n){t&1&&(x(0,"div",0),mt(1,Cse,10,6,"div",1,Sse),C()),t&2&&(T(),gt(n.toasts()))},dependencies:[Ut,Ww],styles:[".toaster-container[_ngcontent-%COMP%]{position:fixed;top:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:12px;pointer-events:none}.toast[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-radius:8px;box-shadow:0 4px 12px #00000026;animation:_ngcontent-%COMP%_slideIn .3s ease-out;pointer-events:auto;max-width:400px;min-width:280px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}@keyframes _ngcontent-%COMP%_slideIn{0%{transform:translate(400px);opacity:0}to{transform:translate(0);opacity:1}}.toast--success[_ngcontent-%COMP%]{background:linear-gradient(135deg,#10b981,#059669);color:#fff;border-left:4px solid #059669}.toast--error[_ngcontent-%COMP%]{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;border-left:4px solid #dc2626}.toast--warning[_ngcontent-%COMP%]{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-left:4px solid #d97706}.toast--info[_ngcontent-%COMP%]{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-left:4px solid #2563eb}.toast-content[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;flex:1}.toast-icon[_ngcontent-%COMP%]{font-size:20px;flex-shrink:0;margin-top:2px}.toast-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.toast-title[_ngcontent-%COMP%]{font-weight:600;font-size:14px;letter-spacing:.3px}.toast-message[_ngcontent-%COMP%]{font-weight:400;font-size:13px;opacity:.95;line-height:1.4}.toast-close[_ngcontent-%COMP%]{background:none;border:none;color:inherit;font-size:18px;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease;flex-shrink:0;opacity:1}.toast-close[_ngcontent-%COMP%]:hover{background-color:#fff3}.toast-close[_ngcontent-%COMP%]:focus{outline:2px solid rgba(255,255,255,.5);outline-offset:2px}@media(max-width:640px){.toaster-container[_ngcontent-%COMP%]{left:12px;right:12px;top:12px}.toast[_ngcontent-%COMP%]{min-width:auto}}"],changeDetection:0})};var wse=["threeDUI"],z4=(i,e)=>e.id,V4=(i,e)=>e.trackId;function Ese(i,e){if(i&1&&U(0,"img",4),i&2){let t=S();q("src",t.distributorHeaderLogoUrl(),fi)}}function Mse(i,e){i&1&&(x(0,"app-ui-tab",15),R(1,"2D Editor"),C(),x(2,"app-ui-tab",16),R(3,"Both"),C())}function Tse(i,e){if(i&1&&(x(0,"div",12),U(1,"app-manifest-loader",17),C()),i&2){let t=S();T(),q("message",t.manifestLoaderMessage)}}function Dse(i,e){if(i&1){let t=Ae();x(0,"button",22),W("click",function(){z(t);let r=S(2);return V(r.retryManifestLoad())}),R(1," Retry "),C()}}function Ase(i,e){if(i&1&&(x(0,"div",12)(1,"div",18)(2,"div",19),R(3,"Unable to load manifest"),C(),x(4,"div",20),R(5),C(),ae(6,Dse,2,0,"button",21),C()()),i&2){let t=S();T(5),ze(t.manifestError()),T(),le(t.isSdkRuntime()?-1:6)}}function Ise(i,e){if(i&1&&(x(0,"div",13),U(1,"app-save-loader",23),C()),i&2){let t=S();T(),q("message",t.designSaveMessage()||"Saving design\u2026")("subtitle","Please wait while your design is being processed")}}function Pse(i,e){i&1&&U(0,"app-three-d-loader")}function Ose(i,e){if(i&1){let t=Ae();x(0,"app-three-d-ui",46,0),mp("svgTextChange",function(r){z(t);let o=S(2);return Ms(o.svgText,r)||(o.svgText=r),V(r)})("svgDimensionsChange",function(r){z(t);let o=S(2);return Ms(o.svgDimensions,r)||(o.svgDimensions=r),V(r)})("svgViewBoxChange",function(r){z(t);let o=S(2);return Ms(o.svgViewBox,r)||(o.svgViewBox=r),V(r)})("showPlacementGuidesChange",function(r){z(t);let o=S(2);return Ms(o.showPlacementGuides,r)||(o.showPlacementGuides=r),V(r)})("placementZonesChange",function(r){z(t);let o=S(2);return Ms(o.placementZones,r)||(o.placementZones=r),V(r)})("overlaysChange",function(r){z(t);let o=S(2);return Ms(o.overlays,r)||(o.overlays=r),V(r)})("activeOverlayIdChange",function(r){z(t);let o=S(2);return Ms(o.activeOverlayId,r)||(o.activeOverlayId=r),V(r)}),W("activeOverlayChange",function(r){z(t);let o=S(2);return V(o.setActiveOverlay(r))})("threeDVariantSelected",function(r){z(t);let o=S(2);return V(o.onThreeDVariantSelected(r))})("overlayPositionChange",function(r){z(t);let o=S(2);return V(o.onOverlayPositionChange(r))})("overlayRotationChange",function(r){z(t);let o=S(2);return V(o.onOverlayRotationChange(r))})("overlayResizeChange",function(r){z(t);let o=S(2);return V(o.onOverlayResizeChange(r))})("onUndo",function(){z(t);let r=S(2);return V(r.onUndo())})("onRedo",function(){z(t);let r=S(2);return V(r.onRedo())}),C()}if(i&2){let t=S(2);q("isModelLoading",t.isModelLoading()),Hc("svgText",t.svgText),q("isActive",t.editorMode()!=="2d")("threeDVariants",t.threeDVariants())("selectedThreeDVariantId",t.selectedThreeDVariantId())("mtlText",t.mtlText())("objText",t.objText())("materialSourceUrl",t.materialFileLink()),Hc("svgDimensions",t.svgDimensions),q("overlayBounds",t.threeDOverlayBounds())("printAreaWidthInches",t.printAreaWidthInches())("printAreaHeightInches",t.printAreaHeightInches())("gridSizeInches",t.twoDGridSizeInches()),Hc("svgViewBox",t.svgViewBox)("showPlacementGuides",t.showPlacementGuides)("placementZones",t.placementZones)("overlays",t.overlays)("activeOverlayId",t.activeOverlayId),q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("gridSize",t.threeDGridSizeNormalized())}}function Rse(i,e){i&1&&(x(0,"div",50)(1,"div",51),U(2,"i",49),x(3,"span"),R(4,"Keyboard Shortcuts"),C()(),U(5,"app-keyboard-shortcuts-panel"),C())}function kse(i,e){if(i&1){let t=Ae();x(0,"div",47),W("click",function(r){return r.stopPropagation()}),x(1,"button",48),W("click",function(r){z(t);let o=S(2);return V(o.toggleShortcuts(r))}),U(2,"i",49),C(),ae(3,Rse,6,0,"div",50),C()}if(i&2){let t=S(2);T(),dt("active",t.showShortcuts()),T(2),le(t.showShortcuts()?3:-1)}}function Fse(i,e){if(i&1&&(x(0,"div",32),U(1,"app-manifest-loader",17),x(2,"p",52),R(3),C()()),i&2){let t=S(2);T(),q("message",t.predesignLoaderMessage),T(2),ze(t.predesignLoaderSubtitle)}}function Nse(i,e){i&1&&(x(0,"p",35),R(1,"No actions available for this step."),C())}function Lse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=S(4);return V(o.onPredesignSelected(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Use(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function Bse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function zse(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=S().$implicit,n=S(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Vse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=S().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function Hse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=S().$implicit,n=S(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Gse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=S(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=S(4);return V(o.onRenderOrderSelect(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function jse(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=S(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=S(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=S(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=S(4);return V(o.onTwoDGridSizeChange(r))}),C()}if(i&2){let t=S(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function Wse(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2"),R(4),C()(),x(5,"div",55),ae(6,Lse,1,2,"app-pre-designs-panel",56)(7,Use,1,1,"app-customizer-color-panel",57)(8,Bse,1,1,"app-customizer-pattern-panel",57)(9,zse,1,3,"app-customizer-personalization-panel",58)(10,Vse,1,2,"app-overlay-panel",59)(11,Hse,1,3,"app-customizer-background-panel",60)(12,Gse,1,2,"app-render-order-panel",61)(13,jse,1,7,"app-canvas-guide-panel",62),C()()()),i&2){let t,n=e.$implicit,r=S(3);T(4),ze(n.title),T(2),le((t=n.kind)===r.panelKind.PREDESIGNS?6:t===r.panelKind.COLOR?7:t===r.panelKind.PATTERN?8:t===r.panelKind.PERSONALIZATION?9:t===r.panelKind.OVERLAY?10:t===r.panelKind.BACKGROUND?11:t===r.panelKind.RENDER_ORDER?12:t===r.panelKind.CANVAS_GUIDE?13:-1)}}function $se(i,e){if(i&1&&mt(0,Wse,14,2,"section",36,V4),i&2){let t=S(2);gt(t.activePanels())}}function Yse(i,e){if(i&1){let t=Ae();x(0,"app-pre-designs-panel",63),W("designSelected",function(r){z(t);let o=S(4);return V(o.onPredesignSelected(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Xse(i,e){if(i&1&&U(0,"app-customizer-color-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function qse(i,e){if(i&1&&U(0,"app-customizer-pattern-panel",57),i&2){let t=S().$implicit;q("items",t.customizations)}}function Kse(i,e){if(i&1&&U(0,"app-customizer-personalization-panel",58),i&2){let t=S().$implicit,n=S(3);q("items",t.items)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Zse(i,e){if(i&1&&U(0,"app-overlay-panel",59),i&2){let t=S().$implicit;q("items",t.items)("useAccordion",t.items.length>1)}}function Jse(i,e){if(i&1&&U(0,"app-customizer-background-panel",60),i&2){let t=S().$implicit,n=S(3);q("templates",t.templates)("userUniqueId",n.userUniqueId())("apiKey",n.apiKey())}}function Qse(i,e){if(i&1){let t=Ae();x(0,"app-render-order-panel",64),W("moveTowardFront",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){z(t);let o=S(4);return V(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){z(t);let o=S(4);return V(o.onRenderOrderReorder(r))})("selectItem",function(r){z(t);let o=S(4);return V(o.onRenderOrderSelect(r))}),C()}if(i&2){let t=S().$implicit,n=S(3);q("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function eae(i,e){if(i&1){let t=Ae();x(0,"app-canvas-guide-panel",65),W("onGridToggle",function(){z(t);let r=S(4);return V(r.onGridToggle())})("onSnapToggle",function(){z(t);let r=S(4);return V(r.onSnapToggle())})("onGuidesToggle",function(){z(t);let r=S(4);return V(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){z(t);let o=S(4);return V(o.onTwoDGridSizeChange(r))}),C()}if(i&2){let t=S(4);q("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function tae(i,e){if(i&1&&(x(0,"app-ui-accordion-panel",68)(1,"app-ui-accordion-header")(2,"div",69)(3,"span"),R(4),C()()(),x(5,"app-ui-accordion-content")(6,"div",70),ae(7,Yse,1,2,"app-pre-designs-panel",56)(8,Xse,1,1,"app-customizer-color-panel",57)(9,qse,1,1,"app-customizer-pattern-panel",57)(10,Kse,1,3,"app-customizer-personalization-panel",58)(11,Zse,1,2,"app-overlay-panel",59)(12,Jse,1,3,"app-customizer-background-panel",60)(13,Qse,1,2,"app-render-order-panel",61)(14,eae,1,7,"app-canvas-guide-panel",62),C()()()),i&2){let t,n=e.$implicit,r=S(3);q("value",n.trackId),T(4),ze(n.title),T(3),le((t=n.kind)===r.panelKind.PREDESIGNS?7:t===r.panelKind.COLOR?8:t===r.panelKind.PATTERN?9:t===r.panelKind.PERSONALIZATION?10:t===r.panelKind.OVERLAY?11:t===r.panelKind.BACKGROUND?12:t===r.panelKind.RENDER_ORDER?13:t===r.panelKind.CANVAS_GUIDE?14:-1)}}function nae(i,e){if(i&1&&(x(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2",66),R(4),C()(),x(5,"div",55)(6,"app-ui-accordion",67),mt(7,tae,15,3,"app-ui-accordion-panel",68,V4),C()()()()),i&2){let t,n=S(2);T(4),ze(n.selectedStepLabel()),T(2),q("value",(t=n.activePanels()[0])==null?null:t.trackId),T(),gt(n.activePanels())}}function iae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Hide Options"),C())}function rae(i,e){i&1&&(U(0,"i",73),x(1,"span"),R(2,"Show Options"),C())}function oae(i,e){if(i&1){let t=Ae();x(0,"button",71),W("click",function(){z(t);let r=S(2);return V(r.toggleMobilePanel())}),ae(1,iae,3,0)(2,rae,3,0),C()}if(i&2){let t=S(2);fn("aria-label",t.mobilePanelVisible()?"Hide options panel":"Show options panel"),T(),le(t.mobilePanelVisible()?1:2)}}function sae(i,e){i&1&&(U(0,"i",72),x(1,"span"),R(2,"Show Preview"),C())}function aae(i,e){i&1&&(U(0,"i",75),x(1,"span"),R(2,"Expand Panel"),C())}function lae(i,e){if(i&1){let t=Ae();x(0,"button",74),W("click",function(){z(t);let r=S(2);return V(r.toggleMobileCanvas())}),ae(1,sae,3,0)(2,aae,3,0),C()}if(i&2){let t=S(2);T(),le(t.mobileCanvasHidden()?1:2)}}function cae(i,e){if(i&1&&U(0,"i"),i&2){let t=S().$implicit;ur(t.iconClass)}}function dae(i,e){if(i&1){let t=Ae();x(0,"button",77),W("click",function(){let r=z(t).$implicit,o=S(3);return V(o.onNavItemClick(r.id))}),ae(1,cae,1,2,"i",78),x(2,"span",79),R(3),C()()}if(i&2){let t=e.$implicit,n=S(3);dt("active",t.id===n.activeStepId()),T(),le(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function uae(i,e){if(i&1&&(x(0,"div",42),mt(1,dae,4,6,"button",76,z4),C()),i&2){let t=S(2);T(),gt(t.hiddenNavItems())}}function fae(i,e){if(i&1&&U(0,"i"),i&2){let t=S().$implicit;ur(t.iconClass)}}function hae(i,e){if(i&1){let t=Ae();x(0,"button",80),W("click",function(){let r=z(t).$implicit,o=S(2);return V(o.onNavItemClick(r.id))}),ae(1,fae,1,2,"i",78),x(2,"span",79),R(3),C()()}if(i&2){let t=e.$implicit,n=S(2);dt("active",t.id===n.activeStepId()),T(),le(t.iconClass?1:-1),T(),co("padding-left",t.depth*12,"px"),T(),ze(t.name)}}function pae(i,e){i&1&&(U(0,"i",82),x(1,"span",79),R(2,"Hide"),C())}function mae(i,e){i&1&&(U(0,"i",83),x(1,"span",79),R(2,"Show More"),C())}function gae(i,e){if(i&1){let t=Ae();x(0,"button",81),W("click",function(){z(t);let r=S(2);return V(r.toggleNavExpanded())}),ae(1,pae,3,0)(2,mae,3,0),C()}if(i&2){let t=S(2);T(),le(t.navExpanded()?1:2)}}function vae(i,e){if(i&1){let t=Ae();x(0,"div",24)(1,"main",25)(2,"section",26)(3,"div",26)(4,"app-two-d-ui",27),W("layerToggle",function(r){z(t);let o=S();return V(o.onLayerToggle(r))})("canvasReady",function(r){z(t);let o=S();return V(o.onTwoDCanvasReady(r))})("canvasDetached",function(){z(t);let r=S();return V(r.onTwoDCanvasDestroyed())})("zoomIn",function(){z(t);let r=S();return V(r.onTwoDZoomIn())})("zoomOut",function(){z(t);let r=S();return V(r.onTwoDZoomOut())})("resetView",function(){z(t);let r=S();return V(r.onTwoDReset())})("onUndo",function(){z(t);let r=S();return V(r.onUndo())})("onRedo",function(){z(t);let r=S();return V(r.onRedo())}),C()()(),x(5,"section",26)(6,"main",28)(7,"div",29),ae(8,Pse,1,0,"app-three-d-loader"),ae(9,Ose,2,21,"app-three-d-ui",30),C()()(),ae(10,kse,4,3,"div",31),ae(11,Fse,4,2,"div",32),C(),x(12,"section",33)(13,"aside",34),ae(14,Nse,2,0,"p",35)(15,$se,2,0)(16,nae,9,2,"section",36),C()(),x(17,"section",37)(18,"div",38)(19,"div",39),ae(20,oae,3,2,"button",40),ae(21,lae,3,1,"button",41),C(),ae(22,uae,3,0,"div",42),x(23,"div",43),mt(24,hae,4,6,"button",44,z4),ae(26,gae,3,1,"button",45),C()()()()}if(i&2){let t=S();dt("mobile-panel-hidden",!t.mobilePanelVisible())("mobile-canvas-hidden",t.mobileCanvasHidden()),T(),dt("single",t.editorMode()!=="both")("canvas-loading",t.showCanvasManifestLoader()),T(),dt("hidden",t.editorMode()==="3d"),T(2),q("svgText",t.svgText())("isActive",t.editorMode()!=="3d")("layers",t.layers())("selectedLayerKey",t.selectedLayerKey())("isShowAllLayersOption",t.isShowWholeLayersOption())("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridSize",t.twoDGridSize()),T(),dt("hidden",t.editorMode()==="2d"),T(3),le(t.loading()?8:-1),T(),le(t.editorMode()==="3d"||t.editorMode()==="both"?9:-1),T(),le(t.isMobile()?-1:10),T(),le(t.showCanvasManifestLoader()?11:-1),T(3),le(t.activePanels().length===0?14:t.activePanels().length===1?15:16),T(6),le(t.mobileCanvasHidden()?-1:20),T(),le(t.mobilePanelVisible()?21:-1),T(),le(t.navExpanded()?22:-1),T(),dt("nav-expanded",t.navExpanded()),T(),gt(t.visibleNavItems()),T(2),le(t.hiddenNavItems().length>0?26:-1)}}var Q_=class i{panelKind=N_;apiKey=ye.required();productId=ye.required();submissionNumber=ye(null);predesignId=ye(null);userUniqueId=ye(null);threeDUI=Lu("threeDUI");editorMode=F("3d");customizerState=Z(Dn);measurementService=Z(Kl);fontAssetService=Z(p_);textLayoutService=Z(m_);printAreaMeasurementService=Z(Yl);svgRenderService=Z(g_);overlayStyleService=Z(v_);renderOrderState=Z(b_);backgroundState=Z(oh);personalizationState=Z(sc);patternState=Z(fh);patternOverlayState=Z(vh);designHistory=Z(Gl);destroyRef=Z(ui);manifestFlowService=Z(q_);threeThumbnailService=Z(F_);submissionApi=Z(I_);toaster=Z(Fr);panelService=Z(V_);fileService=Z(H_);designExportService=Z(G_);themeService=Z(th);keyboardShortcutService=Z(j_);layerBoundsService=Z(W_);imageCompressionService=Z(qs);predesignCarryoverService=Z(K_);dialogService=Z(Mo);sdkRuntimeConfig=Z(R_,{optional:!0});selectedStepLabel=Me(()=>this.parentNav().find(e=>e.id===this.activeStepId())?.name??"");fallbackProductId=Z3;isSdkRuntime=F(!!this.sdkRuntimeConfig);mobilePanelVisible=F(!0);mobileCanvasHidden=F(!1);isMobile=F(!1);toggleMobileCanvas(){this.mobileCanvasHidden.update(e=>!e)}manifestLoading=F(!1);manifestError=F(null);predesignSwitchLoading=F(!1);showBlockingManifestLoader=Me(()=>this.manifestLoading()&&!this.predesignSwitchLoading());showCanvasManifestLoader=Me(()=>this.manifestLoading()&&this.predesignSwitchLoading());showBlockingManifestError=Me(()=>!!this.manifestError()&&!this.manifestLoaded);manifestLoaderMessage="Loading product manifest\u2026";predesignLoaderMessage="Applying selected design\u2026";predesignLoaderSubtitle="Updating 2D and 3D previews";selectedPredesignId=F(null);designSavingInProgress=F(!1);designSaveMessage=F(null);distributorHeaderLogoUrl=F(null);submissionThumbnailViews=["front","right","back","left"];manifestRequestToken=null;pendingPredesignCarryover=null;viewInitialized=!1;manifestLoaded=!1;filesLoaded=!1;hasInitializedManifestLoad=!1;lastManifestConfigSignature=null;pendingSubmissionPayload=null;editableSubmissionCompressionToken=null;suspendTextureRebuild=!1;pendingTextureRebuildWhileSuspended=!1;pendingEditableTextEffects=F([]);appliedEditableTextEffectKeys=F(new Set);replayPendingEffectsInFlight=!1;svgText=this.customizerState.svgTextState;svgDoc=this.customizerState.svgDocState;svgTextForExport=F(null);baseSvgText=F(null);predesignBaseSvgText=F(null);mtlText=F(null);objText=F(null);threeDVariants=F([]);selectedThreeDVariantId=F(null);showThreeDVariantSwitch=Me(()=>this.threeDVariants().length>1);threeDFileLink=F("");materialFileLink=F(null);pathIdAccordingLayers=F([]);renderPathAccordingLayers=F([]);layers=Me(()=>this.pathIdAccordingLayers().map(e=>e.name));selectedLayerKey=F(null);placementZones=this.personalizationState.placementZones;showPlacementGuides=this.personalizationState.showPlacementGuides;loading=F(!1);isModelLoading=F(!1);sanitizer=Z(Mp);minFontSize=F(12);maxFontSize=F(400);fontSizeStep=F(2);rotationStep=F(5);builtInFontOptions=F(Jx.map(({label:e,value:t})=>({label:e,value:t})));fontOptions=F([...this.builtInFontOptions()]);defaultFontFamily=F(this.builtInFontOptions()[0]?.value??Jx[0]?.value??yr);defaultFontWeight=F("normal");defaultFontStyle=F("normal");defaultLineHeight=F(1.2);defaultLetterSpacing=F(0);strokeWidthStep=F(.5);letterSpacingStep=F(.5);defaultCurveAmount=F(0);defaultShadowBlur=F(0);shadowBlurStep=F(1);defaultShadowOffsetX=F(0);defaultShadowOffsetY=F(0);defaultShadowColor=F(nh);warpEnvelopeFileName=F(null);warpUploadError=F(null);overlays=this.customizerState.overlays;svgDimensions=F(null);svgViewBox=F({minX:0,minY:0,width:1e3,height:1e3});activeOverlayId=F(null);threeDOverlayBounds=Me(()=>this.getOverlayBoundingRect());gridEnabled=F(!1);snapEnabled=F(!1);gridRatio=F((Kr.TWO_D_GRID_SIZE-8)/112);printAreaWidthInches=Me(()=>this.customizerState.printAreaWidthInches());printAreaHeightInches=Me(()=>this.customizerState.printAreaHeightInches());twoDGridSizeInches=F(1);twoDGridStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox(),o=this.twoDGridSizeInches();return e&&e>0&&n&&n>0&&o>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(o,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(o,r.height,n)))}:{x:Kr.TWO_D_GRID_SIZE,y:Kr.TWO_D_GRID_SIZE}});twoDGridSize=Me(()=>this.twoDGridStepPx().x);twoDGridMajorStepPx=Me(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox();return e&&e>0&&n&&n>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(1,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(1,r.height,n)))}:{x:Kr.INCH_IN_PIXELS,y:Kr.INCH_IN_PIXELS}});twoDGridMajorSize=Me(()=>this.twoDGridMajorStepPx().x);threeDGridSizeNormalized=Me(()=>{let e=this.gridRatio();return Math.round((e*(.2-.01)+.01)*100)/100});svgFileLink=F("");customizations=F([]);predesigns=F([]);isShowWholeLayersOption=F(!1);personlizationPlacements=Me(()=>this.personalizationState.placements());twoDCanvasElement=null;fabricCanvas=null;fabricCanvasCleanup=null;fabricCanvasSyncDimensions=null;fabricReady=F(!1);canvasLoadToken=F(null);baseElementCache=this.customizerState.baseElementCache;baseBBoxCache=this.customizerState.baseBBoxCache;measurementHost=this.customizerState.measurementHost;measurementSvgRoot=this.customizerState.measurementSvgRoot;measurementCloneDirty=this.customizerState.measurementCloneDirty;canvasTransform=F(null);fabricLayoutState=F(null);fabricViewZoom=F(1);minFabricViewZoom=F(.25);maxFabricViewZoom=F(5);isBrowser=this.customizerState.isBrowser;textureUpdateScheduled=F(!1);overlaySyncPromise=F(Promise.resolve());overlaySyncQueue=Promise.resolve();overlaySyncRequestId=0;backgroundImageTemplates=Me(()=>this.backgroundState.state().templates);placementZoneBounds=F(new Map);overlayFabricObjects=F(new Map);fabricVisibleOverlayIds=F(new Set);layerBoundsCache=this.customizerState.layerBoundsCache;pendingLogoLoads=F(new Map);fontSourceMap=F(k({},fD));fontBinaryPromises=F(new Map);fontOutlinePromises=F(new Map);fontFacePromises=F(new Map);fontFacesReady=F(new Set);svgImageHrefCache=new Map;svgImageHrefPending=new Map;canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;historyInitialized=!1;historyDebounceHandle=null;sdkReadyNotified=!1;isUndoingRedoing=F(!1);historyCaptureSuspended=!1;preserveHistoryOnNextSvgLoad=!1;placementGuideObjects=F(new Map);fabricGridState=F({horizontal:[],vertical:[]});fabricGuideState=F({lines:[]});twoDSnapRuntime=F(zi());twoDCursorCanvasPoint=F(null);twoDDraggingOverlayId=F(null);fabricSelectionClearSuppressionCount=0;lastHandledRenderCommandId=0;lastHandledTextureCommandId=0;lastHandledOverlaySyncCommandId=0;predesignStepId=L_.PREDESIGNS;renderOrderStepId=L_.RENDER_ORDER;canvasGuideStepId=L_.CANVAS_GUIDE;steps=F([]);personalizationItems=F([]);activeStepId=F(null);activeRenderOrderItemId=Me(()=>this.activeOverlayId()?`overlay:${this.activeOverlayId()}`:null);stepNav=Me(()=>this.panelService.flattenSteps(this.steps()));renderOrderItems=Me(()=>{let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});return this.renderOrderState.stack().map(t=>e.get(t)).filter(t=>!!t)});stepLookup=Me(()=>this.panelService.buildStepLookup(this.steps()));parentNav=Me(()=>this.panelService.buildParentNav(this.steps(),this.renderOrderStepId,S4));navExpanded=F(!1);dynamicSlotId=F(null);isDesktop=F(!0);showShortcuts=F(!1);toggleShortcuts(e){e.stopPropagation(),this.showShortcuts.update(t=>!t)}closeShortcuts(){this.showShortcuts.set(!1)}onResize(){if(this.isBrowser()){let e=window.innerWidth;this.isDesktop.set(e>=992),this.isMobile.set(e<768)}}allNavItems=Me(()=>{let e=this.predesigns(),t=[];return e&&e.length>0&&t.push({id:this.predesignStepId,name:"Designs",iconClass:"ri-pencil-fill",depth:0}),t.push(...this.parentNav()),t.push({id:this.canvasGuideStepId,name:"Canvas Guide",iconClass:"ri-layout-grid-line",depth:0}),t});visibleNavItems=Me(()=>{let e=this.allNavItems();if(this.isDesktop()||e.length<=4)return e;let t=this.dynamicSlotId(),n=this.activeStepId(),r=n&&e.findIndex(a=>a.id===n)>=3?n:t;(!r||e.findIndex(a=>a.id===r)<3)&&(r=e[3].id);let o=e.slice(0,3),s=e.find(a=>a.id===r)||e[3];return[...o,s]});hiddenNavItems=Me(()=>{let e=this.allNavItems();if(e.length<=4)return[];let t=new Set(this.visibleNavItems().map(n=>n.id));return e.filter(n=>!t.has(n.id))});toggleNavExpanded(){this.navExpanded.update(e=>!e)}onNavItemClick(e){this.setActiveStep(e),this.navExpanded.set(!1),this.dynamicSlotId.set(e)}predesignPanel=Me(()=>{let e=this.predesigns();return e.length?{kind:"predesigns",trackId:this.predesignStepId,title:eu.DESIGNS,predesigns:e}:null});canvasGuidePanel=Me(()=>({kind:"canvas-guide",trackId:this.canvasGuideStepId,title:"Canvas Guide"}));panelsByStep=Me(()=>this.panelService.buildPanelsByStep({stepNav:this.stepNav(),customizations:this.customizations(),personalizationItems:this.personalizationItems(),stepLookup:this.stepLookup(),renderOrderStepId:this.renderOrderStepId,renderOrderItems:this.renderOrderItems()}));activePanels=Me(()=>{let e=this.activeStepId();if(!e)return[];if(e===this.predesignStepId){let s=this.predesignPanel();return s?[s]:[]}if(e===this.renderOrderStepId)return this.panelsByStep().get(this.renderOrderStepId)??[];if(e===this.canvasGuideStepId){let s=this.canvasGuidePanel();return s?[s]:[]}let t=this.stepLookup(),n=this.panelsByStep(),r=s=>{let a=n.get(s.id)??[],l=(s.children??[]).flatMap(c=>r(c));return[...a,...l]},o=t.get(e);return o?r(o):[]});constructor(){Yt(()=>{this.customizerState.fabricReadyState.set(this.fabricReady())}),Yt(()=>{this.customizerState.canvasTransformState.set(this.canvasTransform())}),Yt(()=>{let e=this.customizerState.render2dCommandId();e===0||e===this.lastHandledRenderCommandId||(this.lastHandledRenderCommandId=e,hn(()=>this.render2dView()))}),Yt(()=>{let e=this.customizerState.textureRebuildCommandId();e===0||e===this.lastHandledTextureCommandId||(this.lastHandledTextureCommandId=e,hn(()=>this.requestTextureRebuild()))}),Yt(()=>{let e=this.customizerState.overlaySyncCommandId();e===0||e===this.lastHandledOverlaySyncCommandId||(this.lastHandledOverlaySyncCommandId=e,hn(()=>{this.syncOverlaysToSvgDoc().then(()=>this.customizerState.completeOverlaySyncCommand(e)).catch(t=>this.customizerState.completeOverlaySyncCommand(e,t))}))}),Yt(()=>{this.apiKey(),this.productId();let e=this.submissionNumber()?.trim()??"",t=this.predesignId()?.trim()??"";if(!this.hasInitializedManifestLoad)return;let n=this.getManifestConfigSignature(),r=n?`${n}::${e}::${t}`:null;!r||r===this.lastManifestConfigSignature||(this.lastManifestConfigSignature=r,hn(()=>{if(e){this.selectedPredesignId.set(null),this.bootstrapEditableSubmission(e);return}t?this.selectedPredesignId.set(t):this.selectedPredesignId.set(null),this.pendingSubmissionPayload=null,this.loadManifest(t||void 0)}))}),Yt(()=>{let e=this.fabricReady(),t=this.showPlacementGuides(),n=this.placementZones().length,r=!!this.canvasTransform(),o=this.fabricCanvas;if(!o||!e||!r||n===0){o&&(hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll());return}if(!t){hn(()=>this.clearPlacementGuides(o)),o.requestRenderAll();return}hn(()=>this.updatePlacementGuideVisibility())}),Yt(()=>{this.gridEnabled(),this.twoDGridStepPx(),this.twoDGridMajorStepPx(),this.twoDGridSizeInches(),hn(()=>this.render2dView())}),Yt(()=>{this.svgDoc(),this.svgText(),this.overlays(),this.patternState.state(),this.patternOverlayState.state().overlays,this.backgroundState.state().images,this.backgroundImageTemplates(),this.renderPathAccordingLayers(),hn(()=>this.synchronizeRenderOrderStack())}),Yt(()=>{this.svgText(),this.overlays(),this.selectedLayerKey(),this.showPlacementGuides(),this.backgroundState.state(),this.patternState.state(),hn(()=>{this.isUndoingRedoing()?this.isUndoingRedoing.set(!1):this.scheduleHistoryCapture()})}),Yt(()=>{this.ingestFontPacks(this.personalizationItems())}),Yt(()=>{this.personalizationItems(),this.overlays(),this.pendingEditableTextEffects().length&&hn(()=>{this.replayPendingEditableTextEffects()})}),Yt(()=>{let e=this.svgDoc();hn(()=>{if(!e){this.baseElementCache.set(null),this.baseBBoxCache.set(null);return}let t=e.documentElement;if(this.baseElementCache.set(t),t instanceof SVGGraphicsElement)try{this.baseBBoxCache.set(t.getBBox())}catch{this.baseBBoxCache.set(null)}})}),Yt(()=>{let e=this.editorMode();hn(()=>{(e==="3d"||e==="both")&&setTimeout(()=>{this.threeDUI()?.resizeHandler()},0),(e==="2d"||e==="both")&&setTimeout(()=>{this.fabricCanvasSyncDimensions?.(),this.render2dView()},0)})}),this.fontAssetService.queueFontFaceLoad(this.defaultFontFamily(),this.fontDeps()),this.registerKeyboardShortcuts()}ngOnInit(){if(this.isBrowser()){let n=window.innerWidth;this.isDesktop.set(n>=992),this.isMobile.set(n<768)}let e=this.submissionNumber()?.trim()??"",t=this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput());if(this.lastManifestConfigSignature=t?`${t}::${e}`:null,this.hasInitializedManifestLoad=!0,e){this.bootstrapEditableSubmission(e);return}}async bootstrapEditableSubmission(e){let t=this.resolveApiKey();if(this.pendingEditableTextEffects.set([]),this.appliedEditableTextEffectKeys.set(new Set),!t){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingApiKey);return}this.manifestLoading.set(!0);let n=this.resolveProductId()?.trim();if(!n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.missingProductId),this.manifestLoading.set(!1);return}this.manifestError.set(null);try{let r=await vc(this.submissionApi.getSubmissionByNumber(e,t)),o=this.resolveEditableSubmissionData(r?.data);if(!r?.isSuccess||!o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let l=r?.errors?.[0]??r?.message??Ot.submissionNotFound;this.manifestError.set(l),this.manifestLoading.set(!1),this.toaster.showError(l);return}let s=o.productId?.trim();if(!s||s!==n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionProductMismatch),this.manifestLoading.set(!1),this.toaster.showError(Ot.submissionProductMismatch);return}if(!this.isValidEditablePayload(o.designPayload)){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Ot.submissionInvalidPayload),this.toaster.showError(Ot.submissionInvalidPayload),this.manifestLoading.set(!1);return}let a=o.preDesignId?.trim()||null;this.selectedPredesignId.set(a),this.pendingSubmissionPayload=o.designPayload,await this.loadManifest(a)}catch{this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestLoading.set(!1),this.manifestError.set(Ot.submissionLoadFailed),this.toaster.showError(Ot.submissionLoadFailed)}}resolveEditableSubmissionData(e){if(!e)return null;if(Array.isArray(e)){let t=e[0];return t&&typeof t=="object"?t:null}return typeof e!="object"?null:e}isValidEditablePayload(e){if(!e||typeof e!="object")return!1;let t=e.svg?.content,n=e.svg?.contentUrl,r=typeof t=="string"&&t.trim().length>0,o=typeof n=="string"&&n.trim().length>0;return r||o}async loadManifest(e){let t=Symbol();this.manifestRequestToken=t;let n=!!e&&this.manifestLoaded;this.manifestLoading.set(!0),this.predesignSwitchLoading.set(n),this.manifestError.set(null),n||(this.manifestLoaded=!1),this.filesLoaded=!1;try{let r=await this.manifestFlowService.loadManifest(he(k({},this.getManifestIdentityInput()),{preDesignId:e??null,selectedPredesignId:this.selectedPredesignId(),activeStepId:this.activeStepId()}));if(this.manifestRequestToken!==t)return;if(!r.ok){this.pendingPredesignCarryover=null,this.manifestError.set(r.message),this.notifyManifestLoadFailed(r.message);return}this.applyManifestData(r.normalized)}catch{if(this.manifestRequestToken!==t)return;this.pendingPredesignCarryover=null,this.manifestError.set(Ot.manifestLoadFailed),this.notifyManifestLoadFailed(Ot.manifestLoadFailed)}finally{this.manifestRequestToken===t&&(this.manifestLoading.set(!1),this.predesignSwitchLoading.set(!1))}}retryManifestLoad(){this.loadManifest()}toggleMobilePanel(){this.mobilePanelVisible.update(e=>!e)}async onPredesignSelected(e){let t=e?.id??null;t&&(this.manifestLoading()||t===this.selectedPredesignId()||(this.pendingPredesignCarryover=this.capturePredesignCarryover(t),this.preserveHistoryOnNextSvgLoad=!1,this.selectedPredesignId.set(t),await this.loadManifest(t)))}async onThreeDVariantSelected(e){let t=e?.trim()??"";if(!t||t===this.selectedThreeDVariantId()||this.isModelLoading())return;let n=this.threeDVariants().find(r=>r.id===t);if(!(!n||!n.threeDFileLink)){this.selectedThreeDVariantId.set(n.id),this.threeDFileLink.set(n.threeDFileLink??""),this.materialFileLink.set(n.mtlFileLink??null);try{this.isModelLoading.set(!0),await this.loadThreeDModelFiles(),this.isModelLoading.set(!1),this.threeDUI()?.rebuildSVGTexture()}catch(r){this.isModelLoading.set(!1),console.error(Ot.errorLoadingFilesFromUrls,r),this.toaster.showError(Ot.manifestAssetsLoadFailed)}}}tryLoadFilesFromManifest(e=!1){!this.viewInitialized||!this.manifestLoaded||this.filesLoaded||(this.filesLoaded=!0,this.loadFilesFromUrls(e))}ngAfterViewInit(){this.initFabricCanvases(),this.viewInitialized=!0,this.tryLoadFilesFromManifest()}registerKeyboardShortcuts(){if(!this.isBrowser)return;let e=t=>{let n=t.composedPath?.()[0]||t.target;if(n&&this.keyboardShortcutService.isTextInputTarget(n))return;let r=this.keyboardShortcutService.resolveHistoryAction(t);if(r==="UNDO"){this.onUndo(),t.preventDefault();return}if(r==="REDO"){this.onRedo(),t.preventDefault();return}this.tryHandleOverlayKeyboardShortcut(t)&&t.preventDefault()};window.addEventListener("keydown",e,{passive:!1}),this.destroyRef.onDestroy(()=>window.removeEventListener("keydown",e))}tryHandleOverlayKeyboardShortcut(e){let t=this.keyboardShortcutService.resolveOverlayAction(e,this.rotationStep());return t?t.kind==="MOVE"?this.nudgeActiveOverlayByPixels(t.deltaXPx,t.deltaYPx):this.rotateActiveOverlayByStep(t.deltaAngle):!1}nudgeActiveOverlayByPixels(e,t){let n=this.resolveKeyboardTargetOverlay();if(!n)return!1;let r=this.getOverlayBoundingRect();if(r.width<=0||r.height<=0)return!1;let o=n.normalizedX+e/r.width,s=n.normalizedY+t/r.height;return this.setOverlayNormalizedPosition(n,o,s),!0}rotateActiveOverlayByStep(e){let t=this.resolveKeyboardTargetOverlay();return t?(this.onOverlayRotationChange({overlay:t,angle:(t.angle??0)+e}),!0):!1}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;if(this.editorMode()==="2d")return null;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.setActiveOverlay(n),n):null}async loadFilesFromUrls(e=!1){this.preserveHistoryOnNextSvgLoad=!1;let n=!this.suspendTextureRebuild;n&&(this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1);try{if(this.loading.set(!0),this.svgFileLink()){let r=await this.fileService.fetchFileAsText(this.svgFileLink());if(this.svgText.set(r),this.loadSVGFromText(r,!0),await this.applyPredesignCarryoverIfNeeded(),this.pendingSubmissionPayload)try{await this.applyEditableSubmissionPayload(this.pendingSubmissionPayload),this.pendingSubmissionPayload=null}catch(o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let s=o instanceof Error&&o.message===Ot.submissionInvalidPayload?Ot.submissionInvalidPayload:Ot.submissionLoadFailed;this.manifestError.set(s),this.toaster.showError(s);return}}if(await this.loadThreeDModelFiles(),this.loading.set(!1),this.sdkRuntimeConfig&&!this.sdkReadyNotified){this.sdkReadyNotified=!0;let r=this.resolveProductId();r&&this.sdkRuntimeConfig.onReady?.({productId:r})}e&&setTimeout(()=>{this.threeDUI()?.rebuildSVGTexture()},0)}catch(r){if(console.error(Ot.errorLoadingFilesFromUrls,r),this.sdkRuntimeConfig){this.manifestError.set(Ot.manifestAssetsLoadFailed);let o=this.resolveProductId();o&&this.sdkRuntimeConfig.onAssetLoadFailed?.({productId:o,code:"ASSET_LOAD_FAILED",message:Ot.manifestAssetsLoadDetail})}this.loading.set(!1)}finally{n&&(this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild()))}}async loadThreeDModelFiles(){this.objText.set(null),this.mtlText.set(null),this.threeDFileLink()&&this.objText.set(await this.fileService.fetchFileAsText(this.threeDFileLink())),this.materialFileLink()&&this.mtlText.set(await this.fileService.fetchFileAsText(this.materialFileLink()))}async applyEditableSubmissionPayload(e){let t=Symbol();this.editableSubmissionCompressionToken=t,this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1,this.predesignBaseSvgText.set(this.baseSvgText());let n=e.svg?.content?.trim()??"";if(!n){let r=e.svg?.contentUrl?.trim();if(!r)throw new Error(Ot.submissionInvalidPayload);n=(await this.fileService.fetchFileAsText(r)).trim()}if(!n)throw new Error(Ot.submissionInvalidPayload);try{this.loadSVGFromText(n,!1);let r=this.parseTextOverlays(e.overlays?.text??[]),o=this.parseLogoOverlays(e.overlays?.logo??[]),s=this.ensureUniqueOverlayIds([...r,...o]);this.overlays.set(s),this.hydrateEditableOverlayRuntimeDimensions(e,s),this.activeOverlayId.set(s[0]?.id??null);let a=(e.overlays?.text??[]).filter(c=>!!c?.id).map(c=>({overlayId:c.id,effectId:c.effectId??null}));if(this.personalizationState.setSelectedEffectByOverlay(a),this.appliedEditableTextEffectKeys.set(new Set),this.pendingEditableTextEffects.set(this.buildPendingEditableTextEffects(e.overlays?.text??[],s)),await this.replayPendingEditableTextEffects(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),e.background?.selectedKey&&this.backgroundState.select(e.background.selectedKey),await this.prepareEditableSubmissionAssetsFor3d(s,t),this.editableSubmissionCompressionToken!==t)return;e.pattern?.selectedUploadedPatternId&&this.patternState.setSelectedUploadedPattern(e.pattern.selectedUploadedPatternId),this.patternState.setSelectedPatternFileUrl(e.pattern?.selectedFileUrl??null);let l=(e.renderOrder??[]).filter(c=>typeof c=="string"&&c.trim().length>0);if(l.length){this.renderOrderState.enableManualOrdering(),this.renderOrderState.setStack(l);let c=this.svgDoc()?.documentElement;c&&this.renderOrderState.applyStackToSvg(c,this.renderPathAccordingLayers())}await this.syncOverlaysToSvgDoc(),this.requestTextureRebuild(),this.render2dView(),this.resetHistoryWithCurrentState("Edited submission initial state")}finally{if(this.editableSubmissionCompressionToken!==t)return;this.editableSubmissionCompressionToken=null,this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild())}}async prepareEditableSubmissionAssetsFor3d(e,t){await Promise.all([this.compressEditableSubmissionLogoOverlaysFor3d(e,t),this.backgroundState.ensureCompressedSourcesFor3d()]),this.editableSubmissionCompressionToken===t&&this.overlays.set([...e])}async compressEditableSubmissionLogoOverlaysFor3d(e,t){let n=e.filter(ai);n.length&&await Promise.all(n.map(async r=>{let o=r.imageSrc?.trim();if(!(!o||r.imageSrc3d))try{let s=await this.imageCompressionService.compressImageToDataUrl(o);if(this.editableSubmissionCompressionToken!==t)return;r.imageSrc3d=s}catch(s){console.warn("[CustomizerUiComponent] Failed to compress editable submission logo, using original",s)}}))}parseTextOverlays(e){return e.filter(t=>!!t?.id).map(t=>({id:t.id,kind:"text",text:t.text??"",fill:t.style?.fill??"#1f2937",fontSize:Number.isFinite(t.style?.fontSize)?t.style?.fontSize:24,horizontalScale:this.normalizeOverlayScale(t.style?.horizontalScale,1),verticalScale:this.normalizeOverlayScale(t.style?.verticalScale,1),fontFamily:t.style?.fontFamily??this.defaultFontFamily(),fontWeight:t.style?.fontWeight??this.defaultFontWeight(),fontStyle:t.style?.fontStyle??this.defaultFontStyle(),letterSpacing:Number.isFinite(t.style?.letterSpacing)?t.style?.letterSpacing:this.defaultLetterSpacing(),lineHeight:Number.isFinite(t.style?.lineHeight)?t.style?.lineHeight:this.defaultLineHeight(),stroke:t.style?.stroke??jl,strokeWidth:Number.isFinite(t.style?.strokeWidth)?t.style?.strokeWidth:0,secondStroke:t.style?.secondStroke??Wl,secondStrokeWidth:Number.isFinite(t.style?.secondStrokeWidth)?t.style?.secondStrokeWidth:0,curveAmount:Number.isFinite(t.style?.curveAmount)?t.style?.curveAmount:this.defaultCurveAmount(),shadowBlur:Number.isFinite(t.style?.shadowBlur)?t.style?.shadowBlur:this.defaultShadowBlur(),shadowOffsetX:Number.isFinite(t.style?.shadowOffsetX)?t.style?.shadowOffsetX:this.defaultShadowOffsetX(),shadowOffsetY:Number.isFinite(t.style?.shadowOffsetY)?t.style?.shadowOffsetY:this.defaultShadowOffsetY(),shadowColor:t.style?.shadowColor??nh,warpEnabled:t.effects?.warp===!0,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,placementKey:t.placementKey??null,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0}))}parseLogoOverlays(e){return e.filter(t=>!!t?.id&&!!t?.imageSrc).map(t=>({id:t.id,kind:"logo",logoBlobId:t.logoBlobId??null,imageSrc:t.imageSrc,imageName:t.imageName??void 0,placementKey:t.placementKey??null,opacity:Number.isFinite(t.opacity)?t.opacity:1,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0,originalWidth:Number.isFinite(t.dimensions?.originalWidth)?t.dimensions?.originalWidth:0,originalHeight:Number.isFinite(t.dimensions?.originalHeight)?t.dimensions?.originalHeight:0,normalizedWidth:this.normalizeOverlayCoordinate(t.dimensions?.normalizedWidth,.2),normalizedHeight:this.normalizeOverlayCoordinate(t.dimensions?.normalizedHeight,.2),processedImageSrc:t.processedImageSrc??null}))}hydrateOverlaysFromSvgBase(){let e=this.svgDoc();if(!e){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0){this.overlays.set([]),this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null);return}let n=[],r=Array.from(e.querySelectorAll('[data-overlay="true"]'));for(let a of r){if(a.tagName.toLowerCase()==="image"){let d=this.tryExtractLogoOverlayFromSvgNode(a,t);d&&n.push(d);continue}let c=this.tryExtractTextOverlayFromSvgNode(a,t);c&&n.push(c)}let o=this.ensureUniqueOverlayIds(n);this.overlays.set(o);let s=o[0]??null;this.activeOverlayId.set(s?.id??null),this.customizerState.setActiveOverlay(s)}tryExtractTextOverlayFromSvgNode(e,t){if(!(e.tagName.toLowerCase()==="g"&&(e.getAttribute(me.DATA_OVERLAY_KIND)?.trim()?.toLowerCase()==="text"||!!e.querySelector("path"))))return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=o.translateX,a=o.translateY;if(!Number.isFinite(s)||!Number.isFinite(a))return null;let l=this.normalizeOverlayCoordinate((s-t.x)/t.width,.5),c=this.normalizeOverlayCoordinate((a-t.y)/t.height,.5),d=this.readOverlayPlacementKey(e),u=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:d,kind:"text",normalizedX:l,normalizedY:c});if(!u)return null;let f=e.getAttribute(me.DATA_OVERLAY_TEXT)?.trim()??e.getAttribute("aria-label")?.trim()??"";if(!f)return null;let h=e.querySelector("path"),p=e.getAttribute(me.DATA_OVERLAY_FILL)?.trim()??h?.getAttribute("fill")?.trim()??"#1f2937",v={id:e.getAttribute("id")?.trim()||`text-${Date.now()}`,kind:"text",placementKey:u,text:f,fill:p,fontSize:this.readFiniteAttr(e,me.DATA_OVERLAY_FONT_SIZE,24),horizontalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_X,o.scaleX),o.scaleX),verticalScale:this.normalizeOverlayScale(this.readFiniteAttr(e,me.DATA_OVERLAY_SCALE_Y,o.scaleY),o.scaleY),fontFamily:e.getAttribute(me.DATA_OVERLAY_FONT_FAMILY)?.trim()||this.defaultFontFamily()||void 0,fontWeight:e.getAttribute(me.DATA_OVERLAY_FONT_WEIGHT)?.trim()==="bold"?"bold":this.defaultFontWeight(),fontStyle:e.getAttribute(me.DATA_OVERLAY_FONT_STYLE)?.trim()==="italic"?"italic":this.defaultFontStyle(),lineHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_LINE_HEIGHT,this.defaultLineHeight()),letterSpacing:this.readFiniteAttr(e,me.DATA_OVERLAY_LETTER_SPACING,this.defaultLetterSpacing()),stroke:e.getAttribute(me.DATA_OVERLAY_STROKE)?.trim()||jl,strokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_STROKE_WIDTH,0),secondStroke:e.getAttribute(me.DATA_OVERLAY_SECOND_STROKE)?.trim()||Wl,secondStrokeWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_SECOND_STROKE_WIDTH,0),curveAmount:this.readFiniteAttr(e,me.DATA_OVERLAY_CURVE_AMOUNT,this.defaultCurveAmount()),shadowBlur:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_BLUR,this.defaultShadowBlur()),shadowOffsetX:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_X,this.defaultShadowOffsetX()),shadowOffsetY:this.readFiniteAttr(e,me.DATA_OVERLAY_SHADOW_OFFSET_Y,this.defaultShadowOffsetY()),shadowColor:e.getAttribute(me.DATA_OVERLAY_SHADOW_COLOR)?.trim()||this.defaultShadowColor(),warpEnabled:e.getAttribute(me.DATA_OVERLAY_WARP_ENABLED)==="true",lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:l,normalizedY:c,angle:this.normalizeAngle(o.rotate)};return v=this.applyPlacementZoneTextBounds(v),v}tryExtractLogoOverlayFromSvgNode(e,t){let n=this.readFiniteAttr(e,"width",0),r=this.readFiniteAttr(e,"height",0);if(n<=0||r<=0)return null;let o=this.parseSvgTransform(e.getAttribute("transform")),s=this.readFiniteAttr(e,"x",0),a=this.readFiniteAttr(e,"y",0),l=Number.isFinite(o.translateX)?o.translateX:0,c=Number.isFinite(o.translateY)?o.translateY:0,d=s+n/2+l,u=a+r/2+c,f=this.normalizeOverlayCoordinate((d-t.x)/t.width,.5),h=this.normalizeOverlayCoordinate((u-t.y)/t.height,.5),p=this.readOverlayPlacementKey(e),v=this.resolveExtractedOverlayPlacementKey({explicitPlacementKey:p,kind:"logo",normalizedX:f,normalizedY:h});if(!v)return null;let g=e.getAttribute("href")?.trim()??e.getAttributeNS($d,"href")?.trim()??"";if(!g)return null;let m={id:e.getAttribute("id")?.trim()||`logo-${Date.now()}`,kind:"logo",placementKey:v,imageSrc:g,imageName:e.getAttribute(me.DATA_SOURCE_NAME)?.trim()||void 0,originalWidth:this.readFiniteAttr(e,me.DATA_OVERLAY_original_WIDTH,n),originalHeight:this.readFiniteAttr(e,me.DATA_OVERLAY_original_HEIGHT,r),normalizedWidth:this.normalizeOverlayCoordinate(n/t.width,.2),normalizedHeight:this.normalizeOverlayCoordinate(r/t.height,.2),lockAspectRatio:e.getAttribute(me.DATA_OVERLAY_LOCK_RATIO)!=="false",normalizedX:f,normalizedY:h,angle:this.normalizeAngle(o.rotate),opacity:this.readFiniteAttr(e,"opacity",1)};return m=this.applyPlacementZoneLogoBounds(m),m}readFiniteAttr(e,t,n){let r=e.getAttribute(t);if(!r)return n;let o=Number.parseFloat(r);return Number.isFinite(o)?o:n}parseSvgTransform(e){let t=e?.trim()??"";if(!t)return{translateX:Number.NaN,translateY:Number.NaN,scaleX:1,scaleY:1,rotate:0};let n=t.match(/translate\(([-+]?\d*\.?\d+)(?:[\s,]+)([-+]?\d*\.?\d+)\)/i),r=t.match(/scale\(([-+]?\d*\.?\d+)(?:[\s,]+([-+]?\d*\.?\d+))?\)/i),o=t.match(/rotate\(([-+]?\d*\.?\d+)/i),s=t.match(/matrix\(\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*,?\s*([-+]?\d*\.?\d+)\s*\)/i),a=s?Number.parseFloat(s[5]):Number.NaN,l=s?Number.parseFloat(s[6]):Number.NaN,c=n?Number.parseFloat(n[1]):a,d=n?Number.parseFloat(n[2]):l,u=r?Number.parseFloat(r[1]):1,f=r?Number.parseFloat(r[2]??r[1]):1,h=o?Number.parseFloat(o[1]):0;return{translateX:c,translateY:d,scaleX:Number.isFinite(u)?u:1,scaleY:Number.isFinite(f)?f:1,rotate:Number.isFinite(h)?h:0}}readOverlayPlacementKey(e){let t=e.getAttribute(me.DATA_PLACEMENT_KEY)?.trim()??e.getAttribute(me.PLACEMENT_KEY)?.trim()??e.getAttribute(me.DATA_PLACEMENT)?.trim()??e.getAttribute(me.PLACEMENTKEY)?.trim()??null;return t&&t.length>0?t:null}resolveExtractedOverlayPlacementKey(e){let{explicitPlacementKey:t,kind:n,normalizedX:r,normalizedY:o}=e,s=n==="text"?new Set(["TEXT"]):new Set(["LOGO","OVERLAY"]),a=h=>h.trim().replace(/^[#@]+/,"").toLowerCase(),l=new Set((this.personalizationItems()??[]).filter(h=>h?.placementKey&&s.has((h.type??"").trim().toUpperCase())).map(h=>h.placementKey)),c=new Map;if(Array.from(l).forEach(h=>{c.set(a(h),h)}),t){if(l.has(t))return t;let h=a(t),p=c.get(h);if(p)return p}let d=l.size>0?Array.from(l):this.personalizationState.placementZones().map(h=>h.placementKey),u=null,f=Number.POSITIVE_INFINITY;for(let h of d){let p=this.personalizationState.getPlacementZoneNormalizedBoundsByKey(h);if(!p)continue;if(r>=p.minX&&r<=p.maxX&&o>=p.minY&&o<=p.maxY)return h;let v=Qt.clamp(r,p.minX,p.maxX),g=Qt.clamp(o,p.minY,p.maxY),m=Math.hypot(r-v,o-g);m<f&&(f=m,u=h)}return u||(l.size===1?Array.from(l)[0]:t||null)}hydrateEditableOverlayRuntimeDimensions(e,t){let n=new Map,r=new Map(t.filter(Dt).map(s=>[s.id,s]));(e.overlays?.text??[]).forEach(s=>{if(!s?.id)return;let a=r.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})});let o=new Map(t.filter(ai).map(s=>[s.id,s]));(e.overlays?.logo??[]).forEach(s=>{if(!s?.id)return;let a=o.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})}),this.customizerState.overlayRuntimeDimensionsPx.set(n)}normalizeOverlayCoordinate(e,t){return Number.isFinite(e)?Qt.clamp(e,0,1):t}normalizeOverlayScale(e,t){return Number.isFinite(e)?Qt.clamp(e,.1,8):t}buildPendingEditableTextEffects(e,t){let n=new Map(t.filter(Dt).map(o=>[o.id,o])),r=[];for(let o of e){let s=o?.effectId?.trim();if(!o?.id||!s)continue;let a=n.get(o.id);a&&r.push({overlayId:a.id,placementKey:a.placementKey??o.placementKey??null,effectId:s})}return r}async replayPendingEditableTextEffects(){if(this.replayPendingEffectsInFlight)return;let e=this.pendingEditableTextEffects();if(!(!e.length||!this.hasAnyEffectDataSources())){this.replayPendingEffectsInFlight=!0;try{let t=new Map(this.overlays().map(o=>[o.id,o])),n=new Set(this.appliedEditableTextEffectKeys()),r=[];for(let o of e){let s=`${o.overlayId}::${o.effectId}`;if(n.has(s))continue;let a=t.get(o.overlayId);if(!a||!Dt(a))continue;let l=this.findEffectDataSource(o.effectId,o.placementKey);if(!l){r.push(o);continue}await this.personalizationState.applyTextEffect(a,l),n.add(s)}this.appliedEditableTextEffectKeys.set(n),this.pendingEditableTextEffects.set(r)}finally{this.replayPendingEffectsInFlight=!1}}}hasAnyEffectDataSources(){return(this.personalizationItems()??[]).some(e=>(e.packs??[]).some(t=>(t.type??"").toLowerCase().includes("effect")&&(t.dataSources?.length??0)>0))}findEffectDataSource(e,t){let n=e.trim();if(!n)return null;let r=(this.personalizationItems()??[]).filter(o=>!t||o.placementKey===t).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n);return r||((this.personalizationItems()??[]).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n)??null)}ensureUniqueOverlayIds(e){let t=new Map;return e.map(n=>{let r=t.get(n.id)??0;return t.set(n.id,r+1),r===0?n:he(k({},n),{id:`${n.id}-${r}`})})}capturePredesignCarryover(e){return this.predesignCarryoverService.captureSnapshot({targetPredesignId:e,manifestLoaded:this.manifestLoaded,svgDoc:this.svgDoc(),customizations:this.customizations(),overlays:this.overlays(),backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}async applyPredesignCarryoverIfNeeded(){let e=this.pendingPredesignCarryover;if(!e)return;let t=this.selectedPredesignId();this.pendingPredesignCarryover=null,await this.predesignCarryoverService.applyIfNeeded({snapshot:e,selectedPredesignId:t,customizations:this.customizations(),personalizationItems:this.personalizationItems(),backgroundTemplates:this.backgroundImageTemplates(),overlaysState:this.overlays,activeOverlayIdState:this.activeOverlayId,backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}applyManifestData(e){this.predesignBaseSvgText.set(null),e.distributorBranding?(this.themeService.applyDistributorBranding(e.distributorBranding,{lock:!0}),this.distributorHeaderLogoUrl.set(e.distributorBranding.logoUrl??null)):(this.themeService.clearDistributorBranding(),this.distributorHeaderLogoUrl.set(null)),this.editorMode.set((e.isShowWholeLayersOption||e.pathIdAccordingLayers.length>0)&&!this.isMobile()?"both":"3d"),this.selectedPredesignId()!=e.resolvedPredesignId&&this.selectedPredesignId.set(e.resolvedPredesignId);let t=e.threeDVariants.find(r=>r.id===this.selectedThreeDVariantId())??e.threeDVariants.find(r=>r.id===e.selectedThreeDVariantId)??e.threeDVariants.find(r=>r.isDefault)??e.threeDVariants[0]??null;this.threeDVariants.set(e.threeDVariants),this.selectedThreeDVariantId.set(t?.id??e.selectedThreeDVariantId),this.threeDFileLink.set(t?.threeDFileLink??e.threeDFileLink??""),this.materialFileLink.set(t?.mtlFileLink??e.materialFileLink),this.svgFileLink.set(e.svgFileLink),e.svgViewBox&&this.svgViewBox.set(e.svgViewBox),this.customizations.set(e.customizations),this.predesigns.set(e.predesigns),this.steps.set(e.steps),this.pathIdAccordingLayers.set(e.pathIdAccordingLayers),this.renderPathAccordingLayers.set(e.renderPathAccordingLayers),this.isShowWholeLayersOption.set(e.isShowWholeLayersOption),this.customizerState.setPrintAreaInches(e.printAreaWidthInches,e.printAreaHeightInches),this.personalizationState.setPlacements(e.placements),this.backgroundState.setTemplates(e.placements),this.personalizationItems.set(e.placements),e.nextActiveStepId&&!this.activeStepId()&&this.activeStepId.set(e.nextActiveStepId),this.sdkReadyNotified=!1,this.manifestLoaded=!0;let n=this.resolveProductId();this.sdkRuntimeConfig&&n&&this.sdkRuntimeConfig.onManifestLoaded?.({productId:n,manifestMeta:e.manifestMeta}),this.tryLoadFilesFromManifest(!0)}getManifestIdentityInput(){return{runtimeConfig:this.sdkRuntimeConfig,inputProductId:this.productId(),inputApiKey:this.apiKey(),fallbackProductId:this.fallbackProductId}}resolveProductId(){return this.manifestFlowService.resolveProductId(this.getManifestIdentityInput())}resolveApiKey(){return this.manifestFlowService.resolveApiKey(this.getManifestIdentityInput())}getManifestConfigSignature(){return this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput())}notifyManifestLoadFailed(e){if(!this.sdkRuntimeConfig)return;let t=this.resolveProductId();t&&this.sdkRuntimeConfig.onManifestLoadFailed?.({productId:t,code:"MANIFEST_LOAD_FAILED",message:e})}loadSVGFromText(e,t=!0){this.baseSvgText.set(e),this.svgText.set(e),this.measurementCloneDirty.set(!0),this.overlays.set([]),this.customizerState.clearAllTextGlyphPlans(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.fabricLayoutState.set(null),this.svgDimensions.set(null),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3}),this.activeOverlayId.set(null);let n=this.isShowWholeLayersOption()?null:this.pathIdAccordingLayers()[0]?.name??null;this.selectedLayerKey.set(n),this.patternState.reset(),this.patternOverlayState.reset(),this.renderOrderState.reset(),this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.personalizationState.reset(),this.backgroundState.reset(),this.resetFabricViewTransform(),this.parseSVGRegions(this.svgText()),this.personalizationState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),this.hydrateOverlaysFromSvgBase(),this.syncOverlaysToSvgDoc().catch(r=>{console.error(Ot.overlaySyncFailed,r)}).finally(()=>{this.render2dView(),this.requestTextureRebuild()}),t&&!this.designHistory.isRestoring()&&this.resetHistoryWithCurrentState("Initial state")}resetHistoryWithCurrentState(e){let t=this.buildHistorySnapshot(e);this.designHistory.seed(t),this.historyInitialized=!0}scheduleHistoryCapture(e){!this.historyInitialized||this.designHistory.isRestoring()||this.historyCaptureSuspended||(this.historyDebounceHandle&&clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=setTimeout(()=>{this.designHistory.record(this.buildHistorySnapshot(e)),this.historyDebounceHandle=null},120))}setHistoryCaptureSuspended(e){this.historyCaptureSuspended=e,e&&this.historyDebounceHandle&&(clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=null)}buildHistorySnapshot(e,t){let n=t===void 0?this.selectedPredesignId():t;return{svgText:this.svgText(),overlays:JSON.parse(JSON.stringify(this.overlays()??[])),activeOverlayId:this.activeOverlayId(),selectedLayerKey:this.selectedLayerKey(),showPlacementGuides:this.showPlacementGuides(),selectedPredesignId:n,label:e,timestamp:Date.now()}}async applySnapshot(e){this.designHistory.beginRestore();try{let t=this.selectedPredesignId(),n=e.selectedPredesignId??null;if(t!==n){this.selectedPredesignId.set(n),await this.loadManifest(n);return}e.svgText?this.loadSVGFromText(e.svgText,!1):(this.svgText.set(null),this.render2dView()),this.overlays.set(JSON.parse(JSON.stringify(e.overlays??[]))),this.activeOverlayId.set(e.activeOverlayId??null),this.selectedLayerKey.set(e.selectedLayerKey??null),this.showPlacementGuides.set(!!e.showPlacementGuides),this.syncOverlaysToSvgDoc().finally(()=>{this.requestTextureRebuild(),this.render2dView()})}finally{this.designHistory.endRestore(),this.historyInitialized=!0}}onUndo(){let e=this.designHistory.undo(this.buildHistorySnapshot("undo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onRedo(){let e=this.designHistory.redo(this.buildHistorySnapshot("redo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onTwoDCanvasReady(e){this.twoDCanvasElement!==e&&(this.twoDCanvasElement=e,this.initFabricCanvases())}onTwoDCanvasDestroyed(){this.twoDCanvasElement=null,this.disposeFabricCanvases()}render2dView(){this.render2dViewAsync(),this.updatePlacementGuideVisibility()}async render2dViewAsync(){if(!this.fabricReady()||!this.fabricCanvas)return;try{await this.overlaySyncPromise()}catch{return}if(!this.svgDoc()){this.fabricCanvas.clear(),this.fabricCanvas.renderAll(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.twoDSnapRuntime.set(zi());return}let e=this.getActiveLayerPathIds(),t=this.renderOrderState.resolveFabricVisibleOverlayIds(this.overlays()),n=this.overlays().map(s=>s.id).filter(s=>!t.has(s));this.fabricVisibleOverlayIds.set(t);let r=this.svgRenderService.buildSvgForView(this.svgDoc(),this.pathIdAccordingLayers(),e.length>0?e:void 0,{preserveOverlayIds:n}),o=e.length>0?this.getLayerPreviewBounds(e):null;this.renderSvgOnCanvas(this.fabricCanvas,r,o),this.fabricGuideState.set({lines:[]}),this.twoDSnapRuntime.set(zi())}onLayerToggle(e){let t=this.selectedLayerKey(),n=this.isShowWholeLayersOption(),r=e===null||t===e?n?null:t:e;t!==r&&(this.selectedLayerKey.set(r),this.render2dView())}getActiveLayerPathIds(){let e=this.selectedLayerKey();if(!e)return[];let t=this.pathIdAccordingLayers().find(n=>n.name.toLowerCase()===e.toLowerCase());return t?t.actionPathIdsCsv.split(",").map(n=>n.replace("#","").trim()):[]}getAllLayerPathIds(){let e=new Set;for(let t of this.pathIdAccordingLayers())for(let n of t.actionPathIdsCsv.split(",")){let r=n.replace("#","").trim();r&&e.add(r)}return[...e]}renderSvgOnCanvas(e,t,n){let r=this.overlayFabricObjects().size>0,o=this.canvasTransform();if(!t){e.clear(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.canvasLoadToken.set(null),e.backgroundImage=void 0,e.renderAll();return}let s=Symbol();this.canvasLoadToken.set(s),this.svgDimensions()||this.computeSvgDimensions();let a=this.getOverlayBoundingRect(),l=this.normalizePreviewBounds(n??null,a);gU({canvas:e,svgMarkup:t,fabricViewZoom:this.fabricViewZoom(),svgViewBox:this.svgViewBox(),svgDimensions:this.svgDimensions(),targetBounds:l,baseBounds:a,loadToken:s}).then(c=>{if(!c||this.canvasLoadToken()!==c.token)return;let{image:d,transform:u,layout:f}=c;r&&o||(e.clear(),this.overlayFabricObjects.set(new Map)),e.backgroundImage=d,this.canvasTransform.set(u),this.fabricLayoutState.set(f),this.renderOverlaysOnCanvas(e),this.renderTwoDAlignmentLayers(e),e.requestRenderAll(),this.canvasLoadToken.set(null)}).catch(c=>{console.error(Ot.failedRenderSvgOnCanvas,c),this.canvasLoadToken.set(null)})}createOverlayTextObject(e,t,n){let r=this.getCachedTextGlyphPlan(e);if(!r)return this.ensureTextGlyphPlan(e),this.overlayFabricObjects().get(e.id);let o=this.getTextGlyphPlanSignature(e),s=this.getTextLayoutSignature(e),a=this.overlayFabricObjects().get(e.id);if(a){let _=a.textPlanSignature,w=a.layoutSignature;if(_===o&&w===s)return this.applyShadowToFabricGroup(a,e),a}a&&(t.getActiveObject()===a&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(a),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.delete(e.id),w}));let l=this.getOrBuildTextLayout(e,r);if(!l.length)return null;let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,g=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0,m=(_,w,D,A,P)=>{let E=new zs(_.d,{fill:e.fill,stroke:w,strokeWidth:D,strokeLineJoin:"round",strokeLineCap:"round",paintFirst:A,originX:"center",originY:"center",left:_.x,angle:_.angle,strokeUniform:!0});return E.outlineLayer=P,E},b=[];l.forEach(_=>{g>0&&b.push(m(_,e.fill,g,"stroke","faux-bold"));let w=h>0?p+(d>0?u:0):0;w>0&&b.push(m(_,f??void 0,w,"stroke","secondary-stroke"));let D=d>0?u:0;b.push(m(_,c??void 0,D,D>0?"stroke":"fill","primary-stroke"))});let y=new ts(b,{originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,centeredRotation:!0,lockScalingFlip:!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)});return y.set("lockUniScaling",e.lockAspectRatio??!0),y.set("skewX",e.fontStyle==="italic"?-12:0),y.set("skewY",0),y.dataOverlayId=e.id,y.textPlanSignature=o,y.layoutSignature=s,this.applyShadowToFabricGroup(y,e),y.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,y),this.constrainOverlayWithinView(e,y)}),y.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,y),this.constrainOverlayWithinView(e,y)}),y.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let _=this.resolveOverlayForFabricObject(y);_&&Dt(_)&&this.finalizeOverlayFromFabric(_,y)}),y.on("mousedown",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),y.on("selected",()=>{let _=this.resolveOverlayForFabricObject(y);_&&this.setActiveOverlay(_)}),this.overlayFabricObjects.update(_=>{let w=new Map(_);return w.set(e.id,y),w}),t.add(y),this.activeOverlayId()===e.id&&t.setActiveObject(y),t.requestRenderAll(),y}ensureLogoFabricObject(e,t){let n=e.processedImageSrc??e.imageSrc,r=this.overlayFabricObjects().get(e.id);if(r){if(r.dataImageSrc!==n)t.getActiveObject()===r&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(r),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(e.id),l});else return this.syncFabricObjectWithOverlay(e,r),this.activeOverlayId()===e.id&&t.setActiveObject(r),r;this.pendingLogoLoads.update(a=>{let l=new Map(a);return l.delete(e.id),l}),t.getObjects().includes(r)&&t.requestRenderAll()}let o=Symbol();return this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.set(e.id,o),a}),jr.fromURL(n).then(s=>{this.pendingLogoLoads().get(e.id)===o&&(s.set({originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,lockScalingFlip:!0,lockUniScaling:e.lockAspectRatio??!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12}),s.dataOverlayId=e.id,s.dataImageSrc=n,s.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,s),this.constrainOverlayWithinView(e,s)}),s.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,s),this.constrainOverlayWithinView(e,s)}),s.on("modified",()=>{this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let a=this.resolveOverlayForFabricObject(s);a&&ai(a)&&this.finalizeOverlayFromFabric(a,s)}),s.on("mousedown",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),s.on("selected",()=>{let a=this.resolveOverlayForFabricObject(s);a&&this.setActiveOverlay(a)}),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.set(e.id,s),l}),t.add(s),this.syncFabricObjectWithOverlay(e,s),this.constrainOverlayWithinView(e,s),this.applyFabricStackByOverlayOrder(t),this.activeOverlayId()===e.id&&t.setActiveObject(s),t.requestRenderAll())}).finally(()=>{this.pendingLogoLoads().get(e.id)===o&&this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.delete(e.id),a})}),null}renderOverlaysOnCanvas(e){let t=this.canvasTransform();if(!t){e.requestRenderAll();return}this.renderPlacementGuides(e);let n=new Set;this.overlays().forEach(o=>{if(this.fabricVisibleOverlayIds().has(o.id)&&this.overlayMatchesLayer(o,this.selectedLayerKey()))if(Dt(o)){if(o.text.trim().length===0)return;let s=this.overlayFabricObjects().get(o.id),a=this.getTextGlyphPlanSignature(o),l=this.getTextLayoutSignature(o),c=!s||s.textPlanSignature!==a||s.layoutSignature!==l,d=c?this.createOverlayTextObject(o,e,t):s;d&&(!c&&d instanceof ts&&(this.applyShadowToFabricGroup(d,o),d.layoutSignature=l,d.textPlanSignature=a),this.syncFabricObjectWithOverlay(o,d),this.activeOverlayId()===o.id&&e.setActiveObject(d),n.add(o.id))}else ai(o)&&this.ensureLogoFabricObject(o,e)&&n.add(o.id)}),Array.from(this.overlayFabricObjects().entries()).forEach(([o,s])=>{n.has(o)||(e.getActiveObject()===s&&this.discardActiveObjectWithoutSelectionClear(e),e.remove(s),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(o),l}))}),this.applyFabricStackByOverlayOrder(e);let r=this.activeOverlayId();if(r){let o=this.overlayFabricObjects().get(r);o&&e.setActiveObject(o)}e.requestRenderAll()}applyFabricStackByOverlayOrder(e){this.overlays().forEach(r=>{if(!this.fabricVisibleOverlayIds().has(r.id)||!this.overlayMatchesLayer(r,this.selectedLayerKey())||Dt(r)&&r.text.trim().length===0)return;let o=this.overlayFabricObjects().get(r.id);o&&e.bringObjectToFront(o)});let t=this.fabricGridState();t.horizontal.forEach(r=>e.bringObjectToFront(r)),t.vertical.forEach(r=>e.bringObjectToFront(r)),this.fabricGuideState().lines.forEach(r=>e.bringObjectToFront(r))}updatePlacementGuideVisibility(){let e=this.fabricCanvas,t=this.canvasTransform();!e||!t||(this.renderPlacementGuides(e),e.requestRenderAll(),this.threeDUI()?.currentObject()&&this.requestTextureRebuild())}renderPlacementGuides(e){let t=this.canvasTransform();if(!t){this.clearPlacementGuides(e);return}let n=this.placementZones().map(o=>({placementKey:o.placementKey,allowedKinds:o.allowedKinds,bounds:o.bounds})),r=vU(e,{show:this.showPlacementGuides()&&n.length>0,transform:t,zones:n,state:{objects:this.placementGuideObjects()}});this.placementGuideObjects.set(r.objects)}clearPlacementGuides(e){this.placementGuideObjects().size&&(uD(e,this.placementGuideObjects()),this.placementGuideObjects.set(new Map))}renderTwoDAlignmentLayers(e){let t=this.activeOverlay(),n=t?this.overlayFabricObjects().get(t.id):null,r=n?.left??null,o=n?.top??null,s=this.twoDCursorCanvasPoint()}clearTwoDSmartGuides(){this.fabricCanvas&&this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState()))}applySmartAlignmentForFabricMove(e,t){let n=this.fabricCanvas;if(!n)return;let r=t.left??0,o=t.top??0;if(this.twoDCursorCanvasPoint.set({x:r,y:o}),!this.snapEnabled()){this.twoDSnapRuntime.set(zi()),this.clearTwoDSmartGuides();return}let s=Math.max((t.getScaledWidth()||0)/2,1),a=Math.max((t.getScaledHeight()||0)/2,1),l={id:e.id,cx:r,cy:o,halfW:s,halfH:a},c=this.overlays().filter(f=>f.id!==e.id).map(f=>this.overlayFabricObjects().get(f.id)).filter(f=>!!f).map(f=>({id:f?.dataOverlayId,cx:f.left??0,cy:f.top??0,halfW:Math.max((f.getScaledWidth()||0)/2,1),halfH:Math.max((f.getScaledHeight()||0)/2,1)})),d=this.getTwoDGridStepPx(),u=qx({x:r,y:o},l,c,{x:n.getWidth()/2,y:n.getHeight()/2},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:d.x,gridStepY:d.y,tolerance:Kr.TWO_D_SNAP_TOLERANCE_PX},this.twoDSnapRuntime());this.twoDSnapRuntime.set(u.state),t.set({left:u.x,top:u.y}),t.setCoords(),this.fabricGuideState.set(cU(n,u.guides,this.fabricGuideState(),n.getWidth(),n.getHeight()))}resolveOverlayForFabricObject(e){let t=e?.dataOverlayId;return t?this.findOverlayById(t)??null:null}syncFabricObjectWithOverlay(e,t){let n=this.canvasTransform();if(!n)return;let r=this.getOverlayBoundingRect(),o=r.x+e.normalizedX*r.width,s=r.y+e.normalizedY*r.height,a=n.offsetX+o*n.scale,l=n.offsetY+s*n.scale;if(Dt(e)){let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,v=this.getShadowCanvasShift(e,n),g=a+v.x,m=l+v.y,b=t;b.getObjects().forEach(y=>{if(y instanceof zs){let _=y.outlineLayer,w,D=0,A="fill";if(_==="faux-bold"){let P=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0;w=e.fill,D=P,A=P>0?"stroke":"fill"}else _==="secondary-stroke"?(w=f??void 0,D=h>0?p+(d>0?u:0):0,A=D>0?"stroke":"fill"):(w=c??void 0,D=d>0?u:0,A=D>0?"stroke":"fill");y.set({fill:e.fill,stroke:w,strokeWidth:D,paintFirst:A,strokeUniform:!0}),y.dirty=!0}}),b.dirty=!0,b.set({originX:"center",originY:"center",angle:e.angle??0,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)}),b.set("lockUniScaling",e.lockAspectRatio??!0),b.setPositionByOrigin(new re(g,m),"center","center"),this.applyShadowToFabricGroup(b,e),b.setCoords(),this.publishOverlayRuntimeDimensions(e.id,b);return}if(ai(e)){let c=t,d=e.normalizedWidth*r.width,u=e.normalizedHeight*r.height,f=Math.max(c.width??d,1),h=Math.max(c.height??u,1),p=d*n.scale/f,v=u*n.scale/h;c.set({originX:"center",originY:"center",angle:e.angle??0,lockUniScaling:e.lockAspectRatio??!0,scaleX:p,scaleY:v,opacity:e.opacity??1}),c.setPositionByOrigin(new re(a,l),"center","center"),c.setCoords(),this.publishOverlayRuntimeDimensions(e.id,c)}}applyShadowToFabricGroup(e,t){let n=this.resolveShadowSettings(t);this.overlayStyleService.applyShadowToFabricGroup(e,n)}finalizeOverlayFromFabric(e,t){let n=this.canvasTransform(),r=this.getOverlayBoundingRect();if(!n||r.width<=0||r.height<=0)return;let o=t.left??n.offsetX,s=t.top??n.offsetY;if(Dt(e)){let f=this.getShadowCanvasShift(e,n);o-=f.x,s-=f.y}let a=(o-n.offsetX)/n.scale,l=(s-n.offsetY)/n.scale,c=(a-r.x)/r.width,d=(l-r.y)/r.height,u=this.clampNormalizedToPlacementZone(e,c,d);if(e.normalizedX=u.x,e.normalizedY=u.y,e.angle=this.normalizeAngle(t.angle??0),Dt(e)){let f=t,h=Math.abs(f.scaleX??n.scale),p=Math.abs(f.scaleY??h),v=n.scale||1,g=this.normalizeOverlayScale(h/v,1),m=this.normalizeOverlayScale(p/v,g);if(e.lockAspectRatio??!0){let b=this.normalizeOverlayScale((g+m)/2,1);g=b,m=b}if(e.horizontalScale=g,e.verticalScale=m,this.customizerState.clearTextGlyphPlan(e.id),e.placementKey){let b=this.applyPlacementZoneTextBounds(k({},e));Object.assign(e,b)}}else if(ai(e)){let f=t.getScaledWidth()||0,h=t.getScaledHeight()||0,p=f/n.scale,v=h/n.scale;if(e.lockAspectRatio??!0){let g=Math.max(e.normalizedWidth,.02)*r.width,m=Math.max(e.normalizedHeight,.02)*r.height,b=g>0?p/g:1,y=m>0?v/m:b,_=this.normalizeOverlayScale((b+y)/2,1);e.normalizedWidth=Math.min(Math.max(Math.max(e.normalizedWidth,.02)*_,.02),1),e.normalizedHeight=Math.min(Math.max(Math.max(e.normalizedHeight,.02)*_,.02),1)}else p>0&&(e.normalizedWidth=Math.min(Math.max(p/r.width,.02),1)),v>0&&(e.normalizedHeight=Math.min(Math.max(v/r.height,.02),1));if(typeof t.opacity=="number"&&(e.opacity=t.opacity),e.placementKey){let g=this.applyPlacementZoneLogoBounds(k({},e));Object.assign(e,g)}}this.commitOverlayUpdate(),this.customizerState.clearOverlayRuntimeDimensions(e.id),this.syncFabricObjectWithOverlay(e,t),t.canvas?.requestRenderAll()}publishOverlayRuntimeDimensions(e,t){let n=this.canvasTransform();if(!n||n.scale<=0)return;let r=Math.max((t.getScaledWidth()||0)/n.scale,1),o=Math.max((t.getScaledHeight()||0)/n.scale,1);this.customizerState.setOverlayRuntimeDimensionsPx(e,r,o)}constrainOverlayWithinView(e,t){let n=this.canvasTransform();if(!n)return;let o=(e.placementKey?this.personalizationState.getPlacementZoneBoundsByKey(e.placementKey):null)??this.getOverlayBoundingRect(),s=(t.getScaledWidth()||0)/2,a=(t.getScaledHeight()||0)/2,l=n.offsetX+o.x*n.scale+s,c=n.offsetX+(o.x+o.width)*n.scale-s,d=n.offsetY+o.y*n.scale+a,u=n.offsetY+(o.y+o.height)*n.scale-a,f=Math.min(Math.max(t.left??l,l),c),h=Math.min(Math.max(t.top??d,d),u);t.set({left:f,top:h}),t.setCoords()}getOverlayBoundingRect(){let e=this.getBaseBoundingBox();!this.svgDimensions()&&!e&&this.computeSvgDimensions();let t=this.svgDimensions(),n=this.svgViewBox(),r=t?{width:t.width,height:t.height,x:n.minX,y:n.minY}:null;return Wx(e,r)}getOverlayCenterPoint(e){let t=this.getOverlayBoundingRect();return{x:t.x+e.normalizedX*t.width,y:t.y+e.normalizedY*t.height}}overlayMatchesLayer(e,t){if(e.placementKey||!t)return!0;let n=this.resolveLayerDefinition(t);if(!n)return!0;let r=this.getOverlayCenterPoint(e),o=!1;for(let s of n.actionPathIdsCsv){let a=this.getLayerBoundsById(s);if(a&&(o=!0,this.pointInsideBounds(r,a)))return!0}return!o}resolveLayerDefinition(e){return this.layerBoundsService.resolveLayerDefinition(e,this.pathIdAccordingLayers())}getLayerBoundsById(e){let t=this.layerBoundsService.resolveLayerBoundsById({pathId:e,svgDoc:this.svgDoc(),svgText:this.svgText(),layerBoundsCache:this.layerBoundsCache(),measurementRoot:this.svgText()?this.ensureMeasurementSvgClone():null});return t.nextCache&&this.layerBoundsCache.set(t.nextCache),t.bounds}combineBoundsForPathIds(e){let t=e.map(n=>this.getLayerBoundsById(n));return this.layerBoundsService.combineBounds(t)}getLayerPreviewBounds(e){if(e.length===0)return null;let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return null;let n=this.combineBoundsForPathIds(e);return this.layerBoundsService.getLayerPreviewBounds(t,n)}normalizePreviewBounds(e,t){return this.layerBoundsService.normalizePreviewBounds(e,t)}pointInsideBounds(e,t){return this.layerBoundsService.pointInsideBounds(e,t)}readElementBounds(e){return this.layerBoundsService.readElementBounds(e)}ensureMeasurementSvgClone(){return this.customizerState.ensureMeasurementSvgClone(this.svgText)}refreshPlacementZonesFromSvg(){this.personalizationState.refreshFromSvg()}clampNormalizedToPlacementZone(e,t,n){return this.personalizationState.clampNormalizedToPlacementZone(e,t,n)}applyPlacementZoneTextBounds(e){return this.personalizationState.applyPlacementZoneTextBounds(e)}applyPlacementZoneLogoBounds(e){return this.personalizationState.applyPlacementZoneLogoBounds(e)}resolveOverlayLabel(e){return this.personalizationState.resolveOverlayLabel(e)}setActiveOverlay(e){if(!e){this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null),this.fabricCanvas&&this.fabricCanvas.getActiveObject()&&(this.fabricCanvas.discardActiveObject(),this.fabricCanvas.requestRenderAll()),this.threeDUI()?.rebuildSVGTexture();return}this.activeOverlayId.set(e.id),this.customizerState.setActiveOverlay(e),this.threeDUI()?.rebuildSVGTexture();let t=this.overlayFabricObjects().get(e.id);this.fabricCanvas&&t&&this.fabricCanvas.getActiveObject()!==t&&(this.fabricCanvas.setActiveObject(t),this.fabricCanvas.requestRenderAll())}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}async commitOverlayUpdate(){this.overlays.set([...this.overlays()]),await this.syncOverlaysToSvgDoc(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}onRenderOrderMoveTowardFront(e){let t=this.renderOrderState.moveInStack(e,-1);t&&this.applyRenderStackChange(t)}onRenderOrderMoveTowardBack(e){let t=this.renderOrderState.moveInStack(e,1);t&&this.applyRenderStackChange(t)}onRenderOrderReorder(e){let t=this.renderOrderState.reorderInStack(e);t&&this.applyRenderStackChange(t)}onRenderOrderSelect(e){let[t,n]=this.renderOrderState.parseRenderItemId(e);if(t!=="overlay")return;let r=this.findOverlayById(n);r&&this.setActiveOverlay(r)}async applyRenderStackChange(e){if(this.renderOrderState.enableManualOrdering(),!this.renderOrderState.setStack(e))return;let t=this.renderOrderState.syncOverlayOrderFromStack(this.overlays(),e);t!==this.overlays()&&this.overlays.set(t),await this.syncOverlaysToSvgDoc();let n=this.svgDoc();n&&this.customizerState.markSvgMutated(n),this.patternOverlayState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}synchronizeRenderOrderStack(){let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});this.renderOrderState.synchronizeStack(e,this.svgDoc(),this.renderPathAccordingLayers())}applyRenderOrderStackToSvg(e){return this.renderOrderState.applyStackToSvg(e,this.renderPathAccordingLayers())}buildPlacementNameByKeyMap(){return this.personalizationItems().reduce((e,t)=>(t?.placementKey&&e.set(t.placementKey,t.name??t.placementKey),e),new Map)}resolveFontFamily(e){let t=e.fontFamily,n=t&&t.trim().length>0?t:this.defaultFontFamily(),r=this.fontSourceMap()[n]?n:this.defaultFontFamily();return this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()),r}resolveFontWeight(e){return e.fontWeight??this.defaultFontWeight()}resolveFontStyle(e){return e.fontStyle??this.defaultFontStyle()}resolveLetterSpacing(e){let t=e.letterSpacing;return Number.isFinite(t)?t:this.defaultLetterSpacing()}resolveStrokeColor(e){if(!((e.strokeWidth??0)>0))return null;let n=e.stroke;return n&&n.trim().length>0?n:jl}resolveSecondStrokeColor(e){if(!((e.secondStrokeWidth??0)>0))return null;let n=e.secondStroke;return n&&n.trim().length>0?n:Wl}resolveCurveAmount(e){let t=e.curveAmount;return Number.isFinite(t)?t:this.defaultCurveAmount()}resolveCurveControlY(e){let t=this.resolveCurveAmount(e)/100,n=e.fontSize||this.minFontSize();return t*n}shadowDefaults(){return{blur:this.defaultShadowBlur(),offsetX:this.defaultShadowOffsetX(),offsetY:this.defaultShadowOffsetY(),color:this.defaultShadowColor()}}resolveShadowSettings(e){return this.overlayStyleService.resolveShadowSettings(e,this.shadowDefaults())}getShadowCanvasShift(e,t){let n=this.resolveShadowSettings(e);return this.overlayStyleService.getShadowCanvasShift(n,t?.scale??1)}getTextGlyphPlanSignature(e){return[e.text,this.resolveFontFamily(e),this.resolveFontWeight(e),this.resolveFontStyle(e),e.fontSize,this.resolveLetterSpacing(e)].join("|")}getTextLayoutSignature(e){let t=e.warpEnvelope??null,n=e.warpEnabled&&t?`warp:on:${t.viewBox.minX},${t.viewBox.minY},${t.viewBox.width},${t.viewBox.height}|${t.topPathD}|${t.bottomPathD}`:"warp:off",r=(e.secondStrokeWidth??0)>0?"1":"0";return`${this.getTextGlyphPlanSignature(e)}|curve:${this.resolveCurveAmount(e)}|${n}|ss:${r}`}async computeTextGlyphPlan(e){let t=await this.resolveOpentypeFont(e);return this.textLayoutService.computeTextGlyphPlan(e,{font:t,letterSpacing:this.resolveLetterSpacing(e)})}async getOrBuildTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);if(n)return n;let r=await this.computeTextGlyphPlan(e);return r&&this.customizerState.storeTextGlyphPlan(e.id,t,r),r}getCachedTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);return n||(this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e)),null)}ensureTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e);this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e))}getOrBuildTextLayout(e,t){let n=this.getTextLayoutSignature(e),r=this.customizerState.textLayoutCache().get(e.id);if(r&&r.signature===n)return r.layout.map(s=>k({},s));let o=this.textLayoutService.buildTextLayoutFromPlan(e,t,this.textLayoutCtx(e));return this.customizerState.textLayoutCache.update(s=>{var a=new Map(s);return a.set(e.id,{signature:n,layout:o}),a}),o.map(s=>k({},s))}textLayoutCtx(e){let t=e.warpEnvelope??null;return{shouldApplyWarp:!!(e.warpEnabled&&t),textWarpEnvelope:t,curveControlY:this.resolveCurveControlY(e)}}ingestFontPacks(e){let t=k({},fD),n=new Map;this.builtInFontOptions().forEach(({label:o,value:s},a)=>{n.set(s,{label:o,value:s,position:a})}),e.forEach(o=>{(o.packs??[]).filter(a=>(a.type??"").toLowerCase().includes("font")).forEach(a=>{(a.dataSources??[]).forEach(l=>{if(!l||l.isActive===!1)return;let c=(l.fontFamily??l.name??"").trim();if(!c)return;let d=this.resolveFontSource(l);d&&(t[c]=d,n.has(c)||n.set(c,{label:(l.name??c).trim()||c,value:c,position:l.position??n.size+1}))})})});let r=[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,value:s})=>({label:o,value:s}));this.fontSourceMap.set(t),this.fontOptions.set(r),this.queueInitialFontFaceLoads(r)}queueInitialFontFaceLoads(e){let t=new Set,n=this.defaultFontFamily().trim();if(n&&t.add(n),this.overlays().filter(Dt).forEach(r=>{let o=r.fontFamily?.trim();o&&t.add(o)}),!t.size){let r=e[0]?.value?.trim();r&&t.add(r)}t.forEach(r=>this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()))}fontDeps(){return{isBrowser:this.isBrowser,fontSourceMap:this.fontSourceMap,fontFacesReady:this.fontFacesReady,fontFacePromises:this.fontFacePromises,fontBinaryPromises:this.fontBinaryPromises,fontOutlinePromises:this.fontOutlinePromises,defaultFontFamily:this.defaultFontFamily}}resolveFontSource(e){let t=e?.fontUrl?.trim?.();return t||(e?.fileUrl?.trim?.()?e.fileUrl:null)}resolveOpentypeFont(e){return this.fontAssetService.resolveOpentypeFont(e,this.fontDeps())}normalizeFontSize(e){if(!Number.isFinite(e))return this.minFontSize();let t=Math.round(e);return Math.min(this.maxFontSize(),Math.max(this.minFontSize(),t))}normalizeAngle(e){if(!Number.isFinite(e))return 0;let t=e%360;return t>180?t-=360:t<=-180&&(t+=360),Math.round(t*10)/10}activeOverlay(){let e=this.findOverlayById(this.activeOverlayId());return e&&this.overlayMatchesLayer(e,this.selectedLayerKey())?e:null}onOverlayPositionChange(e){this.setOverlayNormalizedPosition(e.overlay,e.normalizedX,e.normalizedY)}onOverlayRotationChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;t.angle=this.normalizeAngle(e.angle),this.commitOverlayUpdate();let n=this.overlayFabricObjects().get(t.id);n&&(this.syncFabricObjectWithOverlay(t,n),n.canvas?.requestRenderAll())}onOverlayResizeChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;let n=k({},t);if(this.customizerState.clearOverlayRuntimeDimensions(n.id),Dt(t)&&"fontSize"in e&&(n=he(k({},n),{fontSize:this.normalizeFontSize(e.fontSize)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),Dt(t)&&"horizontalScale"in e&&"verticalScale"in e&&(n=he(k({},n),{horizontalScale:this.normalizeOverlayScale(e.horizontalScale,1),verticalScale:this.normalizeOverlayScale(e.verticalScale,1)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(k({},n)))),ai(t)&&"normalizedWidth"in e&&"normalizedHeight"in e){if(t.lockAspectRatio??!0){let l=Math.max(t.normalizedWidth,.02),c=Math.max(t.normalizedHeight,.02),d=Math.max(e.normalizedWidth,.02)/l,u=Math.max(e.normalizedHeight,.02)/c,f=Math.max((d+u)/2,.02);n=he(k({},n),{normalizedWidth:Math.min(Math.max(l*f,.02),1),normalizedHeight:Math.min(Math.max(c*f,.02),1)})}else n=he(k({},n),{normalizedWidth:Math.min(Math.max(e.normalizedWidth,.02),1),normalizedHeight:Math.min(Math.max(e.normalizedHeight,.02),1)});n.placementKey&&(n=this.applyPlacementZoneLogoBounds(k({},n)))}let r=this.overlays(),o=r.findIndex(l=>l.id===n.id);if(o<0)return;let s=[...r];s[o]=n,this.overlays.set(s),this.customizerState.setActiveOverlay(n),this.commitOverlayUpdate();let a=this.overlayFabricObjects().get(n.id);a&&(this.syncFabricObjectWithOverlay(n,a),a.canvas?.requestRenderAll())}setOverlayNormalizedPosition(e,t,n){this.setActiveOverlay(e);let{x:r,y:o}=this.clampNormalizedToPlacementZone(e,t,n);if(Math.abs(r-e.normalizedX)<1e-4&&Math.abs(o-e.normalizedY)<1e-4)return;e.normalizedX=r,e.normalizedY=o,this.commitOverlayUpdate();let s=this.overlayFabricObjects().get(e.id);s&&(this.syncFabricObjectWithOverlay(e,s),s.canvas?.requestRenderAll())}syncOverlaysToSvgDoc(){let e=++this.overlaySyncRequestId,t=this.overlaySyncQueue=this.overlaySyncQueue.catch(()=>{}).then(async()=>{e===this.overlaySyncRequestId&&await this.executeOverlaySync()});return this.overlaySyncPromise.set(t.catch(n=>{throw console.error(Ot.overlaySyncFailed,n),n})),this.overlaySyncPromise()}async buildSvgText(e,t){if(!this.svgDoc())return;let n=this.svgDoc()?.documentElement;if(!n)return;let r=this.svgRenderService.ensureDefsElement(this.svgDoc());if(!r)return;this.svgRenderService.clearOverlayFilterDefs(r),Array.from(n.querySelectorAll('[data-overlay="true"]')).forEach(l=>{l.parentNode?.removeChild(l)});let o=n.querySelector("#OverlayLayer");o&&!o.childNodes.length&&o.parentNode?.removeChild(o),this.svgDimensions()||this.computeSvgDimensions();let s=n.namespaceURI||Di,a=this.getOverlayBoundingRect();for(let l of this.overlays()){let c=a.x+l.normalizedX*a.width,d=a.y+l.normalizedY*a.height;if(Dt(l)){if(l.text.trim().length===0)continue;try{let u=await this.getOrBuildTextGlyphPlan(l);if(!u||u.glyphs.length===0)continue;let f=this.getOrBuildTextLayout(l,u);if(!f.length)continue;let h=this.resolveStrokeColor(l),p=l.strokeWidth??0,v=this.resolveSecondStrokeColor(l),g=l.secondStrokeWidth??0,m=this.resolveShadowSettings(l);this.svgRenderService.appendTextOverlayAsPath({overlay:l,layout:f,center:{x:c,y:d},overlayContainer:n,defs:r,svgDoc:this.svgDoc(),strokeColor:h,strokeWidth:p,secondStrokeColor:v,secondStrokeWidth:g,shadowSettings:m});let b=this.svgDoc()?.getElementById(l.id);b&&(b.setAttribute(me.DATA_OVERLAY_KIND,"text"),b.setAttribute(me.DATA_OVERLAY_TEXT,l.text),b.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),b.setAttribute(me.DATA_OVERLAY_FILL,l.fill),b.setAttribute(me.DATA_OVERLAY_FONT_SIZE,`${l.fontSize??24}`),b.setAttribute(me.DATA_OVERLAY_SCALE_X,`${this.normalizeOverlayScale(l.horizontalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_SCALE_Y,`${this.normalizeOverlayScale(l.verticalScale,1)}`),b.setAttribute(me.DATA_OVERLAY_FONT_FAMILY,this.resolveFontFamily(l)),b.setAttribute(me.DATA_OVERLAY_FONT_WEIGHT,this.resolveFontWeight(l)),b.setAttribute(me.DATA_OVERLAY_FONT_STYLE,this.resolveFontStyle(l)),b.setAttribute(me.DATA_OVERLAY_LETTER_SPACING,`${this.resolveLetterSpacing(l)}`),b.setAttribute(me.DATA_OVERLAY_LINE_HEIGHT,`${l.lineHeight??1.2}`),b.setAttribute(me.DATA_OVERLAY_STROKE,l.stroke??jl),b.setAttribute(me.DATA_OVERLAY_STROKE_WIDTH,`${l.strokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE,l.secondStroke??Wl),b.setAttribute(me.DATA_OVERLAY_SECOND_STROKE_WIDTH,`${l.secondStrokeWidth??0}`),b.setAttribute(me.DATA_OVERLAY_CURVE_AMOUNT,`${l.curveAmount??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_BLUR,`${l.shadowBlur??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_X,`${l.shadowOffsetX??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_OFFSET_Y,`${l.shadowOffsetY??0}`),b.setAttribute(me.DATA_OVERLAY_SHADOW_COLOR,l.shadowColor??nh),b.setAttribute(me.DATA_OVERLAY_WARP_ENABLED,l.warpEnabled?"true":"false"),b.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"))}catch(u){console.error(eU(l.id),u)}continue}if(ai(l)){let u=l.normalizedWidth*a.width,f=l.normalizedHeight*a.height;if(u<=0||f<=0)continue;let h=c-u/2,p=d-f/2,v=this.svgDoc().createElementNS(s,"image");v.setAttribute("id",l.id),v.setAttribute(me.DATA_OVERLAY_KEY,"true"),v.setAttribute(me.DATA_OVERLAY_KIND,"logo"),v.setAttribute(me.DATA_PLACEMENT_KEY,l.placementKey??""),v.setAttribute(me.PLACEMENT_KEY,l.placementKey??""),v.setAttribute("x",`${h}`),v.setAttribute("y",`${p}`),v.setAttribute("width",`${u}`),v.setAttribute("height",`${f}`),v.setAttribute(me.DATA_OVERLAY_original_WIDTH,`${l.originalWidth||u}`),v.setAttribute(me.DATA_OVERLAY_original_HEIGHT,`${l.originalHeight||f}`),v.setAttribute(me.DATA_OVERLAY_LOCK_RATIO,l.lockAspectRatio===!1?"false":"true"),v.setAttribute("preserveAspectRatio","none"),l.opacity!==void 0&&v.setAttribute("opacity",`${l.opacity}`);let g;e==="compressed"?g=l.imageSrc3d||l.imageSrc:g=l.imageSrc;let m=await this.resolveSvgImageHref(g,e);v.setAttribute("href",m);let b=l.angle??0;Math.abs(b)>.01&&v.setAttribute("transform",`rotate(${b} ${c} ${d})`),l.imageName&&v.setAttribute("data-source-name",l.imageName),n.appendChild(v)}}this.synchronizeRenderOrderStack(),this.applyRenderOrderStackToSvg(n),await this.backgroundState.syncBackgroundsToSvgWithQuality(e),t.set(new XMLSerializer().serializeToString(this.svgDoc())),this.measurementCloneDirty.set(!0)}async executeOverlaySyncForView(){return this.buildSvgText("compressed",this.svgText)}async executeOverlaySyncForExport(){return this.buildSvgText("original",this.svgTextForExport)}async executeOverlaySync(){return this.executeOverlaySyncForView()}async resolveSvgImageHref(e,t="original"){let n=e?.trim()??"";if(!n)return"";let r=`${t}:${n}`,o=this.svgImageHrefCache.get(r);if(o)return o;let s=this.svgImageHrefPending.get(r);if(s)return s;let a=(async()=>{if(n.startsWith("data:")){if(t==="compressed")try{let c=await this.imageCompressionService.compressImageToDataUrl(n)||n;return this.svgImageHrefCache.set(r,c),c}catch{return this.svgImageHrefCache.set(r,n),n}return this.svgImageHrefCache.set(r,n),n}{let c=await this.convertImageUrlToDataUrl(n)||n;if(t==="compressed"&&c.startsWith("data:"))try{let u=await this.imageCompressionService.compressImageToDataUrl(c)||c;return this.svgImageHrefCache.set(r,u),u}catch{return this.svgImageHrefCache.set(r,c),c}return this.svgImageHrefCache.set(r,c),c}})().finally(()=>{this.svgImageHrefPending.delete(r)});return this.svgImageHrefPending.set(r,a),a}async convertImageUrlToDataUrl(e){try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)return null;let n=await t.blob();return!n||n.size===0?null:await this.blobToDataUrl(n)}catch{return null}}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Unable to convert blob to data URL."))},r.onerror=()=>n(r.error??new Error("FileReader failed.")),r.readAsDataURL(e)})}computeSvgDimensions(){if(!this.svgDoc()){this.svgDimensions.set(null);return}let e=this.svgDoc()?.documentElement;if(!e){this.svgDimensions.set(null);return}let t=e.getAttribute("viewBox");if(t){let a=t.split(/[\s,]+/).map(l=>Number.parseFloat(l)).filter(l=>Number.isFinite(l));if(a.length===4){let[l,c,d,u]=a;if(d>0&&u>0){this.svgDimensions.set({width:d,height:u}),this.svgViewBox.set({minX:l,minY:c,width:d,height:u});return}}}let n=e.getAttribute("width"),r=e.getAttribute("height"),o=n?Number.parseFloat(n):NaN,s=r?Number.parseFloat(r):NaN;if(Number.isFinite(o)&&Number.isFinite(s)&&o>0&&s>0){this.svgDimensions.set({width:o,height:s}),this.svgViewBox.set({minX:0,minY:0,width:o,height:s});return}this.svgDimensions.set({width:1e3,height:1e3}),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3})}requestTextureRebuild(){if(this.svgText()){if(this.suspendTextureRebuild){this.pendingTextureRebuildWhileSuspended=!0;return}this.textureUpdateScheduled()||(this.textureUpdateScheduled.set(!0),requestAnimationFrame(()=>{this.overlaySyncPromise().catch(()=>{}).finally(()=>{this.textureUpdateScheduled.set(!1),this.svgText()&&this.threeDUI()?.rebuildSVGTexture()})}))}}getBaseElement(){return this.svgDoc()?this.baseElementCache()?this.baseElementCache():this.svgDoc()?.documentElement:null}getBaseBoundingBox(){if(this.baseBBoxCache())return this.baseBBoxCache();let e=this.getBaseElement();if(!e||!(e instanceof SVGGraphicsElement))return null;try{return e.getBBox()}catch{return null}}invalidateBaseCaches(){this.customizerState.invalidateBaseCaches(()=>this.refreshPlacementZonesFromSvg())}disposeFabricCanvases(){this.fabricCanvas&&(this.clearPlacementGuides(this.fabricCanvas),this.fabricGridState.set(oU(this.fabricCanvas,this.fabricGridState())),this.fabricGuideState.set(lD(this.fabricCanvas,this.fabricGuideState())),this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null)),this.placementGuideObjects.set(new Map),this.fabricReady.set(!1),this.overlayFabricObjects.set(new Map),this.pendingLogoLoads.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.twoDSnapRuntime.set(zi()),this.twoDCursorCanvasPoint.set(null),this.twoDDraggingOverlayId.set(null)}initFabricCanvases(){if(!this.twoDCanvasElement){this.disposeFabricCanvases();return}this.setupFabricCanvasInstance(this.twoDCanvasElement)}setupFabricCanvasInstance(e){this.fabricCanvas&&(this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null));let{canvas:t,events:n,cleanup:r,syncDimensions:o}=pU(e),s=h=>{let v=h.detail?.overlayId;if(!v)return;let g=this.findOverlayById(v);g&&this.setActiveOverlay(g)},a=()=>{this.fabricSelectionClearSuppressionCount>0||(this.activeOverlayId.set(null),this.twoDSnapRuntime.set(zi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides())},l=h=>{let g=(h.detail?.deltaY??0)<0?1.08:.92;this.updateFabricViewZoom(g)},c=h=>{let v=h.detail?.multiplier;!Number.isFinite(v)||v<=0||this.updateFabricViewZoom(v)},d=()=>{this.render2dView()},u=h=>{let v=h.detail;!v||!Number.isFinite(v.x)||!Number.isFinite(v.y)||this.twoDCursorCanvasPoint.set({x:v.x,y:v.y})};n.addEventListener(si.OVERLAY_SELECT,s),n.addEventListener(si.SELECTION_CLEARED,a),n.addEventListener(si.WHEEL,l),n.addEventListener(si.PINCH,c),n.addEventListener(si.POINTER_MOVE,u),n.addEventListener(si.RESIZE,d);let f=()=>{n.removeEventListener(si.OVERLAY_SELECT,s),n.removeEventListener(si.SELECTION_CLEARED,a),n.removeEventListener(si.WHEEL,l),n.removeEventListener(si.PINCH,c),n.removeEventListener(si.POINTER_MOVE,u),n.removeEventListener(si.RESIZE,d),r()};this.fabricCanvasCleanup=f,this.fabricCanvasSyncDimensions=o,this.fabricCanvas=t,this.customizerState.fabricCanvasState.set(t),t.on("after:render",h=>{if(this.gridEnabled()){let p=h.ctx,v=t.viewportTransform;if(p&&v){let g=this.getTwoDGridStepPx(),m=this.getTwoDGridMajorStepPx();aU(p,t.getWidth(),t.getHeight(),v,g.x,g.y,m.x,m.y)}}}),this.fabricReady.set(!0),this.render2dView()}discardActiveObjectWithoutSelectionClear(e){this.fabricSelectionClearSuppressionCount+=1;try{e.discardActiveObject()}finally{queueMicrotask(()=>{this.fabricSelectionClearSuppressionCount=Math.max(0,this.fabricSelectionClearSuppressionCount-1)})}}resetFabricViewTransform(){this.fabricViewZoom.set(1),this.fabricCanvas&&this.fabricCanvas.setViewportTransform([1,0,0,1,0,0])}updateFabricViewZoom(e){let t=Qt.clamp(this.fabricViewZoom()*e,this.minFabricViewZoom(),this.maxFabricViewZoom());Math.abs(t-this.fabricViewZoom())<.001||(this.fabricViewZoom.set(t),this.applyFabricViewZoom()||this.render2dView())}applyFabricViewZoom(){if(!this.fabricCanvas||!this.canvasTransform()||!this.fabricLayoutState())return!1;let{baseScale:e,targetBounds:t,canvasWidth:n,canvasHeight:r,pxPerUnit:o}=this.fabricLayoutState(),s=e*this.fabricViewZoom(),a=t.width*s,l=t.height*s,c=(n-a)/2-t.x*s,d=(r-l)/2-t.y*s,u=s/(o||1);this.canvasTransform.set({scale:s,offsetX:c,offsetY:d});let f=this.fabricCanvas.backgroundImage;return f&&f.set({left:c,top:d,scaleX:u,scaleY:u,originX:"left",originY:"top",selectable:!1,evented:!1}),this.renderOverlaysOnCanvas(this.fabricCanvas),this.fabricCanvas.requestRenderAll(),!0}ngOnDestroy(){this.disposeFabricCanvases(),this.twoDCanvasElement=null,this.measurementService.disposeMeasurementHost(this.measurementHost),this.measurementSvgRoot.set(null),this.customizerState.resetWarpResources()}parseSVGRegions(e){let t=new DOMParser;this.svgDoc.set(t.parseFromString(e,ss)),this.invalidateBaseCaches(),this.computeSvgDimensions(),this.backgroundState.refreshFromSvg(),this.refreshPlacementZonesFromSvg()}async exportCurrentSvg(){if(!this.svgDoc()){console.warn(Ot.noSvgLoadedToExport);return}this.downloadCurrentSvgSnapshot()}async onSaveDesignClick(){if(!this.svgDoc()){this.toaster.showError(Ot.noSvgDocumentLoaded);return}this.designSavingInProgress.set(!0),this.designSaveMessage.set("Preparing design\u2026");try{await this.syncOverlaysToSvgDoc(),await this.executeOverlaySyncForExport();let t=this.svgTextForExport();if(!t){this.toaster.showError(Ot.failedToSerializeSvg);return}let n=this.buildDesignExportPayload(t),r=JSON.stringify(n,null,2),o=this.fileService.createJsonFile(r,q3),s=this.resolveApiKey(),a=this.resolveProductId();if(!s){this.toaster.showError(Ot.missingApiKey);return}this.designSaveMessage.set("Generating preview images\u2026");let l;try{l=await this.generateSubmissionThumbnails()}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}let c,d=l.map(u=>u.view);try{let u=Date.now();c=l.map(f=>this.dataUrlToPngFile(f.dataUrl,f.view,u))}catch(u){let f=u instanceof Error?u.message:Ot.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}this.designSaveMessage.set("Uploading design\u2026");try{let u=await vc(this.submissionApi.createSubmission(o,s,a??void 0,d,c,this.userUniqueId()));if(!u?.isSuccess||!u?.data){let h=u?.errors?.[0]??Ot.designSubmissionFailed;this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:h,errors:u?.errors??void 0}),this.toaster.showError(h);return}let f=u.data;this.sdkRuntimeConfig?.onSubmissionSuccess?.({productId:a??void 0,previews:this.mapSubmissionPreviewUrls(f),submissionNumber:f.submissionNumber,personalizationPlacements:f.personalizationPlacements})}catch{this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:Ot.designSubmissionFailed}),this.toaster.showError(Ot.designSubmissionFailed)}}finally{this.designSavingInProgress.set(!1),this.designSaveMessage.set(null)}}async onResetDesignClick(){let e=this.predesignBaseSvgText()||this.baseSvgText();if(!e){this.toaster.showError("No design loaded to reset to");return}if((await this.dialogService.showDialog({type:"confirmation",title:"Reset Design",message:"Are you sure you want to reset all customizations?",subtitle:"This will remove all applied customizations and revert to the current base design.",buttons:[{label:"Cancel",action:"cancel"},{label:"Reset",action:"confirm",isPrimary:!0,isDestructive:!0}]})).action==="confirm")try{this.loadSVGFromText(e,!0),this.toaster.showSuccess("All customizations have been reset")}catch(n){let r=n instanceof Error?n.message:"Failed to reset design";this.toaster.showError(r)}}onExitClick(){this.sdkRuntimeConfig?.onClose?.()}async generateSubmissionThumbnails(){let e=this.svgDoc();if(!e)throw new Error(Ot.noSvgDesignLoaded);await this.syncOverlaysToSvgDoc();let t=this.svgRenderService.serializeSvg(e);if(!t)throw new Error(Ot.failedSerializeSvgForThumbnail);let n=this.objText();if(!n)throw new Error(Ot.no3dModelForThumbnail);let r=this.mtlText();try{let o={type:"text",value:t},s={type:"text",value:n},a=r?{type:"text",value:r}:void 0,l=await this.threeThumbnailService.generateThumbnails(o,s,a,this.materialFileLink());if(!l.length)throw new Error(Ot.noThumbnailsGenerated);return this.normalizeSubmissionThumbnails(l)}catch(o){throw o instanceof Error?o:new Error(Ot.failedGenerateThumbnails)}}normalizeSubmissionThumbnails(e){let t=new Map,n=new Set(this.submissionThumbnailViews);if(e.forEach(r=>{n.has(r.view)&&(t.has(r.view)||t.set(r.view,r))}),t.size!==this.submissionThumbnailViews.length)throw new Error(Ot.invalidSubmissionThumbnails);return this.submissionThumbnailViews.map(r=>t.get(r))}dataUrlToPngFile(e,t,n=Date.now()){let r=/^data:(image\/png);base64,(.+)$/i.exec(e);if(!r)throw new Error(Ot.failedGenerateSubmissionThumbnails);let o=r[1],s=atob(r[2]),a=new Uint8Array(s.length);for(let l=0;l<s.length;l+=1)a[l]=s.charCodeAt(l);return new File([a],`preview-${t}-${n}.png`,{type:o})}mapSubmissionPreviewUrls(e){return(e.previews??[]).map(t=>({viewType:t.viewType,url:t.url,width:t.width,height:t.height})).filter(t=>!!t.url)}get getSvgTextForFinal(){return this.svgText()?this.sanitizer.bypassSecurityTrustHtml(this.svgText()):null}onTwoDZoomIn(){this.updateFabricViewZoom(1.1)}onTwoDZoomOut(){this.updateFabricViewZoom(.9)}onTwoDReset(){this.resetFabricViewTransform(),this.updateFabricViewZoom(1),this.render2dView()}onGridToggle(){this.gridEnabled.update(e=>!e)}onSnapToggle(){this.snapEnabled.update(e=>!e)}onGuidesToggle(){this.showPlacementGuides.update(e=>!e)}onGridSizeChange(e){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(0,Math.min(1,t));this.gridRatio.set(n)}getTwoDGridStepPx(){let e=this.canvasTransform(),t=this.twoDGridStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}getTwoDGridMajorStepPx(){let e=this.canvasTransform(),t=this.twoDGridMajorStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}onTwoDGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&this.twoDGridSizeInches.set(Math.max(.25,Math.min(4,t)))}setActiveStep(e){this.activeStepId.set(e)}downloadCurrentSvgSnapshot(){let e=this.serializeCurrentSvgSnapshot();return e?(this.svgRenderService.downloadSvg(e,`${K3}-${Date.now()}.svg`),e):null}serializeCurrentSvgSnapshot(){let e=this.svgRenderService.serializeSvg(this.svgDoc());return e||null}buildDesignExportPayload(e){let t=this.svgDoc();if(!t)return{};let n=this.overlays().reduce((o,s)=>{let a=this.personalizationState.getSelectedEffectIdForOverlay(s.id);return a&&o.set(s.id,a),o},new Map),r=this.collectOverlayDimensionsPxById(this.overlays());return this.designExportService.buildDesignExportPayload({selectedPredesignId:this.selectedPredesignId(),svgDoc:t,svgString:e,overlays:this.overlays(),personalizationItems:this.personalizationItems(),placementZones:this.placementZones(),placementNameByKey:this.buildPlacementNameByKeyMap(),backgroundState:this.backgroundState.state(),backgroundImageTemplates:this.backgroundImageTemplates(),patternState:this.patternState.state(),patternOverlays:this.patternOverlayState.state().overlays,renderOrder:this.renderOrderState.stack(),svgDimensions:this.svgDimensions(),svgViewBox:this.svgViewBox(),bounds:this.getOverlayBoundingRect(),overlayDimensionsPxById:r,selectedEffectIdByOverlay:n,textStyleResolvers:{defaultFontFamily:this.defaultFontFamily(),defaultFontWeight:this.defaultFontWeight(),defaultFontStyle:this.defaultFontStyle(),defaultLetterSpacing:this.defaultLetterSpacing(),defaultStrokeColor:jl,defaultSecondStrokeColor:Wl,defaultCurveAmount:this.defaultCurveAmount(),defaultLineHeight:this.defaultLineHeight(),defaultShadowBlur:this.defaultShadowBlur(),defaultShadowOffsetX:this.defaultShadowOffsetX(),defaultShadowOffsetY:this.defaultShadowOffsetY(),defaultShadowColor:this.defaultShadowColor()}})}collectOverlayDimensionsPxById(e){let t=new Map;return e.forEach(n=>{let r=this.personalizationState.getOverlayDimensionsPx(n);if(r.width>0&&r.height>0){t.set(n.id,{width:r.width,height:r.height});return}let o=this.customizerState.overlayRuntimeDimensionsPx().get(n.id);o&&o.width>0&&o.height>0&&t.set(n.id,{width:o.width,height:o.height})}),t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=it({type:i,selectors:[["app-customizer-ui"]],viewQuery:function(t,n){t&1&&ll(n.threeDUI,wse,5),t&2&&Vc()},hostBindings:function(t,n){t&1&&W("click",function(){return n.closeShortcuts()},XC)("resize",function(){return n.onResize()},YC)},inputs:{apiKey:[1,"apiKey"],productId:[1,"productId"],submissionNumber:[1,"submissionNumber"],predesignId:[1,"predesignId"],userUniqueId:[1,"userUniqueId"]},decls:23,vars:8,consts:[["threeDUI",""],[1,"header"],[1,"flex","items-center","justify-between"],[1,"brand"],["alt","Distributor logo",1,"brand-logo-img",3,"src"],[1,"header-right"],["type","button","title","Exit and close the customizer",1,"btn-exit",3,"click","disabled"],["type","button","title","Reset all customizations to the current predesign base",1,"btn-reset",3,"click","disabled"],["type","button",1,"btn-save",3,"click","disabled"],[1,"header-bottom"],[3,"valueChange","value"],["value","3d"],[1,"manifest-loader-overlay"],[1,"save-loader-overlay"],[1,"flex","editor-main-box",3,"mobile-panel-hidden","mobile-canvas-hidden"],["value","2d"],["value","both"],[3,"message"],["role","alert",1,"manifest-error-card"],[1,"manifest-error-title"],[1,"manifest-error-message"],["type","button",1,"manifest-retry-btn"],["type","button",1,"manifest-retry-btn",3,"click"],[3,"message","subtitle"],[1,"flex","editor-main-box"],[1,"main-canvas-area","flex-1"],[1,"view-section"],[3,"layerToggle","canvasReady","canvasDetached","zoomIn","zoomOut","resetView","onUndo","onRedo","svgText","isActive","layers","selectedLayerKey","isShowAllLayersOption","gridEnabled","snapEnabled","showPlacementGuides","gridSize"],[1,"canvas-area","canvas-area-single"],[1,"jersey-model"],[1,"w-full",3,"isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap"],["role","status","aria-live","polite",1,"canvas-manifest-loader"],[1,"right-panel-shell"],[1,"right-panel"],[1,"text-sm","text-surface-500"],[1,""],[1,"icon-nav-shell"],[1,"panel-icon-nav"],[1,"mobile-actions-bar"],["type","button",1,"mobile-panel-toggle"],["type","button",1,"mobile-canvas-toggle"],[1,"expanded-nav-menu"],[1,"icon-nav-list"],[1,"icon-btn",3,"active"],[1,"icon-btn","toggle-more-btn"],[1,"w-full",3,"svgTextChange","svgDimensionsChange","svgViewBoxChange","showPlacementGuidesChange","placementZonesChange","overlaysChange","activeOverlayIdChange","activeOverlayChange","threeDVariantSelected","overlayPositionChange","overlayRotationChange","overlayResizeChange","onUndo","onRedo","isModelLoading","svgText","isActive","threeDVariants","selectedThreeDVariantId","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap",3,"click"],["title","Keyboard Shortcuts",1,"shortcuts-fab",3,"click"],[1,"ri-keyboard-line"],[1,"shortcuts-popover"],[1,"shortcuts-popover-header"],[1,"canvas-manifest-loader-subtitle"],[1,"panel-content"],[1,"panel-header"],[1,"panel-scroll-body"],[3,"predesigns","selectedId"],[3,"items"],[3,"items","userUniqueId","apiKey"],[3,"items","useAccordion"],[3,"templates","userUniqueId","apiKey"],[3,"items","activeOverlayId"],[3,"gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[3,"designSelected","predesigns","selectedId"],[3,"moveTowardFront","moveTowardBack","reorder","selectItem","items","activeOverlayId"],[3,"onGridToggle","onSnapToggle","onGuidesToggle","onTwoDGridSizeChange","gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[1,"text-gray-900"],[1,"child-accordion",3,"value"],[3,"value"],[1,"flex","items-center","gap-2"],[1,"child-panel"],["type","button",1,"mobile-panel-toggle",3,"click"],[1,"ri-arrow-down-s-line"],[1,"ri-arrow-up-s-line"],["type","button",1,"mobile-canvas-toggle",3,"click"],[1,"ri-fullscreen-line"],[1,"icon-btn","expanded-btn",3,"active"],[1,"icon-btn","expanded-btn",3,"click"],[3,"class"],[1,"w-full"],[1,"icon-btn",3,"click"],[1,"icon-btn","toggle-more-btn",3,"click"],[1,"ri-close-line"],[1,"ri-more-fill"]],template:function(t,n){t&1&&(U(0,"app-ui-toaster"),x(1,"header",1)(2,"div",2)(3,"div",3),ae(4,Ese,1,1,"img",4),C(),x(5,"div",5)(6,"button",6),W("click",function(){return n.onExitClick()}),R(7," Exit "),C(),x(8,"button",7),W("click",function(){return n.onResetDesignClick()}),R(9," Reset "),C(),x(10,"button",8),W("click",function(){return n.onSaveDesignClick()}),R(11),C()()(),x(12,"div",9)(13,"app-ui-tabs",10),mp("valueChange",function(o){return Ms(n.editorMode,o)||(n.editorMode=o),o}),x(14,"app-ui-tablist")(15,"app-ui-tab",11),R(16,"3D Editor"),C(),ae(17,Mse,4,0),C()()()(),ae(18,Tse,2,1,"div",12)(19,Ase,7,2,"div",12)(20,Ise,2,2,"div",13)(21,vae,27,32,"div",14),U(22,"app-generic-dialog")),t&2&&(T(4),le(n.distributorHeaderLogoUrl()?4:-1),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(2),q("disabled",n.designSavingInProgress()),T(),wt(" ",n.designSavingInProgress()?"Saving\u2026":"Save Design"," "),T(2),Hc("value",n.editorMode),T(4),le(n.isShowWholeLayersOption()||n.layers().length>0?17:-1),T(),le(n.showBlockingManifestLoader()?18:n.showBlockingManifestError()?19:n.designSavingInProgress()?20:21))},dependencies:[Ut,fr,Zx,Kx,oc,x_,S_,C_,E_,M_,T_,A_,bh,z_,B_,Vi,_i,_r,xr,P_,O_,ih,Z_,D_,J_],styles:[`@layer properties;@layer theme,utilities;@layer theme{:root,:host{--color-gray-300: oklch(87.2% .01 258.338);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-white: #fff;--spacing: .25rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--font-weight-medium: 500;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.visible{visibility:visible}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.container{width:100%}@media(width>=40rem){.container{max-width:40rem}}@media(width>=48rem){.container{max-width:48rem}}@media(width>=64rem){.container{max-width:64rem}}@media(width>=80rem){.container{max-width:80rem}}@media(width>=96rem){.container{max-width:96rem}}.mt-3{margin-top:calc(var(--spacing) * 3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.w-2{width:calc(var(--spacing) * 2)}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.bg-white{background-color:var(--color-white)}.object-center{object-position:center}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:calc(var(--spacing) * 1)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(width>=48rem){.md\\:hidden{display:none}}}@font-face{font-family:remixicon;src:url("./media/remixicon.eot?t=1769685282643");src:url("./media/remixicon.eot?t=1769685282643#iefix") format("embedded-opentype"),url("./media/remixicon.woff2?t=1769685282643") format("woff2"),url("./media/remixicon.woff?t=1769685282643") format("woff"),url("./media/remixicon.ttf?t=1769685282643") format("truetype"),url("./media/remixicon.svg?t=1769685282643#remixicon") format("svg");font-display:swap}[class^=ri-],[class*=" ri-"]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\\ea01"}.ri-24-hours-line:before{content:"\\ea02"}.ri-4k-fill:before{content:"\\ea03"}.ri-4k-line:before{content:"\\ea04"}.ri-a-b:before{content:"\\ea05"}.ri-account-box-fill:before{content:"\\ea06"}.ri-account-box-line:before{content:"\\ea07"}.ri-account-circle-fill:before{content:"\\ea08"}.ri-account-circle-line:before{content:"\\ea09"}.ri-account-pin-box-fill:before{content:"\\ea0a"}.ri-account-pin-box-line:before{content:"\\ea0b"}.ri-account-pin-circle-fill:before{content:"\\ea0c"}.ri-account-pin-circle-line:before{content:"\\ea0d"}.ri-add-box-fill:before{content:"\\ea0e"}.ri-add-box-line:before{content:"\\ea0f"}.ri-add-circle-fill:before{content:"\\ea10"}.ri-add-circle-line:before{content:"\\ea11"}.ri-add-fill:before{content:"\\ea12"}.ri-add-line:before{content:"\\ea13"}.ri-admin-fill:before{content:"\\ea14"}.ri-admin-line:before{content:"\\ea15"}.ri-advertisement-fill:before{content:"\\ea16"}.ri-advertisement-line:before{content:"\\ea17"}.ri-airplay-fill:before{content:"\\ea18"}.ri-airplay-line:before{content:"\\ea19"}.ri-alarm-fill:before{content:"\\ea1a"}.ri-alarm-line:before{content:"\\ea1b"}.ri-alarm-warning-fill:before{content:"\\ea1c"}.ri-alarm-warning-line:before{content:"\\ea1d"}.ri-album-fill:before{content:"\\ea1e"}.ri-album-line:before{content:"\\ea1f"}.ri-alert-fill:before{content:"\\ea20"}.ri-alert-line:before{content:"\\ea21"}.ri-aliens-fill:before{content:"\\ea22"}.ri-aliens-line:before{content:"\\ea23"}.ri-align-bottom:before{content:"\\ea24"}.ri-align-center:before{content:"\\ea25"}.ri-align-justify:before{content:"\\ea26"}.ri-align-left:before{content:"\\ea27"}.ri-align-right:before{content:"\\ea28"}.ri-align-top:before{content:"\\ea29"}.ri-align-vertically:before{content:"\\ea2a"}.ri-alipay-fill:before{content:"\\ea2b"}.ri-alipay-line:before{content:"\\ea2c"}.ri-amazon-fill:before{content:"\\ea2d"}.ri-amazon-line:before{content:"\\ea2e"}.ri-anchor-fill:before{content:"\\ea2f"}.ri-anchor-line:before{content:"\\ea30"}.ri-ancient-gate-fill:before{content:"\\ea31"}.ri-ancient-gate-line:before{content:"\\ea32"}.ri-ancient-pavilion-fill:before{content:"\\ea33"}.ri-ancient-pavilion-line:before{content:"\\ea34"}.ri-android-fill:before{content:"\\ea35"}.ri-android-line:before{content:"\\ea36"}.ri-angularjs-fill:before{content:"\\ea37"}.ri-angularjs-line:before{content:"\\ea38"}.ri-anticlockwise-2-fill:before{content:"\\ea39"}.ri-anticlockwise-2-line:before{content:"\\ea3a"}.ri-anticlockwise-fill:before{content:"\\ea3b"}.ri-anticlockwise-line:before{content:"\\ea3c"}.ri-app-store-fill:before{content:"\\ea3d"}.ri-app-store-line:before{content:"\\ea3e"}.ri-apple-fill:before{content:"\\ea3f"}.ri-apple-line:before{content:"\\ea40"}.ri-apps-2-fill:before{content:"\\ea41"}.ri-apps-2-line:before{content:"\\ea42"}.ri-apps-fill:before{content:"\\ea43"}.ri-apps-line:before{content:"\\ea44"}.ri-archive-drawer-fill:before{content:"\\ea45"}.ri-archive-drawer-line:before{content:"\\ea46"}.ri-archive-fill:before{content:"\\ea47"}.ri-archive-line:before{content:"\\ea48"}.ri-arrow-down-circle-fill:before{content:"\\ea49"}.ri-arrow-down-circle-line:before{content:"\\ea4a"}.ri-arrow-down-fill:before{content:"\\ea4b"}.ri-arrow-down-line:before{content:"\\ea4c"}.ri-arrow-down-s-fill:before{content:"\\ea4d"}.ri-arrow-down-s-line:before{content:"\\ea4e"}.ri-arrow-drop-down-fill:before{content:"\\ea4f"}.ri-arrow-drop-down-line:before{content:"\\ea50"}.ri-arrow-drop-left-fill:before{content:"\\ea51"}.ri-arrow-drop-left-line:before{content:"\\ea52"}.ri-arrow-drop-right-fill:before{content:"\\ea53"}.ri-arrow-drop-right-line:before{content:"\\ea54"}.ri-arrow-drop-up-fill:before{content:"\\ea55"}.ri-arrow-drop-up-line:before{content:"\\ea56"}.ri-arrow-go-back-fill:before{content:"\\ea57"}.ri-arrow-go-back-line:before{content:"\\ea58"}.ri-arrow-go-forward-fill:before{content:"\\ea59"}.ri-arrow-go-forward-line:before{content:"\\ea5a"}.ri-arrow-left-circle-fill:before{content:"\\ea5b"}.ri-arrow-left-circle-line:before{content:"\\ea5c"}.ri-arrow-left-down-fill:before{content:"\\ea5d"}.ri-arrow-left-down-line:before{content:"\\ea5e"}.ri-arrow-left-fill:before{content:"\\ea5f"}.ri-arrow-left-line:before{content:"\\ea60"}.ri-arrow-left-right-fill:before{content:"\\ea61"}.ri-arrow-left-right-line:before{content:"\\ea62"}.ri-arrow-left-s-fill:before{content:"\\ea63"}.ri-arrow-left-s-line:before{content:"\\ea64"}.ri-arrow-left-up-fill:before{content:"\\ea65"}.ri-arrow-left-up-line:before{content:"\\ea66"}.ri-arrow-right-circle-fill:before{content:"\\ea67"}.ri-arrow-right-circle-line:before{content:"\\ea68"}.ri-arrow-right-down-fill:before{content:"\\ea69"}.ri-arrow-right-down-line:before{content:"\\ea6a"}.ri-arrow-right-fill:before{content:"\\ea6b"}.ri-arrow-right-line:before{content:"\\ea6c"}.ri-arrow-right-s-fill:before{content:"\\ea6d"}.ri-arrow-right-s-line:before{content:"\\ea6e"}.ri-arrow-right-up-fill:before{content:"\\ea6f"}.ri-arrow-right-up-line:before{content:"\\ea70"}.ri-arrow-up-circle-fill:before{content:"\\ea71"}.ri-arrow-up-circle-line:before{content:"\\ea72"}.ri-arrow-up-down-fill:before{content:"\\ea73"}.ri-arrow-up-down-line:before{content:"\\ea74"}.ri-arrow-up-fill:before{content:"\\ea75"}.ri-arrow-up-line:before{content:"\\ea76"}.ri-arrow-up-s-fill:before{content:"\\ea77"}.ri-arrow-up-s-line:before{content:"\\ea78"}.ri-artboard-2-fill:before{content:"\\ea79"}.ri-artboard-2-line:before{content:"\\ea7a"}.ri-artboard-fill:before{content:"\\ea7b"}.ri-artboard-line:before{content:"\\ea7c"}.ri-article-fill:before{content:"\\ea7d"}.ri-article-line:before{content:"\\ea7e"}.ri-aspect-ratio-fill:before{content:"\\ea7f"}.ri-aspect-ratio-line:before{content:"\\ea80"}.ri-asterisk:before{content:"\\ea81"}.ri-at-fill:before{content:"\\ea82"}.ri-at-line:before{content:"\\ea83"}.ri-attachment-2:before{content:"\\ea84"}.ri-attachment-fill:before{content:"\\ea85"}.ri-attachment-line:before{content:"\\ea86"}.ri-auction-fill:before{content:"\\ea87"}.ri-auction-line:before{content:"\\ea88"}.ri-award-fill:before{content:"\\ea89"}.ri-award-line:before{content:"\\ea8a"}.ri-baidu-fill:before{content:"\\ea8b"}.ri-baidu-line:before{content:"\\ea8c"}.ri-ball-pen-fill:before{content:"\\ea8d"}.ri-ball-pen-line:before{content:"\\ea8e"}.ri-bank-card-2-fill:before{content:"\\ea8f"}.ri-bank-card-2-line:before{content:"\\ea90"}.ri-bank-card-fill:before{content:"\\ea91"}.ri-bank-card-line:before{content:"\\ea92"}.ri-bank-fill:before{content:"\\ea93"}.ri-bank-line:before{content:"\\ea94"}.ri-bar-chart-2-fill:before{content:"\\ea95"}.ri-bar-chart-2-line:before{content:"\\ea96"}.ri-bar-chart-box-fill:before{content:"\\ea97"}.ri-bar-chart-box-line:before{content:"\\ea98"}.ri-bar-chart-fill:before{content:"\\ea99"}.ri-bar-chart-grouped-fill:before{content:"\\ea9a"}.ri-bar-chart-grouped-line:before{content:"\\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\\ea9d"}.ri-bar-chart-line:before{content:"\\ea9e"}.ri-barcode-box-fill:before{content:"\\ea9f"}.ri-barcode-box-line:before{content:"\\eaa0"}.ri-barcode-fill:before{content:"\\eaa1"}.ri-barcode-line:before{content:"\\eaa2"}.ri-barricade-fill:before{content:"\\eaa3"}.ri-barricade-line:before{content:"\\eaa4"}.ri-base-station-fill:before{content:"\\eaa5"}.ri-base-station-line:before{content:"\\eaa6"}.ri-basketball-fill:before{content:"\\eaa7"}.ri-basketball-line:before{content:"\\eaa8"}.ri-battery-2-charge-fill:before{content:"\\eaa9"}.ri-battery-2-charge-line:before{content:"\\eaaa"}.ri-battery-2-fill:before{content:"\\eaab"}.ri-battery-2-line:before{content:"\\eaac"}.ri-battery-charge-fill:before{content:"\\eaad"}.ri-battery-charge-line:before{content:"\\eaae"}.ri-battery-fill:before{content:"\\eaaf"}.ri-battery-line:before{content:"\\eab0"}.ri-battery-low-fill:before{content:"\\eab1"}.ri-battery-low-line:before{content:"\\eab2"}.ri-battery-saver-fill:before{content:"\\eab3"}.ri-battery-saver-line:before{content:"\\eab4"}.ri-battery-share-fill:before{content:"\\eab5"}.ri-battery-share-line:before{content:"\\eab6"}.ri-bear-smile-fill:before{content:"\\eab7"}.ri-bear-smile-line:before{content:"\\eab8"}.ri-behance-fill:before{content:"\\eab9"}.ri-behance-line:before{content:"\\eaba"}.ri-bell-fill:before{content:"\\eabb"}.ri-bell-line:before{content:"\\eabc"}.ri-bike-fill:before{content:"\\eabd"}.ri-bike-line:before{content:"\\eabe"}.ri-bilibili-fill:before{content:"\\eabf"}.ri-bilibili-line:before{content:"\\eac0"}.ri-bill-fill:before{content:"\\eac1"}.ri-bill-line:before{content:"\\eac2"}.ri-billiards-fill:before{content:"\\eac3"}.ri-billiards-line:before{content:"\\eac4"}.ri-bit-coin-fill:before{content:"\\eac5"}.ri-bit-coin-line:before{content:"\\eac6"}.ri-blaze-fill:before{content:"\\eac7"}.ri-blaze-line:before{content:"\\eac8"}.ri-bluetooth-connect-fill:before{content:"\\eac9"}.ri-bluetooth-connect-line:before{content:"\\eaca"}.ri-bluetooth-fill:before{content:"\\eacb"}.ri-bluetooth-line:before{content:"\\eacc"}.ri-blur-off-fill:before{content:"\\eacd"}.ri-blur-off-line:before{content:"\\eace"}.ri-body-scan-fill:before{content:"\\eacf"}.ri-body-scan-line:before{content:"\\ead0"}.ri-bold:before{content:"\\ead1"}.ri-book-2-fill:before{content:"\\ead2"}.ri-book-2-line:before{content:"\\ead3"}.ri-book-3-fill:before{content:"\\ead4"}.ri-book-3-line:before{content:"\\ead5"}.ri-book-fill:before{content:"\\ead6"}.ri-book-line:before{content:"\\ead7"}.ri-book-marked-fill:before{content:"\\ead8"}.ri-book-marked-line:before{content:"\\ead9"}.ri-book-open-fill:before{content:"\\eada"}.ri-book-open-line:before{content:"\\eadb"}.ri-book-read-fill:before{content:"\\eadc"}.ri-book-read-line:before{content:"\\eadd"}.ri-booklet-fill:before{content:"\\eade"}.ri-booklet-line:before{content:"\\eadf"}.ri-bookmark-2-fill:before{content:"\\eae0"}.ri-bookmark-2-line:before{content:"\\eae1"}.ri-bookmark-3-fill:before{content:"\\eae2"}.ri-bookmark-3-line:before{content:"\\eae3"}.ri-bookmark-fill:before{content:"\\eae4"}.ri-bookmark-line:before{content:"\\eae5"}.ri-boxing-fill:before{content:"\\eae6"}.ri-boxing-line:before{content:"\\eae7"}.ri-braces-fill:before{content:"\\eae8"}.ri-braces-line:before{content:"\\eae9"}.ri-brackets-fill:before{content:"\\eaea"}.ri-brackets-line:before{content:"\\eaeb"}.ri-briefcase-2-fill:before{content:"\\eaec"}.ri-briefcase-2-line:before{content:"\\eaed"}.ri-briefcase-3-fill:before{content:"\\eaee"}.ri-briefcase-3-line:before{content:"\\eaef"}.ri-briefcase-4-fill:before{content:"\\eaf0"}.ri-briefcase-4-line:before{content:"\\eaf1"}.ri-briefcase-5-fill:before{content:"\\eaf2"}.ri-briefcase-5-line:before{content:"\\eaf3"}.ri-briefcase-fill:before{content:"\\eaf4"}.ri-briefcase-line:before{content:"\\eaf5"}.ri-bring-forward:before{content:"\\eaf6"}.ri-bring-to-front:before{content:"\\eaf7"}.ri-broadcast-fill:before{content:"\\eaf8"}.ri-broadcast-line:before{content:"\\eaf9"}.ri-brush-2-fill:before{content:"\\eafa"}.ri-brush-2-line:before{content:"\\eafb"}.ri-brush-3-fill:before{content:"\\eafc"}.ri-brush-3-line:before{content:"\\eafd"}.ri-brush-4-fill:before{content:"\\eafe"}.ri-brush-4-line:before{content:"\\eaff"}.ri-brush-fill:before{content:"\\eb00"}.ri-brush-line:before{content:"\\eb01"}.ri-bubble-chart-fill:before{content:"\\eb02"}.ri-bubble-chart-line:before{content:"\\eb03"}.ri-bug-2-fill:before{content:"\\eb04"}.ri-bug-2-line:before{content:"\\eb05"}.ri-bug-fill:before{content:"\\eb06"}.ri-bug-line:before{content:"\\eb07"}.ri-building-2-fill:before{content:"\\eb08"}.ri-building-2-line:before{content:"\\eb09"}.ri-building-3-fill:before{content:"\\eb0a"}.ri-building-3-line:before{content:"\\eb0b"}.ri-building-4-fill:before{content:"\\eb0c"}.ri-building-4-line:before{content:"\\eb0d"}.ri-building-fill:before{content:"\\eb0e"}.ri-building-line:before{content:"\\eb0f"}.ri-bus-2-fill:before{content:"\\eb10"}.ri-bus-2-line:before{content:"\\eb11"}.ri-bus-fill:before{content:"\\eb12"}.ri-bus-line:before{content:"\\eb13"}.ri-bus-wifi-fill:before{content:"\\eb14"}.ri-bus-wifi-line:before{content:"\\eb15"}.ri-cactus-fill:before{content:"\\eb16"}.ri-cactus-line:before{content:"\\eb17"}.ri-cake-2-fill:before{content:"\\eb18"}.ri-cake-2-line:before{content:"\\eb19"}.ri-cake-3-fill:before{content:"\\eb1a"}.ri-cake-3-line:before{content:"\\eb1b"}.ri-cake-fill:before{content:"\\eb1c"}.ri-cake-line:before{content:"\\eb1d"}.ri-calculator-fill:before{content:"\\eb1e"}.ri-calculator-line:before{content:"\\eb1f"}.ri-calendar-2-fill:before{content:"\\eb20"}.ri-calendar-2-line:before{content:"\\eb21"}.ri-calendar-check-fill:before{content:"\\eb22"}.ri-calendar-check-line:before{content:"\\eb23"}.ri-calendar-event-fill:before{content:"\\eb24"}.ri-calendar-event-line:before{content:"\\eb25"}.ri-calendar-fill:before{content:"\\eb26"}.ri-calendar-line:before{content:"\\eb27"}.ri-calendar-todo-fill:before{content:"\\eb28"}.ri-calendar-todo-line:before{content:"\\eb29"}.ri-camera-2-fill:before{content:"\\eb2a"}.ri-camera-2-line:before{content:"\\eb2b"}.ri-camera-3-fill:before{content:"\\eb2c"}.ri-camera-3-line:before{content:"\\eb2d"}.ri-camera-fill:before{content:"\\eb2e"}.ri-camera-lens-fill:before{content:"\\eb2f"}.ri-camera-lens-line:before{content:"\\eb30"}.ri-camera-line:before{content:"\\eb31"}.ri-camera-off-fill:before{content:"\\eb32"}.ri-camera-off-line:before{content:"\\eb33"}.ri-camera-switch-fill:before{content:"\\eb34"}.ri-camera-switch-line:before{content:"\\eb35"}.ri-capsule-fill:before{content:"\\eb36"}.ri-capsule-line:before{content:"\\eb37"}.ri-car-fill:before{content:"\\eb38"}.ri-car-line:before{content:"\\eb39"}.ri-car-washing-fill:before{content:"\\eb3a"}.ri-car-washing-line:before{content:"\\eb3b"}.ri-caravan-fill:before{content:"\\eb3c"}.ri-caravan-line:before{content:"\\eb3d"}.ri-cast-fill:before{content:"\\eb3e"}.ri-cast-line:before{content:"\\eb3f"}.ri-cellphone-fill:before{content:"\\eb40"}.ri-cellphone-line:before{content:"\\eb41"}.ri-celsius-fill:before{content:"\\eb42"}.ri-celsius-line:before{content:"\\eb43"}.ri-centos-fill:before{content:"\\eb44"}.ri-centos-line:before{content:"\\eb45"}.ri-character-recognition-fill:before{content:"\\eb46"}.ri-character-recognition-line:before{content:"\\eb47"}.ri-charging-pile-2-fill:before{content:"\\eb48"}.ri-charging-pile-2-line:before{content:"\\eb49"}.ri-charging-pile-fill:before{content:"\\eb4a"}.ri-charging-pile-line:before{content:"\\eb4b"}.ri-chat-1-fill:before{content:"\\eb4c"}.ri-chat-1-line:before{content:"\\eb4d"}.ri-chat-2-fill:before{content:"\\eb4e"}.ri-chat-2-line:before{content:"\\eb4f"}.ri-chat-3-fill:before{content:"\\eb50"}.ri-chat-3-line:before{content:"\\eb51"}.ri-chat-4-fill:before{content:"\\eb52"}.ri-chat-4-line:before{content:"\\eb53"}.ri-chat-check-fill:before{content:"\\eb54"}.ri-chat-check-line:before{content:"\\eb55"}.ri-chat-delete-fill:before{content:"\\eb56"}.ri-chat-delete-line:before{content:"\\eb57"}.ri-chat-download-fill:before{content:"\\eb58"}.ri-chat-download-line:before{content:"\\eb59"}.ri-chat-follow-up-fill:before{content:"\\eb5a"}.ri-chat-follow-up-line:before{content:"\\eb5b"}.ri-chat-forward-fill:before{content:"\\eb5c"}.ri-chat-forward-line:before{content:"\\eb5d"}.ri-chat-heart-fill:before{content:"\\eb5e"}.ri-chat-heart-line:before{content:"\\eb5f"}.ri-chat-history-fill:before{content:"\\eb60"}.ri-chat-history-line:before{content:"\\eb61"}.ri-chat-new-fill:before{content:"\\eb62"}.ri-chat-new-line:before{content:"\\eb63"}.ri-chat-off-fill:before{content:"\\eb64"}.ri-chat-off-line:before{content:"\\eb65"}.ri-chat-poll-fill:before{content:"\\eb66"}.ri-chat-poll-line:before{content:"\\eb67"}.ri-chat-private-fill:before{content:"\\eb68"}.ri-chat-private-line:before{content:"\\eb69"}.ri-chat-quote-fill:before{content:"\\eb6a"}.ri-chat-quote-line:before{content:"\\eb6b"}.ri-chat-settings-fill:before{content:"\\eb6c"}.ri-chat-settings-line:before{content:"\\eb6d"}.ri-chat-smile-2-fill:before{content:"\\eb6e"}.ri-chat-smile-2-line:before{content:"\\eb6f"}.ri-chat-smile-3-fill:before{content:"\\eb70"}.ri-chat-smile-3-line:before{content:"\\eb71"}.ri-chat-smile-fill:before{content:"\\eb72"}.ri-chat-smile-line:before{content:"\\eb73"}.ri-chat-upload-fill:before{content:"\\eb74"}.ri-chat-upload-line:before{content:"\\eb75"}.ri-chat-voice-fill:before{content:"\\eb76"}.ri-chat-voice-line:before{content:"\\eb77"}.ri-check-double-fill:before{content:"\\eb78"}.ri-check-double-line:before{content:"\\eb79"}.ri-check-fill:before{content:"\\eb7a"}.ri-check-line:before{content:"\\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\\eb7d"}.ri-checkbox-blank-fill:before{content:"\\eb7e"}.ri-checkbox-blank-line:before{content:"\\eb7f"}.ri-checkbox-circle-fill:before{content:"\\eb80"}.ri-checkbox-circle-line:before{content:"\\eb81"}.ri-checkbox-fill:before{content:"\\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\\eb83"}.ri-checkbox-indeterminate-line:before{content:"\\eb84"}.ri-checkbox-line:before{content:"\\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\\eb87"}.ri-checkbox-multiple-fill:before{content:"\\eb88"}.ri-checkbox-multiple-line:before{content:"\\eb89"}.ri-china-railway-fill:before{content:"\\eb8a"}.ri-china-railway-line:before{content:"\\eb8b"}.ri-chrome-fill:before{content:"\\eb8c"}.ri-chrome-line:before{content:"\\eb8d"}.ri-clapperboard-fill:before{content:"\\eb8e"}.ri-clapperboard-line:before{content:"\\eb8f"}.ri-clipboard-fill:before{content:"\\eb90"}.ri-clipboard-line:before{content:"\\eb91"}.ri-clockwise-2-fill:before{content:"\\eb92"}.ri-clockwise-2-line:before{content:"\\eb93"}.ri-clockwise-fill:before{content:"\\eb94"}.ri-clockwise-line:before{content:"\\eb95"}.ri-close-circle-fill:before{content:"\\eb96"}.ri-close-circle-line:before{content:"\\eb97"}.ri-close-fill:before{content:"\\eb98"}.ri-close-line:before{content:"\\eb99"}.ri-closed-captioning-fill:before{content:"\\eb9a"}.ri-closed-captioning-line:before{content:"\\eb9b"}.ri-cloud-fill:before{content:"\\eb9c"}.ri-cloud-line:before{content:"\\eb9d"}.ri-cloud-off-fill:before{content:"\\eb9e"}.ri-cloud-off-line:before{content:"\\eb9f"}.ri-cloud-windy-fill:before{content:"\\eba0"}.ri-cloud-windy-line:before{content:"\\eba1"}.ri-cloudy-2-fill:before{content:"\\eba2"}.ri-cloudy-2-line:before{content:"\\eba3"}.ri-cloudy-fill:before{content:"\\eba4"}.ri-cloudy-line:before{content:"\\eba5"}.ri-code-box-fill:before{content:"\\eba6"}.ri-code-box-line:before{content:"\\eba7"}.ri-code-fill:before{content:"\\eba8"}.ri-code-line:before{content:"\\eba9"}.ri-code-s-fill:before{content:"\\ebaa"}.ri-code-s-line:before{content:"\\ebab"}.ri-code-s-slash-fill:before{content:"\\ebac"}.ri-code-s-slash-line:before{content:"\\ebad"}.ri-code-view:before{content:"\\ebae"}.ri-codepen-fill:before{content:"\\ebaf"}.ri-codepen-line:before{content:"\\ebb0"}.ri-coin-fill:before{content:"\\ebb1"}.ri-coin-line:before{content:"\\ebb2"}.ri-coins-fill:before{content:"\\ebb3"}.ri-coins-line:before{content:"\\ebb4"}.ri-collage-fill:before{content:"\\ebb5"}.ri-collage-line:before{content:"\\ebb6"}.ri-command-fill:before{content:"\\ebb7"}.ri-command-line:before{content:"\\ebb8"}.ri-community-fill:before{content:"\\ebb9"}.ri-community-line:before{content:"\\ebba"}.ri-compass-2-fill:before{content:"\\ebbb"}.ri-compass-2-line:before{content:"\\ebbc"}.ri-compass-3-fill:before{content:"\\ebbd"}.ri-compass-3-line:before{content:"\\ebbe"}.ri-compass-4-fill:before{content:"\\ebbf"}.ri-compass-4-line:before{content:"\\ebc0"}.ri-compass-discover-fill:before{content:"\\ebc1"}.ri-compass-discover-line:before{content:"\\ebc2"}.ri-compass-fill:before{content:"\\ebc3"}.ri-compass-line:before{content:"\\ebc4"}.ri-compasses-2-fill:before{content:"\\ebc5"}.ri-compasses-2-line:before{content:"\\ebc6"}.ri-compasses-fill:before{content:"\\ebc7"}.ri-compasses-line:before{content:"\\ebc8"}.ri-computer-fill:before{content:"\\ebc9"}.ri-computer-line:before{content:"\\ebca"}.ri-contacts-book-2-fill:before{content:"\\ebcb"}.ri-contacts-book-2-line:before{content:"\\ebcc"}.ri-contacts-book-fill:before{content:"\\ebcd"}.ri-contacts-book-line:before{content:"\\ebce"}.ri-contacts-book-upload-fill:before{content:"\\ebcf"}.ri-contacts-book-upload-line:before{content:"\\ebd0"}.ri-contacts-fill:before{content:"\\ebd1"}.ri-contacts-line:before{content:"\\ebd2"}.ri-contrast-2-fill:before{content:"\\ebd3"}.ri-contrast-2-line:before{content:"\\ebd4"}.ri-contrast-drop-2-fill:before{content:"\\ebd5"}.ri-contrast-drop-2-line:before{content:"\\ebd6"}.ri-contrast-drop-fill:before{content:"\\ebd7"}.ri-contrast-drop-line:before{content:"\\ebd8"}.ri-contrast-fill:before{content:"\\ebd9"}.ri-contrast-line:before{content:"\\ebda"}.ri-copper-coin-fill:before{content:"\\ebdb"}.ri-copper-coin-line:before{content:"\\ebdc"}.ri-copper-diamond-fill:before{content:"\\ebdd"}.ri-copper-diamond-line:before{content:"\\ebde"}.ri-copyleft-fill:before{content:"\\ebdf"}.ri-copyleft-line:before{content:"\\ebe0"}.ri-copyright-fill:before{content:"\\ebe1"}.ri-copyright-line:before{content:"\\ebe2"}.ri-coreos-fill:before{content:"\\ebe3"}.ri-coreos-line:before{content:"\\ebe4"}.ri-coupon-2-fill:before{content:"\\ebe5"}.ri-coupon-2-line:before{content:"\\ebe6"}.ri-coupon-3-fill:before{content:"\\ebe7"}.ri-coupon-3-line:before{content:"\\ebe8"}.ri-coupon-4-fill:before{content:"\\ebe9"}.ri-coupon-4-line:before{content:"\\ebea"}.ri-coupon-5-fill:before{content:"\\ebeb"}.ri-coupon-5-line:before{content:"\\ebec"}.ri-coupon-fill:before{content:"\\ebed"}.ri-coupon-line:before{content:"\\ebee"}.ri-cpu-fill:before{content:"\\ebef"}.ri-cpu-line:before{content:"\\ebf0"}.ri-creative-commons-by-fill:before{content:"\\ebf1"}.ri-creative-commons-by-line:before{content:"\\ebf2"}.ri-creative-commons-fill:before{content:"\\ebf3"}.ri-creative-commons-line:before{content:"\\ebf4"}.ri-creative-commons-nc-fill:before{content:"\\ebf5"}.ri-creative-commons-nc-line:before{content:"\\ebf6"}.ri-creative-commons-nd-fill:before{content:"\\ebf7"}.ri-creative-commons-nd-line:before{content:"\\ebf8"}.ri-creative-commons-sa-fill:before{content:"\\ebf9"}.ri-creative-commons-sa-line:before{content:"\\ebfa"}.ri-creative-commons-zero-fill:before{content:"\\ebfb"}.ri-creative-commons-zero-line:before{content:"\\ebfc"}.ri-criminal-fill:before{content:"\\ebfd"}.ri-criminal-line:before{content:"\\ebfe"}.ri-crop-2-fill:before{content:"\\ebff"}.ri-crop-2-line:before{content:"\\ec00"}.ri-crop-fill:before{content:"\\ec01"}.ri-crop-line:before{content:"\\ec02"}.ri-css3-fill:before{content:"\\ec03"}.ri-css3-line:before{content:"\\ec04"}.ri-cup-fill:before{content:"\\ec05"}.ri-cup-line:before{content:"\\ec06"}.ri-currency-fill:before{content:"\\ec07"}.ri-currency-line:before{content:"\\ec08"}.ri-cursor-fill:before{content:"\\ec09"}.ri-cursor-line:before{content:"\\ec0a"}.ri-customer-service-2-fill:before{content:"\\ec0b"}.ri-customer-service-2-line:before{content:"\\ec0c"}.ri-customer-service-fill:before{content:"\\ec0d"}.ri-customer-service-line:before{content:"\\ec0e"}.ri-dashboard-2-fill:before{content:"\\ec0f"}.ri-dashboard-2-line:before{content:"\\ec10"}.ri-dashboard-3-fill:before{content:"\\ec11"}.ri-dashboard-3-line:before{content:"\\ec12"}.ri-dashboard-fill:before{content:"\\ec13"}.ri-dashboard-line:before{content:"\\ec14"}.ri-database-2-fill:before{content:"\\ec15"}.ri-database-2-line:before{content:"\\ec16"}.ri-database-fill:before{content:"\\ec17"}.ri-database-line:before{content:"\\ec18"}.ri-delete-back-2-fill:before{content:"\\ec19"}.ri-delete-back-2-line:before{content:"\\ec1a"}.ri-delete-back-fill:before{content:"\\ec1b"}.ri-delete-back-line:before{content:"\\ec1c"}.ri-delete-bin-2-fill:before{content:"\\ec1d"}.ri-delete-bin-2-line:before{content:"\\ec1e"}.ri-delete-bin-3-fill:before{content:"\\ec1f"}.ri-delete-bin-3-line:before{content:"\\ec20"}.ri-delete-bin-4-fill:before{content:"\\ec21"}.ri-delete-bin-4-line:before{content:"\\ec22"}.ri-delete-bin-5-fill:before{content:"\\ec23"}.ri-delete-bin-5-line:before{content:"\\ec24"}.ri-delete-bin-6-fill:before{content:"\\ec25"}.ri-delete-bin-6-line:before{content:"\\ec26"}.ri-delete-bin-7-fill:before{content:"\\ec27"}.ri-delete-bin-7-line:before{content:"\\ec28"}.ri-delete-bin-fill:before{content:"\\ec29"}.ri-delete-bin-line:before{content:"\\ec2a"}.ri-delete-column:before{content:"\\ec2b"}.ri-delete-row:before{content:"\\ec2c"}.ri-device-fill:before{content:"\\ec2d"}.ri-device-line:before{content:"\\ec2e"}.ri-device-recover-fill:before{content:"\\ec2f"}.ri-device-recover-line:before{content:"\\ec30"}.ri-dingding-fill:before{content:"\\ec31"}.ri-dingding-line:before{content:"\\ec32"}.ri-direction-fill:before{content:"\\ec33"}.ri-direction-line:before{content:"\\ec34"}.ri-disc-fill:before{content:"\\ec35"}.ri-disc-line:before{content:"\\ec36"}.ri-discord-fill:before{content:"\\ec37"}.ri-discord-line:before{content:"\\ec38"}.ri-discuss-fill:before{content:"\\ec39"}.ri-discuss-line:before{content:"\\ec3a"}.ri-dislike-fill:before{content:"\\ec3b"}.ri-dislike-line:before{content:"\\ec3c"}.ri-disqus-fill:before{content:"\\ec3d"}.ri-disqus-line:before{content:"\\ec3e"}.ri-divide-fill:before{content:"\\ec3f"}.ri-divide-line:before{content:"\\ec40"}.ri-donut-chart-fill:before{content:"\\ec41"}.ri-donut-chart-line:before{content:"\\ec42"}.ri-door-closed-fill:before{content:"\\ec43"}.ri-door-closed-line:before{content:"\\ec44"}.ri-door-fill:before{content:"\\ec45"}.ri-door-line:before{content:"\\ec46"}.ri-door-lock-box-fill:before{content:"\\ec47"}.ri-door-lock-box-line:before{content:"\\ec48"}.ri-door-lock-fill:before{content:"\\ec49"}.ri-door-lock-line:before{content:"\\ec4a"}.ri-door-open-fill:before{content:"\\ec4b"}.ri-door-open-line:before{content:"\\ec4c"}.ri-dossier-fill:before{content:"\\ec4d"}.ri-dossier-line:before{content:"\\ec4e"}.ri-douban-fill:before{content:"\\ec4f"}.ri-douban-line:before{content:"\\ec50"}.ri-double-quotes-l:before{content:"\\ec51"}.ri-double-quotes-r:before{content:"\\ec52"}.ri-download-2-fill:before{content:"\\ec53"}.ri-download-2-line:before{content:"\\ec54"}.ri-download-cloud-2-fill:before{content:"\\ec55"}.ri-download-cloud-2-line:before{content:"\\ec56"}.ri-download-cloud-fill:before{content:"\\ec57"}.ri-download-cloud-line:before{content:"\\ec58"}.ri-download-fill:before{content:"\\ec59"}.ri-download-line:before{content:"\\ec5a"}.ri-draft-fill:before{content:"\\ec5b"}.ri-draft-line:before{content:"\\ec5c"}.ri-drag-drop-fill:before{content:"\\ec5d"}.ri-drag-drop-line:before{content:"\\ec5e"}.ri-drag-move-2-fill:before{content:"\\ec5f"}.ri-drag-move-2-line:before{content:"\\ec60"}.ri-drag-move-fill:before{content:"\\ec61"}.ri-drag-move-line:before{content:"\\ec62"}.ri-dribbble-fill:before{content:"\\ec63"}.ri-dribbble-line:before{content:"\\ec64"}.ri-drive-fill:before{content:"\\ec65"}.ri-drive-line:before{content:"\\ec66"}.ri-drizzle-fill:before{content:"\\ec67"}.ri-drizzle-line:before{content:"\\ec68"}.ri-drop-fill:before{content:"\\ec69"}.ri-drop-line:before{content:"\\ec6a"}.ri-dropbox-fill:before{content:"\\ec6b"}.ri-dropbox-line:before{content:"\\ec6c"}.ri-dual-sim-1-fill:before{content:"\\ec6d"}.ri-dual-sim-1-line:before{content:"\\ec6e"}.ri-dual-sim-2-fill:before{content:"\\ec6f"}.ri-dual-sim-2-line:before{content:"\\ec70"}.ri-dv-fill:before{content:"\\ec71"}.ri-dv-line:before{content:"\\ec72"}.ri-dvd-fill:before{content:"\\ec73"}.ri-dvd-line:before{content:"\\ec74"}.ri-e-bike-2-fill:before{content:"\\ec75"}.ri-e-bike-2-line:before{content:"\\ec76"}.ri-e-bike-fill:before{content:"\\ec77"}.ri-e-bike-line:before{content:"\\ec78"}.ri-earth-fill:before{content:"\\ec79"}.ri-earth-line:before{content:"\\ec7a"}.ri-earthquake-fill:before{content:"\\ec7b"}.ri-earthquake-line:before{content:"\\ec7c"}.ri-edge-fill:before{content:"\\ec7d"}.ri-edge-line:before{content:"\\ec7e"}.ri-edit-2-fill:before{content:"\\ec7f"}.ri-edit-2-line:before{content:"\\ec80"}.ri-edit-box-fill:before{content:"\\ec81"}.ri-edit-box-line:before{content:"\\ec82"}.ri-edit-circle-fill:before{content:"\\ec83"}.ri-edit-circle-line:before{content:"\\ec84"}.ri-edit-fill:before{content:"\\ec85"}.ri-edit-line:before{content:"\\ec86"}.ri-eject-fill:before{content:"\\ec87"}.ri-eject-line:before{content:"\\ec88"}.ri-emotion-2-fill:before{content:"\\ec89"}.ri-emotion-2-line:before{content:"\\ec8a"}.ri-emotion-fill:before{content:"\\ec8b"}.ri-emotion-happy-fill:before{content:"\\ec8c"}.ri-emotion-happy-line:before{content:"\\ec8d"}.ri-emotion-laugh-fill:before{content:"\\ec8e"}.ri-emotion-laugh-line:before{content:"\\ec8f"}.ri-emotion-line:before{content:"\\ec90"}.ri-emotion-normal-fill:before{content:"\\ec91"}.ri-emotion-normal-line:before{content:"\\ec92"}.ri-emotion-sad-fill:before{content:"\\ec93"}.ri-emotion-sad-line:before{content:"\\ec94"}.ri-emotion-unhappy-fill:before{content:"\\ec95"}.ri-emotion-unhappy-line:before{content:"\\ec96"}.ri-empathize-fill:before{content:"\\ec97"}.ri-empathize-line:before{content:"\\ec98"}.ri-emphasis-cn:before{content:"\\ec99"}.ri-emphasis:before{content:"\\ec9a"}.ri-english-input:before{content:"\\ec9b"}.ri-equalizer-fill:before{content:"\\ec9c"}.ri-equalizer-line:before{content:"\\ec9d"}.ri-eraser-fill:before{content:"\\ec9e"}.ri-eraser-line:before{content:"\\ec9f"}.ri-error-warning-fill:before{content:"\\eca0"}.ri-error-warning-line:before{content:"\\eca1"}.ri-evernote-fill:before{content:"\\eca2"}.ri-evernote-line:before{content:"\\eca3"}.ri-exchange-box-fill:before{content:"\\eca4"}.ri-exchange-box-line:before{content:"\\eca5"}.ri-exchange-cny-fill:before{content:"\\eca6"}.ri-exchange-cny-line:before{content:"\\eca7"}.ri-exchange-dollar-fill:before{content:"\\eca8"}.ri-exchange-dollar-line:before{content:"\\eca9"}.ri-exchange-fill:before{content:"\\ecaa"}.ri-exchange-funds-fill:before{content:"\\ecab"}.ri-exchange-funds-line:before{content:"\\ecac"}.ri-exchange-line:before{content:"\\ecad"}.ri-external-link-fill:before{content:"\\ecae"}.ri-external-link-line:before{content:"\\ecaf"}.ri-eye-2-fill:before{content:"\\ecb0"}.ri-eye-2-line:before{content:"\\ecb1"}.ri-eye-close-fill:before{content:"\\ecb2"}.ri-eye-close-line:before{content:"\\ecb3"}.ri-eye-fill:before{content:"\\ecb4"}.ri-eye-line:before{content:"\\ecb5"}.ri-eye-off-fill:before{content:"\\ecb6"}.ri-eye-off-line:before{content:"\\ecb7"}.ri-facebook-box-fill:before{content:"\\ecb8"}.ri-facebook-box-line:before{content:"\\ecb9"}.ri-facebook-circle-fill:before{content:"\\ecba"}.ri-facebook-circle-line:before{content:"\\ecbb"}.ri-facebook-fill:before{content:"\\ecbc"}.ri-facebook-line:before{content:"\\ecbd"}.ri-fahrenheit-fill:before{content:"\\ecbe"}.ri-fahrenheit-line:before{content:"\\ecbf"}.ri-feedback-fill:before{content:"\\ecc0"}.ri-feedback-line:before{content:"\\ecc1"}.ri-file-2-fill:before{content:"\\ecc2"}.ri-file-2-line:before{content:"\\ecc3"}.ri-file-3-fill:before{content:"\\ecc4"}.ri-file-3-line:before{content:"\\ecc5"}.ri-file-4-fill:before{content:"\\ecc6"}.ri-file-4-line:before{content:"\\ecc7"}.ri-file-add-fill:before{content:"\\ecc8"}.ri-file-add-line:before{content:"\\ecc9"}.ri-file-chart-2-fill:before{content:"\\ecca"}.ri-file-chart-2-line:before{content:"\\eccb"}.ri-file-chart-fill:before{content:"\\eccc"}.ri-file-chart-line:before{content:"\\eccd"}.ri-file-cloud-fill:before{content:"\\ecce"}.ri-file-cloud-line:before{content:"\\eccf"}.ri-file-code-fill:before{content:"\\ecd0"}.ri-file-code-line:before{content:"\\ecd1"}.ri-file-copy-2-fill:before{content:"\\ecd2"}.ri-file-copy-2-line:before{content:"\\ecd3"}.ri-file-copy-fill:before{content:"\\ecd4"}.ri-file-copy-line:before{content:"\\ecd5"}.ri-file-damage-fill:before{content:"\\ecd6"}.ri-file-damage-line:before{content:"\\ecd7"}.ri-file-download-fill:before{content:"\\ecd8"}.ri-file-download-line:before{content:"\\ecd9"}.ri-file-edit-fill:before{content:"\\ecda"}.ri-file-edit-line:before{content:"\\ecdb"}.ri-file-excel-2-fill:before{content:"\\ecdc"}.ri-file-excel-2-line:before{content:"\\ecdd"}.ri-file-excel-fill:before{content:"\\ecde"}.ri-file-excel-line:before{content:"\\ecdf"}.ri-file-fill:before{content:"\\ece0"}.ri-file-forbid-fill:before{content:"\\ece1"}.ri-file-forbid-line:before{content:"\\ece2"}.ri-file-gif-fill:before{content:"\\ece3"}.ri-file-gif-line:before{content:"\\ece4"}.ri-file-history-fill:before{content:"\\ece5"}.ri-file-history-line:before{content:"\\ece6"}.ri-file-hwp-fill:before{content:"\\ece7"}.ri-file-hwp-line:before{content:"\\ece8"}.ri-file-info-fill:before{content:"\\ece9"}.ri-file-info-line:before{content:"\\ecea"}.ri-file-line:before{content:"\\eceb"}.ri-file-list-2-fill:before{content:"\\ecec"}.ri-file-list-2-line:before{content:"\\eced"}.ri-file-list-3-fill:before{content:"\\ecee"}.ri-file-list-3-line:before{content:"\\ecef"}.ri-file-list-fill:before{content:"\\ecf0"}.ri-file-list-line:before{content:"\\ecf1"}.ri-file-lock-fill:before{content:"\\ecf2"}.ri-file-lock-line:before{content:"\\ecf3"}.ri-file-marked-fill:before{content:"\\ecf4"}.ri-file-marked-line:before{content:"\\ecf5"}.ri-file-music-fill:before{content:"\\ecf6"}.ri-file-music-line:before{content:"\\ecf7"}.ri-file-paper-2-fill:before{content:"\\ecf8"}.ri-file-paper-2-line:before{content:"\\ecf9"}.ri-file-paper-fill:before{content:"\\ecfa"}.ri-file-paper-line:before{content:"\\ecfb"}.ri-file-pdf-fill:before{content:"\\ecfc"}.ri-file-pdf-line:before{content:"\\ecfd"}.ri-file-ppt-2-fill:before{content:"\\ecfe"}.ri-file-ppt-2-line:before{content:"\\ecff"}.ri-file-ppt-fill:before{content:"\\ed00"}.ri-file-ppt-line:before{content:"\\ed01"}.ri-file-reduce-fill:before{content:"\\ed02"}.ri-file-reduce-line:before{content:"\\ed03"}.ri-file-search-fill:before{content:"\\ed04"}.ri-file-search-line:before{content:"\\ed05"}.ri-file-settings-fill:before{content:"\\ed06"}.ri-file-settings-line:before{content:"\\ed07"}.ri-file-shield-2-fill:before{content:"\\ed08"}.ri-file-shield-2-line:before{content:"\\ed09"}.ri-file-shield-fill:before{content:"\\ed0a"}.ri-file-shield-line:before{content:"\\ed0b"}.ri-file-shred-fill:before{content:"\\ed0c"}.ri-file-shred-line:before{content:"\\ed0d"}.ri-file-text-fill:before{content:"\\ed0e"}.ri-file-text-line:before{content:"\\ed0f"}.ri-file-transfer-fill:before{content:"\\ed10"}.ri-file-transfer-line:before{content:"\\ed11"}.ri-file-unknow-fill:before{content:"\\ed12"}.ri-file-unknow-line:before{content:"\\ed13"}.ri-file-upload-fill:before{content:"\\ed14"}.ri-file-upload-line:before{content:"\\ed15"}.ri-file-user-fill:before{content:"\\ed16"}.ri-file-user-line:before{content:"\\ed17"}.ri-file-warning-fill:before{content:"\\ed18"}.ri-file-warning-line:before{content:"\\ed19"}.ri-file-word-2-fill:before{content:"\\ed1a"}.ri-file-word-2-line:before{content:"\\ed1b"}.ri-file-word-fill:before{content:"\\ed1c"}.ri-file-word-line:before{content:"\\ed1d"}.ri-file-zip-fill:before{content:"\\ed1e"}.ri-file-zip-line:before{content:"\\ed1f"}.ri-film-fill:before{content:"\\ed20"}.ri-film-line:before{content:"\\ed21"}.ri-filter-2-fill:before{content:"\\ed22"}.ri-filter-2-line:before{content:"\\ed23"}.ri-filter-3-fill:before{content:"\\ed24"}.ri-filter-3-line:before{content:"\\ed25"}.ri-filter-fill:before{content:"\\ed26"}.ri-filter-line:before{content:"\\ed27"}.ri-filter-off-fill:before{content:"\\ed28"}.ri-filter-off-line:before{content:"\\ed29"}.ri-find-replace-fill:before{content:"\\ed2a"}.ri-find-replace-line:before{content:"\\ed2b"}.ri-finder-fill:before{content:"\\ed2c"}.ri-finder-line:before{content:"\\ed2d"}.ri-fingerprint-2-fill:before{content:"\\ed2e"}.ri-fingerprint-2-line:before{content:"\\ed2f"}.ri-fingerprint-fill:before{content:"\\ed30"}.ri-fingerprint-line:before{content:"\\ed31"}.ri-fire-fill:before{content:"\\ed32"}.ri-fire-line:before{content:"\\ed33"}.ri-firefox-fill:before{content:"\\ed34"}.ri-firefox-line:before{content:"\\ed35"}.ri-first-aid-kit-fill:before{content:"\\ed36"}.ri-first-aid-kit-line:before{content:"\\ed37"}.ri-flag-2-fill:before{content:"\\ed38"}.ri-flag-2-line:before{content:"\\ed39"}.ri-flag-fill:before{content:"\\ed3a"}.ri-flag-line:before{content:"\\ed3b"}.ri-flashlight-fill:before{content:"\\ed3c"}.ri-flashlight-line:before{content:"\\ed3d"}.ri-flask-fill:before{content:"\\ed3e"}.ri-flask-line:before{content:"\\ed3f"}.ri-flight-land-fill:before{content:"\\ed40"}.ri-flight-land-line:before{content:"\\ed41"}.ri-flight-takeoff-fill:before{content:"\\ed42"}.ri-flight-takeoff-line:before{content:"\\ed43"}.ri-flood-fill:before{content:"\\ed44"}.ri-flood-line:before{content:"\\ed45"}.ri-flow-chart:before{content:"\\ed46"}.ri-flutter-fill:before{content:"\\ed47"}.ri-flutter-line:before{content:"\\ed48"}.ri-focus-2-fill:before{content:"\\ed49"}.ri-focus-2-line:before{content:"\\ed4a"}.ri-focus-3-fill:before{content:"\\ed4b"}.ri-focus-3-line:before{content:"\\ed4c"}.ri-focus-fill:before{content:"\\ed4d"}.ri-focus-line:before{content:"\\ed4e"}.ri-foggy-fill:before{content:"\\ed4f"}.ri-foggy-line:before{content:"\\ed50"}.ri-folder-2-fill:before{content:"\\ed51"}.ri-folder-2-line:before{content:"\\ed52"}.ri-folder-3-fill:before{content:"\\ed53"}.ri-folder-3-line:before{content:"\\ed54"}.ri-folder-4-fill:before{content:"\\ed55"}.ri-folder-4-line:before{content:"\\ed56"}.ri-folder-5-fill:before{content:"\\ed57"}.ri-folder-5-line:before{content:"\\ed58"}.ri-folder-add-fill:before{content:"\\ed59"}.ri-folder-add-line:before{content:"\\ed5a"}.ri-folder-chart-2-fill:before{content:"\\ed5b"}.ri-folder-chart-2-line:before{content:"\\ed5c"}.ri-folder-chart-fill:before{content:"\\ed5d"}.ri-folder-chart-line:before{content:"\\ed5e"}.ri-folder-download-fill:before{content:"\\ed5f"}.ri-folder-download-line:before{content:"\\ed60"}.ri-folder-fill:before{content:"\\ed61"}.ri-folder-forbid-fill:before{content:"\\ed62"}.ri-folder-forbid-line:before{content:"\\ed63"}.ri-folder-history-fill:before{content:"\\ed64"}.ri-folder-history-line:before{content:"\\ed65"}.ri-folder-info-fill:before{content:"\\ed66"}.ri-folder-info-line:before{content:"\\ed67"}.ri-folder-keyhole-fill:before{content:"\\ed68"}.ri-folder-keyhole-line:before{content:"\\ed69"}.ri-folder-line:before{content:"\\ed6a"}.ri-folder-lock-fill:before{content:"\\ed6b"}.ri-folder-lock-line:before{content:"\\ed6c"}.ri-folder-music-fill:before{content:"\\ed6d"}.ri-folder-music-line:before{content:"\\ed6e"}.ri-folder-open-fill:before{content:"\\ed6f"}.ri-folder-open-line:before{content:"\\ed70"}.ri-folder-received-fill:before{content:"\\ed71"}.ri-folder-received-line:before{content:"\\ed72"}.ri-folder-reduce-fill:before{content:"\\ed73"}.ri-folder-reduce-line:before{content:"\\ed74"}.ri-folder-settings-fill:before{content:"\\ed75"}.ri-folder-settings-line:before{content:"\\ed76"}.ri-folder-shared-fill:before{content:"\\ed77"}.ri-folder-shared-line:before{content:"\\ed78"}.ri-folder-shield-2-fill:before{content:"\\ed79"}.ri-folder-shield-2-line:before{content:"\\ed7a"}.ri-folder-shield-fill:before{content:"\\ed7b"}.ri-folder-shield-line:before{content:"\\ed7c"}.ri-folder-transfer-fill:before{content:"\\ed7d"}.ri-folder-transfer-line:before{content:"\\ed7e"}.ri-folder-unknow-fill:before{content:"\\ed7f"}.ri-folder-unknow-line:before{content:"\\ed80"}.ri-folder-upload-fill:before{content:"\\ed81"}.ri-folder-upload-line:before{content:"\\ed82"}.ri-folder-user-fill:before{content:"\\ed83"}.ri-folder-user-line:before{content:"\\ed84"}.ri-folder-warning-fill:before{content:"\\ed85"}.ri-folder-warning-line:before{content:"\\ed86"}.ri-folder-zip-fill:before{content:"\\ed87"}.ri-folder-zip-line:before{content:"\\ed88"}.ri-folders-fill:before{content:"\\ed89"}.ri-folders-line:before{content:"\\ed8a"}.ri-font-color:before{content:"\\ed8b"}.ri-font-size-2:before{content:"\\ed8c"}.ri-font-size:before{content:"\\ed8d"}.ri-football-fill:before{content:"\\ed8e"}.ri-football-line:before{content:"\\ed8f"}.ri-footprint-fill:before{content:"\\ed90"}.ri-footprint-line:before{content:"\\ed91"}.ri-forbid-2-fill:before{content:"\\ed92"}.ri-forbid-2-line:before{content:"\\ed93"}.ri-forbid-fill:before{content:"\\ed94"}.ri-forbid-line:before{content:"\\ed95"}.ri-format-clear:before{content:"\\ed96"}.ri-fridge-fill:before{content:"\\ed97"}.ri-fridge-line:before{content:"\\ed98"}.ri-fullscreen-exit-fill:before{content:"\\ed99"}.ri-fullscreen-exit-line:before{content:"\\ed9a"}.ri-fullscreen-fill:before{content:"\\ed9b"}.ri-fullscreen-line:before{content:"\\ed9c"}.ri-function-fill:before{content:"\\ed9d"}.ri-function-line:before{content:"\\ed9e"}.ri-functions:before{content:"\\ed9f"}.ri-funds-box-fill:before{content:"\\eda0"}.ri-funds-box-line:before{content:"\\eda1"}.ri-funds-fill:before{content:"\\eda2"}.ri-funds-line:before{content:"\\eda3"}.ri-gallery-fill:before{content:"\\eda4"}.ri-gallery-line:before{content:"\\eda5"}.ri-gallery-upload-fill:before{content:"\\eda6"}.ri-gallery-upload-line:before{content:"\\eda7"}.ri-game-fill:before{content:"\\eda8"}.ri-game-line:before{content:"\\eda9"}.ri-gamepad-fill:before{content:"\\edaa"}.ri-gamepad-line:before{content:"\\edab"}.ri-gas-station-fill:before{content:"\\edac"}.ri-gas-station-line:before{content:"\\edad"}.ri-gatsby-fill:before{content:"\\edae"}.ri-gatsby-line:before{content:"\\edaf"}.ri-genderless-fill:before{content:"\\edb0"}.ri-genderless-line:before{content:"\\edb1"}.ri-ghost-2-fill:before{content:"\\edb2"}.ri-ghost-2-line:before{content:"\\edb3"}.ri-ghost-fill:before{content:"\\edb4"}.ri-ghost-line:before{content:"\\edb5"}.ri-ghost-smile-fill:before{content:"\\edb6"}.ri-ghost-smile-line:before{content:"\\edb7"}.ri-gift-2-fill:before{content:"\\edb8"}.ri-gift-2-line:before{content:"\\edb9"}.ri-gift-fill:before{content:"\\edba"}.ri-gift-line:before{content:"\\edbb"}.ri-git-branch-fill:before{content:"\\edbc"}.ri-git-branch-line:before{content:"\\edbd"}.ri-git-commit-fill:before{content:"\\edbe"}.ri-git-commit-line:before{content:"\\edbf"}.ri-git-merge-fill:before{content:"\\edc0"}.ri-git-merge-line:before{content:"\\edc1"}.ri-git-pull-request-fill:before{content:"\\edc2"}.ri-git-pull-request-line:before{content:"\\edc3"}.ri-git-repository-commits-fill:before{content:"\\edc4"}.ri-git-repository-commits-line:before{content:"\\edc5"}.ri-git-repository-fill:before{content:"\\edc6"}.ri-git-repository-line:before{content:"\\edc7"}.ri-git-repository-private-fill:before{content:"\\edc8"}.ri-git-repository-private-line:before{content:"\\edc9"}.ri-github-fill:before{content:"\\edca"}.ri-github-line:before{content:"\\edcb"}.ri-gitlab-fill:before{content:"\\edcc"}.ri-gitlab-line:before{content:"\\edcd"}.ri-global-fill:before{content:"\\edce"}.ri-global-line:before{content:"\\edcf"}.ri-globe-fill:before{content:"\\edd0"}.ri-globe-line:before{content:"\\edd1"}.ri-goblet-fill:before{content:"\\edd2"}.ri-goblet-line:before{content:"\\edd3"}.ri-google-fill:before{content:"\\edd4"}.ri-google-line:before{content:"\\edd5"}.ri-google-play-fill:before{content:"\\edd6"}.ri-google-play-line:before{content:"\\edd7"}.ri-government-fill:before{content:"\\edd8"}.ri-government-line:before{content:"\\edd9"}.ri-gps-fill:before{content:"\\edda"}.ri-gps-line:before{content:"\\eddb"}.ri-gradienter-fill:before{content:"\\eddc"}.ri-gradienter-line:before{content:"\\eddd"}.ri-grid-fill:before{content:"\\edde"}.ri-grid-line:before{content:"\\eddf"}.ri-group-2-fill:before{content:"\\ede0"}.ri-group-2-line:before{content:"\\ede1"}.ri-group-fill:before{content:"\\ede2"}.ri-group-line:before{content:"\\ede3"}.ri-guide-fill:before{content:"\\ede4"}.ri-guide-line:before{content:"\\ede5"}.ri-h-1:before{content:"\\ede6"}.ri-h-2:before{content:"\\ede7"}.ri-h-3:before{content:"\\ede8"}.ri-h-4:before{content:"\\ede9"}.ri-h-5:before{content:"\\edea"}.ri-h-6:before{content:"\\edeb"}.ri-hail-fill:before{content:"\\edec"}.ri-hail-line:before{content:"\\eded"}.ri-hammer-fill:before{content:"\\edee"}.ri-hammer-line:before{content:"\\edef"}.ri-hand-coin-fill:before{content:"\\edf0"}.ri-hand-coin-line:before{content:"\\edf1"}.ri-hand-heart-fill:before{content:"\\edf2"}.ri-hand-heart-line:before{content:"\\edf3"}.ri-hand-sanitizer-fill:before{content:"\\edf4"}.ri-hand-sanitizer-line:before{content:"\\edf5"}.ri-handbag-fill:before{content:"\\edf6"}.ri-handbag-line:before{content:"\\edf7"}.ri-hard-drive-2-fill:before{content:"\\edf8"}.ri-hard-drive-2-line:before{content:"\\edf9"}.ri-hard-drive-fill:before{content:"\\edfa"}.ri-hard-drive-line:before{content:"\\edfb"}.ri-hashtag:before{content:"\\edfc"}.ri-haze-2-fill:before{content:"\\edfd"}.ri-haze-2-line:before{content:"\\edfe"}.ri-haze-fill:before{content:"\\edff"}.ri-haze-line:before{content:"\\ee00"}.ri-hd-fill:before{content:"\\ee01"}.ri-hd-line:before{content:"\\ee02"}.ri-heading:before{content:"\\ee03"}.ri-headphone-fill:before{content:"\\ee04"}.ri-headphone-line:before{content:"\\ee05"}.ri-health-book-fill:before{content:"\\ee06"}.ri-health-book-line:before{content:"\\ee07"}.ri-heart-2-fill:before{content:"\\ee08"}.ri-heart-2-line:before{content:"\\ee09"}.ri-heart-3-fill:before{content:"\\ee0a"}.ri-heart-3-line:before{content:"\\ee0b"}.ri-heart-add-fill:before{content:"\\ee0c"}.ri-heart-add-line:before{content:"\\ee0d"}.ri-heart-fill:before{content:"\\ee0e"}.ri-heart-line:before{content:"\\ee0f"}.ri-heart-pulse-fill:before{content:"\\ee10"}.ri-heart-pulse-line:before{content:"\\ee11"}.ri-hearts-fill:before{content:"\\ee12"}.ri-hearts-line:before{content:"\\ee13"}.ri-heavy-showers-fill:before{content:"\\ee14"}.ri-heavy-showers-line:before{content:"\\ee15"}.ri-history-fill:before{content:"\\ee16"}.ri-history-line:before{content:"\\ee17"}.ri-home-2-fill:before{content:"\\ee18"}.ri-home-2-line:before{content:"\\ee19"}.ri-home-3-fill:before{content:"\\ee1a"}.ri-home-3-line:before{content:"\\ee1b"}.ri-home-4-fill:before{content:"\\ee1c"}.ri-home-4-line:before{content:"\\ee1d"}.ri-home-5-fill:before{content:"\\ee1e"}.ri-home-5-line:before{content:"\\ee1f"}.ri-home-6-fill:before{content:"\\ee20"}.ri-home-6-line:before{content:"\\ee21"}.ri-home-7-fill:before{content:"\\ee22"}.ri-home-7-line:before{content:"\\ee23"}.ri-home-8-fill:before{content:"\\ee24"}.ri-home-8-line:before{content:"\\ee25"}.ri-home-fill:before{content:"\\ee26"}.ri-home-gear-fill:before{content:"\\ee27"}.ri-home-gear-line:before{content:"\\ee28"}.ri-home-heart-fill:before{content:"\\ee29"}.ri-home-heart-line:before{content:"\\ee2a"}.ri-home-line:before{content:"\\ee2b"}.ri-home-smile-2-fill:before{content:"\\ee2c"}.ri-home-smile-2-line:before{content:"\\ee2d"}.ri-home-smile-fill:before{content:"\\ee2e"}.ri-home-smile-line:before{content:"\\ee2f"}.ri-home-wifi-fill:before{content:"\\ee30"}.ri-home-wifi-line:before{content:"\\ee31"}.ri-honor-of-kings-fill:before{content:"\\ee32"}.ri-honor-of-kings-line:before{content:"\\ee33"}.ri-honour-fill:before{content:"\\ee34"}.ri-honour-line:before{content:"\\ee35"}.ri-hospital-fill:before{content:"\\ee36"}.ri-hospital-line:before{content:"\\ee37"}.ri-hotel-bed-fill:before{content:"\\ee38"}.ri-hotel-bed-line:before{content:"\\ee39"}.ri-hotel-fill:before{content:"\\ee3a"}.ri-hotel-line:before{content:"\\ee3b"}.ri-hotspot-fill:before{content:"\\ee3c"}.ri-hotspot-line:before{content:"\\ee3d"}.ri-hq-fill:before{content:"\\ee3e"}.ri-hq-line:before{content:"\\ee3f"}.ri-html5-fill:before{content:"\\ee40"}.ri-html5-line:before{content:"\\ee41"}.ri-ie-fill:before{content:"\\ee42"}.ri-ie-line:before{content:"\\ee43"}.ri-image-2-fill:before{content:"\\ee44"}.ri-image-2-line:before{content:"\\ee45"}.ri-image-add-fill:before{content:"\\ee46"}.ri-image-add-line:before{content:"\\ee47"}.ri-image-edit-fill:before{content:"\\ee48"}.ri-image-edit-line:before{content:"\\ee49"}.ri-image-fill:before{content:"\\ee4a"}.ri-image-line:before{content:"\\ee4b"}.ri-inbox-archive-fill:before{content:"\\ee4c"}.ri-inbox-archive-line:before{content:"\\ee4d"}.ri-inbox-fill:before{content:"\\ee4e"}.ri-inbox-line:before{content:"\\ee4f"}.ri-inbox-unarchive-fill:before{content:"\\ee50"}.ri-inbox-unarchive-line:before{content:"\\ee51"}.ri-increase-decrease-fill:before{content:"\\ee52"}.ri-increase-decrease-line:before{content:"\\ee53"}.ri-indent-decrease:before{content:"\\ee54"}.ri-indent-increase:before{content:"\\ee55"}.ri-indeterminate-circle-fill:before{content:"\\ee56"}.ri-indeterminate-circle-line:before{content:"\\ee57"}.ri-information-fill:before{content:"\\ee58"}.ri-information-line:before{content:"\\ee59"}.ri-infrared-thermometer-fill:before{content:"\\ee5a"}.ri-infrared-thermometer-line:before{content:"\\ee5b"}.ri-ink-bottle-fill:before{content:"\\ee5c"}.ri-ink-bottle-line:before{content:"\\ee5d"}.ri-input-cursor-move:before{content:"\\ee5e"}.ri-input-method-fill:before{content:"\\ee5f"}.ri-input-method-line:before{content:"\\ee60"}.ri-insert-column-left:before{content:"\\ee61"}.ri-insert-column-right:before{content:"\\ee62"}.ri-insert-row-bottom:before{content:"\\ee63"}.ri-insert-row-top:before{content:"\\ee64"}.ri-instagram-fill:before{content:"\\ee65"}.ri-instagram-line:before{content:"\\ee66"}.ri-install-fill:before{content:"\\ee67"}.ri-install-line:before{content:"\\ee68"}.ri-invision-fill:before{content:"\\ee69"}.ri-invision-line:before{content:"\\ee6a"}.ri-italic:before{content:"\\ee6b"}.ri-kakao-talk-fill:before{content:"\\ee6c"}.ri-kakao-talk-line:before{content:"\\ee6d"}.ri-key-2-fill:before{content:"\\ee6e"}.ri-key-2-line:before{content:"\\ee6f"}.ri-key-fill:before{content:"\\ee70"}.ri-key-line:before{content:"\\ee71"}.ri-keyboard-box-fill:before{content:"\\ee72"}.ri-keyboard-box-line:before{content:"\\ee73"}.ri-keyboard-fill:before{content:"\\ee74"}.ri-keyboard-line:before{content:"\\ee75"}.ri-keynote-fill:before{content:"\\ee76"}.ri-keynote-line:before{content:"\\ee77"}.ri-knife-blood-fill:before{content:"\\ee78"}.ri-knife-blood-line:before{content:"\\ee79"}.ri-knife-fill:before{content:"\\ee7a"}.ri-knife-line:before{content:"\\ee7b"}.ri-landscape-fill:before{content:"\\ee7c"}.ri-landscape-line:before{content:"\\ee7d"}.ri-layout-2-fill:before{content:"\\ee7e"}.ri-layout-2-line:before{content:"\\ee7f"}.ri-layout-3-fill:before{content:"\\ee80"}.ri-layout-3-line:before{content:"\\ee81"}.ri-layout-4-fill:before{content:"\\ee82"}.ri-layout-4-line:before{content:"\\ee83"}.ri-layout-5-fill:before{content:"\\ee84"}.ri-layout-5-line:before{content:"\\ee85"}.ri-layout-6-fill:before{content:"\\ee86"}.ri-layout-6-line:before{content:"\\ee87"}.ri-layout-bottom-2-fill:before{content:"\\ee88"}.ri-layout-bottom-2-line:before{content:"\\ee89"}.ri-layout-bottom-fill:before{content:"\\ee8a"}.ri-layout-bottom-line:before{content:"\\ee8b"}.ri-layout-column-fill:before{content:"\\ee8c"}.ri-layout-column-line:before{content:"\\ee8d"}.ri-layout-fill:before{content:"\\ee8e"}.ri-layout-grid-fill:before{content:"\\ee8f"}.ri-layout-grid-line:before{content:"\\ee90"}.ri-layout-left-2-fill:before{content:"\\ee91"}.ri-layout-left-2-line:before{content:"\\ee92"}.ri-layout-left-fill:before{content:"\\ee93"}.ri-layout-left-line:before{content:"\\ee94"}.ri-layout-line:before{content:"\\ee95"}.ri-layout-masonry-fill:before{content:"\\ee96"}.ri-layout-masonry-line:before{content:"\\ee97"}.ri-layout-right-2-fill:before{content:"\\ee98"}.ri-layout-right-2-line:before{content:"\\ee99"}.ri-layout-right-fill:before{content:"\\ee9a"}.ri-layout-right-line:before{content:"\\ee9b"}.ri-layout-row-fill:before{content:"\\ee9c"}.ri-layout-row-line:before{content:"\\ee9d"}.ri-layout-top-2-fill:before{content:"\\ee9e"}.ri-layout-top-2-line:before{content:"\\ee9f"}.ri-layout-top-fill:before{content:"\\eea0"}.ri-layout-top-line:before{content:"\\eea1"}.ri-leaf-fill:before{content:"\\eea2"}.ri-leaf-line:before{content:"\\eea3"}.ri-lifebuoy-fill:before{content:"\\eea4"}.ri-lifebuoy-line:before{content:"\\eea5"}.ri-lightbulb-fill:before{content:"\\eea6"}.ri-lightbulb-flash-fill:before{content:"\\eea7"}.ri-lightbulb-flash-line:before{content:"\\eea8"}.ri-lightbulb-line:before{content:"\\eea9"}.ri-line-chart-fill:before{content:"\\eeaa"}.ri-line-chart-line:before{content:"\\eeab"}.ri-line-fill:before{content:"\\eeac"}.ri-line-height:before{content:"\\eead"}.ri-line-line:before{content:"\\eeae"}.ri-link-m:before{content:"\\eeaf"}.ri-link-unlink-m:before{content:"\\eeb0"}.ri-link-unlink:before{content:"\\eeb1"}.ri-link:before{content:"\\eeb2"}.ri-linkedin-box-fill:before{content:"\\eeb3"}.ri-linkedin-box-line:before{content:"\\eeb4"}.ri-linkedin-fill:before{content:"\\eeb5"}.ri-linkedin-line:before{content:"\\eeb6"}.ri-links-fill:before{content:"\\eeb7"}.ri-links-line:before{content:"\\eeb8"}.ri-list-check-2:before{content:"\\eeb9"}.ri-list-check:before{content:"\\eeba"}.ri-list-ordered:before{content:"\\eebb"}.ri-list-settings-fill:before{content:"\\eebc"}.ri-list-settings-line:before{content:"\\eebd"}.ri-list-unordered:before{content:"\\eebe"}.ri-live-fill:before{content:"\\eebf"}.ri-live-line:before{content:"\\eec0"}.ri-loader-2-fill:before{content:"\\eec1"}.ri-loader-2-line:before{content:"\\eec2"}.ri-loader-3-fill:before{content:"\\eec3"}.ri-loader-3-line:before{content:"\\eec4"}.ri-loader-4-fill:before{content:"\\eec5"}.ri-loader-4-line:before{content:"\\eec6"}.ri-loader-5-fill:before{content:"\\eec7"}.ri-loader-5-line:before{content:"\\eec8"}.ri-loader-fill:before{content:"\\eec9"}.ri-loader-line:before{content:"\\eeca"}.ri-lock-2-fill:before{content:"\\eecb"}.ri-lock-2-line:before{content:"\\eecc"}.ri-lock-fill:before{content:"\\eecd"}.ri-lock-line:before{content:"\\eece"}.ri-lock-password-fill:before{content:"\\eecf"}.ri-lock-password-line:before{content:"\\eed0"}.ri-lock-unlock-fill:before{content:"\\eed1"}.ri-lock-unlock-line:before{content:"\\eed2"}.ri-login-box-fill:before{content:"\\eed3"}.ri-login-box-line:before{content:"\\eed4"}.ri-login-circle-fill:before{content:"\\eed5"}.ri-login-circle-line:before{content:"\\eed6"}.ri-logout-box-fill:before{content:"\\eed7"}.ri-logout-box-line:before{content:"\\eed8"}.ri-logout-box-r-fill:before{content:"\\eed9"}.ri-logout-box-r-line:before{content:"\\eeda"}.ri-logout-circle-fill:before{content:"\\eedb"}.ri-logout-circle-line:before{content:"\\eedc"}.ri-logout-circle-r-fill:before{content:"\\eedd"}.ri-logout-circle-r-line:before{content:"\\eede"}.ri-luggage-cart-fill:before{content:"\\eedf"}.ri-luggage-cart-line:before{content:"\\eee0"}.ri-luggage-deposit-fill:before{content:"\\eee1"}.ri-luggage-deposit-line:before{content:"\\eee2"}.ri-lungs-fill:before{content:"\\eee3"}.ri-lungs-line:before{content:"\\eee4"}.ri-mac-fill:before{content:"\\eee5"}.ri-mac-line:before{content:"\\eee6"}.ri-macbook-fill:before{content:"\\eee7"}.ri-macbook-line:before{content:"\\eee8"}.ri-magic-fill:before{content:"\\eee9"}.ri-magic-line:before{content:"\\eeea"}.ri-mail-add-fill:before{content:"\\eeeb"}.ri-mail-add-line:before{content:"\\eeec"}.ri-mail-check-fill:before{content:"\\eeed"}.ri-mail-check-line:before{content:"\\eeee"}.ri-mail-close-fill:before{content:"\\eeef"}.ri-mail-close-line:before{content:"\\eef0"}.ri-mail-download-fill:before{content:"\\eef1"}.ri-mail-download-line:before{content:"\\eef2"}.ri-mail-fill:before{content:"\\eef3"}.ri-mail-forbid-fill:before{content:"\\eef4"}.ri-mail-forbid-line:before{content:"\\eef5"}.ri-mail-line:before{content:"\\eef6"}.ri-mail-lock-fill:before{content:"\\eef7"}.ri-mail-lock-line:before{content:"\\eef8"}.ri-mail-open-fill:before{content:"\\eef9"}.ri-mail-open-line:before{content:"\\eefa"}.ri-mail-send-fill:before{content:"\\eefb"}.ri-mail-send-line:before{content:"\\eefc"}.ri-mail-settings-fill:before{content:"\\eefd"}.ri-mail-settings-line:before{content:"\\eefe"}.ri-mail-star-fill:before{content:"\\eeff"}.ri-mail-star-line:before{content:"\\ef00"}.ri-mail-unread-fill:before{content:"\\ef01"}.ri-mail-unread-line:before{content:"\\ef02"}.ri-mail-volume-fill:before{content:"\\ef03"}.ri-mail-volume-line:before{content:"\\ef04"}.ri-map-2-fill:before{content:"\\ef05"}.ri-map-2-line:before{content:"\\ef06"}.ri-map-fill:before{content:"\\ef07"}.ri-map-line:before{content:"\\ef08"}.ri-map-pin-2-fill:before{content:"\\ef09"}.ri-map-pin-2-line:before{content:"\\ef0a"}.ri-map-pin-3-fill:before{content:"\\ef0b"}.ri-map-pin-3-line:before{content:"\\ef0c"}.ri-map-pin-4-fill:before{content:"\\ef0d"}.ri-map-pin-4-line:before{content:"\\ef0e"}.ri-map-pin-5-fill:before{content:"\\ef0f"}.ri-map-pin-5-line:before{content:"\\ef10"}.ri-map-pin-add-fill:before{content:"\\ef11"}.ri-map-pin-add-line:before{content:"\\ef12"}.ri-map-pin-fill:before{content:"\\ef13"}.ri-map-pin-line:before{content:"\\ef14"}.ri-map-pin-range-fill:before{content:"\\ef15"}.ri-map-pin-range-line:before{content:"\\ef16"}.ri-map-pin-time-fill:before{content:"\\ef17"}.ri-map-pin-time-line:before{content:"\\ef18"}.ri-map-pin-user-fill:before{content:"\\ef19"}.ri-map-pin-user-line:before{content:"\\ef1a"}.ri-mark-pen-fill:before{content:"\\ef1b"}.ri-mark-pen-line:before{content:"\\ef1c"}.ri-markdown-fill:before{content:"\\ef1d"}.ri-markdown-line:before{content:"\\ef1e"}.ri-markup-fill:before{content:"\\ef1f"}.ri-markup-line:before{content:"\\ef20"}.ri-mastercard-fill:before{content:"\\ef21"}.ri-mastercard-line:before{content:"\\ef22"}.ri-mastodon-fill:before{content:"\\ef23"}.ri-mastodon-line:before{content:"\\ef24"}.ri-medal-2-fill:before{content:"\\ef25"}.ri-medal-2-line:before{content:"\\ef26"}.ri-medal-fill:before{content:"\\ef27"}.ri-medal-line:before{content:"\\ef28"}.ri-medicine-bottle-fill:before{content:"\\ef29"}.ri-medicine-bottle-line:before{content:"\\ef2a"}.ri-medium-fill:before{content:"\\ef2b"}.ri-medium-line:before{content:"\\ef2c"}.ri-men-fill:before{content:"\\ef2d"}.ri-men-line:before{content:"\\ef2e"}.ri-mental-health-fill:before{content:"\\ef2f"}.ri-mental-health-line:before{content:"\\ef30"}.ri-menu-2-fill:before{content:"\\ef31"}.ri-menu-2-line:before{content:"\\ef32"}.ri-menu-3-fill:before{content:"\\ef33"}.ri-menu-3-line:before{content:"\\ef34"}.ri-menu-4-fill:before{content:"\\ef35"}.ri-menu-4-line:before{content:"\\ef36"}.ri-menu-5-fill:before{content:"\\ef37"}.ri-menu-5-line:before{content:"\\ef38"}.ri-menu-add-fill:before{content:"\\ef39"}.ri-menu-add-line:before{content:"\\ef3a"}.ri-menu-fill:before{content:"\\ef3b"}.ri-menu-fold-fill:before{content:"\\ef3c"}.ri-menu-fold-line:before{content:"\\ef3d"}.ri-menu-line:before{content:"\\ef3e"}.ri-menu-unfold-fill:before{content:"\\ef3f"}.ri-menu-unfold-line:before{content:"\\ef40"}.ri-merge-cells-horizontal:before{content:"\\ef41"}.ri-merge-cells-vertical:before{content:"\\ef42"}.ri-message-2-fill:before{content:"\\ef43"}.ri-message-2-line:before{content:"\\ef44"}.ri-message-3-fill:before{content:"\\ef45"}.ri-message-3-line:before{content:"\\ef46"}.ri-message-fill:before{content:"\\ef47"}.ri-message-line:before{content:"\\ef48"}.ri-messenger-fill:before{content:"\\ef49"}.ri-messenger-line:before{content:"\\ef4a"}.ri-meteor-fill:before{content:"\\ef4b"}.ri-meteor-line:before{content:"\\ef4c"}.ri-mic-2-fill:before{content:"\\ef4d"}.ri-mic-2-line:before{content:"\\ef4e"}.ri-mic-fill:before{content:"\\ef4f"}.ri-mic-line:before{content:"\\ef50"}.ri-mic-off-fill:before{content:"\\ef51"}.ri-mic-off-line:before{content:"\\ef52"}.ri-mickey-fill:before{content:"\\ef53"}.ri-mickey-line:before{content:"\\ef54"}.ri-microscope-fill:before{content:"\\ef55"}.ri-microscope-line:before{content:"\\ef56"}.ri-microsoft-fill:before{content:"\\ef57"}.ri-microsoft-line:before{content:"\\ef58"}.ri-mind-map:before{content:"\\ef59"}.ri-mini-program-fill:before{content:"\\ef5a"}.ri-mini-program-line:before{content:"\\ef5b"}.ri-mist-fill:before{content:"\\ef5c"}.ri-mist-line:before{content:"\\ef5d"}.ri-money-cny-box-fill:before{content:"\\ef5e"}.ri-money-cny-box-line:before{content:"\\ef5f"}.ri-money-cny-circle-fill:before{content:"\\ef60"}.ri-money-cny-circle-line:before{content:"\\ef61"}.ri-money-dollar-box-fill:before{content:"\\ef62"}.ri-money-dollar-box-line:before{content:"\\ef63"}.ri-money-dollar-circle-fill:before{content:"\\ef64"}.ri-money-dollar-circle-line:before{content:"\\ef65"}.ri-money-euro-box-fill:before{content:"\\ef66"}.ri-money-euro-box-line:before{content:"\\ef67"}.ri-money-euro-circle-fill:before{content:"\\ef68"}.ri-money-euro-circle-line:before{content:"\\ef69"}.ri-money-pound-box-fill:before{content:"\\ef6a"}.ri-money-pound-box-line:before{content:"\\ef6b"}.ri-money-pound-circle-fill:before{content:"\\ef6c"}.ri-money-pound-circle-line:before{content:"\\ef6d"}.ri-moon-clear-fill:before{content:"\\ef6e"}.ri-moon-clear-line:before{content:"\\ef6f"}.ri-moon-cloudy-fill:before{content:"\\ef70"}.ri-moon-cloudy-line:before{content:"\\ef71"}.ri-moon-fill:before{content:"\\ef72"}.ri-moon-foggy-fill:before{content:"\\ef73"}.ri-moon-foggy-line:before{content:"\\ef74"}.ri-moon-line:before{content:"\\ef75"}.ri-more-2-fill:before{content:"\\ef76"}.ri-more-2-line:before{content:"\\ef77"}.ri-more-fill:before{content:"\\ef78"}.ri-more-line:before{content:"\\ef79"}.ri-motorbike-fill:before{content:"\\ef7a"}.ri-motorbike-line:before{content:"\\ef7b"}.ri-mouse-fill:before{content:"\\ef7c"}.ri-mouse-line:before{content:"\\ef7d"}.ri-movie-2-fill:before{content:"\\ef7e"}.ri-movie-2-line:before{content:"\\ef7f"}.ri-movie-fill:before{content:"\\ef80"}.ri-movie-line:before{content:"\\ef81"}.ri-music-2-fill:before{content:"\\ef82"}.ri-music-2-line:before{content:"\\ef83"}.ri-music-fill:before{content:"\\ef84"}.ri-music-line:before{content:"\\ef85"}.ri-mv-fill:before{content:"\\ef86"}.ri-mv-line:before{content:"\\ef87"}.ri-navigation-fill:before{content:"\\ef88"}.ri-navigation-line:before{content:"\\ef89"}.ri-netease-cloud-music-fill:before{content:"\\ef8a"}.ri-netease-cloud-music-line:before{content:"\\ef8b"}.ri-netflix-fill:before{content:"\\ef8c"}.ri-netflix-line:before{content:"\\ef8d"}.ri-newspaper-fill:before{content:"\\ef8e"}.ri-newspaper-line:before{content:"\\ef8f"}.ri-node-tree:before{content:"\\ef90"}.ri-notification-2-fill:before{content:"\\ef91"}.ri-notification-2-line:before{content:"\\ef92"}.ri-notification-3-fill:before{content:"\\ef93"}.ri-notification-3-line:before{content:"\\ef94"}.ri-notification-4-fill:before{content:"\\ef95"}.ri-notification-4-line:before{content:"\\ef96"}.ri-notification-badge-fill:before{content:"\\ef97"}.ri-notification-badge-line:before{content:"\\ef98"}.ri-notification-fill:before{content:"\\ef99"}.ri-notification-line:before{content:"\\ef9a"}.ri-notification-off-fill:before{content:"\\ef9b"}.ri-notification-off-line:before{content:"\\ef9c"}.ri-npmjs-fill:before{content:"\\ef9d"}.ri-npmjs-line:before{content:"\\ef9e"}.ri-number-0:before{content:"\\ef9f"}.ri-number-1:before{content:"\\efa0"}.ri-number-2:before{content:"\\efa1"}.ri-number-3:before{content:"\\efa2"}.ri-number-4:before{content:"\\efa3"}.ri-number-5:before{content:"\\efa4"}.ri-number-6:before{content:"\\efa5"}.ri-number-7:before{content:"\\efa6"}.ri-number-8:before{content:"\\efa7"}.ri-number-9:before{content:"\\efa8"}.ri-numbers-fill:before{content:"\\efa9"}.ri-numbers-line:before{content:"\\efaa"}.ri-nurse-fill:before{content:"\\efab"}.ri-nurse-line:before{content:"\\efac"}.ri-oil-fill:before{content:"\\efad"}.ri-oil-line:before{content:"\\efae"}.ri-omega:before{content:"\\efaf"}.ri-open-arm-fill:before{content:"\\efb0"}.ri-open-arm-line:before{content:"\\efb1"}.ri-open-source-fill:before{content:"\\efb2"}.ri-open-source-line:before{content:"\\efb3"}.ri-opera-fill:before{content:"\\efb4"}.ri-opera-line:before{content:"\\efb5"}.ri-order-play-fill:before{content:"\\efb6"}.ri-order-play-line:before{content:"\\efb7"}.ri-organization-chart:before{content:"\\efb8"}.ri-outlet-2-fill:before{content:"\\efb9"}.ri-outlet-2-line:before{content:"\\efba"}.ri-outlet-fill:before{content:"\\efbb"}.ri-outlet-line:before{content:"\\efbc"}.ri-page-separator:before{content:"\\efbd"}.ri-pages-fill:before{content:"\\efbe"}.ri-pages-line:before{content:"\\efbf"}.ri-paint-brush-fill:before{content:"\\efc0"}.ri-paint-brush-line:before{content:"\\efc1"}.ri-paint-fill:before{content:"\\efc2"}.ri-paint-line:before{content:"\\efc3"}.ri-palette-fill:before{content:"\\efc4"}.ri-palette-line:before{content:"\\efc5"}.ri-pantone-fill:before{content:"\\efc6"}.ri-pantone-line:before{content:"\\efc7"}.ri-paragraph:before{content:"\\efc8"}.ri-parent-fill:before{content:"\\efc9"}.ri-parent-line:before{content:"\\efca"}.ri-parentheses-fill:before{content:"\\efcb"}.ri-parentheses-line:before{content:"\\efcc"}.ri-parking-box-fill:before{content:"\\efcd"}.ri-parking-box-line:before{content:"\\efce"}.ri-parking-fill:before{content:"\\efcf"}.ri-parking-line:before{content:"\\efd0"}.ri-passport-fill:before{content:"\\efd1"}.ri-passport-line:before{content:"\\efd2"}.ri-patreon-fill:before{content:"\\efd3"}.ri-patreon-line:before{content:"\\efd4"}.ri-pause-circle-fill:before{content:"\\efd5"}.ri-pause-circle-line:before{content:"\\efd6"}.ri-pause-fill:before{content:"\\efd7"}.ri-pause-line:before{content:"\\efd8"}.ri-pause-mini-fill:before{content:"\\efd9"}.ri-pause-mini-line:before{content:"\\efda"}.ri-paypal-fill:before{content:"\\efdb"}.ri-paypal-line:before{content:"\\efdc"}.ri-pen-nib-fill:before{content:"\\efdd"}.ri-pen-nib-line:before{content:"\\efde"}.ri-pencil-fill:before{content:"\\efdf"}.ri-pencil-line:before{content:"\\efe0"}.ri-pencil-ruler-2-fill:before{content:"\\efe1"}.ri-pencil-ruler-2-line:before{content:"\\efe2"}.ri-pencil-ruler-fill:before{content:"\\efe3"}.ri-pencil-ruler-line:before{content:"\\efe4"}.ri-percent-fill:before{content:"\\efe5"}.ri-percent-line:before{content:"\\efe6"}.ri-phone-camera-fill:before{content:"\\efe7"}.ri-phone-camera-line:before{content:"\\efe8"}.ri-phone-fill:before{content:"\\efe9"}.ri-phone-find-fill:before{content:"\\efea"}.ri-phone-find-line:before{content:"\\efeb"}.ri-phone-line:before{content:"\\efec"}.ri-phone-lock-fill:before{content:"\\efed"}.ri-phone-lock-line:before{content:"\\efee"}.ri-picture-in-picture-2-fill:before{content:"\\efef"}.ri-picture-in-picture-2-line:before{content:"\\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\\eff1"}.ri-picture-in-picture-exit-line:before{content:"\\eff2"}.ri-picture-in-picture-fill:before{content:"\\eff3"}.ri-picture-in-picture-line:before{content:"\\eff4"}.ri-pie-chart-2-fill:before{content:"\\eff5"}.ri-pie-chart-2-line:before{content:"\\eff6"}.ri-pie-chart-box-fill:before{content:"\\eff7"}.ri-pie-chart-box-line:before{content:"\\eff8"}.ri-pie-chart-fill:before{content:"\\eff9"}.ri-pie-chart-line:before{content:"\\effa"}.ri-pin-distance-fill:before{content:"\\effb"}.ri-pin-distance-line:before{content:"\\effc"}.ri-ping-pong-fill:before{content:"\\effd"}.ri-ping-pong-line:before{content:"\\effe"}.ri-pinterest-fill:before{content:"\\efff"}.ri-pinterest-line:before{content:"\\f000"}.ri-pinyin-input:before{content:"\\f001"}.ri-pixelfed-fill:before{content:"\\f002"}.ri-pixelfed-line:before{content:"\\f003"}.ri-plane-fill:before{content:"\\f004"}.ri-plane-line:before{content:"\\f005"}.ri-plant-fill:before{content:"\\f006"}.ri-plant-line:before{content:"\\f007"}.ri-play-circle-fill:before{content:"\\f008"}.ri-play-circle-line:before{content:"\\f009"}.ri-play-fill:before{content:"\\f00a"}.ri-play-line:before{content:"\\f00b"}.ri-play-list-2-fill:before{content:"\\f00c"}.ri-play-list-2-line:before{content:"\\f00d"}.ri-play-list-add-fill:before{content:"\\f00e"}.ri-play-list-add-line:before{content:"\\f00f"}.ri-play-list-fill:before{content:"\\f010"}.ri-play-list-line:before{content:"\\f011"}.ri-play-mini-fill:before{content:"\\f012"}.ri-play-mini-line:before{content:"\\f013"}.ri-playstation-fill:before{content:"\\f014"}.ri-playstation-line:before{content:"\\f015"}.ri-plug-2-fill:before{content:"\\f016"}.ri-plug-2-line:before{content:"\\f017"}.ri-plug-fill:before{content:"\\f018"}.ri-plug-line:before{content:"\\f019"}.ri-polaroid-2-fill:before{content:"\\f01a"}.ri-polaroid-2-line:before{content:"\\f01b"}.ri-polaroid-fill:before{content:"\\f01c"}.ri-polaroid-line:before{content:"\\f01d"}.ri-police-car-fill:before{content:"\\f01e"}.ri-police-car-line:before{content:"\\f01f"}.ri-price-tag-2-fill:before{content:"\\f020"}.ri-price-tag-2-line:before{content:"\\f021"}.ri-price-tag-3-fill:before{content:"\\f022"}.ri-price-tag-3-line:before{content:"\\f023"}.ri-price-tag-fill:before{content:"\\f024"}.ri-price-tag-line:before{content:"\\f025"}.ri-printer-cloud-fill:before{content:"\\f026"}.ri-printer-cloud-line:before{content:"\\f027"}.ri-printer-fill:before{content:"\\f028"}.ri-printer-line:before{content:"\\f029"}.ri-product-hunt-fill:before{content:"\\f02a"}.ri-product-hunt-line:before{content:"\\f02b"}.ri-profile-fill:before{content:"\\f02c"}.ri-profile-line:before{content:"\\f02d"}.ri-projector-2-fill:before{content:"\\f02e"}.ri-projector-2-line:before{content:"\\f02f"}.ri-projector-fill:before{content:"\\f030"}.ri-projector-line:before{content:"\\f031"}.ri-psychotherapy-fill:before{content:"\\f032"}.ri-psychotherapy-line:before{content:"\\f033"}.ri-pulse-fill:before{content:"\\f034"}.ri-pulse-line:before{content:"\\f035"}.ri-pushpin-2-fill:before{content:"\\f036"}.ri-pushpin-2-line:before{content:"\\f037"}.ri-pushpin-fill:before{content:"\\f038"}.ri-pushpin-line:before{content:"\\f039"}.ri-qq-fill:before{content:"\\f03a"}.ri-qq-line:before{content:"\\f03b"}.ri-qr-code-fill:before{content:"\\f03c"}.ri-qr-code-line:before{content:"\\f03d"}.ri-qr-scan-2-fill:before{content:"\\f03e"}.ri-qr-scan-2-line:before{content:"\\f03f"}.ri-qr-scan-fill:before{content:"\\f040"}.ri-qr-scan-line:before{content:"\\f041"}.ri-question-answer-fill:before{content:"\\f042"}.ri-question-answer-line:before{content:"\\f043"}.ri-question-fill:before{content:"\\f044"}.ri-question-line:before{content:"\\f045"}.ri-question-mark:before{content:"\\f046"}.ri-questionnaire-fill:before{content:"\\f047"}.ri-questionnaire-line:before{content:"\\f048"}.ri-quill-pen-fill:before{content:"\\f049"}.ri-quill-pen-line:before{content:"\\f04a"}.ri-radar-fill:before{content:"\\f04b"}.ri-radar-line:before{content:"\\f04c"}.ri-radio-2-fill:before{content:"\\f04d"}.ri-radio-2-line:before{content:"\\f04e"}.ri-radio-button-fill:before{content:"\\f04f"}.ri-radio-button-line:before{content:"\\f050"}.ri-radio-fill:before{content:"\\f051"}.ri-radio-line:before{content:"\\f052"}.ri-rainbow-fill:before{content:"\\f053"}.ri-rainbow-line:before{content:"\\f054"}.ri-rainy-fill:before{content:"\\f055"}.ri-rainy-line:before{content:"\\f056"}.ri-reactjs-fill:before{content:"\\f057"}.ri-reactjs-line:before{content:"\\f058"}.ri-record-circle-fill:before{content:"\\f059"}.ri-record-circle-line:before{content:"\\f05a"}.ri-record-mail-fill:before{content:"\\f05b"}.ri-record-mail-line:before{content:"\\f05c"}.ri-recycle-fill:before{content:"\\f05d"}.ri-recycle-line:before{content:"\\f05e"}.ri-red-packet-fill:before{content:"\\f05f"}.ri-red-packet-line:before{content:"\\f060"}.ri-reddit-fill:before{content:"\\f061"}.ri-reddit-line:before{content:"\\f062"}.ri-refresh-fill:before{content:"\\f063"}.ri-refresh-line:before{content:"\\f064"}.ri-refund-2-fill:before{content:"\\f065"}.ri-refund-2-line:before{content:"\\f066"}.ri-refund-fill:before{content:"\\f067"}.ri-refund-line:before{content:"\\f068"}.ri-registered-fill:before{content:"\\f069"}.ri-registered-line:before{content:"\\f06a"}.ri-remixicon-fill:before{content:"\\f06b"}.ri-remixicon-line:before{content:"\\f06c"}.ri-remote-control-2-fill:before{content:"\\f06d"}.ri-remote-control-2-line:before{content:"\\f06e"}.ri-remote-control-fill:before{content:"\\f06f"}.ri-remote-control-line:before{content:"\\f070"}.ri-repeat-2-fill:before{content:"\\f071"}.ri-repeat-2-line:before{content:"\\f072"}.ri-repeat-fill:before{content:"\\f073"}.ri-repeat-line:before{content:"\\f074"}.ri-repeat-one-fill:before{content:"\\f075"}.ri-repeat-one-line:before{content:"\\f076"}.ri-reply-all-fill:before{content:"\\f077"}.ri-reply-all-line:before{content:"\\f078"}.ri-reply-fill:before{content:"\\f079"}.ri-reply-line:before{content:"\\f07a"}.ri-reserved-fill:before{content:"\\f07b"}.ri-reserved-line:before{content:"\\f07c"}.ri-rest-time-fill:before{content:"\\f07d"}.ri-rest-time-line:before{content:"\\f07e"}.ri-restart-fill:before{content:"\\f07f"}.ri-restart-line:before{content:"\\f080"}.ri-restaurant-2-fill:before{content:"\\f081"}.ri-restaurant-2-line:before{content:"\\f082"}.ri-restaurant-fill:before{content:"\\f083"}.ri-restaurant-line:before{content:"\\f084"}.ri-rewind-fill:before{content:"\\f085"}.ri-rewind-line:before{content:"\\f086"}.ri-rewind-mini-fill:before{content:"\\f087"}.ri-rewind-mini-line:before{content:"\\f088"}.ri-rhythm-fill:before{content:"\\f089"}.ri-rhythm-line:before{content:"\\f08a"}.ri-riding-fill:before{content:"\\f08b"}.ri-riding-line:before{content:"\\f08c"}.ri-road-map-fill:before{content:"\\f08d"}.ri-road-map-line:before{content:"\\f08e"}.ri-roadster-fill:before{content:"\\f08f"}.ri-roadster-line:before{content:"\\f090"}.ri-robot-fill:before{content:"\\f091"}.ri-robot-line:before{content:"\\f092"}.ri-rocket-2-fill:before{content:"\\f093"}.ri-rocket-2-line:before{content:"\\f094"}.ri-rocket-fill:before{content:"\\f095"}.ri-rocket-line:before{content:"\\f096"}.ri-rotate-lock-fill:before{content:"\\f097"}.ri-rotate-lock-line:before{content:"\\f098"}.ri-rounded-corner:before{content:"\\f099"}.ri-route-fill:before{content:"\\f09a"}.ri-route-line:before{content:"\\f09b"}.ri-router-fill:before{content:"\\f09c"}.ri-router-line:before{content:"\\f09d"}.ri-rss-fill:before{content:"\\f09e"}.ri-rss-line:before{content:"\\f09f"}.ri-ruler-2-fill:before{content:"\\f0a0"}.ri-ruler-2-line:before{content:"\\f0a1"}.ri-ruler-fill:before{content:"\\f0a2"}.ri-ruler-line:before{content:"\\f0a3"}.ri-run-fill:before{content:"\\f0a4"}.ri-run-line:before{content:"\\f0a5"}.ri-safari-fill:before{content:"\\f0a6"}.ri-safari-line:before{content:"\\f0a7"}.ri-safe-2-fill:before{content:"\\f0a8"}.ri-safe-2-line:before{content:"\\f0a9"}.ri-safe-fill:before{content:"\\f0aa"}.ri-safe-line:before{content:"\\f0ab"}.ri-sailboat-fill:before{content:"\\f0ac"}.ri-sailboat-line:before{content:"\\f0ad"}.ri-save-2-fill:before{content:"\\f0ae"}.ri-save-2-line:before{content:"\\f0af"}.ri-save-3-fill:before{content:"\\f0b0"}.ri-save-3-line:before{content:"\\f0b1"}.ri-save-fill:before{content:"\\f0b2"}.ri-save-line:before{content:"\\f0b3"}.ri-scales-2-fill:before{content:"\\f0b4"}.ri-scales-2-line:before{content:"\\f0b5"}.ri-scales-3-fill:before{content:"\\f0b6"}.ri-scales-3-line:before{content:"\\f0b7"}.ri-scales-fill:before{content:"\\f0b8"}.ri-scales-line:before{content:"\\f0b9"}.ri-scan-2-fill:before{content:"\\f0ba"}.ri-scan-2-line:before{content:"\\f0bb"}.ri-scan-fill:before{content:"\\f0bc"}.ri-scan-line:before{content:"\\f0bd"}.ri-scissors-2-fill:before{content:"\\f0be"}.ri-scissors-2-line:before{content:"\\f0bf"}.ri-scissors-cut-fill:before{content:"\\f0c0"}.ri-scissors-cut-line:before{content:"\\f0c1"}.ri-scissors-fill:before{content:"\\f0c2"}.ri-scissors-line:before{content:"\\f0c3"}.ri-screenshot-2-fill:before{content:"\\f0c4"}.ri-screenshot-2-line:before{content:"\\f0c5"}.ri-screenshot-fill:before{content:"\\f0c6"}.ri-screenshot-line:before{content:"\\f0c7"}.ri-sd-card-fill:before{content:"\\f0c8"}.ri-sd-card-line:before{content:"\\f0c9"}.ri-sd-card-mini-fill:before{content:"\\f0ca"}.ri-sd-card-mini-line:before{content:"\\f0cb"}.ri-search-2-fill:before{content:"\\f0cc"}.ri-search-2-line:before{content:"\\f0cd"}.ri-search-eye-fill:before{content:"\\f0ce"}.ri-search-eye-line:before{content:"\\f0cf"}.ri-search-fill:before{content:"\\f0d0"}.ri-search-line:before{content:"\\f0d1"}.ri-secure-payment-fill:before{content:"\\f0d2"}.ri-secure-payment-line:before{content:"\\f0d3"}.ri-seedling-fill:before{content:"\\f0d4"}.ri-seedling-line:before{content:"\\f0d5"}.ri-send-backward:before{content:"\\f0d6"}.ri-send-plane-2-fill:before{content:"\\f0d7"}.ri-send-plane-2-line:before{content:"\\f0d8"}.ri-send-plane-fill:before{content:"\\f0d9"}.ri-send-plane-line:before{content:"\\f0da"}.ri-send-to-back:before{content:"\\f0db"}.ri-sensor-fill:before{content:"\\f0dc"}.ri-sensor-line:before{content:"\\f0dd"}.ri-separator:before{content:"\\f0de"}.ri-server-fill:before{content:"\\f0df"}.ri-server-line:before{content:"\\f0e0"}.ri-service-fill:before{content:"\\f0e1"}.ri-service-line:before{content:"\\f0e2"}.ri-settings-2-fill:before{content:"\\f0e3"}.ri-settings-2-line:before{content:"\\f0e4"}.ri-settings-3-fill:before{content:"\\f0e5"}.ri-settings-3-line:before{content:"\\f0e6"}.ri-settings-4-fill:before{content:"\\f0e7"}.ri-settings-4-line:before{content:"\\f0e8"}.ri-settings-5-fill:before{content:"\\f0e9"}.ri-settings-5-line:before{content:"\\f0ea"}.ri-settings-6-fill:before{content:"\\f0eb"}.ri-settings-6-line:before{content:"\\f0ec"}.ri-settings-fill:before{content:"\\f0ed"}.ri-settings-line:before{content:"\\f0ee"}.ri-shape-2-fill:before{content:"\\f0ef"}.ri-shape-2-line:before{content:"\\f0f0"}.ri-shape-fill:before{content:"\\f0f1"}.ri-shape-line:before{content:"\\f0f2"}.ri-share-box-fill:before{content:"\\f0f3"}.ri-share-box-line:before{content:"\\f0f4"}.ri-share-circle-fill:before{content:"\\f0f5"}.ri-share-circle-line:before{content:"\\f0f6"}.ri-share-fill:before{content:"\\f0f7"}.ri-share-forward-2-fill:before{content:"\\f0f8"}.ri-share-forward-2-line:before{content:"\\f0f9"}.ri-share-forward-box-fill:before{content:"\\f0fa"}.ri-share-forward-box-line:before{content:"\\f0fb"}.ri-share-forward-fill:before{content:"\\f0fc"}.ri-share-forward-line:before{content:"\\f0fd"}.ri-share-line:before{content:"\\f0fe"}.ri-shield-check-fill:before{content:"\\f0ff"}.ri-shield-check-line:before{content:"\\f100"}.ri-shield-cross-fill:before{content:"\\f101"}.ri-shield-cross-line:before{content:"\\f102"}.ri-shield-fill:before{content:"\\f103"}.ri-shield-flash-fill:before{content:"\\f104"}.ri-shield-flash-line:before{content:"\\f105"}.ri-shield-keyhole-fill:before{content:"\\f106"}.ri-shield-keyhole-line:before{content:"\\f107"}.ri-shield-line:before{content:"\\f108"}.ri-shield-star-fill:before{content:"\\f109"}.ri-shield-star-line:before{content:"\\f10a"}.ri-shield-user-fill:before{content:"\\f10b"}.ri-shield-user-line:before{content:"\\f10c"}.ri-ship-2-fill:before{content:"\\f10d"}.ri-ship-2-line:before{content:"\\f10e"}.ri-ship-fill:before{content:"\\f10f"}.ri-ship-line:before{content:"\\f110"}.ri-shirt-fill:before{content:"\\f111"}.ri-shirt-line:before{content:"\\f112"}.ri-shopping-bag-2-fill:before{content:"\\f113"}.ri-shopping-bag-2-line:before{content:"\\f114"}.ri-shopping-bag-3-fill:before{content:"\\f115"}.ri-shopping-bag-3-line:before{content:"\\f116"}.ri-shopping-bag-fill:before{content:"\\f117"}.ri-shopping-bag-line:before{content:"\\f118"}.ri-shopping-basket-2-fill:before{content:"\\f119"}.ri-shopping-basket-2-line:before{content:"\\f11a"}.ri-shopping-basket-fill:before{content:"\\f11b"}.ri-shopping-basket-line:before{content:"\\f11c"}.ri-shopping-cart-2-fill:before{content:"\\f11d"}.ri-shopping-cart-2-line:before{content:"\\f11e"}.ri-shopping-cart-fill:before{content:"\\f11f"}.ri-shopping-cart-line:before{content:"\\f120"}.ri-showers-fill:before{content:"\\f121"}.ri-showers-line:before{content:"\\f122"}.ri-shuffle-fill:before{content:"\\f123"}.ri-shuffle-line:before{content:"\\f124"}.ri-shut-down-fill:before{content:"\\f125"}.ri-shut-down-line:before{content:"\\f126"}.ri-side-bar-fill:before{content:"\\f127"}.ri-side-bar-line:before{content:"\\f128"}.ri-signal-tower-fill:before{content:"\\f129"}.ri-signal-tower-line:before{content:"\\f12a"}.ri-signal-wifi-1-fill:before{content:"\\f12b"}.ri-signal-wifi-1-line:before{content:"\\f12c"}.ri-signal-wifi-2-fill:before{content:"\\f12d"}.ri-signal-wifi-2-line:before{content:"\\f12e"}.ri-signal-wifi-3-fill:before{content:"\\f12f"}.ri-signal-wifi-3-line:before{content:"\\f130"}.ri-signal-wifi-error-fill:before{content:"\\f131"}.ri-signal-wifi-error-line:before{content:"\\f132"}.ri-signal-wifi-fill:before{content:"\\f133"}.ri-signal-wifi-line:before{content:"\\f134"}.ri-signal-wifi-off-fill:before{content:"\\f135"}.ri-signal-wifi-off-line:before{content:"\\f136"}.ri-sim-card-2-fill:before{content:"\\f137"}.ri-sim-card-2-line:before{content:"\\f138"}.ri-sim-card-fill:before{content:"\\f139"}.ri-sim-card-line:before{content:"\\f13a"}.ri-single-quotes-l:before{content:"\\f13b"}.ri-single-quotes-r:before{content:"\\f13c"}.ri-sip-fill:before{content:"\\f13d"}.ri-sip-line:before{content:"\\f13e"}.ri-skip-back-fill:before{content:"\\f13f"}.ri-skip-back-line:before{content:"\\f140"}.ri-skip-back-mini-fill:before{content:"\\f141"}.ri-skip-back-mini-line:before{content:"\\f142"}.ri-skip-forward-fill:before{content:"\\f143"}.ri-skip-forward-line:before{content:"\\f144"}.ri-skip-forward-mini-fill:before{content:"\\f145"}.ri-skip-forward-mini-line:before{content:"\\f146"}.ri-skull-2-fill:before{content:"\\f147"}.ri-skull-2-line:before{content:"\\f148"}.ri-skull-fill:before{content:"\\f149"}.ri-skull-line:before{content:"\\f14a"}.ri-skype-fill:before{content:"\\f14b"}.ri-skype-line:before{content:"\\f14c"}.ri-slack-fill:before{content:"\\f14d"}.ri-slack-line:before{content:"\\f14e"}.ri-slice-fill:before{content:"\\f14f"}.ri-slice-line:before{content:"\\f150"}.ri-slideshow-2-fill:before{content:"\\f151"}.ri-slideshow-2-line:before{content:"\\f152"}.ri-slideshow-3-fill:before{content:"\\f153"}.ri-slideshow-3-line:before{content:"\\f154"}.ri-slideshow-4-fill:before{content:"\\f155"}.ri-slideshow-4-line:before{content:"\\f156"}.ri-slideshow-fill:before{content:"\\f157"}.ri-slideshow-line:before{content:"\\f158"}.ri-smartphone-fill:before{content:"\\f159"}.ri-smartphone-line:before{content:"\\f15a"}.ri-snapchat-fill:before{content:"\\f15b"}.ri-snapchat-line:before{content:"\\f15c"}.ri-snowy-fill:before{content:"\\f15d"}.ri-snowy-line:before{content:"\\f15e"}.ri-sort-asc:before{content:"\\f15f"}.ri-sort-desc:before{content:"\\f160"}.ri-sound-module-fill:before{content:"\\f161"}.ri-sound-module-line:before{content:"\\f162"}.ri-soundcloud-fill:before{content:"\\f163"}.ri-soundcloud-line:before{content:"\\f164"}.ri-space-ship-fill:before{content:"\\f165"}.ri-space-ship-line:before{content:"\\f166"}.ri-space:before{content:"\\f167"}.ri-spam-2-fill:before{content:"\\f168"}.ri-spam-2-line:before{content:"\\f169"}.ri-spam-3-fill:before{content:"\\f16a"}.ri-spam-3-line:before{content:"\\f16b"}.ri-spam-fill:before{content:"\\f16c"}.ri-spam-line:before{content:"\\f16d"}.ri-speaker-2-fill:before{content:"\\f16e"}.ri-speaker-2-line:before{content:"\\f16f"}.ri-speaker-3-fill:before{content:"\\f170"}.ri-speaker-3-line:before{content:"\\f171"}.ri-speaker-fill:before{content:"\\f172"}.ri-speaker-line:before{content:"\\f173"}.ri-spectrum-fill:before{content:"\\f174"}.ri-spectrum-line:before{content:"\\f175"}.ri-speed-fill:before{content:"\\f176"}.ri-speed-line:before{content:"\\f177"}.ri-speed-mini-fill:before{content:"\\f178"}.ri-speed-mini-line:before{content:"\\f179"}.ri-split-cells-horizontal:before{content:"\\f17a"}.ri-split-cells-vertical:before{content:"\\f17b"}.ri-spotify-fill:before{content:"\\f17c"}.ri-spotify-line:before{content:"\\f17d"}.ri-spy-fill:before{content:"\\f17e"}.ri-spy-line:before{content:"\\f17f"}.ri-stack-fill:before{content:"\\f180"}.ri-stack-line:before{content:"\\f181"}.ri-stack-overflow-fill:before{content:"\\f182"}.ri-stack-overflow-line:before{content:"\\f183"}.ri-stackshare-fill:before{content:"\\f184"}.ri-stackshare-line:before{content:"\\f185"}.ri-star-fill:before{content:"\\f186"}.ri-star-half-fill:before{content:"\\f187"}.ri-star-half-line:before{content:"\\f188"}.ri-star-half-s-fill:before{content:"\\f189"}.ri-star-half-s-line:before{content:"\\f18a"}.ri-star-line:before{content:"\\f18b"}.ri-star-s-fill:before{content:"\\f18c"}.ri-star-s-line:before{content:"\\f18d"}.ri-star-smile-fill:before{content:"\\f18e"}.ri-star-smile-line:before{content:"\\f18f"}.ri-steam-fill:before{content:"\\f190"}.ri-steam-line:before{content:"\\f191"}.ri-steering-2-fill:before{content:"\\f192"}.ri-steering-2-line:before{content:"\\f193"}.ri-steering-fill:before{content:"\\f194"}.ri-steering-line:before{content:"\\f195"}.ri-stethoscope-fill:before{content:"\\f196"}.ri-stethoscope-line:before{content:"\\f197"}.ri-sticky-note-2-fill:before{content:"\\f198"}.ri-sticky-note-2-line:before{content:"\\f199"}.ri-sticky-note-fill:before{content:"\\f19a"}.ri-sticky-note-line:before{content:"\\f19b"}.ri-stock-fill:before{content:"\\f19c"}.ri-stock-line:before{content:"\\f19d"}.ri-stop-circle-fill:before{content:"\\f19e"}.ri-stop-circle-line:before{content:"\\f19f"}.ri-stop-fill:before{content:"\\f1a0"}.ri-stop-line:before{content:"\\f1a1"}.ri-stop-mini-fill:before{content:"\\f1a2"}.ri-stop-mini-line:before{content:"\\f1a3"}.ri-store-2-fill:before{content:"\\f1a4"}.ri-store-2-line:before{content:"\\f1a5"}.ri-store-3-fill:before{content:"\\f1a6"}.ri-store-3-line:before{content:"\\f1a7"}.ri-store-fill:before{content:"\\f1a8"}.ri-store-line:before{content:"\\f1a9"}.ri-strikethrough-2:before{content:"\\f1aa"}.ri-strikethrough:before{content:"\\f1ab"}.ri-subscript-2:before{content:"\\f1ac"}.ri-subscript:before{content:"\\f1ad"}.ri-subtract-fill:before{content:"\\f1ae"}.ri-subtract-line:before{content:"\\f1af"}.ri-subway-fill:before{content:"\\f1b0"}.ri-subway-line:before{content:"\\f1b1"}.ri-subway-wifi-fill:before{content:"\\f1b2"}.ri-subway-wifi-line:before{content:"\\f1b3"}.ri-suitcase-2-fill:before{content:"\\f1b4"}.ri-suitcase-2-line:before{content:"\\f1b5"}.ri-suitcase-3-fill:before{content:"\\f1b6"}.ri-suitcase-3-line:before{content:"\\f1b7"}.ri-suitcase-fill:before{content:"\\f1b8"}.ri-suitcase-line:before{content:"\\f1b9"}.ri-sun-cloudy-fill:before{content:"\\f1ba"}.ri-sun-cloudy-line:before{content:"\\f1bb"}.ri-sun-fill:before{content:"\\f1bc"}.ri-sun-foggy-fill:before{content:"\\f1bd"}.ri-sun-foggy-line:before{content:"\\f1be"}.ri-sun-line:before{content:"\\f1bf"}.ri-superscript-2:before{content:"\\f1c0"}.ri-superscript:before{content:"\\f1c1"}.ri-surgical-mask-fill:before{content:"\\f1c2"}.ri-surgical-mask-line:before{content:"\\f1c3"}.ri-surround-sound-fill:before{content:"\\f1c4"}.ri-surround-sound-line:before{content:"\\f1c5"}.ri-survey-fill:before{content:"\\f1c6"}.ri-survey-line:before{content:"\\f1c7"}.ri-swap-box-fill:before{content:"\\f1c8"}.ri-swap-box-line:before{content:"\\f1c9"}.ri-swap-fill:before{content:"\\f1ca"}.ri-swap-line:before{content:"\\f1cb"}.ri-switch-fill:before{content:"\\f1cc"}.ri-switch-line:before{content:"\\f1cd"}.ri-sword-fill:before{content:"\\f1ce"}.ri-sword-line:before{content:"\\f1cf"}.ri-syringe-fill:before{content:"\\f1d0"}.ri-syringe-line:before{content:"\\f1d1"}.ri-t-box-fill:before{content:"\\f1d2"}.ri-t-box-line:before{content:"\\f1d3"}.ri-t-shirt-2-fill:before{content:"\\f1d4"}.ri-t-shirt-2-line:before{content:"\\f1d5"}.ri-t-shirt-air-fill:before{content:"\\f1d6"}.ri-t-shirt-air-line:before{content:"\\f1d7"}.ri-t-shirt-fill:before{content:"\\f1d8"}.ri-t-shirt-line:before{content:"\\f1d9"}.ri-table-2:before{content:"\\f1da"}.ri-table-alt-fill:before{content:"\\f1db"}.ri-table-alt-line:before{content:"\\f1dc"}.ri-table-fill:before{content:"\\f1dd"}.ri-table-line:before{content:"\\f1de"}.ri-tablet-fill:before{content:"\\f1df"}.ri-tablet-line:before{content:"\\f1e0"}.ri-takeaway-fill:before{content:"\\f1e1"}.ri-takeaway-line:before{content:"\\f1e2"}.ri-taobao-fill:before{content:"\\f1e3"}.ri-taobao-line:before{content:"\\f1e4"}.ri-tape-fill:before{content:"\\f1e5"}.ri-tape-line:before{content:"\\f1e6"}.ri-task-fill:before{content:"\\f1e7"}.ri-task-line:before{content:"\\f1e8"}.ri-taxi-fill:before{content:"\\f1e9"}.ri-taxi-line:before{content:"\\f1ea"}.ri-taxi-wifi-fill:before{content:"\\f1eb"}.ri-taxi-wifi-line:before{content:"\\f1ec"}.ri-team-fill:before{content:"\\f1ed"}.ri-team-line:before{content:"\\f1ee"}.ri-telegram-fill:before{content:"\\f1ef"}.ri-telegram-line:before{content:"\\f1f0"}.ri-temp-cold-fill:before{content:"\\f1f1"}.ri-temp-cold-line:before{content:"\\f1f2"}.ri-temp-hot-fill:before{content:"\\f1f3"}.ri-temp-hot-line:before{content:"\\f1f4"}.ri-terminal-box-fill:before{content:"\\f1f5"}.ri-terminal-box-line:before{content:"\\f1f6"}.ri-terminal-fill:before{content:"\\f1f7"}.ri-terminal-line:before{content:"\\f1f8"}.ri-terminal-window-fill:before{content:"\\f1f9"}.ri-terminal-window-line:before{content:"\\f1fa"}.ri-test-tube-fill:before{content:"\\f1fb"}.ri-test-tube-line:before{content:"\\f1fc"}.ri-text-direction-l:before{content:"\\f1fd"}.ri-text-direction-r:before{content:"\\f1fe"}.ri-text-spacing:before{content:"\\f1ff"}.ri-text-wrap:before{content:"\\f200"}.ri-text:before{content:"\\f201"}.ri-thermometer-fill:before{content:"\\f202"}.ri-thermometer-line:before{content:"\\f203"}.ri-thumb-down-fill:before{content:"\\f204"}.ri-thumb-down-line:before{content:"\\f205"}.ri-thumb-up-fill:before{content:"\\f206"}.ri-thumb-up-line:before{content:"\\f207"}.ri-thunderstorms-fill:before{content:"\\f208"}.ri-thunderstorms-line:before{content:"\\f209"}.ri-ticket-2-fill:before{content:"\\f20a"}.ri-ticket-2-line:before{content:"\\f20b"}.ri-ticket-fill:before{content:"\\f20c"}.ri-ticket-line:before{content:"\\f20d"}.ri-time-fill:before{content:"\\f20e"}.ri-time-line:before{content:"\\f20f"}.ri-timer-2-fill:before{content:"\\f210"}.ri-timer-2-line:before{content:"\\f211"}.ri-timer-fill:before{content:"\\f212"}.ri-timer-flash-fill:before{content:"\\f213"}.ri-timer-flash-line:before{content:"\\f214"}.ri-timer-line:before{content:"\\f215"}.ri-todo-fill:before{content:"\\f216"}.ri-todo-line:before{content:"\\f217"}.ri-toggle-fill:before{content:"\\f218"}.ri-toggle-line:before{content:"\\f219"}.ri-tools-fill:before{content:"\\f21a"}.ri-tools-line:before{content:"\\f21b"}.ri-tornado-fill:before{content:"\\f21c"}.ri-tornado-line:before{content:"\\f21d"}.ri-trademark-fill:before{content:"\\f21e"}.ri-trademark-line:before{content:"\\f21f"}.ri-traffic-light-fill:before{content:"\\f220"}.ri-traffic-light-line:before{content:"\\f221"}.ri-train-fill:before{content:"\\f222"}.ri-train-line:before{content:"\\f223"}.ri-train-wifi-fill:before{content:"\\f224"}.ri-train-wifi-line:before{content:"\\f225"}.ri-translate-2:before{content:"\\f226"}.ri-translate:before{content:"\\f227"}.ri-travesti-fill:before{content:"\\f228"}.ri-travesti-line:before{content:"\\f229"}.ri-treasure-map-fill:before{content:"\\f22a"}.ri-treasure-map-line:before{content:"\\f22b"}.ri-trello-fill:before{content:"\\f22c"}.ri-trello-line:before{content:"\\f22d"}.ri-trophy-fill:before{content:"\\f22e"}.ri-trophy-line:before{content:"\\f22f"}.ri-truck-fill:before{content:"\\f230"}.ri-truck-line:before{content:"\\f231"}.ri-tumblr-fill:before{content:"\\f232"}.ri-tumblr-line:before{content:"\\f233"}.ri-tv-2-fill:before{content:"\\f234"}.ri-tv-2-line:before{content:"\\f235"}.ri-tv-fill:before{content:"\\f236"}.ri-tv-line:before{content:"\\f237"}.ri-twitch-fill:before{content:"\\f238"}.ri-twitch-line:before{content:"\\f239"}.ri-twitter-fill:before{content:"\\f23a"}.ri-twitter-line:before{content:"\\f23b"}.ri-typhoon-fill:before{content:"\\f23c"}.ri-typhoon-line:before{content:"\\f23d"}.ri-u-disk-fill:before{content:"\\f23e"}.ri-u-disk-line:before{content:"\\f23f"}.ri-ubuntu-fill:before{content:"\\f240"}.ri-ubuntu-line:before{content:"\\f241"}.ri-umbrella-fill:before{content:"\\f242"}.ri-umbrella-line:before{content:"\\f243"}.ri-underline:before{content:"\\f244"}.ri-uninstall-fill:before{content:"\\f245"}.ri-uninstall-line:before{content:"\\f246"}.ri-unsplash-fill:before{content:"\\f247"}.ri-unsplash-line:before{content:"\\f248"}.ri-upload-2-fill:before{content:"\\f249"}.ri-upload-2-line:before{content:"\\f24a"}.ri-upload-cloud-2-fill:before{content:"\\f24b"}.ri-upload-cloud-2-line:before{content:"\\f24c"}.ri-upload-cloud-fill:before{content:"\\f24d"}.ri-upload-cloud-line:before{content:"\\f24e"}.ri-upload-fill:before{content:"\\f24f"}.ri-upload-line:before{content:"\\f250"}.ri-usb-fill:before{content:"\\f251"}.ri-usb-line:before{content:"\\f252"}.ri-user-2-fill:before{content:"\\f253"}.ri-user-2-line:before{content:"\\f254"}.ri-user-3-fill:before{content:"\\f255"}.ri-user-3-line:before{content:"\\f256"}.ri-user-4-fill:before{content:"\\f257"}.ri-user-4-line:before{content:"\\f258"}.ri-user-5-fill:before{content:"\\f259"}.ri-user-5-line:before{content:"\\f25a"}.ri-user-6-fill:before{content:"\\f25b"}.ri-user-6-line:before{content:"\\f25c"}.ri-user-add-fill:before{content:"\\f25d"}.ri-user-add-line:before{content:"\\f25e"}.ri-user-fill:before{content:"\\f25f"}.ri-user-follow-fill:before{content:"\\f260"}.ri-user-follow-line:before{content:"\\f261"}.ri-user-heart-fill:before{content:"\\f262"}.ri-user-heart-line:before{content:"\\f263"}.ri-user-line:before{content:"\\f264"}.ri-user-location-fill:before{content:"\\f265"}.ri-user-location-line:before{content:"\\f266"}.ri-user-received-2-fill:before{content:"\\f267"}.ri-user-received-2-line:before{content:"\\f268"}.ri-user-received-fill:before{content:"\\f269"}.ri-user-received-line:before{content:"\\f26a"}.ri-user-search-fill:before{content:"\\f26b"}.ri-user-search-line:before{content:"\\f26c"}.ri-user-settings-fill:before{content:"\\f26d"}.ri-user-settings-line:before{content:"\\f26e"}.ri-user-shared-2-fill:before{content:"\\f26f"}.ri-user-shared-2-line:before{content:"\\f270"}.ri-user-shared-fill:before{content:"\\f271"}.ri-user-shared-line:before{content:"\\f272"}.ri-user-smile-fill:before{content:"\\f273"}.ri-user-smile-line:before{content:"\\f274"}.ri-user-star-fill:before{content:"\\f275"}.ri-user-star-line:before{content:"\\f276"}.ri-user-unfollow-fill:before{content:"\\f277"}.ri-user-unfollow-line:before{content:"\\f278"}.ri-user-voice-fill:before{content:"\\f279"}.ri-user-voice-line:before{content:"\\f27a"}.ri-video-add-fill:before{content:"\\f27b"}.ri-video-add-line:before{content:"\\f27c"}.ri-video-chat-fill:before{content:"\\f27d"}.ri-video-chat-line:before{content:"\\f27e"}.ri-video-download-fill:before{content:"\\f27f"}.ri-video-download-line:before{content:"\\f280"}.ri-video-fill:before{content:"\\f281"}.ri-video-line:before{content:"\\f282"}.ri-video-upload-fill:before{content:"\\f283"}.ri-video-upload-line:before{content:"\\f284"}.ri-vidicon-2-fill:before{content:"\\f285"}.ri-vidicon-2-line:before{content:"\\f286"}.ri-vidicon-fill:before{content:"\\f287"}.ri-vidicon-line:before{content:"\\f288"}.ri-vimeo-fill:before{content:"\\f289"}.ri-vimeo-line:before{content:"\\f28a"}.ri-vip-crown-2-fill:before{content:"\\f28b"}.ri-vip-crown-2-line:before{content:"\\f28c"}.ri-vip-crown-fill:before{content:"\\f28d"}.ri-vip-crown-line:before{content:"\\f28e"}.ri-vip-diamond-fill:before{content:"\\f28f"}.ri-vip-diamond-line:before{content:"\\f290"}.ri-vip-fill:before{content:"\\f291"}.ri-vip-line:before{content:"\\f292"}.ri-virus-fill:before{content:"\\f293"}.ri-virus-line:before{content:"\\f294"}.ri-visa-fill:before{content:"\\f295"}.ri-visa-line:before{content:"\\f296"}.ri-voice-recognition-fill:before{content:"\\f297"}.ri-voice-recognition-line:before{content:"\\f298"}.ri-voiceprint-fill:before{content:"\\f299"}.ri-voiceprint-line:before{content:"\\f29a"}.ri-volume-down-fill:before{content:"\\f29b"}.ri-volume-down-line:before{content:"\\f29c"}.ri-volume-mute-fill:before{content:"\\f29d"}.ri-volume-mute-line:before{content:"\\f29e"}.ri-volume-off-vibrate-fill:before{content:"\\f29f"}.ri-volume-off-vibrate-line:before{content:"\\f2a0"}.ri-volume-up-fill:before{content:"\\f2a1"}.ri-volume-up-line:before{content:"\\f2a2"}.ri-volume-vibrate-fill:before{content:"\\f2a3"}.ri-volume-vibrate-line:before{content:"\\f2a4"}.ri-vuejs-fill:before{content:"\\f2a5"}.ri-vuejs-line:before{content:"\\f2a6"}.ri-walk-fill:before{content:"\\f2a7"}.ri-walk-line:before{content:"\\f2a8"}.ri-wallet-2-fill:before{content:"\\f2a9"}.ri-wallet-2-line:before{content:"\\f2aa"}.ri-wallet-3-fill:before{content:"\\f2ab"}.ri-wallet-3-line:before{content:"\\f2ac"}.ri-wallet-fill:before{content:"\\f2ad"}.ri-wallet-line:before{content:"\\f2ae"}.ri-water-flash-fill:before{content:"\\f2af"}.ri-water-flash-line:before{content:"\\f2b0"}.ri-webcam-fill:before{content:"\\f2b1"}.ri-webcam-line:before{content:"\\f2b2"}.ri-wechat-2-fill:before{content:"\\f2b3"}.ri-wechat-2-line:before{content:"\\f2b4"}.ri-wechat-fill:before{content:"\\f2b5"}.ri-wechat-line:before{content:"\\f2b6"}.ri-wechat-pay-fill:before{content:"\\f2b7"}.ri-wechat-pay-line:before{content:"\\f2b8"}.ri-weibo-fill:before{content:"\\f2b9"}.ri-weibo-line:before{content:"\\f2ba"}.ri-whatsapp-fill:before{content:"\\f2bb"}.ri-whatsapp-line:before{content:"\\f2bc"}.ri-wheelchair-fill:before{content:"\\f2bd"}.ri-wheelchair-line:before{content:"\\f2be"}.ri-wifi-fill:before{content:"\\f2bf"}.ri-wifi-line:before{content:"\\f2c0"}.ri-wifi-off-fill:before{content:"\\f2c1"}.ri-wifi-off-line:before{content:"\\f2c2"}.ri-window-2-fill:before{content:"\\f2c3"}.ri-window-2-line:before{content:"\\f2c4"}.ri-window-fill:before{content:"\\f2c5"}.ri-window-line:before{content:"\\f2c6"}.ri-windows-fill:before{content:"\\f2c7"}.ri-windows-line:before{content:"\\f2c8"}.ri-windy-fill:before{content:"\\f2c9"}.ri-windy-line:before{content:"\\f2ca"}.ri-wireless-charging-fill:before{content:"\\f2cb"}.ri-wireless-charging-line:before{content:"\\f2cc"}.ri-women-fill:before{content:"\\f2cd"}.ri-women-line:before{content:"\\f2ce"}.ri-wubi-input:before{content:"\\f2cf"}.ri-xbox-fill:before{content:"\\f2d0"}.ri-xbox-line:before{content:"\\f2d1"}.ri-xing-fill:before{content:"\\f2d2"}.ri-xing-line:before{content:"\\f2d3"}.ri-youtube-fill:before{content:"\\f2d4"}.ri-youtube-line:before{content:"\\f2d5"}.ri-zcool-fill:before{content:"\\f2d6"}.ri-zcool-line:before{content:"\\f2d7"}.ri-zhihu-fill:before{content:"\\f2d8"}.ri-zhihu-line:before{content:"\\f2d9"}.ri-zoom-in-fill:before{content:"\\f2da"}.ri-zoom-in-line:before{content:"\\f2db"}.ri-zoom-out-fill:before{content:"\\f2dc"}.ri-zoom-out-line:before{content:"\\f2dd"}.ri-zzz-fill:before{content:"\\f2de"}.ri-zzz-line:before{content:"\\f2df"}.ri-arrow-down-double-fill:before{content:"\\f2e0"}.ri-arrow-down-double-line:before{content:"\\f2e1"}.ri-arrow-left-double-fill:before{content:"\\f2e2"}.ri-arrow-left-double-line:before{content:"\\f2e3"}.ri-arrow-right-double-fill:before{content:"\\f2e4"}.ri-arrow-right-double-line:before{content:"\\f2e5"}.ri-arrow-turn-back-fill:before{content:"\\f2e6"}.ri-arrow-turn-back-line:before{content:"\\f2e7"}.ri-arrow-turn-forward-fill:before{content:"\\f2e8"}.ri-arrow-turn-forward-line:before{content:"\\f2e9"}.ri-arrow-up-double-fill:before{content:"\\f2ea"}.ri-arrow-up-double-line:before{content:"\\f2eb"}.ri-bard-fill:before{content:"\\f2ec"}.ri-bard-line:before{content:"\\f2ed"}.ri-bootstrap-fill:before{content:"\\f2ee"}.ri-bootstrap-line:before{content:"\\f2ef"}.ri-box-1-fill:before{content:"\\f2f0"}.ri-box-1-line:before{content:"\\f2f1"}.ri-box-2-fill:before{content:"\\f2f2"}.ri-box-2-line:before{content:"\\f2f3"}.ri-box-3-fill:before{content:"\\f2f4"}.ri-box-3-line:before{content:"\\f2f5"}.ri-brain-fill:before{content:"\\f2f6"}.ri-brain-line:before{content:"\\f2f7"}.ri-candle-fill:before{content:"\\f2f8"}.ri-candle-line:before{content:"\\f2f9"}.ri-cash-fill:before{content:"\\f2fa"}.ri-cash-line:before{content:"\\f2fb"}.ri-contract-left-fill:before{content:"\\f2fc"}.ri-contract-left-line:before{content:"\\f2fd"}.ri-contract-left-right-fill:before{content:"\\f2fe"}.ri-contract-left-right-line:before{content:"\\f2ff"}.ri-contract-right-fill:before{content:"\\f300"}.ri-contract-right-line:before{content:"\\f301"}.ri-contract-up-down-fill:before{content:"\\f302"}.ri-contract-up-down-line:before{content:"\\f303"}.ri-copilot-fill:before{content:"\\f304"}.ri-copilot-line:before{content:"\\f305"}.ri-corner-down-left-fill:before{content:"\\f306"}.ri-corner-down-left-line:before{content:"\\f307"}.ri-corner-down-right-fill:before{content:"\\f308"}.ri-corner-down-right-line:before{content:"\\f309"}.ri-corner-left-down-fill:before{content:"\\f30a"}.ri-corner-left-down-line:before{content:"\\f30b"}.ri-corner-left-up-fill:before{content:"\\f30c"}.ri-corner-left-up-line:before{content:"\\f30d"}.ri-corner-right-down-fill:before{content:"\\f30e"}.ri-corner-right-down-line:before{content:"\\f30f"}.ri-corner-right-up-fill:before{content:"\\f310"}.ri-corner-right-up-line:before{content:"\\f311"}.ri-corner-up-left-double-fill:before{content:"\\f312"}.ri-corner-up-left-double-line:before{content:"\\f313"}.ri-corner-up-left-fill:before{content:"\\f314"}.ri-corner-up-left-line:before{content:"\\f315"}.ri-corner-up-right-double-fill:before{content:"\\f316"}.ri-corner-up-right-double-line:before{content:"\\f317"}.ri-corner-up-right-fill:before{content:"\\f318"}.ri-corner-up-right-line:before{content:"\\f319"}.ri-cross-fill:before{content:"\\f31a"}.ri-cross-line:before{content:"\\f31b"}.ri-edge-new-fill:before{content:"\\f31c"}.ri-edge-new-line:before{content:"\\f31d"}.ri-equal-fill:before{content:"\\f31e"}.ri-equal-line:before{content:"\\f31f"}.ri-expand-left-fill:before{content:"\\f320"}.ri-expand-left-line:before{content:"\\f321"}.ri-expand-left-right-fill:before{content:"\\f322"}.ri-expand-left-right-line:before{content:"\\f323"}.ri-expand-right-fill:before{content:"\\f324"}.ri-expand-right-line:before{content:"\\f325"}.ri-expand-up-down-fill:before{content:"\\f326"}.ri-expand-up-down-line:before{content:"\\f327"}.ri-flickr-fill:before{content:"\\f328"}.ri-flickr-line:before{content:"\\f329"}.ri-forward-10-fill:before{content:"\\f32a"}.ri-forward-10-line:before{content:"\\f32b"}.ri-forward-15-fill:before{content:"\\f32c"}.ri-forward-15-line:before{content:"\\f32d"}.ri-forward-30-fill:before{content:"\\f32e"}.ri-forward-30-line:before{content:"\\f32f"}.ri-forward-5-fill:before{content:"\\f330"}.ri-forward-5-line:before{content:"\\f331"}.ri-graduation-cap-fill:before{content:"\\f332"}.ri-graduation-cap-line:before{content:"\\f333"}.ri-home-office-fill:before{content:"\\f334"}.ri-home-office-line:before{content:"\\f335"}.ri-hourglass-2-fill:before{content:"\\f336"}.ri-hourglass-2-line:before{content:"\\f337"}.ri-hourglass-fill:before{content:"\\f338"}.ri-hourglass-line:before{content:"\\f339"}.ri-javascript-fill:before{content:"\\f33a"}.ri-javascript-line:before{content:"\\f33b"}.ri-loop-left-fill:before{content:"\\f33c"}.ri-loop-left-line:before{content:"\\f33d"}.ri-loop-right-fill:before{content:"\\f33e"}.ri-loop-right-line:before{content:"\\f33f"}.ri-memories-fill:before{content:"\\f340"}.ri-memories-line:before{content:"\\f341"}.ri-meta-fill:before{content:"\\f342"}.ri-meta-line:before{content:"\\f343"}.ri-microsoft-loop-fill:before{content:"\\f344"}.ri-microsoft-loop-line:before{content:"\\f345"}.ri-nft-fill:before{content:"\\f346"}.ri-nft-line:before{content:"\\f347"}.ri-notion-fill:before{content:"\\f348"}.ri-notion-line:before{content:"\\f349"}.ri-openai-fill:before{content:"\\f34a"}.ri-openai-line:before{content:"\\f34b"}.ri-overline:before{content:"\\f34c"}.ri-p2p-fill:before{content:"\\f34d"}.ri-p2p-line:before{content:"\\f34e"}.ri-presentation-fill:before{content:"\\f34f"}.ri-presentation-line:before{content:"\\f350"}.ri-replay-10-fill:before{content:"\\f351"}.ri-replay-10-line:before{content:"\\f352"}.ri-replay-15-fill:before{content:"\\f353"}.ri-replay-15-line:before{content:"\\f354"}.ri-replay-30-fill:before{content:"\\f355"}.ri-replay-30-line:before{content:"\\f356"}.ri-replay-5-fill:before{content:"\\f357"}.ri-replay-5-line:before{content:"\\f358"}.ri-school-fill:before{content:"\\f359"}.ri-school-line:before{content:"\\f35a"}.ri-shining-2-fill:before{content:"\\f35b"}.ri-shining-2-line:before{content:"\\f35c"}.ri-shining-fill:before{content:"\\f35d"}.ri-shining-line:before{content:"\\f35e"}.ri-sketching:before{content:"\\f35f"}.ri-skip-down-fill:before{content:"\\f360"}.ri-skip-down-line:before{content:"\\f361"}.ri-skip-left-fill:before{content:"\\f362"}.ri-skip-left-line:before{content:"\\f363"}.ri-skip-right-fill:before{content:"\\f364"}.ri-skip-right-line:before{content:"\\f365"}.ri-skip-up-fill:before{content:"\\f366"}.ri-skip-up-line:before{content:"\\f367"}.ri-slow-down-fill:before{content:"\\f368"}.ri-slow-down-line:before{content:"\\f369"}.ri-sparkling-2-fill:before{content:"\\f36a"}.ri-sparkling-2-line:before{content:"\\f36b"}.ri-sparkling-fill:before{content:"\\f36c"}.ri-sparkling-line:before{content:"\\f36d"}.ri-speak-fill:before{content:"\\f36e"}.ri-speak-line:before{content:"\\f36f"}.ri-speed-up-fill:before{content:"\\f370"}.ri-speed-up-line:before{content:"\\f371"}.ri-tiktok-fill:before{content:"\\f372"}.ri-tiktok-line:before{content:"\\f373"}.ri-token-swap-fill:before{content:"\\f374"}.ri-token-swap-line:before{content:"\\f375"}.ri-unpin-fill:before{content:"\\f376"}.ri-unpin-line:before{content:"\\f377"}.ri-wechat-channels-fill:before{content:"\\f378"}.ri-wechat-channels-line:before{content:"\\f379"}.ri-wordpress-fill:before{content:"\\f37a"}.ri-wordpress-line:before{content:"\\f37b"}.ri-blender-fill:before{content:"\\f37c"}.ri-blender-line:before{content:"\\f37d"}.ri-emoji-sticker-fill:before{content:"\\f37e"}.ri-emoji-sticker-line:before{content:"\\f37f"}.ri-git-close-pull-request-fill:before{content:"\\f380"}.ri-git-close-pull-request-line:before{content:"\\f381"}.ri-instance-fill:before{content:"\\f382"}.ri-instance-line:before{content:"\\f383"}.ri-megaphone-fill:before{content:"\\f384"}.ri-megaphone-line:before{content:"\\f385"}.ri-pass-expired-fill:before{content:"\\f386"}.ri-pass-expired-line:before{content:"\\f387"}.ri-pass-pending-fill:before{content:"\\f388"}.ri-pass-pending-line:before{content:"\\f389"}.ri-pass-valid-fill:before{content:"\\f38a"}.ri-pass-valid-line:before{content:"\\f38b"}.ri-ai-generate:before{content:"\\f38c"}.ri-calendar-close-fill:before{content:"\\f38d"}.ri-calendar-close-line:before{content:"\\f38e"}.ri-draggable:before{content:"\\f38f"}.ri-font-family:before{content:"\\f390"}.ri-font-mono:before{content:"\\f391"}.ri-font-sans-serif:before{content:"\\f392"}.ri-hard-drive-3-fill:before{content:"\\f393"}.ri-hard-drive-3-line:before{content:"\\f394"}.ri-kick-fill:before{content:"\\f395"}.ri-kick-line:before{content:"\\f396"}.ri-list-check-3:before{content:"\\f397"}.ri-list-indefinite:before{content:"\\f398"}.ri-list-ordered-2:before{content:"\\f399"}.ri-list-radio:before{content:"\\f39a"}.ri-openbase-fill:before{content:"\\f39b"}.ri-openbase-line:before{content:"\\f39c"}.ri-planet-fill:before{content:"\\f39d"}.ri-planet-line:before{content:"\\f39e"}.ri-prohibited-fill:before{content:"\\f39f"}.ri-prohibited-line:before{content:"\\f3a0"}.ri-quote-text:before{content:"\\f3a1"}.ri-seo-fill:before{content:"\\f3a2"}.ri-seo-line:before{content:"\\f3a3"}.ri-slash-commands:before{content:"\\f3a4"}.ri-archive-2-fill:before{content:"\\f3a5"}.ri-archive-2-line:before{content:"\\f3a6"}.ri-inbox-2-fill:before{content:"\\f3a7"}.ri-inbox-2-line:before{content:"\\f3a8"}.ri-shake-hands-fill:before{content:"\\f3a9"}.ri-shake-hands-line:before{content:"\\f3aa"}.ri-supabase-fill:before{content:"\\f3ab"}.ri-supabase-line:before{content:"\\f3ac"}.ri-water-percent-fill:before{content:"\\f3ad"}.ri-water-percent-line:before{content:"\\f3ae"}.ri-yuque-fill:before{content:"\\f3af"}.ri-yuque-line:before{content:"\\f3b0"}.ri-crosshair-2-fill:before{content:"\\f3b1"}.ri-crosshair-2-line:before{content:"\\f3b2"}.ri-crosshair-fill:before{content:"\\f3b3"}.ri-crosshair-line:before{content:"\\f3b4"}.ri-file-close-fill:before{content:"\\f3b5"}.ri-file-close-line:before{content:"\\f3b6"}.ri-infinity-fill:before{content:"\\f3b7"}.ri-infinity-line:before{content:"\\f3b8"}.ri-rfid-fill:before{content:"\\f3b9"}.ri-rfid-line:before{content:"\\f3ba"}.ri-slash-commands-2:before{content:"\\f3bb"}.ri-user-forbid-fill:before{content:"\\f3bc"}.ri-user-forbid-line:before{content:"\\f3bd"}.ri-beer-fill:before{content:"\\f3be"}.ri-beer-line:before{content:"\\f3bf"}.ri-circle-fill:before{content:"\\f3c0"}.ri-circle-line:before{content:"\\f3c1"}.ri-dropdown-list:before{content:"\\f3c2"}.ri-file-image-fill:before{content:"\\f3c3"}.ri-file-image-line:before{content:"\\f3c4"}.ri-file-pdf-2-fill:before{content:"\\f3c5"}.ri-file-pdf-2-line:before{content:"\\f3c6"}.ri-file-video-fill:before{content:"\\f3c7"}.ri-file-video-line:before{content:"\\f3c8"}.ri-folder-image-fill:before{content:"\\f3c9"}.ri-folder-image-line:before{content:"\\f3ca"}.ri-folder-video-fill:before{content:"\\f3cb"}.ri-folder-video-line:before{content:"\\f3cc"}.ri-hexagon-fill:before{content:"\\f3cd"}.ri-hexagon-line:before{content:"\\f3ce"}.ri-menu-search-fill:before{content:"\\f3cf"}.ri-menu-search-line:before{content:"\\f3d0"}.ri-octagon-fill:before{content:"\\f3d1"}.ri-octagon-line:before{content:"\\f3d2"}.ri-pentagon-fill:before{content:"\\f3d3"}.ri-pentagon-line:before{content:"\\f3d4"}.ri-rectangle-fill:before{content:"\\f3d5"}.ri-rectangle-line:before{content:"\\f3d6"}.ri-robot-2-fill:before{content:"\\f3d7"}.ri-robot-2-line:before{content:"\\f3d8"}.ri-shapes-fill:before{content:"\\f3d9"}.ri-shapes-line:before{content:"\\f3da"}.ri-square-fill:before{content:"\\f3db"}.ri-square-line:before{content:"\\f3dc"}.ri-tent-fill:before{content:"\\f3dd"}.ri-tent-line:before{content:"\\f3de"}.ri-threads-fill:before{content:"\\f3df"}.ri-threads-line:before{content:"\\f3e0"}.ri-tree-fill:before{content:"\\f3e1"}.ri-tree-line:before{content:"\\f3e2"}.ri-triangle-fill:before{content:"\\f3e3"}.ri-triangle-line:before{content:"\\f3e4"}.ri-twitter-x-fill:before{content:"\\f3e5"}.ri-twitter-x-line:before{content:"\\f3e6"}.ri-verified-badge-fill:before{content:"\\f3e7"}.ri-verified-badge-line:before{content:"\\f3e8"}.ri-armchair-fill:before{content:"\\f3e9"}.ri-armchair-line:before{content:"\\f3ea"}.ri-bnb-fill:before{content:"\\f3eb"}.ri-bnb-line:before{content:"\\f3ec"}.ri-bread-fill:before{content:"\\f3ed"}.ri-bread-line:before{content:"\\f3ee"}.ri-btc-fill:before{content:"\\f3ef"}.ri-btc-line:before{content:"\\f3f0"}.ri-calendar-schedule-fill:before{content:"\\f3f1"}.ri-calendar-schedule-line:before{content:"\\f3f2"}.ri-dice-1-fill:before{content:"\\f3f3"}.ri-dice-1-line:before{content:"\\f3f4"}.ri-dice-2-fill:before{content:"\\f3f5"}.ri-dice-2-line:before{content:"\\f3f6"}.ri-dice-3-fill:before{content:"\\f3f7"}.ri-dice-3-line:before{content:"\\f3f8"}.ri-dice-4-fill:before{content:"\\f3f9"}.ri-dice-4-line:before{content:"\\f3fa"}.ri-dice-5-fill:before{content:"\\f3fb"}.ri-dice-5-line:before{content:"\\f3fc"}.ri-dice-6-fill:before{content:"\\f3fd"}.ri-dice-6-line:before{content:"\\f3fe"}.ri-dice-fill:before{content:"\\f3ff"}.ri-dice-line:before{content:"\\f400"}.ri-drinks-fill:before{content:"\\f401"}.ri-drinks-line:before{content:"\\f402"}.ri-equalizer-2-fill:before{content:"\\f403"}.ri-equalizer-2-line:before{content:"\\f404"}.ri-equalizer-3-fill:before{content:"\\f405"}.ri-equalizer-3-line:before{content:"\\f406"}.ri-eth-fill:before{content:"\\f407"}.ri-eth-line:before{content:"\\f408"}.ri-flower-fill:before{content:"\\f409"}.ri-flower-line:before{content:"\\f40a"}.ri-glasses-2-fill:before{content:"\\f40b"}.ri-glasses-2-line:before{content:"\\f40c"}.ri-glasses-fill:before{content:"\\f40d"}.ri-glasses-line:before{content:"\\f40e"}.ri-goggles-fill:before{content:"\\f40f"}.ri-goggles-line:before{content:"\\f410"}.ri-image-circle-fill:before{content:"\\f411"}.ri-image-circle-line:before{content:"\\f412"}.ri-info-i:before{content:"\\f413"}.ri-money-rupee-circle-fill:before{content:"\\f414"}.ri-money-rupee-circle-line:before{content:"\\f415"}.ri-news-fill:before{content:"\\f416"}.ri-news-line:before{content:"\\f417"}.ri-robot-3-fill:before{content:"\\f418"}.ri-robot-3-line:before{content:"\\f419"}.ri-share-2-fill:before{content:"\\f41a"}.ri-share-2-line:before{content:"\\f41b"}.ri-sofa-fill:before{content:"\\f41c"}.ri-sofa-line:before{content:"\\f41d"}.ri-svelte-fill:before{content:"\\f41e"}.ri-svelte-line:before{content:"\\f41f"}.ri-vk-fill:before{content:"\\f420"}.ri-vk-line:before{content:"\\f421"}.ri-xrp-fill:before{content:"\\f422"}.ri-xrp-line:before{content:"\\f423"}.ri-xtz-fill:before{content:"\\f424"}.ri-xtz-line:before{content:"\\f425"}.ri-archive-stack-fill:before{content:"\\f426"}.ri-archive-stack-line:before{content:"\\f427"}.ri-bowl-fill:before{content:"\\f428"}.ri-bowl-line:before{content:"\\f429"}.ri-calendar-view:before{content:"\\f42a"}.ri-carousel-view:before{content:"\\f42b"}.ri-code-block:before{content:"\\f42c"}.ri-color-filter-fill:before{content:"\\f42d"}.ri-color-filter-line:before{content:"\\f42e"}.ri-contacts-book-3-fill:before{content:"\\f42f"}.ri-contacts-book-3-line:before{content:"\\f430"}.ri-contract-fill:before{content:"\\f431"}.ri-contract-line:before{content:"\\f432"}.ri-drinks-2-fill:before{content:"\\f433"}.ri-drinks-2-line:before{content:"\\f434"}.ri-export-fill:before{content:"\\f435"}.ri-export-line:before{content:"\\f436"}.ri-file-check-fill:before{content:"\\f437"}.ri-file-check-line:before{content:"\\f438"}.ri-focus-mode:before{content:"\\f439"}.ri-folder-6-fill:before{content:"\\f43a"}.ri-folder-6-line:before{content:"\\f43b"}.ri-folder-check-fill:before{content:"\\f43c"}.ri-folder-check-line:before{content:"\\f43d"}.ri-folder-close-fill:before{content:"\\f43e"}.ri-folder-close-line:before{content:"\\f43f"}.ri-folder-cloud-fill:before{content:"\\f440"}.ri-folder-cloud-line:before{content:"\\f441"}.ri-gallery-view-2:before{content:"\\f442"}.ri-gallery-view:before{content:"\\f443"}.ri-hand:before{content:"\\f444"}.ri-import-fill:before{content:"\\f445"}.ri-import-line:before{content:"\\f446"}.ri-information-2-fill:before{content:"\\f447"}.ri-information-2-line:before{content:"\\f448"}.ri-kanban-view-2:before{content:"\\f449"}.ri-kanban-view:before{content:"\\f44a"}.ri-list-view:before{content:"\\f44b"}.ri-lock-star-fill:before{content:"\\f44c"}.ri-lock-star-line:before{content:"\\f44d"}.ri-puzzle-2-fill:before{content:"\\f44e"}.ri-puzzle-2-line:before{content:"\\f44f"}.ri-puzzle-fill:before{content:"\\f450"}.ri-puzzle-line:before{content:"\\f451"}.ri-ram-2-fill:before{content:"\\f452"}.ri-ram-2-line:before{content:"\\f453"}.ri-ram-fill:before{content:"\\f454"}.ri-ram-line:before{content:"\\f455"}.ri-receipt-fill:before{content:"\\f456"}.ri-receipt-line:before{content:"\\f457"}.ri-shadow-fill:before{content:"\\f458"}.ri-shadow-line:before{content:"\\f459"}.ri-sidebar-fold-fill:before{content:"\\f45a"}.ri-sidebar-fold-line:before{content:"\\f45b"}.ri-sidebar-unfold-fill:before{content:"\\f45c"}.ri-sidebar-unfold-line:before{content:"\\f45d"}.ri-slideshow-view:before{content:"\\f45e"}.ri-sort-alphabet-asc:before{content:"\\f45f"}.ri-sort-alphabet-desc:before{content:"\\f460"}.ri-sort-number-asc:before{content:"\\f461"}.ri-sort-number-desc:before{content:"\\f462"}.ri-stacked-view:before{content:"\\f463"}.ri-sticky-note-add-fill:before{content:"\\f464"}.ri-sticky-note-add-line:before{content:"\\f465"}.ri-swap-2-fill:before{content:"\\f466"}.ri-swap-2-line:before{content:"\\f467"}.ri-swap-3-fill:before{content:"\\f468"}.ri-swap-3-line:before{content:"\\f469"}.ri-table-3:before{content:"\\f46a"}.ri-table-view:before{content:"\\f46b"}.ri-text-block:before{content:"\\f46c"}.ri-text-snippet:before{content:"\\f46d"}.ri-timeline-view:before{content:"\\f46e"}.ri-blogger-fill:before{content:"\\f46f"}.ri-blogger-line:before{content:"\\f470"}.ri-chat-thread-fill:before{content:"\\f471"}.ri-chat-thread-line:before{content:"\\f472"}.ri-discount-percent-fill:before{content:"\\f473"}.ri-discount-percent-line:before{content:"\\f474"}.ri-exchange-2-fill:before{content:"\\f475"}.ri-exchange-2-line:before{content:"\\f476"}.ri-git-fork-fill:before{content:"\\f477"}.ri-git-fork-line:before{content:"\\f478"}.ri-input-field:before{content:"\\f479"}.ri-progress-1-fill:before{content:"\\f47a"}.ri-progress-1-line:before{content:"\\f47b"}.ri-progress-2-fill:before{content:"\\f47c"}.ri-progress-2-line:before{content:"\\f47d"}.ri-progress-3-fill:before{content:"\\f47e"}.ri-progress-3-line:before{content:"\\f47f"}.ri-progress-4-fill:before{content:"\\f480"}.ri-progress-4-line:before{content:"\\f481"}.ri-progress-5-fill:before{content:"\\f482"}.ri-progress-5-line:before{content:"\\f483"}.ri-progress-6-fill:before{content:"\\f484"}.ri-progress-6-line:before{content:"\\f485"}.ri-progress-7-fill:before{content:"\\f486"}.ri-progress-7-line:before{content:"\\f487"}.ri-progress-8-fill:before{content:"\\f488"}.ri-progress-8-line:before{content:"\\f489"}.ri-remix-run-fill:before{content:"\\f48a"}.ri-remix-run-line:before{content:"\\f48b"}.ri-signpost-fill:before{content:"\\f48c"}.ri-signpost-line:before{content:"\\f48d"}.ri-time-zone-fill:before{content:"\\f48e"}.ri-time-zone-line:before{content:"\\f48f"}.ri-arrow-down-wide-fill:before{content:"\\f490"}.ri-arrow-down-wide-line:before{content:"\\f491"}.ri-arrow-left-wide-fill:before{content:"\\f492"}.ri-arrow-left-wide-line:before{content:"\\f493"}.ri-arrow-right-wide-fill:before{content:"\\f494"}.ri-arrow-right-wide-line:before{content:"\\f495"}.ri-arrow-up-wide-fill:before{content:"\\f496"}.ri-arrow-up-wide-line:before{content:"\\f497"}.ri-bluesky-fill:before{content:"\\f498"}.ri-bluesky-line:before{content:"\\f499"}.ri-expand-height-fill:before{content:"\\f49a"}.ri-expand-height-line:before{content:"\\f49b"}.ri-expand-width-fill:before{content:"\\f49c"}.ri-expand-width-line:before{content:"\\f49d"}.ri-forward-end-fill:before{content:"\\f49e"}.ri-forward-end-line:before{content:"\\f49f"}.ri-forward-end-mini-fill:before{content:"\\f4a0"}.ri-forward-end-mini-line:before{content:"\\f4a1"}.ri-friendica-fill:before{content:"\\f4a2"}.ri-friendica-line:before{content:"\\f4a3"}.ri-git-pr-draft-fill:before{content:"\\f4a4"}.ri-git-pr-draft-line:before{content:"\\f4a5"}.ri-play-reverse-fill:before{content:"\\f4a6"}.ri-play-reverse-line:before{content:"\\f4a7"}.ri-play-reverse-mini-fill:before{content:"\\f4a8"}.ri-play-reverse-mini-line:before{content:"\\f4a9"}.ri-rewind-start-fill:before{content:"\\f4aa"}.ri-rewind-start-line:before{content:"\\f4ab"}.ri-rewind-start-mini-fill:before{content:"\\f4ac"}.ri-rewind-start-mini-line:before{content:"\\f4ad"}.ri-scroll-to-bottom-fill:before{content:"\\f4ae"}.ri-scroll-to-bottom-line:before{content:"\\f4af"}.ri-add-large-fill:before{content:"\\f4b0"}.ri-add-large-line:before{content:"\\f4b1"}.ri-aed-electrodes-fill:before{content:"\\f4b2"}.ri-aed-electrodes-line:before{content:"\\f4b3"}.ri-aed-fill:before{content:"\\f4b4"}.ri-aed-line:before{content:"\\f4b5"}.ri-alibaba-cloud-fill:before{content:"\\f4b6"}.ri-alibaba-cloud-line:before{content:"\\f4b7"}.ri-align-item-bottom-fill:before{content:"\\f4b8"}.ri-align-item-bottom-line:before{content:"\\f4b9"}.ri-align-item-horizontal-center-fill:before{content:"\\f4ba"}.ri-align-item-horizontal-center-line:before{content:"\\f4bb"}.ri-align-item-left-fill:before{content:"\\f4bc"}.ri-align-item-left-line:before{content:"\\f4bd"}.ri-align-item-right-fill:before{content:"\\f4be"}.ri-align-item-right-line:before{content:"\\f4bf"}.ri-align-item-top-fill:before{content:"\\f4c0"}.ri-align-item-top-line:before{content:"\\f4c1"}.ri-align-item-vertical-center-fill:before{content:"\\f4c2"}.ri-align-item-vertical-center-line:before{content:"\\f4c3"}.ri-apps-2-add-fill:before{content:"\\f4c4"}.ri-apps-2-add-line:before{content:"\\f4c5"}.ri-close-large-fill:before{content:"\\f4c6"}.ri-close-large-line:before{content:"\\f4c7"}.ri-collapse-diagonal-2-fill:before{content:"\\f4c8"}.ri-collapse-diagonal-2-line:before{content:"\\f4c9"}.ri-collapse-diagonal-fill:before{content:"\\f4ca"}.ri-collapse-diagonal-line:before{content:"\\f4cb"}.ri-dashboard-horizontal-fill:before{content:"\\f4cc"}.ri-dashboard-horizontal-line:before{content:"\\f4cd"}.ri-expand-diagonal-2-fill:before{content:"\\f4ce"}.ri-expand-diagonal-2-line:before{content:"\\f4cf"}.ri-expand-diagonal-fill:before{content:"\\f4d0"}.ri-expand-diagonal-line:before{content:"\\f4d1"}.ri-firebase-fill:before{content:"\\f4d2"}.ri-firebase-line:before{content:"\\f4d3"}.ri-flip-horizontal-2-fill:before{content:"\\f4d4"}.ri-flip-horizontal-2-line:before{content:"\\f4d5"}.ri-flip-horizontal-fill:before{content:"\\f4d6"}.ri-flip-horizontal-line:before{content:"\\f4d7"}.ri-flip-vertical-2-fill:before{content:"\\f4d8"}.ri-flip-vertical-2-line:before{content:"\\f4d9"}.ri-flip-vertical-fill:before{content:"\\f4da"}.ri-flip-vertical-line:before{content:"\\f4db"}.ri-formula:before{content:"\\f4dc"}.ri-function-add-fill:before{content:"\\f4dd"}.ri-function-add-line:before{content:"\\f4de"}.ri-goblet-2-fill:before{content:"\\f4df"}.ri-goblet-2-line:before{content:"\\f4e0"}.ri-golf-ball-fill:before{content:"\\f4e1"}.ri-golf-ball-line:before{content:"\\f4e2"}.ri-group-3-fill:before{content:"\\f4e3"}.ri-group-3-line:before{content:"\\f4e4"}.ri-heart-add-2-fill:before{content:"\\f4e5"}.ri-heart-add-2-line:before{content:"\\f4e6"}.ri-id-card-fill:before{content:"\\f4e7"}.ri-id-card-line:before{content:"\\f4e8"}.ri-information-off-fill:before{content:"\\f4e9"}.ri-information-off-line:before{content:"\\f4ea"}.ri-java-fill:before{content:"\\f4eb"}.ri-java-line:before{content:"\\f4ec"}.ri-layout-grid-2-fill:before{content:"\\f4ed"}.ri-layout-grid-2-line:before{content:"\\f4ee"}.ri-layout-horizontal-fill:before{content:"\\f4ef"}.ri-layout-horizontal-line:before{content:"\\f4f0"}.ri-layout-vertical-fill:before{content:"\\f4f1"}.ri-layout-vertical-line:before{content:"\\f4f2"}.ri-menu-fold-2-fill:before{content:"\\f4f3"}.ri-menu-fold-2-line:before{content:"\\f4f4"}.ri-menu-fold-3-fill:before{content:"\\f4f5"}.ri-menu-fold-3-line:before{content:"\\f4f6"}.ri-menu-fold-4-fill:before{content:"\\f4f7"}.ri-menu-fold-4-line:before{content:"\\f4f8"}.ri-menu-unfold-2-fill:before{content:"\\f4f9"}.ri-menu-unfold-2-line:before{content:"\\f4fa"}.ri-menu-unfold-3-fill:before{content:"\\f4fb"}.ri-menu-unfold-3-line:before{content:"\\f4fc"}.ri-menu-unfold-4-fill:before{content:"\\f4fd"}.ri-menu-unfold-4-line:before{content:"\\f4fe"}.ri-mobile-download-fill:before{content:"\\f4ff"}.ri-mobile-download-line:before{content:"\\f500"}.ri-nextjs-fill:before{content:"\\f501"}.ri-nextjs-line:before{content:"\\f502"}.ri-nodejs-fill:before{content:"\\f503"}.ri-nodejs-line:before{content:"\\f504"}.ri-pause-large-fill:before{content:"\\f505"}.ri-pause-large-line:before{content:"\\f506"}.ri-play-large-fill:before{content:"\\f507"}.ri-play-large-line:before{content:"\\f508"}.ri-play-reverse-large-fill:before{content:"\\f509"}.ri-play-reverse-large-line:before{content:"\\f50a"}.ri-police-badge-fill:before{content:"\\f50b"}.ri-police-badge-line:before{content:"\\f50c"}.ri-prohibited-2-fill:before{content:"\\f50d"}.ri-prohibited-2-line:before{content:"\\f50e"}.ri-shopping-bag-4-fill:before{content:"\\f50f"}.ri-shopping-bag-4-line:before{content:"\\f510"}.ri-snowflake-fill:before{content:"\\f511"}.ri-snowflake-line:before{content:"\\f512"}.ri-square-root:before{content:"\\f513"}.ri-stop-large-fill:before{content:"\\f514"}.ri-stop-large-line:before{content:"\\f515"}.ri-tailwind-css-fill:before{content:"\\f516"}.ri-tailwind-css-line:before{content:"\\f517"}.ri-tooth-fill:before{content:"\\f518"}.ri-tooth-line:before{content:"\\f519"}.ri-video-off-fill:before{content:"\\f51a"}.ri-video-off-line:before{content:"\\f51b"}.ri-video-on-fill:before{content:"\\f51c"}.ri-video-on-line:before{content:"\\f51d"}.ri-webhook-fill:before{content:"\\f51e"}.ri-webhook-line:before{content:"\\f51f"}.ri-weight-fill:before{content:"\\f520"}.ri-weight-line:before{content:"\\f521"}.ri-book-shelf-fill:before{content:"\\f522"}.ri-book-shelf-line:before{content:"\\f523"}.ri-brain-2-fill:before{content:"\\f524"}.ri-brain-2-line:before{content:"\\f525"}.ri-chat-search-fill:before{content:"\\f526"}.ri-chat-search-line:before{content:"\\f527"}.ri-chat-unread-fill:before{content:"\\f528"}.ri-chat-unread-line:before{content:"\\f529"}.ri-collapse-horizontal-fill:before{content:"\\f52a"}.ri-collapse-horizontal-line:before{content:"\\f52b"}.ri-collapse-vertical-fill:before{content:"\\f52c"}.ri-collapse-vertical-line:before{content:"\\f52d"}.ri-dna-fill:before{content:"\\f52e"}.ri-dna-line:before{content:"\\f52f"}.ri-dropper-fill:before{content:"\\f530"}.ri-dropper-line:before{content:"\\f531"}.ri-expand-diagonal-s-2-fill:before{content:"\\f532"}.ri-expand-diagonal-s-2-line:before{content:"\\f533"}.ri-expand-diagonal-s-fill:before{content:"\\f534"}.ri-expand-diagonal-s-line:before{content:"\\f535"}.ri-expand-horizontal-fill:before{content:"\\f536"}.ri-expand-horizontal-line:before{content:"\\f537"}.ri-expand-horizontal-s-fill:before{content:"\\f538"}.ri-expand-horizontal-s-line:before{content:"\\f539"}.ri-expand-vertical-fill:before{content:"\\f53a"}.ri-expand-vertical-line:before{content:"\\f53b"}.ri-expand-vertical-s-fill:before{content:"\\f53c"}.ri-expand-vertical-s-line:before{content:"\\f53d"}.ri-gemini-fill:before{content:"\\f53e"}.ri-gemini-line:before{content:"\\f53f"}.ri-reset-left-fill:before{content:"\\f540"}.ri-reset-left-line:before{content:"\\f541"}.ri-reset-right-fill:before{content:"\\f542"}.ri-reset-right-line:before{content:"\\f543"}.ri-stairs-fill:before{content:"\\f544"}.ri-stairs-line:before{content:"\\f545"}.ri-telegram-2-fill:before{content:"\\f546"}.ri-telegram-2-line:before{content:"\\f547"}.ri-triangular-flag-fill:before{content:"\\f548"}.ri-triangular-flag-line:before{content:"\\f549"}.ri-user-minus-fill:before{content:"\\f54a"}.ri-user-minus-line:before{content:"\\f54b"}.ri-account-box-2-fill:before{content:"\\f54c"}.ri-account-box-2-line:before{content:"\\f54d"}.ri-account-circle-2-fill:before{content:"\\f54e"}.ri-account-circle-2-line:before{content:"\\f54f"}.ri-alarm-snooze-fill:before{content:"\\f550"}.ri-alarm-snooze-line:before{content:"\\f551"}.ri-arrow-down-box-fill:before{content:"\\f552"}.ri-arrow-down-box-line:before{content:"\\f553"}.ri-arrow-left-box-fill:before{content:"\\f554"}.ri-arrow-left-box-line:before{content:"\\f555"}.ri-arrow-left-down-box-fill:before{content:"\\f556"}.ri-arrow-left-down-box-line:before{content:"\\f557"}.ri-arrow-left-up-box-fill:before{content:"\\f558"}.ri-arrow-left-up-box-line:before{content:"\\f559"}.ri-arrow-right-box-fill:before{content:"\\f55a"}.ri-arrow-right-box-line:before{content:"\\f55b"}.ri-arrow-right-down-box-fill:before{content:"\\f55c"}.ri-arrow-right-down-box-line:before{content:"\\f55d"}.ri-arrow-right-up-box-fill:before{content:"\\f55e"}.ri-arrow-right-up-box-line:before{content:"\\f55f"}.ri-arrow-up-box-fill:before{content:"\\f560"}.ri-arrow-up-box-line:before{content:"\\f561"}.ri-bar-chart-box-ai-fill:before{content:"\\f562"}.ri-bar-chart-box-ai-line:before{content:"\\f563"}.ri-brush-ai-fill:before{content:"\\f564"}.ri-brush-ai-line:before{content:"\\f565"}.ri-camera-ai-fill:before{content:"\\f566"}.ri-camera-ai-line:before{content:"\\f567"}.ri-chat-ai-fill:before{content:"\\f568"}.ri-chat-ai-line:before{content:"\\f569"}.ri-chat-smile-ai-fill:before{content:"\\f56a"}.ri-chat-smile-ai-line:before{content:"\\f56b"}.ri-chat-voice-ai-fill:before{content:"\\f56c"}.ri-chat-voice-ai-line:before{content:"\\f56d"}.ri-code-ai-fill:before{content:"\\f56e"}.ri-code-ai-line:before{content:"\\f56f"}.ri-color-filter-ai-fill:before{content:"\\f570"}.ri-color-filter-ai-line:before{content:"\\f571"}.ri-custom-size:before{content:"\\f572"}.ri-fediverse-fill:before{content:"\\f573"}.ri-fediverse-line:before{content:"\\f574"}.ri-flag-off-fill:before{content:"\\f575"}.ri-flag-off-line:before{content:"\\f576"}.ri-home-9-fill:before{content:"\\f577"}.ri-home-9-line:before{content:"\\f578"}.ri-image-ai-fill:before{content:"\\f579"}.ri-image-ai-line:before{content:"\\f57a"}.ri-image-circle-ai-fill:before{content:"\\f57b"}.ri-image-circle-ai-line:before{content:"\\f57c"}.ri-info-card-fill:before{content:"\\f57d"}.ri-info-card-line:before{content:"\\f57e"}.ri-landscape-ai-fill:before{content:"\\f57f"}.ri-landscape-ai-line:before{content:"\\f580"}.ri-letter-spacing-2:before{content:"\\f581"}.ri-line-height-2:before{content:"\\f582"}.ri-mail-ai-fill:before{content:"\\f583"}.ri-mail-ai-line:before{content:"\\f584"}.ri-mic-2-ai-fill:before{content:"\\f585"}.ri-mic-2-ai-line:before{content:"\\f586"}.ri-mic-ai-fill:before{content:"\\f587"}.ri-mic-ai-line:before{content:"\\f588"}.ri-movie-ai-fill:before{content:"\\f589"}.ri-movie-ai-line:before{content:"\\f58a"}.ri-music-ai-fill:before{content:"\\f58b"}.ri-music-ai-line:before{content:"\\f58c"}.ri-notification-snooze-fill:before{content:"\\f58d"}.ri-notification-snooze-line:before{content:"\\f58e"}.ri-php-fill:before{content:"\\f58f"}.ri-php-line:before{content:"\\f590"}.ri-pix-fill:before{content:"\\f591"}.ri-pix-line:before{content:"\\f592"}.ri-pulse-ai-fill:before{content:"\\f593"}.ri-pulse-ai-line:before{content:"\\f594"}.ri-quill-pen-ai-fill:before{content:"\\f595"}.ri-quill-pen-ai-line:before{content:"\\f596"}.ri-speak-ai-fill:before{content:"\\f597"}.ri-speak-ai-line:before{content:"\\f598"}.ri-star-off-fill:before{content:"\\f599"}.ri-star-off-line:before{content:"\\f59a"}.ri-translate-ai-2:before{content:"\\f59b"}.ri-translate-ai:before{content:"\\f59c"}.ri-user-community-fill:before{content:"\\f59d"}.ri-user-community-line:before{content:"\\f59e"}.ri-vercel-fill:before{content:"\\f59f"}.ri-vercel-line:before{content:"\\f5a0"}.ri-video-ai-fill:before{content:"\\f5a1"}.ri-video-ai-line:before{content:"\\f5a2"}.ri-video-on-ai-fill:before{content:"\\f5a3"}.ri-video-on-ai-line:before{content:"\\f5a4"}.ri-voice-ai-fill:before{content:"\\f5a5"}.ri-voice-ai-line:before{content:"\\f5a6"}.ri-ai-generate-2:before{content:"\\f5a7"}.ri-ai-generate-text:before{content:"\\f5a8"}.ri-anthropic-fill:before{content:"\\f5a9"}.ri-anthropic-line:before{content:"\\f5aa"}.ri-apps-2-ai-fill:before{content:"\\f5ab"}.ri-apps-2-ai-line:before{content:"\\f5ac"}.ri-camera-lens-ai-fill:before{content:"\\f5ad"}.ri-camera-lens-ai-line:before{content:"\\f5ae"}.ri-clapperboard-ai-fill:before{content:"\\f5af"}.ri-clapperboard-ai-line:before{content:"\\f5b0"}.ri-claude-fill:before{content:"\\f5b1"}.ri-claude-line:before{content:"\\f5b2"}.ri-closed-captioning-ai-fill:before{content:"\\f5b3"}.ri-closed-captioning-ai-line:before{content:"\\f5b4"}.ri-dvd-ai-fill:before{content:"\\f5b5"}.ri-dvd-ai-line:before{content:"\\f5b6"}.ri-film-ai-fill:before{content:"\\f5b7"}.ri-film-ai-line:before{content:"\\f5b8"}.ri-font-size-ai:before{content:"\\f5b9"}.ri-mixtral-fill:before{content:"\\f5ba"}.ri-mixtral-line:before{content:"\\f5bb"}.ri-movie-2-ai-fill:before{content:"\\f5bc"}.ri-movie-2-ai-line:before{content:"\\f5bd"}.ri-mv-ai-fill:before{content:"\\f5be"}.ri-mv-ai-line:before{content:"\\f5bf"}.ri-perplexity-fill:before{content:"\\f5c0"}.ri-perplexity-line:before{content:"\\f5c1"}.ri-poker-clubs-fill:before{content:"\\f5c2"}.ri-poker-clubs-line:before{content:"\\f5c3"}.ri-poker-diamonds-fill:before{content:"\\f5c4"}.ri-poker-diamonds-line:before{content:"\\f5c5"}.ri-poker-hearts-fill:before{content:"\\f5c6"}.ri-poker-hearts-line:before{content:"\\f5c7"}.ri-poker-spades-fill:before{content:"\\f5c8"}.ri-poker-spades-line:before{content:"\\f5c9"}.ri-safe-3-fill:before{content:"\\f5ca"}.ri-safe-3-line:before{content:"\\f5cb"}.ri-accessibility-fill:before{content:"\\f5cc"}.ri-accessibility-line:before{content:"\\f5cd"}.ri-alarm-add-fill:before{content:"\\f5ce"}.ri-alarm-add-line:before{content:"\\f5cf"}.ri-arrow-down-long-fill:before{content:"\\f5d0"}.ri-arrow-down-long-line:before{content:"\\f5d1"}.ri-arrow-left-down-long-fill:before{content:"\\f5d2"}.ri-arrow-left-down-long-line:before{content:"\\f5d3"}.ri-arrow-left-long-fill:before{content:"\\f5d4"}.ri-arrow-left-long-line:before{content:"\\f5d5"}.ri-arrow-left-up-long-fill:before{content:"\\f5d6"}.ri-arrow-left-up-long-line:before{content:"\\f5d7"}.ri-arrow-right-down-long-fill:before{content:"\\f5d8"}.ri-arrow-right-down-long-line:before{content:"\\f5d9"}.ri-arrow-right-long-fill:before{content:"\\f5da"}.ri-arrow-right-long-line:before{content:"\\f5db"}.ri-arrow-right-up-long-fill:before{content:"\\f5dc"}.ri-arrow-right-up-long-line:before{content:"\\f5dd"}.ri-arrow-up-long-fill:before{content:"\\f5de"}.ri-arrow-up-long-line:before{content:"\\f5df"}.ri-chess-fill:before{content:"\\f5e0"}.ri-chess-line:before{content:"\\f5e1"}.ri-diamond-fill:before{content:"\\f5e2"}.ri-diamond-line:before{content:"\\f5e3"}.ri-diamond-ring-fill:before{content:"\\f5e4"}.ri-diamond-ring-line:before{content:"\\f5e5"}.ri-figma-fill:before{content:"\\f5e6"}.ri-figma-line:before{content:"\\f5e7"}.ri-firefox-browser-fill:before{content:"\\f5e8"}.ri-firefox-browser-line:before{content:"\\f5e9"}.ri-jewelry-fill:before{content:"\\f5ea"}.ri-jewelry-line:before{content:"\\f5eb"}.ri-multi-image-fill:before{content:"\\f5ec"}.ri-multi-image-line:before{content:"\\f5ed"}.ri-no-credit-card-fill:before{content:"\\f5ee"}.ri-no-credit-card-line:before{content:"\\f5ef"}.ri-service-bell-fill:before{content:"\\f5f0"}.ri-service-bell-line:before{content:"\\f5f1"}.ri-ai-agent-fill:before{content:"\\f5f2"}.ri-ai-agent-line:before{content:"\\f5f3"}.ri-ai-generate-2-fill:before{content:"\\f5f4"}.ri-ai-generate-2-line:before{content:"\\f5f5"}.ri-ai-generate-3d-fill:before{content:"\\f5f6"}.ri-ai-generate-3d-line:before{content:"\\f5f7"}.ri-ai:before{content:"\\f5f8"}.ri-apps-ai-fill:before{content:"\\f5f9"}.ri-apps-ai-line:before{content:"\\f5fa"}.ri-atom-fill:before{content:"\\f5fb"}.ri-atom-line:before{content:"\\f5fc"}.ri-book-ai-fill:before{content:"\\f5fd"}.ri-book-ai-line:before{content:"\\f5fe"}.ri-brain-3-fill:before{content:"\\f5ff"}.ri-brain-3-line:before{content:"\\f600"}.ri-brain-ai-3-fill:before{content:"\\f601"}.ri-brain-ai-3-line:before{content:"\\f602"}.ri-brush-ai-3-fill:before{content:"\\f603"}.ri-brush-ai-3-line:before{content:"\\f604"}.ri-camera-4-fill:before{content:"\\f605"}.ri-camera-4-line:before{content:"\\f606"}.ri-camera-ai-2-fill:before{content:"\\f607"}.ri-camera-ai-2-line:before{content:"\\f608"}.ri-chat-ai-2-fill:before{content:"\\f609"}.ri-chat-ai-2-line:before{content:"\\f60a"}.ri-chat-ai-3-fill:before{content:"\\f60b"}.ri-chat-ai-3-line:before{content:"\\f60c"}.ri-chat-ai-4-fill:before{content:"\\f60d"}.ri-chat-ai-4-line:before{content:"\\f60e"}.ri-chat-smile-ai-3-fill:before{content:"\\f60f"}.ri-chat-smile-ai-3-line:before{content:"\\f610"}.ri-deepseek-fill:before{content:"\\f611"}.ri-deepseek-line:before{content:"\\f612"}.ri-file-ai-2-fill:before{content:"\\f613"}.ri-file-ai-2-line:before{content:"\\f614"}.ri-file-ai-fill:before{content:"\\f615"}.ri-file-ai-line:before{content:"\\f616"}.ri-function-ai-fill:before{content:"\\f617"}.ri-function-ai-line:before{content:"\\f618"}.ri-game-2-fill:before{content:"\\f619"}.ri-game-2-line:before{content:"\\f61a"}.ri-goblet-broken-fill:before{content:"\\f61b"}.ri-goblet-broken-line:before{content:"\\f61c"}.ri-lightbulb-ai-fill:before{content:"\\f61d"}.ri-lightbulb-ai-line:before{content:"\\f61e"}.ri-loop-left-ai-fill:before{content:"\\f61f"}.ri-loop-left-ai-line:before{content:"\\f620"}.ri-loop-right-ai-fill:before{content:"\\f621"}.ri-loop-right-ai-line:before{content:"\\f622"}.ri-message-ai-3-fill:before{content:"\\f623"}.ri-message-ai-3-line:before{content:"\\f624"}.ri-painting-ai-fill:before{content:"\\f625"}.ri-painting-ai-line:before{content:"\\f626"}.ri-painting-fill:before{content:"\\f627"}.ri-painting-line:before{content:"\\f628"}.ri-pencil-ai-2-fill:before{content:"\\f629"}.ri-pencil-ai-2-line:before{content:"\\f62a"}.ri-pencil-ai-fill:before{content:"\\f62b"}.ri-pencil-ai-line:before{content:"\\f62c"}.ri-remix-fill:before{content:"\\f62d"}.ri-remix-line:before{content:"\\f62e"}.ri-search-ai-2-fill:before{content:"\\f62f"}.ri-search-ai-2-line:before{content:"\\f630"}.ri-search-ai-3-fill:before{content:"\\f631"}.ri-search-ai-3-line:before{content:"\\f632"}.ri-search-ai-4-fill:before{content:"\\f633"}.ri-search-ai-4-line:before{content:"\\f634"}.ri-search-ai-fill:before{content:"\\f635"}.ri-search-ai-line:before{content:"\\f636"}.ri-speech-to-text-fill:before{content:"\\f637"}.ri-speech-to-text-line:before{content:"\\f638"}.ri-target-fill:before{content:"\\f639"}.ri-target-line:before{content:"\\f63a"}.ri-text-to-speech-fill:before{content:"\\f63b"}.ri-text-to-speech-line:before{content:"\\f63c"}.ri-wrench-fill:before{content:"\\f63d"}.ri-wrench-line:before{content:"\\f63e"}.ri-area-chart-fill:before{content:"\\f63f"}.ri-area-chart-line:before{content:"\\f640"}.ri-baseball-fill:before{content:"\\f641"}.ri-baseball-line:before{content:"\\f642"}.ri-binoculars-fill:before{content:"\\f643"}.ri-binoculars-line:before{content:"\\f644"}.ri-cursor-hand:before{content:"\\f645"}.ri-emotion-add-fill:before{content:"\\f646"}.ri-emotion-add-line:before{content:"\\f647"}.ri-file-scan-fill:before{content:"\\f648"}.ri-file-scan-line:before{content:"\\f649"}.ri-fiverr-fill:before{content:"\\f64a"}.ri-fiverr-line:before{content:"\\f64b"}.ri-font-serif:before{content:"\\f64c"}.ri-ghost-3-fill:before{content:"\\f64d"}.ri-ghost-3-line:before{content:"\\f64e"}.ri-gitee-fill:before{content:"\\f64f"}.ri-gitee-line:before{content:"\\f650"}.ri-global-off-fill:before{content:"\\f651"}.ri-global-off-line:before{content:"\\f652"}.ri-image-download-fill:before{content:"\\f653"}.ri-image-download-line:before{content:"\\f654"}.ri-image-upload-fill:before{content:"\\f655"}.ri-image-upload-line:before{content:"\\f656"}.ri-issues-fill:before{content:"\\f657"}.ri-issues-line:before{content:"\\f658"}.ri-issues-reopen-fill:before{content:"\\f659"}.ri-issues-reopen-line:before{content:"\\f65a"}.ri-network-error-fill:before{content:"\\f65b"}.ri-network-error-line:before{content:"\\f65c"}.ri-network-fill:before{content:"\\f65d"}.ri-network-line:before{content:"\\f65e"}.ri-network-off-fill:before{content:"\\f65f"}.ri-network-off-line:before{content:"\\f660"}.ri-piano-fill:before{content:"\\f661"}.ri-piano-grand-fill:before{content:"\\f662"}.ri-piano-grand-line:before{content:"\\f663"}.ri-piano-line:before{content:"\\f664"}.ri-plug-3-fill:before{content:"\\f665"}.ri-plug-3-line:before{content:"\\f666"}.ri-send-ins-fill:before{content:"\\f667"}.ri-send-ins-line:before{content:"\\f668"}.ri-signal-cellular-1-fill:before{content:"\\f669"}.ri-signal-cellular-1-line:before{content:"\\f66a"}.ri-signal-cellular-2-fill:before{content:"\\f66b"}.ri-signal-cellular-2-line:before{content:"\\f66c"}.ri-signal-cellular-3-fill:before{content:"\\f66d"}.ri-signal-cellular-3-line:before{content:"\\f66e"}.ri-signal-cellular-off-fill:before{content:"\\f66f"}.ri-signal-cellular-off-line:before{content:"\\f670"}.ri-stacked-chart-fill:before{content:"\\f671"}.ri-stacked-chart-line:before{content:"\\f672"}.ri-upwork-fill:before{content:"\\f673"}.ri-upwork-line:before{content:"\\f674"}.ri-brain-4-fill:before{content:"\\f675"}.ri-brain-4-line:before{content:"\\f676"}.ri-certificate-2-fill:before{content:"\\f677"}.ri-certificate-2-line:before{content:"\\f678"}.ri-certificate-fill:before{content:"\\f679"}.ri-certificate-line:before{content:"\\f67a"}.ri-cookie-fill:before{content:"\\f67b"}.ri-cookie-line:before{content:"\\f67c"}.ri-cursor-ai-fill:before{content:"\\f67d"}.ri-cursor-ai-line:before{content:"\\f67e"}.ri-draw-fill:before{content:"\\f67f"}.ri-draw-line:before{content:"\\f680"}.ri-ghost-4-fill:before{content:"\\f681"}.ri-ghost-4-line:before{content:"\\f682"}.ri-gitbook-fill:before{content:"\\f683"}.ri-gitbook-line:before{content:"\\f684"}.ri-grok-ai-fill:before{content:"\\f685"}.ri-grok-ai-line:before{content:"\\f686"}.ri-hand-2:before{content:"\\f687"}.ri-megaphone-2-fill:before{content:"\\f688"}.ri-megaphone-2-line:before{content:"\\f689"}.ri-microsoft-copilot-fill:before{content:"\\f68a"}.ri-microsoft-copilot-line:before{content:"\\f68b"}.ri-mosaic-fill:before{content:"\\f68c"}.ri-mosaic-line:before{content:"\\f68d"}.ri-qr-scan-ai-fill:before{content:"\\f68e"}.ri-qr-scan-ai-line:before{content:"\\f68f"}.ri-qwen-ai-fill:before{content:"\\f690"}.ri-qwen-ai-line:before{content:"\\f691"}.ri-reddit-2-fill:before{content:"\\f692"}.ri-reddit-2-line:before{content:"\\f693"}.ri-sim-card-warning-fill:before{content:"\\f694"}.ri-sim-card-warning-line:before{content:"\\f695"}.ri-space-ship-2-fill:before{content:"\\f696"}.ri-space-ship-2-line:before{content:"\\f697"}.ri-subreddit-fill:before{content:"\\f698"}.ri-subreddit-line:before{content:"\\f699"}.ri-zhipu-ai-fill:before{content:"\\f69a"}.ri-zhipu-ai-line:before{content:"\\f69b"}.ri-connector-fill:before{content:"\\f69c"}.ri-connector-line:before{content:"\\f69d"}html{height:100%}body{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:rgb(var(--surface-ground));color:rgb(var(--text-color));overscroll-behavior:none}app-root{display:flex;flex-direction:column;height:100%}body.theme-light{--primary-color: 98 101 241;--secondary-color: 16 185 129;--accent-color: 245 158 11;--surface-card: 255 255 255;--surface-100: 248 250 252;--surface-200: 226 232 240;--border-color: 203 213 225;--text-color: 15 23 42;--text-color-secondary: 100 116 139}body.theme-dark{--primary-color: 139 143 255;--secondary-color: 34 197 94;--accent-color: 251 191 36;--surface-card: 30 41 59;--surface-100: 51 65 85;--surface-200: 71 85 105;--border-color: 100 116 139;--text-color: 226 232 240;--text-color-secondary: 148 163 184}body.theme-ocean{--primary-color: 14 116 144;--secondary-color: 6 182 212;--accent-color: 249 115 22;--surface-card: 248 250 252;--surface-100: 240 249 255;--surface-200: 186 230 253;--border-color: 125 211 252;--text-color: 8 47 73;--text-color-secondary: 14 116 144}:host{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #d3d3d3;border-radius:10px}::-webkit-scrollbar-thumb{background:rgb(var(--primary-color, 98 101 241));border-radius:10px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--primary-color, 98 101 241) / .86)}.panel-scroll-body{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden}.panel-body{display:flex;flex-direction:column;gap:.95rem;min-height:0;padding:.35rem .15rem .6rem}.panel-body .child-panel{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.9rem;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));box-shadow:0 8px 22px #0f172a0f;padding:.9rem}.panel-body .child-panel__label{display:inline-flex;align-items:center;gap:.35rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--primary-color, 98 101 241));margin-bottom:.65rem}.panel-body .child-accordion{width:100%}.panel-body .child-panel :where(input,select,textarea){background:rgb(var(--surface-card, 255 255 255))}.canvas-content{height:calc(100dvh - 180px)}.p-slider.p-slider-horizontal{height:5px!important}.ri-add-line,.ri-subtract-line{width:25px;height:25px;background:#fff;border-radius:50%;color:#585858;border:1px solid #585858;line-height:1.9}:is(.ri-add-line,.ri-subtract-line):hover{border-color:#6265f1;color:#6265f1}.p-button-text:not(:disabled):hover{background:transparent!important}.slider-scale-box{background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.75rem;padding:.65rem;box-shadow:0 5px 14px #0f172a0d}@media(max-width:991px){.panel-scroll-body{max-height:unset}.canvas-content{height:auto;min-height:0;flex:1}.editor-main-box{min-height:auto}}@media(max-width:640px){.panel-body{gap:.65rem;padding:.25rem .1rem .5rem}.panel-body .child-panel{padding:.65rem}}@media(max-width:480px){.panel-body{gap:.5rem;padding:.2rem .1rem .4rem}.panel-body .child-panel{padding:.5rem;border-radius:.65rem}}.name-number-overlay-box .p-button,.name-number-overlay-box .p-button-icon,.name-number-overlay-box .p-button-label{color:#333!important;transform:none!important}.name-number-overlay-box .p-fileupload-choose-button,.name-number-overlay-box .p-fileupload-choose-button .p-button-label{color:#fff!important}.panel-body .p-accordion.p-component{width:100%}.p-accordioncontent[data-p-active=false] .p-accordioncontent-content{display:none}.manifest-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader .message{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader .loader{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader .loader{zoom:.44}}.manifest-loader .loader .box{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader .loader .box div{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader .loader .box div:before,.manifest-loader .loader .box div:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader .loader .box div:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader .loader .box.box0{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader .loader .box.box1{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader .loader .box.box2{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader .loader .box.box3{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader .loader .box.box4{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader .loader .box.box5{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader .loader .box.box6{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader .loader .box.box7{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader .loader .box0{animation-name:box-move0}.manifest-loader .loader .box0 div{animation-name:box-scale0}.manifest-loader .loader .box1{animation-name:box-move1}.manifest-loader .loader .box1 div{animation-name:box-scale1}.manifest-loader .loader .box2{animation-name:box-move2}.manifest-loader .loader .box2 div{animation-name:box-scale2}.manifest-loader .loader .box3{animation-name:box-move3}.manifest-loader .loader .box3 div{animation-name:box-scale3}.manifest-loader .loader .box4{animation-name:box-move4}.manifest-loader .loader .box4 div{animation-name:box-scale4}.manifest-loader .loader .box5{animation-name:box-move5}.manifest-loader .loader .box5 div{animation-name:box-scale5}.manifest-loader .loader .box6{animation-name:box-move6}.manifest-loader .loader .box6 div{animation-name:box-scale6}.manifest-loader .loader .box7{animation-name:box-move7}.manifest-loader .loader .box7 div{animation-name:box-scale7}@keyframes box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes mask{0%,65%{opacity:0}66%,to{opacity:1}}.p-accordion-panel:last-child .p-accordion-header{border:none!important}.viewer-container{width:100%;height:80%;display:block}:host ::ng-deep canvas[data-view]{width:100%!important;height:100%!important}.header{padding:12px 20px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a14}.header-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;margin-bottom:0;flex-wrap:wrap}.logo{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42))}.brand{display:flex;align-items:center;min-height:32px}.brand-logo-img{width:auto;height:32px;max-width:240px;object-fit:contain;display:block}.tabs{display:flex;gap:5px}.tab{padding:8px 20px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.tab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.tab:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12)}.header-right{display:flex;gap:10px;align-items:center}.btn-export,.btn-save{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost{padding:8px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-ghost:not(:disabled):hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.btn-export:hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.btn-export:disabled,.btn-save:disabled{opacity:.6;cursor:not-allowed}.btn-reset{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-reset:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--secondary-color, 16 185 129))}.btn-reset:disabled{opacity:.6;cursor:not-allowed}.btn-exit{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-exit:hover{background:rgb(var(--surface-100, 248 250 252));border-color:#ef4444}.btn-exit:disabled{opacity:.6;cursor:not-allowed}.btn-menu{padding:8px 12px;border:none;background:transparent;font-size:20px;cursor:pointer;color:rgb(var(--text-color-secondary, 100 116 139))}.unified-alignment-controls{display:flex;align-items:center;height:auto}.alignment-controls-container{display:flex;align-items:center;width:100%}.controls-group{display:flex;align-items:center;gap:16px;padding:10px 16px;background:linear-gradient(135deg,rgb(var(--surface-50, 248 250 252) / .8),rgb(var(--surface-100, 248 250 252) / .6));border:1px solid rgb(var(--border-color, 203 213 225) / .6);border-radius:8px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.toggle-buttons{display:flex;align-items:center;gap:6px;padding:0;background:rgb(var(--surface-card, 255 255 255));border-radius:6px;border:1px solid rgb(var(--border-color, 203 213 225))}.alignment-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;font-weight:500;cursor:pointer;border-radius:5px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.alignment-btn i{font-size:16px;display:flex;align-items:center}.alignment-btn .btn-label{white-space:nowrap;font-weight:500}.alignment-btn:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .08);color:rgb(var(--text-color, 15 23 42))}.alignment-btn.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4)}.alignment-btn.active:hover{background:rgb(var(--primary-color, 98 101 241) / .92)}.grid-size-section{display:flex;align-items:center}.grid-size-label{display:flex;flex-direction:column;gap:8px;cursor:pointer}.label-header{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:rgb(var(--text-color, 15 23 42));text-transform:uppercase;letter-spacing:.5px}.label-header i{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.slider-wrapper{display:flex;align-items:center;gap:10px;min-width:280px}.grid-size-slider{flex:1;height:6px;border-radius:3px;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .2),rgb(var(--primary-color, 98 101 241) / .1));outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.grid-size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-webkit-slider-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;border:none;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-moz-range-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-track{background:transparent;border:none}.grid-size-slider::-moz-range-progress{background:rgb(var(--primary-color, 98 101 241) / .3);border-radius:3px}.grid-size-value{display:flex;align-items:center;justify-content:center;min-width:56px;padding:4px 8px;font-size:12px;font-weight:500;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:4px;font-family:inherit}@media(max-width:1200px){.controls-group{gap:12px;padding:8px 12px}.slider-wrapper{min-width:220px}}@media(max-width:768px){.unified-alignment-controls{width:100%}.alignment-controls-container{flex-direction:column;gap:10px}.controls-group{flex-direction:column;gap:10px;width:100%}.toggle-buttons{width:100%;justify-content:space-between}.alignment-btn{flex:1;padding:10px 12px}.alignment-btn .btn-label{display:none}.grid-size-section,.grid-size-label{width:100%}.slider-wrapper{width:100%;min-width:unset}.grid-size-value{padding:6px 10px;font-size:11px}}@media(max-width:480px){.controls-group{padding:8px 10px;gap:8px}.toggle-buttons{gap:4px}.alignment-btn{padding:8px 10px;font-size:12px}.alignment-btn i{font-size:15px}.label-header{font-size:11px}.slider-wrapper{gap:8px}}.main-container{display:flex;height:calc(100dvh - 57px);background:rgb(var(--surface-100, 248 250 252))}.canvas-area{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgb(var(--border-color, 203 213 225));overflow:hidden}.canvas-area.canvas-area-single{grid-template-columns:1fr}.view-section{display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));position:relative;overflow:hidden}.view-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.view-header h3{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-header .view-controls{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.canvas-toolbar{position:absolute;top:70px;left:20px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-toolbar-2d{top:70px}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn:hover{background:rgb(var(--surface-100, 248 250 252))}.view-controls{display:flex;gap:5px}.view-btn,.view-btn-2d{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active,.view-btn-2d.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn:hover:not(.active),.view-btn-2d:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-content{flex:1;display:flex;align-items:center;justify-content:center}.jersey-model,.jersey-2d{display:flex;flex-direction:column;align-items:center;gap:20px}.model-text{text-align:center}.model-text h3{font-size:18px;color:#666;margin-bottom:5px}.model-text p{font-size:13px;color:#999}.canvas-footer{display:flex;justify-content:center;align-items:center;gap:20px;padding:16px;background:#fff;border-radius:0;margin:0;border-top:1px solid #e0e0e0}.zoom-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#666}.zoom-btn{width:32px;height:32px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.zoom-btn:hover{background:#f5f5f5}.zoom-value{min-width:50px;text-align:center;font-weight:500;color:#1a1a1a}.view-options{display:flex;gap:10px}.option-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:14px;border-radius:6px;transition:all .2s}.option-btn:hover{background:#f5f5f5}.right-panel{width:420px;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;box-shadow:inset 1px 0 #fffc}.right-panel>section{display:flex;flex:1;min-height:0}.right-panel-shell,.icon-nav-shell{display:flex;min-height:0;height:100%}.panel-icon-nav{width:90px;height:100%;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;justify-content:space-between}.icon-nav-list{display:flex;flex-direction:column;overflow:auto}.icon-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border:none;background:transparent;color:#666;font-size:11px;cursor:pointer;transition:all .2s;border-left:3px solid transparent}.icon-btn i{font-size:20px}.icon-btn.active{color:rgb(var(--primary-color, 98 101 241));border-left-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241) / .12)}.icon-btn:hover:not(.active){background:#f5f5f5}.icon-nav-bottom{display:flex;justify-content:center;gap:5px;padding:16px 10px;border-top:1px solid #e0e0e0}.icon-btn-small{width:36px;height:36px;padding:6px;border:none;background:transparent;color:#666;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.icon-btn-small:hover{background:#f0f0f0}.toggle-more-btn,.expanded-nav-menu,.mobile-canvas-toggle,.mobile-actions-bar{display:none}.panel-content{width:100%;display:flex;flex:1;flex-direction:column;min-height:0}.panel-content[style*="display: flex"]{display:flex!important}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255) / .98),rgb(var(--surface-100, 248 250 252) / .88));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.panel-header h2{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0 0 4px;letter-spacing:.01em}.panel-subtitle{font-size:13px;color:#666;margin:0}.help-btn{width:28px;height:28px;border:2px solid #2196f3;background:#fff;color:#2196f3;border-radius:50%;cursor:pointer;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-btn:hover{background:#2196f3;color:#fff}.panel-tabs{display:flex;border-bottom:2px solid #f0f0f0;padding:0 24px}.panel-tab{flex:1;padding:12px 16px;border:none;background:transparent;color:#666;font-size:14px;font-weight:500;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s}.panel-tab.active{color:#2196f3;border-bottom-color:#2196f3}.panel-tab:hover:not(.active){color:#333}.tab-content{flex:1;overflow-y:auto}.panel-body{flex:1}.color-list{padding:0}.color-item{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.color-item:hover{background:#f8f8f8}.color-preview{width:40px;height:40px;border-radius:50%;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.color-label{flex:1;font-size:15px;color:#1a1a1a;font-weight:400}.arrow-btn{width:32px;height:32px;border:none;background:transparent;color:#999;font-size:24px;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.arrow-btn:hover{background:#f0f0f0;color:#666}.custom-color-section{padding:24px}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:16px}.color-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}.color-swatch.white{background:#fff}.color-swatch.black{background:#000}.color-swatch.active{border-color:#1a1a1a;border-width:3px}.color-swatch.active:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.color-swatch.white.active:after{color:#1a1a1a}.color-swatch.add-color{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.color-swatch:hover{border-color:#999}.custom-color{margin-top:15px}.custom-color label{display:block;font-size:12px;color:#666;margin-bottom:8px}.color-input-group{display:flex;gap:10px;align-items:center}.color-input{flex:1;padding:10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#666}.color-picker{width:50px;height:42px;border:none;border-radius:6px;cursor:pointer;background:#000}.pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:15px}.pattern-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}.pattern-swatch.active{border-color:#1a1a1a;border-width:3px}.pattern-swatch.active:first-child:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.pattern-swatch:first-child{background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#666}.pattern-swatch.solid{background:#5a5a5a}.pattern-swatch.diagonal-lines{background:repeating-linear-gradient(45deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.dots{background:radial-gradient(circle,#5a5a5a 1px,transparent 1px);background-size:8px 8px}.pattern-swatch.horizontal-lines{background:repeating-linear-gradient(0deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.add-pattern{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.pattern-swatch:hover{border-color:#999}.slider-control{margin-top:15px}.slider-control label{display:block;font-size:12px;color:#666;margin-bottom:10px}.slider{width:100%;height:6px;border-radius:3px;background:#e0e0e0;outline:none;-webkit-appearance:none;appearance:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;box-shadow:0 2px 4px #0003}.slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;border:none;box-shadow:0 2px 4px #0003}.form-group{margin-bottom:16px}.form-group label{display:block;font-size:12px;color:#666;margin-bottom:8px;font-weight:500}.form-row{display:flex;gap:12px;margin-bottom:16px}.form-group.half{flex:1}.text-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;transition:all .2s}.text-input:focus{outline:none;border-color:#1a1a1a}.text-input::placeholder{color:#999}.number-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a}.dropdown{width:100%;padding:10px 32px 10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;background:#fff;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.dropdown:hover{border-color:#999}.dropdown.small{font-size:13px}.text-formatting{display:flex;gap:8px;margin-bottom:16px}.format-btn{flex:1;padding:10px;border:1px solid #e0e0e0;background:#fff;font-size:14px;font-weight:700;cursor:pointer;border-radius:6px;transition:all .2s}.format-btn.italic{font-style:italic;font-weight:700}.format-btn:hover{background:#f5f5f5;border-color:#999}.format-btn.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.upload-area{width:100%;padding:40px 20px;border:2px dashed #d0d0d0;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px;background:#fafafa}.upload-area:hover{border-color:#999;background:#f5f5f5}.upload-icon{width:48px;height:48px;margin:0 auto 12px;background:#e0e0e0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;color:#666}.upload-text{font-size:14px;color:#1a1a1a;margin-bottom:4px;font-weight:500}.upload-hint{font-size:12px;color:#999}.add-btn{width:100%;padding:12px;border:none;background:#1a1a1a;color:#fff;font-size:14px;font-weight:600;cursor:pointer;border-radius:6px;transition:all .2s}.add-btn:hover{background:#333}.button-row{display:flex;gap:10px}.action-btn{padding:10px 16px;border:1px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .2s}.action-btn.half{flex:1}.action-btn:hover{background:#f5f5f5;border-color:#999}.panel-content::-webkit-scrollbar,.tab-content::-webkit-scrollbar,.panel-body::-webkit-scrollbar{width:6px}.panel-content::-webkit-scrollbar-track,.tab-content::-webkit-scrollbar-track,.panel-body::-webkit-scrollbar-track{background:rgb(var(--surface-100, 248 250 252))}.panel-content::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb,.panel-body::-webkit-scrollbar-thumb{background:rgb(var(--surface-400, 148 163 184));border-radius:3px}.panel-content::-webkit-scrollbar-thumb:hover,.tab-content::-webkit-scrollbar-thumb:hover,.panel-body::-webkit-scrollbar-thumb:hover{background:rgb(var(--surface-500, 100 116 139))}.main-canvas-area{display:grid;grid-template-columns:1fr 1fr;min-height:0;background:rgb(var(--surface-100, 248 250 252));position:relative}.main-canvas-area.single{grid-template-columns:1fr}.view-section{position:relative;display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));overflow:hidden}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:1px solid rgb(var(--surface-300, 203 213 225))}.view-section.hidden{display:none}.editor-main-box{height:calc(100% - 112px);max-height:calc(100dvh - 112px)!important;align-items:stretch;overflow:hidden}.main-canvas-area.single{padding-right:20px}.main-canvas-area .view-section,.main-canvas-area .view-section>.view-section,.canvas-area,.canvas-area-single,.jersey-model,app-two-d-ui,app-three-d-ui{min-height:0;height:100%}.main-canvas-area.canvas-loading .view-section{pointer-events:none}.canvas-manifest-loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:rgb(var(--surface-0, 255 255 255));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@supports (color: color-mix(in lab,red,red)){.canvas-manifest-loader{background:color-mix(in srgb,rgb(var(--surface-0, 255 255 255)) 85%,transparent)}}.canvas-manifest-loader :where(.manifest-loader .loader){--primary: rgb(var(--primary-color, 98 101 241));width:160px;height:220px}.canvas-manifest-loader-subtitle{margin:0;font-size:.8125rem;font-weight:500;color:rgb(var(--text-color-secondary, 100 116 139))}.panel-scroll-body{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:.45rem .65rem .85rem}@media(max-width:1199px){.right-panel{width:360px}.panel-icon-nav{width:78px}.main-canvas-area.single{padding-right:12px}.main-canvas-area:not(.single){grid-auto-rows:1fr;grid-template-columns:1fr}}.mobile-panel-toggle{display:none}@media(max-width:991px){:host{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.header{flex-shrink:0}.editor-main-box{flex:1;min-height:0;display:flex;flex-direction:column;height:auto;padding-bottom:100px}.main-canvas-area{flex:1;min-height:0;width:100%;grid-template-columns:1fr;grid-auto-rows:1fr;padding:0;overflow-y:auto}.main-canvas-area:not(.single){grid-auto-rows:minmax(220px,1fr)}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:0;border-top:1px solid rgb(var(--surface-300, 203 213 225))}.right-panel-shell,.icon-nav-shell{flex-shrink:0;width:100%;height:auto}.right-panel,.panel-icon-nav{width:100%;height:auto;border-left:0;border-top:1px solid rgb(var(--surface-200, 226 232 240))}.right-panel{max-height:min(44svh,400px);overflow:hidden;background:rgb(var(--surface-card, 255 255 255))}.panel-content{display:flex;min-height:0}.panel-header{position:sticky;top:0;z-index:2;background:rgb(var(--surface-card, 255 255 255));padding:12px 16px 10px}.panel-header h2{font-size:16px;line-height:1.2}.panel-scroll-body{flex:1;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 8px 10px}.panel-icon-nav{position:fixed;bottom:0;left:0;width:100%;z-index:30;background:rgb(var(--surface-card, 255 255 255));box-shadow:0 -3px 14px #0f172a14;border-top:1px solid rgb(var(--surface-200, 226 232 240));z-index:9999999}.icon-nav-list{flex-direction:row;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:space-between;z-index:1024}.icon-nav-list::-webkit-scrollbar{display:none}.icon-btn{min-width:80px;min-height:52px;border-radius:10px;padding:8px;gap:4px;border-left:0;border-bottom:3px solid transparent;flex:0 0 auto;font-size:11px}.icon-btn.active{border-bottom-color:rgb(var(--primary-color, 98 101 241));border-left-color:transparent}.icon-nav-bottom{padding:8px;border-top:1px solid rgb(var(--surface-100, 248 250 252))}.icon-btn-small{width:40px;height:40px}.toggle-more-btn{display:flex}.expanded-nav-menu{display:flex;inset:auto 0 100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0f172a1a;border:1px solid rgb(var(--border-color, 203 213 225));border-left:none;border-right:none;border-bottom:none;padding:4px 8px;margin-bottom:-1px;gap:6px;justify-content:space-between}.expanded-nav-menu .icon-btn{min-width:80px;min-height:52px;border-left:0;border-bottom:3px solid transparent;padding:8px;width:auto}.mobile-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--surface-100, 248 250 252))}.mobile-panel-toggle{display:flex;align-items:center;gap:6px;padding:8px 14px;border:none;border-radius:6px;background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.mobile-panel-toggle:active{background:rgb(var(--primary-color, 98 101 241) / .2)}.mobile-panel-toggle i{font-size:18px;line-height:1}.main-canvas-area{position:relative}.mobile-panel-hidden .right-panel-shell{max-height:0!important;overflow:hidden!important;border-top:0!important;pointer-events:none}.mobile-panel-hidden .main-canvas-area{flex:1 1 100%}.mobile-canvas-hidden .main-canvas-area{display:none!important}.mobile-canvas-hidden .right-panel{max-height:none;height:100%;flex:1}.mobile-canvas-hidden .panel-scroll-body{max-height:100%!important}.mobile-canvas-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px;background:transparent;border:1px solid rgb(var(--surface-200, 226 232 240));border-radius:6px;color:rgb(var(--text-color, 15 23 42));font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;margin-left:auto}.mobile-canvas-toggle:active{background:rgb(var(--surface-100, 248 250 252))}.mobile-canvas-toggle i{font-size:16px}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}.brand-logo-img{height:24px}}@media(max-width:640px){.header{padding:8px 12px 0}.header>div{flex-wrap:wrap;gap:6px}.header-right{gap:6px;flex-wrap:wrap}.logo{font-size:17px}.btn-export,.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 10px}.main-canvas-area{grid-auto-rows:1fr}.right-panel{max-height:min(45svh,380px)}.panel-header{padding:10px 12px 8px}.panel-header h2{font-size:15px}.panel-scroll-body{max-height:min(38svh,310px);padding:0 6px 8px}.icon-btn{min-width:68px;min-height:50px;padding:6px 4px;font-size:10px}.icon-btn i{font-size:18px}.icon-nav-list{gap:2px;padding:4px 6px}.icon-nav-bottom{padding:4px 6px}.expanded-nav-menu .icon-btn{min-width:68px;min-height:50px}.mobile-panel-toggle{font-size:12px;padding:7px 14px;bottom:10px}.mobile-panel-toggle i{font-size:16px}}@media(max-width:480px){.header{padding:6px 10px 0}.logo{font-size:16px}.btn-export{display:none}.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 12px}.right-panel{max-height:min(46svh,360px)}.panel-scroll-body{max-height:min(39svh,235px)}.icon-btn{min-width:60px;min-height:48px;gap:3px;font-size:9px}.icon-btn i{font-size:17px}.expanded-nav-menu .icon-btn{min-width:60px;min-height:48px}.mobile-panel-toggle{font-size:11px;padding:6px 12px;gap:4px;bottom:8px}.mobile-panel-toggle i{font-size:15px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.editor-main-box{flex-direction:row;flex-wrap:nowrap}.main-canvas-area{flex:1;min-width:0;grid-template-columns:1fr;grid-auto-rows:100%}.mobile-panel-toggle{bottom:8px;left:auto;right:12px;transform:none;font-size:12px;padding:6px 12px}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{max-height:unset!important;width:0!important;overflow:hidden!important;border:none!important}.right-panel-shell{flex-direction:column;width:auto;height:100%;flex-shrink:0}.right-panel{width:280px;max-height:100%;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240))}.panel-scroll-body{max-height:100%}.icon-nav-shell{width:auto;height:100%;flex-shrink:0}.panel-icon-nav{width:64px;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240));box-shadow:none;overflow-y:auto}.icon-nav-list{flex-direction:column;overflow-x:visible;overflow-y:auto;padding:4px}.icon-btn{min-width:unset;min-height:52px;width:100%;border-bottom:0;border-left:3px solid transparent;font-size:9px}.icon-btn.active{border-left-color:rgb(var(--primary-color, 98 101 241));border-bottom-color:transparent}}.manifest-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92))}.save-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.manifest-error-card{width:min(520px,calc(100vw - 2rem));padding:1.25rem;border-radius:12px;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e2e8f0);box-shadow:0 10px 30px #02061726}.manifest-error-title{font-size:1rem;font-weight:700;color:var(--p-text-color, #0f172a);margin-bottom:.5rem}.manifest-error-message{color:var(--p-text-muted-color, #475569);margin-bottom:1rem;word-break:break-word}.manifest-retry-btn{appearance:none;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer;background:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-contrast-color, 255 255 255))}.manifest-retry-btn:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.toggle-text{position:absolute;top:50%;transform:translateY(-50%);font-size:14px;font-weight:500;transition:opacity .2s ease;line-height:0}.off-text{left:38px;color:rgb(var(--text-color, 15 23 42))}.on-text{right:38px;color:rgb(var(--primary-contrast-color, 255 255 255));opacity:0}.toggle-input:checked+.toggle-track{background:rgb(var(--primary-color, 98 101 241))}.toggle-input:checked+.toggle-track .off-text{opacity:0}.toggle-input:checked+.toggle-track .on-text{opacity:1}.toggle-input:checked~.toggle-knob{transform:translate(96px)}.child-accordion{width:100%!important}@media(min-width:992px)and (max-width:1350px){.mobile-panel-toggle{display:flex;align-items:center;gap:6px;position:absolute;bottom:20px;right:20px;z-index:20;padding:8px 18px;border:none;border-radius:999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 16px #6265f159;white-space:nowrap;transition:background .2s,box-shadow .2s,transform .15s}.mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 6px 20px #6265f16b}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{display:none!important}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}}.jersey-model{position:relative}.shortcuts-wrap{position:absolute;bottom:12px;right:12px;z-index:20}.shortcuts-fab{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:8px;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:18px;cursor:pointer;box-shadow:0 2px 8px #0f172a26;transition:all .2s}.shortcuts-fab:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.shortcuts-fab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 4px 12px rgb(var(--primary-color, 98 101 241) / .4)}.shortcuts-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:300px;height:360px;overflow-y:auto;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:10px;box-shadow:0 8px 24px #0f172a24;padding:.75rem}.shortcuts-popover-header{display:flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:700;color:rgb(var(--text-color, 15 23 42));padding-bottom:.6rem;margin-bottom:.25rem;border-bottom:1px solid rgb(var(--border-color, 203 213 225))}.shortcuts-popover-header i{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.mobile-canvas-hidden .panel-scroll-body{height:100%;max-height:100%}.mobile-canvas-hidden .panel-content,.mobile-canvas-hidden .right-panel,.mobile-canvas-hidden .right-panel-shell{height:100%}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-ease: initial}}}
4616
4616
  /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
4617
4617
  `],encapsulation:3,changeDetection:0})};var Pn={MANIFEST_LOADED:"manifest-loaded",SDK_READY:"sdk-ready",SUBMISSION_SUCCESS:"submission:success",SUBMISSION_FAILED:"submission:failed",ERROR:"error",CLOSED:"closed"};var e1=class extends Error{constructor(t,n){super(n);this.code=t}},WD=class extends HTMLElement{bootstrapped=!1;appRef=null;componentRef=null;hostElement=null;connectedCallback(){this.bootstrapped||(this.bootstrapped=!0,this.initialize())}disconnectedCallback(){this.destroyRuntime()}async saveDesign(){let e=this.componentRef?.instance;if(!e||typeof e.onSaveDesignClick!="function")throw new Error("Customizer save action is not available.");await e.onSaveDesignClick()}async initialize(){try{let e=this.readConfig();this.hostElement=document.createElement("div"),this.hostElement.style.height="100%",this.appendChild(this.hostElement),this.appRef=await tE({providers:[...Fk(),{provide:R_,useValue:{productId:e.productId,apiKey:e.apiKey,predesignId:e.predesignId,submissionNumber:e.submissionNumber,userUniqueId:e.userUniqueId,locale:e.locale,readonly:e.readonly,theme:e.theme,onManifestLoaded:t=>{this.emit(Pn.MANIFEST_LOADED,t)},onManifestLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onReady:t=>{this.emit(Pn.SDK_READY,t)},onSubmissionSuccess:t=>{this.emit(Pn.SUBMISSION_SUCCESS,t)},onSubmissionFailed:t=>{this.emit(Pn.SUBMISSION_FAILED,t)},onAssetLoadFailed:t=>{this.emit(Pn.ERROR,t),this.destroyRuntime()},onClose:()=>{this.emit(Pn.CLOSED,void 0)}}}]}),this.componentRef=KR(Q_,{environmentInjector:this.appRef.injector,hostElement:this.hostElement}),this.componentRef.setInput("apiKey",e.apiKey),this.componentRef.setInput("productId",e.productId),this.componentRef.setInput("predesignId",e.predesignId),this.componentRef.setInput("submissionNumber",e.submissionNumber),this.componentRef.setInput("userUniqueId",e.userUniqueId),this.appRef.attachView(this.componentRef.hostView)}catch(e){this.emit(Pn.ERROR,{code:this.resolveErrorCode(e),message:this.toMessage(e)}),this.destroyRuntime()}}readConfig(){let e=(this.getAttribute("api-key")??"").trim(),t=(this.getAttribute("product-id")??"").trim();if(!e||!t)throw new e1("INVALID_CONFIG","Missing required attributes: api-key and product-id are required.");return{apiKey:e,productId:t,predesignId:(this.getAttribute("predesign-id")??"")?.trim()??void 0,submissionNumber:(this.getAttribute("submission-number")??"")?.trim()??void 0,userUniqueId:(this.getAttribute("user-unique-id")??"")?.trim()??void 0,locale:(this.getAttribute("locale")??"").trim()||void 0,theme:(this.getAttribute("theme")??"").trim()||void 0,readonly:this.hasAttribute("readonly")}}resolveErrorCode(e){return e instanceof e1?e.code:"RUNTIME_ERROR"}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}toMessage(e){return e instanceof Error&&e.message?e.message:"Unexpected SDK runtime error."}destroyRuntime(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.appRef&&(this.appRef.destroy(),this.appRef=null),this.hostElement&&this.hostElement.parentElement===this&&this.removeChild(this.hostElement),this.hostElement=null,this.bootstrapped=!1}};function H4(){customElements.get("pixeasy-customizer")||customElements.define("pixeasy-customizer",WD)}var t1=class{element=null;containerEl=null;handlers=new Map;domUnsubscribers=[];open(e){this.close(!1);let t=this.resolveContainer(e.container),n=document.createElement("pixeasy-customizer");return n.setAttribute("api-key",e.apiKey),e.userUniqueId&&n.setAttribute("user-unique-id",e.userUniqueId),n.setAttribute("product-id",e.productId),e.predesignId&&n.setAttribute("predesign-id",e.predesignId),e.submissionNumber&&n.setAttribute("submission-number",e.submissionNumber),e.locale&&n.setAttribute("locale",e.locale),e.theme&&n.setAttribute("theme",e.theme),e.readonly&&n.setAttribute("readonly",""),this.bindDomEvents(n),t.appendChild(n),this.element=n,this.containerEl=t,this}on(e,t){let n=this.handlers.get(e)??new Set;return n.add(t),this.handlers.set(e,n),this}off(e,t){return this.handlers.get(e)?.delete(t),this}close(e=!0){return this.domUnsubscribers.forEach(t=>t()),this.domUnsubscribers=[],this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element),this.element=null,this.containerEl=null,e&&this.emit(Pn.CLOSED,void 0),this}async saveDesign(){if(!this.element)throw new Error("Customizer is not open.");let e=this.element;if(typeof e.saveDesign!="function")throw new Error("Save is not supported by the customizer runtime.");await Promise.resolve(e.saveDesign())}bindDomEvents(e){this.bind(e,Pn.MANIFEST_LOADED,t=>{this.emit(Pn.MANIFEST_LOADED,t.detail)}),this.bind(e,Pn.SDK_READY,t=>{this.emit(Pn.SDK_READY,t.detail)}),this.bind(e,Pn.SUBMISSION_SUCCESS,t=>{this.emit(Pn.SUBMISSION_SUCCESS,t.detail)}),this.bind(e,Pn.SUBMISSION_FAILED,t=>{this.emit(Pn.SUBMISSION_FAILED,t.detail)}),this.bind(e,Pn.ERROR,t=>{this.emit(Pn.ERROR,t.detail)}),this.bind(e,Pn.CLOSED,t=>{this.emit(Pn.CLOSED,t.detail)})}bind(e,t,n){e.addEventListener(t,n),this.domUnsubscribers.push(()=>e.removeEventListener(t,n))}emit(e,t){this.handlers.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error("Pixeasy builder event handler failed",r)}})}resolveContainer(e){if(typeof e!="string")return e;let t=document.getElementById(e);if(!t)throw new Error(`Container not found: ${e}`);return t}};function bae(){return new t1}H4();export{t1 as PixeasyBuilder,Pn as SDK_EVENTS,bae as createPixeasyBuilder,H4 as definePixeasyCustomizerElement,k_ as generateThumbnails};
4618
4618