@cat-of-summer/st-script 1.0.2
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.
- package/LICENSE +21 -0
- package/README.md +130 -0
- package/dist/app/form.esm.min.js +1 -0
- package/dist/app/form.min.js +2 -0
- package/dist/app.esm.min.js +1 -0
- package/dist/app.min.js +2 -0
- package/dist/cookie.esm.min.js +1 -0
- package/dist/cookie.min.js +2 -0
- package/dist/core.esm.min.js +1 -0
- package/dist/core.min.js +2 -0
- package/dist/index.esm.min.js +1 -0
- package/dist/index.min.js +2 -0
- package/dist/loader.esm.min.js +1 -0
- package/dist/loader.min.js +2 -0
- package/dist/modal.esm.min.js +1 -0
- package/dist/modal.min.js +2 -0
- package/dist/route.esm.min.js +1 -0
- package/dist/route.min.js +2 -0
- package/dist/select.esm.min.js +1 -0
- package/dist/select.min.js +2 -0
- package/dist/st_button_widget.esm.min.js +1 -0
- package/dist/st_button_widget.min.js +2 -0
- package/dist/st_links_widget.esm.min.js +1 -0
- package/dist/st_links_widget.min.js +2 -0
- package/dist/st_mask.esm.min.js +1 -0
- package/dist/st_mask.min.js +2 -0
- package/dist/st_observer.esm.min.js +1 -0
- package/dist/st_observer.min.js +2 -0
- package/dist/st_typograf.esm.min.js +1 -0
- package/dist/st_typograf.min.js +2 -0
- package/dist/st_validator.esm.min.js +1 -0
- package/dist/st_validator.min.js +2 -0
- package/dist/toggle.esm.min.js +1 -0
- package/dist/toggle.min.js +2 -0
- package/dist/uploader.esm.min.js +1 -0
- package/dist/uploader.min.js +2 -0
- package/package.json +35 -0
- package/src/_traits/hasInstanceSymbol.js +29 -0
- package/src/app/form/index.js +357 -0
- package/src/app/index.js +1040 -0
- package/src/cookie/index.js +141 -0
- package/src/core/index.js +159 -0
- package/src/index.js +16 -0
- package/src/loader/index.js +169 -0
- package/src/modal/index.js +297 -0
- package/src/route/index.js +208 -0
- package/src/select/index.js +210 -0
- package/src/st_button_widget/README.txt +62 -0
- package/src/st_button_widget/index.js +322 -0
- package/src/st_links_widget/README.txt +54 -0
- package/src/st_links_widget/index.js +294 -0
- package/src/st_mask/index.js +183 -0
- package/src/st_observer/index.js +426 -0
- package/src/st_typograf/index.js +200 -0
- package/src/st_validator/index.js +57 -0
- package/src/toggle/index.js +181 -0
- package/src/uploader/index.js +297 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var index=(()=>{var $=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var ee=Object.prototype.hasOwnProperty;var te=(c,e)=>{for(var t in e)$(c,t,{get:e[t],enumerable:!0})},ie=(c,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Q(e))!ee.call(c,s)&&s!==t&&$(c,s,{get:()=>e[s],enumerable:!(i=Z(e,s))||i.enumerable});return c};var se=c=>ie($({},"__esModule",{value:!0}),c);var ne={};te(ne,{App:()=>T,Cookie:()=>O,Core:()=>C,Loader:()=>S,Modal:()=>M,Route:()=>R,Select:()=>N,Toggle:()=>j,Uploader:()=>q,st_button_widget:()=>B,st_links_widget:()=>U,st_mask:()=>X,st_observer:()=>Y,st_typograf:()=>F,st_validator:()=>J});var V=Symbol(),k=c=>{try{return c instanceof Element?c:document.querySelector(c)}catch{return}},E=c=>{if(c==null)return[];if(c instanceof Element)return[c];if(c instanceof NodeList||c instanceof HTMLCollection)return[...c];if(Array.isArray(c))return c.flatMap(E);try{return[...document.querySelectorAll(c)]}catch{return[]}},x=c=>k(c)?.[V],w=(c,e)=>(c&&(c[V]=e),c);var C=class{static merge(...e){let t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s)&&(Object.getPrototypeOf(s)??Object.prototype)===Object.prototype,i=(s,n)=>{if(typeof s=="function"&&typeof n=="function")return(...o)=>i(s(...o),n(...o));if(!(Array.isArray(s)&&Array.isArray(n)||t(s)&&t(n)))return n;let r=Array.isArray(s)?s.slice():{...s};for(let[o,l]of Object.entries(n))r[o]=o in r?i(r[o],l):l;return r};return e.reduce(i,{})}static generate_unique_prefix(e){return e={characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",length:16,...e},[...Array(e.length)].map(t=>e.characters[Math.random()*e.characters.length|0]).join("")}static fetch(e){e instanceof HTMLFormElement&&(e={url:e.getAttribute("action")||"",method:e.getAttribute("method")||"",data:new FormData(e)}),e={url:"",method:"",data:null,headers:{},timeout:0,response_type:"",...e};let t={beforeSend:[e.before_send],onSend:[e.on_send],onSuccess:[e.on_success],onComplete:[e.on_complete],onFailed:[e.on_failed]},i,s,n,r=!1,o=new Promise((u,h)=>(s=u,n=h)),l=(u,h)=>{for(let p of t[u])if(p)try{p(h)}catch(d){console.error(`st_ajax: ${u} error`,d)}},a={then:(u,h)=>o.then(u,h),catch:u=>o.catch(u),finally:u=>o.finally(u),abort:()=>i?.abort()};for(let u of Object.keys(t))a[u]=h=>(t[u].push(h),a);let f=u=>{if(r)return;r=!0;let h=u instanceof XMLHttpRequest?{status:u.status,status_text:u.statusText,response:u.responseText,request:u}:{status:void 0,status_text:"",response:u};l("onFailed",h),n(h)};return queueMicrotask(()=>{try{let u=e.url,h=e.method,p;if(l("beforeSend",e),e.data instanceof FormData?p=e.data:e.data instanceof HTMLFormElement?(u=u||e.data.getAttribute("action"),h=h||e.data.getAttribute("method"),p=new FormData(e.data)):p=e.data,u=u||window.location.href,h=h?h.toUpperCase():"GET",p&&typeof p=="object")if(h=="GET"){let d=p instanceof FormData?new URLSearchParams(p).toString():Object.entries(p).map(([g,y])=>`${encodeURIComponent(g)}=${encodeURIComponent(y)}`).join("&");d&&(u+=(/\?.+=/.test(u)?"&":"?")+d),p=null}else p instanceof FormData||(p=JSON.stringify(e.data),Object.keys(e.headers).some(d=>d.toLowerCase()=="content-type")||(e.headers["Content-Type"]="application/json"));if(i=new XMLHttpRequest,e.response_type)try{i.responseType=e.response_type}catch{}e.timeout>0&&Number.isFinite(e.timeout)&&(i.timeout=e.timeout),i.onerror=i.ontimeout=()=>f(i),i.onreadystatechange=()=>{if(i.readyState!==4)return;let d;if(i.status>=200&&i.status<300){if(i.responseType)d=i.response;else{let g=i.getResponseHeader("Content-Type")||e.response_type||"";if(g.includes("/json"))try{d=JSON.parse(i.responseText)}catch{d=i.responseText}else g.includes("/xml")?d=new DOMParser().parseFromString(i.responseText,"application/xml"):g.includes("/html")?d=new DOMParser().parseFromString(i.responseText,"text/html"):d=i.responseText}l("onSuccess",{data:d,request:i}),r=!0,s({data:d,request:i})}else f(i);l("onComplete",{data:d,request:i})},i.open(h,u,!0);for(let d in e.headers)if(Object.prototype.hasOwnProperty.call(e.headers,d))try{i.setRequestHeader(d,e.headers[d])}catch{}i.send(p),l("onSend",{detail:e})}catch(u){f(u)}}),a}};var S=class c{#e={};#t=null;static find=x;static HOOKS=["before_load","on_load","before_paste","on_paste","on_failed","on_complete","before_init","on_init"];static html(e,...t){let i=Array.isArray(e)?e.reduce((s,n,r)=>s+t[r-1]+n):e;return new DOMParser().parseFromString(i,"text/html").body.firstElementChild}get params(){let e={};for(let[t,i]of Object.entries(this.#e))typeof i!="function"&&t!="formats"&&(e[t]=i);return e}get loading(){return!!this.#t}html=c.html;clone(e={}){return new c({...this.#e,...e,formats:{...this.#e.formats,...e.formats},parent:this})}constructor(e){this.#e={target:null,source:null,mode:"append",multiple:!0,allow_interrupt:!1,formats:{},render(t){return t},before_load:()=>{},on_load:()=>{},before_paste:()=>{},on_paste:()=>{},on_failed:()=>{},on_complete:()=>{},before_init:()=>{},on_init:()=>{},...e},this.#e.before_init.call(this,this.#e),this.target=k(this.#e.target),this.target&&w(this.target,this),this.#e.on_init.call(this,this.#e)}#s(e){return e instanceof Document?"html":typeof e=="string"?"text":"json"}#o(e){let t=this.#e,i=t.formats?.[e]??{},s={};for(let n of new Set([...Object.keys(t),...Object.keys(i)])){if(n=="formats")continue;let r=t[n],o=i[n],l;n in i&&n in t&&c.HOOKS.includes(n)&&typeof r=="function"&&typeof o=="function"?l=n=="on_load"?(a,f,u)=>{let h=r.call(this,a,f,u)??f;return o.call(this,a,h,u)??h}:(...a)=>{r.apply(this,a),o.apply(this,a)}:l=n in i?o:r,s[n]=typeof l=="function"?l.bind(this):l}return s}#c(e,t,i){if(i=="html"){let s=e.body??e.documentElement??e;return t.source?t.multiple?[...s.querySelectorAll(t.source)]:s.querySelector(t.source):t.multiple?[...s.children]:s.firstElementChild}return i=="json"&&t.source?t.source.split(".").reduce((s,n)=>s?.[n],e):e}load(e={}){let{mode:t,...i}=typeof e=="string"?{url:e}:e;if(this.#t){if(!this.#e.allow_interrupt)return this;this.#t.abort()}this.target?.setAttribute("state","loading"),this.#e.before_load.call(this,i);let s=C.fetch(i).onSuccess(({data:n,request:r})=>{let o=this.#s(n),l=this.#o(o),a=this.#c(n,l,o);a=l.on_load(n,a,r)??a;let f=[],u=l.multiple?a?.length??0:1;for(let d=0;d<u;d++){let g=l.multiple?a?.[d]:a,y=l.render(g,d);y instanceof Node&&f.push(y)}l.before_paste(f);let h=document.createDocumentFragment();f.forEach(d=>h.append(d));let p=t??l.mode;this.target&&(p=="replace"?this.target.replaceChildren(h):p=="prepend"?this.target.prepend(h):this.target.append(h)),l.on_paste(f,n)}).onFailed(n=>this.#e.on_failed.call(this,n)).onComplete(n=>this.#e.on_complete.call(this,n));return s.finally(()=>{this.#t===s&&(this.#t=null,this.target?.setAttribute("state","loaded"))}),this.#t=s,this}abort(){return this.#t?.abort(),this}};var T=class c extends HTMLElement{static#e=new Set(["disabled","checked","readonly","required","selected","hidden","open","autofocus"]);static#t=new Map;static#s=new Set;static create(e){let{app:t,setup:i=()=>{},template:s="",events:n={}}=e;if(c.#t.has(t))throw new Error(`Application "${t}" already exists!`);c.#t.set(t,{setup:i,template:s,events:n,config:e}),c.#s.forEach(r=>{r.#o!==!0&&r.#R()})}static extend(e,t={}){let i=c.#t.get(e);if(!i)throw new Error(`Application "${e}" not found!`);let s=i.config,n={...s,...t};return(s.events||t.events)&&(n.events={...s.events,...t.events}),c.create(n)}#o=!1;#c="";#h=!1;#n=new Map;#d=null;#l=new Set;#p=!1;#i=[];#r=null;#f=new Map;#u=null;#a=[];#g=new Set;#k=!1;#m=new Map;#T=0;constructor(){super(),c.#s.add(this)}#v(e){!e||!e.length||e.forEach(t=>{if(t.type==="event"&&t.element&&t.handler)t.element.removeEventListener(t.eventName,t.handler);else if(t.type==="model"&&t.element&&t.handler){let i=t.element.tagName==="SELECT"?"change":"input";t.element.removeEventListener(i,t.handler)}else t.type==="attrSync"&&t.unwatch&&t.unwatch();t.effect&&(this.#n.forEach((i,s)=>{i.delete(t.effect),i.size===0&&this.#n.delete(s)}),this.#l.delete(t.effect))})}get template(){return this.#c}get attrs(){return{get:e=>this.getAttribute(e),set:(e,t)=>this.setAttribute(e,t),remove:e=>this.removeAttribute(e),has:e=>this.hasAttribute(e),toggle:(e,t)=>this.toggleAttribute(e,t),keys:()=>Array.from(this.attributes).map(e=>e.name),entries:()=>Array.from(this.attributes).map(e=>[e.name,e.value])}}addEventListener(e,t,i){if((e==="setup"||e==="rendered")&&this.#h){queueMicrotask(()=>t(new CustomEvent(e)));return}super.addEventListener(e,t,i)}dispatchEvent(e,t=null,i={}){if(typeof e=="string"){let s=new CustomEvent(e,{cancelable:!0,...i,detail:t});return super.dispatchEvent(s)}return super.dispatchEvent(e)}applyTemplate(e=""){let t=e||this.#c;if(this.#v(this.#i),this.#i=[],this.innerHTML="",t){let s=document.createElement("template");s.innerHTML=t.trim();let n=s.content.cloneNode(!0);Array.from(n.childNodes).forEach(r=>this.#x(r)),this.#j(n)}let i=++this.#T;new Promise(s=>{let n=null,r,o=()=>{clearTimeout(n),n=setTimeout(()=>{r.disconnect(),this.#L(Array.from(this.children)).then(s)},0)};r=new MutationObserver(l=>{l.some(a=>a.type==="childList")&&o()}),r.observe(this,{childList:!0}),o()}).then(()=>{i===this.#T&&(this.#h=!0,this.dispatchEvent("rendered"))})}#j(e){HTMLElement.prototype.appendChild.call(this,e)}clone(e={}){let t=this.attrs.get("app");return c.extend(t,e)}watch(e,t,i={}){if(typeof t!="function")return()=>{};let{deep:s=!1,immediate:n=!1}=i;if(typeof e=="string"&&e.endsWith("()")){let r=e.slice(0,-2),o=this[r];if(typeof o!="function")return()=>{};let l=this.#m.get(r);if(!l){l={original:o,handlers:[]},this.#m.set(r,l);let f=(...u)=>{let h=o.apply(this,u),p=d=>{for(let g of[...l.handlers])g.callback(u,d,g.unwatch)};return h instanceof Promise?h.then(d=>(p(d),d)):(p(h),h)};this[r]=f}let a=()=>{let f=l.handlers.findIndex(u=>u.unwatch===a);f!==-1&&l.handlers.splice(f,1),l.handlers.length===0&&(this[r]=l.original,this.#m.delete(r))};return l.handlers.push({callback:t,unwatch:a}),a}if(typeof e=="string"){let r=e,o=()=>{let a=this.#a.findIndex(f=>f.unwatch===o);a!==-1&&this.#a.splice(a,1)},l={type:"key",key:r,callback:t,deep:s,immediate:n,lastValue:void 0,unwatch:o};if(this.#a.push(l),n){let a=this.#O(r);l.lastValue=s&&a!==null&&typeof a=="object"?JSON.parse(JSON.stringify(a)):a,t(a,void 0,o)}return o}if(typeof e=="function"){let r=e,o,l={type:"getter",getter:r,callback:t,deep:s,lastValue:o,effect:null,unwatch:null};this.#a.push(l);let a=()=>{let h=this.#a.indexOf(l);h!==-1&&this.#a.splice(h,1),l.effect&&(this.#n.forEach((p,d)=>{p.delete(l.effect),p.size===0&&this.#n.delete(d)}),this.#l.delete(l.effect))};l.unwatch=a;let f=()=>{let h=r.call(this);if(s?!this.#C(h,o):h!==o){let d=o;o=s&&h!==null&&typeof h=="object"?JSON.parse(JSON.stringify(h)):h,t(h,d,l.unwatch)}},u=this.#_(f);return l.effect=u,a}return()=>{}}unwatch(){[...this.#a].forEach(e=>e.unwatch()),this.#m.forEach(e=>{[...e.handlers].forEach(t=>t.unwatch())})}hasWatchers(){let e=0;return this.#m.forEach(t=>{e+=t.handlers.length}),this.#a.length+e}watched(e,t,i={}){if(typeof e=="string"&&e.endsWith("()")){let s=e.slice(0,-2),n=this.#m.get(s);n&&[...n.handlers].forEach(r=>r.unwatch())}else typeof e=="string"?this.#a.filter(s=>s.type==="key"&&s.key===e).forEach(s=>s.unwatch()):typeof e=="function"&&this.#a.filter(s=>s.type==="getter"&&s.getter===e).forEach(s=>s.unwatch());return this.watch(e,t,i)}#E(e){this.#d&&(this.#n.has(e)||this.#n.set(e,new Set),this.#n.get(e).add(this.#d))}#y(e){this.#g.add(e);let t=this.#n.get(e);if(t&&t.forEach(s=>this.#l.add(s)),this.#p){this.#k=!0;return}this.#p=!0;let i=()=>{this.#l.forEach(r=>{try{r()}catch(o){console.error("Effect execution error:",o)}}),this.#l.clear();let s=Array.from(this.#g),n=new Set;for(let r of s)for(let o of this.#a){if(o.type!=="key")continue;(o.key===r||o.deep&&(r===o.key||r.startsWith(o.key+".")))&&n.add(o)}for(let r of n){if(r.type!=="key")continue;let o=this.#O(r.key);if(!(r.deep?!this.#C(o,r.lastValue):o!==r.lastValue))continue;let a=r.lastValue;r.lastValue=r.deep&&o!==null&&typeof o=="object"?JSON.parse(JSON.stringify(o)):o,r.callback(o,a,r.unwatch)}this.#g.clear(),this.#p=!1,this.#k&&(this.#k=!1,this.#p=!0,Promise.resolve().then(i))};Promise.resolve().then(i)}#O(e){return e.split(".").reduce((t,i)=>t?.[i],this)}#C(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;let i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(let n of i)if(!s.includes(n)||!this.#C(e[n],t[n]))return!1;return!0}#w(e,t=[]){if(e===null||typeof e!="object"||e.__isReactive)return e;let i=this;return new Proxy(e,{get(n,r,o){if(r==="__isReactive")return!0;let l=typeof r=="symbol"?"<symbol>":r,a=[...t,l].join(".");i.#E(a);let f=Reflect.get(n,r,o);return f!==null&&typeof f=="object"&&!f.__isReactive?i.#w(f,[...t,l]):f},set(n,r,o,l){if(n[r]===o)return!0;let f=Reflect.set(n,r,o,l),u=typeof r=="symbol"?"<symbol>":r,h=[...t,u].join(".");if(i.#y(h),Array.isArray(n)&&(r==="length"||!isNaN(r))){let p=t.join(".");p&&i.#y(p)}return f},deleteProperty(n,r){let o=Reflect.deleteProperty(n,r),l=typeof r=="symbol"?"<symbol>":r,a=[...t,l].join(".");return i.#y(a),o}})}#M(e,t){let i=this;return new Proxy(e,{apply(s,n,r){let o=Reflect.apply(s,i,r);return o instanceof Promise?o.then(l=>(i.#y(t),l)):(i.#y(t),o)}})}#_(e){let t=this.#r?{...this.#r}:null,i=()=>{let s=null;if(t){s={};for(let n of Object.keys(t))s[n]=this[n],this[n]=t[n]}this.#d=i;try{e()}finally{if(this.#d=null,s)for(let n of Object.keys(s))s[n]!==void 0?this[n]=s[n]:delete this[n]}};return i(),i}#b(e){try{return new Function("$event",`with(this) { return (${e}); }`).call(this)}catch(t){console.warn("Expression evaluation error:",e,t);return}}#N(e,t=null){try{return new Function("$event",`with(this) { ${e} }`).call(this,t)}catch(i){console.error("Statement execution error:",e,i)}}#F(e){let t=e.nodeValue,i=[],s=[],n=0,r=/\{\{(.+?)\}\}/g,o;for(;(o=r.exec(t))!==null;){o.index>n&&i.push(t.substring(n,o.index));let a=o[1].trim();i.push(null),s.push({index:i.length-1,expr:a}),n=r.lastIndex}n<t.length&&i.push(t.substring(n));let l=this.#_(()=>{s.forEach(({index:a,expr:f})=>{let u=this.#b(f);i[a]=u==null?"":String(u)}),e.nodeValue=i.join("")});this.#i.push({type:"text",node:e,effect:l})}#q(e,t){let i=t.name.slice(1),s=t.value,n=this.#r?{...this.#r}:null,r=o=>{if(n){let l={};for(let a of Object.keys(n))l[a]=this[a],this[a]=n[a];this.#N(s,o);for(let a of Object.keys(l))l[a]!==void 0?this[a]=l[a]:delete this[a]}else this.#N(s,o)};e.addEventListener(i,r),this.#i.push({type:"event",element:e,eventName:i,handler:r})}#$(e,t){let i=t.value,s=this.#_(()=>{this.#b(i)?e.style.display="":e.style.display="none"});this.#i.push({type:"show",element:e,effect:s})}#I(e,t){let i=t.value,s=this.#_(()=>{let l=this.#b(i);e.tagName==="INPUT"&&e.type==="checkbox"?e.checked=!!l:e.tagName==="INPUT"&&e.type==="radio"?e.checked=e.value===l:e.tagName==="SELECT"?e.value=l:e.value=l??""}),n=this.#r?{...this.#r}:null,r=e.tagName==="SELECT"?"change":"input",o=l=>{let a;if(e.type==="checkbox"?a=e.checked:e.type==="number"||e.type==="range"?a=e.valueAsNumber:a=e.value,n){let f={};for(let u of Object.keys(n))f[u]=this[u],this[u]=n[u];try{new Function("value",`with(this) { ${i} = value; }`).call(this,a)}catch(u){console.error("Model binding error:",i,u)}for(let u of Object.keys(f))f[u]!==void 0?this[u]=f[u]:delete this[u]}else try{new Function("value",`with(this) { ${i} = value; }`).call(this,a)}catch(f){console.error("Model binding error:",i,f)}};e.addEventListener(r,o),this.#i.push({type:"model",element:e,effect:s,handler:o})}#z(e,t){let i=t.value,s=document.createComment(`if: ${i}`);e.parentNode.insertBefore(s,e);let n=[{expr:i,element:e,bindings:[],processed:!1}],r=e.nextElementSibling;for(;r;)if(r.hasAttribute("#else-if")){let a=r.getAttribute("#else-if");n.push({expr:a,element:r,bindings:[],processed:!1}),r.removeAttribute("#else-if");let f=r.nextElementSibling;r.remove(),r=f}else if(r.hasAttribute("#else")){n.push({expr:"true",element:r,bindings:[],processed:!1}),r.removeAttribute("#else"),r.remove();break}else break;e.removeAttribute(t.name),e.remove();let o=null,l=this.#_(()=>{let a=null;for(let f of n)if(this.#b(f.expr)){a=f;break}if(o!==a){if(o&&(o.element&&o.element.parentNode&&o.element.remove(),this.#v(o.bindings),o.bindings=[]),a&&(s.parentNode.insertBefore(a.element,s.nextSibling),!a.processed)){let f=this.#i.length;this.#x(a.element),a.bindings=this.#i.slice(f),a.processed=!0}o=a}});this.#i.push({type:"conditional",placeholder:s,chain:n,effect:l})}#H(e,t){let i=t.value,s=i.match(/^\s*(\w+)\s+in\s+(.+)$/);if(!s){console.error("Invalid for syntax:",i);return}let n=s[1],r=s[2],o=e.parentNode,l=e.nextSibling;e.removeAttribute(t.name);let a=e.cloneNode(!0);e.remove();let f=[],u=this.#_(()=>{let h=this.#b(r);f.forEach(g=>{g.node&&g.node.parentNode&&g.node.remove(),this.#v(g.bindings)}),f=[];let p;if(Array.isArray(h))p=h.map((g,y)=>({value:g,key:void 0,index:y}));else if(h!==null&&typeof h=="object")p=Object.entries(h).map(([g,y],_)=>({value:y,key:g,index:_}));else return;if(p.length===0)return;let d=document.createDocumentFragment();p.forEach(({value:g,key:y,index:_})=>{let m=a.cloneNode(!0),v=this[n],b=this.$index,L=this.$key;this[n]=g,this.$index=_,y!==void 0&&(this.$key=y);let A=this.#r,W={...A,[n]:g,$index:_};y!==void 0&&(W.$key=y),this.#r=W;let K=this.#i.length;this.#x(m);let G=this.#i.slice(K);this.#r=A,v!==void 0?this[n]=v:delete this[n],b!==void 0?this.$index=b:delete this.$index,L!==void 0?this.$key=L:delete this.$key,d.appendChild(m),f.push({node:m,bindings:G})}),o.insertBefore(d,l)});this.#i.push({type:"loop",parent:o,nextSibling:l,template:a,effect:u})}#P(e,t){let i=t.name,s=t.value,n=[],r=[],o=0,l=/\{\{(.+?)\}\}/g,a;for(;(a=l.exec(s))!==null;){a.index>o&&n.push(s.substring(o,a.index));let u=a[1].trim();n.push(null),r.push({index:n.length-1,expr:u}),o=l.lastIndex}o<s.length&&n.push(s.substring(o));let f=this.#_(()=>{r.forEach(({index:h,expr:p})=>{let d=this.#b(p);n[h]=d==null?"":String(d)});let u=n.join("");c.#e.has(i)?u===""||u==="false"||u==="0"||u==="null"||u==="undefined"||!u?e.removeAttribute(i):e.setAttribute(i,""):e.setAttribute(i,u)});this.#i.push({type:"attribute",element:e,attrName:i,effect:f})}#D(e){let t=Array.from(e.attributes);for(let i of t){if(i.name==="#if")return this.#z(e,i),e.removeAttribute(i.name),!0;if(i.name==="#for")return this.#H(e,i),e.removeAttribute(i.name),!0;if(i.name==="#show")this.#$(e,i),e.removeAttribute(i.name);else if(i.name==="#model")this.#I(e,i),e.removeAttribute(i.name);else if(i.name==="#once")e.removeAttribute(i.name);else{if(i.name==="#pre")return e.removeAttribute(i.name),!0;i.name.startsWith("@")?(this.#q(e,i),e.removeAttribute(i.name)):/\{\{.+?\}\}/.test(i.value)&&this.#P(e,i)}}return!1}#x(e){if(e.nodeType===Node.ELEMENT_NODE){let t=this.#D(e);if(e.localName==="st-app")return;!t&&(e.parentNode||e.childNodes.length>0)&&Array.from(e.childNodes).forEach(i=>this.#x(i))}else e.nodeType===Node.TEXT_NODE&&/\{\{.+?\}\}/.test(e.nodeValue)&&this.#F(e)}#R(){let e=this.attrs.get("app"),t=c.#t.get(e);if(t){this.addEventListener("setup",t.setup),Object.entries(t.events).forEach(([r,o])=>this.addEventListener(r,o)),this.#c=t.template;let i=t.config,s=Object.getOwnPropertyDescriptors(i),n=new Set(["app","setup","template","events"]);Object.entries(s).forEach(([r,o])=>{if(!n.has(r)){if(o.get){let l=o.get;this.#f.set(r,l),Object.defineProperty(this,r,{get(){return this.#E(r),l.call(this)},enumerable:o.enumerable,configurable:!0})}else if(o.value!==void 0){let l=o.value,a=l;typeof l=="object"&&l!==null?a=this.#w(l,[r]):typeof l=="function"&&(a=this.#M(l,r)),Object.defineProperty(this,r,{get(){return this.#E(r),a},set(f){a!==f&&(typeof f=="object"&&f!==null?a=this.#w(f,[r]):a=f,this.#y(r))},enumerable:!0,configurable:!0})}}}),typeof this.#o=="function"&&this.#o(),this.#o=!0}else this.attrs.get("app")||(typeof this.#o=="function"&&this.#o(),this.#o=!0)}async#L(e){await Promise.all(e.map(t=>new Promise(i=>{let s=null,n=()=>{clearTimeout(s),s=setTimeout(()=>{r.disconnect(),this.#L(Array.from(t.children)).then(i)},0)},r=new MutationObserver(o=>{o.some(l=>l.type==="childList")&&n()});r.observe(t,{childList:!0}),n()})))}#S(e){return e==null?"":e===!0?"true":e===!1?"false":typeof e=="number"?String(e):typeof e=="object"?JSON.stringify(e):String(e)}#A(e){if(!e.startsWith(":")||e==="app")return;let t=e.replace(/^:+/,""),i=this.getAttribute(e),s=Object.getOwnPropertyDescriptor(this,t),n=i;if(!i&&s&&(s.get||s.value!==void 0)){let r=this[t],o=this.#S(r);this.getAttribute(e)!==o&&this.setAttribute(e,o),n=r,s=null}if(!(s&&s.set===void 0&&s.writable===!1)&&!(s&&s.get!==void 0&&s.set===void 0)){if(i)if(i==="true")n=!0;else if(i==="false")n=!1;else if(/^-?\d+(\.\d+)?$/.test(i))n=Number(i);else try{n=JSON.parse(i)}catch{n=i}if(!s||!s.set){let r=n;typeof n=="object"&&n!==null?r=this.#w(n,[t]):typeof n=="function"&&(r=this.#M(n,t));let o=e;if(Object.defineProperty(this,t,{get(){return this.#E(t),r},set(l){if(r!==l){typeof l=="object"&&l!==null?r=this.#w(l,[t]):r=l,this.#y(t);let a=this.#S(l);this.getAttribute(o)!==a&&this.setAttribute(o,a)}},enumerable:!0,configurable:!0}),typeof n=="object"&&n!==null){let l=this.watch(t,()=>{let a=this[t],f=this.#S(a);this.getAttribute(e)!==f&&this.setAttribute(e,f)},{deep:!0});this.#i.push({type:"attrSync",unwatch:l})}}else this[t]=n}}attributeChangedCallback(e,t,i){e.startsWith(":")&&e!=="app"&&t!==i&&this.#o===!0&&this.#A(e)}connectedCallback(){if(c.#s.add(this),this.#o===!0){this.#u||(this.#u=new MutationObserver(e=>{for(let t of e)t.type==="attributes"&&t.attributeName&&t.attributeName.startsWith(":")&&t.attributeName!=="app"&&this.#A(t.attributeName)}),this.#u.observe(this,{attributes:!0}));return}this.#R(),Promise.all([new Promise(e=>{if(this.#o===!0)return e();this.#o=e}),new Promise(e=>{let t=null,i=()=>{clearTimeout(t),t=setTimeout(()=>{s.disconnect(),this.#L(Array.from(this.children)).then(e)},0)},s=new MutationObserver(n=>{n.some(r=>r.type==="childList")&&i()});s.observe(this,{childList:!0}),i()})]).then(()=>{this.dispatchEvent("setup");for(let t of this.attrs.keys())!t.startsWith(":")||t==="app"||this.#A(t);let e=!1;this.childNodes.length>0&&Array.from(this.childNodes).some(i=>i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE&&i.textContent.trim()!=="")&&(this.#c?(this.applyTemplate(this.innerHTML),e=!0):this.#c=this.innerHTML),e||this.applyTemplate(),this.#o===!0&&!this.#u&&(this.#u=new MutationObserver(t=>{for(let i of t)i.type==="attributes"&&i.attributeName&&i.attributeName.startsWith(":")&&i.attributeName!=="app"&&this.#A(i.attributeName)}),this.#u.observe(this,{attributes:!0}))})}disconnectedCallback(){this.#u&&(this.#u.disconnect(),this.#u=null),this.#v(this.#i),this.#i=[];for(let e of this.#a)e.type==="getter"&&e.effect&&(this.#n.forEach((t,i)=>{t.delete(e.effect),t.size===0&&this.#n.delete(i)}),this.#l.delete(e.effect));this.#a=[],this.#m.forEach((e,t)=>{this[t]=e.original}),this.#m.clear(),this.#g.clear(),this.#n.clear(),this.#l.clear(),c.#s.delete(this)}toggleAttribute(e,t="",i=""){let s=this.getAttribute(e);this[t==""&&i==""&&(s||this.hasAttribute(e))?"removeAttribute":"setAttribute"](e,s!=t?t:i)}static{customElements.define("st-app",this)}};var I=class c{static DEFAULT_ICONS={arrow:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g class="st1"><path class="st2" d="M49.5,33.9L35.3,15.7c-1.8-2.3-4.7-2.3-6.5,0L14.5,33.9c-1.8,2.3-1,4.1,1.7,4.1H24v12c0,2.2,1.8,4,4,4h8c2.2,0,4-1.8,4-4V38h7.8C50.6,38,51.3,36.1,49.5,33.9z"/></g><g><path class="st3" d="M40,48c0,2.2-1.8,4-4,4h-8c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h8c2.2,0,4,1.8,4,4V48z"/></g><g><path class="st3" d="M16.2,36c-2.7,0-3.5-1.9-1.7-4.1l14.3-18.1c1.8-2.3,4.7-2.3,6.5,0l14.3,18.1c1.8,2.3,1,4.1-1.7,4.1H16.2z"/></g></g><g id="Layer_2"></g></svg>'};static#e={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},action:{name:"scroll",options:{selector:void 0,hiding_type:"opacity",setAttribute:void 0,removeAttribute:void 0,toggleAttribute:void 0,top:0,left:void 0,behavior:"smooth",hook:function(){}}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},button_container:{id:void 0,class:void 0,style:{}},button:{src:c.DEFAULT_ICONS.arrow}};static#t={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute"},button_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},button:{width:"100%",height:"100%","object-fit":"cover"}};static#s(...e){function t(s,n){function r(o,l,a){if(typeof l[o]=="object")for(let f in l[o])a[o]||(a[o]={}),r(f,l[o],a[o]);else a[o]=l[o]}for(let o in s)r(o,s,n)}let i={};for(let s of e)t(s,i);return i}static#o(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i="";for(let s=0;s<e;s++)i+=t.charAt(Math.floor(Math.random()*t.length));return i}static#c={opacity:"0",visibility:"hidden",display:"none"};#h="st_"+c.#o(16);#n=this.#h+"_wc";#d=this.#h+"_w";#l=this.#h+"_bc";#p=this.#h+"_b";#i=document.createElement("style");#r=document.createElement("div");#f=document.createElement("div");#u=document.createElement("div");#a(e,t,i){new RegExp(e+"{.*?"+t+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?"+t+":).*?(;.*?})"),"$1"+i+"$2"):new RegExp(e+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?)(})"),"$1"+t+":"+i+";$2"):this.#i.innerHTML+=e+"{"+t+":"+i+";}"}#g(e,t){for(let i in t)this.#a(e,i,t[i])}constructor(e){function t(r,o,l=!1){return{show:function(){r.style.removeProperty(o)},hide:function(){r.style.setProperty(o,l?"unset":c.#c[o])}}}function i(r){switch(r){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}function s(r){return r?typeof r=="object"?[r[0]??"st_active",r[1]??"",r[2]??""]:[r??"st_active","",""]:null}let n=c.#s(c.#e,e);if(this.#g("."+this.#n,c.#t.widget_container),this.#g("."+this.#d,c.#t.widget),this.#g("."+this.#l,c.#t.button_container),this.#g("."+this.#p,c.#t.button),this.#g("."+this.#n,i(n.settings.position)),this.#g("."+this.#d,i(n.settings.position)),this.#r.classList.add(this.#n),this.#g("."+this.#n,n.widget_container.style),n.widget_container.class&&this.#r.classList.add(n.widget_container.class),n.widget_container.id&&(this.#r.id=n.widget_container.id),this.#f.classList.add(this.#d),this.#g("."+this.#d,n.widget.style),n.widget.class&&this.#f.classList.add(n.widget.class),n.widget.id&&(this.#f.id=n.widget.id),this.#u.classList.add(this.#l),this.#g("."+this.#l,n.button_container.style),n.button_container.class&&this.#u.classList.add(n.button_container.class),n.button_container.id&&(this.#u.id=n.button_container.id),n.condition){let r=function(a,f){let u=s(f);return{set:function(){u&&(u[1]?a.setAttribute(u[0],u[1]):a.setAttribute(u[0],""))},remove:function(){u&&(u[1]?u[2]?a.setAttribute(u[0],u[2]):a.setAttribute(u[0],""):a.removeAttribute(u[0]))}}};if(!n.condition.options.hiding_type in c.#c)return;let o=t(this.#f,n.condition.options.hiding_type),l=r(this.#f,n.condition.options.attribute);switch(o.hide(),l.remove(),n.condition.name){case"hover":this.#r.addEventListener("mouseenter",function(){o.show(),l.set()}),this.#r.addEventListener("mouseleave",function(){o.hide(),l.remove()});break;case"scroll":default:let a=Math.min(window.innerHeight,document.documentElement.clientHeight),f=Math.min(window.innerWidth,document.documentElement.clientWidth),u=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),h=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),p=n.condition.options.margin_top,d=n.condition.options.margin_bottom,g=n.condition.options.margin_right,y=n.condition.options.margin_left;window.addEventListener("scroll",function(){let _=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,m=_+a,v=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,b=v+f;_>p||m<u-d||b<h-g||v>y?(o.show(),l.set()):(o.hide(),l.remove())});break}n.condition.options.transition&&this.#f.style.setProperty("transition",n.condition.options.transition)}if(n.action)switch(n.action.name){case"show_popup":if(!n.action.options.selector||!n.action.options.hiding_type in c.#c)return;this.#u.addEventListener("click",function(){for(let r of document.querySelectorAll(n.action.options.selector)){let o=t(r,n.action.options.hiding_type,!0);if(r.style[c.#c[n.action.options.hiding_type]]?o.show():o.hide(),n.action.options.setAttribute){let l=s(n.action.options.setAttribute);r.setAttribute(l[0],l[1])}n.action.options.removeAttribute&&r.removeAttribute(n.action.options.removeAttribute),n.action.options.toggleAttribute&&r.toggleAttribute(n.action.options.toggleAttribute)}});break;case"function":this.#u.addEventListener("click",n.action.options.hook);break;case"scroll":default:this.#u.addEventListener("click",function(){window.scrollTo({top:n.action.options.top,left:n.action.options.left,behavior:n.action.options.behavior})});break}new RegExp("^<svg.*?</svg>$").test(n.button.src)?this.#u.innerHTML=n.button.src:this.#u.innerHTML="<img src="+n.button.src+' alt="icon">',this.#u.childNodes[0].classList.add(this.#p),this.#i.setAttribute("widget",this.#h),document.head.appendChild(this.#i),this.#f.appendChild(this.#u),this.#r.appendChild(this.#f),document.querySelector("body").appendChild(this.#r)}},B=I;var O=class c{static set(e,t,i={}){if(i={path:"/",expires:3600,...i},!(i.expires instanceof Date)){let s=i.expires;i.expires=new Date(typeof s=="number"?Date.now()+s*1e3:Date.parse(s)||Date.parse(s.replace(/-/g,"/")))}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+"; expires="+i.expires.toUTCString()+"; path="+i.path+(i.domain?"; domain="+i.domain:"")+(i.secure?"; secure":"")+(i.sameSite?"; samesite="+i.sameSite:"")}static get(e){e=encodeURIComponent(e);let t=document.cookie.split(";");for(let i=0;i<t.length;i++){let s=t[i].trim();if(s.startsWith(e+"=")){let n=decodeURIComponent(s.substring(e.length+1));try{return JSON.parse(n)}catch{return n}}}return null}static delete(e,t={}){c.set(e,"",{expires:0,...t})}static callback(e,t,i={}){i={interval:0,delay:0,value:!0,...i};let s=setInterval(()=>{c.get(e)===null&&(c.set(e,i.value,i),setTimeout(()=>{t(e)},i.delay*1e3)),i.interval||clearInterval(s)},i.interval*1e3)}static consent(e){e={content:"<div><span>\u042D\u0442\u043E\u0442 \u0441\u0430\u0439\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u0444\u0430\u0439\u043B\u044B cookies \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044B \u0441\u0431\u043E\u0440\u0430 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u043E\u0441\u0435\u0442\u0438\u0442\u0435\u043B\u0435\u0439 (\u0434\u0430\u043D\u043D\u044B\u0435 \u043E\u0431 IP-\u0430\u0434\u0440\u0435\u0441\u0435, \u043C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0438 \u0442.\u0434.) \u0434\u043B\u044F \u043E\u0431\u0435\u0441\u043F\u0435\u0447\u0435\u043D\u0438\u044F \u0440\u0430\u0431\u043E\u0442\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0438 \u0443\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u044F \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F.</span><div><button action='accept'>\u041F\u0440\u0438\u043D\u044F\u0442\u044C</button><button action='decline'>\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C</button></div></div>",container:"body",location:"bottom",zIndex:1e3,name:"cookie_consent",interval:5,...e};let t=document.createElement("container");if(e.container=="body"&&Object.assign(t.style,{position:"absolute",overflow:"hidden",width:"max-content",height:"max-content",maxWidth:"100vw",maxHeight:"100vh",zIndex:e.zIndex,transition:"inherit",pointerEvents:"all",display:"none",...(()=>{let i=(e.location||"").toLowerCase().split(/\s+/),s={top:i.includes("top")?0:i.includes("bottom")?void 0:"50%",bottom:i.includes("bottom")?0:void 0,left:i.includes("left")?0:i.includes("right")?void 0:"50%",right:i.includes("right")?0:void 0},n=s.left==="50%"?"translateX(-50%)":"",r=s.top==="50%"?"translateY(-50%)":"";return(n||r)&&(s.transform=`${n} ${r}`.trim()),s})()}),document.querySelector(e.container).append(t),!(e.content instanceof Element)){let i=e.content;e.content=i.trim().startsWith("<")?new DOMParser().parseFromString(i,"text/html").body.firstElementChild:document.querySelector(i)??(()=>{throw new Error("\u0421\u0435\u043B\u0435\u043A\u0442\u043E\u0440 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D")})()}t.append(e.content),c.callback(e.name,i=>{["accept","decline"].forEach(s=>{t.querySelectorAll(`[action=${s}]`).forEach(n=>{n.addEventListener("click",r=>{c.set(e.name,s=="accept",e),t.style.display="none"})})}),t.style.display=""},{...e,value:null})}};var z=class c{static DEFAULT_ICONS={link:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><g id="chain"><circle cx="16" cy="16" fill="#33d9b2" r="16" style="fill: rgb(119, 179, 212);"></circle><g fill="#fff" fill-rule="evenodd"><path d="m16.75 10h-7.5a.5.5 0 0 0 -.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-7.5a.5.5 0 0 0 -1 0v7h-11v-11h7a.5.5 0 0 0 0-1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path><path d="m21.543 9.5-6.643 6.646a.5.5 0 0 0 .708.707l6.646-6.646v1.793a.5.5 0 0 0 1 0v-3a.5.5 0 0 0 -.5-.5h-3a.5.5 0 0 0 0 1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path></g></g></svg>',email:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#E0E0D1;}.st4{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g><g class="st1"><path class="st2" d="M52,44c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V44z"/></g><g><path class="st3" d="M52,42c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V22c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V42z"/></g><g class="st1"><g><path class="st2" d="M35.5,30.2c-1.9-2.1-5.1-2.1-7,0L13,43.2c-0.2,0.2-0.3,0.4-0.5,0.6c0.7,1.3,2,2.2,3.4,2.2h32c1.5,0,2.7-0.9,3.4-2.2c-0.1-0.2-0.3-0.4-0.5-0.6L35.5,30.2z"/></g></g><g><g><path class="st3" d="M35.5,32c-1.9-1.9-5.1-1.9-7,0L13,43.5c-0.2,0.2-0.3,0.3-0.5,0.5c0.7,1.2,2,1.9,3.4,1.9h32c1.5,0,2.7-0.8,3.4-1.9c-0.1-0.2-0.3-0.3-0.5-0.5L35.5,32z"/></g></g><g class="st1"><g><path class="st2" d="M12.6,20.2c0.7-1.3,2-2.2,3.4-2.2h32c1.5,0,2.7,0.9,3.4,2.2c-0.1,0.2-0.3,0.4-0.5,0.6l-15.4,13c-1.9,2.1-5.1,2.1-7,0L12.6,20.2z"/></g></g><g><g><path class="st4" d="M28.5,32c1.9,1.9,5.1,1.9,7,0L51,20.5c0.2-0.2,0.3-0.3,0.5-0.5c-0.7-1.2-2-1.9-3.4-1.9H16c-1.5,0-2.7,0.8-3.4,1.9c0.1,0.2,0.3,0.3,0.5,0.5L28.5,32z"/></g></g></g></g><g id="Layer_2"></g></svg>',telegram:'<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>',whatsapp:'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Whatsapp-color</title><desc>Created with Sketch.</desc><defs></defs><g id="Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Color-" transform="translate(-700.000000, -360.000000)" fill="#67C15E"><path d="M723.993033,360 C710.762252,360 700,370.765287 700,383.999801 C700,389.248451 701.692661,394.116025 704.570026,398.066947 L701.579605,406.983798 L710.804449,404.035539 C714.598605,406.546975 719.126434,408 724.006967,408 C737.237748,408 748,397.234315 748,384.000199 C748,370.765685 737.237748,360.000398 724.006967,360.000398 L723.993033,360.000398 L723.993033,360 Z M717.29285,372.190836 C716.827488,371.07628 716.474784,371.034071 715.769774,371.005401 C715.529728,370.991464 715.262214,370.977527 714.96564,370.977527 C714.04845,370.977527 713.089462,371.245514 712.511043,371.838033 C711.806033,372.557577 710.056843,374.23638 710.056843,377.679202 C710.056843,381.122023 712.567571,384.451756 712.905944,384.917648 C713.258648,385.382743 717.800808,392.55031 724.853297,395.471492 C730.368379,397.757149 732.00491,397.545307 733.260074,397.27732 C735.093658,396.882308 737.393002,395.527239 737.971421,393.891043 C738.54984,392.25405 738.54984,390.857171 738.380255,390.560912 C738.211068,390.264652 737.745308,390.095816 737.040298,389.742615 C736.335288,389.389811 732.90737,387.696673 732.25849,387.470894 C731.623543,387.231179 731.017259,387.315995 730.537963,387.99333 C729.860819,388.938653 729.198006,389.89831 728.661785,390.476494 C728.238619,390.928051 727.547144,390.984595 726.969123,390.744481 C726.193254,390.420348 724.021298,389.657798 721.340985,387.273388 C719.267356,385.42535 717.856938,383.125756 717.448104,382.434484 C717.038871,381.729275 717.405907,381.319529 717.729948,380.938852 C718.082653,380.501232 718.421026,380.191036 718.77373,379.781688 C719.126434,379.372738 719.323884,379.160897 719.549599,378.681068 C719.789645,378.215575 719.62006,377.735746 719.450874,377.382942 C719.281687,377.030139 717.871269,373.587317 717.29285,372.190836 Z" id="Whatsapp"></path></g></g></svg>'};static#e={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},links_container:{id:void 0,class:void 0,style:{}},links:{0:{href:"undefined",src:c.DEFAULT_ICONS.link,id:void 0,class:void 0,style:{}}}};static#t={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute",display:"flex","flex-direction":"column",gap:"15px"},links_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},link:{width:"100%",height:"100%","object-fit":"cover"}};static#s(...e){function t(s,n){function r(o,l,a){if(typeof l[o]=="object")for(let f in l[o])a[o]||(a[o]={}),r(f,l[o],a[o]);else a[o]=l[o]}for(let o in s)r(o,s,n)}let i={};for(let s of e)t(s,i);return i}static#o(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i="";for(let s=0;s<e;s++)i+=t.charAt(Math.floor(Math.random()*t.length));return i}static#c={opacity:"0",visibility:"hidden",display:"none"};#h="st_"+c.#o(16);#n=this.#h+"_wc";#d=this.#h+"_w";#l=this.#h+"_ic";#p=this.#h+"_i";#i=document.createElement("style");#r=document.createElement("div");#f=document.createElement("div");#u(e,t,i){new RegExp(e+"{.*?"+t+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?"+t+":).*?(;.*?})"),"$1"+i+"$2"):new RegExp(e+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?)(})"),"$1"+t+":"+i+";$2"):this.#i.innerHTML+=e+"{"+t+":"+i+";}"}#a(e,t){for(let i in t)this.#u(e,i,t[i])}constructor(e){function t(n,r,o=!1){return{show:function(){n.style.removeProperty(r)},hide:function(){n.style.setProperty(r,o?"unset":c.#c[r])}}}function i(n){switch(n){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}let s=c.#s(c.#e,e);if(this.#a("."+this.#n,c.#t.widget_container),this.#a("."+this.#d,c.#t.widget),this.#a("."+this.#l,c.#t.links_container),this.#a("."+this.#p,c.#t.link),this.#a("."+this.#n,i(s.settings.position)),this.#a("."+this.#d,i(s.settings.position)),this.#a("."+this.#l,s.links_container.style),this.#f.classList.add(this.#n),this.#a("."+this.#n,s.widget_container.style),s.widget_container.class&&this.#f.classList.add(s.widget_container.class),s.widget_container.id&&(this.#f.id=s.widget_container.id),this.#r.classList.add(this.#d),this.#a("."+this.#d,s.widget.style),s.widget.class&&this.#r.classList.add(s.widget.class),s.widget.id&&(this.#r.id=s.widget.id),s.condition){let n=function(l,a){function f(h){return h?typeof h=="object"?[h[0]??"st_active",h[1]??"",h[2]??""]:[h??"st_active","",""]:null}let u=f(a);return{set:function(){u&&(u[1]?l.setAttribute(u[0],u[1]):l.setAttribute(u[0],""))},remove:function(){u&&(u[1]?u[2]?l.setAttribute(u[0],u[2]):l.setAttribute(u[0],""):l.removeAttribute(u[0]))}}};if(!s.condition.options.hiding_type in c.#c)return;let r=t(this.#r,s.condition.options.hiding_type),o=n(this.#r,s.condition.options.attribute);switch(r.hide(),o.remove(),s.condition.name){case"hover":this.#f.addEventListener("mouseenter",function(){r.show(),o.set()}),this.#f.addEventListener("mouseleave",function(){r.hide(),o.remove()});break;case"scroll":default:let l=Math.min(window.innerHeight,document.documentElement.clientHeight),a=Math.min(window.innerWidth,document.documentElement.clientWidth),f=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),h=s.condition.options.margin_top,p=s.condition.options.margin_bottom,d=s.condition.options.margin_right,g=s.condition.options.margin_left;window.addEventListener("scroll",function(){let y=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,_=y+l,m=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,v=m+a;y>h||_<f-p||v<u-d||m>g?(r.show(),o.set()):(r.hide(),o.remove())});break}s.condition.options.transition&&this.#r.style.setProperty("transition",s.condition.options.transition)}for(let n in s.links){let r=document.createElement("a");r.classList.add(this.#l),s.links_container.class&&r.classList.add(s.links_container.class),s.links[n].class&&r.classList.add(s.links[n].class),s.links[n].id&&(r.id=s.links[n].id,this.#a("#"+s.links[n].id,s.links[n].style)),r.setAttribute("href",s.links[n].href),r.setAttribute("target","_blank"),r.setAttribute("rel","nofollow noopener noreferrer"),new RegExp("^<svg.*?</svg>$").test(s.links[n].src)?r.innerHTML=s.links[n].src:r.innerHTML="<img src="+s.links[n].src+' alt="icon">',r.childNodes[0].classList.add(this.#p),this.#r.appendChild(r)}this.#i.setAttribute("widget",this.#h),document.head.appendChild(this.#i),this.#f.appendChild(this.#r),document.querySelector("body").appendChild(this.#f)}},U=z;var H=class{#e="_";#t=!0;#s=[];#o=[];#c(e,t){let i="",s=0,n=0;for(let r of t)for(;n+s<e.length;){let[o,l,a]=e[n+s];if(!l)i+=o,s++;else{new RegExp(`^${o}$`).test(r)&&(i+=r,n++);break}}if(this.#e&&this.#t)for(;n+s<e.length;)i+=e[n+s++][1]?e[n+s-1][2]:e[n+s-1][0];else n?n+s<e.length&&!e[n+s][1]&&(i+=e[n+s++][0]):i="";return[i,n,e.filter(r=>r[1]).length==n]}#h(e){return this.#s.map(t=>this.#c(t,e)).reduce((t,i,s)=>!t||i[1]>t[0][1]?[i,s]:t,null)}#n(e){return e.replace(/{(\d+)\*{([^}]*?)}(.*?)}/g,(t,i,s,n)=>`{{${s}}${n}}`.repeat(i)).split(/({{.*?}.*?})/).filter(Boolean).map(t=>{let[,i]=t.match(/^{{(.*?)}.*?}$/)||[],[,s]=t.match(/^{{.*?}=(.*?)}$/)||[];return[i||t,!!i,s||this.#e]})}#d(e=null){if(this.#l()){console.warn("\u041F\u043E\u043F\u044B\u0442\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043C\u0430\u0441\u043A\u0443 \u043F\u043E\u0441\u043B\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0430\u0432\u0438\u043B",this);return}(e?[e]:this.#o).forEach(t=>{t.best_mask=this.#h(t.value),t.input.value=t.best_mask[0][0],Object.assign(t.input.dataset,{mask_id:t.best_mask[1],progress:t.best_mask[0][1],is_full:t.best_mask[0][2]})})}#l(){return!this.#s.some(e=>!e!=null)}add_mask(e){return this.#s.push(this.#n(e)),this.#d(),this.#s.length-1}remove_mask(e){delete this.#s[e],this.#d()}set_masks(e){this.#s=e.map(t=>this.#n(t)),this.#d()}constructor(e){let t=this;t.#e=e.default_filler??t.#e,t.#t=e.placeholder??t.#t,(e.inputs?e.inputs instanceof Element?[e.inputs]:Array.from(e.inputs):Array.from(document.querySelectorAll(e.selector))).forEach(s=>{let n={input:s,value:s.value.split().filter(Boolean)};s.addEventListener("input",r=>{if(r.preventDefault(),this.#l()){console.error("\u041D\u0435\u0442 \u043C\u0430\u0441\u043E\u043A \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F.",this);return}if(r.data===null){let o=[];for(let l of n.value)if(o.push(l),this.#c(this.#s[n.best_mask[1]],o)[1]==n.best_mask[0][1]){o.pop();break}n.value=o}else n.value.push(...r.data);t.#d(n),typeof e.on_input=="function"&&e.on_input(s,{mask_id:n.best_mask[1],progress:n.best_mask[0][1],is_full:n.best_mask[0][2]})}),t.#o.push(n),s.closest("form")?.addEventListener("reset",()=>{n.value=[],t.#d(n)})}),e.masks&&t.set_masks(e.masks)}};var X=H;var M=class c{modal;overlay;area;container;content;#e={};#t={};#s="hidden";static find=x;get state(){return this.#s}get params(){return this.#e}clone(e){let t=this.content.cloneNode(!0);return t.id=e.id??(t.id||"modal").replace(/#+$/,"")+(e.suffix??"_copy"),new c({...this.#e,...this.#t,content:t,...e,parent:this})}constructor(e){e={zIndex:1e3,duration:0,container:"body",overlay:!0,overlay_shading:.5,overlay_blur:"5px",overlay_scroll_lock:!0,content:"<div></div>",location:"center center",trigger:null,close_by_overlay:!0,close_by_esc:!0,auto_close:-1,allow_interrupt:!1,before_show:()=>{},on_show:()=>{},before_hide:()=>{},on_hide:()=>{},before_init:()=>{},on_init:()=>{},...e};let t,i,s;for(let[o,l]of Object.entries(e))typeof l=="function"?(this[o]=l.bind(this),this.#t[o]=l):this.#e[o]=l;this.before_init(this.#e),this.modal=document.createElement("modal"),w(this.modal,this),Object.assign(this.modal.style,{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:this.#e.zIndex,transition:`all ${this.#e.duration}s`,pointerEvents:"none",display:"none",overflow:"hidden"}),this.modal.setAttribute("state","hidden");try{k(this.#e.container).append(this.modal)}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440")}this.#e.overlay&&(this.overlay=document.createElement("modal-overlay"),w(this.overlay,this),Object.assign(this.overlay.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:`rgba(0, 0, 0, ${this.#e.overlay_shading})`,backdropFilter:`blur(${this.#e.overlay_blur})`,zIndex:++this.#e.zIndex,transition:"inherit"}),this.modal.append(this.overlay));let n=(this.#e.location||"").toLowerCase().split(/\s+/);this.area=document.createElement("modal-area"),w(this.area,this),Object.assign(this.area.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",overflowY:"auto",overflowX:"clip",display:"flex",alignItems:"flex-start",justifyContent:n.includes("left")?"flex-start":n.includes("right")?"flex-end":"center",zIndex:++this.#e.zIndex,pointerEvents:"all",transition:"inherit"}),this.modal.append(this.area),this.#e.close_by_overlay&&this.area.addEventListener("click",o=>{this.container.contains(o.target)||this.hide(o)}),this.container=document.createElement("modal-container"),w(this.container,this),Object.assign(this.container.style,{position:"relative",flexShrink:"0",width:"max-content",height:"max-content",maxWidth:"100vw",zIndex:++this.#e.zIndex,transition:"inherit",pointerEvents:"all",marginTop:n.includes("top")?"0":"auto",marginBottom:n.includes("bottom")?"0":"auto",marginLeft:n.includes("left")?"0":"auto",marginRight:n.includes("right")?"0":"auto"}),this.area.append(this.container);try{this.content=k(this.#e.content)??new DOMParser().parseFromString(this.#e.content,"text/html").body.firstElementChild}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u0434\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442 \u0432 \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E")}this.container.append(this.content),w(this.content,this),this.content.style.transition="inherit",this.content.querySelectorAll('[action="close"]').forEach(o=>{o.addEventListener("click",()=>this.hide())});let r=o=>{o.before_func(o.data),clearTimeout(t),this.modal.style.display="flex",requestAnimationFrame(()=>{this.#s=o.process,this.modal.setAttribute("state",this.#s),requestAnimationFrame(()=>{t=setTimeout(()=>{this.#s=o.final,this.modal.setAttribute("state",this.#s),o.hide&&(this.modal.style.display="none"),o.after_func(o.data)},this.#e.duration*1e3)})})};this.show=(o=null)=>{(this.#s=="hidden"||this.#e.allow_interrupt&&this.#s=="hiding")&&(r({before_func:this.before_show,after_func:this.on_show,process:"showing",final:"shown",hide:!1,data:o}),this.#e.overlay_scroll_lock&&this.overlay&&(s=document.documentElement.style.scrollBehavior,i=document.body.style,i={position:i.position,top:i.top,left:i.left,width:i.width,scroll_Y:window.scrollY||document.documentElement.scrollTop,scroll_X:window.scrollX||document.documentElement.scrollLeft},document.documentElement.style.scrollBehavior="unset",Object.assign(document.body.style,{position:"fixed",width:"100vw",top:`-${i.scroll_Y}px`,left:`-${i.scroll_X}px`})),this.#e.auto_close>0&&(clearTimeout(t),t=setTimeout(()=>{this.hide()},this.#e.auto_close*1e3)))},this.hide=(o=null)=>{(this.#s=="shown"||this.#e.allow_interrupt&&this.#s=="showing")&&(r({before_func:this.before_hide,after_func:this.on_hide,process:"hiding",final:"hidden",hide:!0,data:o}),clearTimeout(t),t=setTimeout(()=>{i&&(Object.assign(document.body.style,i),window.scrollTo(i.scroll_X,i.scroll_Y)),s!=null&&(document.documentElement.style.scrollBehavior=s)},this.#e.duration*1e3))},this.#e.close_by_esc&&document.addEventListener("keydown",o=>{(o.code==="Escape"||o.keyCode===27)&&this.hide(o)}),this.#e.trigger&&document.querySelectorAll(this.#e.trigger).forEach(o=>{o.addEventListener("click",()=>this.show(o))}),this.on_init(this.#e)}};var P=class c{static#e=new Map;constructor(e={}){let t=Object.assign({selector:null,root:null,rootMargin:"0px",threshold:0,before_init:()=>{},on_init:()=>{}},e);if(!t.selector)throw new Error("st_observer: selector required");let i=typeof t.selector=="string"?t.selector:Symbol("selector");if(c.#e.has(i))return this._internal=c.#e.get(i),this;let s={key:i,selector:t.selector,options:{root:t.root,rootMargin:t.rootMargin,threshold:t.threshold},observer:null,callbacks:new WeakMap,elements:new Set,_connected:!1,crossRules:new Map};t.before_init();let n=()=>({on_show:new Set,once_show:new Set,while_show:new Set,on_hide:new Set,once_hide:new Set,while_hide:new Set,_once_shown:!1,_once_hidden:!1,_wasIntersecting:!1}),r=(d,...g)=>{try{d(...g)}catch(y){console.error(y)}},o=(d,g)=>!(d.right<=g.left||d.left>=g.right||d.bottom<=g.top||d.top>=g.bottom),l=d=>d?typeof d=="string"?Array.from(document.querySelectorAll(d)):d instanceof Element?[d]:NodeList.prototype.isPrototypeOf(d)||Array.isArray(d)?Array.from(d):[]:typeof s.selector=="string"?Array.from(document.querySelectorAll(s.selector)):s.selector instanceof Element?[s.selector]:NodeList.prototype.isPrototypeOf(s.selector)||Array.isArray(s.selector)?Array.from(s.selector):[],a=d=>({goals:new Set(d),on_cross:new Set,once_cross:new Set,while_cross:new Set,_once_done:new Set,_wasCrossing:new Map}),f=d=>{let g=s.crossRules.get(d);if(!g||!g.length||!document.contains(d))return;let y=d.getBoundingClientRect();for(let _ of g)for(let m of _.goals){if(!document.contains(m)){_._wasCrossing.set(m,!1);continue}let v=m.getBoundingClientRect(),b=o(y,v);b&&_.while_cross.forEach(A=>r(A,{target:d,goal:m},d,m)),!!!_._wasCrossing.get(m)&&b&&_.on_cross.forEach(A=>r(A,{target:d,goal:m},d,m)),b&&!_._once_done.has(m)&&(_.once_cross.forEach(A=>r(A,{target:d,goal:m},d,m)),_._once_done.add(m)),_._wasCrossing.set(m,!!b)}},u=()=>{for(let d of Array.from(s.crossRules.keys()))if(document.contains(d))try{f(d)}catch(g){console.error(g)}},h=()=>d=>{for(let g of d){let y=g.target,_=s.callbacks.get(y);_||(_=n(),s.callbacks.set(y,_)),g.isIntersecting?(_.while_show.forEach(m=>r(m,g,y)),_._wasIntersecting||_.on_show.forEach(m=>r(m,g,y)),_._once_shown||(_._once_shown=!0,_.once_show.forEach(m=>r(m,g,y))),_._wasIntersecting=!0):(_.while_hide.forEach(m=>r(m,g,y)),_._wasIntersecting&&_.on_hide.forEach(m=>r(m,g,y)),_._once_hidden||(_._once_hidden=!0,_.once_hide.forEach(m=>r(m,g,y))),_._wasIntersecting=!1)}u()};this._internal=s,this._createCbObj=n,this._resolveTargets=l,this._createCrossRule=a,this._checkCrossForTarget=f,this._runAllCrossChecks=u,this._makeIoCallback=h;let p=l();for(let d of p)s.elements.add(d),t.on_init(d),s.callbacks.get(d)||s.callbacks.set(d,n());c.#e.set(i,s),this.connect()}enableAutoCrossChecks(e={}){let t=Object.assign({strategy:"all",watchScrollAncestors:!0,watchResize:!0,rAFWhileAnimating:!1},e);if(this._autoChecks)return this._autoChecks.cfg=t,this;let i=this._internal,s=this,n=!1,r=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1,(t.strategy==="all"||t.strategy==="entryOnly")&&s._runAllCrossChecks()}))},o=h=>{let p=new Set,d=h.parentNode;for(;d&&d!==document;){if(d instanceof HTMLElement){let g=getComputedStyle(d),y=g.overflow+g.overflowX+g.overflowY;/(auto|scroll|overlay)/.test(y)&&p.add(d)}d=d.parentNode}return p.add(window),Array.from(p)},l=()=>r(),a=new Set;if(t.watchScrollAncestors)for(let h of Array.from(i.elements))o(h).forEach(d=>{a.has(d)||(d.addEventListener("scroll",l,{passive:!0}),a.add(d))});else window.addEventListener("scroll",l,{passive:!0}),a.add(window);t.watchResize&&window.addEventListener("resize",l,{passive:!0});let f=null,u=()=>{s._runAllCrossChecks(),f=requestAnimationFrame(u)};return this._autoChecks={cfg:t,scrollTargets:a,onScrollOrResize:l,rafId:f,startRaf:()=>{f||u()},stopRaf:()=>{f&&(cancelAnimationFrame(f),f=null)}},this}disableAutoCrossChecks(){if(!this._autoChecks)return this;let e=this._autoChecks;e.scrollTargets.forEach(t=>{try{t.removeEventListener("scroll",e.onScrollOrResize)}catch{}});try{window.removeEventListener("resize",e.onScrollOrResize)}catch{}return e.stopRaf(),this._autoChecks=null,this}_register(e,t,i){if(typeof t!="function")return this;let s=this._internal,n=this._resolveTargets(i);for(let r of n){let o=s.callbacks.get(r);if(o||(o=this._createCbObj(),s.callbacks.set(r,o)),o[e].add(t),!s.elements.has(r)&&(s.elements.add(r),s._connected&&s.observer))try{s.observer.observe(r)}catch{}}return this}on_show(e,t){return this._register("on_show",e,t)}while_show(e,t){return this._register("while_show",e,t)}once_show(e,t){return this._register("once_show",e,t)}on_hide(e,t){return this._register("on_hide",e,t)}while_hide(e,t){return this._register("while_hide",e,t)}once_hide(e,t){return this._register("once_hide",e,t)}observe(e){let t=this._resolveTargets(e);for(let i of t)if(this._internal.callbacks.get(i)||this._internal.callbacks.set(i,this._createCbObj()),this._internal.elements.add(i),this._internal._connected&&this._internal.observer)try{this._internal.observer.observe(i)}catch{}return this}unobserve(e){let t=this._resolveTargets(e);for(let i of t){try{this._internal.observer&&this._internal.observer.unobserve(i)}catch{}this._internal.callbacks.delete(i),this._internal.elements.delete(i)}return this}disconnect(){try{this._internal.observer&&this._internal.observer.disconnect()}catch{}return this._internal.observer=null,this._internal._connected=!1,this}connect(e={}){if(this._internal._connected)return this;if(e.root!==void 0&&(this._internal.options.root=e.root),e.rootMargin!==void 0&&(this._internal.options.rootMargin=e.rootMargin),e.threshold!==void 0&&(this._internal.options.threshold=e.threshold),this._internal.observer=new IntersectionObserver(this._makeIoCallback(),this._internal.options),e.resetFlags)for(let t of Array.from(this._internal.elements)){let i=this._internal.callbacks.get(t);i&&(i._once_shown=!1,i._once_hidden=!1,i._wasIntersecting=!1)}for(let t of Array.from(this._internal.elements))try{this._internal.observer.observe(t)}catch{}return this._internal._connected=!0,this}reconnect(e={}){return this.connect(e)}resetOnceFlags(e){let t=e?this._resolveTargets(e):Array.from(this._internal.elements);for(let i of t){let s=this._internal.callbacks.get(i);s&&(s._once_shown=!1,s._once_hidden=!1,s._wasIntersecting=!1)}return this}isConnected(){return!!this._internal._connected}getObservedElements(){return Array.from(this._internal.elements)}_registerCross(e,t,i,s){if(typeof t!="function")return this;let n=this._internal;s===void 0&&(typeof i=="string"||i instanceof Element||NodeList.prototype.isPrototypeOf(i)||Array.isArray(i))&&(s=i,i=void 0);let r=this._resolveTargets(i),o=this._resolveTargets(s);if(!o.length)return console.warn("st_observer: cross registration no goals"),this;for(let l of r){n.callbacks.get(l)||n.callbacks.set(l,this._createCbObj()),n.elements.add(l);let a=n.crossRules.get(l);a||(a=[],n.crossRules.set(l,a));let f=a.find(u=>{if(u.goals.size!==o.length)return!1;for(let h of o)if(!u.goals.has(h))return!1;return!0});f||(f=this._createCrossRule(o),a.push(f)),f[e].add(t);for(let u of o)n.elements.add(u)}return this._runAllCrossChecks(),this}on_cross(e,t,i){return this._registerCross("on_cross",e,t,i)}once_cross(e,t,i){return this._registerCross("once_cross",e,t,i)}while_cross(e,t,i){return this._registerCross("while_cross",e,t,i)}resetCrossOnceFlags(e,t){let i=this._internal,s=e?this._resolveTargets(e):Array.from(i.crossRules.keys()),n=t?this._resolveTargets(t):null;for(let r of s){let o=i.crossRules.get(r);if(o)for(let l of o)if(!n)l._once_done.clear();else for(let a of n)l._once_done.delete(a)}return this}},Y=P;var N=class c{#e={};#t={};#s=new WeakMap;static find=x;get params(){return this.#e}get value(){return E(this.#e.target).map(e=>e.multiple?[...e.selectedOptions].map(t=>t.value):e.value)}clone(e){return new c({...this.#e,...this.#t,...e,parent:this})}constructor(e){e={target:"select",location:"bottom center",action:"click",duration:0,allow_interrupt:!1,close_on_select:!0,close_on_outside:!0,before_open:()=>{},on_open:()=>{},before_close:()=>{},on_close:()=>{},before_change:()=>{},on_change:()=>{},before_init:()=>{},on_init:()=>{},...e};for(let[t,i]of Object.entries(e))typeof i=="function"&&t!="target"?(this[t]=i.bind(this),this.#t[t]=i):this.#e[t]=i;this.before_init(this.#e);for(let t of E(this.#e.target))this.#c(t);this.on_init(this.#e)}#o(e){let t=(this.#e.location||"").toLowerCase().split(/\s+/);Object.assign(e.style,{position:"absolute",top:t.includes("top")?"auto":"100%",bottom:t.includes("top")?"100%":"auto",left:t.includes("right")?"auto":t.includes("center")?"50%":"0",right:t.includes("right")?"0":"auto",transform:t.includes("center")&&!t.includes("right")?"translateX(-50%)":"none"})}#c(e){let t=document.createElement("select-container");w(t,this),Object.assign(t.style,{position:"relative",display:"inline-block"});let i=document.createElement("select-trigger");w(i,this),Object.assign(i.style,{display:"block",cursor:"pointer"});let s=document.createElement("select-options");w(s,this),Object.assign(s.style,{transition:`all ${this.#e.duration}s`}),this.#o(s),Object.assign(e.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)"}),e.parentNode.insertBefore(t,e),t.append(i,e,s),t.setAttribute("state","closed");for(let n of[...e.options]){let r=document.createElement("select-option");w(r,this),r.textContent=n.textContent,r.style.cursor="pointer",n.disabled&&r.setAttribute("disabled",""),r.toggleAttribute("selected",n.selected),r.addEventListener("click",()=>{n.disabled||this.#h(t,e,n,r)}),s.append(r)}this.#n(e,i),this.#e.action=="hover"?(t.addEventListener("mouseenter",()=>this.open(t)),t.addEventListener("mouseleave",()=>this.close(t))):i.addEventListener(this.#e.action,()=>this.toggle(t)),this.#e.close_on_outside&&document.addEventListener("click",n=>{t.contains(n.target)||this.close(t)})}#h(e,t,i,s){this.before_change(i,t)!==!1&&(t.multiple?(i.selected=!i.selected,s.toggleAttribute("selected",i.selected)):(t.value=i.value,[...e.querySelectorAll("select-option")].forEach(n=>n.toggleAttribute("selected",n===s))),t.dispatchEvent(new Event("change",{bubbles:!0})),this.#n(t,e.querySelector("select-trigger")),this.on_change(i,t),!t.multiple&&this.#e.close_on_select&&this.close(e))}#n(e,t){e.multiple?t.textContent=[...e.selectedOptions].map(i=>i.textContent).join(", "):t.textContent=(e.selectedOptions[0]??e.options[0])?.textContent??""}#d(e,t,i,s,n){s(e),clearTimeout(this.#s.get(e)),requestAnimationFrame(()=>{e.setAttribute("state",t),requestAnimationFrame(()=>{this.#s.set(e,setTimeout(()=>(e.setAttribute("state",i),n(e)),this.#e.duration*1e3))})})}#l(e,t){let i=e.getAttribute("state")??"closed",s=this.#e.allow_interrupt;(t?i=="closed"||s&&i=="closing":i=="open"||s&&i=="opening")&&this.#d(e,t?"opening":"closing",t?"open":"closed",t?this.before_open:this.before_close,t?this.on_open:this.on_close)}open(e){E(e).map(this.#p).forEach(t=>t&&this.#l(t,!0))}close(e){E(e).map(this.#p).forEach(t=>t&&this.#l(t,!1))}toggle(e){E(e).map(this.#p).forEach(t=>{t&&this.#l(t,!["open","opening"].includes(t.getAttribute("state")))})}#p=e=>e?.closest?.("select-container")??(e?.tagName?.toLowerCase()=="select"?e.parentElement:null)};var R=class c{#e={};#t={};#s=[];#o=[];#c=!1;params={};query={};#h="";#n="";clone(e){return new c({...this.#e,...this.#t,...e,parent:this})}constructor(e){e={point:"/",name:"",match_all:!0,strict_mode:!0,before_init:()=>{},on_init:()=>{},...e};for(let[t,i]of Object.entries(e))typeof i=="function"?(this[t]=i.bind(this),this.#t[t]=i):this.#e[t]=i;this.before_init(this.#e),this.#o.push({prefix:this.#e.point,middlewares:[]}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.#a()):queueMicrotask(()=>this.#a()),this.on_init(this.#e)}#d(){return this.#o[this.#o.length-1]}prefix(e){let t=this.#d();return this.#o.push({prefix:"/"+this.#l(t.prefix)+"/"+this.#l(e)+"/",middlewares:[...t.middlewares]}),this}group(e){e(),this.#o.length>1&&this.#o.pop()}middleware(e){let t=this.#d();return t.middlewares=t.middlewares.concat(Array.isArray(e)?e:[e]),this}get(e,t,i={}){return this.#p(e,t,i)}#l(e){return String(e).replace(/^\/+|\/+$/g,"")}#p(e,t,i={}){if(typeof t!="function")throw new Error("Route: \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0437\u0430\u043C\u044B\u043A\u0430\u043D\u0438\u0435\u043C");typeof i=="string"&&(i={alias:i});let s=this.#d(),n=i.strict_mode??this.#e.strict_mode,r=n?("/"+this.#l(s.prefix)+"/"+this.#l(e)+"/").replace(/\/{2,}/g,"/"):(this.#l(s.prefix)+"/"+this.#l(e)).replace(/\/{2,}/g,"/");for(let a of this.#s)if(a.pattern===r)throw new Error(`Route: \u0434\u0443\u0431\u043B\u0438\u043A\u0430\u0442 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0430: ${r}`);let{regex:o,names:l}=this.#i(r);return this.#s.push({pattern:r,uri:e,alias:i.alias??null,closure:t,middlewares:s.middlewares,names:l,regex:o,strict_mode:n}),this}#i(e){let t=[],i=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n="^"+e.replace(/\{(\w+)\}|\*|[^{*]+/g,(r,o)=>o!==void 0?(t.push(o),"([^/]+)"):r==="*"?(t.push("*"),"(.*)"):i(r)).replace(/\/+$/,"")+"/?$";return{regex:new RegExp(n),names:t}}#r(){return this.#e.name?"route:"+this.#e.name:"route"}#f(e){return"route:"+this.#e.name+":"+e}#u(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}#a(){if(!this.#c){this.#c=!0,this.#h=location.pathname,this.#n=location.href,this.query=Object.fromEntries(new URLSearchParams(location.search)),this.#u(this.#r(),{name:this.#e.name,path:this.#h,query:this.query,url:this.#n});for(let e of this.#s){let t=e.regex.exec(this.#h);if(!t)continue;let i=t.slice(1).map(c.#g);if(this.params={},e.names.forEach((n,r)=>{this.params[n]=i[r]}),e.middlewares.some(n=>!n.call(this,...i)))continue;e.closure.call(this,...i);let s={name:this.#e.name,pattern:e.pattern,uri:e.uri,alias:e.alias,params:this.params,values:i,query:this.query,path:this.#h,url:this.#n};if(e.alias&&this.#u(this.#f(e.alias),s),e.uri&&this.#u(this.#f(e.uri),s),!this.#e.match_all)break}}}get routes(){return this.#s}get path(){return this.#h}get url(){return this.#n}static#g(e){if(e==null)return e;try{return decodeURIComponent(e)}catch{return e}}};var j=class c{#e={};#t={};#s=new WeakMap;#o=new Map;#c=null;static find=x;get params(){return this.#e}clone(e){return new c({...this.#e,...this.#t,...e,parent:this})}constructor(e){e={duration:0,trigger:"[trigger]",target:null,allow_interrupt:!1,action:"click",anchor:!1,keep_history:!1,before_activate:()=>{},on_activate:()=>{},before_deactivate:()=>{},on_deactivate:()=>{},before_activated:()=>{},on_activated:()=>{},before_deactivated:()=>{},on_deactivated:()=>{},before_init:()=>{},on_init:()=>{},...e},e.keep_history&&(e.anchor=!0);for(let[i,s]of Object.entries(e))typeof s=="function"&&i!="target"?(this[i]=s.bind(this),this.#t[i]=s):this.#e[i]=s;this.before_init(this.#e);let t=i=>i.hasAttribute("state")||i.setAttribute("state","inactive");for(let i of E(this.#e.trigger)){w(i,this),t(i),this.#h(i).forEach(t);let s=this.#n(i);s&&this.#o.set(s,i),this.#e.action=="hover"?(i.addEventListener("mouseenter",()=>this.activate(i)),i.addEventListener("mouseleave",()=>this.deactivate(i))):i.addEventListener(this.#e.action,()=>this.toggle(i))}this.#e.anchor&&(this.#p(),this.#e.keep_history&&window.addEventListener("hashchange",()=>this.#p())),this.on_init(this.#e)}#h(e){let t=this.#e.target;return typeof t=="function"&&(t=t(e)),t??=e.getAttribute("target"),E(t)}#n(e){if(!this.#e.anchor)return null;if(e.id)return e.id;let t=this.#h(e);return t.length===1&&t[0].id?t[0].id:null}#d(e){let t="#"+e;location.hash!==t&&(this.#e.keep_history?history.pushState(null,"",t):history.replaceState(null,"",t))}#l(){if(!location.hash)return;let e=location.pathname+location.search;this.#e.keep_history?history.pushState(null,"",e):history.replaceState(null,"",e)}#p(){let e=this.#o.get(location.hash.slice(1));e?this.activate(e):this.#e.keep_history&&this.#c&&(this.deactivate(this.#c),this.#c=null)}#i(e,t,i,s,n){e.forEach(r=>(s(r),clearTimeout(this.#s.get(r)))),requestAnimationFrame(()=>{e.forEach(r=>r.setAttribute("state",t)),requestAnimationFrame(()=>{let r=setTimeout(()=>e.forEach(o=>(o.setAttribute("state",i),n(o))),this.#e.duration*1e3);e.forEach(o=>this.#s.set(o,r))})})}#r(e,t){let i=e.getAttribute("state")??"inactive",s=this.#e.allow_interrupt;if(!(t?i=="inactive"||s&&i=="deactivating":i=="active"||s&&i=="activating"))return;let n=t?"activate":"deactivate",r=t?"activating":"deactivating",o=t?"active":"inactive",l=this.#h(e),a=this.#n(e);a&&(t?(this.#d(a),this.#c=e):location.hash.slice(1)===a&&(this.#l(),this.#c=null)),this.#i([e],r,o,f=>this[`before_${n}`](f,l),f=>this[`on_${n}`](f,l)),this.#i(l,r,o,f=>this[`before_${n}d`](f,e),f=>this[`on_${n}d`](f,e))}toggle(e){E(e).forEach(t=>this.#r(t,!["active","activating"].includes(t.getAttribute("state"))))}activate(e){E(e).forEach(t=>this.#r(t,!0))}deactivate(e){E(e).forEach(t=>this.#r(t,!1))}};var F=class c{static#e=Symbol();static#t=new WeakMap;static#s=new WeakMap;static#o=new Set(["\u0432","\u0432\u043E","\u043D\u0430","\u043F\u043E","\u0441","\u0441\u043E","\u043A","\u043A\u043E","\u0443","\u043E","\u043E\u0431","\u043E\u0431\u043E","\u0437\u0430","\u0438\u0437","\u0438\u0437\u043E","\u0434\u043E","\u043E\u0442","\u043F\u0440\u0438","\u043F\u043E\u0434","\u043F\u043E\u0434\u043E","\u043D\u0430\u0434","\u043D\u0430\u0434\u043E","\u0431\u0435\u0437","\u0434\u043B\u044F","\u043F\u0440\u043E","\u0447\u0435\u0440\u0435\u0437","\u0441\u043A\u0432\u043E\u0437\u044C","\u043C\u0435\u0436\u0434\u0443","\u043C\u0435\u0436","\u043F\u0435\u0440\u0435\u0434","\u043F\u0435\u0440\u0435\u0434\u043E","\u043E\u043A\u043E\u043B\u043E","\u0441\u0440\u0435\u0434\u0438","\u043A\u0440\u043E\u043C\u0435","\u0432\u043E\u043A\u0440\u0443\u0433","\u0432\u0434\u043E\u043B\u044C","\u043F\u0440\u043E\u0442\u0438\u0432","\u0440\u0430\u0434\u0438","\u0432\u043C\u0435\u0441\u0442\u043E","\u0432\u043D\u0443\u0442\u0440\u0438","\u0441\u0432\u0435\u0440\u0445\u0443","\u0441\u043D\u0438\u0437\u0443","\u0432\u043E\u0437\u043B\u0435","\u043D\u0430\u043F\u0440\u043E\u0442\u0438\u0432","\u0431\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u044F","\u0441\u043E\u0433\u043B\u0430\u0441\u043D\u043E","\u0432\u043E\u043F\u0440\u0435\u043A\u0438","\u0438","\u0430","\u043D\u043E","\u0434\u0430","\u0438\u043B\u0438","\u043B\u0438\u0431\u043E","\u0447\u0442\u043E","\u0447\u0442\u043E\u0431","\u0447\u0442\u043E\u0431\u044B","\u043A\u0430\u043A","\u0435\u0441\u043B\u0438","\u0438\u0431\u043E","\u0445\u043E\u0442\u044F","\u043F\u043E\u043A\u0430","\u043A\u043E\u0433\u0434\u0430","\u043A\u0443\u0434\u0430","\u043E\u0442\u043A\u0443\u0434\u0430","\u0437\u0430\u0447\u0435\u043C","\u043F\u043E\u0447\u0435\u043C\u0443","\u0436\u0435","\u043B\u0438","\u0431\u044B","\u0431","\u0432\u0435\u0434\u044C","\u043B\u0438\u0448\u044C","\u0443\u0436","\u0430\u0436","\u0442\u043E","\u043D\u0438","\u043D\u0435","\u043D\u0443","\u0432\u043E\u043D","\u0432\u043E\u0442"]);static#c=new Set(["SCRIPT","STYLE","NOSCRIPT","CODE","PRE","TEXTAREA","KBD","SAMP"]);static#h=(()=>{let e=[...this.#o].sort((t,i)=>i.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(`(?<=^|[\\s(\xAB\u201E"'\\[])(${e})(\\s+)(?=\\S)`,"gi")})();static#n=/(\d) +(?=\S)/g;static#d=/ +(?=[—–] )/g;static preventWidows(e){let t=k(e);if(!t||t[c.#e])return;c.#i(t);let i=c.#r(t);for(let s of i)c.#t.set(s,s.nodeValue),s[c.#e]=!0,c.#p(s);c.#g(t)}static#l(e){return e.replace(c.#h,(t,i)=>i+"\xA0").replace(c.#n,"$1\xA0").replace(c.#d,"\xA0")}static#p(e){c.#t.has(e)||c.#t.set(e,e.nodeValue);let t=c.#l(c.#t.get(e));e.nodeValue!==t&&(e.nodeValue=t)}static#i(e){e[c.#e]=!0;let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i;for(;i=t.nextNode();)i[c.#e]=!0}static#r(e){let t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:n=>{if(!n.nodeValue||!n.nodeValue.trim())return NodeFilter.FILTER_REJECT;for(let r=n.parentElement;r&&r!==e.parentElement;r=r.parentElement){if(c.#c.has(r.tagName))return NodeFilter.FILTER_REJECT;let o=r.getAttribute&&r.getAttribute("contenteditable");if(o===""||o==="true")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}),s;for(;s=i.nextNode();)t.push(s);return t}static#f(e){let t=c.#r(e);for(let i of t)i[c.#e]||(c.#t.set(i,i.nodeValue),i[c.#e]=!0),c.#p(i)}static#u(e,t){e.mutating=!0;try{t()}finally{e.mutation&&e.mutation.takeRecords(),e.mutating=!1}}static#a(e,t){let i=window.requestIdleCallback?window.requestIdleCallback.bind(window):s=>setTimeout(s,0);t.flush_scheduled||(t.flush_scheduled=!0,i(()=>{t.flush_scheduled=!1,c.#u(t,()=>{for(let s of t.queue)s.parentNode&&(c.#t.has(s)||c.#t.set(s,s.nodeValue),s[c.#e]=!0,c.#p(s));t.queue.clear()})}))}static#g(e){let t={mutation:null,intersection:null,resize:null,mutating:!1,visible:!1,pending_resize:!1,flush_scheduled:!1,queue:new Set};c.#s.set(e,t),t.mutation=new MutationObserver(i=>{if(!t.mutating){for(let s of i){if(s.type==="characterData"){s.target.parentNode&&s.target.nodeValue&&s.target.nodeValue.trim()&&t.queue.add(s.target);continue}if(s.type==="childList"){for(let n of s.addedNodes)if(n.nodeType===Node.TEXT_NODE)n.nodeValue&&n.nodeValue.trim()&&t.queue.add(n);else if(n.nodeType===Node.ELEMENT_NODE){c.#i(n);for(let r of c.#r(n))t.queue.add(r)}}}t.visible&&t.queue.size&&c.#a(e,t)}}),t.mutation.observe(e,{subtree:!0,childList:!0,characterData:!0}),t.intersection=new IntersectionObserver(i=>{for(let s of i)t.visible=s.isIntersecting,s.isIntersecting&&(t.queue.size&&c.#a(e,t),t.pending_resize&&(t.pending_resize=!1,c.#u(t,()=>c.#f(e))))},{rootMargin:"200px"}),t.intersection.observe(e),t.resize=new ResizeObserver(()=>{if(!t.mutating){if(!t.visible){t.pending_resize=!0;return}c.#u(t,()=>c.#f(e))}}),t.resize.observe(e)}};var q=class c{static find=x;static formatSize(e){let t=["\u0411","\u041A\u0411","\u041C\u0411","\u0413\u0411","\u0422\u0411"],i=0;for(;e>=1024&&i<t.length-1;)e/=1024,i++;return e.toFixed(1)+" "+t[i]}constructor(e){e={target:null,input_name:null,entry:"*[file-item]",delete_name:null,before_init:()=>{},on_init:()=>{},before_files_add:()=>{},on_files_add:()=>{},before_file_delete:()=>{},on_file_delete:()=>{},before_drop:()=>{},on_drop:()=>{},handle_exception:null,...e,limits:{files:0,file_size:0,total_size:0,mimes:[],...e.limits??{}}};let t=e.input_name.replace(/\[\]$/,"");e.input_name=t+(e.limits.files!=1?"[]":""),e.delete_name=(e.delete_name?e.delete_name.replace(/\[\]$/,""):t+"_to_delete")+(e.limits.files!=1?"[]":""),document.querySelectorAll(e.target).forEach(i=>{if(x(i))throw new Error("Already inited");w(i,this);for(let[h,p]of Object.entries(e))typeof p=="function"&&(i[h]=p.bind(i));i.before_init(e);let s=(h,p,d=null)=>e.handle_exception?i.handle_exception(Object.assign(new Error(p),{file:h,code:d})):(alert(p),!1),n=()=>Object.assign(document.createElement("input"),{type:"file",name:e.input_name,multiple:e.limits.files!=1,hidden:!0}),r=i.querySelector("*[files-list]"),o=null;i.files=new Map,i.total_size=0;let l=h=>{let p=new DOMParser().parseFromString(o,"text/html").body.firstElementChild;h._id=crypto.randomUUID(),i.files.set(h._id,h),i.total_size+=h.size;let d=p.querySelectorAll("img[preview]"),g=p.querySelectorAll("*[filename]"),y=p.querySelectorAll("*[fileweight]"),_=p.querySelectorAll("*[delete-button]");if(h.type.startsWith("image/")){let b=new FileReader;b.onload=L=>d.forEach(A=>A.src=L.target.result),b.readAsDataURL(h)}else d.forEach(b=>b.remove());g.forEach(b=>b.textContent=h.name),y.forEach(b=>{b.textContent=c.formatSize(h.size),b.setAttribute("size",h.size)}),_.forEach(b=>b.addEventListener("click",()=>{i.before_file_delete(h)!==!1&&(i.total_size=Math.max(0,i.total_size-parseInt(h.size)),i.files.delete(h._id),p.remove(),i.on_file_delete(h))}));let m=n(),v=new DataTransfer;return v.items.add(h),m.files=v.files,p.appendChild(m),p},a=h=>{let p=h.querySelector(`input[name^="${t}"]`)??h.querySelector("input[type='hidden'][value]")??h.querySelector("input[value]"),d=h.querySelectorAll("*[delete-button]");if(p){let g=h.querySelector("img[preview]"),y=h.querySelector("*[filename]"),_=h.querySelector("*[fileweight]"),m={_id:crypto.randomUUID(),preview:g?.src||"",value:p.value,name:y?.textContent||"",size:parseFloat(_?.getAttribute("size")??_?.textContent??0)||0};i.files.set(m._id,m),d.forEach(v=>v.addEventListener("click",()=>{if(i.before_file_delete(m)===!1)return;let b=Object.assign(document.createElement("input"),{type:"hidden",name:e.delete_name,hidden:!0,value:p.value});i.appendChild(b),i.files.delete(m._id),i.on_file_delete(m),h.remove()})),p.remove()}else h.remove();return h},f=h=>{if(e.limits.files>0&&i.files.size>=e.limits.files)return s(h,`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u0444\u0430\u0439\u043B\u043E\u0432: ${e.limits.files}`,0);if(e.limits.file_size>0&&h.size>e.limits.file_size)return s(h,`\u0424\u0430\u0439\u043B "${h.name}" \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439! \u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C ${c.formatSize(e.limits.file_size)}.`,1);if(e.limits.total_size>0&&i.total_size+h.size>e.limits.total_size)return s(h,`\u041F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043E\u0431\u0449\u0438\u0439 \u043B\u0438\u043C\u0438\u0442! \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432 ${c.formatSize(e.limits.total_size)}.`,2);if(e.limits.mimes.length>0){let p=h.type.trim(),d=p.split(";")[0].trim().toLowerCase();for(let g of e.limits.mimes){if(g.endsWith("/*")&&!/[\\^$.*+?()[\]{}|]/.test(g.slice(0,-2))){if(d.startsWith(g.slice(0,-1).toLowerCase()))return!0;continue}if(/[\\^$.*+?()[\]{}|]/.test(g)){try{let y=new RegExp(g,"i");if(y.test(p)||y.test(d))return!0}catch{}continue}if(d===g.toLowerCase())return!0}return s(h,`\u0424\u0430\u0439\u043B "${h.name}" \u0438\u043C\u0435\u0435\u0442 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0442\u0438\u043F: ${d}.`,3)}return!0},u=h=>{let p=Array.from(h);if(i.before_files_add(p),p=p.filter(f),p.length>0){let d=document.createDocumentFragment();p.forEach(g=>{d.appendChild(l(g))}),r.appendChild(d)}i.on_files_add(p)};try{let h=i.querySelectorAll(e.entry);h.length>0&&h.forEach(p=>{let d=a(p);o||(o=d.outerHTML)})}catch{o=e.entry}o=o.trim(),i.querySelectorAll("*[drop-zone]").forEach(h=>{let p=!1;["dragenter","dragover"].forEach(d=>h.addEventListener(d,g=>{g.preventDefault(),h.setAttribute("dragover",""),p||(i.before_drop(),p=!0)})),["dragleave","drop"].forEach(d=>h.addEventListener(d,g=>{g.preventDefault(),h.removeAttribute("dragover"),p=!1})),h.addEventListener("drop",d=>{d.preventDefault(),i.on_drop(),u(d.dataTransfer.files)})}),i.querySelectorAll("*[add-button]").forEach(h=>h.addEventListener("click",()=>{let p=n();p.addEventListener("change",()=>{u(p.files)}),document.body.appendChild(p),p.click()})),i.on_init(e)})}};var D=class{#e=null;#t=null;constructor(e){this.#e=function(t){(!e.validator||e.validator(t))&&(()=>{if(e.regexp){let i=new RegExp(e.regexp);return!e.attribute&&!e.property?i.test(t.value):e.attribute&&e.property?t.hasAttribute(e.attribute)&&i.test(t[e.property]):(e.attribute?i.test(t.getAttribute(e.attribute)):!0)&&(e.property?i.test(t[e.property]):!0)}else return e.attribute?t.hasAttribute(e.attribute):!0})()?e.on_valid(t):e.on_invalid(t),e.after_check&&e.after_check(t)},this.#t=e.selector,typeof e.onload=="function"?e.onload(this.#t):e.onload===!0&&this.apply(),document.querySelectorAll(this.#t).forEach(t=>{(e.events??["input","blur"]).forEach(i=>{t.addEventListener(i,()=>{this.#e(t)})})})}apply(e){document.querySelectorAll(e??this.#t).forEach(this.#e,this)}},J=D;return se(ne);})();
|
|
2
|
+
if(typeof index!=="undefined"&&index&&index.default)globalThis.index=index.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=Symbol(),_=h=>{try{return h instanceof Element?h:document.querySelector(h)}catch{return}};var S=h=>_(h)?.[x],O=(h,t)=>(h&&(h[x]=t),h);var b=class{static merge(...t){let i=r=>r!==null&&typeof r=="object"&&!Array.isArray(r)&&(Object.getPrototypeOf(r)??Object.prototype)===Object.prototype,e=(r,o)=>{if(typeof r=="function"&&typeof o=="function")return(...u)=>e(r(...u),o(...u));if(!(Array.isArray(r)&&Array.isArray(o)||i(r)&&i(o)))return o;let a=Array.isArray(r)?r.slice():{...r};for(let[u,c]of Object.entries(o))a[u]=u in a?e(a[u],c):c;return a};return t.reduce(e,{})}static generate_unique_prefix(t){return t={characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",length:16,...t},[...Array(t.length)].map(i=>t.characters[Math.random()*t.characters.length|0]).join("")}static fetch(t){t instanceof HTMLFormElement&&(t={url:t.getAttribute("action")||"",method:t.getAttribute("method")||"",data:new FormData(t)}),t={url:"",method:"",data:null,headers:{},timeout:0,response_type:"",...t};let i={beforeSend:[t.before_send],onSend:[t.on_send],onSuccess:[t.on_success],onComplete:[t.on_complete],onFailed:[t.on_failed]},e,r,o,a=!1,u=new Promise((n,l)=>(r=n,o=l)),c=(n,l)=>{for(let f of i[n])if(f)try{f(l)}catch(s){console.error(`st_ajax: ${n} error`,s)}},d={then:(n,l)=>u.then(n,l),catch:n=>u.catch(n),finally:n=>u.finally(n),abort:()=>e?.abort()};for(let n of Object.keys(i))d[n]=l=>(i[n].push(l),d);let y=n=>{if(a)return;a=!0;let l=n instanceof XMLHttpRequest?{status:n.status,status_text:n.statusText,response:n.responseText,request:n}:{status:void 0,status_text:"",response:n};c("onFailed",l),o(l)};return queueMicrotask(()=>{try{let n=t.url,l=t.method,f;if(c("beforeSend",t),t.data instanceof FormData?f=t.data:t.data instanceof HTMLFormElement?(n=n||t.data.getAttribute("action"),l=l||t.data.getAttribute("method"),f=new FormData(t.data)):f=t.data,n=n||window.location.href,l=l?l.toUpperCase():"GET",f&&typeof f=="object")if(l=="GET"){let s=f instanceof FormData?new URLSearchParams(f).toString():Object.entries(f).map(([p,m])=>`${encodeURIComponent(p)}=${encodeURIComponent(m)}`).join("&");s&&(n+=(/\?.+=/.test(n)?"&":"?")+s),f=null}else f instanceof FormData||(f=JSON.stringify(t.data),Object.keys(t.headers).some(s=>s.toLowerCase()=="content-type")||(t.headers["Content-Type"]="application/json"));if(e=new XMLHttpRequest,t.response_type)try{e.responseType=t.response_type}catch{}t.timeout>0&&Number.isFinite(t.timeout)&&(e.timeout=t.timeout),e.onerror=e.ontimeout=()=>y(e),e.onreadystatechange=()=>{if(e.readyState!==4)return;let s;if(e.status>=200&&e.status<300){if(e.responseType)s=e.response;else{let p=e.getResponseHeader("Content-Type")||t.response_type||"";if(p.includes("/json"))try{s=JSON.parse(e.responseText)}catch{s=e.responseText}else p.includes("/xml")?s=new DOMParser().parseFromString(e.responseText,"application/xml"):p.includes("/html")?s=new DOMParser().parseFromString(e.responseText,"text/html"):s=e.responseText}c("onSuccess",{data:s,request:e}),a=!0,r({data:s,request:e})}else y(e);c("onComplete",{data:s,request:e})},e.open(l,n,!0);for(let s in t.headers)if(Object.prototype.hasOwnProperty.call(t.headers,s))try{e.setRequestHeader(s,t.headers[s])}catch{}e.send(f),c("onSend",{detail:t})}catch(n){y(n)}}),d}};var g=class h{#t={};#e=null;static find=S;static HOOKS=["before_load","on_load","before_paste","on_paste","on_failed","on_complete","before_init","on_init"];static html(t,...i){let e=Array.isArray(t)?t.reduce((r,o,a)=>r+i[a-1]+o):t;return new DOMParser().parseFromString(e,"text/html").body.firstElementChild}get params(){let t={};for(let[i,e]of Object.entries(this.#t))typeof e!="function"&&i!="formats"&&(t[i]=e);return t}get loading(){return!!this.#e}html=h.html;clone(t={}){return new h({...this.#t,...t,formats:{...this.#t.formats,...t.formats},parent:this})}constructor(t){this.#t={target:null,source:null,mode:"append",multiple:!0,allow_interrupt:!1,formats:{},render(i){return i},before_load:()=>{},on_load:()=>{},before_paste:()=>{},on_paste:()=>{},on_failed:()=>{},on_complete:()=>{},before_init:()=>{},on_init:()=>{},...t},this.#t.before_init.call(this,this.#t),this.target=_(this.#t.target),this.target&&O(this.target,this),this.#t.on_init.call(this,this.#t)}#n(t){return t instanceof Document?"html":typeof t=="string"?"text":"json"}#o(t){let i=this.#t,e=i.formats?.[t]??{},r={};for(let o of new Set([...Object.keys(i),...Object.keys(e)])){if(o=="formats")continue;let a=i[o],u=e[o],c;o in e&&o in i&&h.HOOKS.includes(o)&&typeof a=="function"&&typeof u=="function"?c=o=="on_load"?(d,y,n)=>{let l=a.call(this,d,y,n)??y;return u.call(this,d,l,n)??l}:(...d)=>{a.apply(this,d),u.apply(this,d)}:c=o in e?u:a,r[o]=typeof c=="function"?c.bind(this):c}return r}#r(t,i,e){if(e=="html"){let r=t.body??t.documentElement??t;return i.source?i.multiple?[...r.querySelectorAll(i.source)]:r.querySelector(i.source):i.multiple?[...r.children]:r.firstElementChild}return e=="json"&&i.source?i.source.split(".").reduce((r,o)=>r?.[o],t):t}load(t={}){let{mode:i,...e}=typeof t=="string"?{url:t}:t;if(this.#e){if(!this.#t.allow_interrupt)return this;this.#e.abort()}this.target?.setAttribute("state","loading"),this.#t.before_load.call(this,e);let r=b.fetch(e).onSuccess(({data:o,request:a})=>{let u=this.#n(o),c=this.#o(u),d=this.#r(o,c,u);d=c.on_load(o,d,a)??d;let y=[],n=c.multiple?d?.length??0:1;for(let s=0;s<n;s++){let p=c.multiple?d?.[s]:d,m=c.render(p,s);m instanceof Node&&y.push(m)}c.before_paste(y);let l=document.createDocumentFragment();y.forEach(s=>l.append(s));let f=i??c.mode;this.target&&(f=="replace"?this.target.replaceChildren(l):f=="prepend"?this.target.prepend(l):this.target.append(l)),c.on_paste(y,o)}).onFailed(o=>this.#t.on_failed.call(this,o)).onComplete(o=>this.#t.on_complete.call(this,o));return r.finally(()=>{this.#e===r&&(this.#e=null,this.target?.setAttribute("state","loaded"))}),this.#e=r,this}abort(){return this.#e?.abort(),this}};export{g as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var loader=(()=>{var g=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var F=(u,t)=>{for(var r in t)g(u,r,{get:t[r],enumerable:!0})},q=(u,t,r,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of w(t))!T.call(u,n)&&n!==r&&g(u,n,{get:()=>t[n],enumerable:!(e=A(t,n))||e.enumerable});return u};var C=u=>q(g({},"__esModule",{value:!0}),u);var M={};F(M,{default:()=>_});var S=Symbol(),x=u=>{try{return u instanceof Element?u:document.querySelector(u)}catch{return}};var O=u=>x(u)?.[S],j=(u,t)=>(u&&(u[S]=t),u);var b=class{static merge(...t){let r=n=>n!==null&&typeof n=="object"&&!Array.isArray(n)&&(Object.getPrototypeOf(n)??Object.prototype)===Object.prototype,e=(n,i)=>{if(typeof n=="function"&&typeof i=="function")return(...f)=>e(n(...f),i(...f));if(!(Array.isArray(n)&&Array.isArray(i)||r(n)&&r(i)))return i;let d=Array.isArray(n)?n.slice():{...n};for(let[f,c]of Object.entries(i))d[f]=f in d?e(d[f],c):c;return d};return t.reduce(e,{})}static generate_unique_prefix(t){return t={characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",length:16,...t},[...Array(t.length)].map(r=>t.characters[Math.random()*t.characters.length|0]).join("")}static fetch(t){t instanceof HTMLFormElement&&(t={url:t.getAttribute("action")||"",method:t.getAttribute("method")||"",data:new FormData(t)}),t={url:"",method:"",data:null,headers:{},timeout:0,response_type:"",...t};let r={beforeSend:[t.before_send],onSend:[t.on_send],onSuccess:[t.on_success],onComplete:[t.on_complete],onFailed:[t.on_failed]},e,n,i,d=!1,f=new Promise((o,l)=>(n=o,i=l)),c=(o,l)=>{for(let a of r[o])if(a)try{a(l)}catch(s){console.error(`st_ajax: ${o} error`,s)}},h={then:(o,l)=>f.then(o,l),catch:o=>f.catch(o),finally:o=>f.finally(o),abort:()=>e?.abort()};for(let o of Object.keys(r))h[o]=l=>(r[o].push(l),h);let y=o=>{if(d)return;d=!0;let l=o instanceof XMLHttpRequest?{status:o.status,status_text:o.statusText,response:o.responseText,request:o}:{status:void 0,status_text:"",response:o};c("onFailed",l),i(l)};return queueMicrotask(()=>{try{let o=t.url,l=t.method,a;if(c("beforeSend",t),t.data instanceof FormData?a=t.data:t.data instanceof HTMLFormElement?(o=o||t.data.getAttribute("action"),l=l||t.data.getAttribute("method"),a=new FormData(t.data)):a=t.data,o=o||window.location.href,l=l?l.toUpperCase():"GET",a&&typeof a=="object")if(l=="GET"){let s=a instanceof FormData?new URLSearchParams(a).toString():Object.entries(a).map(([p,m])=>`${encodeURIComponent(p)}=${encodeURIComponent(m)}`).join("&");s&&(o+=(/\?.+=/.test(o)?"&":"?")+s),a=null}else a instanceof FormData||(a=JSON.stringify(t.data),Object.keys(t.headers).some(s=>s.toLowerCase()=="content-type")||(t.headers["Content-Type"]="application/json"));if(e=new XMLHttpRequest,t.response_type)try{e.responseType=t.response_type}catch{}t.timeout>0&&Number.isFinite(t.timeout)&&(e.timeout=t.timeout),e.onerror=e.ontimeout=()=>y(e),e.onreadystatechange=()=>{if(e.readyState!==4)return;let s;if(e.status>=200&&e.status<300){if(e.responseType)s=e.response;else{let p=e.getResponseHeader("Content-Type")||t.response_type||"";if(p.includes("/json"))try{s=JSON.parse(e.responseText)}catch{s=e.responseText}else p.includes("/xml")?s=new DOMParser().parseFromString(e.responseText,"application/xml"):p.includes("/html")?s=new DOMParser().parseFromString(e.responseText,"text/html"):s=e.responseText}c("onSuccess",{data:s,request:e}),d=!0,n({data:s,request:e})}else y(e);c("onComplete",{data:s,request:e})},e.open(l,o,!0);for(let s in t.headers)if(Object.prototype.hasOwnProperty.call(t.headers,s))try{e.setRequestHeader(s,t.headers[s])}catch{}e.send(a),c("onSend",{detail:t})}catch(o){y(o)}}),h}};var _=class u{#t={};#e=null;static find=O;static HOOKS=["before_load","on_load","before_paste","on_paste","on_failed","on_complete","before_init","on_init"];static html(t,...r){let e=Array.isArray(t)?t.reduce((n,i,d)=>n+r[d-1]+i):t;return new DOMParser().parseFromString(e,"text/html").body.firstElementChild}get params(){let t={};for(let[r,e]of Object.entries(this.#t))typeof e!="function"&&r!="formats"&&(t[r]=e);return t}get loading(){return!!this.#e}html=u.html;clone(t={}){return new u({...this.#t,...t,formats:{...this.#t.formats,...t.formats},parent:this})}constructor(t){this.#t={target:null,source:null,mode:"append",multiple:!0,allow_interrupt:!1,formats:{},render(r){return r},before_load:()=>{},on_load:()=>{},before_paste:()=>{},on_paste:()=>{},on_failed:()=>{},on_complete:()=>{},before_init:()=>{},on_init:()=>{},...t},this.#t.before_init.call(this,this.#t),this.target=x(this.#t.target),this.target&&j(this.target,this),this.#t.on_init.call(this,this.#t)}#n(t){return t instanceof Document?"html":typeof t=="string"?"text":"json"}#o(t){let r=this.#t,e=r.formats?.[t]??{},n={};for(let i of new Set([...Object.keys(r),...Object.keys(e)])){if(i=="formats")continue;let d=r[i],f=e[i],c;i in e&&i in r&&u.HOOKS.includes(i)&&typeof d=="function"&&typeof f=="function"?c=i=="on_load"?(h,y,o)=>{let l=d.call(this,h,y,o)??y;return f.call(this,h,l,o)??l}:(...h)=>{d.apply(this,h),f.apply(this,h)}:c=i in e?f:d,n[i]=typeof c=="function"?c.bind(this):c}return n}#r(t,r,e){if(e=="html"){let n=t.body??t.documentElement??t;return r.source?r.multiple?[...n.querySelectorAll(r.source)]:n.querySelector(r.source):r.multiple?[...n.children]:n.firstElementChild}return e=="json"&&r.source?r.source.split(".").reduce((n,i)=>n?.[i],t):t}load(t={}){let{mode:r,...e}=typeof t=="string"?{url:t}:t;if(this.#e){if(!this.#t.allow_interrupt)return this;this.#e.abort()}this.target?.setAttribute("state","loading"),this.#t.before_load.call(this,e);let n=b.fetch(e).onSuccess(({data:i,request:d})=>{let f=this.#n(i),c=this.#o(f),h=this.#r(i,c,f);h=c.on_load(i,h,d)??h;let y=[],o=c.multiple?h?.length??0:1;for(let s=0;s<o;s++){let p=c.multiple?h?.[s]:h,m=c.render(p,s);m instanceof Node&&y.push(m)}c.before_paste(y);let l=document.createDocumentFragment();y.forEach(s=>l.append(s));let a=r??c.mode;this.target&&(a=="replace"?this.target.replaceChildren(l):a=="prepend"?this.target.prepend(l):this.target.append(l)),c.on_paste(y,i)}).onFailed(i=>this.#t.on_failed.call(this,i)).onComplete(i=>this.#t.on_complete.call(this,i));return n.finally(()=>{this.#e===n&&(this.#e=null,this.target?.setAttribute("state","loaded"))}),this.#e=n,this}abort(){return this.#e?.abort(),this}};return C(M);})();
|
|
2
|
+
if(typeof loader!=="undefined"&&loader&&loader.default)globalThis.loader=loader.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Symbol(),h=i=>{try{return i instanceof Element?i:document.querySelector(i)}catch{return}};var f=i=>h(i)?.[u],l=(i,n)=>(i&&(i[u]=n),i);var a=class i{modal;overlay;area;container;content;#t={};#i={};#e="hidden";static find=f;get state(){return this.#e}get params(){return this.#t}clone(n){let o=this.content.cloneNode(!0);return o.id=n.id??(o.id||"modal").replace(/#+$/,"")+(n.suffix??"_copy"),new i({...this.#t,...this.#i,content:o,...n,parent:this})}constructor(n){n={zIndex:1e3,duration:0,container:"body",overlay:!0,overlay_shading:.5,overlay_blur:"5px",overlay_scroll_lock:!0,content:"<div></div>",location:"center center",trigger:null,close_by_overlay:!0,close_by_esc:!0,auto_close:-1,allow_interrupt:!1,before_show:()=>{},on_show:()=>{},before_hide:()=>{},on_hide:()=>{},before_init:()=>{},on_init:()=>{},...n};let o,e,c;for(let[t,r]of Object.entries(n))typeof r=="function"?(this[t]=r.bind(this),this.#i[t]=r):this.#t[t]=r;this.before_init(this.#t),this.modal=document.createElement("modal"),l(this.modal,this),Object.assign(this.modal.style,{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:this.#t.zIndex,transition:`all ${this.#t.duration}s`,pointerEvents:"none",display:"none",overflow:"hidden"}),this.modal.setAttribute("state","hidden");try{h(this.#t.container).append(this.modal)}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440")}this.#t.overlay&&(this.overlay=document.createElement("modal-overlay"),l(this.overlay,this),Object.assign(this.overlay.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:`rgba(0, 0, 0, ${this.#t.overlay_shading})`,backdropFilter:`blur(${this.#t.overlay_blur})`,zIndex:++this.#t.zIndex,transition:"inherit"}),this.modal.append(this.overlay));let s=(this.#t.location||"").toLowerCase().split(/\s+/);this.area=document.createElement("modal-area"),l(this.area,this),Object.assign(this.area.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",overflowY:"auto",overflowX:"clip",display:"flex",alignItems:"flex-start",justifyContent:s.includes("left")?"flex-start":s.includes("right")?"flex-end":"center",zIndex:++this.#t.zIndex,pointerEvents:"all",transition:"inherit"}),this.modal.append(this.area),this.#t.close_by_overlay&&this.area.addEventListener("click",t=>{this.container.contains(t.target)||this.hide(t)}),this.container=document.createElement("modal-container"),l(this.container,this),Object.assign(this.container.style,{position:"relative",flexShrink:"0",width:"max-content",height:"max-content",maxWidth:"100vw",zIndex:++this.#t.zIndex,transition:"inherit",pointerEvents:"all",marginTop:s.includes("top")?"0":"auto",marginBottom:s.includes("bottom")?"0":"auto",marginLeft:s.includes("left")?"0":"auto",marginRight:s.includes("right")?"0":"auto"}),this.area.append(this.container);try{this.content=h(this.#t.content)??new DOMParser().parseFromString(this.#t.content,"text/html").body.firstElementChild}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u0434\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442 \u0432 \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E")}this.container.append(this.content),l(this.content,this),this.content.style.transition="inherit",this.content.querySelectorAll('[action="close"]').forEach(t=>{t.addEventListener("click",()=>this.hide())});let d=t=>{t.before_func(t.data),clearTimeout(o),this.modal.style.display="flex",requestAnimationFrame(()=>{this.#e=t.process,this.modal.setAttribute("state",this.#e),requestAnimationFrame(()=>{o=setTimeout(()=>{this.#e=t.final,this.modal.setAttribute("state",this.#e),t.hide&&(this.modal.style.display="none"),t.after_func(t.data)},this.#t.duration*1e3)})})};this.show=(t=null)=>{(this.#e=="hidden"||this.#t.allow_interrupt&&this.#e=="hiding")&&(d({before_func:this.before_show,after_func:this.on_show,process:"showing",final:"shown",hide:!1,data:t}),this.#t.overlay_scroll_lock&&this.overlay&&(c=document.documentElement.style.scrollBehavior,e=document.body.style,e={position:e.position,top:e.top,left:e.left,width:e.width,scroll_Y:window.scrollY||document.documentElement.scrollTop,scroll_X:window.scrollX||document.documentElement.scrollLeft},document.documentElement.style.scrollBehavior="unset",Object.assign(document.body.style,{position:"fixed",width:"100vw",top:`-${e.scroll_Y}px`,left:`-${e.scroll_X}px`})),this.#t.auto_close>0&&(clearTimeout(o),o=setTimeout(()=>{this.hide()},this.#t.auto_close*1e3)))},this.hide=(t=null)=>{(this.#e=="shown"||this.#t.allow_interrupt&&this.#e=="showing")&&(d({before_func:this.before_hide,after_func:this.on_hide,process:"hiding",final:"hidden",hide:!0,data:t}),clearTimeout(o),o=setTimeout(()=>{e&&(Object.assign(document.body.style,e),window.scrollTo(e.scroll_X,e.scroll_Y)),c!=null&&(document.documentElement.style.scrollBehavior=c)},this.#t.duration*1e3))},this.#t.close_by_esc&&document.addEventListener("keydown",t=>{(t.code==="Escape"||t.keyCode===27)&&this.hide(t)}),this.#t.trigger&&document.querySelectorAll(this.#t.trigger).forEach(t=>{t.addEventListener("click",()=>this.show(t))}),this.on_init(this.#t)}};export{a as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var modal=(()=>{var d=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var p=(e,i)=>{for(var o in i)d(e,o,{get:i[o],enumerable:!0})},w=(e,i,o,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of _(i))!b.call(e,s)&&s!==o&&d(e,s,{get:()=>i[s],enumerable:!(n=y(i,s))||n.enumerable});return e};var v=e=>w(d({},"__esModule",{value:!0}),e);var g={};p(g,{default:()=>a});var f=Symbol(),c=e=>{try{return e instanceof Element?e:document.querySelector(e)}catch{return}};var m=e=>c(e)?.[f],r=(e,i)=>(e&&(e[f]=i),e);var a=class e{modal;overlay;area;container;content;#t={};#i={};#e="hidden";static find=m;get state(){return this.#e}get params(){return this.#t}clone(i){let o=this.content.cloneNode(!0);return o.id=i.id??(o.id||"modal").replace(/#+$/,"")+(i.suffix??"_copy"),new e({...this.#t,...this.#i,content:o,...i,parent:this})}constructor(i){i={zIndex:1e3,duration:0,container:"body",overlay:!0,overlay_shading:.5,overlay_blur:"5px",overlay_scroll_lock:!0,content:"<div></div>",location:"center center",trigger:null,close_by_overlay:!0,close_by_esc:!0,auto_close:-1,allow_interrupt:!1,before_show:()=>{},on_show:()=>{},before_hide:()=>{},on_hide:()=>{},before_init:()=>{},on_init:()=>{},...i};let o,n,s;for(let[t,h]of Object.entries(i))typeof h=="function"?(this[t]=h.bind(this),this.#i[t]=h):this.#t[t]=h;this.before_init(this.#t),this.modal=document.createElement("modal"),r(this.modal,this),Object.assign(this.modal.style,{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",zIndex:this.#t.zIndex,transition:`all ${this.#t.duration}s`,pointerEvents:"none",display:"none",overflow:"hidden"}),this.modal.setAttribute("state","hidden");try{c(this.#t.container).append(this.modal)}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440")}this.#t.overlay&&(this.overlay=document.createElement("modal-overlay"),r(this.overlay,this),Object.assign(this.overlay.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:`rgba(0, 0, 0, ${this.#t.overlay_shading})`,backdropFilter:`blur(${this.#t.overlay_blur})`,zIndex:++this.#t.zIndex,transition:"inherit"}),this.modal.append(this.overlay));let l=(this.#t.location||"").toLowerCase().split(/\s+/);this.area=document.createElement("modal-area"),r(this.area,this),Object.assign(this.area.style,{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",overflowY:"auto",overflowX:"clip",display:"flex",alignItems:"flex-start",justifyContent:l.includes("left")?"flex-start":l.includes("right")?"flex-end":"center",zIndex:++this.#t.zIndex,pointerEvents:"all",transition:"inherit"}),this.modal.append(this.area),this.#t.close_by_overlay&&this.area.addEventListener("click",t=>{this.container.contains(t.target)||this.hide(t)}),this.container=document.createElement("modal-container"),r(this.container,this),Object.assign(this.container.style,{position:"relative",flexShrink:"0",width:"max-content",height:"max-content",maxWidth:"100vw",zIndex:++this.#t.zIndex,transition:"inherit",pointerEvents:"all",marginTop:l.includes("top")?"0":"auto",marginBottom:l.includes("bottom")?"0":"auto",marginLeft:l.includes("left")?"0":"auto",marginRight:l.includes("right")?"0":"auto"}),this.area.append(this.container);try{this.content=c(this.#t.content)??new DOMParser().parseFromString(this.#t.content,"text/html").body.firstElementChild}catch{throw new Error("\u041D\u0435\u0443\u0434\u0430\u0447\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u0434\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442 \u0432 \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u0435 \u043E\u043A\u043D\u043E")}this.container.append(this.content),r(this.content,this),this.content.style.transition="inherit",this.content.querySelectorAll('[action="close"]').forEach(t=>{t.addEventListener("click",()=>this.hide())});let u=t=>{t.before_func(t.data),clearTimeout(o),this.modal.style.display="flex",requestAnimationFrame(()=>{this.#e=t.process,this.modal.setAttribute("state",this.#e),requestAnimationFrame(()=>{o=setTimeout(()=>{this.#e=t.final,this.modal.setAttribute("state",this.#e),t.hide&&(this.modal.style.display="none"),t.after_func(t.data)},this.#t.duration*1e3)})})};this.show=(t=null)=>{(this.#e=="hidden"||this.#t.allow_interrupt&&this.#e=="hiding")&&(u({before_func:this.before_show,after_func:this.on_show,process:"showing",final:"shown",hide:!1,data:t}),this.#t.overlay_scroll_lock&&this.overlay&&(s=document.documentElement.style.scrollBehavior,n=document.body.style,n={position:n.position,top:n.top,left:n.left,width:n.width,scroll_Y:window.scrollY||document.documentElement.scrollTop,scroll_X:window.scrollX||document.documentElement.scrollLeft},document.documentElement.style.scrollBehavior="unset",Object.assign(document.body.style,{position:"fixed",width:"100vw",top:`-${n.scroll_Y}px`,left:`-${n.scroll_X}px`})),this.#t.auto_close>0&&(clearTimeout(o),o=setTimeout(()=>{this.hide()},this.#t.auto_close*1e3)))},this.hide=(t=null)=>{(this.#e=="shown"||this.#t.allow_interrupt&&this.#e=="showing")&&(u({before_func:this.before_hide,after_func:this.on_hide,process:"hiding",final:"hidden",hide:!0,data:t}),clearTimeout(o),o=setTimeout(()=>{n&&(Object.assign(document.body.style,n),window.scrollTo(n.scroll_X,n.scroll_Y)),s!=null&&(document.documentElement.style.scrollBehavior=s)},this.#t.duration*1e3))},this.#t.close_by_esc&&document.addEventListener("keydown",t=>{(t.code==="Escape"||t.keyCode===27)&&this.hide(t)}),this.#t.trigger&&document.querySelectorAll(this.#t.trigger).forEach(t=>{t.addEventListener("click",()=>this.show(t))}),this.on_init(this.#t)}};return v(g);})();
|
|
2
|
+
if(typeof modal!=="undefined"&&modal&&modal.default)globalThis.modal=modal.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=class l{#t={};#l={};#s=[];#e=[];#u=!1;params={};query={};#r="";#h="";clone(t){return new l({...this.#t,...this.#l,...t,parent:this})}constructor(t){t={point:"/",name:"",match_all:!0,strict_mode:!0,before_init:()=>{},on_init:()=>{},...t};for(let[e,i]of Object.entries(t))typeof i=="function"?(this[e]=i.bind(this),this.#l[e]=i):this.#t[e]=i;this.before_init(this.#t),this.#e.push({prefix:this.#t.point,middlewares:[]}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.#c()):queueMicrotask(()=>this.#c()),this.on_init(this.#t)}#a(){return this.#e[this.#e.length-1]}prefix(t){let e=this.#a();return this.#e.push({prefix:"/"+this.#i(e.prefix)+"/"+this.#i(t)+"/",middlewares:[...e.middlewares]}),this}group(t){t(),this.#e.length>1&&this.#e.pop()}middleware(t){let e=this.#a();return e.middlewares=e.middlewares.concat(Array.isArray(t)?t:[t]),this}get(t,e,i={}){return this.#d(t,e,i)}#i(t){return String(t).replace(/^\/+|\/+$/g,"")}#d(t,e,i={}){if(typeof e!="function")throw new Error("Route: \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0437\u0430\u043C\u044B\u043A\u0430\u043D\u0438\u0435\u043C");typeof i=="string"&&(i={alias:i});let h=this.#a(),s=i.strict_mode??this.#t.strict_mode,r=s?("/"+this.#i(h.prefix)+"/"+this.#i(t)+"/").replace(/\/{2,}/g,"/"):(this.#i(h.prefix)+"/"+this.#i(t)).replace(/\/{2,}/g,"/");for(let o of this.#s)if(o.pattern===r)throw new Error(`Route: \u0434\u0443\u0431\u043B\u0438\u043A\u0430\u0442 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0430: ${r}`);let{regex:a,names:u}=this.#p(r);return this.#s.push({pattern:r,uri:t,alias:i.alias??null,closure:e,middlewares:h.middlewares,names:u,regex:a,strict_mode:s}),this}#p(t){let e=[],i=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s="^"+t.replace(/\{(\w+)\}|\*|[^{*]+/g,(r,a)=>a!==void 0?(e.push(a),"([^/]+)"):r==="*"?(e.push("*"),"(.*)"):i(r)).replace(/\/+$/,"")+"/?$";return{regex:new RegExp(s),names:e}}#f(){return this.#t.name?"route:"+this.#t.name:"route"}#o(t){return"route:"+this.#t.name+":"+t}#n(t,e){document.dispatchEvent(new CustomEvent(t,{detail:e}))}#c(){if(!this.#u){this.#u=!0,this.#r=location.pathname,this.#h=location.href,this.query=Object.fromEntries(new URLSearchParams(location.search)),this.#n(this.#f(),{name:this.#t.name,path:this.#r,query:this.query,url:this.#h});for(let t of this.#s){let e=t.regex.exec(this.#r);if(!e)continue;let i=e.slice(1).map(l.#m);if(this.params={},t.names.forEach((s,r)=>{this.params[s]=i[r]}),t.middlewares.some(s=>!s.call(this,...i)))continue;t.closure.call(this,...i);let h={name:this.#t.name,pattern:t.pattern,uri:t.uri,alias:t.alias,params:this.params,values:i,query:this.query,path:this.#r,url:this.#h};if(t.alias&&this.#n(this.#o(t.alias),h),t.uri&&this.#n(this.#o(t.uri),h),!this.#t.match_all)break}}}get routes(){return this.#s}get path(){return this.#r}get url(){return this.#h}static#m(t){if(t==null)return t;try{return decodeURIComponent(t)}catch{return t}}};export{n as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var route=(()=>{var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var m=(h,t)=>{for(var e in t)u(h,e,{get:t[e],enumerable:!0})},g=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!f.call(h,r)&&r!==e&&u(h,r,{get:()=>t[r],enumerable:!(i=d(t,r))||i.enumerable});return h};var w=h=>g(u({},"__esModule",{value:!0}),h);var y={};m(y,{default:()=>l});var l=class h{#t={};#l={};#s=[];#e=[];#u=!1;params={};query={};#r="";#h="";clone(t){return new h({...this.#t,...this.#l,...t,parent:this})}constructor(t){t={point:"/",name:"",match_all:!0,strict_mode:!0,before_init:()=>{},on_init:()=>{},...t};for(let[e,i]of Object.entries(t))typeof i=="function"?(this[e]=i.bind(this),this.#l[e]=i):this.#t[e]=i;this.before_init(this.#t),this.#e.push({prefix:this.#t.point,middlewares:[]}),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.#c()):queueMicrotask(()=>this.#c()),this.on_init(this.#t)}#a(){return this.#e[this.#e.length-1]}prefix(t){let e=this.#a();return this.#e.push({prefix:"/"+this.#i(e.prefix)+"/"+this.#i(t)+"/",middlewares:[...e.middlewares]}),this}group(t){t(),this.#e.length>1&&this.#e.pop()}middleware(t){let e=this.#a();return e.middlewares=e.middlewares.concat(Array.isArray(t)?t:[t]),this}get(t,e,i={}){return this.#d(t,e,i)}#i(t){return String(t).replace(/^\/+|\/+$/g,"")}#d(t,e,i={}){if(typeof e!="function")throw new Error("Route: \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0437\u0430\u043C\u044B\u043A\u0430\u043D\u0438\u0435\u043C");typeof i=="string"&&(i={alias:i});let r=this.#a(),a=i.strict_mode??this.#t.strict_mode,s=a?("/"+this.#i(r.prefix)+"/"+this.#i(t)+"/").replace(/\/{2,}/g,"/"):(this.#i(r.prefix)+"/"+this.#i(t)).replace(/\/{2,}/g,"/");for(let c of this.#s)if(c.pattern===s)throw new Error(`Route: \u0434\u0443\u0431\u043B\u0438\u043A\u0430\u0442 \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u0430: ${s}`);let{regex:n,names:o}=this.#p(s);return this.#s.push({pattern:s,uri:t,alias:i.alias??null,closure:e,middlewares:r.middlewares,names:o,regex:n,strict_mode:a}),this}#p(t){let e=[],i=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a="^"+t.replace(/\{(\w+)\}|\*|[^{*]+/g,(s,n)=>n!==void 0?(e.push(n),"([^/]+)"):s==="*"?(e.push("*"),"(.*)"):i(s)).replace(/\/+$/,"")+"/?$";return{regex:new RegExp(a),names:e}}#f(){return this.#t.name?"route:"+this.#t.name:"route"}#o(t){return"route:"+this.#t.name+":"+t}#n(t,e){document.dispatchEvent(new CustomEvent(t,{detail:e}))}#c(){if(!this.#u){this.#u=!0,this.#r=location.pathname,this.#h=location.href,this.query=Object.fromEntries(new URLSearchParams(location.search)),this.#n(this.#f(),{name:this.#t.name,path:this.#r,query:this.query,url:this.#h});for(let t of this.#s){let e=t.regex.exec(this.#r);if(!e)continue;let i=e.slice(1).map(h.#m);if(this.params={},t.names.forEach((a,s)=>{this.params[a]=i[s]}),t.middlewares.some(a=>!a.call(this,...i)))continue;t.closure.call(this,...i);let r={name:this.#t.name,pattern:t.pattern,uri:t.uri,alias:t.alias,params:this.params,values:i,query:this.query,path:this.#r,url:this.#h};if(t.alias&&this.#n(this.#o(t.alias),r),t.uri&&this.#n(this.#o(t.uri),r),!this.#t.match_all)break}}}get routes(){return this.#s}get path(){return this.#r}get url(){return this.#h}static#m(t){if(t==null)return t;try{return decodeURIComponent(t)}catch{return t}}};return w(y);})();
|
|
2
|
+
if(typeof route!=="undefined"&&route&&route.default)globalThis.route=route.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Symbol(),d=n=>{try{return n instanceof Element?n:document.querySelector(n)}catch{return}},l=n=>{if(n==null)return[];if(n instanceof Element)return[n];if(n instanceof NodeList||n instanceof HTMLCollection)return[...n];if(Array.isArray(n))return n.flatMap(l);try{return[...document.querySelectorAll(n)]}catch{return[]}},h=n=>d(n)?.[u],c=(n,e)=>(n&&(n[u]=e),n);var a=class n{#t={};#n={};#s=new WeakMap;static find=h;get params(){return this.#t}get value(){return l(this.#t.target).map(e=>e.multiple?[...e.selectedOptions].map(t=>t.value):e.value)}clone(e){return new n({...this.#t,...this.#n,...e,parent:this})}constructor(e){e={target:"select",location:"bottom center",action:"click",duration:0,allow_interrupt:!1,close_on_select:!0,close_on_outside:!0,before_open:()=>{},on_open:()=>{},before_close:()=>{},on_close:()=>{},before_change:()=>{},on_change:()=>{},before_init:()=>{},on_init:()=>{},...e};for(let[t,i]of Object.entries(e))typeof i=="function"&&t!="target"?(this[t]=i.bind(this),this.#n[t]=i):this.#t[t]=i;this.before_init(this.#t);for(let t of l(this.#t.target))this.#l(t);this.on_init(this.#t)}#r(e){let t=(this.#t.location||"").toLowerCase().split(/\s+/);Object.assign(e.style,{position:"absolute",top:t.includes("top")?"auto":"100%",bottom:t.includes("top")?"100%":"auto",left:t.includes("right")?"auto":t.includes("center")?"50%":"0",right:t.includes("right")?"0":"auto",transform:t.includes("center")&&!t.includes("right")?"translateX(-50%)":"none"})}#l(e){let t=document.createElement("select-container");c(t,this),Object.assign(t.style,{position:"relative",display:"inline-block"});let i=document.createElement("select-trigger");c(i,this),Object.assign(i.style,{display:"block",cursor:"pointer"});let s=document.createElement("select-options");c(s,this),Object.assign(s.style,{transition:`all ${this.#t.duration}s`}),this.#r(s),Object.assign(e.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)"}),e.parentNode.insertBefore(t,e),t.append(i,e,s),t.setAttribute("state","closed");for(let o of[...e.options]){let r=document.createElement("select-option");c(r,this),r.textContent=o.textContent,r.style.cursor="pointer",o.disabled&&r.setAttribute("disabled",""),r.toggleAttribute("selected",o.selected),r.addEventListener("click",()=>{o.disabled||this.#c(t,e,o,r)}),s.append(r)}this.#o(e,i),this.#t.action=="hover"?(t.addEventListener("mouseenter",()=>this.open(t)),t.addEventListener("mouseleave",()=>this.close(t))):i.addEventListener(this.#t.action,()=>this.toggle(t)),this.#t.close_on_outside&&document.addEventListener("click",o=>{t.contains(o.target)||this.close(t)})}#c(e,t,i,s){this.before_change(i,t)!==!1&&(t.multiple?(i.selected=!i.selected,s.toggleAttribute("selected",i.selected)):(t.value=i.value,[...e.querySelectorAll("select-option")].forEach(o=>o.toggleAttribute("selected",o===s))),t.dispatchEvent(new Event("change",{bubbles:!0})),this.#o(t,e.querySelector("select-trigger")),this.on_change(i,t),!t.multiple&&this.#t.close_on_select&&this.close(e))}#o(e,t){e.multiple?t.textContent=[...e.selectedOptions].map(i=>i.textContent).join(", "):t.textContent=(e.selectedOptions[0]??e.options[0])?.textContent??""}#a(e,t,i,s,o){s(e),clearTimeout(this.#s.get(e)),requestAnimationFrame(()=>{e.setAttribute("state",t),requestAnimationFrame(()=>{this.#s.set(e,setTimeout(()=>(e.setAttribute("state",i),o(e)),this.#t.duration*1e3))})})}#e(e,t){let i=e.getAttribute("state")??"closed",s=this.#t.allow_interrupt;(t?i=="closed"||s&&i=="closing":i=="open"||s&&i=="opening")&&this.#a(e,t?"opening":"closing",t?"open":"closed",t?this.before_open:this.before_close,t?this.on_open:this.on_close)}open(e){l(e).map(this.#i).forEach(t=>t&&this.#e(t,!0))}close(e){l(e).map(this.#i).forEach(t=>t&&this.#e(t,!1))}toggle(e){l(e).map(this.#i).forEach(t=>{t&&this.#e(t,!["open","opening"].includes(t.getAttribute("state")))})}#i=e=>e?.closest?.("select-container")??(e?.tagName?.toLowerCase()=="select"?e.parentElement:null)};export{a as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var select=(()=>{var u=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var b=(i,e)=>{for(var t in e)u(i,t,{get:e[t],enumerable:!0})},m=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of p(e))!g.call(i,s)&&s!==t&&u(i,s,{get:()=>e[s],enumerable:!(n=f(e,s))||n.enumerable});return i};var _=i=>m(u({},"__esModule",{value:!0}),i);var v={};b(v,{default:()=>a});var h=Symbol(),y=i=>{try{return i instanceof Element?i:document.querySelector(i)}catch{return}},l=i=>{if(i==null)return[];if(i instanceof Element)return[i];if(i instanceof NodeList||i instanceof HTMLCollection)return[...i];if(Array.isArray(i))return i.flatMap(l);try{return[...document.querySelectorAll(i)]}catch{return[]}},d=i=>y(i)?.[h],c=(i,e)=>(i&&(i[h]=e),i);var a=class i{#t={};#n={};#s=new WeakMap;static find=d;get params(){return this.#t}get value(){return l(this.#t.target).map(e=>e.multiple?[...e.selectedOptions].map(t=>t.value):e.value)}clone(e){return new i({...this.#t,...this.#n,...e,parent:this})}constructor(e){e={target:"select",location:"bottom center",action:"click",duration:0,allow_interrupt:!1,close_on_select:!0,close_on_outside:!0,before_open:()=>{},on_open:()=>{},before_close:()=>{},on_close:()=>{},before_change:()=>{},on_change:()=>{},before_init:()=>{},on_init:()=>{},...e};for(let[t,n]of Object.entries(e))typeof n=="function"&&t!="target"?(this[t]=n.bind(this),this.#n[t]=n):this.#t[t]=n;this.before_init(this.#t);for(let t of l(this.#t.target))this.#l(t);this.on_init(this.#t)}#r(e){let t=(this.#t.location||"").toLowerCase().split(/\s+/);Object.assign(e.style,{position:"absolute",top:t.includes("top")?"auto":"100%",bottom:t.includes("top")?"100%":"auto",left:t.includes("right")?"auto":t.includes("center")?"50%":"0",right:t.includes("right")?"0":"auto",transform:t.includes("center")&&!t.includes("right")?"translateX(-50%)":"none"})}#l(e){let t=document.createElement("select-container");c(t,this),Object.assign(t.style,{position:"relative",display:"inline-block"});let n=document.createElement("select-trigger");c(n,this),Object.assign(n.style,{display:"block",cursor:"pointer"});let s=document.createElement("select-options");c(s,this),Object.assign(s.style,{transition:`all ${this.#t.duration}s`}),this.#r(s),Object.assign(e.style,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)"}),e.parentNode.insertBefore(t,e),t.append(n,e,s),t.setAttribute("state","closed");for(let o of[...e.options]){let r=document.createElement("select-option");c(r,this),r.textContent=o.textContent,r.style.cursor="pointer",o.disabled&&r.setAttribute("disabled",""),r.toggleAttribute("selected",o.selected),r.addEventListener("click",()=>{o.disabled||this.#c(t,e,o,r)}),s.append(r)}this.#o(e,n),this.#t.action=="hover"?(t.addEventListener("mouseenter",()=>this.open(t)),t.addEventListener("mouseleave",()=>this.close(t))):n.addEventListener(this.#t.action,()=>this.toggle(t)),this.#t.close_on_outside&&document.addEventListener("click",o=>{t.contains(o.target)||this.close(t)})}#c(e,t,n,s){this.before_change(n,t)!==!1&&(t.multiple?(n.selected=!n.selected,s.toggleAttribute("selected",n.selected)):(t.value=n.value,[...e.querySelectorAll("select-option")].forEach(o=>o.toggleAttribute("selected",o===s))),t.dispatchEvent(new Event("change",{bubbles:!0})),this.#o(t,e.querySelector("select-trigger")),this.on_change(n,t),!t.multiple&&this.#t.close_on_select&&this.close(e))}#o(e,t){e.multiple?t.textContent=[...e.selectedOptions].map(n=>n.textContent).join(", "):t.textContent=(e.selectedOptions[0]??e.options[0])?.textContent??""}#a(e,t,n,s,o){s(e),clearTimeout(this.#s.get(e)),requestAnimationFrame(()=>{e.setAttribute("state",t),requestAnimationFrame(()=>{this.#s.set(e,setTimeout(()=>(e.setAttribute("state",n),o(e)),this.#t.duration*1e3))})})}#e(e,t){let n=e.getAttribute("state")??"closed",s=this.#t.allow_interrupt;(t?n=="closed"||s&&n=="closing":n=="open"||s&&n=="opening")&&this.#a(e,t?"opening":"closing",t?"open":"closed",t?this.before_open:this.before_close,t?this.on_open:this.on_close)}open(e){l(e).map(this.#i).forEach(t=>t&&this.#e(t,!0))}close(e){l(e).map(this.#i).forEach(t=>t&&this.#e(t,!1))}toggle(e){l(e).map(this.#i).forEach(t=>{t&&this.#e(t,!["open","opening"].includes(t.getAttribute("state")))})}#i=e=>e?.closest?.("select-container")??(e?.tagName?.toLowerCase()=="select"?e.parentElement:null)};return _(v);})();
|
|
2
|
+
if(typeof select!=="undefined"&&select&&select.default)globalThis.select=select.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=class r{static DEFAULT_ICONS={arrow:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g class="st1"><path class="st2" d="M49.5,33.9L35.3,15.7c-1.8-2.3-4.7-2.3-6.5,0L14.5,33.9c-1.8,2.3-1,4.1,1.7,4.1H24v12c0,2.2,1.8,4,4,4h8c2.2,0,4-1.8,4-4V38h7.8C50.6,38,51.3,36.1,49.5,33.9z"/></g><g><path class="st3" d="M40,48c0,2.2-1.8,4-4,4h-8c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h8c2.2,0,4,1.8,4,4V48z"/></g><g><path class="st3" d="M16.2,36c-2.7,0-3.5-1.9-1.7-4.1l14.3-18.1c1.8-2.3,4.7-2.3,6.5,0l14.3,18.1c1.8,2.3,1,4.1-1.7,4.1H16.2z"/></g></g><g id="Layer_2"></g></svg>'};static#u={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},action:{name:"scroll",options:{selector:void 0,hiding_type:"opacity",setAttribute:void 0,removeAttribute:void 0,toggleAttribute:void 0,top:0,left:void 0,behavior:"smooth",hook:function(){}}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},button_container:{id:void 0,class:void 0,style:{}},button:{src:r.DEFAULT_ICONS.arrow}};static#c={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute"},button_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},button:{width:"100%",height:"100%","object-fit":"cover"}};static#g(...d){function n(a,t){function e(i,s,l){if(typeof s[i]=="object")for(let h in s[i])l[i]||(l[i]={}),e(h,s[i],l[i]);else l[i]=s[i]}for(let i in a)e(i,a,t)}let o={};for(let a of d)n(a,o);return o}static#f(d){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o="";for(let a=0;a<d;a++)o+=n.charAt(Math.floor(Math.random()*n.length));return o}static#d={opacity:"0",visibility:"hidden",display:"none"};#s="st_"+r.#f(16);#r=this.#s+"_wc";#l=this.#s+"_w";#a=this.#s+"_bc";#h=this.#s+"_b";#i=document.createElement("style");#o=document.createElement("div");#n=document.createElement("div");#t=document.createElement("div");#p(d,n,o){new RegExp(d+"{.*?"+n+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+d+"{.*?"+n+":).*?(;.*?})"),"$1"+o+"$2"):new RegExp(d+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+d+"{.*?)(})"),"$1"+n+":"+o+";$2"):this.#i.innerHTML+=d+"{"+n+":"+o+";}"}#e(d,n){for(let o in n)this.#p(d,o,n[o])}constructor(d){function n(e,i,s=!1){return{show:function(){e.style.removeProperty(i)},hide:function(){e.style.setProperty(i,s?"unset":r.#d[i])}}}function o(e){switch(e){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}function a(e){return e?typeof e=="object"?[e[0]??"st_active",e[1]??"",e[2]??""]:[e??"st_active","",""]:null}let t=r.#g(r.#u,d);if(this.#e("."+this.#r,r.#c.widget_container),this.#e("."+this.#l,r.#c.widget),this.#e("."+this.#a,r.#c.button_container),this.#e("."+this.#h,r.#c.button),this.#e("."+this.#r,o(t.settings.position)),this.#e("."+this.#l,o(t.settings.position)),this.#o.classList.add(this.#r),this.#e("."+this.#r,t.widget_container.style),t.widget_container.class&&this.#o.classList.add(t.widget_container.class),t.widget_container.id&&(this.#o.id=t.widget_container.id),this.#n.classList.add(this.#l),this.#e("."+this.#l,t.widget.style),t.widget.class&&this.#n.classList.add(t.widget.class),t.widget.id&&(this.#n.id=t.widget.id),this.#t.classList.add(this.#a),this.#e("."+this.#a,t.button_container.style),t.button_container.class&&this.#t.classList.add(t.button_container.class),t.button_container.id&&(this.#t.id=t.button_container.id),t.condition){let e=function(l,h){let c=a(h);return{set:function(){c&&(c[1]?l.setAttribute(c[0],c[1]):l.setAttribute(c[0],""))},remove:function(){c&&(c[1]?c[2]?l.setAttribute(c[0],c[2]):l.setAttribute(c[0],""):l.removeAttribute(c[0]))}}};if(!t.condition.options.hiding_type in r.#d)return;let i=n(this.#n,t.condition.options.hiding_type),s=e(this.#n,t.condition.options.attribute);switch(i.hide(),s.remove(),t.condition.name){case"hover":this.#o.addEventListener("mouseenter",function(){i.show(),s.set()}),this.#o.addEventListener("mouseleave",function(){i.hide(),s.remove()});break;case"scroll":default:let l=Math.min(window.innerHeight,document.documentElement.clientHeight),h=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),m=t.condition.options.margin_top,w=t.condition.options.margin_bottom,_=t.condition.options.margin_right,b=t.condition.options.margin_left;window.addEventListener("scroll",function(){let g=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,y=g+l,f=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,E=f+h;g>m||y<c-w||E<p-_||f>b?(i.show(),s.set()):(i.hide(),s.remove())});break}t.condition.options.transition&&this.#n.style.setProperty("transition",t.condition.options.transition)}if(t.action)switch(t.action.name){case"show_popup":if(!t.action.options.selector||!t.action.options.hiding_type in r.#d)return;this.#t.addEventListener("click",function(){for(let e of document.querySelectorAll(t.action.options.selector)){let i=n(e,t.action.options.hiding_type,!0);if(e.style[r.#d[t.action.options.hiding_type]]?i.show():i.hide(),t.action.options.setAttribute){let s=a(t.action.options.setAttribute);e.setAttribute(s[0],s[1])}t.action.options.removeAttribute&&e.removeAttribute(t.action.options.removeAttribute),t.action.options.toggleAttribute&&e.toggleAttribute(t.action.options.toggleAttribute)}});break;case"function":this.#t.addEventListener("click",t.action.options.hook);break;case"scroll":default:this.#t.addEventListener("click",function(){window.scrollTo({top:t.action.options.top,left:t.action.options.left,behavior:t.action.options.behavior})});break}new RegExp("^<svg.*?</svg>$").test(t.button.src)?this.#t.innerHTML=t.button.src:this.#t.innerHTML="<img src="+t.button.src+' alt="icon">',this.#t.childNodes[0].classList.add(this.#h),this.#i.setAttribute("widget",this.#s),document.head.appendChild(this.#i),this.#n.appendChild(this.#t),this.#o.appendChild(this.#n),document.querySelector("body").appendChild(this.#o)}},v=u;export{v as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_button_widget=(()=>{var u=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var H=(o,i)=>{for(var s in i)u(o,s,{get:i[s],enumerable:!0})},M=(o,i,s,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of x(i))!A.call(o,d)&&d!==s&&u(o,d,{get:()=>i[d],enumerable:!(c=L(i,d))||c.enumerable});return o};var T=o=>M(u({},"__esModule",{value:!0}),o);var S={};H(S,{default:()=>k});var g=class o{static DEFAULT_ICONS={arrow:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g class="st1"><path class="st2" d="M49.5,33.9L35.3,15.7c-1.8-2.3-4.7-2.3-6.5,0L14.5,33.9c-1.8,2.3-1,4.1,1.7,4.1H24v12c0,2.2,1.8,4,4,4h8c2.2,0,4-1.8,4-4V38h7.8C50.6,38,51.3,36.1,49.5,33.9z"/></g><g><path class="st3" d="M40,48c0,2.2-1.8,4-4,4h-8c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h8c2.2,0,4,1.8,4,4V48z"/></g><g><path class="st3" d="M16.2,36c-2.7,0-3.5-1.9-1.7-4.1l14.3-18.1c1.8-2.3,4.7-2.3,6.5,0l14.3,18.1c1.8,2.3,1,4.1-1.7,4.1H16.2z"/></g></g><g id="Layer_2"></g></svg>'};static#u={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},action:{name:"scroll",options:{selector:void 0,hiding_type:"opacity",setAttribute:void 0,removeAttribute:void 0,toggleAttribute:void 0,top:0,left:void 0,behavior:"smooth",hook:function(){}}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},button_container:{id:void 0,class:void 0,style:{}},button:{src:o.DEFAULT_ICONS.arrow}};static#c={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute"},button_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},button:{width:"100%",height:"100%","object-fit":"cover"}};static#g(...i){function s(d,t){function n(e,r,a){if(typeof r[e]=="object")for(let h in r[e])a[e]||(a[e]={}),n(h,r[e],a[e]);else a[e]=r[e]}for(let e in d)n(e,d,t)}let c={};for(let d of i)s(d,c);return c}static#f(i){let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",c="";for(let d=0;d<i;d++)c+=s.charAt(Math.floor(Math.random()*s.length));return c}static#d={opacity:"0",visibility:"hidden",display:"none"};#s="st_"+o.#f(16);#r=this.#s+"_wc";#l=this.#s+"_w";#a=this.#s+"_bc";#h=this.#s+"_b";#i=document.createElement("style");#o=document.createElement("div");#n=document.createElement("div");#t=document.createElement("div");#p(i,s,c){new RegExp(i+"{.*?"+s+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+i+"{.*?"+s+":).*?(;.*?})"),"$1"+c+"$2"):new RegExp(i+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+i+"{.*?)(})"),"$1"+s+":"+c+";$2"):this.#i.innerHTML+=i+"{"+s+":"+c+";}"}#e(i,s){for(let c in s)this.#p(i,c,s[c])}constructor(i){function s(n,e,r=!1){return{show:function(){n.style.removeProperty(e)},hide:function(){n.style.setProperty(e,r?"unset":o.#d[e])}}}function c(n){switch(n){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}function d(n){return n?typeof n=="object"?[n[0]??"st_active",n[1]??"",n[2]??""]:[n??"st_active","",""]:null}let t=o.#g(o.#u,i);if(this.#e("."+this.#r,o.#c.widget_container),this.#e("."+this.#l,o.#c.widget),this.#e("."+this.#a,o.#c.button_container),this.#e("."+this.#h,o.#c.button),this.#e("."+this.#r,c(t.settings.position)),this.#e("."+this.#l,c(t.settings.position)),this.#o.classList.add(this.#r),this.#e("."+this.#r,t.widget_container.style),t.widget_container.class&&this.#o.classList.add(t.widget_container.class),t.widget_container.id&&(this.#o.id=t.widget_container.id),this.#n.classList.add(this.#l),this.#e("."+this.#l,t.widget.style),t.widget.class&&this.#n.classList.add(t.widget.class),t.widget.id&&(this.#n.id=t.widget.id),this.#t.classList.add(this.#a),this.#e("."+this.#a,t.button_container.style),t.button_container.class&&this.#t.classList.add(t.button_container.class),t.button_container.id&&(this.#t.id=t.button_container.id),t.condition){let n=function(a,h){let l=d(h);return{set:function(){l&&(l[1]?a.setAttribute(l[0],l[1]):a.setAttribute(l[0],""))},remove:function(){l&&(l[1]?l[2]?a.setAttribute(l[0],l[2]):a.setAttribute(l[0],""):a.removeAttribute(l[0]))}}};if(!t.condition.options.hiding_type in o.#d)return;let e=s(this.#n,t.condition.options.hiding_type),r=n(this.#n,t.condition.options.attribute);switch(e.hide(),r.remove(),t.condition.name){case"hover":this.#o.addEventListener("mouseenter",function(){e.show(),r.set()}),this.#o.addEventListener("mouseleave",function(){e.hide(),r.remove()});break;case"scroll":default:let a=Math.min(window.innerHeight,document.documentElement.clientHeight),h=Math.min(window.innerWidth,document.documentElement.clientWidth),l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),w=t.condition.options.margin_top,_=t.condition.options.margin_bottom,b=t.condition.options.margin_right,y=t.condition.options.margin_left;window.addEventListener("scroll",function(){let f=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,E=f+a,p=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,v=p+h;f>w||E<l-_||v<m-b||p>y?(e.show(),r.set()):(e.hide(),r.remove())});break}t.condition.options.transition&&this.#n.style.setProperty("transition",t.condition.options.transition)}if(t.action)switch(t.action.name){case"show_popup":if(!t.action.options.selector||!t.action.options.hiding_type in o.#d)return;this.#t.addEventListener("click",function(){for(let n of document.querySelectorAll(t.action.options.selector)){let e=s(n,t.action.options.hiding_type,!0);if(n.style[o.#d[t.action.options.hiding_type]]?e.show():e.hide(),t.action.options.setAttribute){let r=d(t.action.options.setAttribute);n.setAttribute(r[0],r[1])}t.action.options.removeAttribute&&n.removeAttribute(t.action.options.removeAttribute),t.action.options.toggleAttribute&&n.toggleAttribute(t.action.options.toggleAttribute)}});break;case"function":this.#t.addEventListener("click",t.action.options.hook);break;case"scroll":default:this.#t.addEventListener("click",function(){window.scrollTo({top:t.action.options.top,left:t.action.options.left,behavior:t.action.options.behavior})});break}new RegExp("^<svg.*?</svg>$").test(t.button.src)?this.#t.innerHTML=t.button.src:this.#t.innerHTML="<img src="+t.button.src+' alt="icon">',this.#t.childNodes[0].classList.add(this.#h),this.#i.setAttribute("widget",this.#s),document.head.appendChild(this.#i),this.#n.appendChild(this.#t),this.#o.appendChild(this.#n),document.querySelector("body").appendChild(this.#o)}},k=g;return T(S);})();
|
|
2
|
+
if(typeof st_button_widget!=="undefined"&&st_button_widget&&st_button_widget.default)globalThis.st_button_widget=st_button_widget.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var f=class r{static DEFAULT_ICONS={link:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><g id="chain"><circle cx="16" cy="16" fill="#33d9b2" r="16" style="fill: rgb(119, 179, 212);"></circle><g fill="#fff" fill-rule="evenodd"><path d="m16.75 10h-7.5a.5.5 0 0 0 -.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-7.5a.5.5 0 0 0 -1 0v7h-11v-11h7a.5.5 0 0 0 0-1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path><path d="m21.543 9.5-6.643 6.646a.5.5 0 0 0 .708.707l6.646-6.646v1.793a.5.5 0 0 0 1 0v-3a.5.5 0 0 0 -.5-.5h-3a.5.5 0 0 0 0 1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path></g></g></svg>',email:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#E0E0D1;}.st4{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g><g class="st1"><path class="st2" d="M52,44c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V44z"/></g><g><path class="st3" d="M52,42c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V22c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V42z"/></g><g class="st1"><g><path class="st2" d="M35.5,30.2c-1.9-2.1-5.1-2.1-7,0L13,43.2c-0.2,0.2-0.3,0.4-0.5,0.6c0.7,1.3,2,2.2,3.4,2.2h32c1.5,0,2.7-0.9,3.4-2.2c-0.1-0.2-0.3-0.4-0.5-0.6L35.5,30.2z"/></g></g><g><g><path class="st3" d="M35.5,32c-1.9-1.9-5.1-1.9-7,0L13,43.5c-0.2,0.2-0.3,0.3-0.5,0.5c0.7,1.2,2,1.9,3.4,1.9h32c1.5,0,2.7-0.8,3.4-1.9c-0.1-0.2-0.3-0.3-0.5-0.5L35.5,32z"/></g></g><g class="st1"><g><path class="st2" d="M12.6,20.2c0.7-1.3,2-2.2,3.4-2.2h32c1.5,0,2.7,0.9,3.4,2.2c-0.1,0.2-0.3,0.4-0.5,0.6l-15.4,13c-1.9,2.1-5.1,2.1-7,0L12.6,20.2z"/></g></g><g><g><path class="st4" d="M28.5,32c1.9,1.9,5.1,1.9,7,0L51,20.5c0.2-0.2,0.3-0.3,0.5-0.5c-0.7-1.2-2-1.9-3.4-1.9H16c-1.5,0-2.7,0.8-3.4,1.9c0.1,0.2,0.3,0.3,0.5,0.5L28.5,32z"/></g></g></g></g><g id="Layer_2"></g></svg>',telegram:'<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>',whatsapp:'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Whatsapp-color</title><desc>Created with Sketch.</desc><defs></defs><g id="Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Color-" transform="translate(-700.000000, -360.000000)" fill="#67C15E"><path d="M723.993033,360 C710.762252,360 700,370.765287 700,383.999801 C700,389.248451 701.692661,394.116025 704.570026,398.066947 L701.579605,406.983798 L710.804449,404.035539 C714.598605,406.546975 719.126434,408 724.006967,408 C737.237748,408 748,397.234315 748,384.000199 C748,370.765685 737.237748,360.000398 724.006967,360.000398 L723.993033,360.000398 L723.993033,360 Z M717.29285,372.190836 C716.827488,371.07628 716.474784,371.034071 715.769774,371.005401 C715.529728,370.991464 715.262214,370.977527 714.96564,370.977527 C714.04845,370.977527 713.089462,371.245514 712.511043,371.838033 C711.806033,372.557577 710.056843,374.23638 710.056843,377.679202 C710.056843,381.122023 712.567571,384.451756 712.905944,384.917648 C713.258648,385.382743 717.800808,392.55031 724.853297,395.471492 C730.368379,397.757149 732.00491,397.545307 733.260074,397.27732 C735.093658,396.882308 737.393002,395.527239 737.971421,393.891043 C738.54984,392.25405 738.54984,390.857171 738.380255,390.560912 C738.211068,390.264652 737.745308,390.095816 737.040298,389.742615 C736.335288,389.389811 732.90737,387.696673 732.25849,387.470894 C731.623543,387.231179 731.017259,387.315995 730.537963,387.99333 C729.860819,388.938653 729.198006,389.89831 728.661785,390.476494 C728.238619,390.928051 727.547144,390.984595 726.969123,390.744481 C726.193254,390.420348 724.021298,389.657798 721.340985,387.273388 C719.267356,385.42535 717.856938,383.125756 717.448104,382.434484 C717.038871,381.729275 717.405907,381.319529 717.729948,380.938852 C718.082653,380.501232 718.421026,380.191036 718.77373,379.781688 C719.126434,379.372738 719.323884,379.160897 719.549599,378.681068 C719.789645,378.215575 719.62006,377.735746 719.450874,377.382942 C719.281687,377.030139 717.871269,373.587317 717.29285,372.190836 Z" id="Whatsapp"></path></g></g></svg>'};static#h={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},links_container:{id:void 0,class:void 0,style:{}},links:{0:{href:"undefined",src:r.DEFAULT_ICONS.link,id:void 0,class:void 0,style:{}}}};static#o={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute",display:"flex","flex-direction":"column",gap:"15px"},links_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},link:{width:"100%",height:"100%","object-fit":"cover"}};static#g(...c){function o(t,e){function i(n,d,a){if(typeof d[n]=="object")for(let g in d[n])a[n]||(a[n]={}),i(g,d[n],a[n]);else a[n]=d[n]}for(let n in t)i(n,t,e)}let s={};for(let t of c)o(t,s);return s}static#f(c){let o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s="";for(let t=0;t<c;t++)s+=o.charAt(Math.floor(Math.random()*o.length));return s}static#r={opacity:"0",visibility:"hidden",display:"none"};#s="st_"+r.#f(16);#l=this.#s+"_wc";#c=this.#s+"_w";#d=this.#s+"_ic";#a=this.#s+"_i";#i=document.createElement("style");#e=document.createElement("div");#n=document.createElement("div");#u(c,o,s){new RegExp(c+"{.*?"+o+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+c+"{.*?"+o+":).*?(;.*?})"),"$1"+s+"$2"):new RegExp(c+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+c+"{.*?)(})"),"$1"+o+":"+s+";$2"):this.#i.innerHTML+=c+"{"+o+":"+s+";}"}#t(c,o){for(let s in o)this.#u(c,s,o[s])}constructor(c){function o(e,i,n=!1){return{show:function(){e.style.removeProperty(i)},hide:function(){e.style.setProperty(i,n?"unset":r.#r[i])}}}function s(e){switch(e){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}let t=r.#g(r.#h,c);if(this.#t("."+this.#l,r.#o.widget_container),this.#t("."+this.#c,r.#o.widget),this.#t("."+this.#d,r.#o.links_container),this.#t("."+this.#a,r.#o.link),this.#t("."+this.#l,s(t.settings.position)),this.#t("."+this.#c,s(t.settings.position)),this.#t("."+this.#d,t.links_container.style),this.#n.classList.add(this.#l),this.#t("."+this.#l,t.widget_container.style),t.widget_container.class&&this.#n.classList.add(t.widget_container.class),t.widget_container.id&&(this.#n.id=t.widget_container.id),this.#e.classList.add(this.#c),this.#t("."+this.#c,t.widget.style),t.widget.class&&this.#e.classList.add(t.widget.class),t.widget.id&&(this.#e.id=t.widget.id),t.condition){let e=function(d,a){function g(h){return h?typeof h=="object"?[h[0]??"st_active",h[1]??"",h[2]??""]:[h??"st_active","",""]:null}let l=g(a);return{set:function(){l&&(l[1]?d.setAttribute(l[0],l[1]):d.setAttribute(l[0],""))},remove:function(){l&&(l[1]?l[2]?d.setAttribute(l[0],l[2]):d.setAttribute(l[0],""):d.removeAttribute(l[0]))}}};if(!t.condition.options.hiding_type in r.#r)return;let i=o(this.#e,t.condition.options.hiding_type),n=e(this.#e,t.condition.options.attribute);switch(i.hide(),n.remove(),t.condition.name){case"hover":this.#n.addEventListener("mouseenter",function(){i.show(),n.set()}),this.#n.addEventListener("mouseleave",function(){i.hide(),n.remove()});break;case"scroll":default:let d=Math.min(window.innerHeight,document.documentElement.clientHeight),a=Math.min(window.innerWidth,document.documentElement.clientWidth),g=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),l=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),h=t.condition.options.margin_top,m=t.condition.options.margin_bottom,w=t.condition.options.margin_right,_=t.condition.options.margin_left;window.addEventListener("scroll",function(){let u=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,C=u+d,p=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,y=p+a;u>h||C<g-m||y<l-w||p>_?(i.show(),n.set()):(i.hide(),n.remove())});break}t.condition.options.transition&&this.#e.style.setProperty("transition",t.condition.options.transition)}for(let e in t.links){let i=document.createElement("a");i.classList.add(this.#d),t.links_container.class&&i.classList.add(t.links_container.class),t.links[e].class&&i.classList.add(t.links[e].class),t.links[e].id&&(i.id=t.links[e].id,this.#t("#"+t.links[e].id,t.links[e].style)),i.setAttribute("href",t.links[e].href),i.setAttribute("target","_blank"),i.setAttribute("rel","nofollow noopener noreferrer"),new RegExp("^<svg.*?</svg>$").test(t.links[e].src)?i.innerHTML=t.links[e].src:i.innerHTML="<img src="+t.links[e].src+' alt="icon">',i.childNodes[0].classList.add(this.#a),this.#e.appendChild(i)}this.#i.setAttribute("widget",this.#s),document.head.appendChild(this.#i),this.#n.appendChild(this.#e),document.querySelector("body").appendChild(this.#n)}},L=f;export{L as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_links_widget=(()=>{var f=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var b=(o,e)=>{for(var n in e)f(o,n,{get:e[n],enumerable:!0})},k=(o,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of x(e))!E.call(o,t)&&t!==n&&f(o,t,{get:()=>e[t],enumerable:!(l=v(e,t))||l.enumerable});return o};var M=o=>k(f({},"__esModule",{value:!0}),o);var F={};b(F,{default:()=>H});var u=class o{static DEFAULT_ICONS={link:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><g id="chain"><circle cx="16" cy="16" fill="#33d9b2" r="16" style="fill: rgb(119, 179, 212);"></circle><g fill="#fff" fill-rule="evenodd"><path d="m16.75 10h-7.5a.5.5 0 0 0 -.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5v-7.5a.5.5 0 0 0 -1 0v7h-11v-11h7a.5.5 0 0 0 0-1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path><path d="m21.543 9.5-6.643 6.646a.5.5 0 0 0 .708.707l6.646-6.646v1.793a.5.5 0 0 0 1 0v-3a.5.5 0 0 0 -.5-.5h-3a.5.5 0 0 0 0 1z" fill="#fff" style="fill: rgb(255, 255, 255);"></path></g></g></svg>',email:'<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"><style type="text/css">.st0{fill:#77B3D4;}.st1{opacity:0.2;}.st2{fill:#231F20;}.st3{fill:#E0E0D1;}.st4{fill:#FFFFFF;}</style><g id="Layer_1"><g><circle class="st0" cx="32" cy="32" r="32"/></g><g><g class="st1"><path class="st2" d="M52,44c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V24c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V44z"/></g><g><path class="st3" d="M52,42c0,2.2-1.8,4-4,4H16c-2.2,0-4-1.8-4-4V22c0-2.2,1.8-4,4-4h32c2.2,0,4,1.8,4,4V42z"/></g><g class="st1"><g><path class="st2" d="M35.5,30.2c-1.9-2.1-5.1-2.1-7,0L13,43.2c-0.2,0.2-0.3,0.4-0.5,0.6c0.7,1.3,2,2.2,3.4,2.2h32c1.5,0,2.7-0.9,3.4-2.2c-0.1-0.2-0.3-0.4-0.5-0.6L35.5,30.2z"/></g></g><g><g><path class="st3" d="M35.5,32c-1.9-1.9-5.1-1.9-7,0L13,43.5c-0.2,0.2-0.3,0.3-0.5,0.5c0.7,1.2,2,1.9,3.4,1.9h32c1.5,0,2.7-0.8,3.4-1.9c-0.1-0.2-0.3-0.3-0.5-0.5L35.5,32z"/></g></g><g class="st1"><g><path class="st2" d="M12.6,20.2c0.7-1.3,2-2.2,3.4-2.2h32c1.5,0,2.7,0.9,3.4,2.2c-0.1,0.2-0.3,0.4-0.5,0.6l-15.4,13c-1.9,2.1-5.1,2.1-7,0L12.6,20.2z"/></g></g><g><g><path class="st4" d="M28.5,32c1.9,1.9,5.1,1.9,7,0L51,20.5c0.2-0.2,0.3-0.3,0.5-0.5c-0.7-1.2-2-1.9-3.4-1.9H16c-1.5,0-2.7,0.8-3.4,1.9c0.1,0.2,0.3,0.3,0.5,0.5L28.5,32z"/></g></g></g></g><g id="Layer_2"></g></svg>',telegram:'<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z" fill="#40B3E0"></path><path d="M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308" fill="#FFFFFF"></path><path d="M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475" fill="#D2E5F1"></path><path d="M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624" fill="#B5CFE4"></path></g></svg>',whatsapp:'<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Whatsapp-color</title><desc>Created with Sketch.</desc><defs></defs><g id="Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Color-" transform="translate(-700.000000, -360.000000)" fill="#67C15E"><path d="M723.993033,360 C710.762252,360 700,370.765287 700,383.999801 C700,389.248451 701.692661,394.116025 704.570026,398.066947 L701.579605,406.983798 L710.804449,404.035539 C714.598605,406.546975 719.126434,408 724.006967,408 C737.237748,408 748,397.234315 748,384.000199 C748,370.765685 737.237748,360.000398 724.006967,360.000398 L723.993033,360.000398 L723.993033,360 Z M717.29285,372.190836 C716.827488,371.07628 716.474784,371.034071 715.769774,371.005401 C715.529728,370.991464 715.262214,370.977527 714.96564,370.977527 C714.04845,370.977527 713.089462,371.245514 712.511043,371.838033 C711.806033,372.557577 710.056843,374.23638 710.056843,377.679202 C710.056843,381.122023 712.567571,384.451756 712.905944,384.917648 C713.258648,385.382743 717.800808,392.55031 724.853297,395.471492 C730.368379,397.757149 732.00491,397.545307 733.260074,397.27732 C735.093658,396.882308 737.393002,395.527239 737.971421,393.891043 C738.54984,392.25405 738.54984,390.857171 738.380255,390.560912 C738.211068,390.264652 737.745308,390.095816 737.040298,389.742615 C736.335288,389.389811 732.90737,387.696673 732.25849,387.470894 C731.623543,387.231179 731.017259,387.315995 730.537963,387.99333 C729.860819,388.938653 729.198006,389.89831 728.661785,390.476494 C728.238619,390.928051 727.547144,390.984595 726.969123,390.744481 C726.193254,390.420348 724.021298,389.657798 721.340985,387.273388 C719.267356,385.42535 717.856938,383.125756 717.448104,382.434484 C717.038871,381.729275 717.405907,381.319529 717.729948,380.938852 C718.082653,380.501232 718.421026,380.191036 718.77373,379.781688 C719.126434,379.372738 719.323884,379.160897 719.549599,378.681068 C719.789645,378.215575 719.62006,377.735746 719.450874,377.382942 C719.281687,377.030139 717.871269,373.587317 717.29285,372.190836 Z" id="Whatsapp"></path></g></g></svg>'};static#h={settings:{position:"bottom-right"},condition:{name:"scroll",options:{hiding_type:"opacity",transition:"0.3s",attribute:[],margin_top:Math.min(window.innerHeight,document.documentElement.clientHeight),margin_left:void 0,margin_right:void 0,margin_bottom:void 0}},widget_container:{id:void 0,class:void 0,style:{}},widget:{id:void 0,class:void 0,style:{}},links_container:{id:void 0,class:void 0,style:{}},links:{0:{href:"undefined",src:o.DEFAULT_ICONS.link,id:void 0,class:void 0,style:{}}}};static#o={widget_container:{position:"fixed",width:"60px",height:"60px",margin:"30px"},widget:{position:"absolute",display:"flex","flex-direction":"column",gap:"15px"},links_container:{display:"flex","justify-content":"center","align-items":"center",overflow:"hidden",width:"60px",height:"60px","border-radius":"50%",cursor:"pointer"},link:{width:"100%",height:"100%","object-fit":"cover"}};static#g(...e){function n(t,s){function i(c,r,a){if(typeof r[c]=="object")for(let g in r[c])a[c]||(a[c]={}),i(g,r[c],a[c]);else a[c]=r[c]}for(let c in t)i(c,t,s)}let l={};for(let t of e)n(t,l);return l}static#f(e){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",l="";for(let t=0;t<e;t++)l+=n.charAt(Math.floor(Math.random()*n.length));return l}static#r={opacity:"0",visibility:"hidden",display:"none"};#s="st_"+o.#f(16);#l=this.#s+"_wc";#c=this.#s+"_w";#d=this.#s+"_ic";#a=this.#s+"_i";#i=document.createElement("style");#e=document.createElement("div");#n=document.createElement("div");#u(e,n,l){new RegExp(e+"{.*?"+n+":.*?;.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?"+n+":).*?(;.*?})"),"$1"+l+"$2"):new RegExp(e+"{.*?}").test(this.#i.innerHTML)?this.#i.innerHTML=this.#i.innerHTML.replace(new RegExp("("+e+"{.*?)(})"),"$1"+n+":"+l+";$2"):this.#i.innerHTML+=e+"{"+n+":"+l+";}"}#t(e,n){for(let l in n)this.#u(e,l,n[l])}constructor(e){function n(s,i,c=!1){return{show:function(){s.style.removeProperty(i)},hide:function(){s.style.setProperty(i,c?"unset":o.#r[i])}}}function l(s){switch(s){case"top-left":return{top:"0",left:"0"};case"top-right":return{top:"0",right:"0"};case"bottom-left":return{bottom:"0",left:"0"};case"bottom-right":default:return{bottom:"0",right:"0"}}}let t=o.#g(o.#h,e);if(this.#t("."+this.#l,o.#o.widget_container),this.#t("."+this.#c,o.#o.widget),this.#t("."+this.#d,o.#o.links_container),this.#t("."+this.#a,o.#o.link),this.#t("."+this.#l,l(t.settings.position)),this.#t("."+this.#c,l(t.settings.position)),this.#t("."+this.#d,t.links_container.style),this.#n.classList.add(this.#l),this.#t("."+this.#l,t.widget_container.style),t.widget_container.class&&this.#n.classList.add(t.widget_container.class),t.widget_container.id&&(this.#n.id=t.widget_container.id),this.#e.classList.add(this.#c),this.#t("."+this.#c,t.widget.style),t.widget.class&&this.#e.classList.add(t.widget.class),t.widget.id&&(this.#e.id=t.widget.id),t.condition){let s=function(r,a){function g(h){return h?typeof h=="object"?[h[0]??"st_active",h[1]??"",h[2]??""]:[h??"st_active","",""]:null}let d=g(a);return{set:function(){d&&(d[1]?r.setAttribute(d[0],d[1]):r.setAttribute(d[0],""))},remove:function(){d&&(d[1]?d[2]?r.setAttribute(d[0],d[2]):r.setAttribute(d[0],""):r.removeAttribute(d[0]))}}};if(!t.condition.options.hiding_type in o.#r)return;let i=n(this.#e,t.condition.options.hiding_type),c=s(this.#e,t.condition.options.attribute);switch(i.hide(),c.remove(),t.condition.name){case"hover":this.#n.addEventListener("mouseenter",function(){i.show(),c.set()}),this.#n.addEventListener("mouseleave",function(){i.hide(),c.remove()});break;case"scroll":default:let r=Math.min(window.innerHeight,document.documentElement.clientHeight),a=Math.min(window.innerWidth,document.documentElement.clientWidth),g=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),d=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth),h=t.condition.options.margin_top,w=t.condition.options.margin_bottom,_=t.condition.options.margin_right,C=t.condition.options.margin_left;window.addEventListener("scroll",function(){let p=window.pageYOffset||window.scrollY||document.documentElement.scrollTop,y=p+r,m=window.pageXOffset||window.scrollX||document.documentElement.scrollLeft,L=m+a;p>h||y<g-w||L<d-_||m>C?(i.show(),c.set()):(i.hide(),c.remove())});break}t.condition.options.transition&&this.#e.style.setProperty("transition",t.condition.options.transition)}for(let s in t.links){let i=document.createElement("a");i.classList.add(this.#d),t.links_container.class&&i.classList.add(t.links_container.class),t.links[s].class&&i.classList.add(t.links[s].class),t.links[s].id&&(i.id=t.links[s].id,this.#t("#"+t.links[s].id,t.links[s].style)),i.setAttribute("href",t.links[s].href),i.setAttribute("target","_blank"),i.setAttribute("rel","nofollow noopener noreferrer"),new RegExp("^<svg.*?</svg>$").test(t.links[s].src)?i.innerHTML=t.links[s].src:i.innerHTML="<img src="+t.links[s].src+' alt="icon">',i.childNodes[0].classList.add(this.#a),this.#e.appendChild(i)}this.#i.setAttribute("widget",this.#s),document.head.appendChild(this.#i),this.#n.appendChild(this.#e),document.querySelector("body").appendChild(this.#n)}},H=u;return M(F);})();
|
|
2
|
+
if(typeof st_links_widget!=="undefined"&&st_links_widget&&st_links_widget.default)globalThis.st_links_widget=st_links_widget.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=class{#s="_";#l=!0;#e=[];#r=[];#i(e,t){let r="",l=0,s=0;for(let i of t)for(;s+l<e.length;){let[n,a,_]=e[s+l];if(!a)r+=n,l++;else{new RegExp(`^${n}$`).test(i)&&(r+=i,s++);break}}if(this.#s&&this.#l)for(;s+l<e.length;)r+=e[s+l++][1]?e[s+l-1][2]:e[s+l-1][0];else s?s+l<e.length&&!e[s+l][1]&&(r+=e[s+l++][0]):r="";return[r,s,e.filter(i=>i[1]).length==s]}#u(e){return this.#e.map(t=>this.#i(t,e)).reduce((t,r,l)=>!t||r[1]>t[0][1]?[r,l]:t,null)}#n(e){return e.replace(/{(\d+)\*{([^}]*?)}(.*?)}/g,(t,r,l,s)=>`{{${l}}${s}}`.repeat(r)).split(/({{.*?}.*?})/).filter(Boolean).map(t=>{let[,r]=t.match(/^{{(.*?)}.*?}$/)||[],[,l]=t.match(/^{{.*?}=(.*?)}$/)||[];return[r||t,!!r,l||this.#s]})}#t(e=null){if(this.#a()){console.warn("\u041F\u043E\u043F\u044B\u0442\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043C\u0430\u0441\u043A\u0443 \u043F\u043E\u0441\u043B\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0430\u0432\u0438\u043B",this);return}(e?[e]:this.#r).forEach(t=>{t.best_mask=this.#u(t.value),t.input.value=t.best_mask[0][0],Object.assign(t.input.dataset,{mask_id:t.best_mask[1],progress:t.best_mask[0][1],is_full:t.best_mask[0][2]})})}#a(){return!this.#e.some(e=>!e!=null)}add_mask(e){return this.#e.push(this.#n(e)),this.#t(),this.#e.length-1}remove_mask(e){delete this.#e[e],this.#t()}set_masks(e){this.#e=e.map(t=>this.#n(t)),this.#t()}constructor(e){let t=this;t.#s=e.default_filler??t.#s,t.#l=e.placeholder??t.#l,(e.inputs?e.inputs instanceof Element?[e.inputs]:Array.from(e.inputs):Array.from(document.querySelectorAll(e.selector))).forEach(l=>{let s={input:l,value:l.value.split().filter(Boolean)};l.addEventListener("input",i=>{if(i.preventDefault(),this.#a()){console.error("\u041D\u0435\u0442 \u043C\u0430\u0441\u043E\u043A \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F.",this);return}if(i.data===null){let n=[];for(let a of s.value)if(n.push(a),this.#i(this.#e[s.best_mask[1]],n)[1]==s.best_mask[0][1]){n.pop();break}s.value=n}else s.value.push(...i.data);t.#t(s),typeof e.on_input=="function"&&e.on_input(l,{mask_id:s.best_mask[1],progress:s.best_mask[0][1],is_full:s.best_mask[0][2]})}),t.#r.push(s),l.closest("form")?.addEventListener("reset",()=>{s.value=[],t.#t(s)})}),e.masks&&t.set_masks(e.masks)}};var f=u;export{f as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_mask=(()=>{var h=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(i,e)=>{for(var t in e)h(i,t,{get:e[t],enumerable:!0})},p=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of o(e))!c.call(i,s)&&s!==t&&h(i,s,{get:()=>e[s],enumerable:!(r=f(e,s))||r.enumerable});return i};var m=i=>p(h({},"__esModule",{value:!0}),i);var g={};d(g,{default:()=>k});var _=class{#s="_";#l=!0;#e=[];#r=[];#i(e,t){let r="",s=0,l=0;for(let n of t)for(;l+s<e.length;){let[a,u,v]=e[l+s];if(!u)r+=a,s++;else{new RegExp(`^${a}$`).test(n)&&(r+=n,l++);break}}if(this.#s&&this.#l)for(;l+s<e.length;)r+=e[l+s++][1]?e[l+s-1][2]:e[l+s-1][0];else l?l+s<e.length&&!e[l+s][1]&&(r+=e[l+s++][0]):r="";return[r,l,e.filter(n=>n[1]).length==l]}#u(e){return this.#e.map(t=>this.#i(t,e)).reduce((t,r,s)=>!t||r[1]>t[0][1]?[r,s]:t,null)}#n(e){return e.replace(/{(\d+)\*{([^}]*?)}(.*?)}/g,(t,r,s,l)=>`{{${s}}${l}}`.repeat(r)).split(/({{.*?}.*?})/).filter(Boolean).map(t=>{let[,r]=t.match(/^{{(.*?)}.*?}$/)||[],[,s]=t.match(/^{{.*?}=(.*?)}$/)||[];return[r||t,!!r,s||this.#s]})}#t(e=null){if(this.#a()){console.warn("\u041F\u043E\u043F\u044B\u0442\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043C\u0430\u0441\u043A\u0443 \u043F\u043E\u0441\u043B\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0430\u0432\u0438\u043B",this);return}(e?[e]:this.#r).forEach(t=>{t.best_mask=this.#u(t.value),t.input.value=t.best_mask[0][0],Object.assign(t.input.dataset,{mask_id:t.best_mask[1],progress:t.best_mask[0][1],is_full:t.best_mask[0][2]})})}#a(){return!this.#e.some(e=>!e!=null)}add_mask(e){return this.#e.push(this.#n(e)),this.#t(),this.#e.length-1}remove_mask(e){delete this.#e[e],this.#t()}set_masks(e){this.#e=e.map(t=>this.#n(t)),this.#t()}constructor(e){let t=this;t.#s=e.default_filler??t.#s,t.#l=e.placeholder??t.#l,(e.inputs?e.inputs instanceof Element?[e.inputs]:Array.from(e.inputs):Array.from(document.querySelectorAll(e.selector))).forEach(s=>{let l={input:s,value:s.value.split().filter(Boolean)};s.addEventListener("input",n=>{if(n.preventDefault(),this.#a()){console.error("\u041D\u0435\u0442 \u043C\u0430\u0441\u043E\u043A \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F.",this);return}if(n.data===null){let a=[];for(let u of l.value)if(a.push(u),this.#i(this.#e[l.best_mask[1]],a)[1]==l.best_mask[0][1]){a.pop();break}l.value=a}else l.value.push(...n.data);t.#t(l),typeof e.on_input=="function"&&e.on_input(s,{mask_id:l.best_mask[1],progress:l.best_mask[0][1],is_full:l.best_mask[0][2]})}),t.#r.push(l),s.closest("form")?.addEventListener("reset",()=>{l.value=[],t.#t(l)})}),e.masks&&t.set_masks(e.masks)}};var k=_;return m(g);})();
|
|
2
|
+
if(typeof st_mask!=="undefined"&&st_mask&&st_mask.default)globalThis.st_mask=st_mask.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=class C{static#e=new Map;constructor(s={}){let e=Object.assign({selector:null,root:null,rootMargin:"0px",threshold:0,before_init:()=>{},on_init:()=>{}},s);if(!e.selector)throw new Error("st_observer: selector required");let r=typeof e.selector=="string"?e.selector:Symbol("selector");if(C.#e.has(r))return this._internal=C.#e.get(r),this;let n={key:r,selector:e.selector,options:{root:e.root,rootMargin:e.rootMargin,threshold:e.threshold},observer:null,callbacks:new WeakMap,elements:new Set,_connected:!1,crossRules:new Map};e.before_init();let a=()=>({on_show:new Set,once_show:new Set,while_show:new Set,on_hide:new Set,once_hide:new Set,while_hide:new Set,_once_shown:!1,_once_hidden:!1,_wasIntersecting:!1}),l=(t,...i)=>{try{t(...i)}catch(d){console.error(d)}},h=(t,i)=>!(t.right<=i.left||t.left>=i.right||t.bottom<=i.top||t.top>=i.bottom),f=t=>t?typeof t=="string"?Array.from(document.querySelectorAll(t)):t instanceof Element?[t]:NodeList.prototype.isPrototypeOf(t)||Array.isArray(t)?Array.from(t):[]:typeof n.selector=="string"?Array.from(document.querySelectorAll(n.selector)):n.selector instanceof Element?[n.selector]:NodeList.prototype.isPrototypeOf(n.selector)||Array.isArray(n.selector)?Array.from(n.selector):[],_=t=>({goals:new Set(t),on_cross:new Set,once_cross:new Set,while_cross:new Set,_once_done:new Set,_wasCrossing:new Map}),u=t=>{let i=n.crossRules.get(t);if(!i||!i.length||!document.contains(t))return;let d=t.getBoundingClientRect();for(let o of i)for(let c of o.goals){if(!document.contains(c)){o._wasCrossing.set(c,!1);continue}let k=c.getBoundingClientRect(),m=h(d,k);m&&o.while_cross.forEach(y=>l(y,{target:t,goal:c},t,c)),!!!o._wasCrossing.get(c)&&m&&o.on_cross.forEach(y=>l(y,{target:t,goal:c},t,c)),m&&!o._once_done.has(c)&&(o.once_cross.forEach(y=>l(y,{target:t,goal:c},t,c)),o._once_done.add(c)),o._wasCrossing.set(c,!!m)}},g=()=>{for(let t of Array.from(n.crossRules.keys()))if(document.contains(t))try{u(t)}catch(i){console.error(i)}},w=()=>t=>{for(let i of t){let d=i.target,o=n.callbacks.get(d);o||(o=a(),n.callbacks.set(d,o)),i.isIntersecting?(o.while_show.forEach(c=>l(c,i,d)),o._wasIntersecting||o.on_show.forEach(c=>l(c,i,d)),o._once_shown||(o._once_shown=!0,o.once_show.forEach(c=>l(c,i,d))),o._wasIntersecting=!0):(o.while_hide.forEach(c=>l(c,i,d)),o._wasIntersecting&&o.on_hide.forEach(c=>l(c,i,d)),o._once_hidden||(o._once_hidden=!0,o.once_hide.forEach(c=>l(c,i,d))),o._wasIntersecting=!1)}g()};this._internal=n,this._createCbObj=a,this._resolveTargets=f,this._createCrossRule=_,this._checkCrossForTarget=u,this._runAllCrossChecks=g,this._makeIoCallback=w;let b=f();for(let t of b)n.elements.add(t),e.on_init(t),n.callbacks.get(t)||n.callbacks.set(t,a());C.#e.set(r,n),this.connect()}enableAutoCrossChecks(s={}){let e=Object.assign({strategy:"all",watchScrollAncestors:!0,watchResize:!0,rAFWhileAnimating:!1},s);if(this._autoChecks)return this._autoChecks.cfg=e,this;let r=this._internal,n=this,a=!1,l=()=>{a||(a=!0,requestAnimationFrame(()=>{a=!1,(e.strategy==="all"||e.strategy==="entryOnly")&&n._runAllCrossChecks()}))},h=w=>{let b=new Set,t=w.parentNode;for(;t&&t!==document;){if(t instanceof HTMLElement){let i=getComputedStyle(t),d=i.overflow+i.overflowX+i.overflowY;/(auto|scroll|overlay)/.test(d)&&b.add(t)}t=t.parentNode}return b.add(window),Array.from(b)},f=()=>l(),_=new Set;if(e.watchScrollAncestors)for(let w of Array.from(r.elements))h(w).forEach(t=>{_.has(t)||(t.addEventListener("scroll",f,{passive:!0}),_.add(t))});else window.addEventListener("scroll",f,{passive:!0}),_.add(window);e.watchResize&&window.addEventListener("resize",f,{passive:!0});let u=null,g=()=>{n._runAllCrossChecks(),u=requestAnimationFrame(g)};return this._autoChecks={cfg:e,scrollTargets:_,onScrollOrResize:f,rafId:u,startRaf:()=>{u||g()},stopRaf:()=>{u&&(cancelAnimationFrame(u),u=null)}},this}disableAutoCrossChecks(){if(!this._autoChecks)return this;let s=this._autoChecks;s.scrollTargets.forEach(e=>{try{e.removeEventListener("scroll",s.onScrollOrResize)}catch{}});try{window.removeEventListener("resize",s.onScrollOrResize)}catch{}return s.stopRaf(),this._autoChecks=null,this}_register(s,e,r){if(typeof e!="function")return this;let n=this._internal,a=this._resolveTargets(r);for(let l of a){let h=n.callbacks.get(l);if(h||(h=this._createCbObj(),n.callbacks.set(l,h)),h[s].add(e),!n.elements.has(l)&&(n.elements.add(l),n._connected&&n.observer))try{n.observer.observe(l)}catch{}}return this}on_show(s,e){return this._register("on_show",s,e)}while_show(s,e){return this._register("while_show",s,e)}once_show(s,e){return this._register("once_show",s,e)}on_hide(s,e){return this._register("on_hide",s,e)}while_hide(s,e){return this._register("while_hide",s,e)}once_hide(s,e){return this._register("once_hide",s,e)}observe(s){let e=this._resolveTargets(s);for(let r of e)if(this._internal.callbacks.get(r)||this._internal.callbacks.set(r,this._createCbObj()),this._internal.elements.add(r),this._internal._connected&&this._internal.observer)try{this._internal.observer.observe(r)}catch{}return this}unobserve(s){let e=this._resolveTargets(s);for(let r of e){try{this._internal.observer&&this._internal.observer.unobserve(r)}catch{}this._internal.callbacks.delete(r),this._internal.elements.delete(r)}return this}disconnect(){try{this._internal.observer&&this._internal.observer.disconnect()}catch{}return this._internal.observer=null,this._internal._connected=!1,this}connect(s={}){if(this._internal._connected)return this;if(s.root!==void 0&&(this._internal.options.root=s.root),s.rootMargin!==void 0&&(this._internal.options.rootMargin=s.rootMargin),s.threshold!==void 0&&(this._internal.options.threshold=s.threshold),this._internal.observer=new IntersectionObserver(this._makeIoCallback(),this._internal.options),s.resetFlags)for(let e of Array.from(this._internal.elements)){let r=this._internal.callbacks.get(e);r&&(r._once_shown=!1,r._once_hidden=!1,r._wasIntersecting=!1)}for(let e of Array.from(this._internal.elements))try{this._internal.observer.observe(e)}catch{}return this._internal._connected=!0,this}reconnect(s={}){return this.connect(s)}resetOnceFlags(s){let e=s?this._resolveTargets(s):Array.from(this._internal.elements);for(let r of e){let n=this._internal.callbacks.get(r);n&&(n._once_shown=!1,n._once_hidden=!1,n._wasIntersecting=!1)}return this}isConnected(){return!!this._internal._connected}getObservedElements(){return Array.from(this._internal.elements)}_registerCross(s,e,r,n){if(typeof e!="function")return this;let a=this._internal;n===void 0&&(typeof r=="string"||r instanceof Element||NodeList.prototype.isPrototypeOf(r)||Array.isArray(r))&&(n=r,r=void 0);let l=this._resolveTargets(r),h=this._resolveTargets(n);if(!h.length)return console.warn("st_observer: cross registration no goals"),this;for(let f of l){a.callbacks.get(f)||a.callbacks.set(f,this._createCbObj()),a.elements.add(f);let _=a.crossRules.get(f);_||(_=[],a.crossRules.set(f,_));let u=_.find(g=>{if(g.goals.size!==h.length)return!1;for(let w of h)if(!g.goals.has(w))return!1;return!0});u||(u=this._createCrossRule(h),_.push(u)),u[s].add(e);for(let g of h)a.elements.add(g)}return this._runAllCrossChecks(),this}on_cross(s,e,r){return this._registerCross("on_cross",s,e,r)}once_cross(s,e,r){return this._registerCross("once_cross",s,e,r)}while_cross(s,e,r){return this._registerCross("while_cross",s,e,r)}resetCrossOnceFlags(s,e){let r=this._internal,n=s?this._resolveTargets(s):Array.from(r.crossRules.keys()),a=e?this._resolveTargets(e):null;for(let l of n){let h=r.crossRules.get(l);if(h)for(let f of h)if(!a)f._once_done.clear();else for(let _ of a)f._once_done.delete(_)}return this}},p=v;export{p as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_observer=(()=>{var v=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var E=(g,e)=>{for(var s in e)v(g,s,{get:e[s],enumerable:!0})},O=(g,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of S(e))!R.call(g,r)&&r!==s&&v(g,r,{get:()=>e[r],enumerable:!(n=p(e,r))||n.enumerable});return g};var T=g=>O(v({},"__esModule",{value:!0}),g);var j={};E(j,{default:()=>I});var k=class g{static#e=new Map;constructor(e={}){let s=Object.assign({selector:null,root:null,rootMargin:"0px",threshold:0,before_init:()=>{},on_init:()=>{}},e);if(!s.selector)throw new Error("st_observer: selector required");let n=typeof s.selector=="string"?s.selector:Symbol("selector");if(g.#e.has(n))return this._internal=g.#e.get(n),this;let r={key:n,selector:s.selector,options:{root:s.root,rootMargin:s.rootMargin,threshold:s.threshold},observer:null,callbacks:new WeakMap,elements:new Set,_connected:!1,crossRules:new Map};s.before_init();let a=()=>({on_show:new Set,once_show:new Set,while_show:new Set,on_hide:new Set,once_hide:new Set,while_hide:new Set,_once_shown:!1,_once_hidden:!1,_wasIntersecting:!1}),l=(t,...i)=>{try{t(...i)}catch(d){console.error(d)}},h=(t,i)=>!(t.right<=i.left||t.left>=i.right||t.bottom<=i.top||t.top>=i.bottom),f=t=>t?typeof t=="string"?Array.from(document.querySelectorAll(t)):t instanceof Element?[t]:NodeList.prototype.isPrototypeOf(t)||Array.isArray(t)?Array.from(t):[]:typeof r.selector=="string"?Array.from(document.querySelectorAll(r.selector)):r.selector instanceof Element?[r.selector]:NodeList.prototype.isPrototypeOf(r.selector)||Array.isArray(r.selector)?Array.from(r.selector):[],_=t=>({goals:new Set(t),on_cross:new Set,once_cross:new Set,while_cross:new Set,_once_done:new Set,_wasCrossing:new Map}),u=t=>{let i=r.crossRules.get(t);if(!i||!i.length||!document.contains(t))return;let d=t.getBoundingClientRect();for(let o of i)for(let c of o.goals){if(!document.contains(c)){o._wasCrossing.set(c,!1);continue}let A=c.getBoundingClientRect(),C=h(d,A);C&&o.while_cross.forEach(m=>l(m,{target:t,goal:c},t,c)),!!!o._wasCrossing.get(c)&&C&&o.on_cross.forEach(m=>l(m,{target:t,goal:c},t,c)),C&&!o._once_done.has(c)&&(o.once_cross.forEach(m=>l(m,{target:t,goal:c},t,c)),o._once_done.add(c)),o._wasCrossing.set(c,!!C)}},w=()=>{for(let t of Array.from(r.crossRules.keys()))if(document.contains(t))try{u(t)}catch(i){console.error(i)}},b=()=>t=>{for(let i of t){let d=i.target,o=r.callbacks.get(d);o||(o=a(),r.callbacks.set(d,o)),i.isIntersecting?(o.while_show.forEach(c=>l(c,i,d)),o._wasIntersecting||o.on_show.forEach(c=>l(c,i,d)),o._once_shown||(o._once_shown=!0,o.once_show.forEach(c=>l(c,i,d))),o._wasIntersecting=!0):(o.while_hide.forEach(c=>l(c,i,d)),o._wasIntersecting&&o.on_hide.forEach(c=>l(c,i,d)),o._once_hidden||(o._once_hidden=!0,o.once_hide.forEach(c=>l(c,i,d))),o._wasIntersecting=!1)}w()};this._internal=r,this._createCbObj=a,this._resolveTargets=f,this._createCrossRule=_,this._checkCrossForTarget=u,this._runAllCrossChecks=w,this._makeIoCallback=b;let y=f();for(let t of y)r.elements.add(t),s.on_init(t),r.callbacks.get(t)||r.callbacks.set(t,a());g.#e.set(n,r),this.connect()}enableAutoCrossChecks(e={}){let s=Object.assign({strategy:"all",watchScrollAncestors:!0,watchResize:!0,rAFWhileAnimating:!1},e);if(this._autoChecks)return this._autoChecks.cfg=s,this;let n=this._internal,r=this,a=!1,l=()=>{a||(a=!0,requestAnimationFrame(()=>{a=!1,(s.strategy==="all"||s.strategy==="entryOnly")&&r._runAllCrossChecks()}))},h=b=>{let y=new Set,t=b.parentNode;for(;t&&t!==document;){if(t instanceof HTMLElement){let i=getComputedStyle(t),d=i.overflow+i.overflowX+i.overflowY;/(auto|scroll|overlay)/.test(d)&&y.add(t)}t=t.parentNode}return y.add(window),Array.from(y)},f=()=>l(),_=new Set;if(s.watchScrollAncestors)for(let b of Array.from(n.elements))h(b).forEach(t=>{_.has(t)||(t.addEventListener("scroll",f,{passive:!0}),_.add(t))});else window.addEventListener("scroll",f,{passive:!0}),_.add(window);s.watchResize&&window.addEventListener("resize",f,{passive:!0});let u=null,w=()=>{r._runAllCrossChecks(),u=requestAnimationFrame(w)};return this._autoChecks={cfg:s,scrollTargets:_,onScrollOrResize:f,rafId:u,startRaf:()=>{u||w()},stopRaf:()=>{u&&(cancelAnimationFrame(u),u=null)}},this}disableAutoCrossChecks(){if(!this._autoChecks)return this;let e=this._autoChecks;e.scrollTargets.forEach(s=>{try{s.removeEventListener("scroll",e.onScrollOrResize)}catch{}});try{window.removeEventListener("resize",e.onScrollOrResize)}catch{}return e.stopRaf(),this._autoChecks=null,this}_register(e,s,n){if(typeof s!="function")return this;let r=this._internal,a=this._resolveTargets(n);for(let l of a){let h=r.callbacks.get(l);if(h||(h=this._createCbObj(),r.callbacks.set(l,h)),h[e].add(s),!r.elements.has(l)&&(r.elements.add(l),r._connected&&r.observer))try{r.observer.observe(l)}catch{}}return this}on_show(e,s){return this._register("on_show",e,s)}while_show(e,s){return this._register("while_show",e,s)}once_show(e,s){return this._register("once_show",e,s)}on_hide(e,s){return this._register("on_hide",e,s)}while_hide(e,s){return this._register("while_hide",e,s)}once_hide(e,s){return this._register("once_hide",e,s)}observe(e){let s=this._resolveTargets(e);for(let n of s)if(this._internal.callbacks.get(n)||this._internal.callbacks.set(n,this._createCbObj()),this._internal.elements.add(n),this._internal._connected&&this._internal.observer)try{this._internal.observer.observe(n)}catch{}return this}unobserve(e){let s=this._resolveTargets(e);for(let n of s){try{this._internal.observer&&this._internal.observer.unobserve(n)}catch{}this._internal.callbacks.delete(n),this._internal.elements.delete(n)}return this}disconnect(){try{this._internal.observer&&this._internal.observer.disconnect()}catch{}return this._internal.observer=null,this._internal._connected=!1,this}connect(e={}){if(this._internal._connected)return this;if(e.root!==void 0&&(this._internal.options.root=e.root),e.rootMargin!==void 0&&(this._internal.options.rootMargin=e.rootMargin),e.threshold!==void 0&&(this._internal.options.threshold=e.threshold),this._internal.observer=new IntersectionObserver(this._makeIoCallback(),this._internal.options),e.resetFlags)for(let s of Array.from(this._internal.elements)){let n=this._internal.callbacks.get(s);n&&(n._once_shown=!1,n._once_hidden=!1,n._wasIntersecting=!1)}for(let s of Array.from(this._internal.elements))try{this._internal.observer.observe(s)}catch{}return this._internal._connected=!0,this}reconnect(e={}){return this.connect(e)}resetOnceFlags(e){let s=e?this._resolveTargets(e):Array.from(this._internal.elements);for(let n of s){let r=this._internal.callbacks.get(n);r&&(r._once_shown=!1,r._once_hidden=!1,r._wasIntersecting=!1)}return this}isConnected(){return!!this._internal._connected}getObservedElements(){return Array.from(this._internal.elements)}_registerCross(e,s,n,r){if(typeof s!="function")return this;let a=this._internal;r===void 0&&(typeof n=="string"||n instanceof Element||NodeList.prototype.isPrototypeOf(n)||Array.isArray(n))&&(r=n,n=void 0);let l=this._resolveTargets(n),h=this._resolveTargets(r);if(!h.length)return console.warn("st_observer: cross registration no goals"),this;for(let f of l){a.callbacks.get(f)||a.callbacks.set(f,this._createCbObj()),a.elements.add(f);let _=a.crossRules.get(f);_||(_=[],a.crossRules.set(f,_));let u=_.find(w=>{if(w.goals.size!==h.length)return!1;for(let b of h)if(!w.goals.has(b))return!1;return!0});u||(u=this._createCrossRule(h),_.push(u)),u[e].add(s);for(let w of h)a.elements.add(w)}return this._runAllCrossChecks(),this}on_cross(e,s,n){return this._registerCross("on_cross",e,s,n)}once_cross(e,s,n){return this._registerCross("once_cross",e,s,n)}while_cross(e,s,n){return this._registerCross("while_cross",e,s,n)}resetCrossOnceFlags(e,s){let n=this._internal,r=e?this._resolveTargets(e):Array.from(n.crossRules.keys()),a=s?this._resolveTargets(s):null;for(let l of r){let h=n.crossRules.get(l);if(h)for(let f of h)if(!a)f._once_done.clear();else for(let _ of a)f._once_done.delete(_)}return this}},I=k;return T(j);})();
|
|
2
|
+
if(typeof st_observer!=="undefined"&&st_observer&&st_observer.default)globalThis.st_observer=st_observer.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Symbol(),a=t=>{try{return t instanceof Element?t:document.querySelector(t)}catch{return}};var o=class t{static#e=Symbol();static#t=new WeakMap;static#l=new WeakMap;static#a=new Set(["\u0432","\u0432\u043E","\u043D\u0430","\u043F\u043E","\u0441","\u0441\u043E","\u043A","\u043A\u043E","\u0443","\u043E","\u043E\u0431","\u043E\u0431\u043E","\u0437\u0430","\u0438\u0437","\u0438\u0437\u043E","\u0434\u043E","\u043E\u0442","\u043F\u0440\u0438","\u043F\u043E\u0434","\u043F\u043E\u0434\u043E","\u043D\u0430\u0434","\u043D\u0430\u0434\u043E","\u0431\u0435\u0437","\u0434\u043B\u044F","\u043F\u0440\u043E","\u0447\u0435\u0440\u0435\u0437","\u0441\u043A\u0432\u043E\u0437\u044C","\u043C\u0435\u0436\u0434\u0443","\u043C\u0435\u0436","\u043F\u0435\u0440\u0435\u0434","\u043F\u0435\u0440\u0435\u0434\u043E","\u043E\u043A\u043E\u043B\u043E","\u0441\u0440\u0435\u0434\u0438","\u043A\u0440\u043E\u043C\u0435","\u0432\u043E\u043A\u0440\u0443\u0433","\u0432\u0434\u043E\u043B\u044C","\u043F\u0440\u043E\u0442\u0438\u0432","\u0440\u0430\u0434\u0438","\u0432\u043C\u0435\u0441\u0442\u043E","\u0432\u043D\u0443\u0442\u0440\u0438","\u0441\u0432\u0435\u0440\u0445\u0443","\u0441\u043D\u0438\u0437\u0443","\u0432\u043E\u0437\u043B\u0435","\u043D\u0430\u043F\u0440\u043E\u0442\u0438\u0432","\u0431\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u044F","\u0441\u043E\u0433\u043B\u0430\u0441\u043D\u043E","\u0432\u043E\u043F\u0440\u0435\u043A\u0438","\u0438","\u0430","\u043D\u043E","\u0434\u0430","\u0438\u043B\u0438","\u043B\u0438\u0431\u043E","\u0447\u0442\u043E","\u0447\u0442\u043E\u0431","\u0447\u0442\u043E\u0431\u044B","\u043A\u0430\u043A","\u0435\u0441\u043B\u0438","\u0438\u0431\u043E","\u0445\u043E\u0442\u044F","\u043F\u043E\u043A\u0430","\u043A\u043E\u0433\u0434\u0430","\u043A\u0443\u0434\u0430","\u043E\u0442\u043A\u0443\u0434\u0430","\u0437\u0430\u0447\u0435\u043C","\u043F\u043E\u0447\u0435\u043C\u0443","\u0436\u0435","\u043B\u0438","\u0431\u044B","\u0431","\u0432\u0435\u0434\u044C","\u043B\u0438\u0448\u044C","\u0443\u0436","\u0430\u0436","\u0442\u043E","\u043D\u0438","\u043D\u0435","\u043D\u0443","\u0432\u043E\u043D","\u0432\u043E\u0442"]);static#c=new Set(["SCRIPT","STYLE","NOSCRIPT","CODE","PRE","TEXTAREA","KBD","SAMP"]);static#d=(()=>{let n=[...this.#a].sort((e,i)=>i.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(`(?<=^|[\\s(\xAB\u201E"'\\[])(${n})(\\s+)(?=\\S)`,"gi")})();static#f=/(\d) +(?=\S)/g;static#g=/ +(?=[—–] )/g;static preventWidows(n){let e=a(n);if(!e||e[t.#e])return;t.#s(e);let i=t.#r(e);for(let r of i)t.#t.set(r,r.nodeValue),r[t.#e]=!0,t.#n(r);t.#p(e)}static#E(n){return n.replace(t.#d,(e,i)=>i+"\xA0").replace(t.#f,"$1\xA0").replace(t.#g,"\xA0")}static#n(n){t.#t.has(n)||t.#t.set(n,n.nodeValue);let e=t.#E(t.#t.get(n));n.nodeValue!==e&&(n.nodeValue=e)}static#s(n){n[t.#e]=!0;let e=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i;for(;i=e.nextNode();)i[t.#e]=!0}static#r(n){let e=[],i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,{acceptNode:s=>{if(!s.nodeValue||!s.nodeValue.trim())return NodeFilter.FILTER_REJECT;for(let u=s.parentElement;u&&u!==n.parentElement;u=u.parentElement){if(t.#c.has(u.tagName))return NodeFilter.FILTER_REJECT;let l=u.getAttribute&&u.getAttribute("contenteditable");if(l===""||l==="true")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}),r;for(;r=i.nextNode();)e.push(r);return e}static#u(n){let e=t.#r(n);for(let i of e)i[t.#e]||(t.#t.set(i,i.nodeValue),i[t.#e]=!0),t.#n(i)}static#i(n,e){n.mutating=!0;try{e()}finally{n.mutation&&n.mutation.takeRecords(),n.mutating=!1}}static#o(n,e){let i=window.requestIdleCallback?window.requestIdleCallback.bind(window):r=>setTimeout(r,0);e.flush_scheduled||(e.flush_scheduled=!0,i(()=>{e.flush_scheduled=!1,t.#i(e,()=>{for(let r of e.queue)r.parentNode&&(t.#t.has(r)||t.#t.set(r,r.nodeValue),r[t.#e]=!0,t.#n(r));e.queue.clear()})}))}static#p(n){let e={mutation:null,intersection:null,resize:null,mutating:!1,visible:!1,pending_resize:!1,flush_scheduled:!1,queue:new Set};t.#l.set(n,e),e.mutation=new MutationObserver(i=>{if(!e.mutating){for(let r of i){if(r.type==="characterData"){r.target.parentNode&&r.target.nodeValue&&r.target.nodeValue.trim()&&e.queue.add(r.target);continue}if(r.type==="childList"){for(let s of r.addedNodes)if(s.nodeType===Node.TEXT_NODE)s.nodeValue&&s.nodeValue.trim()&&e.queue.add(s);else if(s.nodeType===Node.ELEMENT_NODE){t.#s(s);for(let u of t.#r(s))e.queue.add(u)}}}e.visible&&e.queue.size&&t.#o(n,e)}}),e.mutation.observe(n,{subtree:!0,childList:!0,characterData:!0}),e.intersection=new IntersectionObserver(i=>{for(let r of i)e.visible=r.isIntersecting,r.isIntersecting&&(e.queue.size&&t.#o(n,e),e.pending_resize&&(e.pending_resize=!1,t.#i(e,()=>t.#u(n))))},{rootMargin:"200px"}),e.intersection.observe(n),e.resize=new ResizeObserver(()=>{if(!e.mutating){if(!e.visible){e.pending_resize=!0;return}t.#i(e,()=>t.#u(n))}}),e.resize.observe(n)}};export{o as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_typograf=(()=>{var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var E=(t,n)=>{for(var e in n)l(t,e,{get:n[e],enumerable:!0})},p=(t,n,e,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of f(n))!g.call(t,r)&&r!==e&&l(t,r,{get:()=>n[r],enumerable:!(i=d(n,r))||i.enumerable});return t};var h=t=>p(l({},"__esModule",{value:!0}),t);var T={};E(T,{default:()=>o});var b=Symbol(),c=t=>{try{return t instanceof Element?t:document.querySelector(t)}catch{return}};var o=class t{static#e=Symbol();static#t=new WeakMap;static#l=new WeakMap;static#a=new Set(["\u0432","\u0432\u043E","\u043D\u0430","\u043F\u043E","\u0441","\u0441\u043E","\u043A","\u043A\u043E","\u0443","\u043E","\u043E\u0431","\u043E\u0431\u043E","\u0437\u0430","\u0438\u0437","\u0438\u0437\u043E","\u0434\u043E","\u043E\u0442","\u043F\u0440\u0438","\u043F\u043E\u0434","\u043F\u043E\u0434\u043E","\u043D\u0430\u0434","\u043D\u0430\u0434\u043E","\u0431\u0435\u0437","\u0434\u043B\u044F","\u043F\u0440\u043E","\u0447\u0435\u0440\u0435\u0437","\u0441\u043A\u0432\u043E\u0437\u044C","\u043C\u0435\u0436\u0434\u0443","\u043C\u0435\u0436","\u043F\u0435\u0440\u0435\u0434","\u043F\u0435\u0440\u0435\u0434\u043E","\u043E\u043A\u043E\u043B\u043E","\u0441\u0440\u0435\u0434\u0438","\u043A\u0440\u043E\u043C\u0435","\u0432\u043E\u043A\u0440\u0443\u0433","\u0432\u0434\u043E\u043B\u044C","\u043F\u0440\u043E\u0442\u0438\u0432","\u0440\u0430\u0434\u0438","\u0432\u043C\u0435\u0441\u0442\u043E","\u0432\u043D\u0443\u0442\u0440\u0438","\u0441\u0432\u0435\u0440\u0445\u0443","\u0441\u043D\u0438\u0437\u0443","\u0432\u043E\u0437\u043B\u0435","\u043D\u0430\u043F\u0440\u043E\u0442\u0438\u0432","\u0431\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u044F","\u0441\u043E\u0433\u043B\u0430\u0441\u043D\u043E","\u0432\u043E\u043F\u0440\u0435\u043A\u0438","\u0438","\u0430","\u043D\u043E","\u0434\u0430","\u0438\u043B\u0438","\u043B\u0438\u0431\u043E","\u0447\u0442\u043E","\u0447\u0442\u043E\u0431","\u0447\u0442\u043E\u0431\u044B","\u043A\u0430\u043A","\u0435\u0441\u043B\u0438","\u0438\u0431\u043E","\u0445\u043E\u0442\u044F","\u043F\u043E\u043A\u0430","\u043A\u043E\u0433\u0434\u0430","\u043A\u0443\u0434\u0430","\u043E\u0442\u043A\u0443\u0434\u0430","\u0437\u0430\u0447\u0435\u043C","\u043F\u043E\u0447\u0435\u043C\u0443","\u0436\u0435","\u043B\u0438","\u0431\u044B","\u0431","\u0432\u0435\u0434\u044C","\u043B\u0438\u0448\u044C","\u0443\u0436","\u0430\u0436","\u0442\u043E","\u043D\u0438","\u043D\u0435","\u043D\u0443","\u0432\u043E\u043D","\u0432\u043E\u0442"]);static#c=new Set(["SCRIPT","STYLE","NOSCRIPT","CODE","PRE","TEXTAREA","KBD","SAMP"]);static#d=(()=>{let n=[...this.#a].sort((e,i)=>i.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");return new RegExp(`(?<=^|[\\s(\xAB\u201E"'\\[])(${n})(\\s+)(?=\\S)`,"gi")})();static#f=/(\d) +(?=\S)/g;static#g=/ +(?=[—–] )/g;static preventWidows(n){let e=c(n);if(!e||e[t.#e])return;t.#s(e);let i=t.#r(e);for(let r of i)t.#t.set(r,r.nodeValue),r[t.#e]=!0,t.#n(r);t.#p(e)}static#E(n){return n.replace(t.#d,(e,i)=>i+"\xA0").replace(t.#f,"$1\xA0").replace(t.#g,"\xA0")}static#n(n){t.#t.has(n)||t.#t.set(n,n.nodeValue);let e=t.#E(t.#t.get(n));n.nodeValue!==e&&(n.nodeValue=e)}static#s(n){n[t.#e]=!0;let e=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i;for(;i=e.nextNode();)i[t.#e]=!0}static#r(n){let e=[],i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,{acceptNode:s=>{if(!s.nodeValue||!s.nodeValue.trim())return NodeFilter.FILTER_REJECT;for(let u=s.parentElement;u&&u!==n.parentElement;u=u.parentElement){if(t.#c.has(u.tagName))return NodeFilter.FILTER_REJECT;let a=u.getAttribute&&u.getAttribute("contenteditable");if(a===""||a==="true")return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}),r;for(;r=i.nextNode();)e.push(r);return e}static#u(n){let e=t.#r(n);for(let i of e)i[t.#e]||(t.#t.set(i,i.nodeValue),i[t.#e]=!0),t.#n(i)}static#i(n,e){n.mutating=!0;try{e()}finally{n.mutation&&n.mutation.takeRecords(),n.mutating=!1}}static#o(n,e){let i=window.requestIdleCallback?window.requestIdleCallback.bind(window):r=>setTimeout(r,0);e.flush_scheduled||(e.flush_scheduled=!0,i(()=>{e.flush_scheduled=!1,t.#i(e,()=>{for(let r of e.queue)r.parentNode&&(t.#t.has(r)||t.#t.set(r,r.nodeValue),r[t.#e]=!0,t.#n(r));e.queue.clear()})}))}static#p(n){let e={mutation:null,intersection:null,resize:null,mutating:!1,visible:!1,pending_resize:!1,flush_scheduled:!1,queue:new Set};t.#l.set(n,e),e.mutation=new MutationObserver(i=>{if(!e.mutating){for(let r of i){if(r.type==="characterData"){r.target.parentNode&&r.target.nodeValue&&r.target.nodeValue.trim()&&e.queue.add(r.target);continue}if(r.type==="childList"){for(let s of r.addedNodes)if(s.nodeType===Node.TEXT_NODE)s.nodeValue&&s.nodeValue.trim()&&e.queue.add(s);else if(s.nodeType===Node.ELEMENT_NODE){t.#s(s);for(let u of t.#r(s))e.queue.add(u)}}}e.visible&&e.queue.size&&t.#o(n,e)}}),e.mutation.observe(n,{subtree:!0,childList:!0,characterData:!0}),e.intersection=new IntersectionObserver(i=>{for(let r of i)e.visible=r.isIntersecting,r.isIntersecting&&(e.queue.size&&t.#o(n,e),e.pending_resize&&(e.pending_resize=!1,t.#i(e,()=>t.#u(n))))},{rootMargin:"200px"}),e.intersection.observe(n),e.resize=new ResizeObserver(()=>{if(!e.mutating){if(!e.visible){e.pending_resize=!0;return}t.#i(e,()=>t.#u(n))}}),e.resize.observe(n)}};return h(T);})();
|
|
2
|
+
if(typeof st_typograf!=="undefined"&&st_typograf&&st_typograf.default)globalThis.st_typograf=st_typograf.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=class{#e=null;#t=null;constructor(t){this.#e=function(e){(!t.validator||t.validator(e))&&(()=>{if(t.regexp){let o=new RegExp(t.regexp);return!t.attribute&&!t.property?o.test(e.value):t.attribute&&t.property?e.hasAttribute(t.attribute)&&o.test(e[t.property]):(t.attribute?o.test(e.getAttribute(t.attribute)):!0)&&(t.property?o.test(e[t.property]):!0)}else return t.attribute?e.hasAttribute(t.attribute):!0})()?t.on_valid(e):t.on_invalid(e),t.after_check&&t.after_check(e)},this.#t=t.selector,typeof t.onload=="function"?t.onload(this.#t):t.onload===!0&&this.apply(),document.querySelectorAll(this.#t).forEach(e=>{(t.events??["input","blur"]).forEach(o=>{e.addEventListener(o,()=>{this.#e(e)})})})}apply(t){document.querySelectorAll(t??this.#t).forEach(this.#e,this)}},i=r;export{i as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var st_validator=(()=>{var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var h=(r,t)=>{for(var e in t)i(r,e,{get:t[e],enumerable:!0})},n=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of c(t))!f.call(r,l)&&l!==e&&i(r,l,{get:()=>t[l],enumerable:!(o=u(t,l))||o.enumerable});return r};var b=r=>n(i({},"__esModule",{value:!0}),r);var y={};h(y,{default:()=>d});var s=class{#e=null;#t=null;constructor(t){this.#e=function(e){(!t.validator||t.validator(e))&&(()=>{if(t.regexp){let o=new RegExp(t.regexp);return!t.attribute&&!t.property?o.test(e.value):t.attribute&&t.property?e.hasAttribute(t.attribute)&&o.test(e[t.property]):(t.attribute?o.test(e.getAttribute(t.attribute)):!0)&&(t.property?o.test(e[t.property]):!0)}else return t.attribute?e.hasAttribute(t.attribute):!0})()?t.on_valid(e):t.on_invalid(e),t.after_check&&t.after_check(e)},this.#t=t.selector,typeof t.onload=="function"?t.onload(this.#t):t.onload===!0&&this.apply(),document.querySelectorAll(this.#t).forEach(e=>{(t.events??["input","blur"]).forEach(o=>{e.addEventListener(o,()=>{this.#e(e)})})})}apply(t){document.querySelectorAll(t??this.#t).forEach(this.#e,this)}},d=s;return b(y);})();
|
|
2
|
+
if(typeof st_validator!=="undefined"&&st_validator&&st_validator.default)globalThis.st_validator=st_validator.default;
|