// @bun
var{defineProperty:G,getOwnPropertyNames:R,getOwnPropertyDescriptor:S}=Object,T=Object.prototype.hasOwnProperty;function U(j){return this[j]}var _=(j)=>{var q=(J??=new WeakMap).get(j),A;if(q)return q;if(q=G({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var B of R(j))if(!T.call(q,B))G(q,B,{get:U.bind(j,B),enumerable:!(A=S(j,B))||A.enumerable})}return J.set(j,q),q},J;var W=(j)=>j;function X(j,q){this[j]=W.bind(null,q)}var $=(j,q)=>{for(var A in q)G(j,A,{get:q[A],enumerable:!0,configurable:!0,set:X.bind(q,A)})};var Y=(j,q)=>()=>(j&&(q=j(j=0)),q);var b=import.meta.require;function H(j){return j.replace(/[;{}()]/g,"").replace(/url/gi,"")}function E(j,q){if(j.serverDynamic[q]!==void 0)return String(j.serverDynamic[q]);let A=j.static[q];if(typeof A==="string")return A;return}function F(j,q,A){let B=E(j,q);if(B!==void 0){let D=Number.parseInt(B,10);if(!Number.isNaN(D))return D}return A}var f;var Z=Y(()=>{f={name:"StxLoadingIndicator",aliases:["stx-loading-indicator"],render(j,q,A){let B=H(E(j,"color")||"#6366f1"),D=H(E(j,"initialColor")||E(j,"initial-color")||""),K=H(E(j,"height")||"3px"),L=F(j,"duration",2000),M=F(j,"throttle",200),O=F(j,"zIndex",999999)||F(j,"z-index",999999),Q=D?`linear-gradient(to right, ${D}, ${B})`:B;return`
<div id="stx-loading-indicator" style="position:fixed;top:0;left:0;right:0;height:${K};background:${Q};z-index:${O};transform:scaleX(0);transform-origin:left;transition:transform 0.1s ease-out,opacity 0.3s ease;opacity:0;pointer-events:none">
  <div style="position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.4) 50%,transparent 100%);animation:stx-shimmer 1.5s infinite"></div>
</div>
<style>@keyframes stx-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}</style>
<script>
(function(){var el=document.getElementById('stx-loading-indicator'),p=0,l=!1,i=null;function u(v){p=Math.min(Math.max(v,0),100);if(el){el.style.opacity=p>0?'1':'0';el.style.transform='scaleX('+(p/100)+')'}}window.stxLoading={start:function(){l=!0;p=0;u(10);if(i)clearInterval(i);i=setInterval(function(){if(!l)return;var r=90-p,inc=Math.max(0.5,r*0.1);if(p<90)u(p+inc)},${M})},finish:function(){l=!1;if(i){clearInterval(i);i=null}u(100);setTimeout(function(){if(el)el.style.opacity='0';setTimeout(function(){p=0;if(el)el.style.transform='scaleX(0)'},300)},200)},set:function(v){u(v)},clear:function(){l=!1;p=0;if(i){clearInterval(i);i=null}if(el){el.style.opacity='0';el.style.transform='scaleX(0)'}}};document.addEventListener('click',function(e){var a=e.target.closest&&e.target.closest('a');if(!a)return;var h=a.getAttribute('href');if(!h||h.startsWith('http')||h.startsWith('#')||h.startsWith('mailto:')||h.startsWith('tel:')||a.target==='_blank')return;window.stxLoading.start()});window.addEventListener('popstate',function(){window.stxLoading.start()});window.addEventListener('load',function(){window.stxLoading.finish()})})();
</script>`}}});Z();export{f as StxLoadingIndicatorBuiltin};
