(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._scaler_9odtm_1{width:var(--scale-adjust-width);height:var(--scale-adjust-height);overflow:hidden;transform-origin:top left;transform:translate(var(--scale-adjust-translate-x),var(--scale-adjust-translate-y)) scale(var(--scale-adjust-scale));transition:var(--scale-adjust-transition, transform .3s ease)}._scaler_parent_9odtm_14{overflow:hidden}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); (function(t,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.ScaleAdjust={}))})(this,function(t){"use strict";var f=Object.defineProperty;var y=(t,s,c)=>s in t?f(t,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):t[s]=c;var a=(t,s,c)=>y(t,typeof s!="symbol"?s+"":s,c);const o={scaler:"_scaler_9odtm_1",scaler_parent:"_scaler_parent_9odtm_14"};class h{constructor({el:e,width:n,height:l}){a(this,"element",null);a(this,"width");a(this,"height");a(this,"scale");a(this,"resizeObserver");a(this,"listeners",new Set);this.width=n,this.height=l,this.scale=1;const i=typeof e=="string"?document.querySelector(e):e;if(i){i.style.setProperty("--scale-adjust-width",`${n}px`),i.style.setProperty("--scale-adjust-height",`${l}px`),i.classList.add(o.scaler),this.element=i;const r=i.parentElement;r&&(r.classList.add(o.scaler_parent),this.resizeObserver=this.createResizeObserver(r))}}createResizeObserver(e){const n=new ResizeObserver(l=>{const{inlineSize:i,blockSize:r}=l[0].contentBoxSize[0];this.changeTransform(i,r)});return n.observe(e),n}changeTransform(e,n){const l=e/this.width,i=n/this.height,r=Math.min(l,i);if(r!==this.scale&&(this.scale=r,this.notifyListeners(r),this.element&&this.element.style.setProperty("--scale-adjust-scale",`${r}`)),this.element){const d=(e-this.width*r)/2,p=(n-this.height*r)/2;this.element.style.setProperty("--scale-adjust-translate-x",`${d}px`),this.element.style.setProperty("--scale-adjust-translate-y",`${p}px`)}}notifyListeners(e){this.listeners.forEach(n=>{n(e)})}onScale(e){this.listeners.add(e)}destroy(){var e;(e=this.resizeObserver)==null||e.disconnect()}}t.Scaler=h,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});